From f6d6bc5062498fdd59f3309c2b496a88b3cfaff4 Mon Sep 17 00:00:00 2001 From: whz <303054730@qq.com> Date: Fri, 31 May 2024 10:37:25 +0800 Subject: [PATCH] fix --- src/main/java/com/lk/paopao/service/PostService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lk/paopao/service/PostService.java b/src/main/java/com/lk/paopao/service/PostService.java index 2f7c92a..89ec2a4 100644 --- a/src/main/java/com/lk/paopao/service/PostService.java +++ b/src/main/java/com/lk/paopao/service/PostService.java @@ -276,7 +276,7 @@ public class PostService { collection.setUser(user); postCollectionRepository.save(collection); // 更新帖子的收藏计数 - post.setUpvoteCount(post.getCollectionCount()+1); + post.setCollectionCount(post.getCollectionCount()+1); postRepository.save(post); return true; }