<select id="getCardcaseByPage" resultType="Cardcase" >
select * from (
select a.*,rownum rn from (
select * from TAB_SYS_CARDCASE
where oper_id = #{operId}
and status = 1
<if test="serchKey != null and serchKey != '' and serchKey != 'null' ">
and (phone like '%' || #{serchKey} || '%' or user_name like '%' || #{serchKey} || '%' )
</if>
order by id desc
<![CDATA[
) a where rownum <= #{end}
) where rn >= #{start}
]]>
</select>