|
@@ -161,15 +161,17 @@ public class QuestionUsualFacade extends QuestionUsualServiceImpl {
|
|
|
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,
|
|
|
- "获取用户信息失败");
|
|
|
- }
|
|
|
- //将用户信息放入实体
|
|
|
- for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {
|
|
|
- getDeptInfoDTO.setUserName(respDTO.data.get(getDeptInfoDTO.getModifier()));
|
|
|
- getDeptInfoDTO.setTypeName(QuestionTypeEnum.getName(getDeptInfoDTO.getType()));
|
|
|
+ if(ListUtil.isNotEmpty(ids)){
|
|
|
+ RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
|
|
|
+ if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR,
|
|
|
+ "获取用户信息失败");
|
|
|
+ }
|
|
|
+ //将用户信息放入实体
|
|
|
+ for (GetDeptInfoDTO getDeptInfoDTO : iPage.getRecords()) {
|
|
|
+ getDeptInfoDTO.setUserName(respDTO.data.get(getDeptInfoDTO.getModifier()));
|
|
|
+ getDeptInfoDTO.setTypeName(QuestionTypeEnum.getName(getDeptInfoDTO.getType()));
|
|
|
+ }
|
|
|
}
|
|
|
return iPage;
|
|
|
}
|