feat: support featured medals

This commit is contained in:
Tim
2025-08-21 16:10:53 +08:00
parent cd57d478f2
commit 41a5eda311
16 changed files with 141 additions and 4 deletions

View File

@@ -97,6 +97,8 @@ public interface PostRepository extends JpaRepository<Post, Long> {
long countDistinctByTags_Id(Long tagId);
long countByAuthor_IdAndRssExcludedFalse(Long userId);
@Query("SELECT t.id, COUNT(DISTINCT p) FROM Post p JOIN p.tags t WHERE t.id IN :tagIds GROUP BY t.id")
List<Object[]> countPostsByTagIds(@Param("tagIds") List<Long> tagIds);