|
|
|
@@ -102,19 +102,16 @@ public class HomeController extends BaseController { |
|
|
|
Subject subject = SecurityUtils.getSubject(); |
|
|
|
UsernamePasswordToken token = new UsernamePasswordToken(user.getUsername(), user.getPassword()); |
|
|
|
subject.login(token); |
|
|
|
// List<MallRole> roleList = sysRoleService.findRoleByUserId(user.getId()); |
|
|
|
// if (null != roleList && roleList.size() > 0) { |
|
|
|
// List<MallPermission> permissionList = sysPermissionService |
|
|
|
// .findPermissionByRoleIds(roleList.stream().map(MallRole::getId).collect(Collectors.toList())); |
|
|
|
// user.setRole(roleList); |
|
|
|
// user.setPermission(permissionList); |
|
|
|
// } |
|
|
|
MallUserInfo info = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute(UserSession.userInfo); |
|
|
|
info.setPassword("保密"); |
|
|
|
if(StringUtils.isNotBlank(info.getBopenId())) |
|
|
|
info.setBopenId("保密"); |
|
|
|
if(StringUtils.isNotBlank(info.getWebOpenId())) |
|
|
|
if(StringUtils.isNotBlank(info.getWebOpenId())) { |
|
|
|
info.setWebOpenId("保密"); |
|
|
|
info.setWithWechat(true); |
|
|
|
} else { |
|
|
|
info.setWithWechat(false); |
|
|
|
} |
|
|
|
// System.out.println("id:"+ SecurityUtils.getSubject().getSession().getId()); |
|
|
|
String menus = mallUserRoleService.getPermissionsByUser(info); |
|
|
|
if(menus != null) { |
|
|
|
|