新增涩图功能
优化一堆不想写的代码
This commit is contained in:
@@ -96,17 +96,7 @@ public class RedisTools {
|
||||
}
|
||||
|
||||
public static boolean remove(String key) {
|
||||
if (isNotInstallRedis) {
|
||||
return false;
|
||||
}
|
||||
Jedis jedis = getRedis();
|
||||
Long i = jedis.del(key);
|
||||
jedis.close();
|
||||
if (i > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return remove(key,0);
|
||||
}
|
||||
|
||||
public static void removeLoginState(String uid) {
|
||||
@@ -141,6 +131,21 @@ public class RedisTools {
|
||||
return new Jedis(host, port);
|
||||
}
|
||||
|
||||
public static boolean remove(String key, int index) {
|
||||
if (isNotInstallRedis) {
|
||||
return false;
|
||||
}
|
||||
Jedis jedis = getRedis();
|
||||
jedis.select(index);
|
||||
Long i = jedis.del(key);
|
||||
jedis.close();
|
||||
if (i > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static class PropertyUtil {
|
||||
|
||||
// 加载property文件到io流里面
|
||||
|
||||
Reference in New Issue
Block a user