diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index e1c14e70b4..85ceec4687 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -651,7 +651,7 @@ public class ApiDefinitionService { apiTestCase.setUpdateUserId(SessionUtils.getUserId()); if (sameCase == null) { apiTestCase.setId(UUID.randomUUID().toString()); - apiTestCase.setNum(getNextNum(apiTestCase.getApiDefinitionId())); + apiTestCase.setNum(apiTestCaseService.getNextNum(apiTestCase.getApiDefinitionId())); apiTestCase.setCreateTime(System.currentTimeMillis()); apiTestCase.setUpdateTime(System.currentTimeMillis()); apiTestCase.setCreateUserId(SessionUtils.getUserId());