|
@@ -246,17 +246,18 @@ public class RedisGwCacheClient implements CacheClient { |
|
@@ -246,17 +246,18 @@ public class RedisGwCacheClient implements CacheClient { |
246
|
result.put(redisKeyBuilders.get(i).getKey(), JSON.parseObject(curItem, clazz));
|
246
|
result.put(redisKeyBuilders.get(i).getKey(), JSON.parseObject(curItem, clazz));
|
247
|
}
|
247
|
}
|
248
|
}
|
248
|
}
|
|
|
249
|
+ Map<K, T> lastResult = new HashMap<>();
|
249
|
|
250
|
|
250
|
Map<K, T> apply = nullCacheFun.apply(nullCachekeys); // 执行回调函数去数据库查询未缓存的键值集合
|
251
|
Map<K, T> apply = nullCacheFun.apply(nullCachekeys); // 执行回调函数去数据库查询未缓存的键值集合
|
|
|
252
|
+
|
251
|
for(Map.Entry<K, T> item : apply.entrySet()) {
|
253
|
for(Map.Entry<K, T> item : apply.entrySet()) {
|
252
|
- result.put(String.valueOf(item.getKey()), item.getValue());
|
254
|
+ lastResult.put(item.getKey(), item.getValue());
|
253
|
}
|
255
|
}
|
254
|
|
256
|
|
255
|
setBulk(apply, timeOut, cacheKeyPre, clazz); // 将不在缓存的键值对批量放入缓存
|
257
|
setBulk(apply, timeOut, cacheKeyPre, clazz); // 将不在缓存的键值对批量放入缓存
|
256
|
|
258
|
|
257
|
- Map<K, T> lastResult = new HashMap<>();
|
|
|
258
|
for(Map.Entry<String, T> entry : result.entrySet()) {
|
259
|
for(Map.Entry<String, T> entry : result.entrySet()) {
|
259
|
- lastResult.put(keyConvertFun.apply(entry.getKey()), entry.getValue());
|
260
|
+ lastResult.put(cacheKeyAndStringMap.get(entry.getKey()), entry.getValue());
|
260
|
}
|
261
|
}
|
261
|
|
262
|
|
262
|
return lastResult;
|
263
|
return lastResult;
|