Commit ed634944 by huangjy

fix:声网管理pid

parent fe42766d
...@@ -852,7 +852,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev ...@@ -852,7 +852,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
} }
saasPidManage.setUsedCredit(Math.min(saasPidManage.getUsedCredit() + 1,saasPidManage.getTotalCredit())); saasPidManage.setUsedCredit(Math.min(saasPidManage.getUsedCredit() + 1,saasPidManage.getTotalCredit()));
saasPidManage.setAvailableCredit(Math.max(saasPidManage.getAvailableCredit() - 1,0)); saasPidManage.setAvailableCredit(Math.max(saasPidManage.getAvailableCredit() - 1,0));
if (Objects.equals(saasPidManage.getAvailableCredit(), saasPidManage.getUsedCredit())) { if (Objects.equals(saasPidManage.getTotalCredit(), saasPidManage.getUsedCredit())) {
saasPidManage.setStatus("0"); saasPidManage.setStatus("0");
} }
saasPidManageService.updateById(saasPidManage); saasPidManageService.updateById(saasPidManage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment