From b3b566ebdfed4005aaa513da3d5d2fd3924903cc Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 31 Jan 2024 16:17:54 +0800
Subject: [PATCH] 拿不到地址总表数据,不设置网格信息
---
src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 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 3fb3aab..6888f4f 100644
--- a/src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java
+++ b/src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java
@@ -10,7 +10,9 @@
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.AesUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.article.entity.ArticleCommentEntity;
import org.springblade.modules.article.service.IArticleCommentService;
@@ -57,10 +59,22 @@
/**
* 通知评论表 自定义分页
*/
+ @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());
IPage<ArticleCommentVO> pages = articleCommentService.selectArticleCommentPage(Condition.getPage(query), articleComment);
return R.data(pages);
}
@@ -72,6 +86,7 @@
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入articleComment")
public R save(@Valid @RequestBody ArticleCommentEntity articleComment) {
+ articleComment.setUserId(AuthUtil.getUserId());
return R.status(articleCommentService.save(articleComment));
}
@@ -92,6 +107,7 @@
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入articleComment")
public R submit(@Valid @RequestBody ArticleCommentEntity articleComment) {
+ articleComment.setUserId(AuthUtil.getUserId());
return R.status(articleCommentService.saveOrUpdate(articleComment));
}
--
Gitblit v1.9.3