bugfix redis获取数据报错

This commit is contained in:
Lemon
2026-01-07 14:22:44 +08:00
parent 22865eae82
commit 2920ecab0e

View File

@@ -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);
} }