From 046996bb78c523be4a54e8f5872198fa656e69af Mon Sep 17 00:00:00 2001 From: "DESKTOP-4U0TDEF\\20371" <2037158277@qq.com> Date: Wed, 14 Jul 2021 09:49:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=B6=E7=9A=84=E8=BF=94=E5=9B=9E=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/common/account/CustomAuthenticationProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java b/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java index 908f562..05eef93 100644 --- a/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java +++ b/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java @@ -69,17 +69,17 @@ public class CustomAuthenticationProvider implements AuthenticationProvider { // 检查用户是否存在 if(userEntity == null){ - throw new BadCredentialsException("user don't exist"); + throw new BadCredentialsException("账号不存在或错误,请您确认注册"); } // 检查用户是否激活 if(userEntity.getActiveFlag().intValue() != 0){ - throw new DisabledException("user not activated"); + throw new DisabledException("该账号还未激活,请联系管理员"); } //检查用户状态是否正常 if(userEntity.getStatusCode() != 0){ - throw new DisabledException("user state exception"); + throw new DisabledException("用户状态不正常,请联系管理员"); } // 认证逻辑 @@ -97,7 +97,7 @@ public class CustomAuthenticationProvider implements AuthenticationProvider { return authToken; } else { - throw new BadCredentialsException("user password error"); + throw new BadCredentialsException("用户密码错误,请重新输入"); } }