diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 82948829e2..b23321eba5 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -387,7 +387,8 @@ union all select tpac.id as s from test_plan_api_case tpac join api_test_case on tpac.api_case_id = api_test_case.id - where tpac.test_plan_id = #{planId} + join api_definition on api_test_case.api_definition_id = api_definition.id + where tpac.test_plan_id = #{planId} and api_definition.status != 'Trash' union all select tplc.id as s from test_plan_load_case tplc join load_test on tplc.load_case_id = load_test.id