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 388262b5b3..370314fd5e 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -264,6 +264,7 @@ public class ApiDefinitionService { esbApiParamService.deleteByResourceId(apiId); MockConfigService mockConfigService = CommonBeanFactory.getBean(MockConfigService.class); mockConfigService.deleteMockConfigByApiId(apiId); + relationshipEdgeService.delete(apiId); // 删除关系图 FileUtils.deleteBodyFiles(apiId); } @@ -274,6 +275,7 @@ public class ApiDefinitionService { apiDefinitionMapper.deleteByExample(example); apiTestCaseService.deleteBatchByDefinitionId(apiIds); MockConfigService mockConfigService = CommonBeanFactory.getBean(MockConfigService.class); + relationshipEdgeService.delete(apiIds); // 删除关系图 for (String apiId : apiIds) { mockConfigService.deleteMockConfigByApiId(apiId); }