|
@@ -363,9 +363,13 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
redisUtil.deleteUserSession(sessionId);
|
|
|
}
|
|
|
} else {
|
|
|
- TBSession tbSession = (TBSession) ServletUtil.getRequestSession();
|
|
|
- tbSessionService.removeById(tbSession.getId());
|
|
|
- redisUtil.deleteUserSession(tbSession.getId());
|
|
|
+ Set<String> roleNamesSet = authBean.getRoleList().stream().map(s -> s.getName()).collect(Collectors.toSet());
|
|
|
+ List<String> roleNames = new ArrayList<>();
|
|
|
+ roleNames.addAll(roleNamesSet);
|
|
|
+ Collections.sort(roleNames);
|
|
|
+ String sessionId = SessionUtil.digest(userId, Math.abs(roleNames.toString().hashCode()), Platform.WEB.name());
|
|
|
+ tbSessionService.removeById(sessionId);
|
|
|
+ redisUtil.deleteUserSession(sessionId);
|
|
|
}
|
|
|
commonCacheService.removeUserCache(userId);
|
|
|
commonCacheService.removeUserAuthCache(userId);
|
|
@@ -689,7 +693,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
if (orgId == null) {
|
|
|
return null;
|
|
|
}
|
|
|
- List<OrgDto> orgDtos = sysOrgService.listOrgTree(null,false);
|
|
|
+ List<OrgDto> orgDtos = sysOrgService.listOrgTree(null, false);
|
|
|
Set<Long> stringSet = new HashSet<>();
|
|
|
stringSet.add(orgId);
|
|
|
stringSet = getOrgIds(stringSet, orgDtos, orgId);
|