Commit f82e881e authored by zhuwei's avatar zhuwei

1

parent 4f61bce3
...@@ -266,6 +266,7 @@ class UserLogService ...@@ -266,6 +266,7 @@ class UserLogService
#拨打电话按钮是否显示 0:显示 1:不显示 #拨打电话按钮是否显示 0:显示 1:不显示
$result['is_phone_button_show'] = $this->isPhoneButtonShow($user_id,$result['user_phone'],$result["agent_id"],$agent_id); $result['is_phone_button_show'] = $this->isPhoneButtonShow($user_id,$result['user_phone'],$result["agent_id"],$agent_id);
// $result['is_phone_button_show'] = 0;
big_log('拨打电话按钮是否显示 0:显示 1:不显示'); big_log('拨打电话按钮是否显示 0:显示 1:不显示');
big_log($result['is_phone_button_show']); big_log($result['is_phone_button_show']);
big_log('拨打电话按钮是否显示'); big_log('拨打电话按钮是否显示');
...@@ -296,28 +297,30 @@ class UserLogService ...@@ -296,28 +297,30 @@ class UserLogService
// big_log('是否有权限查看vip客户'); // big_log('是否有权限查看vip客户');
// big_log($examine_vip); // big_log($examine_vip);
//是否有绑定关系 0有 1无
$called = $this->userDetailIsOutpaceCallNumPhone($result_user_phone, $agent_id); $called = $this->userDetailIsOutpaceCallNumPhone($result_user_phone, $agent_id);
// big_log('是否有绑定关系');
// big_log($called);
if($is_can_look == 0 or $examine_vip == 0 or $called == 0){ if($is_can_look == 0 or $examine_vip == 0 or $called == 0){
return 0;//如果是客方的总监 或者 有权限查看vip客户 直接返回0 return 0;//如果是客方的总监 或者 有权限查看vip客户 直接返回0
} }
#客户是否在保护期内(0:保护器内 1:超过保护期) #客户是否在保护期内(0:保护器内 1:超过保护期)
$is_outstrip_twenty_four_hours = $user_service->isUserProtect($user_id); $is_outstrip_twenty_four_hours = $user_service->isUserProtect($user_id);
// big_log('客户是否在保护期内'); big_log('客户是否在保护期内');
// big_log($is_outstrip_twenty_four_hours); big_log($is_outstrip_twenty_four_hours);
#判断当天被拨打是否超过5次 (0:拨打不超过5次 1:超过5次) #判断当天被拨打是否超过5次 (0:拨打不超过5次 1:超过5次)
$is_outpace_call_num = $this->userDetailIsOutpaceCallNum5($user_id); $is_outpace_call_num = $this->userDetailIsOutpaceCallNum5($user_id);
// big_log('判断当天被拨打是否超过5次'); big_log('判断当天被拨打是否超过5次');
// big_log($is_outpace_call_num); big_log($is_outpace_call_num);
if($is_outstrip_twenty_four_hours == 0 or $is_outpace_call_num == 1){ if($is_outstrip_twenty_four_hours == 0 or $is_outpace_call_num == 1){
return 1;//过了保护期 或者 有绑定关系 直接返回0 return 1;//过了保护期 或者 有绑定关系 直接返回0
} }
return 1; return 0;
} }
/** /**
...@@ -383,7 +386,6 @@ class UserLogService ...@@ -383,7 +386,6 @@ class UserLogService
$redis = RedisExt::getRedis(); $redis = RedisExt::getRedis();
$phone = $this->agentModel->getAgentsById($agent_id, 'phone'); $phone = $this->agentModel->getAgentsById($agent_id, 'phone');
if ($is_outpace_call_num == 1 ) {
$is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询 $is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
if (empty($phone)) { if (empty($phone)) {
$phone = $m_agent_phone->getAgentsByWhere(['agent_id'=>$agent_id], 'phone'); $phone = $m_agent_phone->getAgentsByWhere(['agent_id'=>$agent_id], 'phone');
...@@ -394,7 +396,6 @@ class UserLogService ...@@ -394,7 +396,6 @@ class UserLogService
if(empty($redis_res)){ if(empty($redis_res)){
$is_outpace_call_num = 1; $is_outpace_call_num = 1;
} }
}
return $is_outpace_call_num;//0有绑定关系 1无绑定关系 return $is_outpace_call_num;//0有绑定关系 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