Authored by chenjian

门店订单收货人

... ... @@ -107,6 +107,9 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO
&& StringUtils.isNotBlank(buyerOrderMeta.getMetaValue())){
userAddress = JSONObject.parseObject(buyerOrderMeta.getMetaValue(), AddressInfo.class);
}
//门店订单特殊处理一下,收货人填写门店
dealConsigneeIfOffline(userAddress);
return userAddress;
}
... ... @@ -157,4 +160,19 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO
Logger getLogger() {
return logger;
}
/**
* 门店订单收货人设置
* @param userAddress
*/
private void dealConsigneeIfOffline(AddressInfo userAddress) {
if(userAddress == null)
return;
//存在门店信息则认为是门店订单,收货人设置为门店地址
if(StringUtils.isEmpty(userAddress.getConsignee()) && userAddress.getStoreId() != null && userAddress.getStoreId() > 0) {
userAddress.setConsignee("提货地址:" + userAddress.getStoreName());
}
}
}
... ...
... ... @@ -102,6 +102,8 @@ public class OfflineShoppingServiceImpl extends ShoppingServiceImpl implements I
storeAddress.setUid(offlineShoppingRequest.getUid());
storeAddress.setAddress(storeInfoBo.getStoreAddress());
storeAddress.setStoreId(storeInfoBo.getStoreId());
storeAddress.setStoreName(storeInfoBo.getStoreName());
return Pair.of(storeAddress, storeAddress);
}
... ...