Skip to content

Commit

Permalink
Merge branch 'develop' into LF1-942-product-presigned-url
Browse files Browse the repository at this point in the history
  • Loading branch information
nowgnas authored Jan 1, 2024
2 parents c79beaf + 626fd7d commit 351316e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ public static class ProductListItem {
private Long salesCount;
private Long reviewCount;
private Long averageRating;
private ProductSaleStatus productSaleStatus;

public static List<String> getProductIds(List<ProductListItem> productListItem) {
return productListItem.stream().map(ProductListItem::getKey).collect(Collectors.toList());
Expand Down Expand Up @@ -390,7 +391,7 @@ public static class StoreProductDetail {
private String productDescriptionImage;
private Long productSaleAmount;
private Double averageRating;
private String productSaleStatus;
private ProductSaleStatus productSaleStatus;
private ProductDetailFlower representativeFlower;
private List<ProductDetailFlower> flowers;

Expand Down Expand Up @@ -422,7 +423,7 @@ public static StoreProductDetail fromEntity(Product product, List<Flower> flower
.productDescriptionImage(product.getProductDescriptionImage())
.productSaleAmount(product.getProductSaleAmount())
.averageRating(product.getAverageRating())
.productSaleStatus(product.getProductSaleStatus().getMessage())
.productSaleStatus(product.getProductSaleStatus())
.representativeFlower(representativeFlower)
.flowers(flowerList)
.build();
Expand All @@ -440,7 +441,7 @@ public static class StoreProduct {
private Long productPrice;
private Long productSaleAmount;
private Double averageRating;
private String productSaleStatus;
private ProductSaleStatus productSaleStatus;

public static StoreProduct fromEntity(Product product, String representativeFlower) {
return StoreProduct.builder()
Expand All @@ -450,7 +451,7 @@ public static StoreProduct fromEntity(Product product, String representativeFlow
.productName(product.getProductName())
.productPrice(product.getProductPrice())
.productSaleAmount(product.getProductSaleAmount())
.productSaleStatus(product.getProductSaleStatus().getMessage())
.productSaleStatus(product.getProductSaleStatus())
.productThumbnail(product.getProductThumbnail())
.representativeFlower(representativeFlower)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ List<ProductFlowers> flowerRequestToFlowersList(
@Mapping(target = "productPrice", source = "product.productPrice"),
@Mapping(target = "reviewCount", source = "product.reviewCount"),
@Mapping(target = "averageRating", source = "product.averageRating"),
@Mapping(target = "productSaleStatus", source = "product.productSaleStatus"),
})
ProductListItem entityToListItem(Product product);

Expand Down

0 comments on commit 351316e

Please sign in to comment.