|
@@ -479,6 +479,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
OrderProductPo dbProduct = submitMapper.getProductDetails(productId);
|
|
|
OrderProductPo product = new OrderProductPo();
|
|
|
BeanUtils.copyProperties(dbProduct, product);
|
|
|
+ log.info("splitcode-----------------------》"+product.getSplitCode());
|
|
|
if (null == product) {
|
|
|
return ResponseJson.error("订单商品不存在!", null);
|
|
|
}
|
|
@@ -1091,11 +1092,11 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
if (onlinePay.get()) {
|
|
|
//在店铺满减算完之后重新根据商品的splitCode排shopOrderList
|
|
|
List<OrderShopPo> shops = submitMapper.findShops(productIdList);
|
|
|
+ log.info("线上供应商splitcode----------->"+shops.toString());
|
|
|
//子订单分多子订单,满减分摊到原子订单分开的子订单,无满减重算佣金/应付
|
|
|
-// if (shops.size() != shopOrderList.size()) {
|
|
|
- //重组订单
|
|
|
- findSplitShopOrder(orderProductList, shopOrderList, shops, orderParamBo);
|
|
|
-// }
|
|
|
+ //重组订单
|
|
|
+ shopOrderList= findSplitShopOrder(orderProductList, shopOrderList, shops, orderParamBo);
|
|
|
+ log.info("赋值后的shop------------------》"+shopOrderList.toString());
|
|
|
//线上支付分摊优惠总和到子订单
|
|
|
//经理折扣+优惠券+满减 提交订单的时候无经理折扣
|
|
|
double allDiscount = MathUtil.add(couponAmount, promotionFullReduction.get()).doubleValue();
|
|
@@ -1623,7 +1624,7 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
return ResponseJson.success("操作成功!", info);
|
|
|
}
|
|
|
|
|
|
- private void findSplitShopOrder(List<OrderProductPo> orderProductList, List<OrderShopPo> shopOrderList, List<OrderShopPo> shops, OrderParamBo orderParamBo) {
|
|
|
+ private List<OrderShopPo> findSplitShopOrder(List<OrderProductPo> orderProductList, List<OrderShopPo> shopOrderList, List<OrderShopPo> shops, OrderParamBo orderParamBo) {
|
|
|
//统计拆分的shop
|
|
|
//List<OrderShopPo> collect = shops.stream().filter(s -> shops.stream().filter(so -> so.getShopId().equals(s.getShopId())).count() > 1).collect(Collectors.toList());
|
|
|
//对拆分的shop重新计算子订单佣金,应付,不计入店铺满减
|
|
@@ -1719,10 +1720,8 @@ public class SubmitServiceImpl implements SubmitService {
|
|
|
shopOrder.setOrderType(1);
|
|
|
}
|
|
|
orderShopPos.add(shopOrder);
|
|
|
- //把原shoporderlist拆分的shop剔除,加入拆分后的shop
|
|
|
-// shopOrderList.removeIf(s -> s.getShopId().equals(shopOrder.getShopId()));
|
|
|
}
|
|
|
- shopOrderList=orderShopPos;
|
|
|
+ return orderShopPos;
|
|
|
}
|
|
|
|
|
|
/**
|