|
|
|
@@ -388,15 +388,17 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
|
Map<String,WxComposeChildOrderShare> childShares = new HashMap<String,WxComposeChildOrderShare>(); |
|
|
|
OrderAdapterService orderAdapterService = orderFactory.getOrderAdapterService(composeOrder.getComposeOrderType()); |
|
|
|
List<WxOrder> orderList = orderAdapterService.getChildOrders(composeOrder, appInfo.getTenantId()); |
|
|
|
for (WxOrder o : orderList) { |
|
|
|
WxCoupon coupon = wxCouponMapper.selectById(o.getProductId(), appInfo.getTenantId()); |
|
|
|
WxComposeChildOrderPrice price = orderAdapterService.getChildOrderPrice(coupon, false, o.getOrderGroupId(), o.getCouponNumber()); |
|
|
|
int orderMallCharge = OrderHelper.getMallCharge(price.getRealPayMent(), payAccount); |
|
|
|
Integer orderShareAmount = price.getRealPayMent() - orderMallCharge; |
|
|
|
Integer orderRateAmount = OrderHelper.getRateAmount(price.getRealPayMent(),orderMallCharge, payAccount); |
|
|
|
childShares.put(String.valueOf(o.getId()), new WxComposeChildOrderShare(price.getRealPayMent(), orderShareAmount, orderRateAmount)); |
|
|
|
if(null != orderList && orderList.size() > 0) { |
|
|
|
for (WxOrder o : orderList) { |
|
|
|
WxCoupon coupon = wxCouponMapper.selectById(o.getProductId(), appInfo.getTenantId()); |
|
|
|
WxComposeChildOrderPrice price = orderAdapterService.getChildOrderPrice(coupon, false, o.getOrderGroupId(), o.getCouponNumber()); |
|
|
|
int orderMallCharge = OrderHelper.getMallCharge(price.getRealPayMent(), payAccount); |
|
|
|
Integer orderShareAmount = price.getRealPayMent() - orderMallCharge; |
|
|
|
Integer orderRateAmount = OrderHelper.getRateAmount(price.getRealPayMent(),orderMallCharge, payAccount); |
|
|
|
childShares.put(String.valueOf(o.getId()), new WxComposeChildOrderShare(price.getRealPayMent(), orderShareAmount, orderRateAmount)); |
|
|
|
} |
|
|
|
record.setChildOrderShare(JSON.toJSONString(childShares)); |
|
|
|
} |
|
|
|
record.setChildOrderShare(JSON.toJSONString(childShares)); |
|
|
|
} |
|
|
|
|
|
|
|
int sqlRow = wxPayOrderMapper.insert(record); |
|
|
|
@@ -508,15 +510,17 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
|
Map<String,WxComposeChildOrderShare> childShares = new HashMap<String,WxComposeChildOrderShare>(); |
|
|
|
OrderAdapterService orderAdapterService = orderFactory.getOrderAdapterService(composeOrder.getComposeOrderType()); |
|
|
|
List<WxOrder> orderList = orderAdapterService.getChildOrders(composeOrder, appInfo.getTenantId()); |
|
|
|
for (WxOrder o : orderList) { |
|
|
|
WxCoupon coupon = wxCouponMapper.selectById(o.getProductId(), appInfo.getTenantId()); |
|
|
|
WxComposeChildOrderPrice price = orderAdapterService.getChildOrderPrice(coupon, false, o.getOrderGroupId(), o.getCouponNumber()); |
|
|
|
int orderMallCharge = OrderHelper.getMallCharge(price.getRealPayMent(), payAccount); |
|
|
|
Integer orderShareAmount = price.getRealPayMent() - orderMallCharge; |
|
|
|
Integer orderRateAmount = PayUtils.getPayRate(price.getRealPayMent(), payAccount.getRealRate(), true); |
|
|
|
childShares.put(String.valueOf(o.getId()), new WxComposeChildOrderShare(price.getRealPayMent(), orderShareAmount, orderRateAmount)); |
|
|
|
if (null != orderList && orderList.size() > 0 ) { |
|
|
|
for (WxOrder o : orderList) { |
|
|
|
WxCoupon coupon = wxCouponMapper.selectById(o.getProductId(), appInfo.getTenantId()); |
|
|
|
WxComposeChildOrderPrice price = orderAdapterService.getChildOrderPrice(coupon, false, o.getOrderGroupId(), o.getCouponNumber()); |
|
|
|
int orderMallCharge = OrderHelper.getMallCharge(price.getRealPayMent(), payAccount); |
|
|
|
Integer orderShareAmount = price.getRealPayMent() - orderMallCharge; |
|
|
|
Integer orderRateAmount = PayUtils.getPayRate(price.getRealPayMent(), payAccount.getRealRate(), true); |
|
|
|
childShares.put(String.valueOf(o.getId()), new WxComposeChildOrderShare(price.getRealPayMent(), orderShareAmount, orderRateAmount)); |
|
|
|
} |
|
|
|
record.setChildOrderShare(JSON.toJSONString(childShares)); |
|
|
|
} |
|
|
|
record.setChildOrderShare(JSON.toJSONString(childShares)); |
|
|
|
} |
|
|
|
|
|
|
|
int sqlRow = wxPayOrderMapper.insert(record); |
|
|
|
|