From b6d7dfa9a024392dedfd5a576d95509927d70ad6 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Mon, 17 Jun 2024 15:44:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E6=8E=A5=E5=8F=A3&=E5=9C=BA=E6=99=AFpos=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/plan/service/TestPlanApiCaseService.java | 2 +- .../io/metersphere/plan/service/TestPlanApiScenarioService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java index 82e07c49bb..d036315111 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java @@ -127,7 +127,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService { public long getNextOrder(String collectionId) { Long maxPos = extTestPlanApiCaseMapper.getMaxPosByCollectionId(collectionId); if (maxPos == null) { - return 0; + return DEFAULT_NODE_INTERVAL_POS; } else { return maxPos + DEFAULT_NODE_INTERVAL_POS; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java index 50bf168f47..b85d72d9e5 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java @@ -121,7 +121,7 @@ public class TestPlanApiScenarioService extends TestPlanResourceService { public long getNextOrder(String collectionId) { Long maxPos = extTestPlanApiScenarioMapper.getMaxPosByRangeId(collectionId); if (maxPos == null) { - return 0; + return DEFAULT_NODE_INTERVAL_POS; } else { return maxPos + DEFAULT_NODE_INTERVAL_POS; }