消息发送

This commit is contained in:
2026-04-16 15:25:42 +08:00
parent 75b2db320f
commit 7511cb0ba8
3 changed files with 8 additions and 4 deletions

View File

@@ -79,7 +79,11 @@ public class PrintMqListener {
@RabbitListener(queues = {"${spring.profiles.active}-" + RabbitConstants.Queue.OTHER_PRINT_QUEUE})
public void otherPrint(Long shopId, Object o, String printTypeEnum) {
public void otherPrint(String data) {
JSONObject jsonObject = JSONObject.parseObject(data);
Long shopId = jsonObject.getLong("shopId");
Object o = jsonObject.getObject("data", Object.class);
String printTypeEnum = jsonObject.getString("printTypeEnum");
PrinterHandler.PrintTypeEnum typeEnum = PrinterHandler.PrintTypeEnum.valueOf(printTypeEnum);
SysPrintData sysPrintData = new SysPrintData();
sysPrintData.setShopId(shopId);

View File

@@ -165,7 +165,7 @@ public class RabbitPublisher {
msg.put("shopId", shopId);
msg.put("data", data);
msg.put("printTypeEnum", printType);
rabbitTemplate.convertAndSend(exchange, queueName, msg);
rabbitTemplate.convertAndSend(exchange, queueName, JSONObject.toJSONString(msg));
}
public void sendOtherPrintLocalMsg(Long shopId, String printType, Long dataId) {

View File

@@ -38,8 +38,8 @@ public class CodeGen {
// String packageName = "market";
String packageName = "order";
// tableName 指定需要生成的表
String tableName = "pp_package_order";
String author = "gyj";
String tableName = "sys_print_data";
String author = "ww";
//是否生成DTO实体 默认生成
boolean isGenerateDto = true;