فهرست منبع

ICSS后台科室维护Bug修正

wangyu 6 سال پیش
والد
کامیت
6228fa9d42
1فایلهای تغییر یافته به همراه8 افزوده شده و 5 حذف شده
  1. 8 5
      icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

+ 8 - 5
icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

@@ -129,11 +129,14 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
         for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {
             ids.add(getDeptInfoDTO.getModifier());
         }
-        //获取用户信息
-        RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
-        if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
-            throw new CommonException(CommonErrorCode.RPC_ERROR,
-                    "获取用户信息失败");
+        RespDTO<Map<String, String>> respDTO = new RespDTO<>();
+        if (ListUtil.isEmpty(iPage.getRecords())) {
+            //获取用户信息
+            respDTO = userServiceClient.getUserInfoByIds(ids);
+            if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
+                throw new CommonException(CommonErrorCode.RPC_ERROR,
+                        "获取用户信息失败");
+            }
         }
         //将用户信息放入实体
         for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {