Skip to content

Commit

Permalink
Merge pull request #79 from Central-MakeUs/14-필터를-조회한다
Browse files Browse the repository at this point in the history
Fix(#14): 정렬할 때 기준 똑같으면 최신순으로 정렬
  • Loading branch information
tmddus2 authored Aug 18, 2024
2 parents 912e2b3 + 31c703c commit 191fc89
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public Page<Object[]> findAllWithLikeSorting(OS os, Tag tag, Long photographerId
.leftJoin(filterLike).on(filter.id.eq(filterLike.filter.id))
.where(builder)
.groupBy(filter.id)
.orderBy(filterLike.count().desc(), filter.id.asc())
.orderBy(filterLike.count().desc(), filter.createdAt.desc())
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
.fetch();
Expand Down Expand Up @@ -108,7 +108,7 @@ public Page<Object[]> findAllWithReviewSorting(OS os, Tag tag, Long photographer
.leftJoin(review).on(filter.id.eq(review.filter.id))
.where(builder)
.groupBy(filter.id)
.orderBy(review.pureDegree.avg().desc(), filter.id.asc())
.orderBy(review.pureDegree.avg().desc(), filter.createdAt.desc())
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
.fetch();
Expand Down

0 comments on commit 191fc89

Please sign in to comment.