fix(接口测试): 修复接口测试首页7天更新接口统计模块中关联场景统计不对的问题

--bug=1017946 --user=宋天阳 【接口测试】首页-过去7天有更新的接口-关联场景数为0
https://www.tapd.cn/55049933/s/1261060
This commit is contained in:
song-tianyang 2022-10-13 18:51:40 +08:00 committed by 刘瑞斌
parent 90a4dce5dc
commit 189ee21f6a
1 changed files with 7 additions and 7 deletions

View File

@ -1024,13 +1024,13 @@
and api_definition.status != 'Trash';
</select>
<select id="scenarioList" resultType="io.metersphere.base.domain.ApiScenario">
select DISTINCT t1.id
from api_scenario t1
join api_scenario_reference_id t2 on t1.id = t2.api_scenario_id and t1.`status` !='Trash'
join api_test_case t3
on t2.reference_id = t3.id and t2.reference_type = 'REF'
where t3.api_definition_id = #{apiDefinitionId}
and t3.`status`!='Trash'
SELECT DISTINCT
t1.id
FROM
api_scenario t1
JOIN api_scenario_reference_id t2 ON t1.id = t2.api_scenario_id AND t1.`status` != 'Trash'
WHERE
t2.reference_id = #{apiDefinitionId}
</select>
<select id="countByIds" resultType="java.lang.Integer">
select count(id) from api_definition