Commit b5105340 by xiaoer.li@freemud.com

优化:混合支付 svc卡全额支付 直接核销优惠券

parent 5d6d1c9a
...@@ -228,7 +228,16 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService { ...@@ -228,7 +228,16 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
} }
// 下单成锁定劵,冻结失败提示下单失败并冲正库存积分等,判断支付渠道,积分和svc卡直接核销,无需锁定10102 = svc卡支付 || 支付金额小于等于0 // 下单成锁定劵,冻结失败提示下单失败并冲正库存积分等,判断支付渠道,积分和svc卡直接核销,无需锁定10102 = svc卡支付 || 支付金额小于等于0
if((!StringUtils.isEmpty(orderBean.getPayChannel()) && orderBean.getPayChannel().equalsIgnoreCase("10102")) || orderBean.getAmount() <=0){ // 混合支付
OrderBean.OrderPayItem svc = null;
if (CollectionUtils.isNotEmpty(orderBean.getOrderPayItem()) && orderBean.getOrderPayItem().size()==1) {
svc = orderBean.getOrderPayItem().stream()
.filter(e ->e.getPayChannelType()!=null && e.getPayChannelType().equals(PayChannelType.SVC.getIndex().intValue()))
.findFirst()
.orElse(null);
}
//svc 或是混合svc支付直接核销
if((!StringUtils.isEmpty(orderBean.getPayChannel()) && orderBean.getPayChannel().equalsIgnoreCase("10102")) || orderBean.getAmount() <=0 || (svc!=null) ){
// 核销优惠券,核销失败提示下单失败并冲正库存积分等 // 核销优惠券,核销失败提示下单失败并冲正库存积分等
CouponRequest couponVerificationRequest = orderSdkAdapter.convert2CouponVerificationRequest(orderBean, accounts); CouponRequest couponVerificationRequest = orderSdkAdapter.convert2CouponVerificationRequest(orderBean, accounts);
if (couponVerificationRequest!=null){ if (couponVerificationRequest!=null){
......
...@@ -3235,7 +3235,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -3235,7 +3235,7 @@ public class OrderServiceImpl implements Orderservice {
.orElse(null); .orElse(null);
//现金+svc 现金 //现金+svc 现金
if (payPlatforms.size()==2 || payPlatforms.size()==1 && cashPay!=null) { if (payPlatforms.size()==2 || (payPlatforms.size()==1 && cashPay!=null)) {
orderPayResponse = orderAdapter.convent2OrderCombPayResponse(combPayResponse.getData().getPayPlatformResponseList(),orderBean.getCompanyId(),storeId); orderPayResponse = orderAdapter.convent2OrderCombPayResponse(combPayResponse.getData().getPayPlatformResponseList(),orderBean.getCompanyId(),storeId);
orderPayResponse.setOpenId(paymentRequest.getOpenId()); orderPayResponse.setOpenId(paymentRequest.getOpenId());
orderPayResponse.setWxAppid(paymentRequest.getWxAppId()); orderPayResponse.setWxAppid(paymentRequest.getWxAppId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment