From 2427b05aeca08ee3c4998843bf749d35440d461b Mon Sep 17 00:00:00 2001 From: rentaiming <806181662@qq.com> Date: 星期六, 15 六月 2024 21:33:41 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/management/MgtArticleCommentsController.java | 62 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/management/MgtArticleCommentsController.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/management/MgtArticleCommentsController.java new file mode 100644 index 0000000..b8277d5 --- /dev/null +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/management/MgtArticleCommentsController.java @@ -0,0 +1,62 @@ +package com.ruoyi.article.controller.management; + + +import com.ruoyi.article.controller.management.dto.MgtArticleCommentsQuery; +import com.ruoyi.article.controller.management.vo.MgtArticleCommentsVO; +import com.ruoyi.article.service.IArticleCommentsService; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.utils.page.PageDTO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.RequiredArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +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; + +/** + * <p> + * 资讯评论回复表 前端控制器 + * </p> + * + * @author mitao + * @since 2024-05-16 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/mgt/article-comments") +@Api(value = "管理后台-资讯评论回复相关接口", tags = "管理后台-资讯评论回复相关接口") +public class MgtArticleCommentsController { + + private final IArticleCommentsService articleCommentsService; + + /** + * 查看详情-评论详情 + * + * @param query 资讯评论回复查询对象 + * @return PageDTO<MgtArticleCommentsVO> + */ + @ApiOperation(value = "查看详情-评论详情") + @PostMapping("/page") + public R<PageDTO<MgtArticleCommentsVO>> getArticleCommentsPage( + @Validated @RequestBody MgtArticleCommentsQuery query) { + return R.ok(articleCommentsService.getArticleCommentsPage(query)); + } + + /** + * 删除评论 + * + * @param id 评论id + */ + @ApiOperation("删除评论") + @DeleteMapping("/{id}") + public R<?> delArticleComments( + @ApiParam(name = "id", value = "评论id", required = true) @PathVariable("id") Long id) { + articleCommentsService.delArticleComments(id); + return R.ok(); + } +} -- Gitblit v1.7.1