权限判定处理
This commit is contained in:
parent
e01586b394
commit
c3b6c88471
@ -157,15 +157,20 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||||||
@Override
|
@Override
|
||||||
@SystemLogPoint(description = "修改管理员", customerLog = "'修改管理员:'+#adminUser.username")
|
@SystemLogPoint(description = "修改管理员", customerLog = "'修改管理员:'+#adminUser.username")
|
||||||
public boolean updateAdminUser(AdminUser adminUser, List<String> roles) {
|
public boolean updateAdminUser(AdminUser adminUser, List<String> roles) {
|
||||||
if (roles.size() > rolesMaxSize) {
|
|
||||||
throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN);
|
|
||||||
}
|
|
||||||
if (roles != null && roles.size() > 0) {
|
if (roles != null && roles.size() > 0) {
|
||||||
|
|
||||||
|
if (roles.size() > rolesMaxSize) {
|
||||||
|
throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN);
|
||||||
|
}
|
||||||
adminUser.setRoleIds(StringUtils.join(",", roles));
|
adminUser.setRoleIds(StringUtils.join(",", roles));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
adminUser.setRoleIds("");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateById(adminUser);
|
|
||||||
updateRole(adminUser.getId(), roles);
|
updateRole(adminUser.getId(), roles);
|
||||||
|
this.updateById(adminUser);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user