|
@@ -8,6 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="title" column="title" />
|
|
<result property="title" column="title" />
|
|
<result property="content" column="content" />
|
|
<result property="content" column="content" />
|
|
|
|
+
|
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
|
+ <result property="topDept" column="top_dept" />
|
|
|
|
+
|
|
<result property="senderId" column="sender_id" />
|
|
<result property="senderId" column="sender_id" />
|
|
<result property="senderName" column="sender_name" />
|
|
<result property="senderName" column="sender_name" />
|
|
<result property="addresseeId" column="addressee_id" />
|
|
<result property="addresseeId" column="addressee_id" />
|
|
@@ -22,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectRecordInfoVo">
|
|
<sql id="selectRecordInfoVo">
|
|
- select id, title, content, sender_id, sender_name, addressee_id, addressee_name, is_read, info_type, create_by, create_time, update_by, update_time, remark from record_info
|
|
|
|
|
|
+ select id, title, content,dept_id,dept_name,top_dept, sender_id, sender_name, addressee_id, addressee_name, is_read, info_type, create_by, create_time, update_by, update_time, remark from record_info
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectRecordInfoList" parameterType="RecordInfo" resultMap="RecordInfoResult">
|
|
<select id="selectRecordInfoList" parameterType="RecordInfo" resultMap="RecordInfoResult">
|
|
@@ -48,6 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="title != null">title,</if>
|
|
<if test="title != null">title,</if>
|
|
<if test="content != null">content,</if>
|
|
<if test="content != null">content,</if>
|
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
|
+ <if test="deptName != null">dept_name,</if>
|
|
|
|
+ <if test="topDept != null">top_dept,</if>
|
|
<if test="senderId != null">sender_id,</if>
|
|
<if test="senderId != null">sender_id,</if>
|
|
<if test="senderName != null">sender_name,</if>
|
|
<if test="senderName != null">sender_name,</if>
|
|
<if test="addresseeId != null">addressee_id,</if>
|
|
<if test="addresseeId != null">addressee_id,</if>
|
|
@@ -62,6 +70,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="title != null">#{title},</if>
|
|
<if test="title != null">#{title},</if>
|
|
<if test="content != null">#{content},</if>
|
|
<if test="content != null">#{content},</if>
|
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
|
+ <if test="deptName != null">#{deptName},</if>
|
|
|
|
+ <if test="topDept != null">#{topDept},</if>
|
|
<if test="senderId != null">#{senderId},</if>
|
|
<if test="senderId != null">#{senderId},</if>
|
|
<if test="senderName != null">#{senderName},</if>
|
|
<if test="senderName != null">#{senderName},</if>
|
|
<if test="addresseeId != null">#{addresseeId},</if>
|
|
<if test="addresseeId != null">#{addresseeId},</if>
|
|
@@ -80,6 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="title != null">title = #{title},</if>
|
|
<if test="title != null">title = #{title},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
+ <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
|
+ <if test="topDept != null">top_dept = #{topDept},</if>
|
|
<if test="senderId != null">sender_id = #{senderId},</if>
|
|
<if test="senderId != null">sender_id = #{senderId},</if>
|
|
<if test="senderName != null">sender_name = #{senderName},</if>
|
|
<if test="senderName != null">sender_name = #{senderName},</if>
|
|
<if test="addresseeId != null">addressee_id = #{addresseeId},</if>
|
|
<if test="addresseeId != null">addressee_id = #{addresseeId},</if>
|
|
@@ -106,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
- <select id="selectNewApplyFor" parameterType="Long" resultMap="RecordInfoResult">
|
|
|
|
|
|
+ <select id="selectNewApplyFor" parameterType="RecordInfo" resultMap="RecordInfoResult">
|
|
<include refid="selectRecordInfoVo"/>
|
|
<include refid="selectRecordInfoVo"/>
|
|
where addressee_id = #{addresseeId}
|
|
where addressee_id = #{addresseeId}
|
|
and info_type = #{infoType}
|
|
and info_type = #{infoType}
|
|
@@ -121,4 +135,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</foreach>
|
|
</foreach>
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
+ <update id="updateIsReadByAddresseeId" parameterType="String">
|
|
|
|
+ update record_info set is_read = '1' where addressee_id = #{userId} and is_read = '0'
|
|
|
|
+ </update>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|