...
|
...
|
@@ -3,6 +3,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.EnumExpressDataOperateTransferCode;
|
|
|
import com.yohobuy.ufo.model.order.common.EnumExpressDataType;
|
|
|
import com.yohobuy.ufo.model.order.common.EnumExpressType;
|
|
|
import com.yohoufo.common.constant.ExpressInfoConstant;
|
...
|
...
|
@@ -141,8 +142,25 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger(); |
|
|
|
|
|
//TODO 1 清关失败和清关成功的物流信息,需要记录下相应的code ,以便后续调用
|
|
|
//TODO 2 清关失败需要告诉order,更改订单状态,并退费
|
|
|
//expressInfo.setOperateTransferCode(EnumExpressDataOperateTransferCode.express_clear_fail_cause_buyer.getCode());
|
|
|
boolean existClearFail=false;
|
|
|
if(ExpressInfoConstant.EXPRESS_CLEAR_SUCCESS.equals(state)){
|
|
|
//清关成功的纪录
|
|
|
expressInfo.setOperateTransferCode(EnumExpressDataOperateTransferCode.express_clear_success.getCode());
|
|
|
}else if(ExpressInfoConstant.EXPRESS_CLEAR_FAIL_CAUSE_PLATFORM.equals(state)){
|
|
|
//清关失败的记录
|
|
|
expressInfo.setOperateTransferCode(EnumExpressDataOperateTransferCode.express_clear_fail_cause_platform.getCode());
|
|
|
existClearFail=true;
|
|
|
}else if(ExpressInfoConstant.EXPRESS_CLEAR_FAIL_CAUSE_BUYER.equals(state)){
|
|
|
//清关失败的记录
|
|
|
expressInfo.setOperateTransferCode(EnumExpressDataOperateTransferCode.express_clear_fail_cause_buyer.getCode());
|
|
|
existClearFail=true;
|
|
|
}
|
|
|
|
|
|
if(existClearFail){
|
|
|
//异步调用接口 order 退款
|
|
|
LOGGER.info("exist express clear fail call,orderCode {},uid {},waybillCode {},state {} ", orderCode,uid,waybillCode,state);
|
|
|
|
|
|
}
|
|
|
expressInfoMapper.insert(expressInfo);
|
|
|
|
|
|
updateSellerDeliverStatusAfterInsertExpress(orderCode,expressInfo);
|
...
|
...
|
@@ -169,6 +187,7 @@ private static final Logger LOGGER = LoggerUtils.getMqConsumerLogger(); |
|
|
// TODO 鉴定中心到买家的 ,需要确认收货的,需要调用
|
|
|
if(expressType!=null&&EnumExpressType.EXPRESS_TYPE_2.getCode().intValue()==expressType.intValue()){
|
|
|
//调用确认收货接口 method=ufo.buyer.confirm
|
|
|
LOGGER.info("handle accept express,orderCode {},uid {},waybillCode {},state {} ", orderCode,uid,waybillCode,state);
|
|
|
|
|
|
}
|
|
|
processExpressInfo( state, logisticsType, orderCode, waybillCode, acceptAddress, acceptRemark, createTime, uid, expressType);
|
...
|
...
|
|