From 845099b282de100da62e65da11a9fb8b6faa944a Mon Sep 17 00:00:00 2001 From: nixj Date: Thu, 11 Jul 2024 14:16:43 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90add=E3=80=91=E5=95=86=E6=97=85?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=8D=95=E7=82=B9=E6=96=B0=E5=A2=9E=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/chint/application/out/LoginController.java | 3 ++- .../java/com/chint/domain/value_object/UserLoginResult.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chint/application/out/LoginController.java b/src/main/java/com/chint/application/out/LoginController.java index 97b3a203..fde481a4 100644 --- a/src/main/java/com/chint/application/out/LoginController.java +++ b/src/main/java/com/chint/application/out/LoginController.java @@ -126,7 +126,8 @@ public class LoginController { //异步执行更新用户信息到同程 User currentUser = BaseContext.getCurrentUser(); loginEventBoarder(currentUser); - + currentUser.loadRoleOrg(); + userLoginResult.setRoleList(currentUser.getRoleList()); return Result.Success(CommonMessageConstant.SUCCESS, userLoginResult); } diff --git a/src/main/java/com/chint/domain/value_object/UserLoginResult.java b/src/main/java/com/chint/domain/value_object/UserLoginResult.java index 414cf072..4ea7b1fe 100644 --- a/src/main/java/com/chint/domain/value_object/UserLoginResult.java +++ b/src/main/java/com/chint/domain/value_object/UserLoginResult.java @@ -1,13 +1,17 @@ package com.chint.domain.value_object; +import com.chint.domain.aggregates.user.Role; import com.chint.domain.aggregates.user.User; import com.chint.infrastructure.util.Token; import lombok.Data; +import java.util.List; + @Data public class UserLoginResult { private UserVO user; private Token token; + List roleList; // private String redirectUrl; public UserLoginResult(User user) {