Skip to content

Commit

Permalink
fix: 비공개 떡국 조회 관련 필터링 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
h-beeen committed Feb 8, 2024
1 parent cfcafc3 commit 5c2c4c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public interface TteokgukRepository extends JpaRepository<Tteokguk, Long> {
@Query("SELECT t FROM Tteokguk t WHERE t.access = true and t.member.deleted = false and t.completion = true ORDER BY t.id DESC")
List<Tteokguk> findCompletionTteokguks(Pageable pageable);

@Query(value = "SELECT t FROM Tteokguk t WHERE t.deleted = false ORDER BY RAND() LIMIT 1")
@Query(value = "SELECT t FROM Tteokguk t WHERE t.deleted = false AND t.access = true ORDER BY RAND() LIMIT 1")
Tteokguk findRandomTteokguk();
}
2 changes: 1 addition & 1 deletion tteokguk-config

0 comments on commit 5c2c4c7

Please sign in to comment.