Commit 52a82227db854b8d6c9512934f0b7c5323239070
1 parent
9e7148bb29
Exists in
master
and in
8 other branches
platform permission
add return pageinfo
Showing 1 changed file with 8 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
52a8222
... | ... | @@ -730,12 +730,15 @@ |
730 | 730 | String[] roleArrayIds = roleIds.split(","); |
731 | 731 | //判断角色是否有更新 |
732 | 732 | Boolean flag = false; |
733 | - for (String s : roleArrayIds) { | |
734 | - for(Roles role : users.getRoles()) { | |
735 | - if(s.equals(role.getId().toString())) continue; | |
736 | - flag = true; | |
733 | + if(null == users.getRoles()) flag = true; | |
734 | + if(!flag) { | |
735 | + for (String s : roleArrayIds) { | |
736 | + for(Roles role : users.getRoles()) { | |
737 | + if(s.equals(role.getId().toString())) continue; | |
738 | + flag = true; | |
739 | + } | |
740 | + if(flag) break; | |
737 | 741 | } |
738 | - if(flag) break; | |
739 | 742 | } |
740 | 743 | |
741 | 744 | if(flag) { |