tb_product
删除 库存警戒线 库存开关 库存数量 新增 是否自动售罄 标识 tb_shop_prod_category 新增 refund_mode 退菜是否退库存 tb_shop_config 新增 refund_mode 退菜退库存模式 删除 扣除库存模式
This commit is contained in:
@@ -1,89 +0,0 @@
|
||||
|
||||
package com.czg.account.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import java.io.Serial;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 商品分类 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ShopProdCategoryDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 上级分类id-为0则表示是顶级
|
||||
*/
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 店铺Id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
private String detail;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 关键词
|
||||
*/
|
||||
private String keyWord;
|
||||
|
||||
/**
|
||||
* 状态 0-禁用 1-启用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -288,6 +288,10 @@ public class ShopInfoEditDTO {
|
||||
* 数签子
|
||||
*/
|
||||
private Integer isCountStick;
|
||||
/**
|
||||
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
||||
*/
|
||||
private Integer refundMode;
|
||||
|
||||
/**
|
||||
* 企业id
|
||||
|
||||
@@ -135,6 +135,10 @@ public class ShopConfig implements Serializable {
|
||||
* 数签子
|
||||
*/
|
||||
private Integer isCountStick;
|
||||
/**
|
||||
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
||||
*/
|
||||
private Integer refundMode;
|
||||
|
||||
|
||||
private String dingAppKey;
|
||||
|
||||
@@ -361,6 +361,11 @@ public class ShopInfo implements Serializable {
|
||||
*/
|
||||
@Column(ignore = true)
|
||||
private Integer isCountStick;
|
||||
/**
|
||||
* 退菜退库存模式 1跟随商品分类 2 跟随单商品
|
||||
*/
|
||||
@Column(ignore = true)
|
||||
private Integer refundMode;
|
||||
|
||||
/**
|
||||
* 运营端余额
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
package com.czg.account.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 商品分类 实体类。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("tb_shop_prod_category")
|
||||
public class ShopProdCategory implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
private String shortName;
|
||||
|
||||
/**
|
||||
* 上级分类id-为0则表示是顶级
|
||||
*/
|
||||
private Long pid;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 店铺Id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
private String detail;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 关键词
|
||||
*/
|
||||
private String keyWord;
|
||||
|
||||
/**
|
||||
* 状态 0-禁用 1-启用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.czg.account.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.account.entity.ShopProdCategory;
|
||||
|
||||
/**
|
||||
* 商品分类 服务层。
|
||||
*
|
||||
* @author zs
|
||||
* @since 2025-02-20
|
||||
*/
|
||||
public interface ShopProdCategoryService extends IService<ShopProdCategory> {
|
||||
|
||||
}
|
||||
@@ -108,10 +108,6 @@ public class ProductDTO implements Serializable {
|
||||
* 套餐内容
|
||||
*/
|
||||
private Object groupSnap;
|
||||
/**
|
||||
* 库存警戒线
|
||||
*/
|
||||
private Integer warnLine;
|
||||
/**
|
||||
* 称重 价格/千克
|
||||
*/
|
||||
@@ -164,14 +160,14 @@ public class ProductDTO implements Serializable {
|
||||
* 是否售罄
|
||||
*/
|
||||
private Integer isSoldStock;
|
||||
/**
|
||||
* 是否自动售罄
|
||||
*/
|
||||
private Integer isAutoSoldStock;
|
||||
/**
|
||||
* 团购卷分类,可有多个分类
|
||||
*/
|
||||
private String groupCategoryId;
|
||||
/**
|
||||
* 商品级库存数量
|
||||
*/
|
||||
private Integer stockNumber;
|
||||
/**
|
||||
* 是否上架
|
||||
*/
|
||||
|
||||
@@ -80,4 +80,8 @@ public class ShopProdCategoryDTO implements Serializable {
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 退菜是否退库存 1退菜退库存 2仅退菜不退库存 3每次询问-退菜后弹窗提示
|
||||
*/
|
||||
private Integer refundMode;
|
||||
}
|
||||
@@ -83,10 +83,6 @@ public class Product implements Serializable {
|
||||
*/
|
||||
private String groupSnap;
|
||||
/**
|
||||
* 库存警戒线
|
||||
*/
|
||||
private Integer warnLine;
|
||||
/**
|
||||
* 称重 价格/千克
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
@@ -119,9 +115,9 @@ public class Product implements Serializable {
|
||||
*/
|
||||
private Integer isHot;
|
||||
/**
|
||||
* 是否开启库存
|
||||
* 是否自动售罄
|
||||
*/
|
||||
private Integer isStock;
|
||||
private Integer isAutoSoldStock;
|
||||
/**
|
||||
* 是否售罄
|
||||
*/
|
||||
@@ -131,10 +127,6 @@ public class Product implements Serializable {
|
||||
*/
|
||||
private String groupCategoryId;
|
||||
/**
|
||||
* 商品库存数量
|
||||
*/
|
||||
private Integer stockNumber;
|
||||
/**
|
||||
* 是否上架
|
||||
*/
|
||||
private Integer isSale;
|
||||
|
||||
@@ -68,6 +68,10 @@ public class ShopProdCategory implements Serializable {
|
||||
* 状态 0-禁用 1-启用
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 退菜是否退库存 1退菜退库存 2仅退菜不退库存 3每次询问-退菜后弹窗提示
|
||||
*/
|
||||
private Integer refundMode;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.czg.product.param;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.czg.validator.group.DefaultGroup;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品修改库存
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 1.0 2025-02-16
|
||||
*/
|
||||
@Data
|
||||
public class ProductModifyStockParam implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "ID不能为空", groups = DefaultGroup.class)
|
||||
private Long id;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
@NotNull(message = "库存数量不能为空", groups = DefaultGroup.class)
|
||||
@Min(value = 0, message = "库存数量不能小于0", groups = DefaultGroup.class)
|
||||
@Max(value = Integer.MAX_VALUE, message = "库存数量不能大于" + Integer.MAX_VALUE, groups = DefaultGroup.class)
|
||||
private Integer stockNumber;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
private Long shopId;
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package com.czg.product.service;
|
||||
|
||||
import com.czg.product.dto.ProductDTO;
|
||||
import com.czg.product.entity.Product;
|
||||
import com.czg.product.entity.ProductStockFlow;
|
||||
import com.czg.product.param.*;
|
||||
import com.czg.product.vo.ProductStatisticsVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
@@ -71,13 +70,6 @@ public interface ProductService extends IService<Product> {
|
||||
*/
|
||||
void updateProduct(ProductDTO dto);
|
||||
|
||||
/**
|
||||
* 修改商品库存数量
|
||||
*
|
||||
* @param param 商品id及库存数量
|
||||
*/
|
||||
void updateProductStock(ProductModifyStockParam param);
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
*
|
||||
@@ -107,12 +99,6 @@ public interface ProductService extends IService<Product> {
|
||||
*/
|
||||
void refundToStock(ProdRefundToStockParam param);
|
||||
|
||||
/**
|
||||
* 库存预警
|
||||
*
|
||||
* @param warnLine 预警线
|
||||
*/
|
||||
void stockWarning(Integer warnLine);
|
||||
|
||||
/**
|
||||
* 商品报损
|
||||
@@ -127,21 +113,4 @@ public interface ProductService extends IService<Product> {
|
||||
* @param param 商品统计入参
|
||||
*/
|
||||
ProductStatisticsVo getProductStatistics(ProductInfoParam param);
|
||||
|
||||
/**
|
||||
* 商品出入库流水查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return 分页数据
|
||||
*/
|
||||
Page<ProductStockFlow> findProductStockFlowPage(ProductStockFlowParam param);
|
||||
|
||||
/**
|
||||
* 刷新商品库存
|
||||
*
|
||||
* @param param 查询条件
|
||||
* @param records 商品数据集合
|
||||
*/
|
||||
void refreshProductStock(ProductDTO param, List<ProductDTO> records);
|
||||
|
||||
}
|
||||
|
||||
@@ -12,5 +12,4 @@ import com.mybatisflex.core.service.IService;
|
||||
*/
|
||||
public interface ProductStockFlowService extends IService<ProductStockFlow> {
|
||||
|
||||
void saveFlow(ProductStockFlow entity);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 用户端商品Service
|
||||
@@ -52,28 +51,6 @@ public interface UProductService extends IService<Product> {
|
||||
*/
|
||||
ShopProductSkuInfoVo getProductSkuInfo(ShopProductSkuParam param);
|
||||
|
||||
/**
|
||||
* 刷新商品库存
|
||||
*
|
||||
* @param shopId 店铺id
|
||||
*/
|
||||
Map<Long, Integer> findShopProductStock(Long shopId);
|
||||
|
||||
/**
|
||||
* 刷新商品库存
|
||||
*
|
||||
* @param shopId 店铺id
|
||||
* @param productList 商品列表
|
||||
*/
|
||||
void refreshProductStock(Long shopId, List<ShopProductVo> productList);
|
||||
|
||||
/**
|
||||
* 刷新商品库存
|
||||
*
|
||||
* @param productStock 商品库存
|
||||
* @param productList 商品列表
|
||||
*/
|
||||
void refreshProductStock(Map<Long, Integer> productStock, List<ShopProductVo> productList);
|
||||
|
||||
/**
|
||||
* 分组计算是否在可售时间内
|
||||
|
||||
@@ -67,27 +67,15 @@ public class ShopProductSkuInfoVo implements Serializable {
|
||||
*/
|
||||
private BigDecimal realSalesNumber;
|
||||
/**
|
||||
* 是否售罄(同isSoldStock)
|
||||
*/
|
||||
private Integer isPauseSale;
|
||||
/**
|
||||
* 商品库存
|
||||
*/
|
||||
private Integer stockNumber;
|
||||
/**
|
||||
* 是否售罄(isPauseSale)
|
||||
* 是否售罄
|
||||
*/
|
||||
private Integer isSoldStock;
|
||||
/**
|
||||
* 是否开启库存
|
||||
*/
|
||||
private Integer isAutoSoldStock;
|
||||
/**
|
||||
* 是否上架(同isGrounding)
|
||||
*/
|
||||
private Integer isSale;
|
||||
/**
|
||||
* 是否开启库存
|
||||
*/
|
||||
private Integer isStock;
|
||||
/**
|
||||
* 是否上架(同isSale)
|
||||
*/
|
||||
private Integer isGrounding;
|
||||
}
|
||||
|
||||
@@ -58,10 +58,6 @@ public class ShopProductVo implements Serializable {
|
||||
* 是否售罄 1-是 0-否
|
||||
*/
|
||||
private Integer isSoldStock;
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Integer stockNumber;
|
||||
/**
|
||||
* 商品类型 single-单规格商品 sku-多规格商品 package-套餐商品 weight-称重商品 coupon-团购券
|
||||
*/
|
||||
@@ -114,8 +110,4 @@ public class ShopProductVo implements Serializable {
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
/**
|
||||
* 是否开启库存
|
||||
*/
|
||||
private Integer isStock;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user