涩图模块:修复每日统计没效果

This commit is contained in:
Yutousama 2022-04-22 00:05:39 +08:00
parent 7776fb3d01
commit 4d156ad861
2 changed files with 10 additions and 1 deletions

View File

@ -42,7 +42,7 @@ public class GetSeTu extends Model {
super.onTime(qq, time); super.onTime(qq, time);
if ("00:00:00".equals(time)) { if ("00:00:00".equals(time)) {
del(); del();
} else if ("23:59:00".equals(time)) { } else if (RedisTools.get("Setu_time","23:59:00").equals(time)) {
send(); send();
} }
} }
@ -62,6 +62,7 @@ public class GetSeTu extends Model {
redis.select(RedisTools.QQBOT_USER); redis.select(RedisTools.QQBOT_USER);
Set<String> keys = redis.keys("Setu_*"); Set<String> keys = redis.keys("Setu_*");
redis.close(); redis.close();
Log.i("进入涩图打印");
for (String key : keys) { for (String key : keys) {
String ret = RedisTools.get(key); String ret = RedisTools.get(key);
MessageChainBuilder builder = null; MessageChainBuilder builder = null;

View File

@ -106,6 +106,14 @@ public class RedisTools {
return get(key+"", QQBOT_USER); 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) { public static boolean remove(String key) {
return remove(key,QQBOT_USER); return remove(key,QQBOT_USER);
} }