From c62da354c88055194dd9d784f0ef8ec8fea32557 Mon Sep 17 00:00:00 2001 From: eckrin Date: Tue, 21 Nov 2023 14:37:23 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9D=8C=EC=8B=9D=20=EA=B2=80=EC=83=89?= =?UTF-8?q?=EC=8B=9C=20=EC=9D=91=EB=8B=B5=ED=98=95=EC=8B=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to: Issue #15 --- src/main/java/com/kusitms/jipbap/store/StoreService.java | 5 +++-- .../com/kusitms/jipbap/store/dto/StoreFoodResponseDto.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/kusitms/jipbap/store/StoreService.java b/src/main/java/com/kusitms/jipbap/store/StoreService.java index 0cbbb2d..c4bc31d 100644 --- a/src/main/java/com/kusitms/jipbap/store/StoreService.java +++ b/src/main/java/com/kusitms/jipbap/store/StoreService.java @@ -7,6 +7,7 @@ import com.kusitms.jipbap.common.exception.S3RegisterFailureException; import com.kusitms.jipbap.common.utils.S3Utils; import com.kusitms.jipbap.food.dto.FoodDto; +import com.kusitms.jipbap.food.dto.FoodPreviewResponse; import com.kusitms.jipbap.store.dto.*; import com.kusitms.jipbap.store.exception.StoreExistsException; import com.kusitms.jipbap.store.exception.StoreNotExistsException; @@ -138,8 +139,8 @@ public StoreFoodResponseDto searchStoresAndFoods(String email, Pageable pageable ) .collect(Collectors.toList()); - List foodList = foodRepository.searchByNameOrderBySort(user, pageable, keyword, standard, order) - .stream().map(f -> new FoodDto(f.getId(), f.getStore().getId(), f.getCategory().getId(), f.getName(), f.getDollarPrice(), f.getCanadaPrice(), f.getDescription(), f.getImage())) + List foodList = foodRepository.searchByNameOrderBySort(user, pageable, keyword, standard, order) + .stream().map(f -> new FoodPreviewResponse(f.getId(), f.getName(), f.getStore().getId(), f.getStore().getName(), f.getDollarPrice(), f.getCanadaPrice(), f.getImage(), f.getStore().getAvgRate())) .collect(Collectors.toList()); diff --git a/src/main/java/com/kusitms/jipbap/store/dto/StoreFoodResponseDto.java b/src/main/java/com/kusitms/jipbap/store/dto/StoreFoodResponseDto.java index b6c541c..71bfcc7 100644 --- a/src/main/java/com/kusitms/jipbap/store/dto/StoreFoodResponseDto.java +++ b/src/main/java/com/kusitms/jipbap/store/dto/StoreFoodResponseDto.java @@ -1,6 +1,7 @@ package com.kusitms.jipbap.store.dto; import com.kusitms.jipbap.food.dto.FoodDto; +import com.kusitms.jipbap.food.dto.FoodPreviewResponse; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -15,5 +16,5 @@ public class StoreFoodResponseDto { private List stores; - private List foods; + private List foods; }