Commit 089194133f26f57a999d8676f706bd727e160d71
1 parent
138b1cef67
Exists in
master
and in
8 other branches
bug fix
机构分页 空指针
Showing 1 changed file with 13 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
View file @
0891941
| ... | ... | @@ -233,10 +233,13 @@ |
| 233 | 233 | PageInfo pageInfo =null; |
| 234 | 234 | if (CollectionUtils.isNotEmpty(areaId)) { |
| 235 | 235 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
| 236 | - organizationQuery.setNeed("true"); | |
| 237 | - organizationQuery.setSort("province_id desc,city_id desc,area_id desc"); | |
| 238 | - organizationQuery.setPage(page); | |
| 239 | - organizationQuery.setLimit(limit); | |
| 236 | + if(null != page && limit != page) { | |
| 237 | + organizationQuery.setNeed("true"); | |
| 238 | + organizationQuery.setPage(page); | |
| 239 | + organizationQuery.setLimit(limit); | |
| 240 | + organizationQuery.setSort("province_id desc,city_id desc,area_id desc"); | |
| 241 | + } | |
| 242 | + | |
| 240 | 243 | organizationQuery.setYn(YnEnums.YES.getId()); |
| 241 | 244 | organizationQuery.setIdList(areaId); |
| 242 | 245 | organizationQuery.setKeyword(keyword); |
| 243 | 246 | |
| ... | ... | @@ -257,11 +260,13 @@ |
| 257 | 260 | // pageInfo=userOrganizationMapsQuery.getPageInfo(); |
| 258 | 261 | |
| 259 | 262 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
| 260 | - organizationQuery.setNeed("tree"); | |
| 261 | - organizationQuery.setSort("province_id desc,city_id desc,area_id desc"); | |
| 262 | - organizationQuery.setLimit(limit); | |
| 263 | 263 | organizationQuery.setKeyword(keyword); |
| 264 | - organizationQuery.setPage(page); | |
| 264 | + if(null != page && limit != page) { | |
| 265 | + organizationQuery.setNeed("true"); | |
| 266 | + organizationQuery.setPage(page); | |
| 267 | + organizationQuery.setLimit(limit); | |
| 268 | + organizationQuery.setSort("province_id desc,city_id desc,area_id desc"); | |
| 269 | + } | |
| 265 | 270 | organizationQuery.setYn(YnEnums.YES.getId()); |
| 266 | 271 | organizations = organizationService.queryOrganization(organizationQuery); |
| 267 | 272 | pageInfo = organizationQuery.getPageInfo(); |