From ba1a540add437649bae209ba8a8b44f2e2d95451 Mon Sep 17 00:00:00 2001
From: dhb52 <dhb52@126.com>
Date: 星期五, 24 五月 2024 13:30:51 +0800
Subject: [PATCH] !542 更新SnailJob版本到1.0.0-beta2 * feat: 配置项变更,避免误解snail-job.group-name => snail-job.group * chore: 更新snail-job版本到1.0.0-beta2

---
 ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java
index faed92d..67be2fb 100644
--- a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java
+++ b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/utils/RedisUtils.java
@@ -113,7 +113,11 @@
                 bucket.setAndKeepTTL(value);
             } catch (Exception e) {
                 long timeToLive = bucket.remainTimeToLive();
-                setCacheObject(key, value, Duration.ofMillis(timeToLive));
+                if (timeToLive == -1) {
+                    setCacheObject(key, value);
+                } else {
+                    setCacheObject(key, value, Duration.ofMillis(timeToLive));
+                }
             }
         } else {
             bucket.set(value);

--
Gitblit v1.9.3