diff --git a/src/main/java/org/store/clothstar/orderDetail/dto/request/AddOrderDetailRequest.java b/src/main/java/org/store/clothstar/orderDetail/dto/request/AddOrderDetailRequest.java index fe69d584..54129eb2 100644 --- a/src/main/java/org/store/clothstar/orderDetail/dto/request/AddOrderDetailRequest.java +++ b/src/main/java/org/store/clothstar/orderDetail/dto/request/AddOrderDetailRequest.java @@ -45,11 +45,6 @@ public OrderDetailEntity toOrderDetailEntity(OrderEntity orderEntity, ProductLin .quantity(quantity) .fixedPrice(productLineEntity.getPrice()) .oneKindTotalPrice(quantity * productLineEntity.getPrice()) - .name(productLineEntity.getName()) - .stock(productEntity.getStock()) - .optionName(productEntity.getName()) -// .extraCharge(product.getExtraCharge()) - .brandName(productLineEntity.getSeller().getBrandName()) .build(); } } diff --git a/src/main/java/org/store/clothstar/orderDetail/dto/request/CreateOrderDetailRequest.java b/src/main/java/org/store/clothstar/orderDetail/dto/request/CreateOrderDetailRequest.java index 4372197d..106b59e7 100644 --- a/src/main/java/org/store/clothstar/orderDetail/dto/request/CreateOrderDetailRequest.java +++ b/src/main/java/org/store/clothstar/orderDetail/dto/request/CreateOrderDetailRequest.java @@ -41,11 +41,6 @@ public OrderDetailEntity toOrderDetailEntity(OrderEntity orderEntity, ProductLin .quantity(quantity) .fixedPrice(productLineEntity.getPrice()) .oneKindTotalPrice(quantity * productLineEntity.getPrice()) - .name(productLineEntity.getName()) - .stock(productEntity.getStock()) - .optionName(productEntity.getName()) -// .extraCharge(product.getExtraCharge()) - .brandName(productLineEntity.getSeller().getBrandName()) .build(); } } diff --git a/src/main/java/org/store/clothstar/orderDetail/dto/response/OrderDetailResponse.java b/src/main/java/org/store/clothstar/orderDetail/dto/response/OrderDetailResponse.java index 97b5aa34..931b7768 100644 --- a/src/main/java/org/store/clothstar/orderDetail/dto/response/OrderDetailResponse.java +++ b/src/main/java/org/store/clothstar/orderDetail/dto/response/OrderDetailResponse.java @@ -56,11 +56,11 @@ public static OrderDetailResponse fromOrderDetailEntity(OrderDetailEntity orderD .quantity(orderDetailEntity.getQuantity()) .fixedPrice(orderDetailEntity.getFixedPrice()) .oneKindTotalPrice(orderDetailEntity.getOneKindTotalPrice()) - .name(orderDetailEntity.getName()) - .stock(orderDetailEntity.getStock()) - .optionName(orderDetailEntity.getOptionName()) -// .extraCharge(orderDetail.getExtraCharge()) - .brandName(orderDetailEntity.getBrandName()) + .name(orderDetailEntity.getProductLine().getName()) + .stock(orderDetailEntity.getProduct().getStock()) + .optionName(orderDetailEntity.getProduct().getName()) + .extraCharge(orderDetailEntity.getProduct().getExtraCharge()) + .brandName(orderDetailEntity.getProductLine().getSeller().getBrandName()) .build(); } } diff --git a/src/main/java/org/store/clothstar/orderDetail/entity/OrderDetailEntity.java b/src/main/java/org/store/clothstar/orderDetail/entity/OrderDetailEntity.java index beb8f738..c6ca0cdb 100644 --- a/src/main/java/org/store/clothstar/orderDetail/entity/OrderDetailEntity.java +++ b/src/main/java/org/store/clothstar/orderDetail/entity/OrderDetailEntity.java @@ -27,18 +27,6 @@ public class OrderDetailEntity { @Column(name = "onekind_total_price") private int oneKindTotalPrice; // 상품 종류 하나당 총 가격 - // 상품 정보 - private String name; // 상품명 - - // 상품 옵션 정보 - private Long stock; // 옵션 상품 재고 - @Column(name = "option_name") - private String optionName; - - // 판매자 정보 - @Column(name = "brand_name") - private String brandName; - @ManyToOne @JoinColumn(name = "order_id") private OrderEntity order; @@ -50,5 +38,4 @@ public class OrderDetailEntity { @ManyToOne @JoinColumn(name = "product_id") private ProductEntity product; -} - +} \ No newline at end of file