Commit e7908690b49e723fc2c4d9dfe0c51b9905d8de36
1 parent
6cb7ffae65
Exists in
master
and in
1 other branch
permission2
Showing 1 changed file with 11 additions and 5 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/OrganizationServiceImpl.java
View file @
e790869
| ... | ... | @@ -61,13 +61,19 @@ |
| 61 | 61 | return obj.getId(); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | + | |
| 65 | + private boolean isstart = false; | |
| 66 | + | |
| 64 | 67 | @Override |
| 65 | 68 | public void rebuildDefaultRoles() { |
| 66 | - OrganizationQuery query = new OrganizationQuery(); | |
| 67 | - query.setYn(1); | |
| 68 | - List<Organization> list = masterOrganizationMapper.queryOrganization(query); | |
| 69 | - for (Organization obj:list) { | |
| 70 | - addDefaultRoles(obj); | |
| 69 | + if (!isstart) { | |
| 70 | + isstart = true; | |
| 71 | + OrganizationQuery query = new OrganizationQuery(); | |
| 72 | + query.setYn(1); | |
| 73 | + List<Organization> list = masterOrganizationMapper.queryOrganization(query); | |
| 74 | + for (Organization obj : list) { | |
| 75 | + addDefaultRoles(obj); | |
| 76 | + } | |
| 71 | 77 | } |
| 72 | 78 | } |
| 73 | 79 |