orcal分页查询带条件排序

<select id="queryInjuredCase" resultMap="BaseResultMap">
SELECT aa.* FROM (SELECT a.*,rownum rn FROM
(SELECT *
FROM INJURED_CASE
where 1 = 1 AND status = 1
<if test="qicp != null">
<if test="qicp.vinNum != null and qicp.vinNum != ''">
and VIN like '%${qicp.vinNum}%'
</if>
<if test="qicp.plateNum != null and qicp.plateNum != ''">
and PLATE_NUM like '%${qicp.plateNum}%'
</if>
</if>
order by create_date desc)a)aa
WHERE aa.rn &lt;= #{endRow} and aa.rn > #{startRow}
</select>
上一篇:向量范数的几何直观理解和等价定义——如何从几何上定义向量范数?


下一篇:Linux 实用命令整理强大