From 6c5b867fc9b369fa8700076d9635fafb7ae5f293 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 22 May 2020 13:59:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CustomerAgencyServiceImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 454a1aee4f..0750b27c27 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -248,12 +248,15 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl staffIdList = new ArrayList<>(); staffIdList.addAll(staffIdList1); staffIdList.addAll(staffIdList2); staffIdList.addAll(staffIdList3); staffIdList = new ArrayList(new LinkedHashSet<>(staffIdList));staffIdList.removeAll(Collections.singleton("")); - Result userList = epmetUserFeignClient.getCustomerStaffList(staffIdList); - if(!userList.success()||null==userList.getData()){ - throw new RenException(CustomerAgencyConstant.SELECT_USER_EXCEPTION); + CustomerStaffListResultDTO dto = new CustomerStaffListResultDTO(); + if (null != staffIdList || staffIdList.size() > NumConstant.ZERO) { + Result userList = epmetUserFeignClient.getCustomerStaffList(staffIdList); + if (!userList.success() || null == userList.getData()) { + throw new RenException(CustomerAgencyConstant.SELECT_USER_EXCEPTION); + } + dto = userList.getData(); } //5:循环数据,将人员数据放到对应数据结构下 - CustomerStaffListResultDTO dto = userList.getData(); List staffList = dto.getStaffList(); List roleList = dto.getRoleList(); //有时间再优化成jdk8的遍历方式