mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 06:30:48 +08:00
feat: show correct reply counts
This commit is contained in:
@@ -27,4 +27,7 @@ public interface CommentRepository extends JpaRepository<Comment, Long> {
|
||||
@org.springframework.data.jpa.repository.Query("SELECT MAX(c.createdAt) FROM Comment c WHERE c.author.id = :userId")
|
||||
java.time.LocalDateTime findLastCommentTimeOfUserByUserId(@org.springframework.data.repository.query.Param("userId") Long userId);
|
||||
|
||||
@org.springframework.data.jpa.repository.Query("SELECT COUNT(c) FROM Comment c WHERE c.post.id = :postId")
|
||||
long countByPostId(@org.springframework.data.repository.query.Param("postId") Long postId);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user