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

This commit is contained in:
TsMask
2024-03-21 11:11:49 +08:00
parent c3aae10b97
commit 9c74776011

View File

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