parent
f9c73ff4e8
commit
cfe0ac2b39
|
@ -27,10 +27,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
|
@ -92,6 +89,9 @@ public class ScheduleService {
|
|||
|
||||
public List<Schedule> getScheduleByResourceIds(List<String>resourceIds, String group) {
|
||||
ScheduleExample example = new ScheduleExample();
|
||||
if(resourceIds.size()==0){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
example.createCriteria().andResourceIdIn(resourceIds).andGroupEqualTo(group);
|
||||
List<Schedule> schedules = scheduleMapper.selectByExample(example);
|
||||
if (schedules.size() > 0) {
|
||||
|
|
|
@ -429,6 +429,9 @@ public class TestPlanService {
|
|||
request.setProjectId(request.getProjectId());
|
||||
}
|
||||
List<TestPlanDTOWithMetric> testPlans = extTestPlanMapper.list(request);
|
||||
if(testPlans.size()==0){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Set<String> ids = testPlans.stream().map(TestPlan::getId).collect(Collectors.toSet());
|
||||
Map<String, ParamsDTO> planTestCaseCountMap = extTestPlanMapper.testPlanTestCaseCount(ids);
|
||||
Map<String, ParamsDTO> planApiCaseMap = extTestPlanMapper.testPlanApiCaseCount(ids);
|
||||
|
|
Loading…
Reference in New Issue