gongchunyi
2026-06-29 639d36e087548e7499a351737d5e6a9ce24c0407
src/main/java/com/ruoyi/project/system/service/impl/UnipushService.java
@@ -146,6 +146,26 @@
    }
    /**
     * 发送直接路由推送(不经过SysNotice表)
     */
    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) {