From 25b569753afb9939e5610f6ba0d31a40f5e79388 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 27 十月 2025 15:01:58 +0800
Subject: [PATCH] bug修改

---
 ruoyi-system/src/main/resources/mapper/system/OaNotificationMapper.xml |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/OaNotificationMapper.xml b/ruoyi-system/src/main/resources/mapper/system/OaNotificationMapper.xml
index 538d0f5..6eec53d 100644
--- a/ruoyi-system/src/main/resources/mapper/system/OaNotificationMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/OaNotificationMapper.xml
@@ -25,9 +25,9 @@
         <if test="query.title != null and query.title != ''">
             and title like concat('%',#{query.title},'%')
         </if>
-        <if test="deptIds != null and deptIds.size() > 0">
+        <if test="query.deptIds != null and query.deptIds.size() > 0">
             AND (
-            <foreach collection="deptIds" item="deptId" separator=" OR ">
+            <foreach collection="query.deptIds" item="deptId" separator=" OR ">
                 FIND_IN_SET(#{deptId}, dept_ids)
             </foreach>
             )
@@ -36,14 +36,15 @@
         order by  create_time desc
     </select>
     <select id="pageListUser" resultType="com.ruoyi.system.vo.system.NotificationVO">
-        select t1.read_status as readStatus,t1.notification_id notificationId,t2.* from oa_notification t2
+        select t1.id as id,t1.read_status as readStatus,t1.notification_id notificationId,t2.*,t2.id as notificationId from oa_notification_user t1
+                                                                                   left join oa_notification t2 on t1.notification_id = t2.id
         where 1=1
         <if test="query.title != null and query.title != ''">
             and t2.title like concat('%',#{query.title},'%')
         </if>
-        <if test="deptIds != null and deptIds.size() > 0">
+        <if test="query.deptIds != null and query.deptIds.size() > 0">
             AND (
-            <foreach collection="deptIds" item="deptId" separator=" OR ">
+            <foreach collection="query.deptIds" item="deptId" separator=" OR ">
                 FIND_IN_SET(#{deptId}, t2.dept_ids)
             </foreach>
             )

--
Gitblit v1.7.1