Browse Source

关闭议题

dev
zxc 3 years ago
parent
commit
569f420822
  1. 5
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SelectIssueVotingDetailFormDTO.java
  2. 3
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java
  3. 9
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

5
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/SelectIssueVotingDetailFormDTO.java

@ -17,4 +17,9 @@ public class SelectIssueVotingDetailFormDTO implements Serializable {
private String issueId;
private String gridId;
/**
* 来源类型 不为空的时候根据类型处理
*/
private String sourceType;
}

3
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -766,6 +766,7 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
issueProcessDao.insert(processEntity);
//4:调用epmet-message服务,给居民端话题创建人和议题发起人发送消息
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()) {
@ -787,12 +788,14 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp
if (!saveWxmpMessageList(topicDTO, messageContent, entity).success()) {
logger.error("议题关闭,推送微信订阅消息失败!");
}
}
try {
// issueVoteStatisticalService.syncVotingCacheToDbByParams(formDTO.getIssueId(),entity.getGridId(),null);
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());

9
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

@ -250,12 +250,21 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
}
CommonGridIdFormDTO gridId = new CommonGridIdFormDTO();
gridId.setGridId(formDTO.getGridId());
if (StringUtils.isBlank(formDTO.getSourceType())){
Result<Integer> votableCount = resiGroupFeignClient.votableCount(gridId);
if(votableCount.success() && null != votableCount.getData()){
voteCache.setShouldVoteCount(votableCount.getData());
}else{
voteCache.setShouldVoteCount(NumConstant.ZERO);
}
}else {
Result<Integer> allResi = epmetUserOpenFeignClient.getAllResiByGrid(new AllResiByGridFormDTO(formDTO.getGridId()));
if (!allResi.success()){
throw new EpmetException("查询网格下的注册居民失败:"+formDTO.getGridId());
}
voteCache.setShouldVoteCount(allResi.getData());
}
return voteCache;
}

Loading…
Cancel
Save