| | |
| | | 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.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.Const; |
| | | import com.stylefeng.guns.core.common.exception.InvalidKaptchaException; |
| | | import com.stylefeng.guns.core.log.LogManager; |
| | |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.stylefeng.guns.core.support.HttpKit.getIp; |
| | |
| | | |
| | | @Autowired |
| | | private IRelationService relationService; |
| | | |
| | | @Autowired |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | |
| | | |
| | |
| | | List<MenuNode> titles = MenuNode.buildTitle(menus); |
| | | titles = ApiMenuFilter.build(titles); |
| | | shiroUser.setMenuIds(menuList.stream().map(Menu::getUrl).collect(Collectors.toList())); |
| | | shiroUser.setRoleType(user.getRoleType()); |
| | | shiroUser.setObjectId(user.getObjectId()); |
| | | |
| | | model.addAttribute("titles", titles); |
| | | |
| | |
| | | null == user.getPassWordUpdate() |
| | | || user.getPassWordUpdate().getTime() + 7776000000L <= System.currentTimeMillis() |
| | | ? "您的密码已经90天未更换了,请及时更换密码!!!" : ""); |
| | | redisUtil.setStrValue(loginUser.getOnconUUID(), JSON.toJSONString(shiroUser), 600); |
| | | return "/index.html"; |
| | | } |
| | | |