jianjun 4 years ago
parent
commit
d24a6a8f0d
  1. 3
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java
  2. 24
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java
  3. 37
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

3
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java

@ -126,10 +126,11 @@ public class GuideModuleDictServiceImpl extends BaseServiceImpl<GuideModuleDictD
List<GuideModuleDictDefaultDTO> defaultList = guideModuleDictDefaultService.getList();
List<GuideModuleDictEntity> moduleList = ConvertUtils.sourceToTarget(defaultList, GuideModuleDictEntity.class);
moduleList.forEach(item -> {
item.setId(null);
item.setCustomerId(customerId);
});
insertBatch(moduleList);
list = baseDao.selectList(wrapper);
list = moduleList;
}
return list.stream().map(item -> {
ModuleDTO dto = new ModuleDTO();

24
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActCommentServiceImpl.java

@ -101,17 +101,19 @@ public class ActCommentServiceImpl extends BaseServiceImpl<ActCommentDao, ActCom
throw new RenException(EpmetErrorCode.GROUP_ACT_CAN_NOT_COMMENT.getCode(), "当前活动已取消,不能评论");
}
//2、评论内容审核
TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setContent(formDTO.getCommentContent());
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
if (!textSyncScanResult.success()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(), EpmetErrorCode.TEXT_SCAN_FAILED.getMsg());
if(StringUtils.isNotBlank(formDTO.getCommentContent())){
TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
TextTaskDTO taskDTO = new TextTaskDTO();
taskDTO.setContent(formDTO.getCommentContent());
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", ""));
textScanParamDTO.getTasks().add(taskDTO);
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO);
if (!textSyncScanResult.success()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
if (!textSyncScanResult.getData().isAllPass()) {
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode(), EpmetErrorCode.TEXT_SCAN_FAILED.getMsg());
}
}
}
//图片安全校验

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

@ -180,25 +180,30 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us
}*/
userIdList.forEach(id -> {
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("女士")));
if(null!=baseInfo){
//为了保证传过来的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 {
// 0 未知
baseInfo.setUserShowName(baseInfo.getStreet().concat(StrConstant.HYPHEN).concat(baseInfo.getSurname().concat("女士/先生")));
// 社会为微信昵称
baseInfo.setUserShowName(baseInfo.getNickname());
}
} else {
// 社会为微信昵称
baseInfo.setUserShowName(baseInfo.getNickname());
userBaseInfoList.add(baseInfo);
//}
}else{
logger.error(String.format("userId【%s】,构造UserBaseInfoResultDTO为空",id));
}
userBaseInfoList.add(baseInfo);
//}
});
return userBaseInfoList;
}

Loading…
Cancel
Save