add
This commit is contained in:
@ -354,4 +354,15 @@ public interface RedisService {
|
||||
* @return // List<clazz>
|
||||
*/
|
||||
<T> List<T> getObjectList(String key, Class<T> clazz);
|
||||
|
||||
/**
|
||||
* hGetObject
|
||||
*
|
||||
* @param key key
|
||||
* @param hashKey hashKey
|
||||
* @param clazz clazz
|
||||
* @param <T> T
|
||||
* @return clazz
|
||||
*/
|
||||
<T> T hGetObject(String key, String hashKey, Class<T> clazz);
|
||||
}
|
||||
|
@ -229,6 +229,12 @@ public class RedisServiceImpl implements RedisService {
|
||||
return (List<T>) get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T hGetObject(String key, String hashKey, Class<T> clazz) {
|
||||
return (T) hGet(key, hashKey);
|
||||
}
|
||||
|
||||
private String handleKey(String key) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("tenant_").append(BaseContext.getTenantId()).append(":").append(key);
|
||||
|
Reference in New Issue
Block a user