| | |
| | | return fail("密码不正确", null); |
| | | } |
| | | |
| | | int onlineUser = scheduleService.countOnlineUsers(); |
| | | if (onlineUser >= SettingData.MAX_USER_LOGIN) { |
| | | return fail("达到用户访问量上限,拒绝登录", null); |
| | | } |
| | | |
| | | LoginEntity le = loginService.getNewLogin(ue.getId(), 1, 1, 1, req); |
| | | Integer rows = loginService.insertLogin(le); |
| | | if (rows == 0) { |
| | |
| | | |
| | | tokenService.saveToken(ue, te, req, res); |
| | | |
| | | return success(te); |
| | | int onlineUser = scheduleService.countOnlineUsers(); |
| | | String msg = onlineUser >= SettingData.MAX_USER_LOGIN ? "警告:系统已经到达用户访问量的上限!" : ""; |
| | | |
| | | return success(msg, te); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |