|
|
|
@@ -37,7 +37,11 @@ public class RedisUtil { |
|
|
|
} |
|
|
|
|
|
|
|
public static List<JSONObject> getJsonList(String key) { |
|
|
|
return redisTemplate.opsForList().range(key, 0, 10).stream().map(json-> JSONObject.parseObject(json.toString())).collect(Collectors.toList()); |
|
|
|
List<Serializable> lists = redisTemplate.opsForList().range(key, 0, 10); |
|
|
|
if (lists == null || lists.size() == 0) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
return lists.stream().map(json-> JSONObject.parseObject(json.toString())).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
public static List<Serializable> getList(String key) { |
|
|
|
|