|
@@ -142,15 +142,17 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
*/
|
|
|
public IPage<GetAllInformationDTO> getAllInformation(GetAllInformationVO getAllInformationVO) {
|
|
|
IPage<GetAllInformationDTO> ipage = libraryinfoFacade.getAllInformation(getAllInformationVO);
|
|
|
- List<String> ids = ipage.getRecords().stream().map(i->i.getOperName()).distinct().collect(Collectors.toList());
|
|
|
- RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
|
|
|
- if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
|
|
|
- throw new CommonException(CommonErrorCode.RPC_ERROR,
|
|
|
- "获取用户信息失败");
|
|
|
- }
|
|
|
- ipage.getRecords().forEach(i->{
|
|
|
- i.setOperName(respDTO.data.get(i.getOperName()));
|
|
|
- });
|
|
|
+ if(ipage.getRecords().size()>0){
|
|
|
+ List<String> ids = ipage.getRecords().stream().map(i->i.getOperName()).distinct().collect(Collectors.toList());
|
|
|
+ RespDTO<Map<String, String>> respDTO = userServiceClient.getUserInfoByIds(ids);
|
|
|
+ if (respDTO == null || !CommonErrorCode.OK.getCode().equals(respDTO.code)) {
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR,
|
|
|
+ "获取用户信息失败");
|
|
|
+ }
|
|
|
+ ipage.getRecords().forEach(i->{
|
|
|
+ i.setOperName(respDTO.data.get(i.getOperName()));
|
|
|
+ });
|
|
|
+ }
|
|
|
return ipage;
|
|
|
}
|
|
|
|