Commit fc73e740 authored by duanzhihong's avatar duanzhihong

修改角色

parent 494ee193
...@@ -257,7 +257,10 @@ public class UserController { ...@@ -257,7 +257,10 @@ public class UserController {
List<Long> deleteRoleResources = roleResources.stream() List<Long> deleteRoleResources = roleResources.stream()
.map(SystemUserRole::getRoleId).filter(id -> !reqUserInfo.getRoleIds().contains(id)) .map(SystemUserRole::getRoleId).filter(id -> !reqUserInfo.getRoleIds().contains(id))
.collect(Collectors.toList()); .collect(Collectors.toList());
systemUserRoleMapper.removeByIds(deleteRoleResources,reqUserInfo.getId()); if(!deleteRoleResources.isEmpty()){
systemUserRoleMapper.removeByIds(deleteRoleResources,reqUserInfo.getId());
}
// systemUserRoleMapper.removeByIds(deleteRoleResources,reqUserInfo.getId());
// userRoleService.removeByIds(deleteRoleResources); // userRoleService.removeByIds(deleteRoleResources);
return Result.success("更新成功"); return Result.success("更新成功");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment