Skip to content

Commit

Permalink
Fix: QA 수정사항 반영 (#128)
Browse files Browse the repository at this point in the history
* fix: remove unused fields on GetProductByClothingSalesDto

* fix: delete productName on rejectedProduct

* feature: add isBagCollectReqeusted
  • Loading branch information
mushroom1324 authored Aug 2, 2024
1 parent 7405658 commit 7f18fe8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.example.repick.domain.clothingSales.entity.BoxCollect;
import com.example.repick.domain.clothingSales.entity.ClothingSales;
import com.example.repick.domain.clothingSales.entity.ClothingSalesStateType;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;
Expand All @@ -11,6 +12,7 @@ public record GetPendingClothingSales(
@Schema(description = "수거 ID", example = "1") Long id,
@Schema(description = "옷장 정리 회차", example = "1") Integer clothingSalesCount,
@Schema(description = "박스 수거 여부 true: 박스 수거, false: 리픽백 수거") boolean isBoxCollect,
@Schema(description = "리픽백 수거 요청 여부 true: 수거 요청, false: 수거 미요청") boolean isBagCollectReqeusted,
@Schema(description = "신청 완료일") LocalDateTime requestDate,
@Schema(description = "수거 완료일") LocalDateTime collectDate,
@Schema(description = "상품 촬영일") LocalDateTime shootDate,
Expand All @@ -21,6 +23,7 @@ public static GetPendingClothingSales of(ClothingSales clothingSales, LocalDateT
clothingSales.getId(),
clothingSales.getClothingSalesCount(),
clothingSales instanceof BoxCollect,
!ClothingSalesStateType.BEFORE_COLLECTION.contains(clothingSales.getClothingSalesState()),
requestDate,
collectDate,
shootDate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ public record GetProductByClothingSalesDto (
@Schema(description = "상품 상태", example = "판매준비중") ProductStateType productState,
@Schema(description = "상품명", example = "샤넬 빈티지 체크 남방") String productName,
@Schema(description = "브랜드 이름", example = "무인양품") String brandName,
@Schema(description = "제안가", example = "40000") Long suggestedPrice,
@Schema(description = "상품 가격", example = "40000") Long price,
@Schema(description = "할인 가격", example = "15000") Long discountPrice,
@Schema(description = "할인율",example = "30") Long discountRate,
@Schema(description = "예측 정가 대비 할인율",example = "30") Long predictDiscountRate
@Schema(description = "제안가", example = "40000") Long suggestedPrice
) {
public static GetProductByClothingSalesDto of(Product product) {
return new GetProductByClothingSalesDto(
Expand All @@ -23,11 +19,7 @@ public static GetProductByClothingSalesDto of(Product product) {
product.getProductState(),
product.getProductName(),
product.getBrandName(),
product.getSuggestedPrice(),
product.getPrice(),
product.getDiscountPrice(),
product.getDiscountRate(),
product.getPredictPriceDiscountRate()
product.getSuggestedPrice()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public Product toRejectedProduct(User user, ClothingSales clothingSales) {
.clothingSales(clothingSales)
.clothingSalesCount(this.clothingSalesCount())
.productCode(this.productCode())
.productName(this.productName())
.brandName(this.brandName())
.productState(ProductStateType.REJECTED)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,7 @@ public List<GetProductByClothingSalesDto> findProductDtoByClothingSalesId(long c
product.productState,
product.productName,
product.brandName,
product.suggestedPrice,
product.price,
product.discountPrice,
product.discountRate,
product.predictPriceDiscountRate))
product.suggestedPrice))
.from(product)
.leftJoin(productState).on(product.id.eq(productState.productId))
.where(product.clothingSales.id.eq(clothingSalesId)
Expand Down

0 comments on commit 7f18fe8

Please sign in to comment.