From 89993b9be55d530469da604de637a0c7644f768d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Mon, 22 Jul 2024 17:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TransactionBillServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java index d310214b..693e3c78 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillServiceImpl.java @@ -244,16 +244,16 @@ public class TransactionBillServiceImpl implements TransactionBillService { BigDecimal arrivalAmount = order.getMoney();// 订单商户到账金额 // 月费商户才出账 -// if (UserServiceType.MONTH.getType().equals(mch.getServiceType())) { -// int count = receiveBillService.genBillByMonth(mch, YearMonth.now()); -// ServiceUtil.assertion(count == 0, "商户出账失败,请刷新后重试"); -// } -// // 其他一律为收取服务费 -// else { + if (UserServiceType.MONTH.getType().equals(mch.getServiceType())) { + int count = receiveBillService.genBillByMonth(mch, YearMonth.now()); + ServiceUtil.assertion(count == 0, "商户出账失败,请刷新后重试"); + } + // 其他一律为收取服务费 + else { BigDecimal serviceRate = this.getServiceRate(order.getDeviceId(), order.getChannelId()); serviceCharge = serviceRate.multiply(order.getMoney()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP); // 服务费 arrivalAmount = order.getMoney().subtract(serviceCharge); // 商户最终到账的金额 = 交易金额 - 服务费 -// } + } order.setArrivalAmount(arrivalAmount); order.setServiceCharge(serviceCharge); }