feat: 网元配置数据查询无data时返回空数组

This commit is contained in:
TsMask
2024-12-27 18:26:37 +08:00
parent 1cfbfa2d1b
commit b265e6368a

View File

@@ -68,6 +68,10 @@ func NeConfigInfo(neInfo model.NeInfo, paramName string) (map[string]any, error)
logger.Errorf("NeConfigInfo Unmarshal %s", err.Error())
return nil, err
}
// 网元参数配置信息为空时是{}需要补充data属性
if _, ok := resData["data"]; !ok {
resData["data"] = []map[string]any{}
}
return resData, nil
}