diff --git a/src/main/java/com/mpnp/baechelin/store/service/StoreService.java b/src/main/java/com/mpnp/baechelin/store/service/StoreService.java index 7fc6151..04fa5df 100644 --- a/src/main/java/com/mpnp/baechelin/store/service/StoreService.java +++ b/src/main/java/com/mpnp/baechelin/store/service/StoreService.java @@ -169,15 +169,12 @@ public StoreDetailResponseDto getStore(long storeId, String socialId) { List storeImageList = new ArrayList<>(); - for (StoreImage storeImage : store.getStoreImageList()) { - storeImageList.add(storeImage.getStoreImageUrl()); - } + store.getStoreImageList() + .forEach(storeImage -> storeImageList.add(storeImage.getStoreImageUrl())); - for (Review review : store.getReviewList()) { - for (ReviewImage reviewImage : review.getReviewImageList()) { - storeImageList.add(reviewImage.getReviewImageUrl()); - } - } + store.getReviewList() + .forEach(review -> review.getReviewImageList() + .forEach(reviewImage -> storeImageList.add(reviewImage.getReviewImageUrl()))); if (socialId == null) { return new StoreDetailResponseDto(store, "N", storeImageList);