fix(测试跟踪): 首页统计评审结果有误

--bug=1034028 --user=宋昌昌 【用例评审】首页,用例评审结果统计错误 https://www.tapd.cn/55049933/s/1448542
This commit is contained in:
song-cc-rock 2023-12-26 16:37:04 +08:00 committed by 刘瑞斌
parent 073f2358a8
commit 96c6cfddc9
1 changed files with 4 additions and 4 deletions

View File

@ -393,10 +393,10 @@
order by `order` desc limit 1;
</select>
<select id="getStatusMapByReviewId" resultType="io.metersphere.dto.CountMapDTO">
select status as `key`, count(*) as `value`
from test_case_review_test_case
where review_id = #{reviewId} and is_del = 0
group by status
select tcrtc.status as `key`, count(*) as `value`
from test_case_review_test_case tcrtc join test_case tc on tcrtc.case_id = tc.id
where tcrtc.review_id = #{reviewId} and tcrtc.is_del = 0
group by tcrtc.status
</select>
<select id="projectIdsByPlanId" resultType="java.lang.String">
select distinct project_id