You've already forked FrameTour-BE
- 新增VoucherBatchCreateReqV2 请求对象,用于创建支持重复使用的券码批次 - 添加 VoucherUsageController 控制器,实现券码使用记录和统计功能 - 在VoucherInfo 对象中增加与重复使用相关的字段 - 修改 PriceVoucherBatchConfig 和 PriceVoucherCode 实体,支持重复使用相关属性 - 更新 VoucherBatchServiceImpl 和 VoucherServiceImpl,增加处理重复使用逻辑的方法
122 lines
1.9 KiB
Java
122 lines
1.9 KiB
Java
package com.ycwl.basic.pricing.dto;
|
|
|
|
import com.ycwl.basic.pricing.enums.ProductType;
|
|
import com.ycwl.basic.pricing.enums.VoucherDiscountType;
|
|
import lombok.Data;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 券码信息DTO
|
|
*/
|
|
@Data
|
|
public class VoucherInfo {
|
|
|
|
/**
|
|
* 券码ID
|
|
*/
|
|
private Long voucherId;
|
|
|
|
/**
|
|
* 券码
|
|
*/
|
|
private String voucherCode;
|
|
|
|
/**
|
|
* 批次ID
|
|
*/
|
|
private Long batchId;
|
|
|
|
/**
|
|
* 批次名称
|
|
*/
|
|
private String batchName;
|
|
|
|
/**
|
|
* 景区ID
|
|
*/
|
|
private Long scenicId;
|
|
|
|
/**
|
|
* 推客ID
|
|
*/
|
|
private Long brokerId;
|
|
|
|
/**
|
|
* 优惠类型
|
|
*/
|
|
private VoucherDiscountType discountType;
|
|
|
|
/**
|
|
* 优惠值
|
|
*/
|
|
private BigDecimal discountValue;
|
|
|
|
/**
|
|
* 实际优惠金额
|
|
*/
|
|
private BigDecimal actualDiscountAmount;
|
|
|
|
/**
|
|
* 状态
|
|
*/
|
|
private Integer status;
|
|
|
|
/**
|
|
* 领取时间
|
|
*/
|
|
private Date claimedTime;
|
|
|
|
/**
|
|
* 使用时间
|
|
*/
|
|
private Date usedTime;
|
|
|
|
/**
|
|
* 是否可用
|
|
*/
|
|
private Boolean available;
|
|
|
|
/**
|
|
* 不可用原因
|
|
*/
|
|
private String unavailableReason;
|
|
|
|
/**
|
|
* 适用商品类型列表
|
|
* null表示适用所有商品类型
|
|
*/
|
|
private List<ProductType> applicableProducts;
|
|
|
|
/**
|
|
* 当前使用次数
|
|
*/
|
|
private Integer currentUseCount;
|
|
|
|
/**
|
|
* 最大使用次数
|
|
*/
|
|
private Integer maxUseCount;
|
|
|
|
/**
|
|
* 每个用户最大使用次数
|
|
*/
|
|
private Integer maxUsePerUser;
|
|
|
|
/**
|
|
* 使用间隔小时数
|
|
*/
|
|
private Integer useIntervalHours;
|
|
|
|
/**
|
|
* 剩余可使用次数
|
|
*/
|
|
private Integer remainingUseCount;
|
|
|
|
/**
|
|
* 最后使用时间
|
|
*/
|
|
private Date lastUsedTime;
|
|
} |