fix: 删除接口定义时删除关系

This commit is contained in:
chenjianxing 2021-10-20 14:45:37 +08:00 committed by jianxing
parent bd2558c00d
commit 3b42857fd7
1 changed files with 2 additions and 0 deletions

View File

@ -264,6 +264,7 @@ public class ApiDefinitionService {
esbApiParamService.deleteByResourceId(apiId); esbApiParamService.deleteByResourceId(apiId);
MockConfigService mockConfigService = CommonBeanFactory.getBean(MockConfigService.class); MockConfigService mockConfigService = CommonBeanFactory.getBean(MockConfigService.class);
mockConfigService.deleteMockConfigByApiId(apiId); mockConfigService.deleteMockConfigByApiId(apiId);
relationshipEdgeService.delete(apiId); // 删除关系图
FileUtils.deleteBodyFiles(apiId); FileUtils.deleteBodyFiles(apiId);
} }
@ -274,6 +275,7 @@ public class ApiDefinitionService {
apiDefinitionMapper.deleteByExample(example); apiDefinitionMapper.deleteByExample(example);
apiTestCaseService.deleteBatchByDefinitionId(apiIds); apiTestCaseService.deleteBatchByDefinitionId(apiIds);
MockConfigService mockConfigService = CommonBeanFactory.getBean(MockConfigService.class); MockConfigService mockConfigService = CommonBeanFactory.getBean(MockConfigService.class);
relationshipEdgeService.delete(apiIds); // 删除关系图
for (String apiId : apiIds) { for (String apiId : apiIds) {
mockConfigService.deleteMockConfigByApiId(apiId); mockConfigService.deleteMockConfigByApiId(apiId);
} }