更新9.28

This commit is contained in:
许允枞 2024-09-28 13:50:54 +08:00
parent 8d702bc6e4
commit e2c8c18a3c

View File

@ -254,13 +254,13 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper, Fleet
//判断副卡的类型 1共享副卡-不限额2共享副卡限额3独立副卡 //判断副卡的类型 1共享副卡-不限额2共享副卡限额3独立副卡
switch (fleetMember.getSecondaryCardType()) { switch (fleetMember.getSecondaryCardType()) {
case 1: case 1:
throw new RuntimeException("共享副卡-不限额,暂不支持修改"); return 2;
case 2: case 2:
//查询所有副卡类型为2的所剩额度的和 //查询所有副卡类型为2的所剩额度的和
if (fleetMember.getAdjustType().equals("0")) { if (fleetMember.getAdjustType().equals("0")) {
Double v = fleetInfoService.selectRemainCreditLimit(fleetMember.getFleetId()); Double v = fleetInfoService.selectRemainCreditLimit(fleetMember.getFleetId());
if (v < fleetMember.getAdjustLimit()) { if (v < fleetMember.getAdjustLimit()) {
throw new RuntimeException("当前车队卡剩余额度不足,无法扣除"); return 3;
} }
} }
break; break;
@ -268,11 +268,11 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper, Fleet
if (fleetMember.getAdjustType().equals("0")) { if (fleetMember.getAdjustType().equals("0")) {
FleetInfo fleetInfo = fleetInfoMapper.selectById(fleetMember.getFleetId()); FleetInfo fleetInfo = fleetInfoMapper.selectById(fleetMember.getFleetId());
if (fleetInfo.getTotalBalance() < fleetMember.getAdjustLimit()) { if (fleetInfo.getTotalBalance() < fleetMember.getAdjustLimit()) {
throw new RuntimeException("当前车队卡剩余额度不足,无法扣除"); return 4;
} }
}else { }else {
if (fleetMember1.getRemainingCreditLimit() < fleetMember.getAdjustLimit()) { if (fleetMember1.getRemainingCreditLimit() < fleetMember.getAdjustLimit()) {
throw new RuntimeException("当前副卡剩余额度不足,无法扣除"); return 5;
} }
} }
break; break;