Commit 53be7c77 by mushishixian

fix

parent 0a311540
...@@ -13,8 +13,9 @@ class SupplierStatisticsService ...@@ -13,8 +13,9 @@ class SupplierStatisticsService
//获取供应商列表需要统计的信息 //获取供应商列表需要统计的信息
public function getSupplierListStatistics() public function getSupplierListStatistics()
{ {
$statisticsKey = 'supplier_list_statistics_' . request()->user->userId;
$redis = new RedisModel(); $redis = new RedisModel();
$result = json_decode($redis->get('supplier_list_statistics'), true); $result = json_decode($redis->get($statisticsKey), true);
if ($result) { if ($result) {
return $result; return $result;
} }
...@@ -77,8 +78,8 @@ class SupplierStatisticsService ...@@ -77,8 +78,8 @@ class SupplierStatisticsService
} }
return $value; return $value;
}, $result); }, $result);
$redis->set('supplier_list_statistics', json_encode($result)); $redis->set($statisticsKey, json_encode($result));
$redis->expire('supplier_list_statistics', 100); $redis->expire($statisticsKey, 100);
return $result; return $result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment