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 e86d9a5601..0ed3d739cd 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -391,9 +391,12 @@ public class ApiDefinitionService { if (apiTestCase.getName().length() > 255) { apiTestCase.setName(apiTestCase.getName().substring(0, 255)); } - if (!isInsert) { + /* if (!isInsert) { apiTestCase.setName(apiTestCase.getName() + "_" + apiTestCase.getId().substring(0, 5)); - } + }*/ + ApiTestCaseExample example = new ApiTestCaseExample(); + example.createCriteria().andApiDefinitionIdEqualTo(apiDefinition.getId()); + apiTestCaseMapper.deleteByExample(example); apiTestCaseMapper.insert(apiTestCase); } } catch (Exception e) { diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index 1d88e26b71..33a1ad6dd4 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -109,9 +109,7 @@