涩图模块:修复每日统计没效果
This commit is contained in:
parent
61feb23f16
commit
e96bdefb67
@ -43,7 +43,7 @@ public class GetSeTu extends Model {
|
||||
if ("00:00:00".equals(time)) {
|
||||
del();
|
||||
} else if (RedisTools.get("Setu_time", "23:59:00").equals(time)) {
|
||||
send();
|
||||
send(qq);
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,16 +57,11 @@ public class GetSeTu extends Model {
|
||||
redis.close();
|
||||
}
|
||||
|
||||
private void send() {
|
||||
private void send(Long group) {
|
||||
Jedis redis = RedisTools.getRedis();
|
||||
redis.select(RedisTools.QQBOT_USER);
|
||||
Set<String> keys = redis.keys("Setu_*");
|
||||
Log.i("进入涩图打印:" + keys.size());
|
||||
String key = redis.get("Setu_"+group);
|
||||
redis.close();
|
||||
for (String key : keys) {
|
||||
if ("Setu_time".equals(key)) {
|
||||
continue;
|
||||
}
|
||||
String ret = RedisTools.get(key);
|
||||
MessageChainBuilder builder = null;
|
||||
Log.i(key, ret);
|
||||
@ -114,7 +109,6 @@ public class GetSeTu extends Model {
|
||||
QQBotManager.getInstance().sendMessage(Long.parseLong(key.replace("Setu_", "")), builder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
|
||||
|
@ -29,7 +29,6 @@ public class ApplicationInit implements ApplicationRunner {
|
||||
return;
|
||||
}
|
||||
oldTime = time;
|
||||
Log.i("ApplicationInit run > "+oldTime );
|
||||
for (Class<?> model : Model.classList) {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user