From a71ee1cbe7611b95485d0e951ef0030f1f2b7826 Mon Sep 17 00:00:00 2001 From: rentaiming <806181062@qq.com> Date: 星期一, 27 五月 2024 14:32:28 +0800 Subject: [PATCH] 写用户端接口 --- ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/ArticleCommentsController.java | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/ArticleCommentsController.java b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/ArticleCommentsController.java index a971196..34a7a85 100644 --- a/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/ArticleCommentsController.java +++ b/ruoyi-modules/ruoyi-article/src/main/java/com/ruoyi/article/controller/ArticleCommentsController.java @@ -1,9 +1,19 @@ package com.ruoyi.article.controller; +import com.ruoyi.article.dto.ArticleCommentsDTO; +import com.ruoyi.article.dto.ArticleDTO; +import com.ruoyi.article.service.IArticleCommentsService; +import com.ruoyi.common.core.domain.R; +import io.swagger.annotations.ApiOperation; +import org.apache.poi.ss.formula.functions.T; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; /** * <p> @@ -17,4 +27,23 @@ @RequestMapping("/article-comments") public class ArticleCommentsController { + @Resource + private IArticleCommentsService articleCommentsService; + + @PostMapping("/saveMemberArticleComments") + @ResponseBody + @ApiOperation(value = "添加或者修改用户评论/回复") + public R<T> saveMemberArticleComments(ArticleCommentsDTO articleCommentsDTO) { + articleCommentsService.saveMemberArticleComments(articleCommentsDTO); + return R.ok(); + } + + @PostMapping("/delMemberArticleComments") + @ResponseBody + @ApiOperation(value = "删除用户评论/回复") + public R<T> delMemberArticleComments(ArticleCommentsDTO articleCommentsDTO) { + articleCommentsService.delMemberArticleComments(articleCommentsDTO); + return R.ok(); + } + } -- Gitblit v1.7.1