Showing
5 changed files
with
31 additions
and
1 deletions
@@ -16,6 +16,8 @@ public interface DelayTime { | @@ -16,6 +16,8 @@ public interface DelayTime { | ||
16 | 16 | ||
17 | int MINUTES_24_HOURS = 24*60; | 17 | int MINUTES_24_HOURS = 24*60; |
18 | 18 | ||
19 | + int MINUTES_48_HOURS = 48*60; | ||
20 | + | ||
19 | int SELLER_ORDER_WAITING_PAY = 15; | 21 | int SELLER_ORDER_WAITING_PAY = 15; |
20 | 22 | ||
21 | //瑕疵等待用户确认的超时时间,24小时 | 23 | //瑕疵等待用户确认的超时时间,24小时 |
@@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.EnumExpressDataType; | @@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.EnumExpressDataType; | ||
6 | import com.yohobuy.ufo.model.order.common.EnumExpressType; | 6 | import com.yohobuy.ufo.model.order.common.EnumExpressType; |
7 | import com.yohoufo.dal.order.BuyerOrderMapper; | 7 | import com.yohoufo.dal.order.BuyerOrderMapper; |
8 | import com.yohoufo.dal.order.ExpressInfoMapper; | 8 | import com.yohoufo.dal.order.ExpressInfoMapper; |
9 | +import com.yohoufo.dal.order.model.BuyerOrder; | ||
9 | import com.yohoufo.dal.order.model.ExpressInfo; | 10 | import com.yohoufo.dal.order.model.ExpressInfo; |
10 | import com.yohoufo.order.event.BuyerOrderSellerDeliveryCheckEvent; | 11 | import com.yohoufo.order.event.BuyerOrderSellerDeliveryCheckEvent; |
11 | import com.yohoufo.order.mq.TopicConstants; | 12 | import com.yohoufo.order.mq.TopicConstants; |
@@ -19,7 +20,7 @@ import java.util.List; | @@ -19,7 +20,7 @@ import java.util.List; | ||
19 | import java.util.stream.Collectors; | 20 | import java.util.stream.Collectors; |
20 | 21 | ||
21 | /** | 22 | /** |
22 | - * 虚假发货取消订单 | 23 | + * 虚假发货物流检查 |
23 | */ | 24 | */ |
24 | @Component | 25 | @Component |
25 | public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer { | 26 | public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer { |
@@ -46,6 +47,17 @@ public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer { | @@ -46,6 +47,17 @@ public class BuyerOrderSellerDeliveryCheckMsgConsumer implements YhConsumer { | ||
46 | //Integer sellerUid = event.getSellerUid(); | 47 | //Integer sellerUid = event.getSellerUid(); |
47 | Long orderCode = event.getOrderCode(); | 48 | Long orderCode = event.getOrderCode(); |
48 | 49 | ||
50 | + BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode); | ||
51 | + if(buyerOrder==null){ | ||
52 | + logger.warn("BuyerOrderSellerDeliveryCheckMsgConsumer buyerOrder is null topic {}, msg {} ", getMessageTopic(), o); | ||
53 | + return ; | ||
54 | + } | ||
55 | + if(buyerOrder.getSellerDeliveryStatus()!=null&&buyerOrder.getSellerDeliveryStatus().intValue()==1){ | ||
56 | + //已经处理 | ||
57 | + logger.info("BuyerOrderSellerDeliveryCheckMsgConsumer buyerOrder SellerDeliveryStatus is deal, topic {}, msg {},buyer order {} ", getMessageTopic(), o,buyerOrder); | ||
58 | + return ; | ||
59 | + } | ||
60 | + | ||
49 | //从物流表查询,并且是物流数据 | 61 | //从物流表查询,并且是物流数据 |
50 | List<ExpressInfo> ls = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode, EnumExpressType.EXPRESS_TYPE_1.getCode()); | 62 | 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()); | 63 | ls = ls.stream().filter(info->(EnumExpressDataType.erp_logistics.getCode()==info.getDataType())).collect(Collectors.toList()); |
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Component; | @@ -14,6 +14,7 @@ import org.springframework.stereotype.Component; | ||
14 | /** | 14 | /** |
15 | * Created by craig | 15 | * Created by craig |
16 | * 卖家物流检查 | 16 | * 卖家物流检查 |
17 | + * 24小时 和 48小时 | ||
17 | */ | 18 | */ |
18 | @Component | 19 | @Component |
19 | public class BuyerOrderSellerDeliveryCheckHandler implements IEventHandler<BuyerOrderSellerDeliveryCheckEvent> { | 20 | public class BuyerOrderSellerDeliveryCheckHandler implements IEventHandler<BuyerOrderSellerDeliveryCheckEvent> { |
@@ -29,5 +30,8 @@ public class BuyerOrderSellerDeliveryCheckHandler implements IEventHandler<Buyer | @@ -29,5 +30,8 @@ public class BuyerOrderSellerDeliveryCheckHandler implements IEventHandler<Buyer | ||
29 | logger.info("Subscribe Buyer Order Seller Delivery Event delay msg,event {}" ,event); | 30 | logger.info("Subscribe Buyer Order Seller Delivery Event delay msg,event {}" ,event); |
30 | int minutes = DelayTime.MINUTES_24_HOURS ; | 31 | int minutes = DelayTime.MINUTES_24_HOURS ; |
31 | tradeMqSender.send(TopicConstants.BUYER_ORDER_SELLER_DELIVERY_CHECK, event, minutes); | 32 | tradeMqSender.send(TopicConstants.BUYER_ORDER_SELLER_DELIVERY_CHECK, event, minutes); |
33 | + | ||
34 | + int minutes_again=DelayTime.MINUTES_48_HOURS; | ||
35 | + tradeMqSender.send(TopicConstants.BUYER_ORDER_SELLER_DELIVERY_CHECK, event, minutes_again); | ||
32 | } | 36 | } |
33 | } | 37 | } |
@@ -29,6 +29,12 @@ consumer: | @@ -29,6 +29,12 @@ consumer: | ||
29 | delay: | 29 | delay: |
30 | interval: 1440 | 30 | interval: 1440 |
31 | 31 | ||
32 | + #卖家物流揽收情况检查 48小时 | ||
33 | + - class: com.yohoufo.order.mq.consumer.BuyerOrderSellerDeliveryCheckMsgConsumer | ||
34 | + topic: buyerOrder.sellerDeliveryCheck | ||
35 | + delay: | ||
36 | + interval: 2880 | ||
37 | + | ||
32 | #- class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer | 38 | #- class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer |
33 | # topic: buyerOrder.cancelShamDeliver | 39 | # topic: buyerOrder.cancelShamDeliver |
34 | # delay: | 40 | # delay: |
@@ -31,6 +31,12 @@ consumer: | @@ -31,6 +31,12 @@ consumer: | ||
31 | delay: | 31 | delay: |
32 | interval: 1440 | 32 | interval: 1440 |
33 | 33 | ||
34 | + #卖家物流揽收情况检查 48小时 | ||
35 | + - class: com.yohoufo.order.mq.consumer.BuyerOrderSellerDeliveryCheckMsgConsumer | ||
36 | + topic: buyerOrder.sellerDeliveryCheck | ||
37 | + delay: | ||
38 | + interval: 2880 | ||
39 | + | ||
34 | #- class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer | 40 | #- class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer |
35 | # topic: buyerOrder.cancelShamDeliver | 41 | # topic: buyerOrder.cancelShamDeliver |
36 | # delay: | 42 | # delay: |
-
Please register or login to post a comment