From d1e4898924b3b6e76088d546e02aa08045393111 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 09 六月 2022 00:45:06 +0800 Subject: [PATCH] update 简化生成代码注释 --- ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/dao/PlusSaTokenDao.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/dao/PlusSaTokenDao.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/dao/PlusSaTokenDao.java index a08503d..68df5a6 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/dao/PlusSaTokenDao.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/dao/PlusSaTokenDao.java @@ -68,7 +68,8 @@ */ @Override public long getTimeout(String key) { - return RedisUtils.getTimeToLive(key) / 1000; + long timeout = RedisUtils.getTimeToLive(key); + return timeout < 0 ? timeout : timeout / 1000; } /** @@ -141,7 +142,8 @@ */ @Override public long getObjectTimeout(String key) { - return RedisUtils.getTimeToLive(key) / 1000; + long timeout = RedisUtils.getTimeToLive(key); + return timeout < 0 ? timeout : timeout / 1000; } /** -- Gitblit v1.9.3