فهرست منبع

去除公用方法线上/线下判断

zhijiezhao 3 سال پیش
والد
کامیت
96708ac639
1فایلهای تغییر یافته به همراه30 افزوده شده و 30 حذف شده
  1. 30 30
      src/main/java/com/caimei365/order/components/OrderCommonService.java

+ 30 - 30
src/main/java/com/caimei365/order/components/OrderCommonService.java

@@ -132,39 +132,39 @@ public class OrderCommonService {
             //返佣款
             if (!order.getShopOrderIds().contains(",")) {
                 Double tempAmount = orderCommonMapper.getRebateAmountByShopOrder(Integer.parseInt(order.getShopOrderIds()));
-                if (null == tempAmount) {
-                    order.setOnlinePayFlag(0);
-                } else {
-                    order.setOnlinePayFlag(1);
-                }
+//                if (null == tempAmount) {
+//                    order.setOnlinePayFlag(0);
+//                } else {
+//                    order.setOnlinePayFlag(1);
+//                }
             }
         }
         // 判断是否可以走线上支付
-        int offlineCount = orderCommonMapper.countOfflinePayment(order.getOrderId());
-        if (offlineCount > 0) {
-            order.setOnlinePayFlag(1);
-        } else {
-            order.setOnlinePayFlag(0);
-        }
-        //付供应商总金额 + 默认手续费 > 订单总金额
-        Double payTotalFee = order.getPayTotalFee();
-        Double handlingFee = MathUtil.mul(payTotalFee, 0.0038, 2).doubleValue();
-        if (MathUtil.compare(handlingFee, 8) < 0) {
-            handlingFee = 8d;
-        }
-        List<Double> shouldPayShopAmount = orderCommonMapper.getShouldPayShopAmountList(order.getOrderId());
-        if (!shouldPayShopAmount.isEmpty()) {
-            AtomicDouble finalHandlingFee = new AtomicDouble(handlingFee);
-            shouldPayShopAmount.forEach(amount -> {
-                finalHandlingFee.set(MathUtil.add(finalHandlingFee.get(), amount).doubleValue());
-            });
-            handlingFee = finalHandlingFee.get();
-        }
-        if (MathUtil.compare(payTotalFee, handlingFee) < 0) {
-            order.setPayButton(true);
-        } else {
-            order.setPayButton(false);
-        }
+//        int offlineCount = orderCommonMapper.countOfflinePayment(order.getOrderId());
+//        if (offlineCount > 0) {
+//            order.setOnlinePayFlag(1);
+//        } else {
+//            order.setOnlinePayFlag(0);
+//        }
+//        //付供应商总金额 + 默认手续费 > 订单总金额
+//        Double payTotalFee = order.getPayTotalFee();
+//        Double handlingFee = MathUtil.mul(payTotalFee, 0.0038, 2).doubleValue();
+//        if (MathUtil.compare(handlingFee, 8) < 0) {
+//            handlingFee = 8d;
+//        }
+//        List<Double> shouldPayShopAmount = orderCommonMapper.getShouldPayShopAmountList(order.getOrderId());
+//        if (!shouldPayShopAmount.isEmpty()) {
+//            AtomicDouble finalHandlingFee = new AtomicDouble(handlingFee);
+//            shouldPayShopAmount.forEach(amount -> {
+//                finalHandlingFee.set(MathUtil.add(finalHandlingFee.get(), amount).doubleValue());
+//            });
+//            handlingFee = finalHandlingFee.get();
+//        }
+//        if (MathUtil.compare(payTotalFee, handlingFee) < 0) {
+//            order.setPayButton(true);
+//        } else {
+//            order.setPayButton(false);
+//        }
         //待付总金额
         order.setPendingPayments(MathUtil.sub(order.getPayableAmount(), receiptAmount).doubleValue());
         //支付总金额