rentaiming
2024-05-27 a71ee1cbe7611b95485d0e951ef0030f1f2b7826
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();
    }
}