商品模块代码提交
This commit is contained in:
parent
86cfeea71a
commit
142c927e97
|
|
@ -1,6 +1,12 @@
|
||||||
package com.czg.service.product.dto;
|
package com.czg.service.product.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
|
import com.czg.validator.group.DefaultGroup;
|
||||||
|
import com.czg.validator.group.InsertGroup;
|
||||||
|
import com.czg.validator.group.UpdateGroup;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Null;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
@ -19,33 +25,38 @@ public class ShopProdUnitDTO implements Serializable {
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Integer id;
|
@Null(message = "ID必须为空}", groups = InsertGroup.class)
|
||||||
|
@NotNull(message = "ID不能为空", groups = UpdateGroup.class)
|
||||||
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 单位名称
|
* 单位名称
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "单位名称不能为空", groups = DefaultGroup.class)
|
||||||
private String name;
|
private String name;
|
||||||
/**
|
/**
|
||||||
* 小数位(个数大于0,表示小数据精度位数)
|
* 单位类型 number-计数 weight-记重
|
||||||
*/
|
|
||||||
private Integer decimalsDigits;
|
|
||||||
/**
|
|
||||||
* 单位类型(weight代表重量,小数单位,为number代表个数)
|
|
||||||
*/
|
*/
|
||||||
private String unitType;
|
private String unitType;
|
||||||
/**
|
/**
|
||||||
* 0后台添加 -1系统默认 (公斤、瓶)
|
* 单位来源 1-系统预设 0-商家创建
|
||||||
*/
|
*/
|
||||||
private Integer isSystem;
|
private Integer isSystem;
|
||||||
/**
|
/**
|
||||||
* 预留字段1-正常
|
* 状态 0-禁用 1-启用
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
private Integer status;
|
||||||
/**
|
/**
|
||||||
* 店铺Id
|
* 店铺id
|
||||||
*/
|
*/
|
||||||
private String shopId;
|
private String shopId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public class Product implements Serializable {
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@Id(keyType = KeyType.Auto)
|
@Id(keyType = KeyType.Auto)
|
||||||
private Integer id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 商品分类
|
* 商品分类
|
||||||
*/
|
*/
|
||||||
|
|
@ -35,12 +35,12 @@ public class Product implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 商品规格
|
* 商品规格
|
||||||
*/
|
*/
|
||||||
private Integer specId;
|
private Long specId;
|
||||||
/**
|
/**
|
||||||
* 单位Id
|
* 单位Id
|
||||||
*/
|
*/
|
||||||
private Integer unitId;
|
private Long unitId;
|
||||||
private String shopId;
|
private Long shopId;
|
||||||
/**
|
/**
|
||||||
* 商品名称
|
* 商品名称
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class ShopProdCategory implements Serializable {
|
||||||
* 自增id
|
* 自增id
|
||||||
*/
|
*/
|
||||||
@Id(keyType = KeyType.Auto)
|
@Id(keyType = KeyType.Auto)
|
||||||
private Integer id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 分类名称
|
* 分类名称
|
||||||
*/
|
*/
|
||||||
|
|
@ -46,7 +46,7 @@ public class ShopProdCategory implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 店铺Id
|
* 店铺Id
|
||||||
*/
|
*/
|
||||||
private String shopId;
|
private Long shopId;
|
||||||
/**
|
/**
|
||||||
* 是否显示:1显示 0不显示
|
* 是否显示:1显示 0不显示
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -26,31 +26,33 @@ public class ShopProdUnit implements Serializable {
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@Id(keyType = KeyType.Auto)
|
@Id(keyType = KeyType.Auto)
|
||||||
private Integer id;
|
private Long id;
|
||||||
/**
|
/**
|
||||||
* 单位名称
|
* 单位名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
/**
|
/**
|
||||||
* 小数位(个数大于0,表示小数据精度位数)
|
* 单位类型 number-计数 weight-记重
|
||||||
*/
|
|
||||||
private Integer decimalsDigits;
|
|
||||||
/**
|
|
||||||
* 单位类型(weight代表重量,小数单位,为number代表个数)
|
|
||||||
*/
|
*/
|
||||||
private String unitType;
|
private String unitType;
|
||||||
/**
|
/**
|
||||||
* 0后台添加 -1系统默认 (公斤、瓶)
|
* 单位来源 1-系统预设 0-商家创建
|
||||||
*/
|
*/
|
||||||
private Integer isSystem;
|
private Integer isSystem;
|
||||||
/**
|
/**
|
||||||
* 预留字段1-正常
|
* 状态 0-禁用 1-启用
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
private Integer status;
|
||||||
/**
|
/**
|
||||||
* 店铺Id
|
* 店铺id
|
||||||
*/
|
*/
|
||||||
private String shopId;
|
private Long shopId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue