Browse Source

企业微信redis

develop
lau572 5 months ago
parent
commit
b9b037c273
  1. 11
      ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
  2. 6
      zc-business/src/main/java/com/zc/business/constant/RedisKeyConstants.java

11
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java

@ -67,6 +67,17 @@ public class RedisCache
return redisTemplate.expire(key, timeout, unit); return redisTemplate.expire(key, timeout, unit);
} }
/**
* 获取剩余有效时间
*
* @param key Redis键
* @return 剩余时间
*/
public Long getExpire(final String key)
{
return redisTemplate.getExpire(key);
}
/** /**
* 获得缓存的基本对象 * 获得缓存的基本对象
* *

6
zc-business/src/main/java/com/zc/business/constant/RedisKeyConstants.java

@ -39,4 +39,10 @@ public class RedisKeyConstants
* 监控物联服务器 * 监控物联服务器
*/ */
public static final String MONITOR_IOT_SERVER = "monitor:iotServer:"; public static final String MONITOR_IOT_SERVER = "monitor:iotServer:";
/**
* 企业微信access_token
*/
public static final String QYWX_ACCESS_TOKEN = "qywx:accessToken";
} }

Loading…
Cancel
Save