...
|
...
|
@@ -2,6 +2,7 @@ package com.yohoufo.order.mq.consumer; |
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yoho.core.rabbitmq.YhConsumer;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yohobuy.ufo.model.order.bo.AppraiseExpressInfoBo;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
|
|
import com.yohoufo.order.event.BuyerMiniFaultOuterTimeEvent;
|
...
|
...
|
@@ -21,7 +22,6 @@ public class BuyerOrderMiniFaultOuterTimeDelayMsgConsumer implements YhConsumer |
|
|
final Logger logger = LoggerUtils.getMqConsumerLogger();
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
private AppraiseService appraiseService;
|
|
|
|
...
|
...
|
@@ -34,13 +34,18 @@ public class BuyerOrderMiniFaultOuterTimeDelayMsgConsumer implements YhConsumer |
|
|
@Override
|
|
|
public void handleMessage(Object o) throws Exception {
|
|
|
logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} ", getMessageTopic(), o);
|
|
|
|
|
|
BuyerMiniFaultOuterTimeEvent event = JSONObject.parseObject(o.toString(), BuyerMiniFaultOuterTimeEvent.class);
|
|
|
Long orderCode = event.getOrderCode();
|
|
|
|
|
|
OrderStatus targetStatus = OrderStatus.MINI_FAULT_OUT_TIME_REJECT;
|
|
|
appraiseService.miniFaultReject(orderCode,targetStatus,true);
|
|
|
|
|
|
logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} finish", getMessageTopic(), event);
|
|
|
try {
|
|
|
BuyerMiniFaultOuterTimeEvent event = JSONObject.parseObject(o.toString(), BuyerMiniFaultOuterTimeEvent.class);
|
|
|
Long orderCode = event.getOrderCode();
|
|
|
OrderStatus targetStatus = OrderStatus.MINI_FAULT_OUT_TIME_REJECT;
|
|
|
appraiseService.miniFaultReject(orderCode, targetStatus, true);
|
|
|
|
|
|
logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} finish", getMessageTopic(), event);
|
|
|
} catch (ServiceException e) {
|
|
|
logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} service exception {}", getMessageTopic(), o, e.getMessage());
|
|
|
} catch (Exception e) {
|
|
|
logger.info("BuyerOrderMiniFaultOuterTimeDelayMsgConsumer topic {}, msg {} exception", getMessageTopic(), o, e);
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|