商品模块代码提交

This commit is contained in:
谭凯凯 2025-02-11 15:14:46 +08:00 committed by Tankaikai
parent 86cfeea71a
commit 142c927e97
4 changed files with 38 additions and 25 deletions

View File

@ -1,6 +1,12 @@
package com.czg.service.product.dto;
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 java.io.Serializable;
@ -19,33 +25,38 @@ public class ShopProdUnitDTO implements Serializable {
/**
* 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;
/**
* 小数位个数大于0表示小数据精度位数
*/
private Integer decimalsDigits;
/**
* 单位类型(weight代表重量小数单位为number代表个数)
* 单位类型 number-计数 weight-记重
*/
private String unitType;
/**
* 0后台添加 -1系统默认 公斤
* 单位来源 1-系统预设 0-商家创建
*/
private Integer isSystem;
/**
* 预留字段1-正常
* 状态 0-禁用 1-启用
*/
private Integer status;
/**
* 店铺Id
* 店铺id
*/
private String shopId;
/**
* 创建时间
*/
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
/**
* 更新时间
*/
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;

View File

@ -27,7 +27,7 @@ public class Product implements Serializable {
* id
*/
@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
*/
private Integer unitId;
private String shopId;
private Long unitId;
private Long shopId;
/**
* 商品名称
*/

View File

@ -26,7 +26,7 @@ public class ShopProdCategory implements Serializable {
* 自增id
*/
@Id(keyType = KeyType.Auto)
private Integer id;
private Long id;
/**
* 分类名称
*/
@ -46,7 +46,7 @@ public class ShopProdCategory implements Serializable {
/**
* 店铺Id
*/
private String shopId;
private Long shopId;
/**
* 是否显示1显示 0不显示
*/

View File

@ -26,31 +26,33 @@ public class ShopProdUnit implements Serializable {
* id
*/
@Id(keyType = KeyType.Auto)
private Integer id;
private Long id;
/**
* 单位名称
*/
private String name;
/**
* 小数位个数大于0表示小数据精度位数
*/
private Integer decimalsDigits;
/**
* 单位类型(weight代表重量小数单位为number代表个数)
* 单位类型 number-计数 weight-记重
*/
private String unitType;
/**
* 0后台添加 -1系统默认 公斤
* 单位来源 1-系统预设 0-商家创建
*/
private Integer isSystem;
/**
* 预留字段1-正常
* 状态 0-禁用 1-启用
*/
private Integer status;
/**
* 店铺Id
* 店铺id
*/
private String shopId;
private Long shopId;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
}