Merge remote-tracking branch 'origin/debug'
This commit is contained in:
commit
7fa4290e7f
|
@ -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, "申请退款失败");
|
||||
}
|
||||
|
||||
// 清零设备
|
||||
|
|
Loading…
Reference in New Issue
Block a user