From 55d677758efadb6d42e6d4e595cecc2c50c20d5a Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Sat, 23 Dec 2023 17:19:12 +0800
Subject: [PATCH] bug修复
---
src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java | 4 ++++
1 files changed, 4 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..c6ceea0 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;
@@ -72,6 +74,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 +95,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