zwzw1219 2017-10-15 21:36:07 +08:00
parent 29e015aa8b
commit 7550b3caaf
2 changed files with 0 additions and 11 deletions

View File

@ -22,5 +22,4 @@ public interface TokenService {
String getTokenByUserId(Long userId);
void addExpireTime(LoginUser loginUser);
}

View File

@ -84,14 +84,4 @@ public class TokenServiceImpl implements TokenService {
return idTokenRedisTemplate.opsForValue().get(getUserIdKey(userId));
}
/**
* token
*/
@Async
@Override
public void addExpireTime(LoginUser loginUser) {
redisTemplate.expire(getTokenKey(loginUser.getToken()), expireSeconds, TimeUnit.SECONDS);
idTokenRedisTemplate.expire(getUserIdKey(loginUser.getId()), expireSeconds, TimeUnit.SECONDS);
}
}