From 5a1e8d4ec21e7d096f5aec12f886aca65aaa309b Mon Sep 17 00:00:00 2001 From: MeterSphere Bot <78466014+metersphere-bot@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:01:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=8A=A5=E9=94=99=E7=9A=84=E7=BC=BA=E9=99=B7=20(#1825?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017298 --user=王孝刚 【接口测试】【特殊数据】编辑接口定义报错了 https://www.tapd.cn/55049933/s/1252043 Co-authored-by: wxg0103 <727495428@qq.com> --- .../java/io/metersphere/api/service/ApiTestCaseService.java | 3 +++ 1 file changed, 3 insertions(+) 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 9765ae4700..eb9bef23e0 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -867,6 +867,9 @@ public class ApiTestCaseService { apiDefinitionExample.createCriteria().andApiDefinitionIdIn(ids); List caseWithBLOBs = apiTestCaseMapper.selectByExampleWithBLOBs(apiDefinitionExample); List caseIds = caseWithBLOBs.stream().map(ApiTestCaseWithBLOBs::getId).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(caseIds)) { + return; + } List bloBs = extApiTestCaseMapper.unTrashCaseListByIds(caseIds); SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);