Commit f56d3948305aaf92b27f8f4b3dfe4f1d9b29a71b

Authored by puhui999
1 parent 668d493b

修改ProductSpuBaseVO第一版

yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuBaseVO.java
1 1 package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
2 2  
3 3 import cn.iocoder.yudao.framework.common.validation.InEnum;
  4 +import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO;
  5 +import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO;
  6 +import cn.iocoder.yudao.module.product.dal.dataobject.delivery.DeliveryTemplateDO;
  7 +import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO;
4 8 import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum;
  9 +import com.baomidou.mybatisplus.annotation.TableField;
  10 +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
5 11 import io.swagger.v3.oas.annotations.media.Schema;
6 12 import lombok.Data;
7 13  
... ... @@ -20,55 +26,128 @@ public class ProductSpuBaseVO {
20 26 @NotEmpty(message = "商品名称不能为空")
21 27 private String name;
22 28  
23   - @Schema(description = "商品编码", example = "yudaoyuanma")
24   - private String code;
  29 + @Schema(description = "关键字", required = true, example = "芋道")
  30 + @NotEmpty(message = "商品关键字不能为空")
  31 + private String keyword;
25 32  
26   - @Schema(description = "促销语", example = "好吃!")
27   - private String sellPoint;
  33 + @Schema(description = "商品简介", required = true, example = "芋道")
  34 + @NotEmpty(message = "商品简介不能为空")
  35 + private String introduction;
28 36  
29   - @Schema(description = "商品详情", required = true, example = "我是商品描述")
30   - @NotNull(message = "商品详情不能为空")
  37 + @Schema(description = "商品详情", required = true, example = "芋道")
  38 + @NotEmpty(message = "商品详情不能为空")
31 39 private String description;
32 40  
33   - @Schema(description = "商品分类编号", required = true, example = "1")
34   - @NotNull(message = "商品分类编号不能为空")
  41 + @Schema(description = "商品条码(一维码)", required = true, example = "芋道")
  42 + @NotEmpty(message = "商品条码(一维码)不能为空")
  43 + private String barCode;
  44 +
  45 + @Schema(description = "商品分类编号", required = true, example = "芋道")
  46 + @NotEmpty(message = "商品分类编号不能为空")
35 47 private Long categoryId;
36 48  
37   - @Schema(description = "商品品牌编号", example = "1")
  49 + @Schema(description = "商品品牌编号", required = true, example = "芋道")
  50 + @NotEmpty(message = "商品品牌编号不能为空")
38 51 private Long brandId;
39 52  
40   - @Schema(description = "商品图片的数组", required = true)
41   - @NotNull(message = "商品图片的数组不能为空")
42   - private List<String> picUrls;
  53 + @Schema(description = "商品封面图", required = true, example = "芋道")
  54 + @NotEmpty(message = "商品封面图不能为空")
  55 + private String picUrl;
  56 +
  57 + @Schema(description = "商品轮播图", required = true)
  58 + @NotEmpty(message = "商品轮播图不能为空")
  59 + private List<String> sliderPicUrls;
43 60  
44   - @Schema(description = "商品视频", required = true)
  61 + @Schema(description = "商品视频")
45 62 private String videoUrl;
46 63  
  64 + @Schema(description = "单位", required = true, example = "1")
  65 + @NotEmpty(message = "商品单位不能为空")
  66 + private Integer unit;
  67 +
47 68 @Schema(description = "排序字段", required = true, example = "1")
  69 + @NotEmpty(message = "商品排序字段不能为空")
48 70 private Integer sort;
49 71  
50 72 @Schema(description = "商品状态", required = true, example = "1")
51   - @NotNull(message = "商品状态不能为空")
52   - @InEnum(ProductSpuStatusEnum.class)
  73 + @NotEmpty(message = "商品状态不能为空")
53 74 private Integer status;
54 75  
55 76 // ========== SKU 相关字段 =========
56 77  
57   - @Schema(description = "规格类型", required = true, example = "1")
58   - @NotNull(message = "规格类型不能为空")
  78 + @Schema(description = "规格类型", required = true, example = "true")
  79 + @NotEmpty(message = "商品规格类型不能为空")
59 80 private Boolean specType;
60 81  
61   - @Schema(description = "是否展示库存", required = true, example = "true")
62   - @NotNull(message = "是否展示库存不能为空")
63   - private Boolean showStock;
  82 + @Schema(description = "商品价格", required = true, example = "1212")
  83 + @NotEmpty(message = "商品价格不能为空")
  84 + private Integer price;
64 85  
65   - @Schema(description = "市场价", example = "1024")
  86 + @Schema(description = "市场价", required = true, example = "3")
  87 + @NotEmpty(message = "商品市场价不能为空")
66 88 private Integer marketPrice;
67 89  
  90 + @Schema(description = "成本价", required = true, example = "12")
  91 + @NotEmpty(message = "商品成本价不能为空")
  92 + private Integer costPrice;
  93 +
  94 + @Schema(description = "库存", required = true, example = "111")
  95 + @NotEmpty(message = "商品库存不能为空")
  96 + private Integer stock;
  97 +
  98 + // ========== 物流相关字段 =========
  99 +
  100 + @Schema(description = "物流配置模板编号", required = true, example = "111")
  101 + @NotEmpty(message = "物流配置模板编号不能为空")
  102 + private Long deliveryTemplateId;
  103 +
  104 + // ========== 营销相关字段 =========
  105 +
  106 + @Schema(description = "是否热卖推荐", required = true, example = "true")
  107 + @NotEmpty(message = "商品推荐不能为空")
  108 + private Boolean recommendHot;
  109 +
  110 + @Schema(description = "是否优惠推荐", required = true, example = "true")
  111 + @NotEmpty(message = "商品推荐不能为空")
  112 + private Boolean recommendBenefit;
  113 +
  114 + @Schema(description = "是否精品推荐", required = true, example = "true")
  115 + @NotEmpty(message = "商品推荐不能为空")
  116 + private Boolean recommendBest;
  117 +
  118 + @Schema(description = "是否新品推荐", required = true, example = "true")
  119 + @NotEmpty(message = "商品推荐不能为空")
  120 + private Boolean recommendNew;
  121 +
  122 + @Schema(description = "是否优品推荐", required = true, example = "true")
  123 + @NotEmpty(message = "商品推荐不能为空")
  124 + private Boolean recommendGood;
  125 +
  126 + @Schema(description = "赠送积分", required = true, example = "111")
  127 + @NotEmpty(message = "商品赠送积分不能为空")
  128 + private Integer giveIntegral;
  129 +
  130 + @Schema(description = "赠送的优惠劵编号的数组")
  131 + private List<Long> giveCouponTemplateIds;
  132 +
  133 + @Schema(description = "分销类型")
  134 + private Boolean subCommissionType;
  135 +
  136 + @Schema(description = "活动展示顺序")
  137 + private List<Integer> activityOrders;
  138 +
68 139 // ========== 统计相关字段 =========
69 140  
70   - @Schema(description = "虚拟销量", required = true, example = "1024")
71   - @NotNull(message = "虚拟销量不能为空")
  141 + @Schema(description = "商品销量", required = true, example = "芋道")
  142 + @NotEmpty(message = "商品销量不能为空")
  143 + private Integer salesCount;
  144 +
  145 + @Schema(description = "虚拟销量", required = true, example = "芋道")
  146 + @NotEmpty(message = "商品虚拟销量不能为空")
72 147 private Integer virtualSalesCount;
73 148  
  149 + @Schema(description = "浏览量", required = true, example = "芋道")
  150 + @NotEmpty(message = "商品浏览量不能为空")
  151 + private Integer browseCount;
  152 +
74 153 }
... ...