fix: 网元配置可选参数接口优化
This commit is contained in:
@@ -34,10 +34,9 @@ type NeConfigController struct {
|
||||
//
|
||||
// GET /list
|
||||
func (s *NeConfigController) List(c *gin.Context) {
|
||||
querys := ctx.QueryMap(c)
|
||||
data := s.neConfigService.SelectPage(querys)
|
||||
|
||||
c.JSON(200, result.Ok(data))
|
||||
querys := ctx.QueryMapString(c)
|
||||
rows, total := s.neConfigService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"total": total, "rows": rows}))
|
||||
}
|
||||
|
||||
// 网元参数配置可用属性值信息
|
||||
@@ -199,16 +198,16 @@ func (s *NeConfigController) DataInfo(c *gin.Context) {
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
return
|
||||
} else {
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigInfo(neInfo, query.ParamName)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.Ok(resData))
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigInfo(neInfo, query.ParamName)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, result.Ok(resData))
|
||||
}
|
||||
|
||||
// 网元参数配置数据修改
|
||||
@@ -242,15 +241,15 @@ func (s *NeConfigController) DataEdit(c *gin.Context) {
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
return
|
||||
} else {
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigUpdate(neInfo, body.ParamName, body.Loc, body.ParamData)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
}
|
||||
|
||||
// 网元直连
|
||||
resData, err := neFetchlink.NeConfigUpdate(neInfo, body.ParamName, body.Loc, body.ParamData)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
return
|
||||
}
|
||||
c.JSON(200, result.OkData(resData))
|
||||
}
|
||||
|
||||
// 网元参数配置数据新增(array)
|
||||
|
||||
Reference in New Issue
Block a user