|
@@ -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()) {
|