fix(接口测试): 修复用例报告结束时间显示错误问题

--bug=1010385 --user=赵勇 接口测试测试报告独立case 结束时间显示有误 https://www.tapd.cn/55049933/s/1105689
This commit is contained in:
fit2-zhao 2022-02-18 13:59:39 +08:00 committed by fit2-zhao
parent 6d2d338e74
commit ff3575970b
2 changed files with 7 additions and 2 deletions

View File

@ -357,7 +357,7 @@ public class ApiDefinitionExecResultService {
saveResult.setStatus(status);
saveResult.setResourceId(item.getName());
saveResult.setStartTime(item.getStartTime());
saveResult.setEndTime(item.getResponseResult().getResponseTime());
saveResult.setEndTime(item.getEndTime());
// 清空上次执行结果的内容只保留近五条结果
ApiDefinitionExecResult prevResult = extApiDefinitionExecResultMapper.selectMaxResultByResourceIdAndType(item.getName(), type);
if (prevResult != null) {

View File

@ -81,7 +81,12 @@
</el-table-column>
<el-table-column prop="endTime" min-width="120" :label="$t('report.test_end_time')" sortable>
<template v-slot:default="scope">
<span>{{ scope.row.endTime | timestampFormatDate }}</span>
<span v-if="scope.row.endTime < scope.row.createTime">
{{ scope.row.updateTime | timestampFormatDate }}
</span>
<span v-else>
{{ scope.row.endTime | timestampFormatDate }}
</span>
</template>
</el-table-column>
<el-table-column prop="triggerMode" width="150" :label="$t('commons.trigger_mode.name')"