Add latest reply tab and backend support

This commit is contained in:
Tim
2025-07-23 10:58:37 +08:00
parent 1b70b08eb1
commit bc42fc9d70
5 changed files with 156 additions and 2 deletions

View File

@@ -16,4 +16,7 @@ public interface CommentRepository extends JpaRepository<Comment, Long> {
@org.springframework.data.jpa.repository.Query("SELECT DISTINCT c.author FROM Comment c WHERE c.post = :post")
java.util.List<User> findDistinctAuthorsByPost(@org.springframework.data.repository.query.Param("post") Post post);
@org.springframework.data.jpa.repository.Query("SELECT MAX(c.createdAt) FROM Comment c WHERE c.post = :post")
java.time.LocalDateTime findLastCommentTime(@org.springframework.data.repository.query.Param("post") Post post);
}