Commit 354bc04d authored by hujun's avatar hujun

app客户跟进查缓存

parent 467b2661
...@@ -130,17 +130,31 @@ class HomePageLog extends Basic ...@@ -130,17 +130,31 @@ class HomePageLog extends Basic
} }
$clientService = new ClientService(); $clientService = new ClientService();
$m_label = new ULabels(); // $m_label = new ULabels();
$label_data = $m_label->getColumn('id,name', ['type' => 1]); //获取标签 $redis_service = new RedisCacheService();
// $label_data = $m_label->getColumn('id,name', ['type' => 1]); //获取标签
$label_data = $redis_service->userCallLabelCache();
foreach ($result as $key => $value) { foreach ($result as $key => $value) {
$agent_params = []; // $agent_params = [];
$agent_params["a.id"] = $value['agent_id']; // $agent_params["a.id"] = $value['agent_id'];
$agent_field = "a.name,a.img,b.store_name"; // $agent_field = "a.name,a.img,b.store_name";
$model = new AAgents(); // $model = new AAgents();
$res_a = $model->getAgentsInfo($agent_field, $agent_params); // $res_a = $model->getAgentsInfo($agent_field, $agent_params);
$result[$key]['name'] = $res_a[0]['name']; // $result[$key]['name'] = $res_a[0]['name'];
$result[$key]['img'] = $res_a[0]['img']; // $result[$key]['img'] = $res_a[0]['img'];
$result[$key]['store_name'] = $res_a[0]['store_name']; // $result[$key]['store_name'] = $res_a[0]['store_name'];
if ($value['agent_id']) {
$res_a = $redis_service->getRedisCache(2, $value['agent_id']);
$result[$key]['name'] = $res_a['name'];
$result[$key]['img'] = $res_a['img'];
$result[$key]['store_name'] = $res_a['store_name'];
} else {
$result[$key]['name'] = '';
$result[$key]['img'] = '';
$result[$key]['store_name'] = '';
}
if ($if_search) if ($if_search)
$result[$key]['create_time'] = date("Y-m-d H:i:s",$value["create_time"] / 1000); $result[$key]['create_time'] = date("Y-m-d H:i:s",$value["create_time"] / 1000);
......
...@@ -37,7 +37,7 @@ class RedisCacheService ...@@ -37,7 +37,7 @@ class RedisCacheService
public function __construct() public function __construct()
{ {
$this->redis_ext = RedisExt::getRedis(); $this->redis_ext = RedisExt::getRedis();
$this->time = 1800; //30分钟 $this->time = 86400; //24小时
$this->max_time = 2592000; //30天 $this->max_time = 2592000; //30天
} }
......
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 to comment