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