feat: 网元主机添加redis连接终端控制

This commit is contained in:
TsMask
2024-11-07 18:03:59 +08:00
parent 2c139e71c4
commit 9ac5ae50ec
8 changed files with 206 additions and 3 deletions

View File

@@ -149,6 +149,13 @@ func (r *NeHost) DeleteByIds(hostIds []string) (int64, error) {
return 0, fmt.Errorf("neHost.noData")
}
for _, v := range ids {
if v.GroupID == "1" {
// 主机信息操作【%s】失败禁止操作网元
return 0, fmt.Errorf("neHost.banNE")
}
}
if len(ids) == len(hostIds) {
rows := r.neHostRepository.DeleteByIds(hostIds)
return rows, nil