From d9a1c043340ede0c1d9171d350a2c0ff5804ecb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=96=91=EC=A7=80=EC=9B=90?= Date: Thu, 29 Aug 2024 22:42:07 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EA=B8=B0=EC=A4=80=EC=97=90=20?= =?UTF-8?q?=ED=95=B4=EB=8B=B9=ED=95=98=EB=8A=94=20=EA=B3=B5=EC=97=B0?= =?UTF-8?q?=EC=9D=B4=20=EC=97=86=EC=9C=BC=EB=A9=B4=20=EC=95=84=EC=98=88=20?= =?UTF-8?q?=EB=B0=98=ED=99=98=EC=9D=B4=20=EC=95=88=EB=90=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/controller/PerformanceController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/kopis/k_backend/performance/controller/PerformanceController.java b/src/main/java/kopis/k_backend/performance/controller/PerformanceController.java index 76f9e48..f2235a2 100644 --- a/src/main/java/kopis/k_backend/performance/controller/PerformanceController.java +++ b/src/main/java/kopis/k_backend/performance/controller/PerformanceController.java @@ -151,11 +151,11 @@ public ApiResponse getRecom // 각 추천 리스트를 StandardRecommendPerfDto로 변환하여 추가 Map> performancesByStandardMap = new HashMap<>(); - performancesByStandardMap.put("리뷰 많고 별점 높은 공연", topRatedPerformances); - performancesByStandardMap.put("좋아하는 배우의 공연", favoriteActorPerformances); - performancesByStandardMap.put("시작이 임박한 공연", upcomingPerformances); - performancesByStandardMap.put("마감이 임박한 공연", upcomingEndPerformances); - performancesByStandardMap.put("내 주소와 가까운 공연", nearestPerformances); + if(!topRatedPerformances.isEmpty()) performancesByStandardMap.put("리뷰 많고 별점 높은 공연", topRatedPerformances); + if(!favoriteActorPerformances.isEmpty()) performancesByStandardMap.put("좋아하는 배우의 공연", favoriteActorPerformances); + if(!upcomingPerformances.isEmpty()) performancesByStandardMap.put("시작이 임박한 공연", upcomingPerformances); + if(!upcomingEndPerformances.isEmpty()) performancesByStandardMap.put("마감이 임박한 공연", upcomingEndPerformances); + if(!nearestPerformances.isEmpty()) performancesByStandardMap.put("내 주소와 가까운 공연", nearestPerformances); // 전체 리스트를 StandardRecommendPerfListDto로 변환 PerformanceResponseDto.StandardRecommendPerfListDto responseDto = PerformanceConverter.standardRecommendListResDto(performancesByStandardMap);