修改模板文件,规范化代码

This commit is contained in:
SliverHorn
2020-11-08 03:15:27 +08:00
parent 8ebb1fda77
commit 5c94c73004
4 changed files with 42 additions and 42 deletions
+2 -2
View File
@@ -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)
}
+2 -2
View File
@@ -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,
+3 -3
View File
@@ -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)
}
}