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 {
AddressInfo getHiddenAddressInfo(int uid, long orderCode);
CustomsClearanceResult getCustomsClearanceResult(int uid, long orderCode);
/**
* 获取召回地址
* @param uid
* @param orderCode
* @return
*/
AddressInfo getRecallAddressInfo(int uid, long orderCode);
}
... ...
... ... @@ -180,7 +180,7 @@ public class DepositOrderService {
DepositDetailBo depositDetailBo = depositService.convert(storageDeposit);
AddressInfo addressInfo = buyerOrderMetaService.getHiddenAddressInfo(req.getUid(), storageDeposit.getOrderCode());
AddressInfo addressInfo = buyerOrderMetaService.getRecallAddressInfo(req.getUid(), storageDeposit.getOrderCode());
GoodsInfo goodsInfo = getGoodsInfo(storageDeposit.getSkup()); // 查询购买商品的详细信息
... ...
... ... @@ -140,4 +140,24 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService {
return ccr;
}
/**
* 优先取召回地址,如果没有取到就取默认发货地址
* @param uid
* @param orderCode
* @return
*/
@Override
public AddressInfo getRecallAddressInfo(int uid, long orderCode){
BuyerOrderMeta recallAddress = getBuyerOrderMeta(uid, orderCode, MetaKey.RECALL_HIDDEN_ADDRESS);
AddressInfo userAddress = null;
if (null == recallAddress) {
recallAddress = getBuyerOrderMeta(uid, orderCode, MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS);
}
if ( null != recallAddress && StringUtils.isNotBlank(recallAddress.getMetaValue())){
userAddress = JSONObject.parseObject(recallAddress.getMetaValue(), AddressInfo.class);
}
return userAddress;
}
}
... ...