fix(测试计划): 修复筛选sql报错

--bug=1041132 --user=王旭 【测试计划】测试计划详情-功能用例列表-执行结果筛选-筛选报错 https://www.tapd.cn/55049933/s/1520271
This commit is contained in:
WangXu10 2024-05-24 14:20:24 +08:00 committed by 刘瑞斌
parent 829ec6f298
commit 632bb572e2
1 changed files with 9 additions and 9 deletions

View File

@ -55,12 +55,12 @@
<select id="getIds" resultType="java.lang.String"> <select id="getIds" resultType="java.lang.String">
SELECT SELECT
tpfc.id as id test_plan_functional_case.id as id
FROM FROM
test_plan_functional_case tpfc test_plan_functional_case
LEFT JOIN functional_case ON tpfc.functional_case_id = functional_case.id LEFT JOIN functional_case ON test_plan_functional_case.functional_case_id = functional_case.id
WHERE WHERE
tpfc.test_plan_id = #{request.testPlanId} test_plan_functional_case.test_plan_id = #{request.testPlanId}
AND functional_case.deleted = #{deleted} AND functional_case.deleted = #{deleted}
<include refid="queryWhereConditionByBatchQueryRequest"/> <include refid="queryWhereConditionByBatchQueryRequest"/>
</select> </select>
@ -458,10 +458,10 @@
<select id="countModuleIdByRequest" resultType="io.metersphere.functional.dto.FunctionalCaseModuleCountDTO"> <select id="countModuleIdByRequest" resultType="io.metersphere.functional.dto.FunctionalCaseModuleCountDTO">
SELECT functional_case.module_id AS moduleId, count(functional_case.id) AS dataCount, functional_case.project_id AS projectId, project.name AS projectName SELECT functional_case.module_id AS moduleId, count(functional_case.id) AS dataCount, functional_case.project_id AS projectId, project.name AS projectName
FROM test_plan_functional_case tpfc FROM test_plan_functional_case
LEFT JOIN functional_case ON tpfc.functional_case_id = functional_case.id LEFT JOIN functional_case ON test_plan_functional_case.functional_case_id = functional_case.id
LEFT JOIN project ON functional_case.project_id = project.id LEFT JOIN project ON functional_case.project_id = project.id
WHERE tpfc.test_plan_id = #{request.testPlanId} WHERE test_plan_functional_case.test_plan_id = #{request.testPlanId}
AND functional_case.deleted = #{deleted} AND functional_case.deleted = #{deleted}
<include refid="queryWhereCondition"/> <include refid="queryWhereCondition"/>
GROUP BY module_id GROUP BY module_id
@ -470,8 +470,8 @@
<select id="caseCount" <select id="caseCount"
resultType="java.lang.Long"> resultType="java.lang.Long">
SELECT count(functional_case.id) SELECT count(functional_case.id)
FROM test_plan_functional_case tpfc LEFT JOIN functional_case ON tpfc.functional_case_id = functional_case.id FROM test_plan_functional_case LEFT JOIN functional_case ON test_plan_functional_case.functional_case_id = functional_case.id
WHERE tpfc.test_plan_id = #{request.testPlanId} WHERE test_plan_functional_case.test_plan_id = #{request.testPlanId}
AND functional_case.deleted = #{deleted} AND functional_case.deleted = #{deleted}
<include refid="queryWhereCondition"/> <include refid="queryWhereCondition"/>
</select> </select>