Browse Source

修改订单bugfix

zhijiezhao 1 year ago
parent
commit
2ceca1ce81

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

@@ -2014,7 +2014,7 @@ public class SubmitServiceImpl implements SubmitService {
                 // 统计 总金额 包括税费
                 shopProductFee.set(MathUtil.add(shopProductFee.get(), product.getRealProductFee()).doubleValue());
                 // 再勾选冷链费时
-                if (1 == oldShop.get(0).getIsColdChina() && product.getProductId() == 7550 ) {
+                if (1 == oldShop.get(0).getIsColdChina() && product.getProductId() == 7550) {
                     isColdChina.set(MathUtil.add(isColdChina.get(), 700).doubleValue());
                 }
                 // 商品总金额
@@ -2447,7 +2447,7 @@ public class SubmitServiceImpl implements SubmitService {
             Double singleShopFee = MathUtil.add(product.getCostPrice(), shopTax).doubleValue();
             product.setSingleShopFee(singleShopFee);
             // 应付供应商(总)=应付供应商(单) * 商品数量
-            Double shopFee = MathUtil.add(product.getCostPrice(), shopTax).doubleValue();
+            Double shopFee = MathUtil.mul(singleShopFee, productNum).doubleValue();
             product.setShopFee(shopFee);
             // 付第三方,默认0
             product.setOtherFee(0d);

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

@@ -441,7 +441,8 @@
             shouldPayTotalTax       = #{shouldPayTotalTax},
             singleShouldPayTotalTax = #{singleShouldPayTotalTax},
             shopProductAmount       = #{shopProductAmount},
-            singleShopFee           = #{singleShopFee}
+            singleShopFee           = #{singleShopFee},
+            shopFee                 = #{shopFee}
         where orderProductId = #{orderProductId}
     </update>
     <update id="updateShopOrder">