From 2223bcdbcaf46c00719e04eb4044b8816156697c Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Tue, 31 May 2022 14:33:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.2.3=E3=80=91=E6=BC=94=E7=A4=BA?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=8D=E8=AE=B0=E5=BD=95error=E6=AC=A1?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java b/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java index c967bb0ad..5cd6fa220 100644 --- a/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java +++ b/kernel-d-auth/auth-sdk/src/main/java/cn/stylefeng/roses/kernel/auth/auth/AuthServiceImpl.java @@ -476,7 +476,12 @@ public class AuthServiceImpl implements AuthServiceApi { if (loginErrorCount == null) { loginErrorCount = 0; } - loginErrorCountCacheApi.put(loginRequest.getAccount(), loginErrorCount + 1); + + // 演示环境,不记录error次数 + if (!DemoConfigExpander.getDemoEnvFlag()) { + loginErrorCountCacheApi.put(loginRequest.getAccount(), loginErrorCount + 1); + } + throw new AuthException(AuthExceptionEnum.USERNAME_PASSWORD_ERROR); } }