refactor(工作台): 更改我的待办测试计划列表筛选条件

--user=郭雨琦
This commit is contained in:
guoyuqi 2022-10-31 18:25:37 +08:00 committed by xiaomeinvG
parent 08e0b63edd
commit 81c9b5ad73
1 changed files with 5 additions and 13 deletions

View File

@ -180,16 +180,10 @@
<if test="request.id != null"> <if test="request.id != null">
AND test_plan.id = #{request.id} AND test_plan.id = #{request.id}
</if> </if>
<include refid="filter"/> <include refid="filter"/>
<if test="(request.filters == null or request.filters.size() == 0) and request.byFilter != true "> <if test="(request.filters == null or request.filters.size() == 0) and request.byFilter != true ">
and test_plan.status != 'Archived' and test_plan.status != 'Archived'
</if> </if>
<if test="request.byFilter == true">
and test_plan.status in
<foreach collection="request.filterStatus" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</if>
</where> </where>
<if test="request.orders != null and request.orders.size() > 0"> <if test="request.orders != null and request.orders.size() > 0">
@ -211,15 +205,14 @@
AND (( test_plan_principal.principal_id = AND (( test_plan_principal.principal_id =
'${@io.metersphere.commons.utils.SessionUtils@getUserId()}' and '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' and
test_plan.status in test_plan.status in
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/>
) )
or or
(test_plan_test_case.executor = (test_plan_test_case.executor =
'${@io.metersphere.commons.utils.SessionUtils@getUserId()}' and '${@io.metersphere.commons.utils.SessionUtils@getUserId()}' and
test_plan_test_case.status in test_plan_test_case.status in
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/> <include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/>
)) ))
AND test_plan.status != 'Archived'
</when> </when>
<otherwise> <otherwise>
and test_plan.status in and test_plan.status in
@ -326,13 +319,12 @@
SELECT p.name SELECT p.name
FROM test_plan tp FROM test_plan tp
INNER JOIN project p ON p.id = tp.project_id INNER JOIN project p ON p.id = tp.project_id
WHERE tp.id = #{0} WHERE tp.id = #{0} limit 1;
limit 1;
</select> </select>
<select id="findIdByPerformanceReportId" resultType="java.lang.String"> <select id="findIdByPerformanceReportId" resultType="java.lang.String">
SELECT report.id SELECT report.id
FROM test_plan_report report FROM test_plan_report report
INNER JOIN test_plan_report_content reportData ON report.id = reportData.test_plan_report_id INNER JOIN test_plan_report_content reportData ON report.id = reportData.test_plan_report_id
WHERE reportData.plan_load_case_report_struct like CONCAT('%', #{0}, '%'); WHERE reportData.plan_load_case_report_struct like CONCAT('%', #{0}, '%');
</select> </select>
<select id="listRecent" resultType="io.metersphere.base.domain.TestPlan"> <select id="listRecent" resultType="io.metersphere.base.domain.TestPlan">