Browse Source

商品费

huangzhiguo 1 year ago
parent
commit
311f23ed38

+ 6 - 2
src/main/java/com/caimei365/order/service/impl/SubmitServiceImpl.java

@@ -628,6 +628,7 @@ public class SubmitServiceImpl implements SubmitService {
                 } else {
                     // 不是赠品,获取商品购买价格(超级会员优惠商品价格>>>活动价格>>>阶梯价格>>>复购价格库>>>商品原始价)
                     Double productPrice = product.getPrice();
+                    Double itemPrice = product.getPrice();
                     Double discountPrice = product.getPrice();
                     // 商品税费
                     Double productTax = 0d;
@@ -685,7 +686,7 @@ public class SubmitServiceImpl implements SubmitService {
                             product.setActProduct(1);
                             if (null != promotions && promotions.getType() == 1 && promotions.getMode() == 1) {
                                 discountPrice = promotions.getTouchPrice();
-                                // 单品促销 作用到付供应商
+                                // 单品促销 作用到付供应商 计算商品费用
                                 productPrice = promotions.getTouchPrice();
                             }
                         }
@@ -703,7 +704,7 @@ public class SubmitServiceImpl implements SubmitService {
                             for (LadderPriceVo ladderPrice : ladderPrices) {
                                 if (productNum >= ladderPrice.getBuyNum()) {
                                     discountPrice = ladderPrice.getBuyPrice();
-                                    // 有阶梯价 作用到付供应商
+                                    // 有阶梯价 作用到付供应商 计算商品费用
                                     productPrice = ladderPrice.getBuyPrice();
                                 }
                             }
@@ -756,6 +757,9 @@ public class SubmitServiceImpl implements SubmitService {
                     Double realProductFee = productFee;
                     // 单个商品总税费
                     Double taxFee = MathUtil.mul(discountTax, productNum).doubleValue();
+                    // 商品售价还原
+                    productPrice = itemPrice;
+                    product.setPrice(productPrice);
                     if (hasActProductFlag && null != promotions) {
                         // 单品促销
                         if (0 == organizeId) {