展示到第一页的

展示到第二页的

全量

解决添加更准确的分页字段

        SELECT
        sc.catalog_id,
        sc.catalog_code,
        sc.catalog_name,
        sc.catalog_level,
        sc.level_path,
        sc.order_seq,
        sc.parent_catalog_id,
        sc.enabled_flag,
        sc.company_id,
        sc.tenant_id,
        sc.object_version_number
        FROM scec_catalog sc
        <where>
            sc.company_id = -1
            and sc.catalog_type = 'TENANT'
            and sc.catalog_level = 3
            and sc.tenant_id = #{tenantId}
            and sc.enabled_flag = 1
            <if test="catalogCode != null and catalogCode != ''">
                <bind name="catalogCodeLike" value="'%'+catalogCode+'%'"/>
                and sc.catalog_code like #{catalogCodeLike}
            </if>
            <if test="catalogName != null and catalogName != ''">
                <bind name="catalogNameLike" value="'%'+catalogName+'%'"/>
                and sc.catalog_name like #{catalogNameLike}
            </if>
        </where>
        ORDER BY sc.order_seq DESC, sc.catalog_id DESC