feat(pricing): 添加券码管理和使用功能

- 新增券码批次配置和券码实体
- 实现券码创建、领取、使用等接口
- 添加券码状态和优惠类型枚举
- 优化价格计算逻辑,支持券码优惠
- 新增优惠检测和应用相关功能
This commit is contained in:
2025-08-21 09:35:08 +08:00
parent e9035af542
commit eb327723cd
52 changed files with 2572 additions and 455 deletions

View File

@@ -0,0 +1,72 @@
package com.ycwl.basic.pricing.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.Date;
/**
* 券码批次配置实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("price_voucher_batch_config")
public class PriceVoucherBatchConfig extends BaseEntity {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 券码批次名称
*/
private String batchName;
/**
* 景区ID
*/
private Long scenicId;
/**
* 推客ID
*/
private Long brokerId;
/**
* 优惠类型:0=全场免费,1=商品降价,2=商品打折
*/
private Integer discountType;
/**
* 优惠值(降价金额或折扣百分比)
*/
private BigDecimal discountValue;
/**
* 总券码数量
*/
private Integer totalCount;
/**
* 已使用数量
*/
private Integer usedCount;
/**
* 已领取数量
*/
private Integer claimedCount;
/**
* 状态:0=禁用,1=启用
*/
private Integer status;
/**
* 创建人ID
*/
private Long createBy;
}