This commit is contained in:
Yutousama 2020-05-13 09:05:02 +08:00
parent 772c971ad0
commit f270bbbfdc

View File

@ -89,16 +89,17 @@ public class test {
} else { } else {
Jedis jedis = RedisUtlis.getRedis(); Jedis jedis = RedisUtlis.getRedis();
Set<String> keys = jedis.keys("*"); Set<String> keys = jedis.keys("*");
String data = ""; String data = "<html><body><div>";
for (String key : keys) { for (String key : keys) {
if (type.equals("del")) { if (type.equals("del")) {
jedis.del(key); jedis.del(key);
}else { }else {
if (key.startsWith("ip_")) { if (key.startsWith("ip_")) {
data += "ip=" + key.replace("ip_", "") + " num=" + jedis.get(key) + "\n"; data += "ip=" + key.replace("ip_", "") + " num=" + jedis.get(key) + "<br/>";
} }
} }
} }
data+="</div></body></html>";
jedis.close(); jedis.close();
return data; return data;
} }