fix(接口测试): 删除没有用例的接口定义会报错

--bug=1014506 --user=陈建星 【测试跟踪】功能用例关联测试,接口/场景/性能用例删除后,关联的测试用例没有同步删除 https://www.tapd.cn/55049933/s/1193457
This commit is contained in:
chenjianxing 2022-07-04 14:47:48 +08:00 committed by jianxing
parent 67b8b664ae
commit 7250932e7c
1 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,9 @@ public class TestPlanApiCaseService {
} }
public int deleteByCaseIds(List<String> caseIds) { public int deleteByCaseIds(List<String> caseIds) {
if (CollectionUtils.isEmpty(caseIds)) {
return 0;
}
TestPlanApiCaseExample example = new TestPlanApiCaseExample(); TestPlanApiCaseExample example = new TestPlanApiCaseExample();
example.createCriteria() example.createCriteria()
.andApiCaseIdIn(caseIds); .andApiCaseIdIn(caseIds);