Parcourir la source

赠品计算付供应商

huangzhiguo il y a 1 an
Parent
commit
c81cce7759

+ 4 - 4
src/main/java/com/caimei365/order/components/ProductService.java

@@ -252,15 +252,15 @@ public class ProductService {
                                 // 含有包邮的规则
                                 if (1 == freightRule.getFreeType()) {
                                     if (0 == freightRule.getFreeCondition()) {
-                                        // 满足数量
+                                        // 满足数量 包邮
                                         if (num >= freightRule.getProductNum()) {
-                                            postage.set(MathUtil.sub(postage.get(), freightRule.getFreightAmount()).doubleValue());
+                                            postage.set(MathUtil.sub(postage.get(), 0).doubleValue());
                                             postageFlag = 0;
                                         }
                                     } else {
-                                        // 满足金额
+                                        // 满足金额 包邮
                                         if (amount >= freightRule.getAllAmount()) {
-                                            postage.set(MathUtil.sub(postage.get(), freightRule.getFreightAmount()).doubleValue());
+                                            postage.set(MathUtil.sub(postage.get(), 0).doubleValue());
                                             postageFlag = 0;
                                         }
                                     }

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

@@ -723,7 +723,6 @@ public class CartSellerServiceImpl implements CartSellerService {
                         shop.setPostageFlag(0);
                     }
                     shop.setPostage(shopPostage.get());
-                    shop.setColdChain(coldChain.get());
                     if (0 != coldChain.get()) {
                         shop.setIsColdChina(true);
                     } else {
@@ -738,6 +737,7 @@ public class CartSellerServiceImpl implements CartSellerService {
                     // 总运费
                     // 包邮或者到付 冷链费为 0
                     coldChain.set(0 == shop.getPostage() ? 0 : coldChain.get());
+                    shop.setColdChain(coldChain.get());
                     shop.setPostage(MathUtil.sub(shop.getPostage(),coldChain.get()).doubleValue());
                     // 供应商总金额
                     shopPrice.set(MathUtil.add(MathUtil.add(shopPrice.get(), shop.getPostage()), coldChain.get()).doubleValue());

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

@@ -1497,7 +1497,8 @@ public class SubmitServiceImpl implements SubmitService {
                  *  当前版本付供应商应-促销活动,优惠券金额,因为当前版本所有优惠为商家优惠
                  */
                 if (null != s.getPromotionFullReduction() && s.getPromotionFullReduction() > 0) {
-                    s.setShopProductAmount(s.getShopProductAmount() - s.getPromotionFullReduction());
+                    // 不直接作用付供应商商品费 作用于付供应商
+                    // s.setShopProductAmount(s.getShopProductAmount() - s.getPromotionFullReduction());
                     s.setShouldPayShopAmount(s.getShouldPayShopAmount() - s.getPromotionFullReduction());
                     submitMapper.updateShopOrderCoupon(s);
                 }
@@ -1511,7 +1512,8 @@ public class SubmitServiceImpl implements SubmitService {
                         s.setNeedPayAmount(s.getNeedPayAmount() - finalCoupon.getCouponAmount());
                         s.setTotalAmount(s.getTotalAmount() - finalCoupon.getCouponAmount());
                         s.setRealPay(realPay - finalCoupon.getCouponAmount());
-                        s.setShopProductAmount(s.getShopProductAmount() - finalCoupon.getCouponAmount());
+                        // 不直接作用付供应商商品费 作用于付供应商
+                        // s.setShopProductAmount(s.getShopProductAmount() - finalCoupon.getCouponAmount());
                         s.setShouldPayShopAmount(s.getShouldPayShopAmount() - finalCoupon.getCouponAmount());
                         submitMapper.updateShopOrderCoupon(s);
                     }

+ 2 - 1
src/main/resources/mapper/ReceiptMapper.xml

@@ -1267,7 +1267,8 @@
                         cso.orderTime,
                         cso.orderSubmitType,
                         cso.payStatus,
-                        cso.sendOutStatus,
+                        ifnull(cso.sendOutStatus, 1) as sendOutStatus,
+                        ifnull(cso.receiptStatus, 1) as receiptStatus,
                         cso.splitFlag,
                         cso.shopOtherFee,
                         cso.orderType,