feat(voucher): 电子凭证打印增加预约功能

- 在 AppClaimController 中添加了对 morphId 的非空判断,只有在 morphId 存在时才进行打印操作
- 在 VoucherPrintServiceImpl 中增加了景点配置的检查,包括预约功能是否启用和指定的经纪人 ID
This commit is contained in:
2025-08-30 12:59:03 +08:00
parent b1deabc7c1
commit fc8818a595
2 changed files with 18 additions and 2 deletions

View File

@@ -42,7 +42,9 @@ public class AppClaimController {
VoucherPrintResp voucherPrintResp = voucherPrintService.queryPrintedVoucher(face.getId());
if (voucherPrintResp == null) {
// 打印
voucherPrintResp = voucherPrintService.printVoucherTicket(new VoucherPrintReq(face.getId(), req.getMorphId(), face.getScenicId()));
if (req.getMorphId() != null) {
voucherPrintResp = voucherPrintService.printVoucherTicket(new VoucherPrintReq(face.getId(), req.getMorphId(), face.getScenicId()));
}
}
if (voucherPrintResp != null) {
claimResp.setHasCoupon(false);
@@ -57,7 +59,9 @@ public class AppClaimController {
VoucherPrintResp voucherPrintResp = voucherPrintService.queryPrintedVoucher(face.getId());
if (voucherPrintResp == null) {
// 打印
voucherPrintResp = voucherPrintService.printBookingTicket(new VoucherPrintReq(face.getId(), req.getMorphId(), face.getScenicId()));
if (req.getMorphId() != null) {
voucherPrintResp = voucherPrintService.printBookingTicket(new VoucherPrintReq(face.getId(), req.getMorphId(), face.getScenicId()));
}
}
if (voucherPrintResp != null) {
claimResp.setHasCoupon(false);