feat: implement medal feature

This commit is contained in:
Tim
2025-08-09 02:08:02 +08:00
parent 9c1cedd172
commit 987fe0d885
11 changed files with 269 additions and 0 deletions

View File

@@ -30,4 +30,6 @@ public interface CommentRepository extends JpaRepository<Comment, Long> {
@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);
long countByAuthor_Id(Long userId);
}

View File

@@ -93,4 +93,6 @@ public interface PostRepository extends JpaRepository<Post, Long> {
long countByCategory_Id(Long categoryId);
long countDistinctByTags_Id(Long tagId);
long countByAuthor_Id(Long userId);
}