From 4a420381b1be0dbd0ed6ab1a8386d0f4607b6bbd Mon Sep 17 00:00:00 2001 From: haotian <2421912570@qq.com> Date: Fri, 21 Feb 2025 14:51:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=AF=8F=E6=97=A5--=E4=BF=AE?= =?UTF-8?q?=E6=94=B9--=E6=B7=BB=E5=8A=A0=E5=AF=B9=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backstage/daily/dailySysServer.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/daily/dailySysServer.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/daily/dailySysServer.java index 34107c2d..f914ceb6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/daily/dailySysServer.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/daily/dailySysServer.java @@ -569,20 +569,24 @@ public class dailySysServer { //发送消息通知 Long workId = sysSource.getWorkId(); // 查询用户id - Long receiveUserId = userWorkService.selectUserWorkByWorkId(workId).getUserId(); - if (receiveUserId != null){ - SysUserNotification sysUserNotification = new SysUserNotification(); - sysUserNotification.setUserId(receiveUserId); - sysUserNotification.setSenderId(0L); - // 24小时临期消息 - sysUserNotification.setType("7"); - sysUserNotification.setStatus("0"); + UserWork userWork = userWorkService.selectUserWorkByWorkId(workId); + if(userWork != null){ + Long receiveUserId = userWork.getUserId(); + if (receiveUserId != null){ + SysUserNotification sysUserNotification = new SysUserNotification(); + sysUserNotification.setUserId(receiveUserId); + sysUserNotification.setSenderId(0L); + // 24小时临期消息 + sysUserNotification.setType("7"); + sysUserNotification.setStatus("0"); - userNotificationService.insertSysUserNotification(sysUserNotification); + userNotificationService.insertSysUserNotification(sysUserNotification); + } } + } }