huangzhiguo 1 year ago
parent
commit
7c346968ba

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

@@ -1058,7 +1058,7 @@ public class CartClubServiceImpl implements CartClubService {
                                     coldChain = 0d;
                                 } else {
                                     coldChain = baseMapper.getFreightAmount(cartItemVo.getProductId());
-                                    shop.setPostageFlag(1);
+                                    // shop.setPostageFlag(1);
                                 }
                             }
                             // 设置商品图片及税费
@@ -1194,7 +1194,7 @@ public class CartClubServiceImpl implements CartClubService {
                             shop.setIsColdChina(false);
                         }
                         // 运费
-                        shop.setPostage(MathUtil.sub(shop.getPostage(), coldChain).doubleValue());
+                        shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain).doubleValue());
                         log.info("shop.getPostage()******"+shop.getPostage());
                         // 供应商总金额
                         shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()),coldChain).doubleValue());
@@ -1537,7 +1537,7 @@ public class CartClubServiceImpl implements CartClubService {
                                         coldChain = 0d;
                                     } else {
                                         coldChain = baseMapper.getFreightAmount(cartItemVo.getProductId());
-                                        shop.setPostageFlag(1);
+                                        // shop.setPostageFlag(1);
                                     }
                                 }
                             }
@@ -1672,7 +1672,7 @@ public class CartClubServiceImpl implements CartClubService {
                             }
                         }*/
                         // 总运费
-                        shop.setPostage(MathUtil.sub(shop.getPostage(),coldChain).doubleValue());
+                        shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain).doubleValue());
                         // 供应商总金额
                         shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()),coldChain).doubleValue());
                         if (shopKindCount.get() > 0) {
@@ -2055,7 +2055,7 @@ public class CartClubServiceImpl implements CartClubService {
                     coldChain = 0d;
                 } else {
                     coldChain = baseMapper.getFreightAmount(cartItemVo.getProductId());
-                    shop.setPostageFlag(1);
+                    // shop.setPostageFlag(1);
                     // totalPrice.set(MathUtil.add(totalPrice.get(), coldChain).doubleValue());
                     shop.setIsColdChina(true);
                 }
@@ -2071,7 +2071,7 @@ public class CartClubServiceImpl implements CartClubService {
             }
         }*/
         // 总运费
-        shop.setPostage(MathUtil.sub(shop.getPostage(), coldChain).doubleValue());
+        shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain).doubleValue());
         // 供应商总金额
         totalPrice.set(MathUtil.add(MathUtil.add(totalPrice.get(), shop.getPostage()), coldChain).doubleValue());
         // 商品总金额累加

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

@@ -599,7 +599,7 @@ public class CartSellerServiceImpl implements CartSellerService {
                                 coldChain.set(0);
                             } else {
                                 coldChain.set(baseMapper.getFreightAmount(cartItemVo.getProductId()));
-                                shop.setPostageFlag(1);
+                                // shop.setPostageFlag(1);
                             }
                         }
                         // 设置商品图片及税费
@@ -736,7 +736,7 @@ public class CartSellerServiceImpl implements CartSellerService {
                         }
                     }*/
                     // 总运费
-                    shop.setPostage(MathUtil.sub(shop.getPostage(), coldChain.get()).doubleValue());
+                    shop.setPostage(MathUtil.sub(shop.getPostage(), 0 == shop.getPostage() ? 0 : coldChain.get()).doubleValue());
                     // 供应商总金额
                     shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()), coldChain.get()).doubleValue());
                     if (shopKindCount.get() > 0) {