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; }