fix 修复 redisson发号器未初始化发号器步长导致过期时间未生效的问题

Signed-off-by: 秋辞未寒 <545073804@qq.com>
This commit is contained in:
秋辞未寒 2025-01-03 01:44:39 +00:00 committed by Gitee
parent a46c798e01
commit ec5ca0a08f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -59,10 +59,10 @@ public class SequenceUtils {
stepValue = DEFAULT_STEP_VALUE;
}
RIdGenerator idGenerator = REDISSON_CLIENT.getIdGenerator(key);
// 设置过期时间
idGenerator.expire(expireTime);
// 设置初始值和步长
idGenerator.tryInit(initValue, stepValue);
// 设置过期时间
idGenerator.expire(expireTime);
return idGenerator;
}