fix(工作台): 修复获取有权限的计划失败问题

--bug=1050600 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001050600
This commit is contained in:
guoyuqi 2024-12-18 17:08:54 +08:00 committed by Craftsman
parent 4d3b9f3c5c
commit 656036fa79
1 changed files with 1 additions and 1 deletions

View File

@ -512,7 +512,7 @@ public class DashboardService {
private void setPlanId(LayoutDTO layoutDTO) { private void setPlanId(LayoutDTO layoutDTO) {
TestPlan testPlan = testPlanMapper.selectByPrimaryKey(layoutDTO.getPlanId()); TestPlan testPlan = testPlanMapper.selectByPrimaryKey(layoutDTO.getPlanId());
if (testPlan == null || StringUtils.equalsIgnoreCase(testPlan.getStatus(), TestPlanConstants.TEST_PLAN_STATUS_ARCHIVED)) { if (testPlan == null || StringUtils.equalsIgnoreCase(testPlan.getStatus(), TestPlanConstants.TEST_PLAN_STATUS_ARCHIVED) || !StringUtils.equalsIgnoreCase(testPlan.getProjectId(),layoutDTO.getProjectIds().getFirst())) {
TestPlan latestPlan = extTestPlanMapper.getLatestPlan(layoutDTO.getProjectIds().getFirst()); TestPlan latestPlan = extTestPlanMapper.getLatestPlan(layoutDTO.getProjectIds().getFirst());
if (latestPlan != null) { if (latestPlan != null) {
layoutDTO.setPlanId(latestPlan.getId()); layoutDTO.setPlanId(latestPlan.getId());