From f16f912c63bddffba721f71527fd2b31594a0fcb Mon Sep 17 00:00:00 2001 From: wangqing <408564126@qq.com> Date: Sun, 3 Mar 2024 20:13:33 +0800 Subject: [PATCH] fix: delete comment --- .../main/java/com/luoo/comment/service/CommentService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luoo_comment/src/main/java/com/luoo/comment/service/CommentService.java b/luoo_comment/src/main/java/com/luoo/comment/service/CommentService.java index f1fe243..9c9bb45 100644 --- a/luoo_comment/src/main/java/com/luoo/comment/service/CommentService.java +++ b/luoo_comment/src/main/java/com/luoo/comment/service/CommentService.java @@ -153,7 +153,7 @@ public class CommentService { cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_HOT+"_"+comment.getRootJournalId()); cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_NEW+"_"+comment.getRootJournalId()); } - comment.setContent("原评论已删除"); +// comment.setContent("原评论已删除"); // 同步publicationLike和CommentHis // 同步更新publicationLike中的评论信息 @@ -177,8 +177,8 @@ public class CommentService { Update update3 = new Update(); update3.set("commentContent","原评论已删除"); mongoTemplate.updateMulti(query3,update3,CommentHis.class); -// commentDao.deleteById(id); - commentDao.save(comment); + commentDao.deleteById(id); +// commentDao.save(comment); } public Page findByParentId(String parentId, int page, int size) {