fix: 删除测试计划报错
This commit is contained in:
parent
2a605a77c0
commit
2c2f8b8476
|
@ -14,6 +14,7 @@ import io.metersphere.track.service.TestPlanApiCaseService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -60,6 +61,9 @@ public class ApiDefinitionExecResultService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteByResourceIds(List<String> ids) {
|
public void deleteByResourceIds(List<String> ids) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ApiDefinitionExecResultExample example = new ApiDefinitionExecResultExample();
|
ApiDefinitionExecResultExample example = new ApiDefinitionExecResultExample();
|
||||||
example.createCriteria().andResourceIdIn(ids);
|
example.createCriteria().andResourceIdIn(ids);
|
||||||
apiDefinitionExecResultMapper.deleteByExample(example);
|
apiDefinitionExecResultMapper.deleteByExample(example);
|
||||||
|
|
Loading…
Reference in New Issue