<select id="FREEZE-SELECT" parameterClass="TA-FreezeAccountDO" resultClass="TA-FreezeAccountDO">
SELECT
A.MEMBERID memberID,
A.LOGNAME logName,
A.STATUS status,
A.UPDATETIME updateTime
FROM (SELECT RID
FROM (SELECT RID, ROWNUM AS RN
FROM (SELECT
A.ROWID RID
FROM BD_BAOYANG_LIST A
WHERE
<![CDATA[
A.STATUS=#status#
]]>
<dynamic>
<isNotEmpty property="memberID" prepend="and">
A.MEMBERID = #memberID#
</isNotEmpty>
<isNotEmpty property="logName" prepend="and">
A.LOGNAME = #logName#
</isNotEmpty>
<isNotEmpty property="startTime" prepend="and">
<![CDATA[
A.UPDATETIME >= cast(#startTime# as DATE)
]]>
</isNotEmpty>
<isNotEmpty property="endTime" prepend="and">
<![CDATA[
A.UPDATETIME < cast(#endTime# as DATE)+1
]]>
</isNotEmpty>
</dynamic>
<![CDATA[
ORDER BY A.MEMBERID)
WHERE ROWNUM <= #endRow#)
WHERE RN >= #startRow#) T1,BD_BAOYANG_LIST A
WHERE T1.RID = A.ROWID
ORDER BY A.MEMBERID
]]>
</select>