fix(测试跟踪 ): 修复功能用例首页与模块统计不一致

--bug=1009862 --user=王孝刚 功能用例首页与模块统计不一致
https://www.tapd.cn/55049933/s/1097187
This commit is contained in:
wxg0103 2022-01-24 14:50:14 +08:00 committed by zhangdahai112
parent 5a96bf5c46
commit d3bc1d98a6
1 changed files with 4 additions and 2 deletions

View File

@ -680,8 +680,10 @@
</sql>
<select id="countPriority" resultType="io.metersphere.track.response.TrackCountResult">
SELECT test_case.priority as groupField,count(id) AS countNumber FROM test_case
WHERE project_id = #{projectId} AND (test_case.status IS NULL OR test_case.status != 'Trash')
SELECT test_case.priority as groupField, count(DISTINCT ref_id) AS countNumber
FROM test_case
WHERE project_id = #{projectId}
AND (test_case.status IS NULL OR test_case.status != 'Trash')
GROUP BY test_case.priority
</select>