docs: 调整注释

This commit is contained in:
chenxiky 2025-07-19 18:15:56 +08:00
parent ab5dbd8901
commit 563455a412

View File

@ -818,9 +818,9 @@ public class RedisUtils {
if (incr == null) {
throw new RuntimeException("Redis increment failed.");
}
// 设置过期时间可选例如每天的 key 在第二天自动过期
// 设置过期时间
if (incr == 1) {
// 可选设置 key 的过期时间例如 24 小时后自动过期
// 设置 key 的过期时间 24小时后自动过期
redisTemplate.expire(key, 24, TimeUnit.HOURS);
}
return String.format("%0" + digits + "d", incr);