fix(性能测试): 修复性能测试报告首页统计中没有统计已经删除了的性能测试执行数据问题

--bug=1028197 --user=宋天阳 【性能测试】-【首页】-测试日历中的记录数包含定时任务执行的记录
https://www.tapd.cn/55049933/s/1401693
This commit is contained in:
song-tianyang 2023-08-08 16:33:08 +08:00 committed by 刘瑞斌
parent 24f39642f0
commit 4e2e2460c9
1 changed files with 6 additions and 7 deletions

View File

@ -205,13 +205,11 @@
</select>
<select id="selectDashboardTests" resultType="io.metersphere.dto.DashboardTestDTO">
SELECT min(create_time) AS date, count(load_test_report.id) AS count,
date_format(from_unixtime(create_time / 1000), '%Y-%m-%d') AS x
SELECT min(create_time) AS date,
count(load_test_report.id) AS count,
date_format(from_unixtime(create_time / 1000), '%Y-%m-%d') AS x
FROM load_test_report
WHERE test_id IN (SELECT load_test.id
FROM load_test
JOIN project ON load_test.project_id = project.id
WHERE project_id = #{projectId, jdbcType=VARCHAR})
WHERE project_id = #{projectId, jdbcType=VARCHAR}
AND create_time
> #{startTimestamp}
GROUP BY x
@ -261,7 +259,8 @@
SELECT id
FROM load_test_report
WHERE test_id = #{testId}
AND `status` !='Completed' AND `status` !='Error'
AND `status` != 'Completed'
AND `status` != 'Error'
</select>
<select id="selectStatusById" resultType="string">