Skip to content

Commit

Permalink
[BE] refactor: 2차 정렬 기준 추가 (#972)
Browse files Browse the repository at this point in the history
* refactor: 2차 정렬 기준 추가

* refactor: 2차 정렬 기준 추가
  • Loading branch information
Kimprodp authored Nov 20, 2024
1 parent 90646b6 commit 418382c
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 @@ -15,7 +15,7 @@ public interface AnswerRepository extends JpaRepository<Answer, Long> {
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<Answer> findReceivedAnswersByQuestionIds(long reviewGroupId, Collection<Long> questionIds, int limit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public interface ReviewRepository extends JpaRepository<Review, Long> {
@Query("""
SELECT r FROM Review r
WHERE r.reviewGroupId = :reviewGroupId
ORDER BY r.createdAt DESC
ORDER BY r.createdAt DESC, r.id DESC
""")
List<Review> findAllByGroupId(long reviewGroupId);

Expand Down

0 comments on commit 418382c

Please sign in to comment.