Commit b77959fa by HuAnYing

产品dto

parent 65aef922
package com.jomalls.custom.app.dto.product; package com.jomalls.custom.app.dto.product;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Digits; import jakarta.validation.constraints.Digits;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size; import jakarta.validation.constraints.Size;
import lombok.Data; import lombok.Data;
import org.aspectj.bridge.IMessage;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
...@@ -32,7 +32,6 @@ public class CustomProductInfoDto implements Serializable { ...@@ -32,7 +32,6 @@ public class CustomProductInfoDto implements Serializable {
/** /**
* sku * sku
*/ */
@TableField("sku")
@Schema(description = "sku", example = "JM260602001") @Schema(description = "sku", example = "JM260602001")
@Size(max = 20, message = "sku长度不能超过20个字符") @Size(max = 20, message = "sku长度不能超过20个字符")
private String sku; private String sku;
...@@ -40,7 +39,6 @@ public class CustomProductInfoDto implements Serializable { ...@@ -40,7 +39,6 @@ public class CustomProductInfoDto implements Serializable {
/** /**
* *
*/ */
@TableField("title")
@Schema(description = "title", example = "") @Schema(description = "title", example = "")
@Size(max = 255, message = "title长度不能超过255个字符") @Size(max = 255, message = "title长度不能超过255个字符")
private String title; private String title;
...@@ -48,62 +46,43 @@ public class CustomProductInfoDto implements Serializable { ...@@ -48,62 +46,43 @@ public class CustomProductInfoDto implements Serializable {
/** /**
* 商品名称 * 商品名称
*/ */
@TableField("name")
@Schema(description = "name", example = "") @Schema(description = "name", example = "")
@NotNull(message= "商品名称不能为空")
@Size(max = 255, message = "sku长度不能超过255个字符") @Size(max = 255, message = "sku长度不能超过255个字符")
private String name; private String name;
/**
* 所属客户
*/
@TableField("namespace")
private String namespace;
/**
* 所属工厂
*/
@TableField("affiliated_factory")
private Integer affiliatedFactory;
/**
* 第三方SKU
*/
@TableField("third_sku")
private String thirdSku;
/** /**
* 商品主图 * 商品主图
*/ */
@TableField("img_url")
@Schema(description = "图片主图", example = "") @Schema(description = "图片主图", example = "")
@NotBlank(message = "商品主图不能为空")
@Size(max = 255, message = "图片主图长度不能超过255个字符") @Size(max = 255, message = "图片主图长度不能超过255个字符")
private String imgUrl; private String imgUrl;
/** /**
* 商品类别ID * 商品类别ID
*/ */
@TableField("category_id")
@Schema(description = "商品类别ID", example = "") @Schema(description = "商品类别ID", example = "")
@NotBlank(message = "商品类别不能为空")
private Integer categoryId; private Integer categoryId;
/** /**
* 重量kg * 重量kg
*/ */
@TableField("weight")
@Schema(description = "重量(kg)", example = "") @Schema(description = "重量(kg)", example = "")
@NotNull(message= "重量不能为空")
@Digits(integer = 15, fraction = 2, message = "重量(kg)数值最多保留2位小数") @Digits(integer = 15, fraction = 2, message = "重量(kg)数值最多保留2位小数")
private BigDecimal weight; private BigDecimal weight;
/** /**
* 最小采购量 * 最小采购量
*/ */
@TableField("purchasing_min")
@Schema(description = "最小采购量", example = "") @Schema(description = "最小采购量", example = "")
private Integer purchasingMin; private Integer purchasingMin;
/** /**
* 工厂价(¥) * 工厂价(¥)
*/ */
@TableField("factory_price")
@Schema(description = "工厂价(¥)", example = "") @Schema(description = "工厂价(¥)", example = "")
@Digits(integer = 15, fraction = 2, message = "工厂价数值最多保留2位小数") @Digits(integer = 15, fraction = 2, message = "工厂价数值最多保留2位小数")
private BigDecimal factoryPrice; private BigDecimal factoryPrice;
...@@ -111,7 +90,6 @@ public class CustomProductInfoDto implements Serializable { ...@@ -111,7 +90,6 @@ public class CustomProductInfoDto implements Serializable {
/** /**
* 销售价(¥) * 销售价(¥)
*/ */
@TableField("sales_price")
@Schema(description = "销售价(¥)", example = "") @Schema(description = "销售价(¥)", example = "")
@Digits(integer = 15, fraction = 2, message = "销售价数值最多保留2位小数") @Digits(integer = 15, fraction = 2, message = "销售价数值最多保留2位小数")
private BigDecimal salesPrice; private BigDecimal salesPrice;
...@@ -119,7 +97,6 @@ public class CustomProductInfoDto implements Serializable { ...@@ -119,7 +97,6 @@ public class CustomProductInfoDto implements Serializable {
/** /**
* 销售价最大值(¥) * 销售价最大值(¥)
*/ */
@TableField("sales_price_max")
@Schema(description = "销售价最高价(¥)", example = "") @Schema(description = "销售价最高价(¥)", example = "")
@Digits(integer = 15, fraction = 2, message = "销售价最高价数值最多保留2位小数") @Digits(integer = 15, fraction = 2, message = "销售价最高价数值最多保留2位小数")
private BigDecimal salesPriceMax; private BigDecimal salesPriceMax;
...@@ -127,103 +104,99 @@ public class CustomProductInfoDto implements Serializable { ...@@ -127,103 +104,99 @@ public class CustomProductInfoDto implements Serializable {
/** /**
* 1待上架 10已上架 20已下架 30待下架 40已作废 * 1待上架 10已上架 20已下架 30待下架 40已作废
*/ */
@TableField("status")
@Schema(description = "状态:1待上架 10已上架 20已下架 30待下架 40已作废", example = "") @Schema(description = "状态:1待上架 10已上架 20已下架 30待下架 40已作废", example = "")
private Integer status; private Integer status;
/** /**
* 挂起前的状态 * 挂起前的状态
*/ */
@TableField("pre_suspend_status")
private Integer preSuspendStatus; private Integer preSuspendStatus;
/** /**
* *
*/ */
@TableField("property1_cate_id") @Schema(description = "商品属性ID 1", example = "")
@NotNull(message= "商品属性不能为空")
private Integer property1CateId; private Integer property1CateId;
/** /**
* *
*/ */
@TableField("property2_cate_id") @Schema(description = "商品属性ID 2", example = "")
private Integer property2CateId; private Integer property2CateId;
/** /**
* *
*/ */
@TableField("property3_cate_id") @Schema(description = "商品属性ID 3", example = "")
private Integer property3CateId; private Integer property3CateId;
/** /**
* *
*/ */
@TableField("property1_enname") @Schema(description = "商品属性英文名称 1", example = "")
@NotNull(message= "商品属性名不能为空")
private String property1Enname; private String property1Enname;
/** /**
* *
*/ */
@TableField("property2_enname") @Schema(description = "商品属性英文名称 2", example = "")
private String property2Enname; private String property2Enname;
/** /**
* *
*/ */
@TableField("property3_enname") @Schema(description = "商品属性英文名称 3", example = "")
private String property3Enname; private String property3Enname;
/** /**
* 颜色图 * 颜色图
*/ */
@TableField("color_images")
@Schema(description = "颜色图", example = "") @Schema(description = "颜色图", example = "")
private String colorImages; private String colorImages;
/** /**
* 材质 * 材质
*/ */
@TableField("material")
@Schema(description = "材质", example = "") @Schema(description = "材质", example = "")
@Size(max = 20, message = "货号长度不能超过20个字符") @NotNull(message= "材质不能为空")
private String material; private String material;
/** /**
* 印花类型 0满印 1局部印 * 印花类型 0满印 1局部印
*/ */
@TableField("print_type")
@Schema(description = "印花类型 0满印 1局部印", example = "") @Schema(description = "印花类型 0满印 1局部印", example = "")
private Integer printType; private Integer printType;
/** /**
* 货号 * 货号
*/ */
@TableField("product_no") @Schema(description = "货号", example = "")
@Schema(description = "product_no", example = "")
@Size(max = 20, message = "货号长度不能超过20个字符") @Size(max = 20, message = "货号长度不能超过20个字符")
private String productNo; private String productNo;
/** /**
* 产地code * 产地code
*/ */
@TableField("origin_code") @Schema(description = "产地code", example = "")
@Schema(description = "origin_code", example = "") @NotNull(message= "产地不能为空")
@Size(max = 20, message = "产地编码长度不能超过20个字符") @Size(max = 20, message = "产地编码长度不能超过20个字符")
private String originCode; private String originCode;
/** /**
* 产地中文名字 * 产地中文名字
*/ */
@TableField("origin_name_cn") @Schema(description = "产地中文名字", example = "")
@Schema(description = "origin_name_cn", example = "") @NotNull(message= "产地中文名字不能为空")
@Size(max = 20, message = "产地中文名字长度不能超过20个字符") @Size(max = 20, message = "产地中文名字长度不能超过20个字符")
private String originNameCn; private String originNameCn;
/** /**
* 产地英文名字 * 产地英文名字
*/ */
@TableField("origin_name_en") @Schema(description = "产地英文名字", example = "")
@Schema(description = "origin_name_en", example = "") @NotNull(message= "产地英文名字不能为空")
@Size(max = 20, message = "产地英文名字长度不能超过20个字符") @Size(max = 20, message = "产地英文名字长度不能超过20个字符")
private String originNameEn; private String originNameEn;
...@@ -231,60 +204,40 @@ public class CustomProductInfoDto implements Serializable { ...@@ -231,60 +204,40 @@ public class CustomProductInfoDto implements Serializable {
* 币种code * 币种code
*/ */
@TableField("currency_code") @Schema(description = "币种编码", example = "")
@Schema(description = "currency_code", example = "") @NotNull(message= "币种名字不能为空")
@Size(max = 20, message = "币种编码长度不能超过20个字符") @Size(max = 20, message = "币种编码长度不能超过20个字符")
private String currencyCode; private String currencyCode;
/** /**
* 币种 * 币种
*/ */
@TableField("currency_name")
@Schema(description = "currency_name", example = "") @Schema(description = "currency_name", example = "")
@NotNull(message= "币种名字不能为空")
@Size(max = 20, message = "币种名称长度不能超过20个字符") @Size(max = 20, message = "币种名称长度不能超过20个字符")
private String currencyName; private String currencyName;
/** /**
* 平台直营-platform 客户自营-customer * 平台直营-platform 客户自营-customer
*/ */
@TableField("product_type")
@Schema(description = "平台直营-platform 客户自营-customer", example = "") @Schema(description = "平台直营-platform 客户自营-customer", example = "")
@NotNull(message= "产品类型不能为空")
private String productType; private String productType;
/** /**
* 工厂id * 工厂id
*/ */
@TableField("factory_id") @Schema(description = "工厂ID", example = "")
@NotNull(message= "工厂ID不能为空")
private Integer factoryId; private Integer factoryId;
/** /**
* 工厂编码
*/
@TableField("factory_code")
private String factoryCode;
/**
* 是否九猫处理 * 是否九猫处理
*/ */
@TableField("processing")
@Schema(description = "是否九猫处理", example = "") @Schema(description = "是否九猫处理", example = "")
private Boolean processing; private Boolean processing;
/** /**
* 创建时间
*/
@TableField("create_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
/**
*
*/
@TableField("update_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
/**
* *
*/ */
@TableField("sort") @TableField("sort")
...@@ -293,13 +246,10 @@ public class CustomProductInfoDto implements Serializable { ...@@ -293,13 +246,10 @@ public class CustomProductInfoDto implements Serializable {
/** /**
* 默认模ID * 默认模ID
*/ */
@TableField("diy_id") @Schema(description = "模型ID", example = "")
private Integer diyId; private Integer diyId;
/** // @Schema(description = "商品明细", implementation = ProductChangeDTO.class)
* 默认模SKU // private ProductChangeDTO productChange;
*/
@TableField("diy_sku")
private String diySku;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment