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() { }