diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index a1fe6fe564..9765ae4700 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -865,7 +865,10 @@ public class ApiTestCaseService { if ((StringUtils.isNotEmpty(method) || StringUtils.isNotEmpty(path) && RequestType.HTTP.equals(protocol))) { ApiTestCaseExample apiDefinitionExample = new ApiTestCaseExample(); apiDefinitionExample.createCriteria().andApiDefinitionIdIn(ids); - List bloBs = apiTestCaseMapper.selectByExampleWithBLOBs(apiDefinitionExample); + List caseWithBLOBs = apiTestCaseMapper.selectByExampleWithBLOBs(apiDefinitionExample); + List caseIds = caseWithBLOBs.stream().map(ApiTestCaseWithBLOBs::getId).collect(Collectors.toList()); + List bloBs = extApiTestCaseMapper.unTrashCaseListByIds(caseIds); + SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); ApiTestCaseMapper batchMapper = sqlSession.getMapper(ApiTestCaseMapper.class); diff --git a/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue b/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue index aab842c56f..c60329b443 100644 --- a/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/ApiComponent.vue @@ -670,7 +670,7 @@ export default { this.clickCase(response.data) } } else { - this.$error("接口用例场景场景已经被删除"); + this.$error("接口用例已经被删除"); } }); }