fix(接口测试): 修复用例标签和场景标签中本周执行和总执行统计错误的问题
--bug=1015133 --user=宋天阳 【接口测试】首页-接口用例和场景用例数量统计-本周执行次数统计,删除测试报告后数量减少了 https://www.tapd.cn/55049933/s/1206613
This commit is contained in:
parent
146caffcf9
commit
2efc431fa1
|
@ -25,19 +25,35 @@
|
||||||
|
|
||||||
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">
|
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">
|
||||||
SELECT count(id) AS countNumber
|
SELECT count(id) AS countNumber
|
||||||
FROM api_definition_exec_result
|
FROM api_case_execution_info
|
||||||
WHERE resource_id IN (SELECT testCase.id
|
WHERE source_id IN (
|
||||||
FROM api_test_case testCase
|
SELECT testCase.id
|
||||||
WHERE testCase.project_id = #{projectId})
|
FROM api_test_case testCase
|
||||||
and start_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
WHERE testCase.project_id = #{projectId}
|
||||||
|
UNION
|
||||||
|
SELECT id
|
||||||
|
FROM test_plan_api_case
|
||||||
|
WHERE api_case_id IN (SELECT testCase.id
|
||||||
|
FROM api_test_case testCase
|
||||||
|
WHERE testCase.project_id = #{projectId})
|
||||||
|
)
|
||||||
|
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countByTestCaseIDInProject" resultType="java.lang.Long">
|
<select id="countByTestCaseIDInProject" resultType="java.lang.Long">
|
||||||
SELECT count(id) AS countNumber
|
SELECT count(id) AS countNumber
|
||||||
FROM api_definition_exec_result
|
FROM api_case_execution_info
|
||||||
WHERE resource_id IN (SELECT testCase.id
|
WHERE source_id IN (
|
||||||
FROM api_test_case testCase
|
SELECT testCase.id
|
||||||
WHERE testCase.project_id = #{projectId})
|
FROM api_test_case testCase
|
||||||
|
WHERE testCase.project_id = #{projectId}
|
||||||
|
UNION
|
||||||
|
SELECT id
|
||||||
|
FROM test_plan_api_case
|
||||||
|
WHERE api_case_id IN (SELECT testCase.id
|
||||||
|
FROM api_test_case testCase
|
||||||
|
WHERE testCase.project_id = #{projectId})
|
||||||
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDistinctStatusByReportId" resultType="java.lang.String">
|
<select id="selectDistinctStatusByReportId" resultType="java.lang.String">
|
||||||
|
|
|
@ -350,9 +350,13 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="countByProjectIdAndCreateInThisWeek" resultType="java.lang.Long">
|
<select id="countByProjectIdAndCreateInThisWeek" resultType="java.lang.Long">
|
||||||
SELECT count(id) AS countNumber
|
SELECT count(id) AS countNumber
|
||||||
FROM api_scenario_report
|
FROM scenario_execution_info
|
||||||
WHERE project_id = #{projectId}
|
WHERE create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||||
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
AND source_id in (
|
||||||
|
SELECT id
|
||||||
|
FROM api_scenario
|
||||||
|
WHERE project_id = #{projectId}
|
||||||
|
);
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countByProjectIdAndCreateAndByScheduleInThisWeek" resultType="java.lang.Long">
|
<select id="countByProjectIdAndCreateAndByScheduleInThisWeek" resultType="java.lang.Long">
|
||||||
|
@ -364,7 +368,6 @@
|
||||||
WHERE project_id = #{projectId}
|
WHERE project_id = #{projectId}
|
||||||
AND latest = 1)
|
AND latest = 1)
|
||||||
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countByProjectIdGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
<select id="countByProjectIdGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||||
|
@ -461,7 +464,10 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByProjectIdAndLessThanTime" resultType="java.lang.String">
|
<select id="selectByProjectIdAndLessThanTime" resultType="java.lang.String">
|
||||||
select id from api_scenario_report where create_time < #{time} and project_id = #{projectId}
|
select id
|
||||||
|
from api_scenario_report
|
||||||
|
where create_time < #{time}
|
||||||
|
and project_id = #{projectId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue