消息发送
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user