fix: 网元状态引用数据变更

This commit is contained in:
TsMask
2024-03-21 11:12:13 +08:00
parent 723c810b70
commit 92ea8ad892

View File

@@ -124,6 +124,7 @@ func (r *NeInfoImpl) SelectPage(query map[string]any, bandStatus bool) map[strin
// 网元状态设置为离线
if v.Status != "1" {
v.Status = "1"
(*arr)[i].Status = v.Status
r.neInfoRepository.Update(v)
}
continue
@@ -139,6 +140,7 @@ func (r *NeInfoImpl) SelectPage(query map[string]any, bandStatus bool) map[strin
} else {
v.Status = "0"
}
(*arr)[i].Status = v.Status
r.neInfoRepository.Update(v)
}
}
@@ -166,6 +168,7 @@ func (r *NeInfoImpl) SelectList(ne model.NeInfo, bandStatus bool) []model.NeInfo
// 网元状态设置为离线
if v.Status != "1" {
v.Status = "1"
(*neList)[i].Status = v.Status
r.neInfoRepository.Update(v)
}
continue
@@ -181,6 +184,7 @@ func (r *NeInfoImpl) SelectList(ne model.NeInfo, bandStatus bool) []model.NeInfo
} else {
v.Status = "0"
}
(*neList)[i].Status = v.Status
r.neInfoRepository.Update(v)
}
}