bacn scan 打印两次问题

This commit is contained in:
2026-01-17 15:25:05 +08:00
parent de21e0a202
commit f1e9d0f4cf

View File

@@ -1227,7 +1227,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
if (StrUtil.isNotBlank(orderInfo.getTableCode())) { if (StrUtil.isNotBlank(orderInfo.getTableCode())) {
ThreadUtil.execAsync(() -> exTable(orderInfo)); ThreadUtil.execAsync(() -> exTable(orderInfo));
} }
if (payType == PayEnums.BACK_SCAN) { if (payType != PayEnums.BACK_SCAN) {
// 事务成功提交后执行消息发送 // 事务成功提交后执行消息发送
String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1"; String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1";
rabbitPublisher.sendOrderPrintMsg(printParam, isPrint, "事务环境打印"); rabbitPublisher.sendOrderPrintMsg(printParam, isPrint, "事务环境打印");
@@ -1236,7 +1236,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
} }
}); });
} else { } else {
if (payType == PayEnums.BACK_SCAN) { if (payType != PayEnums.BACK_SCAN) {
// 非事务环境下直接发送(兼容无事务场景) // 非事务环境下直接发送(兼容无事务场景)
String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1"; String printParam = orderId + "_" + (!"after-pay".equals(payMode) ? 1 : 0) + "_1";
rabbitPublisher.sendOrderPrintMsg(printParam, isPrint, "非事务环境打印"); rabbitPublisher.sendOrderPrintMsg(printParam, isPrint, "非事务环境打印");