| | |
| | | public ResultUtil<LoginWarpper> driverLogin(String phone, String password) throws Exception { |
| | | Integer frequency = loginFailures.get(phone); |
| | | Long time = loginTime.get(phone); |
| | | if(null != time && System.currentTimeMillis() < (time + 1800000) && null != frequency && frequency >= 5){ |
| | | return ResultUtil.error("暂时无法登录,请30分钟后重试!"); |
| | | if(null != time && System.currentTimeMillis() < (time + 600000) && null != frequency && frequency >= 5){ |
| | | return ResultUtil.error("暂时无法登录,请10分钟后重试!"); |
| | | } |
| | | if(null != time && System.currentTimeMillis() >= (time + 1800000)){ |
| | | if(null != time && System.currentTimeMillis() >= (time + 600000)){ |
| | | frequency = 0; |
| | | loginFailures.put(phone, frequency); |
| | | } |