<select id="getDataList" resultMap="BaseResultMap">
SELECT
*
FROM
(
SELECT
TMP_PAGE.*,
ROWNUM ROW_ID
FROM
(
#查询语句
SELECT *
FROM TABLE
)TMP_PAGE
WHERE ROWNUM <![CDATA[ < ]]> ((#{pageNum} + 1) * #{pageSize} + 1)
)
WHERE ROW_ID <![CDATA[ > ]]> ((#{pageNum} + 1) * #{pageSize} - #{pageSize})
</select>