用户登录时,不校验游客账号有效期
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user