This commit is contained in:
whz 2024-05-31 10:37:25 +08:00
parent ec4ac10cd3
commit f6d6bc5062

View File

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