fix: 接口/场景查看引用的测试计划显示重复

修复接口/场景查看引用的测试计划显示重复的问题的问题
This commit is contained in:
song.tianyang 2020-12-24 10:36:32 +08:00
parent f71d60fe54
commit 62c7c00c04

View File

@ -231,6 +231,7 @@
<select id="selectTestPlanByRelevancy" resultMap="BaseResultMap" parameterType="io.metersphere.track.request.testcase.QueryTestPlanRequest">
SELECT * FROM TEST_PLAN p LEFT JOIN test_plan_project t ON t.test_plan_id=p.id
<where>
AND t.project_id = #{request.projectId}
<if test="request.scenarioId != null">
AND p.id IN (SELECT test_plan_id FROM test_plan_api_scenario WHERE api_scenario_id = #{request.scenarioId} )
</if>