涩图模块:修复每日统计没效果
This commit is contained in:
parent
46322572c7
commit
05a892a135
@ -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 (RedisTools.get("Setu_time","23:59:00").equals(time)) {
|
} else if (RedisTools.get("Setu_time", "23:59:00").equals(time)) {
|
||||||
send();
|
send();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,12 +61,15 @@ public class GetSeTu extends Model {
|
|||||||
Jedis redis = RedisTools.getRedis();
|
Jedis redis = RedisTools.getRedis();
|
||||||
redis.select(RedisTools.QQBOT_USER);
|
redis.select(RedisTools.QQBOT_USER);
|
||||||
Set<String> keys = redis.keys("Setu_*");
|
Set<String> keys = redis.keys("Setu_*");
|
||||||
Log.i("进入涩图打印:"+keys.size());
|
Log.i("进入涩图打印:" + keys.size());
|
||||||
redis.close();
|
redis.close();
|
||||||
for (String key : keys) {
|
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);
|
||||||
if (!StringUtils.isEmpty(ret)) {
|
if (!StringUtils.isEmpty(ret)) {
|
||||||
JSONArray array = JSONArray.parseArray(key);
|
JSONArray array = JSONArray.parseArray(key);
|
||||||
builder = new MessageChainBuilder();
|
builder = new MessageChainBuilder();
|
||||||
@ -103,8 +106,8 @@ public class GetSeTu extends Model {
|
|||||||
builder.append("如果炸群了请找他(\n");
|
builder.append("如果炸群了请找他(\n");
|
||||||
builder.append("明天见~");
|
builder.append("明天见~");
|
||||||
}
|
}
|
||||||
Log.i("打印色图统计:"+builder);
|
Log.i("打印色图统计:" + builder);
|
||||||
if (builder != null&& !"Setu_time".equals(key)) {
|
if (builder != null) {
|
||||||
QQBotManager.getInstance().sendMessage(Long.parseLong(key.replace("Setu_", "")), builder);
|
QQBotManager.getInstance().sendMessage(Long.parseLong(key.replace("Setu_", "")), builder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user