From 3955c6d7cdc8a3b6f1bd31a249a2c562820adfcb Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 12 一月 2026 13:08:24 +0800
Subject: [PATCH] 消息通知完善
---
src/main/resources/mapper/system/SysNoticeMapper.xml | 102 +++++++++++++++++++++++++++++++++-----------------
1 files changed, 67 insertions(+), 35 deletions(-)
diff --git a/src/main/resources/mapper/system/SysNoticeMapper.xml b/src/main/resources/mapper/system/SysNoticeMapper.xml
index e152622..f1aba88 100644
--- a/src/main/resources/mapper/system/SysNoticeMapper.xml
+++ b/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.system.mapper.SysNoticeMapper">
-
+
<resultMap type="com.ruoyi.project.system.domain.SysNotice" id="SysNoticeResult">
<result property="noticeId" column="notice_id" />
<result property="noticeTitle" column="notice_title" />
@@ -16,54 +16,86 @@
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
-
+
<sql id="selectNoticeVo">
- select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
- from sys_notice
+ select notice_id,
+ notice_title,
+ notice_type,
+ notice_content,
+ status,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+ remark,
+ sender_id,
+ consignee_id,
+ jump_path,
+ tenant_id
+ from sys_notice
</sql>
-
+
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
where notice_id = #{noticeId}
</select>
-
+
<select id="selectNoticeList" parameterType="com.ruoyi.project.system.domain.SysNotice" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/>
<where>
- <if test="noticeTitle != null and noticeTitle != ''">
- AND notice_title like concat('%', #{noticeTitle}, '%')
- </if>
- <if test="noticeType != null and noticeType != ''">
- AND notice_type = #{noticeType}
- </if>
- <if test="createBy != null and createBy != ''">
- AND create_by like concat('%', #{createBy}, '%')
- </if>
+ <if test="c.noticeTitle != null and c.noticeTitle != ''">
+ AND notice_title like concat('%', #{c.noticeTitle}, '%')
+ </if>
+ <if test="c.noticeType != null and c.noticeType != ''">
+ AND notice_type = #{c.noticeType}
+ </if>
+ <if test="c.createBy != null and c.createBy != ''">
+ AND create_by like concat('%', #{c.createBy}, '%')
+ </if>
+ <if test="c.senderId != null and c.senderId != ''">
+ AND sender_id = #{c.senderId}
+ </if>
+ <if test="c.consigneeId != null and c.consigneeId != ''">
+ AND consignee_id = #{c.consigneeId}
+ </if>
+ <if test="c.status != null and c.status != ''">
+ AND status = #{c.status}
+ </if>
</where>
+ order by create_time desc
</select>
-
+
<insert id="insertNotice" parameterType="com.ruoyi.project.system.domain.SysNotice">
insert into sys_notice (
- <if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
- <if test="noticeType != null and noticeType != '' ">notice_type, </if>
- <if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
- <if test="status != null and status != '' ">status, </if>
- <if test="remark != null and remark != ''">remark,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
+ <if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
+ <if test="noticeType != null and noticeType != '' ">notice_type, </if>
+ <if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
+ <if test="status != null and status != '' ">status, </if>
+ <if test="remark != null and remark != ''">remark,</if>
+ <if test="senderId != null and senderId != ''">sender_id,</if>
+ <if test="consigneeId != null and consigneeId != ''">consignee_id,</if>
+ <if test="jumpPath != null and jumpPath != ''">jump_path,</if>
+ <if test="createBy != null and createBy != ''">create_by,</if>
+ <if test="tenantId != null and tenantId != ''">tenant_id,</if>
create_time
)values(
- <if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
- <if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
- <if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
- <if test="status != null and status != ''">#{status}, </if>
- <if test="remark != null and remark != ''">#{remark},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
+ <if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
+ <if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
+ <if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
+ <if test="status != null and status != ''">#{status}, </if>
+ <if test="remark != null and remark != ''">#{remark},</if>
+ <if test="senderId != null and senderId != ''">#{senderId},</if>
+ <if test="consigneeId != null and consigneeId != ''">#{consigneeId},</if>
+ <if test="jumpPath != null and jumpPath != ''">#{jumpPath},</if>
+ <if test="pathParms != null and pathParms != ''">#{queryParms},</if>
+ <if test="createBy != null and createBy != ''">#{createBy},</if>
+ <if test="tenantId != null and tenantId != ''">#{tenantId},</if>
sysdate()
)
</insert>
-
+
<update id="updateNotice" parameterType="com.ruoyi.project.system.domain.SysNotice">
- update sys_notice
+ update sys_notice
<set>
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
@@ -74,16 +106,16 @@
</set>
where notice_id = #{noticeId}
</update>
-
+
<delete id="deleteNoticeById" parameterType="Long">
delete from sys_notice where notice_id = #{noticeId}
</delete>
-
+
<delete id="deleteNoticeByIds" parameterType="Long">
- delete from sys_notice where notice_id in
+ delete from sys_notice where notice_id in
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
#{noticeId}
</foreach>
</delete>
-
-</mapper>
\ No newline at end of file
+
+</mapper>
--
Gitblit v1.9.3