Authored by chenjian

Merge branch 'dev-offline-buy' into test6.8.5

# Conflicts:
#	order/src/main/java/com/yohoufo/order/model/response/OfflinePaymentResponse.java
... ... @@ -18,7 +18,7 @@ public class OfflinePaymentResponse extends PaymentResponse {
offlinePaymentResponse.setPaymentWay(paymentResponse.getPaymentWay());
offlinePaymentResponse.setDeliveryWay(paymentResponse.getDeliveryWay());
offlinePaymentResponse.setPromotionFormulaList(paymentResponse.getPromotionFormulaList());
offlinePaymentResponse.setDamagesDesc("请确保您可到指定地点进行提货,并在支付前检查商品是否完好。店内购买商品若无质量问题不支持退换。");
offlinePaymentResponse.setDamagesDesc("店内闪购:请确保您可到指定地点进行提货,并在支付前检查商品是否完好。店内购买商品若无质量问题不支持退换。");
return offlinePaymentResponse;
}
... ...
... ... @@ -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());
}
}
}
... ...
... ... @@ -103,6 +103,8 @@ public class OfflineShoppingServiceImpl extends ShoppingServiceImpl implements I
storeAddress.setAddress(storeInfoBo.getStoreAddress());
storeAddress.setAreaCode("320102"); //这里写死南京市玄武区,避免后台报错
storeAddress.setStoreId(storeInfoBo.getStoreId());
storeAddress.setStoreName(storeInfoBo.getStoreName());
return Pair.of(storeAddress, storeAddress);
}
... ...