Repick-official / repick-server-v2

🌏 지속가능한 패션문화, Repick 🌏
3 stars 0 forks source link

Fix: rejected product metadata #122

Closed mushroom1324 closed 2 months ago

mushroom1324 commented 2 months ago

Closes #121 .

[Fix] 가격 설정 페이지 api rejected 상품 상품명, 브랜드 등 메타데이터 입력

📝 Description

  1. 람다 함수 수정
            if pd.notnull(row['is_rejected']):
                # Process rejected products
                post_product = {
                    "userId": row['user_id'],
                    "clothingSalesCount": row['clothing_sales_count'],
                    "productCode": product_code,
                    "productName": row['product_name'], # 추가됨
                    "brandName": row['brand_name'], # 추가됨 
                    "isRejected": "true"
                }
  1. PostProduct.java: toRejectedProduct 수정
    public Product toRejectedProduct(User user, ClothingSales clothingSales) {
        return Product.builder()
                .user(user)
                .clothingSales(clothingSales)
                .clothingSalesCount(this.clothingSalesCount())
                .productCode(this.productCode())
                .productName(this.productName()) # 추가됨
                .brandName(this.brandName()) # 추가됨
                .productState(ProductStateType.REJECTED)
                .build();
    }