fix: 网元主机title唯一导致冲突5002修改失败

This commit is contained in:
TsMask
2025-04-18 17:11:15 +08:00
parent e30069603d
commit 89b9c105ec

View File

@@ -283,7 +283,7 @@ func (r NeInfo) Update(neInfo model.NeInfo) int64 {
uuid := generate.Code(4)
for _, host := range neInfo.Hosts {
if host.ID != 0 {
host.Title = neInfo.NeName + "_" + uuid
host.Title = fmt.Sprintf("%s_%d_%s", neInfo.NeName, neInfo.Port, uuid)
host.GroupID = "1"
host.UpdateBy = neInfo.UpdateBy
r.neHostService.Update(host)