用户登录时,不校验游客账号有效期

This commit is contained in:
2024-12-23 17:29:48 +08:00
parent fa94667c0f
commit 468ad385d7

View File

@@ -236,6 +236,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
private void validateUserValidaExpire(Account account) {
Long currentTime = new Date().getTime();
if (account.getSystemUser().equals(0)){
return;
}
if (Objects.nonNull(account.getValidStartTime())) {
if (currentTime < account.getValidStartTime()) {
throw new BusinessException("user.expired");
@@ -243,7 +246,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
}
if (Objects.nonNull(account.getValidEndTime())) {
if (currentTime > account.getValidEndTime()) {
throw new BusinessException("user.expired");
toVisitor(account);
return;
// throw new BusinessException("user.expired");
}
}
}