Commit bb4693b4 authored by hujun's avatar hujun

跟进列表

parent 244b485f
......@@ -10,6 +10,7 @@ namespace app\index\controller;
use app\api_broker\service\CallPhoneService;
use app\api_broker\service\ClientService;
use app\api_broker\service\RedisCacheService;
use app\extra\RedisExt;
use app\api_broker\service\VerifyRepetitionService;
use app\index\extend\Basic;
......@@ -119,6 +120,9 @@ class Remark extends Basic
$list = $u_phone_follow->getFollowList($pageNo, $pageSize, $order_ = 'id desc', $field, $where);
$label_data = $m_label->getColumn('id,name', ['type'=>1]); //获取标签
$redis_service = new RedisCacheService();
$call = new CallPhoneService();
foreach ($list as $k => $v) {
if (!empty($v['user_id'])) {
$user_data = $m_user->getUserById('user_name,user_phone,vip,agent_id,create_time', $v['user_id']);
......@@ -143,14 +147,20 @@ class Remark extends Basic
$is_outpace_call_num = 1;
}
$phone = $m_agent->getAgentsById($this->userId, 'phone');
$agent_data = $redis_service->getRedisCache(2, $this->userId);
if (empty($agent_data)) {
$phone['phone_list'] = $m_agent->getAgentsById($this->userId, 'phone');
} else {
$phone = $agent_data['phone_list'];
}
if ($is_outpace_call_num == 1 ) {
$is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
if (empty($phone)) {
$phone = $m_agent_phone->getAgentsByWhere(['agent_id'=>$this->userId], 'phone');
}
$call_key = 'call_'.$this->userId.'_'.$phone.'_'.$v['user_phone'].'_'.$is_privacy;
$redis_res = $redis->get($call_key);
// $is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
// if (empty($phone)) {
// $phone = $m_agent_phone->getAgentsByWhere(['agent_id'=>$this->userId], 'phone');
// }
// $call_key = 'call_'.$this->userId.'_'.$phone.'_'.$v['user_phone'].'_'.$is_privacy;
// $redis_res = $redis->get($call_key);
$redis_res = $call->checkBindRedis($this->userId, $agent_data['phone_list'], $v['user_phone']);
if(empty($redis_res)){
$is_outpace_call_num = 1;
......
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