linwe
2023-12-23 aaa24fbe4045ed9f86dbefacb5e7440d1d5227bb
评论bug修复
2 files modified
6 ■■■■■ changed files
src/main/java/org/springblade/modules/article/controller/ArticleCommentController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java 2 ●●●●● patch | view | raw | blame | history
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));
    }
src/main/java/org/springblade/modules/article/service/impl/ArticleCommentServiceImpl.java
@@ -18,6 +18,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.article.entity.ArticleCommentEntity;
import org.springblade.modules.article.mapper.ArticleCommentMapper;
import org.springblade.modules.article.service.IArticleCommentService;
@@ -35,6 +36,7 @@
    @Override
    public IPage<ArticleCommentVO> selectArticleCommentPage(IPage<ArticleCommentVO> page, ArticleCommentVO noticeComment) {
        noticeComment.setUserId(AuthUtil.getUserId());
        return page.setRecords(baseMapper.selectArticleCommentPage(page, noticeComment));
    }