Commit d3b5f86214108c1b83e2a92bb8a06380162bb6f1
1 parent
adb8999b49
Exists in
master
and in
8 other branches
增加
Showing 1 changed file with 6 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
View file @
d3b5f86
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | import com.lyms.platform.common.annotation.TokenRequired; |
6 | 6 | import com.lyms.platform.common.base.BaseController; |
7 | 7 | import com.lyms.platform.common.base.LoginContext; |
8 | +import com.lyms.platform.common.base.PageInfo; | |
8 | 9 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
9 | 10 | import com.lyms.platform.common.enums.OrganizationLevelEnum; |
10 | 11 | import com.lyms.platform.common.enums.OrganizationTypeEnum; |
... | ... | @@ -215,6 +216,7 @@ |
215 | 216 | List<Integer> areaId = autoMatchFacade.matchOrgId(loginState.getId()); |
216 | 217 | List<Map> data = new ArrayList<>(); |
217 | 218 | List<Organization> organizations; |
219 | + PageInfo pageInfo =null; | |
218 | 220 | if (CollectionUtils.isNotEmpty(areaId)) { |
219 | 221 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
220 | 222 | organizationQuery.setIdList(areaId); |
... | ... | @@ -223,6 +225,7 @@ |
223 | 225 | list.add(4); |
224 | 226 | organizationQuery.setYn(YnEnums.YES.getId()); |
225 | 227 | // organizationQuery.setTypeList(list); |
228 | + pageInfo=organizationQuery.getPageInfo(); | |
226 | 229 | organizations = organizationService.queryOrganization(organizationQuery); |
227 | 230 | |
228 | 231 | } else { |
... | ... | @@ -230,7 +233,8 @@ |
230 | 233 | userOrganizationMapsQuery.setYn(YnEnums.YES.getId()); |
231 | 234 | userOrganizationMapsQuery.setUserId(loginState.getId()); |
232 | 235 | organizations = accessPermissionFacade.findAccessPerminssionByUserId(loginState.getId()); |
233 | - | |
236 | + userOrganizationMapsQuery.mysqlBuild(organizations.size()); | |
237 | + pageInfo=userOrganizationMapsQuery.getPageInfo(); | |
234 | 238 | } |
235 | 239 | if (CollectionUtils.isNotEmpty(organizations)) { |
236 | 240 | for (Organization organization : organizations) { |
... | ... | @@ -248,7 +252,7 @@ |
248 | 252 | data.add(map); |
249 | 253 | } |
250 | 254 | } |
251 | - return new FrontEndResult().setData(data).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
255 | + return new FrontEndResult().setData(data).setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setPageInfo(pageInfo); | |
252 | 256 | } |
253 | 257 | |
254 | 258 |