From c10d6358b9f014375a13821465bc978d0c0da22e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 29 May 2024 17:17:08 +0800
Subject: [PATCH] 通过E呼即办数据统计
---
src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java b/src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java
index c6ceea0..5f0a133 100644
--- a/src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java
+++ b/src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java
@@ -7,6 +7,7 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
+import org.apache.logging.log4j.util.Strings;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
@@ -59,10 +60,23 @@
/**
* 通知评论表 自定义分页
*/
+ @GetMapping("/pageWeb")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入articleComment")
+ public R<IPage<ArticleCommentVO>> pageWeb(ArticleCommentVO articleComment, Query query) {
+ IPage<ArticleCommentVO> pages = articleCommentService.selectArticleCommentPage(Condition.getPage(query), articleComment);
+ return R.data(pages);
+ }
+
+ /**
+ * 通知评论表 自定义分页
+ */
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入articleComment")
public R<IPage<ArticleCommentVO>> page(ArticleCommentVO articleComment, Query query) {
+ articleComment.setUserId(AuthUtil.getUserId());
+ articleComment.setCheckStatus(2);
IPage<ArticleCommentVO> pages = articleCommentService.selectArticleCommentPage(Condition.getPage(query), articleComment);
return R.data(pages);
}
@@ -75,7 +89,11 @@
@ApiOperation(value = "新增", notes = "传入articleComment")
public R save(@Valid @RequestBody ArticleCommentEntity articleComment) {
articleComment.setUserId(AuthUtil.getUserId());
- return R.status(articleCommentService.save(articleComment));
+ String msg = articleCommentService.saveComment(articleComment);
+ if (!Strings.isBlank(msg)&& msg.equals("操作成功")){
+ return R.data(200,"",msg);
+ }
+ return R.data(201,"",msg);
}
/**
--
Gitblit v1.9.3