|
|
|
@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springblade.common.constant.RabbitConstant; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springframework.amqp.core.Message; |
|
|
|
|
import org.springframework.amqp.rabbit.annotation.RabbitHandler; |
|
|
|
|
import org.springframework.amqp.rabbit.annotation.RabbitListener; |
|
|
|
@ -48,7 +49,12 @@ public class OpenOrderHandler {
|
|
|
|
|
String msg = new String(message.getBody()); |
|
|
|
|
log.info("##################我进入这里了 retryCount={}",retryCount++); |
|
|
|
|
OrderInfoDTO orderInfoDTO = (OrderInfoDTO) map.get("messageData"); |
|
|
|
|
String orderNo = orderInfoDTO.getOrderNo();//订单自编号
|
|
|
|
|
String orderNoStr = orderInfoDTO.getOrderNo();//订单自编号
|
|
|
|
|
String[] split = orderNoStr.split(","); |
|
|
|
|
for (String orderNo:split){ |
|
|
|
|
if(StringUtil.isBlank(orderNo)){ |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
//通过订单自编号去查询该条订单是属于哪个工厂
|
|
|
|
|
AdvanceEntity advanceEntity = advanceClient.getQueryDataOne(orderNo); |
|
|
|
|
if(Objects.isNull(advanceEntity)){ |
|
|
|
@ -58,6 +64,7 @@ public class OpenOrderHandler {
|
|
|
|
|
} |
|
|
|
|
String type = advanceEntity.getType();//品牌
|
|
|
|
|
|
|
|
|
|
orderInfoDTO.setOrderNo(orderNo); |
|
|
|
|
R r = null; |
|
|
|
|
switch (type){ |
|
|
|
|
case FactoryConstant.PIANO: |
|
|
|
@ -78,4 +85,7 @@ public class OpenOrderHandler {
|
|
|
|
|
// channel.basicAck(deliveryTag,true);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|