|
|
@ -766,26 +766,28 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
issueProcessDao.insert(processEntity); |
|
|
|
|
|
|
|
//4:调用epmet-message服务,给居民端话题创建人和议题发起人发送消息
|
|
|
|
//4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题)
|
|
|
|
Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); |
|
|
|
if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { |
|
|
|
throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION); |
|
|
|
} |
|
|
|
ResiTopicDTO topicDTO = resultTopicDTO.getData(); |
|
|
|
//4.2:创建消息模板
|
|
|
|
String messageContent = ""; |
|
|
|
if (IssueConstant.ISSUE_RESOLVED.equals(formDTO.getResolveType())) { |
|
|
|
messageContent = String.format(UserMessageConstant.ISSUE_RESOLVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); |
|
|
|
} else if (IssueConstant.ISSUE_UNRESOLVED.equals(formDTO.getResolveType())) { |
|
|
|
messageContent = String.format(UserMessageConstant.ISSUE_UNRESOLVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); |
|
|
|
} |
|
|
|
//4.3:调用服务,发送消息
|
|
|
|
if (!saveUserMessageList(topicDTO, messageContent, entity).success()) { |
|
|
|
throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION); |
|
|
|
} |
|
|
|
//4.4:2020.10.26 添加推送微信订阅消息功能 sun
|
|
|
|
if (!saveWxmpMessageList(topicDTO, messageContent, entity).success()) { |
|
|
|
logger.error("议题关闭,推送微信订阅消息失败!"); |
|
|
|
if (entity.getSourceType().equals(ModuleConstants.ISSUE_FROM_TOPIC)){ |
|
|
|
//4.1:调用resi-group查询话题创建人数据(目前议题来源只有来自话题)
|
|
|
|
Result<ResiTopicDTO> resultTopicDTO = resiGroupFeignClient.getTopicById(entity.getSourceId()); |
|
|
|
if (!resultTopicDTO.success() || null == resultTopicDTO.getData()) { |
|
|
|
throw new RenException(IssueConstant.SELECT_TOPIC_EXCEPTION); |
|
|
|
} |
|
|
|
ResiTopicDTO topicDTO = resultTopicDTO.getData(); |
|
|
|
//4.2:创建消息模板
|
|
|
|
String messageContent = ""; |
|
|
|
if (IssueConstant.ISSUE_RESOLVED.equals(formDTO.getResolveType())) { |
|
|
|
messageContent = String.format(UserMessageConstant.ISSUE_RESOLVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); |
|
|
|
} else if (IssueConstant.ISSUE_UNRESOLVED.equals(formDTO.getResolveType())) { |
|
|
|
messageContent = String.format(UserMessageConstant.ISSUE_UNRESOLVED_MSG, topicDTO.getTopicContent(), formDTO.getCloseReason()); |
|
|
|
} |
|
|
|
//4.3:调用服务,发送消息
|
|
|
|
if (!saveUserMessageList(topicDTO, messageContent, entity).success()) { |
|
|
|
throw new RenException(IssueConstant.SAVE_MSG_EXCEPTION); |
|
|
|
} |
|
|
|
//4.4:2020.10.26 添加推送微信订阅消息功能 sun
|
|
|
|
if (!saveWxmpMessageList(topicDTO, messageContent, entity).success()) { |
|
|
|
logger.error("议题关闭,推送微信订阅消息失败!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
@ -793,6 +795,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
SelectIssueVotingDetailFormDTO dto = new SelectIssueVotingDetailFormDTO(); |
|
|
|
dto.setGridId(entity.getGridId()); |
|
|
|
dto.setIssueId(formDTO.getIssueId()); |
|
|
|
dto.setSourceType(entity.getSourceType()); |
|
|
|
issueVoteDetailService.updateVote(dto); |
|
|
|
}catch (RenException e){ |
|
|
|
logger.error(e.getInternalMsg()); |
|
|
|