修改模板文件,规范化代码
This commit is contained in:
@@ -102,8 +102,8 @@ func GetApiById(c *gin.Context) {
|
||||
}
|
||||
err, api := service.GetApiById(idInfo.Id)
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("获取数据失败!", zap.Any("err", err))
|
||||
response.FailWithMessage("获取数据失败", c)
|
||||
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
|
||||
response.FailWithMessage("获取失败", c)
|
||||
} else {
|
||||
response.OkWithData(response.SysAPIResponse{Api: api}, c)
|
||||
}
|
||||
|
||||
@@ -103,8 +103,8 @@ func GetSysDictionaryDetailList(c *gin.Context) {
|
||||
var pageInfo request.SysDictionaryDetailSearch
|
||||
_ = c.ShouldBindQuery(&pageInfo)
|
||||
if err, list, total := service.GetSysDictionaryDetailInfoList(pageInfo); err != nil {
|
||||
global.GVA_LOG.Error("获取数据失败!", zap.Any("err", err))
|
||||
response.FailWithMessage("获取数据失败", c)
|
||||
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
|
||||
response.FailWithMessage("获取失败", c)
|
||||
} else {
|
||||
response.OkWithDetailed(response.PageResult{
|
||||
List: list,
|
||||
|
||||
@@ -166,15 +166,15 @@ func GetUserList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
if err, list, total := service.GetUserInfoList(pageInfo); err != nil {
|
||||
global.GVA_LOG.Error("获取数据失败", zap.Any("err", err))
|
||||
response.FailWithMessage("获取数据失败", c)
|
||||
global.GVA_LOG.Error("获取失败", zap.Any("err", err))
|
||||
response.FailWithMessage("获取失败", c)
|
||||
} else {
|
||||
response.OkWithDetailed(response.PageResult{
|
||||
List: list,
|
||||
Total: total,
|
||||
Page: pageInfo.Page,
|
||||
PageSize: pageInfo.PageSize,
|
||||
}, "获取数据成功", c)
|
||||
}, "获取成功", c)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user