Browse Source

我参与的议题-修改

master
zhaoqifeng 5 years ago
parent
commit
890a7ebbb6
  1. 2
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java
  2. 7
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

2
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java

@ -81,7 +81,7 @@ public interface IssueVoteDetailDao extends BaseDao<IssueVoteDetailEntity> {
* @author zxc * @author zxc
* @date 2020/11/10 10:01 上午 * @date 2020/11/10 10:01 上午
*/ */
List<MyPartIssuesResultDTO> myPartIssues(@Param("userId")String userId); List<MyPartIssuesResultDTO> myPartIssues(@Param("userId")String userId, @Param("topicIds")List<String> topicIds);
List<MyPartIssuesResultDTO> myPartIssuesByTopicId(@Param("topicIds")List<String> topicIds); List<MyPartIssuesResultDTO> myPartIssuesByTopicId(@Param("topicIds")List<String> topicIds);
} }

7
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -549,16 +549,17 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
*/ */
@Override @Override
public List<MyPartIssuesResultDTO> myPartIssues(MyPartIssuesFormDTO myPartIssuesFormDTO) { public List<MyPartIssuesResultDTO> myPartIssues(MyPartIssuesFormDTO myPartIssuesFormDTO) {
List<MyPartIssuesResultDTO> myPartIssuesResult = issueVoteDetailDao.myPartIssues(myPartIssuesFormDTO.getUserId()); List<MyPartIssuesResultDTO> myPartIssuesResult = new ArrayList<>();
MyPartIssueFormDTO formDTO = new MyPartIssueFormDTO(); MyPartIssueFormDTO formDTO = new MyPartIssueFormDTO();
formDTO.setUserId(myPartIssuesFormDTO.getUserId()); formDTO.setUserId(myPartIssuesFormDTO.getUserId());
Result<MyPartIssueResultDTO> myPartIssueResult = resiGroupOpenFeignClient.selectMyPartTopic(formDTO); Result<MyPartIssueResultDTO> myPartIssueResult = resiGroupOpenFeignClient.selectMyPartTopic(formDTO);
if (!myPartIssueResult.success()){ if (!myPartIssueResult.success()){
throw new RenException("查询我评论过的话题失败......"); throw new RenException("查询我评论过的话题失败......");
} }
myPartIssuesResult = issueVoteDetailDao.myPartIssues(myPartIssuesFormDTO.getUserId(), myPartIssueResult.getData().getTopicIds());
if (!CollectionUtils.isEmpty(myPartIssueResult.getData().getTopicIds())){ if (!CollectionUtils.isEmpty(myPartIssueResult.getData().getTopicIds())){
List<MyPartIssuesResultDTO> myPartIssuesResultDTOS = issueVoteDetailDao.myPartIssuesByTopicId(myPartIssueResult.getData().getTopicIds()); List<MyPartIssuesResultDTO> myPartIssues = issueVoteDetailDao.myPartIssuesByTopicId(myPartIssueResult.getData().getTopicIds());
myPartIssuesResult.addAll(myPartIssuesResultDTOS); myPartIssuesResult.addAll(myPartIssues);
} }
if (CollectionUtils.isEmpty(myPartIssuesResult)){ if (CollectionUtils.isEmpty(myPartIssuesResult)){
return new ArrayList<>(); return new ArrayList<>();

Loading…
Cancel
Save