所有示例均在gihub(ssh_base)中====>https://github.com/chengyangyang

mybatis中app的查询语句

 

 

  

SELECT * FROM (
        SELECT (@rownum := @rownum + 1) AS rownum,c.* FROM
        (SELECT @rownum := 0) r,
        (
        select * from sys_user_work where creator = #{params.userId}
        ) c
        <!--ORDER BY aa.create_date desc-->
        ) aa
        <where>
            <if test="params.lastRowNum!=null">
                rownum > ${params.lastRowNum}
            </if>
        </where>
        <if test="params.pageSize!=null">
            LIMIT ${params.pageSize}
        </if>
    </select>

 

posted @ 2019-02-18 13:05  ☞书香门第☜  阅读(241)  评论(0编辑  收藏  举报
http://count.knowsky.com/count1/count.asp?id=434520&sx=1&ys=64"