feat: 网元参数配置数据变更日志
This commit is contained in:
@@ -65,7 +65,7 @@ func (r *PtNeConfigDataService) DeleteByIds(paramIds []string) (int64, error) {
|
||||
// 检查是否存在
|
||||
ids := r.ptNeConfigDataRepository.SelectByIds(paramIds)
|
||||
if len(ids) <= 0 {
|
||||
return 0, fmt.Errorf("neHostCmd.noData")
|
||||
return 0, fmt.Errorf("ptNeConfigData.noData")
|
||||
}
|
||||
|
||||
if len(ids) == len(paramIds) {
|
||||
@@ -94,7 +94,11 @@ func (r *PtNeConfigDataService) SaveAsDefaultByType(neInfo neModel.NeInfo, stubT
|
||||
continue
|
||||
}
|
||||
// 将json数据转字符串存储 data:[{},{}]
|
||||
paramDataByte, err := json.Marshal(resData)
|
||||
dataArr, ok := resData["data"]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
paramDataByte, err := json.Marshal(dataArr)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
@@ -138,7 +142,7 @@ func (r *PtNeConfigDataService) SelectByStubType(param model.PtNeConfigData) mod
|
||||
if len(list) > 0 {
|
||||
paraData = list[0]
|
||||
if err := json.Unmarshal([]byte(paraData.ParamJson), ¶Data.ParamData); err != nil {
|
||||
paraData.ParamData = map[string]any{}
|
||||
paraData.ParamData = []map[string]any{}
|
||||
}
|
||||
}
|
||||
return paraData
|
||||
|
||||
Reference in New Issue
Block a user