Merge branch 'prod' into test

This commit is contained in:
2026-05-06 09:30:39 +08:00
2 changed files with 10 additions and 5 deletions

View File

@@ -12,9 +12,11 @@ import com.czg.order.entity.MqLog;
import com.czg.order.entity.SysPrintData;
import com.czg.order.service.MqLogService;
import com.czg.order.service.SysPrintDataService;
import com.czg.print.StockPrintDTO;
import com.czg.service.RedisService;
import com.czg.service.order.print.PrintConfig;
import com.czg.service.order.print.PrinterHandler;
import com.czg.utils.FunUtils;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
@@ -100,9 +102,11 @@ public class PrintMqListener {
Long shopId = jsonObject.getLong("shopId");
String printTypeEnum = jsonObject.getString("printTypeEnum");
JSONObject data2 = jsonObject.getJSONObject("data");
JSONArray data3 = null;
JSONArray data3;
if (data2 == null) {
data3 = jsonObject.getJSONArray("data");
} else {
data3 = null;
}
PrinterHandler.PrintTypeEnum typeEnum = PrinterHandler.PrintTypeEnum.valueOf(printTypeEnum);
if (typeEnum != PrinterHandler.PrintTypeEnum.HANDOVER) {
@@ -117,6 +121,6 @@ public class PrintMqListener {
printDataService.save(sysPrintData);
rabbitPublisher.sendOtherPrintLocalMsg(shopId, printTypeEnum, sysPrintData.getId());
}
printConfig.otherHandler(shopId, data2, data3, typeEnum);
FunUtils.asyncSafeRunVoid(() -> printConfig.otherHandler(shopId, data2, data3, typeEnum));
}
}