Commit ec2ee2cf authored by zhuwei's avatar zhuwei

1

parent a40817ac
...@@ -606,19 +606,28 @@ class UserLogService ...@@ -606,19 +606,28 @@ class UserLogService
public function userDetailIsOutpaceCallNumPhone($user_phone, $agent_id) public function userDetailIsOutpaceCallNumPhone($user_phone, $agent_id)
{ {
$is_outpace_call_num = 0; $is_outpace_call_num = 1;
$m_agent_phone = new AAgentsPhone(); $call = new CallPhoneService();
$redis = RedisExt::getRedis(); $redis_cache = new RedisCacheService();
// $m_agent_phone = new AAgentsPhone();
// $redis = RedisExt::getRedis();
//
// $phone = $this->agentModel->getAgentsById($agent_id, 'phone');
// $is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
// if (empty($phone)) {
// $phone = $m_agent_phone->getAgentsByWhere(['agents_id' => $agent_id], 'phone');
// }
// $call_key = 'call_' . $agent_id . '_' . $phone . '_' . $user_phone . '_' . $is_privacy;
// $redis_res = $redis->get($call_key);
$phone = $this->agentModel->getAgentsById($agent_id, 'phone'); $agent_data = $redis_cache->getRedisCache(2, $agent_id);
$is_privacy = $redis->get('s_is_privacy');//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询 if(!$agent_data){
if (empty($phone)) { return 1;
$phone = $m_agent_phone->getAgentsByWhere(['agents_id' => $agent_id], 'phone');
} }
$call_key = 'call_' . $agent_id . '_' . $phone . '_' . $user_phone . '_' . $is_privacy; $result = $call->checkBindRedis($agent_id, $agent_data['phone_list'], $user_phone);
$redis_res = $redis->get($call_key); if($result != ''){
if (empty($redis_res)) { $is_outpace_call_num = 0;
$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