完善航班动态信息服务
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.gzzn.omms.msgexchangeapi.redis;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -64,13 +65,9 @@ public final class RedisService {
|
||||
* @param key 可以传一个值 或多个
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void del(String... key) {
|
||||
if (key != null && key.length > 0) {
|
||||
if (key.length == 1) {
|
||||
redisTemplate.delete(key[0]);
|
||||
} else {
|
||||
redisTemplate.delete(CollectionUtils.arrayToList(key));
|
||||
}
|
||||
public void del(Collection<String> keys) {
|
||||
if (keys != null && keys.size() > 0) {
|
||||
redisTemplate.delete(keys);
|
||||
}
|
||||
}
|
||||
// ============================String=============================
|
||||
@@ -498,4 +495,14 @@ public final class RedisService {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回指定模式的keys
|
||||
* @param patten
|
||||
* @return
|
||||
*/
|
||||
public Set<String> keys(String pattern)
|
||||
{
|
||||
return redisTemplate.keys(pattern);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user