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

@@ -612,7 +612,7 @@ public class PostService {
.sorted(java.util.Comparator
.comparing(Post::getPinnedAt, java.util.Comparator.nullsLast(java.util.Comparator.reverseOrder()))
.thenComparing(p -> {
java.time.LocalDateTime t = p.getLastReplyAt();
java.time.LocalDateTime t = commentRepository.findLastCommentTime(p);
return t != null ? t : p.getCreatedAt();
}, java.util.Comparator.nullsLast(java.util.Comparator.reverseOrder())))
.toList();