| | |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("userType", Objects.requireNonNull(ShiroKit.getUser()).getRoleType()); |
| | | model.addAttribute("userType", Objects.requireNonNull(shiroExtUtil.getUser()).getRoleType()); |
| | | return PREFIX + "tBranchOffice.html"; |
| | | } |
| | | |
| | |
| | | if (SinataUtil.isNotEmpty(tBranchOffice.getAccount()) && SinataUtil.isNotEmpty(tBranchOffice.getPassword())){ |
| | | if(Objects.isNull(user)){ |
| | | //添加User对象 |
| | | user = new User(); |
| | | user.setAccount(tBranchOffice.getAccount()); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(tBranchOffice.getPassword(), user.getSalt())); |