Commit cb4d5e360c575d5e3547b14e437d3435fcc9eee8
1 parent
642de0e949
Exists in
master
and in
6 other branches
a
Showing 1 changed file with 4 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RegionController.java
View file @
cb4d5e3
| ... | ... | @@ -69,14 +69,15 @@ |
| 69 | 69 | query.setTypeId("b7ea005c-dfac-4c2a-bdae-25239b3f44fd"); |
| 70 | 70 | |
| 71 | 71 | if(UserTypeEnum.NORMAL_USER.getId().equals(user.getType())) { |
| 72 | + if("0".equals(parentId)){ | |
| 73 | + parentId=null; | |
| 74 | + } | |
| 72 | 75 | /* if(null == user.getOrgId()) { |
| 73 | 76 | ResultUtils.buildResultAndWrite(httpServletResponse, ErrorCodeConstants.SYSTEM_ERROR, "user not defined orgId error!"); |
| 74 | 77 | return; |
| 75 | 78 | } |
| 76 | 79 | Organization organization = organizationService.getOrganization(user.getOrgId()); |
| 77 | - if("0".equals(parentId)){ | |
| 78 | - parentId=null; | |
| 79 | - } | |
| 80 | + | |
| 80 | 81 | if (null != organization.getProvinceId() && null==parentId) { |
| 81 | 82 | parentId = organization.getProvinceId(); |
| 82 | 83 | query.setId(parentId); |