<?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>
pageHelper分页失效的问题
最新推荐文章于 2024-04-20 15:29:40 发布