mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-04-28 14:57:29 +08:00
Revert "optimize(backend): optimize /api/posts/latest-reply"
This reverts commit 1e87e9252d.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user