- GetUsers支持分页

This commit is contained in:
gazebo
2019-08-14 11:32:20 +08:00
parent 4c484a6280
commit f788eec5c1
6 changed files with 29 additions and 11 deletions

View File

@@ -265,8 +265,8 @@ func DeleteConfig(ctx *jxcontext.Context, key, configType string) (err error) {
errList := errlist.New()
userIDs, err2 := api2.RoleMan.GetRoleUserList(autils.NewRole(key, 0))
if err = err2; err == nil && len(userIDs) > 0 {
userList, err2 := GetUsers(ctx, 0, "", userIDs, "", "")
if err = err2; err == nil {
userList, totalCount, err2 := dao.GetUsers(dao.GetDB(), 0, "", userIDs, "", "", 0, -1)
if err = err2; err == nil && totalCount > 0 {
err = fmt.Errorf("还有人员在使用角色:%s人员信息:%s", key, utils.MustMarshal(utils.Struct2Map(userList, "compact")))
}
}