update: used gormv2 to handle permission process

This commit is contained in:
zhangwenjian committed 2020-08-29 23:25:53 +08:00
1 parent d53ba4ed7a
commit 671291d024
10 files changed
+64 -55

No files matched your search

+6 -9
View File
@@ -27,15 +27,12 @@ func OK(c *gin.Context, data interface{}, msg string) {
// 分页数据处理
func PageOK(c *gin.Context, result interface{}, count int, pageIndex int, pageSize int, msg string) {
var res PageResponse
res.Data.List = result
res.Data.Count = count
res.Data.PageIndex = pageIndex
res.Data.PageSize = pageSize
if msg != "" {
res.Msg = msg
}
c.JSON(http.StatusOK, res.ReturnOK())
var res Page
res.List = result
res.Count = count
res.PageIndex = pageIndex
res.PageSize = pageSize
OK(c, res, msg)
}
// 兼容函数