Skip to content

Commit

Permalink
Merge pull request #88 from ClothingStoreService/hotfix/order-detail-DB
Browse files Browse the repository at this point in the history
hotfix: DB 컬럼 변화에 따른 오류 발생 수정
  • Loading branch information
axhtl authored Jul 7, 2024
2 parents e6bfe14 + bd4c855 commit 9f35e82
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -50,5 +38,4 @@ public class OrderDetailEntity {
@ManyToOne
@JoinColumn(name = "product_id")
private ProductEntity product;
}

}

0 comments on commit 9f35e82

Please sign in to comment.