Commit fd1c11a4 by 裴大威

Merge branch 'zyj-fixbug1021887' into 'master'

fixbug102187

See merge request rays/pcloud-book!560
parents 847d113b d9bf0e41
......@@ -507,13 +507,37 @@ public class SelfPushBizImpl implements SelfPushBiz {
@Override
public PageBeanNew<UserBookInfoVO> listSelfPushUser(Long pushId, Integer currentPage, Integer numPerPage) {
SelfPush selfPush = selfPushDao.getById(pushId);
if (null == selfPush){
throw new BookBizException(BookBizException.ERROR,"群发记录不存在");
}
Map<String, Object> map = new HashMap<>();
map.put("pushId", pushId);
PageBeanNew<UserBookInfoVO> pageBeanNew = selfPushUserDao.listPageNew(new PageParam(currentPage, numPerPage), map, "listByPushId");
if (null == pageBeanNew || ListUtils.isEmpty(pageBeanNew.getRecordList())) {
return new PageBeanNew<>(currentPage, numPerPage, 0, new ArrayList<>());
}
groupSet.setUserBookInfo4SelfPush(pageBeanNew.getRecordList());
Boolean isXIAORUI = false;//小睿群发
if (!StringUtil.isEmpty(selfPush.getAltId())){
PcloudRobot pcloudRobot = pcloudRobotBiz.getPcloudRobotByWxId(selfPush.getAltId());
if (null != pcloudRobot){
isXIAORUI = true;
}
}
if (isXIAORUI){//小睿无扫码书刊标签
List<String> wxUserIds = pageBeanNew.getRecordList().stream().filter(s -> s.getWxUserId() != null).map(UserBookInfoVO::getWxUserId).distinct().collect(Collectors.toList());
Map<String, GroupUserDTO> userDTOMap = wechatGroupConsr.mapWxUserInfoByWxIdList(wxUserIds);
for (UserBookInfoVO userBookInfoVO : pageBeanNew.getRecordList()) {
if (!MapUtils.isEmpty(userDTOMap) && userDTOMap.containsKey(userBookInfoVO.getWxUserId())) {
GroupUserDTO userDTO = userDTOMap.get(userBookInfoVO.getWxUserId());
userBookInfoVO.setHeadPic(userDTO.getHeadPic());
userBookInfoVO.setNickName(userDTO.getNickName());
userBookInfoVO.setSex(userDTO.getSex());
}
}
}else {
groupSet.setUserBookInfo4SelfPush(pageBeanNew.getRecordList());
}
return pageBeanNew;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment