From 1d8d829f124814c7948d18ba76a5b272073a8ce1 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 21 Sep 2022 16:09:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=8E=A5=E5=8F=A3API=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E4=B8=80=E9=94=AE=E5=90=8C=E6=AD=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=AF=BC=E8=87=B4=E6=8E=A5=E5=8F=A3case=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=97=A0=E6=B3=95=E6=96=B0=E5=A2=9E=E5=92=8C=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016876 --- .../java/io/metersphere/api/service/ApiTestCaseService.java | 5 ++++- .../api/automation/scenario/component/ApiComponent.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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("接口用例已经被删除"); } }); }