From fe1bcd25ec40616233e1974985c45b7e8fc33059 Mon Sep 17 00:00:00 2001 From: daolove0323 Date: Fri, 15 Nov 2024 12:17:08 +0900 Subject: [PATCH] =?UTF-8?q?jqql=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wouldyouin/reservation/persist/ReservationRepository.java | 4 ++-- .../cokaen/wouldyouin/review/persist/ReviewRepository.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/ktc2/cokaen/wouldyouin/reservation/persist/ReservationRepository.java b/src/main/java/org/ktc2/cokaen/wouldyouin/reservation/persist/ReservationRepository.java index 4739e588..810e248a 100644 --- a/src/main/java/org/ktc2/cokaen/wouldyouin/reservation/persist/ReservationRepository.java +++ b/src/main/java/org/ktc2/cokaen/wouldyouin/reservation/persist/ReservationRepository.java @@ -11,12 +11,12 @@ public interface ReservationRepository extends JpaRepository { @Query("SELECT R FROM Reservation R JOIN FETCH R.member JOIN FETCH R.event " - + "WHERE R.member.id = :memberId AND R.id > :lastId " + + "WHERE R.member.id = :memberId AND R.id < :lastId " + "ORDER BY R.id DESC") Slice findByMemberIdOrderByReservationIdDesc(Long memberId, Long lastId, Pageable pageable); @Query("SELECT R FROM Reservation R JOIN FETCH R.member JOIN FETCH R.event " - + "WHERE R.event.id = :eventId AND R.id > :lastId " + + "WHERE R.event.id = :eventId AND R.id < :lastId " + "ORDER BY R.id DESC") Slice findByEventIdOrderByReservationIdDesc(Long eventId, Long lastId, Pageable pageable); diff --git a/src/main/java/org/ktc2/cokaen/wouldyouin/review/persist/ReviewRepository.java b/src/main/java/org/ktc2/cokaen/wouldyouin/review/persist/ReviewRepository.java index 06eb296e..af631e54 100644 --- a/src/main/java/org/ktc2/cokaen/wouldyouin/review/persist/ReviewRepository.java +++ b/src/main/java/org/ktc2/cokaen/wouldyouin/review/persist/ReviewRepository.java @@ -11,12 +11,12 @@ public interface ReviewRepository extends JpaRepository { @Query("SELECT R FROM Review R JOIN FETCH R.member JOIN FETCH R.event " - + "WHERE R.member.id = :memberId AND R.id > :lastId " + + "WHERE R.member.id = :memberId AND R.id < :lastId " + "ORDER BY R.id DESC") Slice findByMemberIdOrderByReviewIdDesc(Long memberId, Long lastId, Pageable pageable); @Query("SELECT R FROM Review R JOIN FETCH R.member JOIN FETCH R.event " - + "WHERE R.event.id = :eventId AND R.id > :lastId " + + "WHERE R.event.id = :eventId AND R.id < :lastId " + "ORDER BY R.id DESC") Slice findByEventIdOrderByReviewIdDesc(Long eventId, Long lastId, Pageable pageable);