Authored by qinchao

fix 物流数据

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