fix(测试计划): 删除测试计划和测试场景的关联关系

This commit is contained in:
shiziyuan9527 2022-11-16 14:28:33 +08:00 committed by lyh
parent 61b82c28fd
commit ac07c6b4c1
1 changed files with 1 additions and 5 deletions

View File

@ -397,11 +397,7 @@ public class TestPlanScenarioCaseService {
} }
TestPlanApiScenarioExample example = new TestPlanApiScenarioExample(); TestPlanApiScenarioExample example = new TestPlanApiScenarioExample();
example.createCriteria().andTestPlanIdIn(planIds); example.createCriteria().andTestPlanIdIn(planIds);
List<TestPlanApiScenario> testPlanApiScenarios = testPlanApiScenarioMapper.selectByExample(example); testPlanApiScenarioMapper.deleteByExample(example);
List<String> ids = testPlanApiScenarios.stream().map(TestPlanApiScenario::getId).collect(Collectors.toList());
TestPlanScenarioCaseBatchRequest request = new TestPlanScenarioCaseBatchRequest();
request.setIds(ids);
deleteApiCaseBath(request);
} }
public void deleteByRelevanceProjectIds(String planId, List<String> relevanceProjectIds) { public void deleteByRelevanceProjectIds(String planId, List<String> relevanceProjectIds) {