From 38364e48c5a5a091f8ed4b080c74a3b63298eb5a Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 17 Oct 2022 19:25:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E5=AF=BC=E5=85=A5=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89id=E4=B8=8E=E5=9B=9E=E6=94=B6=E7=AB=99?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001018278 --user=郭雨琦 --- .../io/metersphere/service/scenario/ApiScenarioService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java index ff9da29e17..9d250b3b25 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java @@ -324,7 +324,7 @@ public class ApiScenarioService { String id = request.getId(); ApiScenarioWithBLOBs apiScenarioWithBLOBs = apiScenarioMapper.selectByPrimaryKey(id); ApiScenarioExample.Criteria criteria = example.createCriteria(); - criteria.andCustomNumEqualTo(request.getCustomNum()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(id); + criteria.andCustomNumEqualTo(request.getCustomNum()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(id).andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue()); if (apiScenarioWithBLOBs != null && StringUtils.isNotBlank(apiScenarioWithBLOBs.getRefId())) { criteria.andRefIdNotEqualTo(apiScenarioWithBLOBs.getRefId()); } @@ -1256,6 +1256,7 @@ public class ApiScenarioService { if (BooleanUtils.isTrue(openCustomNum)) { ApiScenarioExample example = new ApiScenarioExample(); ApiScenarioExample.Criteria criteria = example.createCriteria(); + criteria.andStatusNotEqualTo(ApiTestDataStatus.TRASH.getValue()); if (CollectionUtils.isEmpty(sameList)) { criteria.andCustomNumEqualTo(scenarioWithBLOBs.getCustomNum()).andProjectIdEqualTo(scenarioWithBLOBs.getProjectId()); } else {