Browse Source

Merge remote-tracking branch 'origin/dev_group_act_notice' into dev_temp

# Conflicts:
#	epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
master
zxc 4 years ago
parent
commit
9922ea4d4c
  1. 20
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java
  2. 22
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

20
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/member/service/impl/ResiGroupMemberServiceImpl.java

@ -482,7 +482,23 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
}
UserResiInfoListFormDTO formDTO=new UserResiInfoListFormDTO();
formDTO.setUserIdList(userIdList);
Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult=epmetUserFeignClient.getUserResiInfoList(formDTO);
ResiGroupEntity resiGroup = resiGroupDao.selectById(applyingMemberFormDTO.getGroupId());
if (null == resiGroup){
throw new RenException("此小组信息不存在");
}
List<UserInfoResultDTO> userInfos = resiTopicService.disPoseUserInfo(resiGroup.getGroupType(), userIdList);
if (CollectionUtils.isEmpty(userInfos)){
throw new RenException("查询用户信息失败了");
}
list.forEach(l -> {
userInfos.forEach(u -> {
if (l.getApplyUserId().equals(u.getUserId())){
l.setApplyUserName(u.getReleaseUserName());
l.setApplyUserHeadPhoto(u.getReleaseUserHeadPhoto());
}
});
});
/*Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult=epmetUserFeignClient.getUserResiInfoList(formDTO);
if(userResiInfoDTOListResult.success()){
for (ApplyingMemberResultDTO memberInfo : list) {
for(UserResiInfoResultDTO userResiInfo:userResiInfoDTOListResult.getData()){
@ -495,7 +511,7 @@ public class ResiGroupMemberServiceImpl extends BaseServiceImpl<ResiGroupMemberD
}
}else{
logger.warn(String.format("居民端组长【%s】查看入群待审核列表调用%s服务,获取用户头像显示昵称失败,错误码%s,错误提示%s",applyingMemberFormDTO.getUserId(), ServiceConstant.EPMET_USER_SERVER, userResiInfoDTOListResult.getCode(), userResiInfoDTOListResult.getMsg()));
}
}*/
//徽章信息

22
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -196,6 +196,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private ResiTopicService resiTopicService;
@Value("${openapi.scan.server.url}")
private String scanApiUrl;
@Value("${openapi.scan.method.textSyncScan}")
@ -976,8 +979,23 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
//2.遍历用户信息
if (null != hiddenTopics && hiddenTopics.size() > 0) {
setCacheUserInfo(topicPageFormDTO.getGroupId(), hiddenTopics);
//获取小组信息
ResiGroupEntity groupEntity = resiGroupDao.selectById(topicPageFormDTO.getGroupId());
if ("branch".equals(groupEntity.getGroupType())) {
List<String> userIds = hiddenTopics.stream().map(m -> m.getUserId()).distinct().collect(Collectors.toList());
List<UserInfoResultDTO> userInfos = resiTopicService.disPoseUserInfo(groupEntity.getGroupType(), userIds);
hiddenTopics.forEach(item -> {
userInfos.forEach(u->{
if(item.getUserId().equals(u.getUserId())){
//缓存中有该用户信息
item.setReleaseUserName(u.getReleaseUserName());
item.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto());
}
});
});
} else {
setCacheUserInfo(topicPageFormDTO.getGroupId(), hiddenTopics);
}
//3.用户徽章
//3.1首先需要拿到客户Id

Loading…
Cancel
Save