|
|
@ -1,23 +1,29 @@ |
|
|
|
package com.epmet.modules.person.service.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dto.form.ProjectByCreateTopicUserFormDTO; |
|
|
|
import com.epmet.dto.result.AllGridsByUserIdResultDTO; |
|
|
|
import com.epmet.dto.result.ProjectOfCreateTopicUserResultDTO; |
|
|
|
import com.epmet.feign.GovIssueOpenFeignClient; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.feign.GovProjectOpenFeignClient; |
|
|
|
import com.epmet.modules.person.service.TopicService; |
|
|
|
import com.epmet.resi.group.dto.topic.MyCreateTopicsFormDTO; |
|
|
|
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient; |
|
|
|
import com.epmet.resi.mine.dto.from.MyShiftIssueTopicsFormDTO; |
|
|
|
import com.epmet.resi.mine.dto.result.MyCreateTopicsResultDTO; |
|
|
|
import com.epmet.resi.mine.dto.result.MyShiftIssueTopicsResultDTO; |
|
|
|
import com.epmet.resi.mine.dto.result.MyShiftProjectTopicsResultDTO; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -36,6 +42,9 @@ public class TopicServiceImpl implements TopicService { |
|
|
|
@Autowired |
|
|
|
private ResiGroupOpenFeignClient resiGroupOpenFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private GovIssueOpenFeignClient govIssueOpenFeignClient; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<MyShiftProjectTopicsResultDTO> listMyShiftProjectTopics(String userId, String customerId, Integer pageNo, Integer pageSize) { |
|
|
|
ProjectByCreateTopicUserFormDTO form = new ProjectByCreateTopicUserFormDTO(); |
|
|
@ -80,4 +89,24 @@ public class TopicServiceImpl implements TopicService { |
|
|
|
List<com.epmet.resi.group.dto.topic.result.MyCreateTopicsResultDTO > topics = result.getData(); |
|
|
|
return ConvertUtils.sourceToTarget(topics, MyCreateTopicsResultDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 个人中心-我发表的话题列表-已转议题列表 |
|
|
|
* @Param tokenDto |
|
|
|
* @Param myShiftIssueTopicsResultDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2020/11/13 3:42 下午 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<MyShiftIssueTopicsResultDTO> myShiftIssueTopics(TokenDto tokenDto, MyShiftIssueTopicsFormDTO myShiftIssueTopicsFormDTO) { |
|
|
|
myShiftIssueTopicsFormDTO.setUserId(tokenDto.getUserId()); |
|
|
|
Result<List<MyShiftIssueTopicsResultDTO>> listResult = govIssueOpenFeignClient.myShiftIssueTopics(myShiftIssueTopicsFormDTO); |
|
|
|
if (!listResult.success()){ |
|
|
|
throw new RenException("查询我发表的话题列表-已转议题列表失败......"); |
|
|
|
} |
|
|
|
if (CollectionUtils.isEmpty(listResult.getData())){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
return listResult.getData(); |
|
|
|
} |
|
|
|
} |
|
|
|