diff --git a/src/main/java/com/readyvery/readyverydemo/src/order/dto/CartDto.java b/src/main/java/com/readyvery/readyverydemo/src/order/dto/CartDto.java index bbde913..59fefa0 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/order/dto/CartDto.java +++ b/src/main/java/com/readyvery/readyverydemo/src/order/dto/CartDto.java @@ -12,5 +12,6 @@ public class CartDto { private String name; private Long count; private Long totalPrice; + private String imgUrl; private List options; } diff --git a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java index 93c34bb..c16ea04 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java +++ b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java @@ -126,6 +126,11 @@ private CartDto cartItemToCartDto(CartItem cartItem, Long inout) { .idx(cartItem.getId()) .name(cartItem.getFoodie().getName()) .count(cartItem.getCount()) + // img + .imgUrl(cartItem.getFoodie().getImgUrl() != null + ? IMG_URL + cartItem.getFoodie().getImgUrl() + "/" + + cartItem.getFoodie().getImgUrl() + : null) .totalPrice(cartItemTotalPrice(cartItem, inout)) .options( cartItem.getCartOptions()