|
@@ -244,7 +244,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
sysRoleQueryWrapper.lambda().in(SysRole::getId, roleIds)
|
|
|
.eq(SysRole::getEnable, true);
|
|
|
List<SysRole> sysRoleList = sysRoleService.list(sysRoleQueryWrapper);
|
|
|
- int count = Objects.nonNull(sysRoleList) && sysRoleList.size() > 0 ? (int) sysRoleList.stream().filter(s -> RoleTypeEnum.valueOf(s.getName()) == RoleTypeEnum.ADMIN).count() : 0;
|
|
|
+ int count = Objects.nonNull(sysRoleList) && sysRoleList.size() > 0 ? (int) sysRoleList.stream().filter(s -> Objects.equals(s.getName(), RoleTypeEnum.ADMIN.getDesc())).count() : 0;
|
|
|
QueryWrapper<SysPrivilege> sysPrivilegeQueryWrapper = new QueryWrapper<>();
|
|
|
if (count > 0) {//超级系统管理员
|
|
|
Long schoolId = (Long) ServletUtil.getRequestSchoolByNotVaild();
|
|
@@ -299,7 +299,8 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
|
|
|
throw ExceptionResultEnum.NOT_LOGIN.exception();
|
|
|
}
|
|
|
for (Platform p : Platform.values()) {
|
|
|
- String sessionId = SessionUtil.digest(userId, Math.abs(authBean.getRoleList().stream().map(s -> s.getName()).collect(Collectors.toSet()).hashCode()), p.name());
|
|
|
+ Set<String> roleNames = authBean.getRoleList().stream().map(s -> s.getName()).collect(Collectors.toSet());
|
|
|
+ String sessionId = SessionUtil.digest(userId, Math.abs(roleNames.toString().hashCode()), p.name());
|
|
|
tbSessionService.removeById(sessionId);
|
|
|
redisUtil.deleteUserSession(sessionId);
|
|
|
}
|