fix(接口测试首页): #1006467 接口测试-接口用例数量统计-已覆盖接口数 统计错误,已删除的接口用例,应该过滤掉

【【github#6022】接口测试-接口用例数量统计-已覆盖接口数
统计错误,已删除的接口用例,应该过滤掉】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006467
This commit is contained in:
song-tianyang 2021-09-16 18:10:05 +08:00 committed by 刘瑞斌
parent fa3d750e2d
commit 13cfbf098f
1 changed files with 1 additions and 1 deletions

View File

@ -322,7 +322,7 @@
</select>
<select id="countApiCoverageByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
SELECT count(api.id) AS countNumber, if(test_case_api.api_definition_id is null,"uncoverage","coverage") AS groupField FROM api_definition api left Join (
SELECT DISTINCT api_definition_id FROM api_test_case
SELECT DISTINCT api_definition_id FROM api_test_case WHERE status is null or status != 'Trash'
) test_case_api ON api.id = test_case_api.api_definition_id
WHERE api.project_id = #{0} and api.`status` != 'Trash'
GROUP BY groupField