You've already forked FrameTour-BE
feat(pricing): 实现优惠券打印功能
- 新增 AppVoucherController 控制器处理打印请求 - 实现 VoucherPrintService 接口和 VoucherPrintServiceImpl 实现类 - 添加 VoucherPrintReq 请求对象和 VoucherPrintResp 响应对象 - 创建 VoucherPrintRecord 实体和对应的 Mapper - 更新 PriceVoucherCodeMapper 接口,添加随机获取未打印券码的方法 - 实现分布式锁机制防止重复打印- 生成流水号并记录打印状态
This commit is contained in:
@@ -7,4 +7,5 @@ public class VoucherClaimReq {
|
||||
private Long scenicId;
|
||||
private Long brokerId;
|
||||
private Long faceId;
|
||||
private String code;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ycwl.basic.pricing.dto.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 打印小票请求
|
||||
*/
|
||||
@Data
|
||||
public class VoucherPrintReq {
|
||||
|
||||
private Long faceId;
|
||||
|
||||
private Long brokerId;
|
||||
|
||||
private Long scenicId;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.ycwl.basic.pricing.dto.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 打印小票响应
|
||||
*/
|
||||
@Data
|
||||
public class VoucherPrintResp {
|
||||
|
||||
/**
|
||||
* 流水号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 券码
|
||||
*/
|
||||
private String voucherCode;
|
||||
|
||||
/**
|
||||
* 打印状态:0=待打印,1=打印成功,2=打印失败
|
||||
*/
|
||||
private Integer printStatus;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
}
|
||||
Reference in New Issue
Block a user