Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
public interface PlaceRepository extends JpaRepository<Place, Long>, 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<Place> 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<Place> findAroundProducts(@Param("areacode") String areacode,
Expand Down