管理员删除时,管理员角色没有同步删除问题处理
This commit is contained in:
parent
771f9668ce
commit
cdfdf483d6
@ -17,7 +17,7 @@ public enum ResultCode {
|
||||
/**
|
||||
* 失败返回码
|
||||
*/
|
||||
ERROR(400, "业务异常,请核对问题后进行重试"),
|
||||
ERROR(400, "服务器繁忙,请稍后重试"),
|
||||
|
||||
/**
|
||||
* 失败返回码
|
||||
|
@ -236,6 +236,11 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||
* @param roles 角色id集合
|
||||
*/
|
||||
private void updateRole(String userId, List<String> roles) {
|
||||
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("user_id", userId);
|
||||
userRoleService.remove(queryWrapper);
|
||||
|
||||
if (roles.isEmpty() || roles == null) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user