Authored by qinchao

add 二手瑕疵确认物流

... ... @@ -13,7 +13,9 @@ import com.yohobuy.ufo.model.order.resp.ExpressInfoRespBo;
import com.yohobuy.ufo.model.order.resp.MiniFaultConfirm;
import com.yohobuy.ufo.model.order.resp.MiniFaultForSecondDetail;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohobuy.ufo.model.resp.product.SecondDetailResp;
import com.yohoufo.common.alarm.EventBusPublisher;
import com.yohoufo.common.caller.UfoServiceCaller;
import com.yohoufo.common.constant.ExpressInfoConstant;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.common.utils.DateUtil;
... ... @@ -26,7 +28,6 @@ import com.yohoufo.order.event.BuyerOrderCancelShamDeliveryEvent;
import com.yohoufo.order.event.BuyerOrderSellerDeliveryCheckEvent;
import com.yohoufo.order.event.ErpBuyerOrderEvent;
import com.yohoufo.order.model.response.AppraiseAddressResp;
import com.yohoufo.order.mq.DelayTime;
import com.yohoufo.order.service.IExpressCompanyService;
import com.yohoufo.order.service.IExpressInfoService;
import com.yohoufo.order.service.cache.CacheCleaner;
... ... @@ -103,6 +104,9 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
@Autowired
private OrderOverTimeService orderOverTimeService;
@Autowired
UfoServiceCaller ufoServiceCaller;
private static String EXPRESS_MQ_SEND = "third.logistics.logistics_data";
//物流文案设置
... ... @@ -902,17 +906,35 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
}
private MiniFaultForSecondDetail getSecondDetailInfo(Long orderCode){
BuyerOrder buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
//获取skup
if(buyerOrderGoods==null){
if(buyerOrder==null||buyerOrderGoods==null){
LOGGER.warn("getSecondDetailInfo buyerOrderGoods order not exist, orderCode is {}", orderCode);
return null;
}
//根据skup ,更新鉴定中心
//根据skup
int skup = buyerOrderGoods.getSkup();
return null;
MiniFaultForSecondDetail miniFaultForSecondDetail = null;
if(PrdAttributes.FLAW.getCode()==buyerOrder.getAttributes()||PrdAttributes.SECOND_HAND.getCode()==buyerOrder.getAttributes()){
try {
com.yohoufo.common.ApiResponse resp = ufoServiceCaller.call("ufo.secondhand.secondDetail", com.yohoufo.common.ApiResponse.class, skup);
SecondDetailResp result = (SecondDetailResp) resp.getData();
if(result!=null){
miniFaultForSecondDetail = new MiniFaultForSecondDetail();
miniFaultForSecondDetail.setTitle("卖家上传图片");
miniFaultForSecondDetail.setSndTitle("卖家描述");
miniFaultForSecondDetail.setDesc(result.getDesc());
List<String> urls=new ArrayList<>();
result.getImageInfoList().forEach(e->urls.add(e.getImageUrl()));
miniFaultForSecondDetail.setImageUrlList(urls);
}
} catch (Exception e) {
LOGGER.warn("getSecondDetailInfo call ufo.secondhand.secondDetail error , orderCode is {} ,skup {}", orderCode,skup ,e);
}
}
LOGGER.info("getSecondDetailInfo get orderCode is {} ,skup {} buyerOrder attr {} ,miniFaultForSecondDetail {}", orderCode ,skup,buyerOrder.getAttributes(),miniFaultForSecondDetail);
return miniFaultForSecondDetail;
}
private String buildMiniFaultImgFullUrl(String url) {
... ...