From 418382c405d329ff70379f52155124c7da35e8aa Mon Sep 17 00:00:00 2001 From: Kimprodp Date: Wed, 20 Nov 2024 23:32:03 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20refactor:=202=EC=B0=A8=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=20=EA=B8=B0=EC=A4=80=20=EC=B6=94=EA=B0=80=20(#972)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 2차 정렬 기준 추가 * refactor: 2차 정렬 기준 추가 --- .../main/java/reviewme/review/repository/AnswerRepository.java | 2 +- .../main/java/reviewme/review/repository/ReviewRepository.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/reviewme/review/repository/AnswerRepository.java b/backend/src/main/java/reviewme/review/repository/AnswerRepository.java index ea793623a..5b18ab9f2 100644 --- a/backend/src/main/java/reviewme/review/repository/AnswerRepository.java +++ b/backend/src/main/java/reviewme/review/repository/AnswerRepository.java @@ -15,7 +15,7 @@ public interface AnswerRepository extends JpaRepository { SELECT a FROM Answer a JOIN Review r ON a.reviewId = r.id WHERE r.reviewGroupId = :reviewGroupId AND a.questionId IN :questionIds - ORDER BY r.createdAt DESC + ORDER BY r.createdAt DESC, r.id DESC LIMIT :limit """) List findReceivedAnswersByQuestionIds(long reviewGroupId, Collection questionIds, int limit); diff --git a/backend/src/main/java/reviewme/review/repository/ReviewRepository.java b/backend/src/main/java/reviewme/review/repository/ReviewRepository.java index 3a0600ad9..90119fa0b 100644 --- a/backend/src/main/java/reviewme/review/repository/ReviewRepository.java +++ b/backend/src/main/java/reviewme/review/repository/ReviewRepository.java @@ -12,7 +12,7 @@ public interface ReviewRepository extends JpaRepository { @Query(""" SELECT r FROM Review r WHERE r.reviewGroupId = :reviewGroupId - ORDER BY r.createdAt DESC + ORDER BY r.createdAt DESC, r.id DESC """) List findAllByGroupId(long reviewGroupId);