refactor(VoucherPrintServiceImpl):优化小票打印内容与格式- 更新小票内容描述,使其更加准确

- 调整小票格式,使布局更合理
- 增加赠品兑换码相关提示
- 优化已存在打印记录的处理逻辑
This commit is contained in:
2025-08-25 21:07:57 +08:00
parent 2710bfce2c
commit 3d79777b84

View File

@@ -92,6 +92,7 @@ public class VoucherPrintServiceImpl implements VoucherPrintService {
if (existingRecord != null) {
log.info("找到已存在的打印记录,返回该记录: {}", existingRecord.getId());
existingRecord.setCode(existingRecord.getVoucherCode());
return buildResponse(existingRecord);
}
@@ -225,15 +226,16 @@ public class VoucherPrintServiceImpl implements VoucherPrintService {
content += "拍摄日期:";
content += sdf.format(new Date());
content += "<BR>";
content += "大片内容:包含Vlog、打卡录像<BR>";
content += " 精选照片<BR><BR>";
content += "大片内容:包含精剪Vlog、打卡录像<BR>";
content += " 精选照片<BR><BR>";
content += "<QR>"+urlLink+"</QR>";
content += "<CB>游后微信扫码领取</CB>";
content += "<C>精彩指数:★★★★★</C><BR>";
content += "━━━━━━━━━━━━━━━━<BR>";
content += "<CB>"+record.getVoucherCode()+"</CB>";
content += "<C>赠品码</C>";
content += "<C>赠品兑换码</C>";
content += "<C>有效期:"+sdf2.format(new Date())+"</C>";
FeiETicketPrinter.doPrint("550519002", content, 1);
// 小票配对码、赠品兑换码、抵扣兑换码
}
}