From d003946437af16f195dc018241bb4206a52d28d4 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 14 Apr 2023 10:07:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=81=AB=E7=82=B9=E9=87=8D=E6=9E=84-=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=9C=B0=E7=89=A9=E7=B1=BB=E5=9E=8B=E7=99=BE=E5=88=86?= =?UTF-8?q?=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/account/CustomAuthenticationProvider.java | 11 +---------- .../java/com/xkrs/utilsnew/BufferAnalysisUtils.java | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java b/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java index d413eff..af4eb9c 100644 --- a/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java +++ b/src/main/java/com/xkrs/common/account/CustomAuthenticationProvider.java @@ -76,14 +76,6 @@ public class CustomAuthenticationProvider implements AuthenticationProvider { if (userEntity.getActiveFlag() != 0) { throw new DisabledException("您的账号未激活,详情请联系客服人员。"); } -// // 检查用户是否在VIP时间范围内 -// boolean inVipTimeRange = VipTimeRangeUtils.checkIfInVipTimeRange(userEntity.getVipTimeRangeJson()); -// // 检查用户是否在试用期范围内 -// boolean inTryTimeRange = VipTimeRangeUtils.checkIfInTryTimeRange(userEntity.getAddTime(), userEntity.getDayNum()); -// //既不在VIP时间范围内 也不在试用期范围内 -// if ((!inVipTimeRange) && (!inTryTimeRange)) { -// throw new DisabledException("您的账号已到期,详情请联系客服人员。"); -// } // 认证逻辑 String encryptPassword = encry256(password + userEntity.getSalt()); @@ -98,8 +90,7 @@ public class CustomAuthenticationProvider implements AuthenticationProvider { customAuthenticationProvider.sysUserService.updateLoginNum(userEntity.getId(), userEntity.getLoginNum() + 1); customAuthenticationProvider.sysUserService.updateLoginLastTime(userEntity.getId(), DateTimeUtil.dateTimeToString(LocalDateTime.now())); // 生成令牌 - Authentication authToken = new UsernamePasswordAuthenticationToken(userName, encryptPassword, permissions); - return authToken; + return new UsernamePasswordAuthenticationToken(userName, encryptPassword, permissions); } else { throw new BadCredentialsException("用户密码错误,请重新输入"); } diff --git a/src/main/java/com/xkrs/utilsnew/BufferAnalysisUtils.java b/src/main/java/com/xkrs/utilsnew/BufferAnalysisUtils.java index 01e4472..1ff80aa 100644 --- a/src/main/java/com/xkrs/utilsnew/BufferAnalysisUtils.java +++ b/src/main/java/com/xkrs/utilsnew/BufferAnalysisUtils.java @@ -18,7 +18,6 @@ import java.util.Map; public class BufferAnalysisUtils { - private BufferAnalysisUtils() { }