|
|
@@ -47,26 +47,26 @@ public class ZcrmViewCustomerSelServiceImpl extends BaseServiceImpl<ZcrmViewCust
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- String cacheKey = "customer:sel:" + customerId;
|
|
|
- System.out.println(cacheKey);
|
|
|
- // 先从缓存获取
|
|
|
- if (bladeRedis.get(cacheKey) != null) {
|
|
|
- String viewCustomerSelString = bladeRedis.get(cacheKey);
|
|
|
- // 将JSON字符串转换为对象
|
|
|
- return JSON.parseObject(viewCustomerSelString, ViewCustomerSel.class);
|
|
|
- }
|
|
|
+// String cacheKey = "customer:sel:" + customerId;
|
|
|
+// System.out.println(cacheKey);
|
|
|
+// // 先从缓存获取
|
|
|
+// if (bladeRedis.get(cacheKey) != null) {
|
|
|
+// String viewCustomerSelString = bladeRedis.get(cacheKey);
|
|
|
+// // 将JSON字符串转换为对象
|
|
|
+// return JSON.parseObject(viewCustomerSelString, ViewCustomerSel.class);
|
|
|
+// }
|
|
|
|
|
|
// 缓存未命中则查询数据库
|
|
|
QueryWrapper<ViewCustomerSel> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("Customer_ID", customerId);
|
|
|
ViewCustomerSel customerSel = this.getOne(queryWrapper);
|
|
|
|
|
|
- // 查询结果不为空则存入缓存
|
|
|
- if (customerSel != null) {
|
|
|
- // 将对象转换为JSON字符串存储
|
|
|
- String customerSelJson = JSON.toJSONString(customerSel);
|
|
|
- bladeRedis.set(cacheKey, customerSelJson);
|
|
|
- }
|
|
|
+// // 查询结果不为空则存入缓存
|
|
|
+// if (customerSel != null) {
|
|
|
+// // 将对象转换为JSON字符串存储
|
|
|
+// String customerSelJson = JSON.toJSONString(customerSel);
|
|
|
+// bladeRedis.set(cacheKey, customerSelJson);
|
|
|
+// }
|
|
|
|
|
|
return customerSel;
|
|
|
}
|