修改日志初始化值,level值不被覆盖
This commit is contained in:
1 parent
4fe68183ba
commit
faa8de7dc2
3 files changed
+7
-7
No files matched your search
+3
-3
@@ -18,7 +18,7 @@ func Error(c *gin.Context, code int, err error, msg string) {
|
||||
res.Msg = msg
|
||||
}
|
||||
res.RequestId = tools.GenerateMsgIDFromContext(c)
|
||||
c.JSON(http.StatusOK, res.ReturnError(code))
|
||||
c.AbortWithStatusJSON(http.StatusOK, res.ReturnError(code))
|
||||
}
|
||||
|
||||
// 通常成功数据处理
|
||||
@@ -29,7 +29,7 @@ func OK(c *gin.Context, data interface{}, msg string) {
|
||||
res.Msg = msg
|
||||
}
|
||||
res.RequestId = tools.GenerateMsgIDFromContext(c)
|
||||
c.JSON(http.StatusOK, res.ReturnOK())
|
||||
c.AbortWithStatusJSON(http.StatusOK, res.ReturnOK())
|
||||
}
|
||||
|
||||
// 分页数据处理
|
||||
@@ -44,5 +44,5 @@ func PageOK(c *gin.Context, result interface{}, count int, pageIndex int, pageSi
|
||||
|
||||
// 兼容函数
|
||||
func Custum(c *gin.Context, data gin.H) {
|
||||
c.JSON(http.StatusOK, data)
|
||||
c.AbortWithStatusJSON(http.StatusOK, data)
|
||||
}
|
||||
Reference in new issue
Block a user