打印日志修改
This commit is contained in:
@@ -2,6 +2,7 @@ package com.czg.config;
|
|||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -10,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|||||||
* @author GYJoker
|
* @author GYJoker
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class RabbitPublisher {
|
public class RabbitPublisher {
|
||||||
|
|
||||||
@Value("${spring.profiles.active}")
|
@Value("${spring.profiles.active}")
|
||||||
@@ -49,6 +51,7 @@ public class RabbitPublisher {
|
|||||||
* @param printOrder 是否打印结算单
|
* @param printOrder 是否打印结算单
|
||||||
*/
|
*/
|
||||||
public void sendOrderPrintMsg(String orderId, boolean 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());
|
sendMsg(RabbitConstants.Queue.ORDER_MACHINE_PRINT_QUEUE, new JSONObject().fluentPut("orderId", orderId).fluentPut("printOrder", printOrder).toString());
|
||||||
//前台票
|
//前台票
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public class PrintMachineLogServiceImpl extends ServiceImpl<PrintMachineLogMappe
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PrintMachineLog entity = new PrintMachineLog();
|
PrintMachineLog entity = new PrintMachineLog();
|
||||||
BeanUtil.copyProperties(config, entity);
|
BeanUtil.copyProperties(config, entity, "id");
|
||||||
int failFlag = 0;
|
int failFlag = 0;
|
||||||
String respCode = "0";
|
String respCode = "0";
|
||||||
String respMsg = "打印中";
|
String respMsg = "打印中";
|
||||||
|
|||||||
Reference in New Issue
Block a user