diff --git a/src/main/java/Journey/Together/domain/place/repository/PlaceRepository.java b/src/main/java/Journey/Together/domain/place/repository/PlaceRepository.java index b1a9339..28871ee 100644 --- a/src/main/java/Journey/Together/domain/place/repository/PlaceRepository.java +++ b/src/main/java/Journey/Together/domain/place/repository/PlaceRepository.java @@ -14,11 +14,13 @@ public interface PlaceRepository extends JpaRepository, PlaceRepositoryCustom { @Query(value = "SELECT * FROM place p " + "WHERE p.first_img IS NOT NULL AND TRIM(p.first_img) <> '' " + + "AND p.first_img != 'https://daongil.s3.ap-northeast-2.amazonaws.com/empty_img.jpg'"+ "ORDER BY RAND() LIMIT :count", nativeQuery = true) List findRandomProducts(@Param("count") int count); @Query(value = "SELECT * FROM place p " + "WHERE p.first_img IS NOT NULL AND TRIM(p.first_img) <> '' " + + "AND p.first_img != 'https://daongil.s3.ap-northeast-2.amazonaws.com/empty_img.jpg'"+ "AND area_code = :areacode AND sigungu_code = :sigungucode " + "ORDER BY RAND() LIMIT :count", nativeQuery = true) List findAroundProducts(@Param("areacode") String areacode,