diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml
index 989a6fb8b9..9b17fbd557 100644
--- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml
+++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml
@@ -604,10 +604,17 @@
-
+
+
+
+
+
+
+
+
diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.xml
index 7dca602964..598c096411 100644
--- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.xml
+++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/BaseMapper.xml
@@ -3,6 +3,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -15,12 +25,6 @@
-
-
-
-
-
-
diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml
index b496171598..7eb7d96a99 100644
--- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml
+++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml
@@ -90,7 +90,7 @@
project_version.name as version_name
from api_definition a left join project_version on project_version.id = a.version_id
where a.deleted = false
-
+
and exists (
select id
from api_test_case atc
@@ -107,7 +107,7 @@
-
+
and a.module_id in
@@ -135,8 +135,10 @@
-
+
+
+
@@ -383,6 +385,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a.id in (
+ select api_definition_id from api_test_case where deleted = ${deleted}
+ and project_id = '${projectId}'
+ )
+
+
+ a.id not in (
+ select api_definition_id from api_test_case where deleted = ${deleted}
+ and project_id = '${projectId}'
+ )
+
+
+ 1=2
+
+
+
+ a.id not in (
+ select api_definition_id from api_test_case where deleted = ${deleted}
+ and project_id = '${projectId}'
+ )
+
+ OR
+
+
+
+ a.id in (
+ select api_definition_id from api_test_case where deleted = ${deleted}
+ and project_id = '${projectId}'
+ group by api_definition_id having
+
+
+
+
+ )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -399,10 +501,27 @@
-
+
+
+
+
+
+ concat(a.project_id, '_', a.module_id) in
+
+ #{v}
+
+
+
+ concat(a.project_id, '_', a.module_id) not in
+
+ #{v}
+
+
+
+
@@ -450,16 +569,16 @@
atc.id in (
- select atcr.api_test_case_id as id
- from api_report ar left join api_test_case_record atcr on atcr.api_report_id = ar.id
- group by atcr.api_test_case_id
+ select atcr.api_test_case_id as id
+ from api_report ar left join api_test_case_record atcr on atcr.api_report_id = ar.id
+ group by atcr.api_test_case_id
)
atc.id not in (
- select atcr.api_test_case_id as id
- from api_report ar left join api_test_case_record atcr on atcr.api_report_id = ar.id
- group by atcr.api_test_case_id
+ select atcr.api_test_case_id as id
+ from api_report ar left join api_test_case_record atcr on atcr.api_report_id = ar.id
+ group by atcr.api_test_case_id
)
@@ -467,15 +586,15 @@
atc.id in (
- select rate_tmp.id from (
- select atcr.api_test_case_id as id, format(sum(if(ar.`status` = 'success', 1, 0)) / count(ar.id) * 100, 2) as passRate
- from api_report ar left join api_test_case_record atcr on atcr.api_report_id = ar.id
- group by atcr.api_test_case_id having
-
-
-
-
- ) rate_tmp
+ select rate_tmp.id from (
+ select atcr.api_test_case_id as id, format(sum(if(ar.`status` = 'success', 1, 0)) / count(ar.id) * 100, 2) as passRate
+ from api_report ar left join api_test_case_record atcr on atcr.api_report_id = ar.id
+ group by atcr.api_test_case_id having
+
+
+
+
+ ) rate_tmp
)
@@ -506,14 +625,14 @@
t.id in (
- select distinct brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
- where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API'
+ select distinct brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
+ where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API'
)
t.id not in (
- select distinct brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
- where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API'
+ select distinct brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
+ where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API'
)
@@ -522,8 +641,8 @@
t.id not in (
- select distinct brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
- where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API'
+ select distinct brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
+ where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API'
)
OR
@@ -531,12 +650,12 @@
t.id in (
- select brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
- where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API' group by brc.test_plan_case_id having
-
-
-
-
+ select brc.test_plan_case_id from bug_relation_case brc join bug b on brc.bug_id = b.id
+ where b.deleted = false and brc.test_plan_id = '${planId}' and brc.case_type = 'API' group by brc.test_plan_case_id having
+
+
+
+
)
@@ -561,8 +680,7 @@
-
+
+
+
+
+
+ concat(api_scenario.project_id, '_', api_scenario.module_id) in
+
+ #{v}
+
+
+
+ concat(api_scenario.project_id, '_', api_scenario.module_id) not in
+
+ #{v}
+
+
+
+
@@ -409,8 +426,7 @@
-
+
+
+
+
+
+ concat(functional_case.project_id, '_', functional_case.module_id) in
+
+ #{v}
+
+
+
+ concat(functional_case.project_id, '_', functional_case.module_id) not in
+
+ #{v}
+
+
+
+
@@ -552,8 +569,7 @@