Authored by chenchao

fix clone recall address

@@ -105,8 +105,14 @@ public class QuickDeliverPublishProcessor implements PublishProcessor<QuickDeliv @@ -105,8 +105,14 @@ public class QuickDeliverPublishProcessor implements PublishProcessor<QuickDeliv
105 AddressInfo hiddenBackAddress = null; 105 AddressInfo hiddenBackAddress = null;
106 AddressInfo noHiddenBackAddress = null; 106 AddressInfo noHiddenBackAddress = null;
107 if(serviceOrderProcessor.isGoodsServiceOrder(orderCode)){ 107 if(serviceOrderProcessor.isGoodsServiceOrder(orderCode)){
108 - hiddenBackAddress = appraiseOrderMetaService.getHidderUserAddress(orderCode);  
109 - noHiddenBackAddress = appraiseOrderMetaService.getNoHidderUserAddress(orderCode); 108 + ServiceOrderProcessor.ExistenceNode existenceNode = serviceOrderProcessor.isAppraiseOrder(orderCode);
  109 + if (!existenceNode.isExisted()){
  110 + logger.warn(" buildPublishCtx fail , req {} StorageDeposit {}", qdosr, sd);
  111 + throw new UfoServiceException(501, "寄存商品支付订单丢失");
  112 + }
  113 + Long parentOrderCode = existenceNode.getAppraiseOrder().getParentOrderCode();
  114 + hiddenBackAddress = appraiseOrderMetaService.getHidderUserAddress(parentOrderCode);
  115 + noHiddenBackAddress = appraiseOrderMetaService.getNoHidderUserAddress(parentOrderCode);
110 }else{ 116 }else{
111 hiddenBackAddress = buyerOrderMetaService.getHiddenAddressInfo(uid, orderCode); 117 hiddenBackAddress = buyerOrderMetaService.getHiddenAddressInfo(uid, orderCode);
112 noHiddenBackAddress = buyerOrderMetaService.getAddressInfo(uid, orderCode); 118 noHiddenBackAddress = buyerOrderMetaService.getAddressInfo(uid, orderCode);
  1 +package com.yohoufo.order.service.seller.quickDeliver;
  2 +
  3 +import com.yohobuy.ufo.model.order.constants.SkupType;
  4 +import com.yohobuy.ufo.model.order.req.QuickDeliverOrderSubmitReq;
  5 +import com.yohoufo.order.BaseWebTest;
  6 +import org.junit.Test;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +
  9 +public class QuickDeliverPublishProcessorTest extends BaseWebTest {
  10 +
  11 + @Autowired
  12 + private QuickDeliverPublishProcessor quickDeliverPublishProcessor;
  13 +
  14 +
  15 + @Test
  16 + public void test(){
  17 + QuickDeliverOrderSubmitReq req = QuickDeliverOrderSubmitReq.builder()
  18 + .uid(500031424)
  19 + .storageId(500031424)
  20 + .price("129")
  21 + .num(1)
  22 + .skupTypeCode(SkupType.QUICK_DELIVER.getCode())
  23 + .build();
  24 + quickDeliverPublishProcessor.buildPublishCtx(req);
  25 + }
  26 +}