From 9ad6fcb18d551281b0b05717e7f1e11c8cda3189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Wed, 16 Oct 2024 09:44:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B010.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FleetInfoServiceImpl.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java index 1e3edd103..353559f07 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/fleet/service/impl/FleetInfoServiceImpl.java @@ -415,6 +415,7 @@ public class FleetInfoServiceImpl extends ServiceImpl() .eq(AllOrderInfo::getId, orderId)); + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); if (ObjectUtil.isEmpty(allOrderInfo)) { throw new RuntimeException("订单不存在"); } @@ -432,6 +433,14 @@ public class FleetInfoServiceImpl extends ServiceImpl() + .eq(FleetMember::getId, fleetConsumeRecord.getFleetMemberId())); + //判断成员的余额是否足够支付 + if (money > fleetMember.getRemainingCreditLimit()) { + throw new RuntimeException("支付金额超过当前余额"); + } + //更新时间 DateTime now = DateUtil.date(); @@ -444,13 +453,22 @@ public class FleetInfoServiceImpl extends ServiceImpl