打印日志修改

This commit is contained in:
张松
2025-03-18 14:29:23 +08:00
parent 925d62ab09
commit 3dbca31519
2 changed files with 4 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ package com.czg.config;
import com.alibaba.fastjson2.JSONObject;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -10,6 +11,7 @@ import org.springframework.stereotype.Service;
* @author GYJoker
*/
@Service
@Slf4j
public class RabbitPublisher {
@Value("${spring.profiles.active}")
@@ -49,6 +51,7 @@ public class RabbitPublisher {
* @param printOrder 是否打印结算单
*/
public void sendOrderPrintMsg(String orderId, boolean printOrder) {
log.info("开始发送打印mq消息, orderId: {}, printOrder: {}", orderId, printOrder);
//厨房票
sendMsg(RabbitConstants.Queue.ORDER_MACHINE_PRINT_QUEUE, new JSONObject().fluentPut("orderId", orderId).fluentPut("printOrder", printOrder).toString());
//前台票

View File

@@ -175,7 +175,7 @@ public class PrintMachineLogServiceImpl extends ServiceImpl<PrintMachineLogMappe
return;
}
PrintMachineLog entity = new PrintMachineLog();
BeanUtil.copyProperties(config, entity);
BeanUtil.copyProperties(config, entity, "id");
int failFlag = 0;
String respCode = "0";
String respMsg = "打印中";