mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-06 23:21:16 +08:00
fix: comment count 放在last_reply_at后更新,确保数据正确
This commit is contained in:
@@ -67,7 +67,6 @@ public class PostMapper {
|
||||
dto.setCategory(categoryMapper.toDto(post.getCategory()));
|
||||
dto.setTags(post.getTags().stream().map(tagMapper::toDto).collect(Collectors.toList()));
|
||||
dto.setViews(post.getViews());
|
||||
dto.setCommentCount(post.getCommentCount());
|
||||
dto.setStatus(post.getStatus());
|
||||
dto.setPinnedAt(post.getPinnedAt());
|
||||
dto.setRssExcluded(post.getRssExcluded() == null || post.getRssExcluded());
|
||||
@@ -86,6 +85,7 @@ public class PostMapper {
|
||||
if (last == null) {
|
||||
commentService.updatePostCommentStats(post);
|
||||
}
|
||||
dto.setCommentCount(post.getCommentCount());
|
||||
dto.setLastReplyAt(post.getLastReplyAt());
|
||||
dto.setReward(0);
|
||||
dto.setSubscribed(false);
|
||||
|
||||
Reference in New Issue
Block a user