From 27507592bb5ad0579332274084957be6916d21a9 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 2 Aug 2023 09:58:43 +0800 Subject: [PATCH] chore: fix typo --- .../java/io/metersphere/sdk/controller/LoginController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LoginController.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LoginController.java index ee07620fc7..c6e3775dff 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LoginController.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/controller/LoginController.java @@ -16,7 +16,6 @@ import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.reflect.MethodUtils; import org.apache.shiro.SecurityUtils; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.web.bind.annotation.*; @@ -34,7 +33,7 @@ public class LoginController { RsaKey rsaKey = RsaUtil.getRsaKey(); SessionUser user = SessionUtils.getUser(); if (user != null) { - UserDTO userDTO = baseUserService.getUserDTO((String) MethodUtils.invokeMethod(user, "getId")); + UserDTO userDTO = baseUserService.getUserDTO(user.getId()); if (StringUtils.isBlank(userDTO.getLanguage())) { userDTO.setLanguage(LocaleContextHolder.getLocale().toString()); }