商品模块代码提交
This commit is contained in:
@@ -62,4 +62,9 @@ public class ConsGroupDTO implements Serializable {
|
||||
*/
|
||||
private List<Long> consIds;
|
||||
|
||||
/**
|
||||
* 耗材集合
|
||||
*/
|
||||
private List<ConsInfoDTO> consInfoList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.czg.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.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 耗材信息
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 1.0 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
public class ConsInfoDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Null(message = "ID必须为空", groups = InsertGroup.class)
|
||||
@NotNull(message = "ID不能为空", groups = UpdateGroup.class)
|
||||
private Long id;
|
||||
/**
|
||||
* 耗材分组id
|
||||
*/
|
||||
@NotNull(message = "耗材分组id不能为空", groups = DefaultGroup.class)
|
||||
private Long consGroupId;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 耗材名称
|
||||
*/
|
||||
@NotBlank(message = "耗材名称不能为空", groups = DefaultGroup.class)
|
||||
private String conName;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
@NotNull(message = "价格不能为空", groups = DefaultGroup.class)
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 库存值
|
||||
*/
|
||||
private BigDecimal stockNumber;
|
||||
/**
|
||||
* 状态 1 启用 0 禁用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 单位值
|
||||
*/
|
||||
@NotBlank(message = "单位不能为空", groups = DefaultGroup.class)
|
||||
private String conUnit;
|
||||
/**
|
||||
* 耗材预警值
|
||||
*/
|
||||
private BigDecimal conWarning;
|
||||
/**
|
||||
* 是否检测耗材: 1 检测 0 不检测
|
||||
*/
|
||||
private Integer isStock;
|
||||
/**
|
||||
* 第二单位
|
||||
*/
|
||||
private String conUnitTwo;
|
||||
/**
|
||||
* 第二单位转换数量
|
||||
*/
|
||||
private BigDecimal conUnitTwoConvert;
|
||||
/**
|
||||
* 默认入库单位
|
||||
*/
|
||||
private String defaultUnit;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 开始时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String beginTime;
|
||||
/**
|
||||
* 结束时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.czg.product.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 耗材信息
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 1.0 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@Table("tb_cons_info")
|
||||
public class ConsInfo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
/**
|
||||
* 耗材分组id
|
||||
*/
|
||||
private Long consGroupId;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 耗材名称
|
||||
*/
|
||||
private String conName;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 库存值
|
||||
*/
|
||||
private BigDecimal stockNumber;
|
||||
/**
|
||||
* 状态 1 启用 0 禁用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 单位值
|
||||
*/
|
||||
private String conUnit;
|
||||
/**
|
||||
* 耗材预警值
|
||||
*/
|
||||
private BigDecimal conWarning;
|
||||
/**
|
||||
* 是否检测耗材: 1 检测 0 不检测
|
||||
*/
|
||||
private Integer isStock;
|
||||
/**
|
||||
* 第二单位
|
||||
*/
|
||||
private String conUnitTwo;
|
||||
/**
|
||||
* 第二单位转换数量
|
||||
*/
|
||||
private BigDecimal conUnitTwoConvert;
|
||||
/**
|
||||
* 默认入库单位
|
||||
*/
|
||||
private String defaultUnit;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.czg.product.service;
|
||||
|
||||
import com.czg.product.dto.ConsInfoDTO;
|
||||
import com.czg.product.entity.ConsInfo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 耗材信息
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 1.0 2025-02-20
|
||||
*/
|
||||
public interface ConsInfoService extends IService<ConsInfo> {
|
||||
Page<ConsInfoDTO> getConsInfoPage(ConsInfoDTO param);
|
||||
|
||||
List<ConsInfoDTO> getConsInfoList(ConsInfoDTO param);
|
||||
|
||||
ConsInfoDTO getConsInfoById(Long id);
|
||||
|
||||
boolean addConsInfo(ConsInfoDTO dto);
|
||||
|
||||
boolean updateConsInfo(ConsInfoDTO dto);
|
||||
|
||||
boolean deleteConsInfo(Long id);
|
||||
|
||||
boolean disableConsInfo(Long id);
|
||||
|
||||
boolean enableConsInfo(Long id);
|
||||
|
||||
boolean onOffConsInfo(Long id, Integer isStock);
|
||||
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.czg.product.service;
|
||||
|
||||
import com.czg.product.dto.ProdSkuDTO;
|
||||
import com.czg.product.entity.ProdSku;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品SKU
|
||||
*
|
||||
@@ -14,20 +10,5 @@ import java.util.List;
|
||||
* @since 1.0 2025-02-16
|
||||
*/
|
||||
public interface ProdSkuService extends IService<ProdSku> {
|
||||
Page<ProdSkuDTO> getProdSkuPage(ProdSkuDTO param);
|
||||
|
||||
List<ProdSkuDTO> getProdSkuList(ProdSkuDTO param);
|
||||
|
||||
ProdSkuDTO getProdSkuById(Long id);
|
||||
|
||||
boolean addProdSku(ProdSkuDTO dto);
|
||||
|
||||
boolean deleteProdSku(Long id);
|
||||
|
||||
boolean updateProdSku(ProdSkuDTO dto);
|
||||
|
||||
boolean disableProdSku(Long id);
|
||||
|
||||
boolean enableProdSku(Long id);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user