Browse Source

是否已读

LIVE_YE 2 years ago
parent
commit
0a331af518

+ 5 - 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordInfo.java

@@ -50,9 +50,13 @@ public class RecordInfo extends BaseEntity
     @Excel(name = "收件人姓名")
     private String addresseeName;
 
+    /** 是否部门申请审核,0: 未操作 1:不同意,2:同意 */
+    @Excel(name = "是否已读,0: 未操作 1:不同意,2:同意")
+    private String isRead;
+
     /** 是否已读,0: 未读 1:已读 */
     @Excel(name = "是否已读,0: 未读 1:已读")
-    private String isRead;
+    private String certified;
 
     /** 消息类型 1:转换部门通知 */
     @Excel(name = "消息类型 1:转换部门通知")

+ 9 - 3
ruoyi-system/src/main/resources/mapper/system/RecordInfoMapper.xml

@@ -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>