|
@@ -18,6 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="addresseeId" column="addressee_id" />
|
|
|
<result property="addresseeName" column="addressee_name" />
|
|
|
<result property="isRead" column="is_read" />
|
|
|
+ <result property="certified" column="certified" />
|
|
|
+
|
|
|
<result property="infoType" column="info_type" />
|
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
@@ -27,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectRecordInfoVo">
|
|
|
- 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
|
|
|
+ select id, title, content,dept_id,dept_name,top_dept, sender_id, sender_name, addressee_id, addressee_name, is_read,certified, info_type, create_by, create_time, update_by, update_time, remark from record_info
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectRecordInfoList" parameterType="RecordInfo" resultMap="RecordInfoResult">
|
|
@@ -40,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="addresseeId != null and addresseeId != ''"> and addressee_id = #{addresseeId}</if>
|
|
|
<if test="addresseeName != null and addresseeName != ''"> and addressee_name like concat('%', #{addresseeName}, '%')</if>
|
|
|
<if test="isRead != null and isRead != ''"> and is_read = #{isRead}</if>
|
|
|
+ <if test="certified != null and certified != ''"> and certified = #{certified}</if>
|
|
|
<if test="infoType != null and infoType != ''"> and info_type = #{infoType}</if>
|
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
|
|
<if test="userId != null and userId != ''"> and (sender_id = #{userId} or addressee_id = #{userId}) </if>
|
|
@@ -65,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="addresseeId != null">addressee_id,</if>
|
|
|
<if test="addresseeName != null">addressee_name,</if>
|
|
|
<if test="isRead != null">is_read,</if>
|
|
|
+ <if test="certified != null">certified,</if>
|
|
|
<if test="infoType != null">info_type,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
@@ -82,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="addresseeId != null">#{addresseeId},</if>
|
|
|
<if test="addresseeName != null">#{addresseeName},</if>
|
|
|
<if test="isRead != null">#{isRead},</if>
|
|
|
+ <if test="certified != null">#{certified},</if>
|
|
|
<if test="infoType != null">#{infoType},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
@@ -103,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="addresseeId != null">addressee_id = #{addresseeId},</if>
|
|
|
<if test="addresseeName != null">addressee_name = #{addresseeName},</if>
|
|
|
<if test="isRead != null">is_read = #{isRead},</if>
|
|
|
+ <if test="certified != null">certified = #{certified},</if>
|
|
|
<if test="infoType != null">info_type = #{infoType},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
@@ -133,14 +139,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<update id="updateRecordInfoIsChange" parameterType="Long">
|
|
|
- update record_info set is_read = '1' where id in
|
|
|
+ update record_info set certified = '1' where id in
|
|
|
<foreach collection="array" item="array" open="(" separator="," close=")">
|
|
|
#{array}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
<update id="updateIsReadByAddresseeId" parameterType="String">
|
|
|
- update record_info set is_read = '1' where addressee_id = #{userId} and is_read = '0'
|
|
|
+ update record_info set certified = '1' where addressee_id = #{userId} and is_read = '0'
|
|
|
</update>
|
|
|
|
|
|
</mapper>
|