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