Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tankaikai
2025-02-26 14:14:56 +08:00
5 changed files with 70 additions and 67 deletions

View File

@@ -46,14 +46,14 @@ public class PrintMqListener {
log.info("接收到订单打印消息:{}", orderId);
MqLog mqLog = new MqLog().setQueue(RabbitConstants.Queue.ORDER_PRINT_QUEUE).setMsg(orderId).setType("orderPrint").setPlat("java.account").setCreateTime(DateUtil.date().toLocalDateTime());
try {
// OrderInfo orderInfo = orderInfoService.getById(orderId);
// if (orderInfo == null) {
// log.error("订单信息不存在, {}", orderId);
// throw new RuntimeException("订单信息不存在");
// }
OrderInfo orderInfo = orderInfoService.getById(orderId);
if (orderInfo == null) {
log.error("订单信息不存在, {}", orderId);
throw new RuntimeException("订单信息不存在");
}
getPrintMachine(1L, "cash", "queue", "queue").forEach(machine -> {
printerHandler.handleRequest(machine, null, 1L);
getPrintMachine(1L, "cash", "one", "one").forEach(machine -> {
printerHandler.handleRequest(machine, orderInfo, null);
// printPlaceTicket(isReturn, machine, orderInfo, shopInfo);
});