fix(系统设置): 修复系统管理员默认组织项目切换错误问题
This commit is contained in:
parent
05c863f62e
commit
685ca095d1
|
@ -265,6 +265,7 @@ public class BaseUserService {
|
||||||
if (StringUtils.equals("organization", sign)) {
|
if (StringUtils.equals("organization", sign)) {
|
||||||
user.setLastOrganizationId(sourceId);
|
user.setLastOrganizationId(sourceId);
|
||||||
sessionUser.setLastOrganizationId(sourceId);
|
sessionUser.setLastOrganizationId(sourceId);
|
||||||
|
user.setLastProjectId(StringUtils.EMPTY);
|
||||||
List<Project> projects = getProjectListByWsAndUserId(sessionUser.getId(), sourceId);
|
List<Project> projects = getProjectListByWsAndUserId(sessionUser.getId(), sourceId);
|
||||||
if (CollectionUtils.isNotEmpty(projects)) {
|
if (CollectionUtils.isNotEmpty(projects)) {
|
||||||
user.setLastProjectId(projects.get(0).getId());
|
user.setLastProjectId(projects.get(0).getId());
|
||||||
|
@ -276,8 +277,6 @@ public class BaseUserService {
|
||||||
if (CollectionUtils.isNotEmpty(allWsProject)) {
|
if (CollectionUtils.isNotEmpty(allWsProject)) {
|
||||||
user.setLastProjectId(allWsProject.get(0).getId());
|
user.setLastProjectId(allWsProject.get(0).getId());
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
user.setLastProjectId(StringUtils.EMPTY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue