diff --git a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java index 8766ee7..55a18e0 100644 --- a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java +++ b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java @@ -42,7 +42,7 @@ public class GetSeTu extends Model { super.onTime(qq, time); if ("00:00:00".equals(time)) { del(); - } else if ("23:59:00".equals(time)) { + } else if (RedisTools.get("Setu_time","23:59:00").equals(time)) { send(); } } @@ -62,6 +62,7 @@ public class GetSeTu extends Model { redis.select(RedisTools.QQBOT_USER); Set keys = redis.keys("Setu_*"); redis.close(); + Log.i("进入涩图打印"); for (String key : keys) { String ret = RedisTools.get(key); MessageChainBuilder builder = null; diff --git a/src/main/java/com/yutou/qqbot/utlis/RedisTools.java b/src/main/java/com/yutou/qqbot/utlis/RedisTools.java index 2808695..6608e9b 100644 --- a/src/main/java/com/yutou/qqbot/utlis/RedisTools.java +++ b/src/main/java/com/yutou/qqbot/utlis/RedisTools.java @@ -106,6 +106,14 @@ public class RedisTools { return get(key+"", QQBOT_USER); } + public static String get(Object key,String defValue){ + String ret=get(key); + if(StringUtils.isEmpty(ret)){ + return defValue; + } + return ret; + } + public static boolean remove(String key) { return remove(key,QQBOT_USER); }