Revert "optimize(backend): optimize /api/posts/latest-reply"

This reverts commit 1e87e9252d.
This commit is contained in:
tim
2025-08-14 18:54:12 +08:00
parent 76176e135c
commit df56d7e885
5 changed files with 2 additions and 64 deletions

View File

@@ -60,8 +60,7 @@ 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(commentService.countComments(post.getId()));
dto.setCommentCount(post.getCommentCount());
dto.setCommentCount(commentService.countComments(post.getId()));
dto.setStatus(post.getStatus());
dto.setPinnedAt(post.getPinnedAt());