This commit is contained in:
2026-04-02 16:57:12 +08:00
parent 384557e914
commit fbbc6b8d30
8 changed files with 607 additions and 421 deletions

View File

@@ -59,7 +59,7 @@ public class PrintMqListener {
}
Boolean printOrder = jsonObject.getBoolean("printOrder");
redisService.runFunAndCheckKey(() -> {
printerHandler.handler(orderId, printOrder != null && !printOrder ? PrinterHandler.PrintTypeEnum.ONE : PrinterHandler.PrintTypeEnum.ONE_AND_ORDER);
printerHandler.orderHandler(orderId, printOrder != null && !printOrder ? PrinterHandler.PrintTypeEnum.ONE : PrinterHandler.PrintTypeEnum.ONE_AND_ORDER, null);
return null;
}, RedisCst.getLockKey("orderPrint", orderId));
});
@@ -71,7 +71,7 @@ public class PrintMqListener {
@RabbitListener(queues = {"${spring.profiles.active}-" + RabbitConstants.Queue.ORDER_HANDOVER_PRINT_QUEUE})
public void handoverPrint(String id) {
invokeFun(RabbitConstants.Queue.ORDER_HANDOVER_PRINT_QUEUE, "handoverPrint", "java.order", id, (data) ->
printerHandler.handler(data, PrinterHandler.PrintTypeEnum.HANDOVER));
printerHandler.handoverHandler(data));
}
/**
@@ -80,6 +80,6 @@ public class PrintMqListener {
@RabbitListener(queues = {"${spring.profiles.active}-" + RabbitConstants.Queue.CALL_TABLE_QUEUE})
public void callTablePrint(String id) {
invokeFun(RabbitConstants.Queue.CALL_TABLE_QUEUE, "callTable", "java.order", id, (data) ->
printerHandler.handler(data, PrinterHandler.PrintTypeEnum.CALL));
printerHandler.callHandler(data));
}
}