diff --git a/purithm/src/main/java/com/example/purithm/domain/filter/repository/CustomFilterRepositoryImpl.java b/purithm/src/main/java/com/example/purithm/domain/filter/repository/CustomFilterRepositoryImpl.java index 62576ac..87085d7 100644 --- a/purithm/src/main/java/com/example/purithm/domain/filter/repository/CustomFilterRepositoryImpl.java +++ b/purithm/src/main/java/com/example/purithm/domain/filter/repository/CustomFilterRepositoryImpl.java @@ -72,7 +72,7 @@ public Page 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(); @@ -108,7 +108,7 @@ public Page 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();