消息数据转换

This commit is contained in:
2026-04-16 16:14:16 +08:00
parent a2839952b4
commit 9b48d49904
2 changed files with 11 additions and 11 deletions

View File

@@ -82,15 +82,15 @@ public class PrintMqListener {
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");
JSONObject data2 = jsonObject.getJSONObject("data");
PrinterHandler.PrintTypeEnum typeEnum = PrinterHandler.PrintTypeEnum.valueOf(printTypeEnum);
SysPrintData sysPrintData = new SysPrintData();
sysPrintData.setShopId(shopId);
sysPrintData.setData(JSONObject.toJSONString(o));
sysPrintData.setData(data2.toJSONString());
sysPrintData.setType(typeEnum.toString());
printDataService.save(sysPrintData);
rabbitPublisher.sendOtherPrintLocalMsg(shopId, printTypeEnum, sysPrintData.getId());
printConfig.otherHandler(shopId, o, typeEnum);
printConfig.otherHandler(shopId, data2, typeEnum);
}
}