|
|
@ -68,13 +68,12 @@ public class ResiGroupServiceImpl implements ResiGroupService { |
|
|
|
@Override |
|
|
|
public List<CandidateListResultDTO> candidateList(CandidateListFormDTO formDTO) { |
|
|
|
// 根据小组ID查询组员信息身份【不包括组长自己】
|
|
|
|
PageInfo<CandidateListResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> resiGroupDao.candidateList(formDTO.getGroupId())); |
|
|
|
List<CandidateListResultDTO> result = pageInfo.getList(); |
|
|
|
List<CandidateListResultDTO> result=resiGroupDao.candidateList(formDTO.getGroupId()); |
|
|
|
// 没有直接返回空集合
|
|
|
|
if (CollectionUtils.isEmpty(result)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
// 获取userIds
|
|
|
|
// 获取userIds- 所有组员的id
|
|
|
|
List<String> userIds = result.stream().map(m -> m.getUserId()).collect(Collectors.toList()); |
|
|
|
// 查询用户信息【名字 头像】
|
|
|
|
List<UserInfosResultDTO> userInfos = epmetUserService.selectUserInfosByUserIds(userIds); |
|
|
@ -97,7 +96,9 @@ public class ResiGroupServiceImpl implements ResiGroupService { |
|
|
|
List<String> badgeInfo = resiGroupRedis.getBadgeInfoByUserId(formDTO.getCustomerId(), r.getUserId()); |
|
|
|
r.setBadgeList(null==badgeInfo ? new ArrayList<>() : badgeInfo); |
|
|
|
}); |
|
|
|
List<String> showUsers = epmetUserService.selectUserIdByCustomerId(userIds); |
|
|
|
//应该在这分页.....
|
|
|
|
PageInfo<String> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> epmetUserService.selectUserIdByCustomerId(userIds)); |
|
|
|
List<String> showUsers = pageInfo.getList(); |
|
|
|
if (CollectionUtils.isEmpty(showUsers)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|