...
|
...
|
@@ -2,10 +2,12 @@ package com.yohoufo.order.service.handler; |
|
|
|
|
|
import com.google.common.eventbus.Subscribe;
|
|
|
import com.yohoufo.common.alarm.IEventHandler;
|
|
|
import com.yohoufo.dal.order.model.OrderOverTime;
|
|
|
import com.yohoufo.order.event.BuyerMiniFaultOuterTimeEvent;
|
|
|
import com.yohoufo.order.mq.DelayTime;
|
|
|
import com.yohoufo.order.mq.TopicConstants;
|
|
|
import com.yohoufo.order.mq.producer.TradeMqSender;
|
|
|
import com.yohoufo.order.service.impl.OrderOverTimeService;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -22,11 +24,21 @@ public class BuyerMiniFaultOuterTimeHandler implements IEventHandler<BuyerMiniFa |
|
|
@Autowired
|
|
|
private TradeMqSender tradeMqSender;
|
|
|
|
|
|
@Autowired
|
|
|
private OrderOverTimeService orderOverTimeService;
|
|
|
|
|
|
@Override
|
|
|
@Subscribe
|
|
|
public void handle(BuyerMiniFaultOuterTimeEvent event) {
|
|
|
logger.info("Subscribe Buyer mini fault delay msg, event {}", event);
|
|
|
int minutes = DelayTime.MINI_FAULT_CONFIRM_OUTER_TIME_MINUTE;
|
|
|
logger.info("Subscribe Buyer mini fault delay msg, event {},minutes {}", event,minutes);
|
|
|
|
|
|
tradeMqSender.send(TopicConstants.BUYER_ORDER_MINI_FAULT_AUTO_REJECT, event,minutes );
|
|
|
|
|
|
tradeMqSender.send(TopicConstants.BUYER_ORDER_MINI_FAULT_AUTO_REJECT, event, DelayTime.MINI_FAULT_CONFIRM_OUTER_TIME_MINUTE);
|
|
|
//更新订单的瑕疵确认时间
|
|
|
OrderOverTime orderOverTime=new OrderOverTime();
|
|
|
orderOverTime.setOrderCode(event.getOrderCode());
|
|
|
orderOverTime.setMiniFaultConfirmMinutes(minutes);
|
|
|
orderOverTimeService.insertMiniFaultConfirmTime(orderOverTime);
|
|
|
}
|
|
|
} |
...
|
...
|
|