修复redis set 0的错误
This commit is contained in:
1 parent
70007219e6
commit
7ef2c866c8
1 file changed
+2
+2
@@ -37,8 +37,10 @@ public class OAuth2AccessTokenRedisDAO {
|
||||
// 清理多余字段,避免缓存
|
||||
accessTokenDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null);
|
||||
long time = LocalDateTimeUtil.between(LocalDateTime.now(), accessTokenDO.getExpiresTime(), ChronoUnit.SECONDS);
|
||||
if(time > 0) {
|
||||
stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO), time, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
public void delete(String accessToken) {
|
||||
String redisKey = formatKey(accessToken);
|
||||
|
||||
Reference in new issue
Block a user