From bcd36943bcd2a7d74a2a3fd491095ece9eb88a03 Mon Sep 17 00:00:00 2001 From: seunghaLim Date: Fri, 1 Mar 2024 21:03:01 +0900 Subject: [PATCH] =?UTF-8?q?[HOTFIX]=20=EC=A3=BC=EC=84=9D=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=ED=95=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EC=85=98=20=EB=B6=80=EB=B6=84=20=ED=95=B4=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/org/gunbbang/service/BakeryService.java | 3 --- .../main/java/com/org/gunbbang/service/ReviewService.java | 2 +- .../java/com/org/gunbbang/repository/ReviewRepository.java | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/api/src/main/java/com/org/gunbbang/service/BakeryService.java b/api/src/main/java/com/org/gunbbang/service/BakeryService.java index 981cdd5..e55723b 100644 --- a/api/src/main/java/com/org/gunbbang/service/BakeryService.java +++ b/api/src/main/java/com/org/gunbbang/service/BakeryService.java @@ -267,9 +267,6 @@ private void getRestBakeries( private List getBestBakeries(Member foundMember, List breadTypes) { log.info("########## 베스트 건빵집 조회 시작 ##########"); PageRequest bestPageRequest = PageRequest.of(0, MAX_BEST_BAKERY_COUNT); - - // 1. MemberBreadType 뒤져서 나랑 동일한 BreadType 선택한 멤버 가져옴 - // 2. 북마크 테이블+베이커리 테이블 뒤져서 해당 멤버들이 북마크한 빵집 가져옴 List bestBakeries = bakeryRepository.findBestBakeries( breadTypes, foundMember.getMainPurpose(), bestPageRequest); diff --git a/api/src/main/java/com/org/gunbbang/service/ReviewService.java b/api/src/main/java/com/org/gunbbang/service/ReviewService.java index cc68678..ebba816 100644 --- a/api/src/main/java/com/org/gunbbang/service/ReviewService.java +++ b/api/src/main/java/com/org/gunbbang/service/ReviewService.java @@ -280,7 +280,7 @@ private List getBestReviews(Member foundMember, List b PageRequest bestPageRequest = PageRequest.of(0, MAX_BEST_BAKERY_COUNT); List bestReviews = reviewRepository.findBestReviewDTOList( - breadTypes, foundMember.getMainPurpose()); // , bestPageRequest); + breadTypes, foundMember.getMainPurpose(), bestPageRequest); return bestReviews; } diff --git a/storage/db-core/src/main/java/com/org/gunbbang/repository/ReviewRepository.java b/storage/db-core/src/main/java/com/org/gunbbang/repository/ReviewRepository.java index 8684f74..7a7e8fb 100644 --- a/storage/db-core/src/main/java/com/org/gunbbang/repository/ReviewRepository.java +++ b/storage/db-core/src/main/java/com/org/gunbbang/repository/ReviewRepository.java @@ -48,9 +48,8 @@ public interface ReviewRepository extends JpaRepository { + "ORDER BY r.createdAt desc") List findBestReviewDTOList( @Param("currentMemberBreadType") List currentMemberBreadType, - @Param("currentMemberMainPurpose") MainPurpose mainPurpose); - - // PageRequest bestPageRequest); + @Param("currentMemberMainPurpose") MainPurpose mainPurpose, + PageRequest bestPageRequest); @Query( value =