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 3b6e6cc9..45444c7b 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 @@ -1215,15 +1215,13 @@ public class TransactionBillServiceImpl implements TransactionBillService, After // 计算需要退款的金额,若金额 > 0.01 则申请退款 BigDecimal refundAmount = this.calcRefundAmount(order, endTime, totalEle); if (BigDecimal.valueOf(0.01).compareTo(refundAmount) < 0) { - scheduledExecutorService.schedule(() -> { - // 申请退款 - BillRefundDTO refundDto = new BillRefundDTO(); - refundDto.setBillId(order.getBillId()); - refundDto.setRefundAmount(refundAmount); - refundDto.setRefundReason(String.format("充值订单%s智能退款%s元", order.getBillNo(), refundAmount)); - int refund = this.refund(refundDto); - ServiceUtil.assertion(refund != 1, "申请退款失败"); - }, 0, TimeUnit.SECONDS); + // 申请退款 + BillRefundDTO refundDto = new BillRefundDTO(); + refundDto.setBillId(order.getBillId()); + refundDto.setRefundAmount(refundAmount); + refundDto.setRefundReason(String.format("充值订单%s智能退款%s元", order.getBillNo(), refundAmount)); + int refund = this.refund(refundDto); + ServiceUtil.assertion(refund != 1, "申请退款失败"); } // 清零设备