diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml index a1e637fa69..2458b79a45 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml @@ -88,7 +88,10 @@ select count(1) as `count`, if(i.platform = 'Local', cfi.value, i.platform_status) as statusValue, i.platform from issues i inner join project p - on i.project_id = p.id and p.workspace_id = #{request.workspaceId} + on i.project_id = p.id and p.workspace_id = #{request.workspaceId} and + p.id IN (SELECT source_id + FROM user_group + WHERE user_id = #{request.creator}) left join custom_field_issues cfi on i.id = cfi.resource_id and field_id in (select cf.id from custom_field cf diff --git a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml index 8b0c96f230..bc565f8bb2 100644 --- a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml +++ b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioMapper.xml @@ -243,6 +243,12 @@ AND create_time >= #{request.scheduleCreateTime} ) + + AND project.id in + + #{itemId} + + AND api_scenario.id in diff --git a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index a4c8e7ef56..88860a117d 100644 --- a/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/workstation/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -277,7 +277,6 @@ inner join project on api_test_case.project_id = project.id inner JOIN api_definition a ON api_test_case.api_definition_id = a.id - and a.latest = 1