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; }