mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
fix(测试跟踪): 公共用例库查询报错
This commit is contained in:
parent
2f5ba3fc5e
commit
70faafe07a
@ -2232,12 +2232,20 @@ public class TestCaseService {
|
||||
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andIdIn(projectIds);
|
||||
List<Project> projects = projectMapper.selectByExample(projectExample);
|
||||
List<Project> projects = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(projectIds)) {
|
||||
projects = projectMapper.selectByExample(projectExample);
|
||||
}
|
||||
|
||||
Map<String, String> projectNameMap = projects.stream().collect(Collectors.toMap(Project::getId, Project::getName));
|
||||
|
||||
ProjectVersionExample versionExample = new ProjectVersionExample();
|
||||
versionExample.createCriteria().andIdIn(versionIds);
|
||||
List<ProjectVersion> projectVersions = projectVersionMapper.selectByExample(versionExample);
|
||||
List<ProjectVersion> projectVersions = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(versionIds)) {
|
||||
projectVersions = projectVersionMapper.selectByExample(versionExample);
|
||||
}
|
||||
|
||||
Map<String, String> verisonNameMap = projectVersions.stream().collect(Collectors.toMap(ProjectVersion::getId, ProjectVersion::getName));
|
||||
|
||||
List<TestCaseTestDao> testCaseTestList = new ArrayList<>();
|
||||
|
Loading…
Reference in New Issue
Block a user