| | |
| | | String clientIp = getClientIp(request); |
| | | log.info("-----------管理后台当前登录ip:"+clientIp); |
| | | // 定义允许的IP |
| | | String allowedIp = "203.156.25.218"; |
| | | String allowedIp = "110.78.119.146"; |
| | | String rootip = "203.156.25.218"; |
| | | |
| | | // 检查用户名是否为admin001到admin005 |
| | | String userName = loginModel.getUserName(); |
| | |
| | | throw new YamiShopBindException("该账号不允许从当前IP登录"); |
| | | } |
| | | } |
| | | // else if(userName.equals("666666") && !rootip.equals(clientIp)){ |
| | | // // 如果是不允许的IP,抛出异常 |
| | | // if (!allowedIp.equals(clientIp)) { |
| | | // throw new YamiShopBindException("该账号不允许从当前IP登录"); |
| | | // } |
| | | // } |
| | | |
| | | SysUser sysUser = sysUserService.getByUserName(loginModel.getUserName()); |
| | | if (sysUser == null) { |