| | |
| | | modelAndView.setViewName("login"); |
| | | return modelAndView; |
| | | } |
| | | |
| | | |
| | | //用户名错误(找不到用户)或用户无权限则返回登录页面 |
| | | SecUser user = this.secUserService.findValidUserByLoginName(username,loginRoles()); |
| | | |
| | | //谷歌验证码不正确则返回登录页面 |
| | | Syspara para = sysparaService.find("open_google_auth_code"); |
| | | if (null == para || "true".equals(para.getValue())) { |
| | | if (null != para && "true".equals(para.getValue()) && user.isGoogle_auth_bind()) { |
| | | try { |
| | | googleAuthService.checkGoogleAuthCodeForLogin(this.getIp(), username, googleAuthCode, getRequest().getRequestURI()); |
| | | } catch (BusinessException e) { |
| | |
| | | } |
| | | } |
| | | |
| | | //用户名错误(找不到用户)或用户无权限则返回登录页面 |
| | | SecUser user = this.secUserService.findValidUserByLoginName(username,loginRoles()); |
| | | if (null==user) { |
| | | modelAndView.addObject("error", "未找到用户或用户无权限!"); |
| | | modelAndView.setViewName("login"); |