From 6b652d0e9269156936a1d6425829e104b7e680b5 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 14 十一月 2025 13:21:48 +0800
Subject: [PATCH] 功能修改

---
 multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml |   49 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
index 53ef940..52be8c1 100644
--- a/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -15,10 +15,18 @@
         <result property="updateBy"       column="update_by"       />
         <result property="updateTime"     column="update_time"     />
         <result property="remark"         column="remark"          />
+        <result property="filePath"       column="file_path"       />
+        <result property="fileName"       column="file_name"       />
+        <result property="deptId"         column="dept_id"         />
+        <result property="publishDate"   column="publish_date"   />
+        <result property="companyId"       column="company_id"       />
+    </resultMap>
+    <resultMap type="com.gkhy.exam.system.domain.SysNotice" id="SysNoticeVoResult">
+        <result property="deptName" column="dept_name" />
     </resultMap>
     
     <sql id="selectNoticeVo">
-        select id, title, type, cast(content as char) as content, status, create_by, create_time, update_by, update_time, remark
+        select id, title, type, cast(content as char) as content,company_id, status, create_by, create_time, update_by, update_time, remark, file_path, file_name, dept_id, publish_date
 		from sys_notice
     </sql>
     
@@ -27,25 +35,34 @@
         where id = #{noticeId}
     </select>
     
-    <select id="selectNoticeList"  resultMap="SysNoticeResult">
-        <include refid="selectNoticeVo"/>
-        <where>
-			<if test="title != null and title != ''">
-				AND title like concat('%', #{title}, '%')
-			</if>
-			<if test="type != null and type != ''">
-				AND type = #{type}
-			</if>
-			<if test="createBy != null and createBy != ''">
-				AND create_by like concat('%', #{createBy}, '%')
-			</if>
-		</where>
-		order by create_time desc
+    <select id="selectNoticeList"  resultMap="SysNoticeVoResult">
+        select a.id, a.title, a.type, cast(a.content as char) as content, a.status, a.create_by, a.create_time, a.update_by,
+        a.update_time, a.remark, a.file_path, a.file_name, a.dept_id, a.publish_date,b.dept_name,a.company_id
+        from sys_notice a
+        left join sys_dept b on a.dept_id = b.dept_id
+        where a.del_flag = 0
+        <if test="companyId != null">
+            AND a.company_id = #{companyId}
+        </if>
+        <if test="title != null and title != ''">
+            AND a.title like concat('%', #{title}, '%')
+        </if>
+        <if test="type != null and type != ''">
+            AND a.type = #{type}
+        </if>
+        <if test="deptId != null">
+            AND a.deptId = #{dept_id}
+        </if>
+        <if test="createBy != null and createBy != ''">
+            AND a.create_by like concat('%', #{createBy}, '%')
+        </if>
+
+        order by a.create_time desc
     </select>
 
 
     <delete id="deleteNoticeByIds" parameterType="Long">
-        delete from sys_notice where notice_id in 
+        update sys_notice set del_flag = 1 where id in
         <foreach item="noticeId" collection="array" open="(" separator="," close=")">
             #{noticeId}
         </foreach>

--
Gitblit v1.9.2