Authored by qinchao

fix 物流数据

@@ -2,6 +2,7 @@ package com.yohoufo.order.mq.consumer; @@ -2,6 +2,7 @@ package com.yohoufo.order.mq.consumer;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.yoho.core.rabbitmq.YhConsumer; 4 import com.yoho.core.rabbitmq.YhConsumer;
  5 +import com.yohobuy.ufo.model.order.common.EnumExpressDataType;
5 import com.yohobuy.ufo.model.order.common.EnumExpressType; 6 import com.yohobuy.ufo.model.order.common.EnumExpressType;
6 import com.yohobuy.ufo.model.order.common.OperateTypeEnum; 7 import com.yohobuy.ufo.model.order.common.OperateTypeEnum;
7 import com.yohobuy.ufo.model.order.common.OrderStatus; 8 import com.yohobuy.ufo.model.order.common.OrderStatus;
@@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.stereotype.Component; 20 import org.springframework.stereotype.Component;
20 21
21 import java.util.List; 22 import java.util.List;
  23 +import java.util.stream.Collectors;
22 24
23 /** 25 /**
24 * 虚假发货取消订单 26 * 虚假发货取消订单
@@ -50,8 +52,9 @@ public class BuyerOrderCancelShamDeliveryMsgConsumer implements YhConsumer { @@ -50,8 +52,9 @@ public class BuyerOrderCancelShamDeliveryMsgConsumer implements YhConsumer {
50 Integer buyerUid = event.getUid(); 52 Integer buyerUid = event.getUid();
51 Long orderCode = event.getOrderCode(); 53 Long orderCode = event.getOrderCode();
52 54
53 - //从物流表查询 55 + //从物流表查询 ,并且是物流数据
54 List<ExpressInfo> ls = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode()); 56 List<ExpressInfo> ls = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode());
  57 + ls = ls.stream().filter(info->(EnumExpressDataType.erp_logistics.getCode()==info.getDataType())).collect(Collectors.toList());
55 if(CollectionUtils.isNotEmpty(ls)){ 58 if(CollectionUtils.isNotEmpty(ls)){
56 logger.info("BuyerOrderCancelShamDeliveryMsgConsumer topic {}, msg {} ,not cancel order because exist express info ", getMessageTopic(), o); 59 logger.info("BuyerOrderCancelShamDeliveryMsgConsumer topic {}, msg {} ,not cancel order because exist express info ", getMessageTopic(), o);
57 return ; 60 return ;
@@ -2,16 +2,13 @@ package com.yohoufo.order.mq.consumer; @@ -2,16 +2,13 @@ package com.yohoufo.order.mq.consumer;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.yoho.core.rabbitmq.YhConsumer; 4 import com.yoho.core.rabbitmq.YhConsumer;
  5 +import com.yohobuy.ufo.model.order.common.EnumExpressDataType;
5 import com.yohobuy.ufo.model.order.common.EnumExpressType; 6 import com.yohobuy.ufo.model.order.common.EnumExpressType;
6 -import com.yohoufo.common.constant.EnumPlatformDeliveryStatus;  
7 -import com.yohoufo.common.utils.DateUtil;  
8 import com.yohoufo.dal.order.BuyerOrderMapper; 7 import com.yohoufo.dal.order.BuyerOrderMapper;
9 import com.yohoufo.dal.order.ExpressInfoMapper; 8 import com.yohoufo.dal.order.ExpressInfoMapper;
10 import com.yohoufo.dal.order.model.ExpressInfo; 9 import com.yohoufo.dal.order.model.ExpressInfo;
11 import com.yohoufo.order.event.BuyerOrderSellerDeliveryCheckEvent; 10 import com.yohoufo.order.event.BuyerOrderSellerDeliveryCheckEvent;
12 import com.yohoufo.order.mq.TopicConstants; 11 import com.yohoufo.order.mq.TopicConstants;
13 -import com.yohoufo.order.service.impl.BuyerOrderCancelService;  
14 -import com.yohoufo.order.service.proxy.OrderOperateRecordService;  
15 import com.yohoufo.order.utils.LoggerUtils; 12 import com.yohoufo.order.utils.LoggerUtils;
16 import org.apache.commons.collections.CollectionUtils; 13 import org.apache.commons.collections.CollectionUtils;
17 import org.slf4j.Logger; 14 import org.slf4j.Logger;
@@ -19,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -19,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.stereotype.Component; 16 import org.springframework.stereotype.Component;
20 17
21 import java.util.List; 18 import java.util.List;
  19 +import java.util.stream.Collectors;
22 20
23 /** 21 /**
24 * 虚假发货取消订单 22 * 虚假发货取消订单
@@ -48,8 +46,9 @@ public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer { @@ -48,8 +46,9 @@ public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer {
48 //Integer sellerUid = event.getSellerUid(); 46 //Integer sellerUid = event.getSellerUid();
49 Long orderCode = event.getOrderCode(); 47 Long orderCode = event.getOrderCode();
50 48
51 - //从物流表查询 49 + //从物流表查询,并且是物流数据
52 List<ExpressInfo> ls = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode()); 50 List<ExpressInfo> ls = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode());
  51 + ls = ls.stream().filter(info->(EnumExpressDataType.erp_logistics.getCode()==info.getDataType())).collect(Collectors.toList());
53 if(CollectionUtils.isNotEmpty(ls)){ 52 if(CollectionUtils.isNotEmpty(ls)){
54 //存在物流更新成 1 53 //存在物流更新成 1
55 buyerOrderMapper.updateSellerDeliveryStatusByOrderCode(orderCode, buyerUid, 54 buyerOrderMapper.updateSellerDeliveryStatusByOrderCode(orderCode, buyerUid,