From e7b6dac49fbf018a77df3d0c003fea5910e3cd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B0=8F=E7=8E=8B=E5=AD=90?= Date: Fri, 1 Mar 2024 10:00:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=B6=88=E6=81=AF=20=E6=94=AF=E6=8C=81=E9=9B=86=E7=BE=A4?= =?UTF-8?q?=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/web/controller/AuthController.java | 6 +++++- .../com/ruoyi/common/encrypt/core/EncryptorManager.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/AuthController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/AuthController.java index 6872415..2d664c0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/AuthController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/AuthController.java @@ -16,6 +16,7 @@ import com.ruoyi.common.social.config.properties.SocialLoginConfigProperties; import com.ruoyi.common.social.config.properties.SocialProperties; import com.ruoyi.common.social.utils.SocialUtils; import com.ruoyi.common.tenant.helper.TenantHelper; +import com.ruoyi.common.websocket.dto.WebSocketMessageDto; import com.ruoyi.common.websocket.utils.WebSocketUtils; import com.ruoyi.system.domain.bo.SysTenantBo; import com.ruoyi.system.domain.vo.SysClientVo; @@ -110,7 +111,10 @@ public class AuthController { Long userId = LoginHelper.getUserId(); scheduledExecutorService.schedule(() -> { - WebSocketUtils.sendMessage(userId, "欢迎登录RuoYi-Flex多租户管理系统"); + WebSocketMessageDto dto = new WebSocketMessageDto(); + dto.setMessage("欢迎登录RuoYi-Flex多租户管理系统"); + dto.setSessionKeys(List.of(userId)); + WebSocketUtils.publishMessage(dto); }, 3, TimeUnit.SECONDS); return R.ok(loginVo); diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/core/EncryptorManager.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/core/EncryptorManager.java index c8fa3ca..930e58a 100644 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/core/EncryptorManager.java +++ b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/ruoyi/common/encrypt/core/EncryptorManager.java @@ -1,6 +1,7 @@ package com.ruoyi.common.encrypt.core; import cn.hutool.core.util.ReflectUtil; +import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import com.ruoyi.common.encrypt.annotation.EncryptField; @@ -19,6 +20,7 @@ import java.util.stream.Collectors; * @version 4.6.0 */ @Slf4j +@NoArgsConstructor public class EncryptorManager { /**