fix: 时间戳溢出导致时间失效修复
This commit is contained in:
@@ -77,11 +77,11 @@ public class RedisServiceImpl implements RedisService {
|
||||
|
||||
String watchKey = RedisKeys.getFreeWatchKey(userId, false);
|
||||
String payFreeWatchInfo = redisUtils.get(watchKey);
|
||||
Integer expireTime = -1;
|
||||
Long expireTime = -1L;
|
||||
JSONObject jsonObject = null;
|
||||
if (StrUtil.isNotBlank(payFreeWatchInfo)) {
|
||||
jsonObject = JSONObject.parseObject(payFreeWatchInfo);
|
||||
expireTime = jsonObject.getInteger("expireTime");
|
||||
expireTime = jsonObject.getLong("expireTime");
|
||||
}
|
||||
|
||||
if ((StrUtil.isNotBlank(permanentlyFreeWatch) && redisUtils.isExpiredSet(freeWatchKey)) || (StrUtil.isNotBlank(permanentlyFreeWatch) && DateUtil.current() >= expireTime)) {
|
||||
|
||||
Reference in New Issue
Block a user