Authored by qinchao

48小时 物流检查一次

... ... @@ -16,6 +16,8 @@ public interface DelayTime {
int MINUTES_24_HOURS = 24*60;
int MINUTES_48_HOURS = 48*60;
int SELLER_ORDER_WAITING_PAY = 15;
//瑕疵等待用户确认的超时时间,24小时
... ...
... ... @@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.EnumExpressDataType;
import com.yohobuy.ufo.model.order.common.EnumExpressType;
import com.yohoufo.dal.order.BuyerOrderMapper;
import com.yohoufo.dal.order.ExpressInfoMapper;
import com.yohoufo.dal.order.model.BuyerOrder;
import com.yohoufo.dal.order.model.ExpressInfo;
import com.yohoufo.order.event.BuyerOrderSellerDeliveryCheckEvent;
import com.yohoufo.order.mq.TopicConstants;
... ... @@ -19,7 +20,7 @@ import java.util.List;
import java.util.stream.Collectors;
/**
* 虚假发货取消订单
* 虚假发货物流检查
*/
@Component
public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer {
... ... @@ -46,6 +47,17 @@ public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer {
//Integer sellerUid = event.getSellerUid();
Long orderCode = event.getOrderCode();
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
if(buyerOrder==null){
logger.warn("BuyerOrderSellerDeliveryCheckMsgConsumer buyerOrder is null topic {}, msg {} ", getMessageTopic(), o);
return ;
}
if(buyerOrder.getSellerDeliveryStatus()!=null&&buyerOrder.getSellerDeliveryStatus().intValue()==1){
//已经处理
logger.info("BuyerOrderSellerDeliveryCheckMsgConsumer buyerOrder SellerDeliveryStatus is deal, topic {}, msg {},buyer order {} ", getMessageTopic(), o,buyerOrder);
return ;
}
//从物流表查询,并且是物流数据
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());
... ...
... ... @@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
/**
* Created by craig
* 卖家物流检查
* 24小时 和 48小时
*/
@Component
public class BuyerOrderSellerDeliveryCheckHandler implements IEventHandler<BuyerOrderSellerDeliveryCheckEvent> {
... ... @@ -29,5 +30,8 @@ public class BuyerOrderSellerDeliveryCheckHandler implements IEventHandler<Buyer
logger.info("Subscribe Buyer Order Seller Delivery Event delay msg,event {}" ,event);
int minutes = DelayTime.MINUTES_24_HOURS ;
tradeMqSender.send(TopicConstants.BUYER_ORDER_SELLER_DELIVERY_CHECK, event, minutes);
int minutes_again=DelayTime.MINUTES_48_HOURS;
tradeMqSender.send(TopicConstants.BUYER_ORDER_SELLER_DELIVERY_CHECK, event, minutes_again);
}
}
... ...
... ... @@ -29,6 +29,12 @@ consumer:
delay:
interval: 1440
#卖家物流揽收情况检查 48小时
- class: com.yohoufo.order.mq.consumer.BuyerOrderSellerDeliveryCheckMsgConsumer
topic: buyerOrder.sellerDeliveryCheck
delay:
interval: 2880
#- class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer
# topic: buyerOrder.cancelShamDeliver
# delay:
... ...
... ... @@ -31,6 +31,12 @@ consumer:
delay:
interval: 1440
#卖家物流揽收情况检查 48小时
- class: com.yohoufo.order.mq.consumer.BuyerOrderSellerDeliveryCheckMsgConsumer
topic: buyerOrder.sellerDeliveryCheck
delay:
interval: 2880
#- class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer
# topic: buyerOrder.cancelShamDeliver
# delay:
... ...