| | |
| | | /** |
| | | * 跳转到主页 |
| | | */ |
| | | @RequestMapping(value = "/", method = RequestMethod.GET) |
| | | @RequestMapping(value = "/login", method = RequestMethod.GET) |
| | | public String index(Model model, HttpServletRequest request) throws UnsupportedEncodingException { |
| | | //session中解析用户数据 |
| | | HttpSession session = request.getSession(); |
| | |
| | | null == user.getPassWordUpdate() |
| | | || user.getPassWordUpdate().getTime() + 7776000000L <= System.currentTimeMillis() |
| | | ? "您的密码已经90天未更换了,请及时更换密码!!!" : ""); |
| | | redisUtil.setStrValue(loginUser.getOnconUUID(), JSON.toJSONString(shiroUser), 600); |
| | | redisUtil.setStrValue(loginUser.getOnconUUID(), JSON.toJSONString(shiroUser), 36000); |
| | | return "/index.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到登录页面 |
| | | */ |
| | | @RequestMapping(value = "/login", method = RequestMethod.GET) |
| | | public String login(Model model) { |
| | | model.addAttribute("number",0); |
| | | if (ShiroKit.isAuthenticated() || shiroExtUtil.getUser() != null) { |
| | | return REDIRECT + "/"; |
| | | } else { |
| | | return "/login.html"; |
| | | } |
| | | } |
| | | // /** |
| | | // * 跳转到登录页面 |
| | | // */ |
| | | // @RequestMapping(value = "/login", method = RequestMethod.GET) |
| | | // public String login(Model model) { |
| | | // model.addAttribute("number",0); |
| | | // if (shiroExtUtil.authenticated() || shiroExtUtil.getUser() != null) { |
| | | // return REDIRECT + "/"; |
| | | // } else { |
| | | // return "/login.html"; |
| | | // } |
| | | // } |
| | | |
| | | /** |
| | | * 点击登录执行的动作 |