fix(接口测试): 支持版本后接口首页数量统计

This commit is contained in:
CaptainB 2022-01-11 13:22:11 +08:00 committed by fit2-zhao
parent 81be46a14b
commit 043636b934
2 changed files with 2 additions and 2 deletions

View File

@ -344,7 +344,7 @@
</update>
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
SELECT protocol AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} AND `status` != 'Trash' GROUP BY protocol
SELECT protocol AS groupField,count(DISTINCT ref_id) AS countNumber FROM api_definition WHERE project_id = #{0} AND `status` != 'Trash' GROUP BY protocol
</select>
<select id="countStateByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
SELECT status AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} AND `status` != 'Trash' GROUP BY status

View File

@ -435,7 +435,7 @@
</update>
<select id="countByProjectID" resultType="java.lang.Long">
SELECT COUNT(id) AS countNumber FROM api_scenario WHERE project_id = #{0} AND status != 'Trash'
SELECT COUNT(DISTINCT ref_id) AS countNumber FROM api_scenario WHERE project_id = #{0} AND status != 'Trash'
</select>
<select id="selectIdAndScenarioByProjectId" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
SELECT id,scenario_definition FROM api_scenario WHERE project_id = #{0} AND status != 'Trash'