新增:权限分组模块

This commit is contained in:
momo 2023-11-17 17:18:06 +08:00
parent f7fd8dc29e
commit 28f5fa1019
2 changed files with 2 additions and 4 deletions

View File

@ -44,8 +44,7 @@ func (l *GetApisLogic) GetApis(req *types.GetApisReq, userinfo *auth.UserInfo) (
}
var pageCount int = 1
if resCount > int64(req.PerPage) {
pageCountFloat := math.Ceil(float64(resCount) / float64(req.PerPage))
pageCount = int(pageCountFloat)
pageCount = int(math.Ceil(float64(resCount) / float64(req.PerPage)))
}
return resp.SetStatus(basic.CodeOK, map[string]interface{}{

View File

@ -45,8 +45,7 @@ func (l *GetLdapGroupsLogic) GetLdapGroups(req *types.GetLdapGroupsReq, userinfo
}
var pageCount int = 1
if resCount > int64(req.PerPage) {
pageCountFloat := math.Ceil(float64(resCount) / float64(req.PerPage))
pageCount = int(pageCountFloat)
pageCount = int(math.Ceil(float64(resCount) / float64(req.PerPage)))
}
return resp.SetStatus(basic.CodeOK, map[string]interface{}{