Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
da3d140c
Commit
da3d140c
authored
Jul 13, 2020
by
dbdu
Browse files
Merge branch 'master' of
https://gitee.com/elunez/eladmin
parents
34024a25
741e20dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java
View file @
da3d140c
...
...
@@ -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
;
}
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment