Authored by wujiexiang

Merge branch 'master' of http://git.yoho.cn/ufo/yohoufo-fore into dev-seller-order-stat-6.9.9

@@ -14,4 +14,12 @@ public interface IBuyerOrderMetaService { @@ -14,4 +14,12 @@ public interface IBuyerOrderMetaService {
14 AddressInfo getHiddenAddressInfo(int uid, long orderCode); 14 AddressInfo getHiddenAddressInfo(int uid, long orderCode);
15 15
16 CustomsClearanceResult getCustomsClearanceResult(int uid, long orderCode); 16 CustomsClearanceResult getCustomsClearanceResult(int uid, long orderCode);
  17 +
  18 + /**
  19 + * 获取召回地址
  20 + * @param uid
  21 + * @param orderCode
  22 + * @return
  23 + */
  24 + AddressInfo getRecallAddressInfo(int uid, long orderCode);
17 } 25 }
@@ -180,7 +180,7 @@ public class DepositOrderService { @@ -180,7 +180,7 @@ public class DepositOrderService {
180 180
181 DepositDetailBo depositDetailBo = depositService.convert(storageDeposit); 181 DepositDetailBo depositDetailBo = depositService.convert(storageDeposit);
182 182
183 - AddressInfo addressInfo = buyerOrderMetaService.getHiddenAddressInfo(req.getUid(), storageDeposit.getOrderCode()); 183 + AddressInfo addressInfo = buyerOrderMetaService.getRecallAddressInfo(req.getUid(), storageDeposit.getOrderCode());
184 184
185 GoodsInfo goodsInfo = getGoodsInfo(storageDeposit.getSkup()); // 查询购买商品的详细信息 185 GoodsInfo goodsInfo = getGoodsInfo(storageDeposit.getSkup()); // 查询购买商品的详细信息
186 186
@@ -140,4 +140,24 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService { @@ -140,4 +140,24 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService {
140 return ccr; 140 return ccr;
141 } 141 }
142 142
  143 + /**
  144 + * 优先取召回地址,如果没有取到就取默认发货地址
  145 + * @param uid
  146 + * @param orderCode
  147 + * @return
  148 + */
  149 + @Override
  150 + public AddressInfo getRecallAddressInfo(int uid, long orderCode){
  151 + BuyerOrderMeta recallAddress = getBuyerOrderMeta(uid, orderCode, MetaKey.RECALL_HIDDEN_ADDRESS);
  152 +
  153 + AddressInfo userAddress = null;
  154 + if (null == recallAddress) {
  155 + recallAddress = getBuyerOrderMeta(uid, orderCode, MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS);
  156 + }
  157 +
  158 + if ( null != recallAddress && StringUtils.isNotBlank(recallAddress.getMetaValue())){
  159 + userAddress = JSONObject.parseObject(recallAddress.getMetaValue(), AddressInfo.class);
  160 + }
  161 + return userAddress;
  162 + }
143 } 163 }