Browse Source

Merge remote-tracking branch 'origin/developerD' into developerD

zhijiezhao 1 year ago
parent
commit
1309402b99

+ 9 - 3
src/main/java/com/caimei365/order/service/impl/CartClubServiceImpl.java

@@ -1194,7 +1194,9 @@ public class CartClubServiceImpl implements CartClubService {
                             shop.setIsColdChina(false);
                         }
                         // 运费
-                        shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain).doubleValue());
+                        // 包邮或者到付 冷链费为 0
+                        coldChain = 0 == shop.getPostage() ? 0 : coldChain;
+                        shop.setPostage(MathUtil.sub(shop.getPostage(), coldChain).doubleValue());
                         log.info("shop.getPostage()******"+shop.getPostage());
                         // 供应商总金额
                         shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()),coldChain).doubleValue());
@@ -1672,7 +1674,9 @@ public class CartClubServiceImpl implements CartClubService {
                             }
                         }*/
                         // 总运费
-                        shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain).doubleValue());
+                        // 包邮或者到付 冷链费为 0
+                        coldChain = 0 == shop.getPostage() ? 0 : coldChain;
+                        shop.setPostage(MathUtil.sub(shop.getPostage(), coldChain).doubleValue());
                         // 供应商总金额
                         shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()),coldChain).doubleValue());
                         if (shopKindCount.get() > 0) {
@@ -2071,7 +2075,9 @@ public class CartClubServiceImpl implements CartClubService {
             }
         }*/
         // 总运费
-        shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain).doubleValue());
+        // 包邮或者到付 冷链费为 0
+        coldChain = 0 == shop.getPostage() ? 0 : coldChain;
+        shop.setPostage(MathUtil.sub(shop.getPostage(), coldChain).doubleValue());
         // 供应商总金额
         totalPrice.set(MathUtil.add(MathUtil.add(totalPrice.get(), shop.getPostage()), coldChain).doubleValue());
         // 商品总金额累加

+ 3 - 1
src/main/java/com/caimei365/order/service/impl/CartSellerServiceImpl.java

@@ -736,7 +736,9 @@ public class CartSellerServiceImpl implements CartSellerService {
                         }
                     }*/
                     // 总运费
-                    shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain.get()).doubleValue());
+                    // 包邮或者到付 冷链费为 0
+                    coldChain.set(0 == shop.getPostage() ? 0 : coldChain.get());
+                    shop.setPostage(MathUtil.sub(shop.getPostage(),coldChain.get()).doubleValue());
                     // 供应商总金额
                     shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()), coldChain.get()).doubleValue());
                     if (shopKindCount.get() > 0) {

+ 5 - 1
src/main/java/com/caimei365/order/service/impl/SubmitServiceImpl.java

@@ -685,6 +685,8 @@ public class SubmitServiceImpl implements SubmitService {
                             product.setActProduct(1);
                             if (null != promotions && promotions.getType() == 1 && promotions.getMode() == 1) {
                                 discountPrice = promotions.getTouchPrice();
+                                // 单品促销 作用到付供应商
+                                productPrice = promotions.getTouchPrice();
                             }
                         }
 
@@ -701,6 +703,8 @@ public class SubmitServiceImpl implements SubmitService {
                             for (LadderPriceVo ladderPrice : ladderPrices) {
                                 if (productNum >= ladderPrice.getBuyNum()) {
                                     discountPrice = ladderPrice.getBuyPrice();
+                                    // 有阶梯价 作用到付供应商
+                                    productPrice = ladderPrice.getBuyPrice();
                                 }
                             }
                             product.setLadderPrices(ladderPrices);
@@ -946,7 +950,7 @@ public class SubmitServiceImpl implements SubmitService {
                 }
                 // 加入订单商品列表
                 // 商品价格设置为 折后价格
-                product.setPrice(product.getDiscountPrice());
+                // product.setPrice(product.getDiscountPrice());
                 orderProductList.add(product);
                 productIdList.add(product.getProductId().toString());
                 skuIdList.add(product.getSkuId().toString());