This commit is contained in:
Guoqs
2024-12-30 14:33:27 +08:00
parent 729c47cc0c
commit 3e3ebe3dad
3 changed files with 30 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
package com.jsowell.mq;
import com.google.common.collect.Lists;
import com.huifu.adapay.core.exception.BaseAdaPayException;
import com.jsowell.common.constant.RabbitConstants;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.pile.dto.AfterSettleOrderDTO;
import com.jsowell.pile.service.OrderBasicInfoService;
import com.rabbitmq.client.Channel;
@@ -24,8 +24,6 @@ public class OrderRabbitListener {
@Autowired
private OrderBasicInfoService orderBasicInfoService;
private List<String> stationIdList = Lists.newArrayList();
/**
* 多线程消费请求消息
* @param message
@@ -33,8 +31,8 @@ public class OrderRabbitListener {
@RabbitListener(queues = RabbitConstants.QUEUE_CHARGE_ORDER_DATA)
public void receiveChargeOrderData(AfterSettleOrderDTO afterSettleOrderDTO, Channel channel, Message message) throws IOException {
log.info("接收到订单结算数据:{}", afterSettleOrderDTO);
if (stationIdList.contains(afterSettleOrderDTO.getStationId())) {
List<String> newLogicStationIdList = YKCUtils.getNewLogicStationIdList();
if (newLogicStationIdList.contains(afterSettleOrderDTO.getStationId())) {
try {
orderBasicInfoService.realTimeOrderSplit(afterSettleOrderDTO);
} catch (BaseAdaPayException e) {