fix(用例评审): 列表按照ID排序报错

This commit is contained in:
shiziyuan9527 2021-06-21 14:39:21 +08:00 committed by 刘瑞斌
parent b62cdf5e01
commit 0d7df4b6d8
1 changed files with 16 additions and 1 deletions

View File

@ -110,7 +110,22 @@
left join test_case_node on test_case_node.id=test_case.node_id
inner join project on project.id = test_case.project_id
<include refid="queryWhereCondition"/>
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
<if test="request.orders != null and request.orders.size() > 0">
order by
<foreach collection="request.orders" separator="," item="order">
<choose>
<when test="order.name == 'custom_num'">
test_case.num ${order.type}, test_case.custom_num ${order.type}
</when>
<when test="order.name == 'priority'">
test_case.priority ${order.type}
</when>
<otherwise>
test_case_review_test_case.${order.name} ${order.type}
</otherwise>
</choose>
</foreach>
</if>
</select>
<sql id="queryWhereCondition">
<where>