9 changed files with 360 additions and 46 deletions
@ -0,0 +1,85 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
||||
|
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
||||
|
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
||||
|
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
||||
|
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
||||
|
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
||||
|
import com.epmet.service.ResiTopicService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("resi/topic") |
||||
|
public class ResiTopicController { |
||||
|
@Autowired |
||||
|
private ResiTopicService resiTopicService; |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-屏蔽话题列表查询 |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiTopicPageFormDTO.class |
||||
|
* @return List<ResiTopicInfoResultDTO> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 16:45 |
||||
|
**/ |
||||
|
@PostMapping("hiddenlist") |
||||
|
Result<List<ResiTopicInfoResultDTO>> hiddenList(@LoginUser TokenDto tokenDto, @RequestBody ResiTopicPageFormDTO topicPageFormDTO){ |
||||
|
ValidatorUtils.validateEntity(topicPageFormDTO); |
||||
|
return resiTopicService.hiddenList(topicPageFormDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-查看历史话题(分页,允许状态筛选) |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiTopicPageFormDTO.class |
||||
|
* @return Result<List<ResiTopicInfoResultDTO>> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 10:36 |
||||
|
**/ |
||||
|
@PostMapping("alltopics") |
||||
|
Result<List<ResiTopicInfoResultDTO>> allTopics(@LoginUser TokenDto tokenDto,@RequestBody ResiTopicPageFormDTO topicPageFormDTO){ |
||||
|
ValidatorUtils.validateEntity(topicPageFormDTO); |
||||
|
return resiTopicService.allTopics(topicPageFormDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-获取话题详情 |
||||
|
* @Param tokenDto |
||||
|
* @Param String |
||||
|
* @return Result<ResiTopicDetailResultDTO> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 23:48 |
||||
|
**/ |
||||
|
@PostMapping("topicdetail") |
||||
|
Result<ResiTopicDetailResultDTO> getTopicDetailGov(@LoginUser TokenDto tokenDto,@RequestBody ResiTopicDetailFormDTO topicDetailFormDTO){ |
||||
|
ValidatorUtils.validateEntity(topicDetailFormDTO); |
||||
|
return resiTopicService.topicDetail(topicDetailFormDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-获取某个话题的评论列表 |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiQueryCommentFormDTO |
||||
|
* @return Result<List<ResiCommentResultDTO>> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 23:49 |
||||
|
**/ |
||||
|
@PostMapping("topiccomments") |
||||
|
Result<List<ResiCommentResultDTO>> topicComments(@LoginUser TokenDto tokenDto,@RequestBody ResiQueryCommentFormDTO queryCommentFormDTO){ |
||||
|
ValidatorUtils.validateEntity(queryCommentFormDTO); |
||||
|
return resiTopicService.topicComments(queryCommentFormDTO); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
||||
|
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
||||
|
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
||||
|
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
||||
|
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
||||
|
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface ResiTopicService { |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-屏蔽话题列表查询 |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiTopicPageFormDTO.class |
||||
|
* @return List<ResiTopicInfoResultDTO> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 16:45 |
||||
|
**/ |
||||
|
Result<List<ResiTopicInfoResultDTO>> hiddenList(ResiTopicPageFormDTO topicPageFormDTO); |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-查看历史话题(分页,允许状态筛选) |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiTopicPageFormDTO.class |
||||
|
* @return Result<List<ResiTopicInfoResultDTO>> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 10:36 |
||||
|
**/ |
||||
|
Result<List<ResiTopicInfoResultDTO>> allTopics(ResiTopicPageFormDTO topicPageFormDTO); |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-获取话题详情 |
||||
|
* @Param tokenDto |
||||
|
* @Param String |
||||
|
* @return Result<ResiTopicDetailResultDTO> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 23:48 |
||||
|
**/ |
||||
|
Result<ResiTopicDetailResultDTO> topicDetail(ResiTopicDetailFormDTO topicDetailFormDTO); |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-获取某个话题的评论列表 |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiQueryCommentFormDTO |
||||
|
* @return Result<List<ResiCommentResultDTO>> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 23:49 |
||||
|
**/ |
||||
|
Result<List<ResiCommentResultDTO>> topicComments(ResiQueryCommentFormDTO queryCommentFormDTO); |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.NumConstant; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.feign.ResiGroupFeignClient; |
||||
|
import com.epmet.resi.group.dto.comment.form.ResiQueryCommentFormDTO; |
||||
|
import com.epmet.resi.group.dto.comment.result.ResiCommentResultDTO; |
||||
|
import com.epmet.resi.group.dto.topic.form.ResiTopicDetailFormDTO; |
||||
|
import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; |
||||
|
import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; |
||||
|
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; |
||||
|
import com.epmet.service.ResiTopicService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class ResiTopicServiceImpl implements ResiTopicService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ResiGroupFeignClient resiGroupFeignClient; |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-屏蔽话题列表查询 |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiTopicPageFormDTO.class |
||||
|
* @return List<ResiTopicInfoResultDTO> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 16:45 |
||||
|
**/ |
||||
|
@Override |
||||
|
public Result<List<ResiTopicInfoResultDTO>> hiddenList(ResiTopicPageFormDTO topicPageFormDTO) { |
||||
|
topicPageFormDTO.setPageNo(NumConstant.ONE); |
||||
|
topicPageFormDTO.setPageSize(NumConstant.MAX); |
||||
|
return resiGroupFeignClient.getHiddenTopicGov(topicPageFormDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-查看历史话题(分页,允许状态筛选) |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiTopicPageFormDTO.class |
||||
|
* @return Result<List<ResiTopicInfoResultDTO>> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 10:36 |
||||
|
**/ |
||||
|
@Override |
||||
|
public Result<List<ResiTopicInfoResultDTO>> allTopics(ResiTopicPageFormDTO topicPageFormDTO) { |
||||
|
topicPageFormDTO.setPageNo(NumConstant.ONE); |
||||
|
topicPageFormDTO.setPageSize(NumConstant.MAX); |
||||
|
return resiGroupFeignClient.getPastTopicListGov(topicPageFormDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-获取话题详情 |
||||
|
* @Param tokenDto |
||||
|
* @Param String |
||||
|
* @return Result<ResiTopicDetailResultDTO> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 23:48 |
||||
|
**/ |
||||
|
@Override |
||||
|
public Result<ResiTopicDetailResultDTO> topicDetail(ResiTopicDetailFormDTO topicDetailFormDTO) { |
||||
|
return resiGroupFeignClient.getTopicDetailGov(topicDetailFormDTO); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 政府端群组管理-获取某个话题的评论列表 |
||||
|
* @Param tokenDto |
||||
|
* @Param ResiQueryCommentFormDTO |
||||
|
* @return Result<List<ResiCommentResultDTO>> |
||||
|
* @Author wangc |
||||
|
* @Date 2020.04.01 23:49 |
||||
|
**/ |
||||
|
@Override |
||||
|
public Result<List<ResiCommentResultDTO>> topicComments(ResiQueryCommentFormDTO queryCommentFormDTO) { |
||||
|
return resiGroupFeignClient.getCommentListOfTopicGov(queryCommentFormDTO); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue