add
This commit is contained in:
@ -141,6 +141,14 @@ public interface RedisService {
|
||||
*/
|
||||
Map<Object, Object> hGetAll(String key);
|
||||
|
||||
/**
|
||||
* 获取整个hash结构的大小
|
||||
*
|
||||
* @param key key
|
||||
* @return size
|
||||
*/
|
||||
Long hSize(String key);
|
||||
|
||||
/**
|
||||
* 直接设置整个Hash结构
|
||||
*
|
||||
|
@ -102,6 +102,11 @@ public class RedisServiceImpl implements RedisService {
|
||||
return redisTemplate.opsForHash().entries(addTenantPrefix(key));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long hSize(String key) {
|
||||
return redisTemplate.opsForHash().size(addTenantPrefix(key));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean hSetAll(String key, Map<String, Object> map, long time) {
|
||||
String newKey = addTenantPrefix(key);
|
||||
|
Reference in New Issue
Block a user