| | |
| | | package com.stylefeng.guns.modular.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.google.code.kaptcha.Constants; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.exception.InvalidKaptchaException; |
| | | import com.stylefeng.guns.core.log.LogManager; |
| | | import com.stylefeng.guns.core.log.factory.LogTaskFactory; |
| | | import com.stylefeng.guns.core.mutidatasource.annotion.DataSource; |
| | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.ApiMenuFilter; |
| | | import com.stylefeng.guns.core.util.KaptchaUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import com.stylefeng.guns.modular.system.service.IMenuService; |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | /** |
| | | * 跳转到登录页面 |
| | | */ |
| | | // @RequestMapping(value = "/login", method = RequestMethod.GET) |
| | | // public String login(Model model) { |
| | | // model.addAttribute("updatePaw", false); |
| | | // if (ShiroKit.isAuthenticated() || ShiroKit.getUser() != null) { |
| | | // return REDIRECT + "/"; |
| | | // } else { |
| | | // return "/login.html"; |
| | | // } |
| | | // } |
| | | |
| | | @RequestMapping(value = "/login", method = RequestMethod.GET) |
| | | public String login(Model model) { |
| | | model.addAttribute("updatePaw", false); |
| | | if (ShiroKit.isAuthenticated() || ShiroKit.getUser() != null) { |
| | | return REDIRECT + "/"; |
| | | } else { |
| | | return "/login.html"; |
| | | } |
| | | public ResultUtil login(Model model) { |
| | | return ResultUtil.error("请登录"); |
| | | } |
| | | |
| | | /** |