新增:权限分组模块
This commit is contained in:
parent
f7fd8dc29e
commit
28f5fa1019
|
@ -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{}{
|
||||
|
|
|
@ -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{}{
|
||||
|
|
Loading…
Reference in New Issue
Block a user