fix: 删除测试计划报错

This commit is contained in:
chenjianxing 2021-01-05 16:29:07 +08:00
parent 2a605a77c0
commit 2c2f8b8476
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import io.metersphere.track.service.TestPlanApiCaseService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.List;
@ -60,6 +61,9 @@ public class ApiDefinitionExecResultService {
}
public void deleteByResourceIds(List<String> ids) {
if (CollectionUtils.isEmpty(ids)) {
return;
}
ApiDefinitionExecResultExample example = new ApiDefinitionExecResultExample();
example.createCriteria().andResourceIdIn(ids);
apiDefinitionExecResultMapper.deleteByExample(example);