From d7823ec5a361c47616906de5fa7763031cd81ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Tue, 12 Aug 2025 16:18:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20bug-558=20=E7=99=BB=E5=BD=95=E5=94=AE?= =?UTF-8?q?=E5=90=8E=E6=9C=8D=E5=8A=A1=E7=B3=BB=E7=BB=9FPC=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=EF=BC=8C=E6=88=96APP=E7=AB=AF=E3=80=82?= =?UTF-8?q?=E4=BC=98=E5=85=88=E5=8F=96=E4=BB=A3=E7=90=86=E5=95=86=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=EF=BC=8C=E4=BB=A5=E4=BB=A3=E7=90=86=E5=95=86=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E4=B8=BA=E5=87=86=E3=80=82=E6=B2=A1=E6=9C=89=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E5=95=86=E8=B4=A6=E5=8F=B7=EF=BC=8C=E5=86=8D=E5=8F=96?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E5=86=85=E9=83=A8=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nflg/mobilebroken/auth/controller/AppController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java b/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java index 18489dca..07e4cb95 100644 --- a/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java +++ b/nflg-mobilebroken-auth/src/main/java/com/nflg/mobilebroken/auth/controller/AppController.java @@ -62,8 +62,8 @@ public class AppController extends ControllerBase { public ApiResult login(String userName, String password) { AppUser user = appUserService.getUser(userName, password); if (Objects.nonNull(user)) { - VUtils.trueThrowBusinessError(!PASSWORDENCODER.matches(password, user.getPassword())) - .throwMessage(dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_INCORRECTUSERNAMEORPASSWORD, MultilingualUtil.getLanguage())); + VUtils.trueThrow(!PASSWORDENCODER.matches(password, user.getPassword())) + .throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_INCORRECTUSERNAMEORPASSWORD, MultilingualUtil.getLanguage())); VUtils.trueThrow(Objects.equals(user.getState(), UserState.Disabled.getState())) .throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_ACCOUNT_DISABLED, user.getLanguageCode())); VUtils.trueThrow(Objects.equals(user.getState(), UserState.ToBeActivated.getState())) @@ -89,6 +89,8 @@ public class AppController extends ControllerBase { .setPlatform(Constant.FROM_APP)); } else { AdminUser adminUser = adminUserService.getUser(userName, password); + VUtils.trueThrow(Objects.isNull(adminUser)) + .throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_INCORRECTUSERNAMEORPASSWORD, MultilingualUtil.getLanguage())); VUtils.trueThrow(Objects.equals(adminUser.getState(), UserState.Disabled.getState())) .throwMessage(STATE.PassportErr, dictionaryItemTranslateService.getValueByCode(Constant.DICTIONARY_SYSTEMERROR, Constant.DICTIONARY_ITEM_ACCOUNT_DISABLED, MultilingualUtil.getLanguage())); VUtils.trueThrow(Objects.equals(adminUser.getState(), UserState.ToBeActivated.getState()))