zepengdev
2025-06-14 6e0a83c55db4bae4d23a4c281946bda1d610f678
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.oying.modules.pc.product.converter;
 
import cn.hutool.core.collection.ListUtil;
import com.oying.modules.pc.product.domain.ProductImage;
import com.oying.modules.pc.product.domain.ProductLabel;
import com.oying.modules.pc.product.domain.dto.ProductImageCreateRequest;
import com.oying.modules.pc.product.domain.dto.ProductImageUpdateRequest;
import com.oying.modules.pc.product.domain.dto.ProductLabelCreateRequest;
import com.oying.modules.pc.utils.ImageUtils;
 
import java.util.List;
import java.util.Optional;
 
public class ProductLabelAssembler {
 
    public static ProductLabel to(ProductLabelCreateRequest request) {
        ProductLabel productLabel = new ProductLabel();
        productLabel.setProductId(request.getProductId());
        productLabel.setCategoryName(request.getCategoryName());
        productLabel.setLabelName(request.getLabelName());
        productLabel.setLabelValue(request.getLabelValue());
        productLabel.setUnit(request.getUnit());
        return productLabel;
    }
 
}