其他分享
首页 > 其他分享> > orcal分页查询带条件排序

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>

标签:aa,分页,date,qicp,orcal,rn,排序,SELECT,like
来源: https://www.cnblogs.com/lazyli/p/12160733.html