refactor(测试跟踪): 优化导出测试计划报告
--bug=1013577 --user=赵勇 【测试跟踪】测试计划报告页面 导出报告 导出报告时间过长 差不多10秒,建议优化下 https://www.tapd.cn/55049933/s/1179328
This commit is contained in:
parent
caf477d8cc
commit
2aba1a00e2
|
@ -1415,9 +1415,9 @@ public class TestPlanService {
|
|||
List<String> reportIds = cases.stream().map(TestPlanFailureApiDTO::getReportId).collect(Collectors.toList());
|
||||
ApiDefinitionExecResultExample example = new ApiDefinitionExecResultExample();
|
||||
example.createCriteria().andIdIn(reportIds);
|
||||
List<ApiDefinitionExecResult> results = apiDefinitionExecResultMapper.selectByExampleWithBLOBs(example);
|
||||
List<ApiDefinitionExecResultWithBLOBs> results = apiDefinitionExecResultMapper.selectByExampleWithBLOBs(example);
|
||||
// 格式化数据结果
|
||||
Map<String, ApiDefinitionExecResult> resultMap = results.stream().collect(Collectors.toMap(ApiDefinitionExecResult::getId, item -> item, (k, v) -> k));
|
||||
Map<String, ApiDefinitionExecResultWithBLOBs> resultMap = results.stream().collect(Collectors.toMap(ApiDefinitionExecResult::getId, item -> item, (k, v) -> k));
|
||||
cases.forEach(item -> {
|
||||
if (resultMap.get(item.getReportId()) != null &&
|
||||
StringUtils.isNotBlank(resultMap.get(item.getReportId()).getContent())) {
|
||||
|
|
Loading…
Reference in New Issue