新增涩图功能

优化一堆不想写的代码
This commit is contained in:
yutou
2021-01-22 18:18:08 +08:00
parent 811a7fbd4c
commit 20d797adb9
9 changed files with 371 additions and 94 deletions

View File

@@ -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流里面