فهرست منبع

采美豆抵扣不生成运费子订单

zhijiezhao 3 سال پیش
والد
کامیت
da37f99818
1فایلهای تغییر یافته به همراه9 افزوده شده و 8 حذف شده
  1. 9 8
      src/main/java/com/caimei365/order/service/impl/SubmitServiceImpl.java

+ 9 - 8
src/main/java/com/caimei365/order/service/impl/SubmitServiceImpl.java

@@ -482,7 +482,7 @@ public class SubmitServiceImpl implements SubmitService {
                 OrderProductPo dbProduct = submitMapper.getProductDetails(productId);
                 OrderProductPo product = new OrderProductPo();
                 BeanUtils.copyProperties(dbProduct, product);
-                log.info("splitcode-----------------------》"+product.getSplitCode());
+                log.info("splitcode-----------------------》" + product.getSplitCode());
                 if (null == product) {
                     return ResponseJson.error("订单商品不存在!", null);
                 }
@@ -774,7 +774,7 @@ public class SubmitServiceImpl implements SubmitService {
                 // 需要支付金额 shouldPayFee +运费
                 needPayAmount.set(MathUtil.add(needPayAmount.get(), product.getShouldPayFee()).doubleValue());
                 // 不包含单品满减的子订单需付金额
-                realNeedPay.set(MathUtil.add(realNeedPay.get(),product.getRealProductFee()).doubleValue());
+                realNeedPay.set(MathUtil.add(realNeedPay.get(), product.getRealProductFee()).doubleValue());
                 // 统计 总金额 包括税费
                 shopProductFee.set(MathUtil.add(shopProductFee.get(), product.getTotalFee()).doubleValue());
                 // 统计子订单内可参与店铺促销的商品总金额
@@ -1104,8 +1104,8 @@ public class SubmitServiceImpl implements SubmitService {
             List<OrderShopPo> shops = submitMapper.findShops(productIdList);
             //子订单分多子订单,满减分摊到原子订单分开的子订单,无满减重算佣金/应付
             //重组订单
-            shopOrderList= findSplitShopOrder(orderProductList, shopOrderList, shops, orderParamBo);
-            log.info("赋值后的shop------------------》"+shopOrderList.toString());
+            shopOrderList = findSplitShopOrder(orderProductList, shopOrderList, shops, orderParamBo);
+            log.info("赋值后的shop------------------》" + shopOrderList.toString());
             //线上支付分摊优惠总和到子订单
             //经理折扣+优惠券+满减 提交订单的时候无经理折扣
             double allDiscount = MathUtil.add(couponAmount, promotionFullReduction.get()).doubleValue();
@@ -1265,10 +1265,11 @@ public class SubmitServiceImpl implements SubmitService {
             }
         }
 
-        /*
+        /**
          * 设置邮费子订单( 0包邮 -1到付 1遵循运费规则)
+         * 采美豆抵扣后不生成。
          */
-        if (1 == mainOrder.getPostageFlag()) {
+        if (1 == mainOrder.getPostageFlag() && 0 == mainOrder.getUserBeans()) {
             // 获取 邮费商品
             OrderProductPo postageProduct = submitMapper.getProductDetails(999);
             // 生成子订单编号
@@ -1641,8 +1642,8 @@ public class SubmitServiceImpl implements SubmitService {
         //统计拆分的shop
         //List<OrderShopPo> collect = shops.stream().filter(s -> shops.stream().filter(so -> so.getShopId().equals(s.getShopId())).count() > 1).collect(Collectors.toList());
         //对拆分的shop重新计算子订单佣金,应付,不计入店铺满减
-        log.info("原shoporderlist--------------------》"+shopOrderList);
-        log.info("原orderproductlist--------------------》"+orderProductList);
+        log.info("原shoporderlist--------------------》" + shopOrderList);
+        log.info("原orderproductlist--------------------》" + orderProductList);
         ArrayList<OrderShopPo> orderShopPos = new ArrayList<>();
         for (OrderShopPo shop : shops) {
             // 供应商名称