From cc1098fc00a50cb1591d182f04bc37066ff0a9e2 Mon Sep 17 00:00:00 2001 From: 罗元桥 <2376770955@qq.com> Date: 星期四, 05 八月 2021 15:12:39 +0800 Subject: [PATCH] Merge branch 'test' into 'master' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java | 149 ++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 134 insertions(+), 15 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java index 7eea1ca..52bc6cf 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java @@ -1,14 +1,13 @@ package com.panzhihua.service_community.api; import com.panzhihua.common.model.dtos.neighbor.*; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; -import com.panzhihua.common.model.dtos.neighbor.AddComActNeighborCircleAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleDetailAppDTO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.neighbor.AddNeighborCircleAdminVO; +import com.panzhihua.common.model.vos.neighbor.ChangeCommentReplyStatusByAdminVO; +import com.panzhihua.common.model.vos.neighbor.ChangeCommentStatusByAdminVO; import com.panzhihua.common.model.vos.neighbor.EditNeighborCircleAdminVO; import com.panzhihua.service_community.service.ComActNeighborCircleService; +import com.panzhihua.service_community.service.ComActNeighborCircleTopicService; import lombok.extern.slf4j.Slf4j; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; @@ -22,11 +21,13 @@ @Slf4j @RestController -@RequestMapping("/neighbor") +@RequestMapping("/neighbor/") public class NeighborApi { @Resource private ComActNeighborCircleService comActNeighborCircleService; + @Resource + private ComActNeighborCircleTopicService comActNeighborCircleTopicService; /** * 分页查询邻里圈列表 @@ -60,8 +61,8 @@ /** * 管理后台查询邻里圈列表 - * @param comActNeighborCircleAdminDTO 请求参数 - * @return 邻里圈列表 + * @param comActNeighborCircleAdminDTO 请求参数 + * @return 邻里圈列表 */ @PostMapping("pageNeighborByAdmin") public R pageNeighborByAdmin(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO) { @@ -70,17 +71,17 @@ /** * 后台添加邻里圈 - * @param addNeighborCircleAdminVO 请求参数 - * @return 邻里圈列表 + * @param addNeighborCircleAdminVO 请求参数 + * @return 邻里圈列表 */ @PostMapping("addNeighborByAdmin") - public R pageNeighborByAdmin(@RequestBody AddNeighborCircleAdminVO addNeighborCircleAdminVO) { + public R addNeighborByAdmin(@RequestBody AddNeighborCircleAdminVO addNeighborCircleAdminVO) { return comActNeighborCircleService.addNeighborByAdmin(addNeighborCircleAdminVO); } /** * 后台修改邻里圈 - * @param editNeighborCircleAdminVO 请求参数 + * @param editNeighborCircleAdminVO 请求参数 */ @PostMapping("changeStatusByAdmin") public R changeStatusByAdmin(@RequestBody EditNeighborCircleAdminVO editNeighborCircleAdminVO) { @@ -88,13 +89,14 @@ } /** - * 后台修改邻里圈 - * @param id 邻里圈id - * @return 邻里圈列表 + * 邻里圈_后台删除 + * 待审核状态不可删除,显示、隐藏、已驳回的都可以删除) + * @param id 邻里圈id + * @return 邻里圈列表 */ @Transactional(rollbackFor = Exception.class) @PostMapping("deleteByAdmin") - public R deleteByAdmin(@RequestParam("id")Long id) { + public R deleteByAdmin(@RequestParam("id") Long id) { return comActNeighborCircleService.deleteByAdmin(id); } @@ -158,6 +160,73 @@ } /** + * 查看邻里圈基础_详情 + * @param id 邻里圈id + * @return 邻里圈列表 + */ + @GetMapping("detailNeighborByAdmin") + public R detailNeighborByAdmin(@RequestParam("id") Long id) { + return comActNeighborCircleService.detailNeighborByAdmin(id); + } + + + /** + * 邻里圈的所有评论_分页 + * @param dto 请求参数 + * @return 评论列表 + */ + @PostMapping("detailNeighborAllCommentByAdmin") + public R detailNeighborAllCommentByAdmin(@RequestBody DetailNeighborAllCommentByAdminDTO dto) { + return comActNeighborCircleService.detailNeighborAllCommentByAdmin(dto); + } + + /** + * 评论的状态_修改 + * @param vo 请求参数 + */ + @PostMapping("changeCommentStatusByAdmin") + @Transactional(rollbackFor = Exception.class) + public R changeCommentStatusByAdmin(@RequestBody ChangeCommentStatusByAdminVO vo) { + return comActNeighborCircleService.changeCommentStatusByAdmin(vo); + } + + /** + * 邻里圈评论_详情 + * @param id 评论id + */ + @GetMapping("detailNeighborCommentByAdmin") + public R detailNeighborCommentByAdmin(@RequestParam("id") Long id) { + return comActNeighborCircleService.detailNeighborCommentByAdmin(id); + } + + /** + * 邻里圈评论回复_分页 + * @param dto 参数 + */ + @PostMapping("detailNeighborCommentAllReply") + public R detailNeighborCommentAllReply(@RequestBody DetailNeighborCommentReplyByAdminDTO dto) { + return comActNeighborCircleService.detailNeighborCommentAllReply(dto); + } + + /** + * 邻里圈评论回复_基本详情 + * @param id 参数 + */ + @GetMapping("detailNeighborCommentReply") + public R detailNeighborCommentReply(@RequestParam("id") Long id) { + return comActNeighborCircleService.detailNeighborCommentReply(id); + } + + /** + * 评论的状态_修改 + * @param changeStatusReplyVO 参数 + */ + @PostMapping("changeCommentReplyStatusByAdmin") + public R changeCommentReplyStatusByAdmin(@RequestBody ChangeCommentReplyStatusByAdminVO changeStatusReplyVO) { + return comActNeighborCircleService.changeCommentReplyStatusByAdmin(changeStatusReplyVO); + } + + /** * 邻里圈取消点赞 * @param fabulousAppDTO 请求参数 * @return 取消点赞结果 @@ -177,4 +246,54 @@ return comActNeighborCircleService.neighborAddBrowseByApp(addBrowseAppDTO); } + /** + * 分页查询评论下所有回复 + * @param commentReplyAppDTO 请求参数 + * @return 回复列表 + */ + @PostMapping("neighborCommentReplyByApp") + public R neighborCommentReplyByApp(@RequestBody ComActNeighborCommentReplyAppDTO commentReplyAppDTO) { + return comActNeighborCircleService.neighborCommentReplyByApp(commentReplyAppDTO); + } + + /** + * 分页查询邻里圈话题列表 + * @param circleTopicAdminDTO 请求参数 + * @return 邻里圈话题列表 + */ + @PostMapping("pageNeighborTopicByAdmin") + public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) { + return comActNeighborCircleTopicService.pageNeighborTopicByAdmin(circleTopicAdminDTO); + } + + /** + * 添加邻里圈话题 + * @param addCircleTopicAdminDTO 请求参数 + * @return 添加结果 + */ + @PostMapping("addNeighborTopicByAdmin") + public R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) { + return comActNeighborCircleTopicService.addNeighborTopicByAdmin(addCircleTopicAdminDTO); + } + + /** + * 编辑邻里圈话题 + * @param addCircleTopicAdminDTO 请求参数 + * @return 编辑结果 + */ + @PostMapping("editNeighborTopicByAdmin") + public R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) { + return comActNeighborCircleTopicService.editNeighborTopicByAdmin(addCircleTopicAdminDTO); + } + + /** + * 小程序查询邻里圈话题列表 + * @param communityId 社区id + * @return 邻里圈话题列表 + */ + @GetMapping("getNeighborTopicByApp") + public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId) { + return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId); + } + } -- Gitblit v1.7.1