pageHelper分页失效的问题

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.am.mapper.AmDissertationMapper">
    <resultMap id="aaaaAmDissertation" type="com.ruoyi.project.am.domain.AmDissertation">
        <result property="aid" column="aid" />
        <result property="dissertation" column="dissertation" />
        <result property="abstracts" column="abstracts" />
        <result property="keywords" column="keywords" />
        <result property="sourcefrom" column="sourcefrom" />
        <result property="totalwords" column="totalwords" />
        <result property="summary" column="summary" />
        <result property="originality" column="originality" />
        <result property="score" column="score" />
        <result property="replytime" column="replytime" />
        <result property="defencescore" column="defencescore" />
        <result property="stime" column="stime" />
        <result property="etime" column="etime" />
        <result property="title" column="title" />
        <result property="status" column="status" />
        <result property="stuName" column="stuName" />
        <result property="sno" column="sno" />
        <result property="deptName" column="deptName" />
        <result property="yuanxiName" column="yuanxiName" />
        <result property="majorName" column="majorName" />
        <result property="directName" column="directName" />
        <result property="adviser" column="adviser" />
        <result property="reporter" column="reporter" />

        <!--<collection  property="psmpAttachment" ofType="com.ruoyi.project.attachment.domain.PsmpAttachment" >
            <result property="id" column="attachid" />
            <result property="fileUrl" column="filePath" />
            <result property="attNewName" column="attNewName" />
        </collection >-->

        <collection  property="psmpAttachment" ofType="com.ruoyi.project.attachment.domain.PsmpAttachment"
                     javaType="java.util.ArrayList" select="getPsmpAttachment" column="{biz_id=aid}" >
        </collection >
    </resultMap>

    <resultMap id="psmpAttachmentResultMap" type="com.ruoyi.project.attachment.domain.PsmpAttachment">
        <result property="id" column="attachid" />
        <result property="fileUrl" column="filePath" />
        <result property="attNewName" column="attNewName" />
        <result property="bizId" column="biz_id" />
    </resultMap>

    <select id="getPsmpAttachment" parameterType="Map" resultMap="psmpAttachmentResultMap" >
        SELECT
        t1.att_path as filePath,
        t1.id as attachid,
        t1.att_new_name as attNewName
        FROM psmp_attachment t1
        WHERE t1.biz_id = #{biz_id} and t1.biz_type = 'AppraisingDissertation'
    </select>

    <select id="findList" resultMap="aaaaAmDissertation">
        SELECT
        t1.aid,
        t1.dissertation,
        t1.abstracts,
        t1.keywords,
        t1.sourcefrom,
        t1.totalwords,
        t1.summary,
        t1.originality,
        t1.score,
        t1.replytime,
        t1.defencescore,
        t1.stime,
        t1.etime,
        t2.title,
        t2.status,
        t4.stu_name as stuName,
        t4.sno,
        t4.train_unit_name as deptName,
        t4.train_yuanxi_name as yuanxiName,
        t4.zhuanye_name as majorName,
        t4.direction as directName,
        t4.adviser,
        t5.nick_name as reporter
        FROM
        am_dissertation t1
        LEFT JOIN am_achieve t2 on t1.aid = t2.id and t2.typeid = 1
        LEFT JOIN pr_student t4 on t2.sid = t4.sid
        LEFT JOIN sys_user t5 on t5.user_id = t2.sid
        where 1=1
        <if test="title != null and title != ''">
            and t2.title like concat('%', #{title}, '%')
        </if>
        <if test="uid != null and uid != ''">
            and t2.sid = #{uid}
        </if>
        <if test="stuName != null and stuName != ''">
            and t4.stu_name like concat('%', #{stuName}, '%')
        </if>
        <if test="deptId != null and deptId != ''">
            and t4.train_unit = #{deptId}
        </if>
        <if test="deptIdList != null and deptIdList.size() > 0">
            AND t4.train_unit IN
            <foreach collection="deptIdList" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="status != null and status != ''">
            and t2.status = #{status}
        </if>
        order by t2.create_time desc
    </select>


</mapper>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值