mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
bugfix redis获取数据报错
This commit is contained in:
@@ -620,7 +620,7 @@ public class RedisCache {
|
|||||||
for (String key : keys) {
|
for (String key : keys) {
|
||||||
if (StringUtils.isNotBlank(key)) {
|
if (StringUtils.isNotBlank(key)) {
|
||||||
// 使用 index -1 获取 List 的最后一个元素
|
// 使用 index -1 获取 List 的最后一个元素
|
||||||
T lastValue = (T) redisTemplate.opsForList().index(key, -1);
|
T lastValue = (T) redisTemplate.opsForHash().get(key, -1);
|
||||||
if (lastValue != null) {
|
if (lastValue != null) {
|
||||||
result.put(key, lastValue);
|
result.put(key, lastValue);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user