|
|
@ -155,7 +155,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt |
|
|
|
* @Description 表决中议题详情——支持、反对数 |
|
|
|
* @author zxc |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
/*@Override |
|
|
|
public VoteResultDTO voteCount(TokenDto tokenDto, IssueIdFormDTO issueId) { |
|
|
|
VoteResultDTO voteResultDTO = issueVoteStatisticalDao.voteCount(issueId); |
|
|
|
//校验是否已经投票
|
|
|
@ -172,6 +172,22 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt |
|
|
|
} |
|
|
|
} |
|
|
|
return voteResultDTO; |
|
|
|
}*/ |
|
|
|
@Override |
|
|
|
public VoteResultDTO voteCount(TokenDto tokenDto, IssueIdFormDTO issueId) { |
|
|
|
VoteResultDTO result = new VoteResultDTO(); |
|
|
|
//校验是否已经投票
|
|
|
|
String voteStatus = issueVoteStatisticalDao.checkVote(issueId.getIssueId(), tokenDto.getUserId()); |
|
|
|
VoteRedisFormDTO redisData = issueVoteDetailRedis.getVoteStatistical(issueId.getIssueId()); |
|
|
|
if (StringUtils.isBlank(voteStatus)) { |
|
|
|
result.setVoteFlag(false); |
|
|
|
} else { |
|
|
|
result.setVoteFlag(true); |
|
|
|
result.setVoteType(voteStatus); |
|
|
|
result.setSupportCount(redisData.getSupportAmount()); |
|
|
|
result.setOppositionCount(redisData.getOppositionAmount()); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|