Browse Source

Merge remote-tracking branch 'origin/dev_resi_event' into develop

dev_shibei_match
yinzuomei 4 years ago
parent
commit
46ee81313e
  1. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventReplyServiceImpl.java
  2. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  3. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java
  4. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventReplyServiceImpl.java

@ -170,7 +170,7 @@ public class ResiEventReplyServiceImpl extends BaseServiceImpl<ResiEventReplyDao
}
// 回复内容走审核
scanReplyContent(formDTO.getContent());
// 查询当前用户的显示昵称
// 查询当前用户的显示昵称 应该是xxx街道-姓/女士or先生 如果没有街道和姓,显示的微信昵称
List<String> userIdList =new ArrayList<>();
userIdList.add(formDTO.getUserId());
Result<List<UserBaseInfoResultDTO>> userResult=epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
@ -183,7 +183,7 @@ public class ResiEventReplyServiceImpl extends BaseServiceImpl<ResiEventReplyDao
resiEventReplyEntity.setResiEventId(formDTO.getResiEventId());
resiEventReplyEntity.setFromUserId(formDTO.getUserId());
resiEventReplyEntity.setContent(formDTO.getContent());
resiEventReplyEntity.setUserShowName(userResult.getData().get(0).getShowName());
resiEventReplyEntity.setUserShowName(userResult.getData().get(0).getUserShowName());
resiEventReplyEntity.setCreatedTime(new Date());
baseDao.insert(resiEventReplyEntity);
//更新事件最后一次操作时间

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

@ -266,7 +266,9 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
//7、插入艾特人表
List<ResiEventMentionEntity> npcList=getNpcList(formDTO.getCustomerId(),resiEventEntity.getId(),formDTO.getNpcUserList());
npcList.forEach(npc->{
resiEventMentionDao.insert(npc);
if (StringUtils.isNotBlank(npc.getUserId()) && StringUtils.isNotBlank(npc.getUserShowName())){
resiEventMentionDao.insert(npc);
}
});
//8、插入log日志
ResiEventOperationLogEntity publishLog=new ResiEventOperationLogEntity();

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java

@ -101,4 +101,9 @@ public class UserBaseInfoResultDTO implements Serializable {
* 微信基本信息
*/
private UserWechatResultDTO userWechatResultDTO;
/**
* xxx街道-尹女士
*/
private String userShowName;
}

16
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
@ -181,6 +182,21 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us
UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id);
//为了保证传过来的user数量与返回的一致,就算查出的用户信息为空也要添加进集合里
//if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){
if (StringUtils.isNotBlank(baseInfo.getStreet()) && StringUtils.isNotBlank(baseInfo.getSurname())) {
if ("1".equals(baseInfo.getGender())) {
// 男
baseInfo.setUserShowName(baseInfo.getStreet().concat(StrConstant.HYPHEN).concat(baseInfo.getSurname().concat("先生")));
} else if ("2".equals(baseInfo.getGender())) {
// 女
baseInfo.setUserShowName(baseInfo.getStreet().concat(StrConstant.HYPHEN).concat(baseInfo.getSurname().concat("女士")));
} else {
// 0 未知
baseInfo.setUserShowName(baseInfo.getStreet().concat(StrConstant.HYPHEN).concat(baseInfo.getSurname().concat("女士/先生")));
}
} else {
// 社会为微信昵称
baseInfo.setUserShowName(baseInfo.getNickname());
}
userBaseInfoList.add(baseInfo);
//}
});

Loading…
Cancel
Save