2026-06-24 f4bd1f3c89d906131495a0aca5aaf82966378510
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
 
import java.util.List;
 
@Schema(description = "管理后台 - 商品 SKU 创建/更新 Request VO")
@Data
public class ProductSkuSaveReqVO {
 
    @Schema(description = "商品 SKU 名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉小短袖")
    @NotEmpty(message = "商品 SKU 名字不能为空")
    private String name;
 
    @Schema(description = "销售价格,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1999")
    @NotNull(message = "销售价格,单位:分不能为空")
    private Integer price;
 
    @Schema(description = "市场价", example = "2999")
    private Integer marketPrice;
 
    @Schema(description = "成本价", example = "19")
    private Integer costPrice;
 
    @Schema(description = "条形码", example = "15156165456")
    private String barCode;
 
    @Schema(description = "图片地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xx.png")
    @NotNull(message = "图片地址不能为空")
    private String picUrl;
 
    @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "200")
    @NotNull(message = "库存不能为空")
    private Integer stock;
 
    @Schema(description = "商品重量,单位:kg 千克", example = "1.2")
    private Double weight;
 
    @Schema(description = "商品体积,单位:m^3 平米", example = "2.5")
    private Double volume;
 
    @Schema(description = "一级分销的佣金,单位:分", example = "199")
    private Integer firstBrokeragePrice;
 
    @Schema(description = "二级分销的佣金,单位:分", example = "19")
    private Integer secondBrokeragePrice;
 
    @Schema(description = "属性数组")
    private List<Property> properties;
 
    @Schema(description = "商品属性")
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Property {
 
        @Schema(description = "属性编号", example = "10")
        private Long propertyId;
 
        @Schema(description = "属性名字", example = "颜色")
        private String propertyName;
 
        @Schema(description = "属性值编号", example = "10")
        private Long valueId;
 
        @Schema(description = "属性值名字", example = "红色")
        private String valueName;
 
    }
 
}