mirror of https://github.com/elunez/eladmin
Merge branch 'master' of https://gitee.com/elunez/eladmin
commit
da3d140cff
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
package me.zhengjie.utils;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -210,8 +212,10 @@ public class RedisUtils {
|
|||
* @return
|
||||
*/
|
||||
public List<Object> multiGet(List<String> keys) {
|
||||
Object obj = redisTemplate.opsForValue().multiGet(Collections.singleton(keys));
|
||||
return null;
|
||||
List list = redisTemplate.opsForValue().multiGet(Sets.newHashSet(keys));
|
||||
List resultList = Lists.newArrayList();
|
||||
Optional.ofNullable(list).ifPresent(e-> list.forEach(ele-> Optional.ofNullable(ele).ifPresent(resultList::add)));
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue