From fbda2f16d63dcad15de13ab0997ef51257e5815b Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 26 六月 2026 10:53:52 +0800
Subject: [PATCH] feat: 更新定时任务调度逻辑,支持启用状态下重新调度任务

---
 src/main/java/com/ruoyi/project/system/service/impl/UnipushService.java |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/project/system/service/impl/UnipushService.java b/src/main/java/com/ruoyi/project/system/service/impl/UnipushService.java
index a6e97f4..01604ef 100644
--- a/src/main/java/com/ruoyi/project/system/service/impl/UnipushService.java
+++ b/src/main/java/com/ruoyi/project/system/service/impl/UnipushService.java
@@ -146,6 +146,26 @@
     }
 
     /**
+     * 鍙戦�佺洿鎺ヨ矾鐢辨帹閫侊紙涓嶇粡杩嘢ysNotice琛級
+     */
+    public void sendDirectRoutingPushToUser(Long userId, String title, String content, String webPath) {
+        SysUserClient client = userClientService.getById(userId);
+        if (client == null || StringUtils.isEmpty(client.getCid())) {
+            log.warn("鐢ㄦ埛 {} 鏈粦瀹氱Щ鍔ㄧ CID,璺宠繃鐩存帴鎺ㄩ��", userId);
+            return;
+        }
+        String appPath = convertWebPathToAppPath(webPath);
+        sendRoutingPush(
+                System.currentTimeMillis(),
+                client.getCid(),
+                title,
+                content,
+                appPath,
+                false
+        );
+    }
+
+    /**
      * 鍙戦�佸崟浜鸿矾鐢辨帹閫�
      */
     private void sendRoutingPush(Long noticeId, String cid, String title, String content, String targetPath) {

--
Gitblit v1.9.3