update:holiday in Redis

This commit is contained in:
2022-09-07 13:58:31 +08:00
parent b653c52669
commit c2195c287a
2 changed files with 17 additions and 1 deletions

View File

@@ -135,6 +135,15 @@ public class RedisTools {
jedis.close();
return flag;
}
public static boolean exists(String key){
if(isNotInstallRedis){
return false;
}
Jedis jedis=getRedis();
boolean flag=jedis.exists(key);
jedis.close();
return flag;
}
public static Jedis getRedis() {
return new Jedis(host, port);