Commit e53dee91 authored by hujun's avatar hujun

拨打电话记录redis

parent 2f7720df
...@@ -122,11 +122,10 @@ class CallPhoneService ...@@ -122,11 +122,10 @@ class CallPhoneService
$result['phone'] = $phone_b; $result['phone'] = $phone_b;
return $result; return $result;
} }
$call_key = 'call_'.$agent_id.'_'.$this->phone_a.'_'.$this->phone_b;
$phone_x = $this->redis->get('call_'.$agent_id.'_'.$this->phone_a.'_'.$this->phone_b); $phone_x = $this->redis->get($call_key);
$bind = new BindingPhone();
if (empty($phone_x)) { if (empty($phone_x)) {
$bind = new BindingPhone();
$where['a.status'] = 1; $where['a.status'] = 1;
$where['a.phone_a'] = $phone_a; $where['a.phone_a'] = $phone_a;
$where['a.phone_b'] = $phone_b; $where['a.phone_b'] = $phone_b;
...@@ -168,6 +167,7 @@ class CallPhoneService ...@@ -168,6 +167,7 @@ class CallPhoneService
$result['phone'] = $call_phone['phone']; $result['phone'] = $call_phone['phone'];
$result['msg'] = $call_phone['msg']; $result['msg'] = $call_phone['msg'];
$type = 'AliYunBindAxb'; $type = 'AliYunBindAxb';
$this->redis->set($call_key, $call_phone['phone']);
$bind->recordBindPhone($call_phone['phone'], $phone_a, $phone_b, $record, $this->expiry_date, $this->subs_id, $this->request_id, $this->mapping_id, $this->is_privacy, $this->release); $bind->recordBindPhone($call_phone['phone'], $phone_a, $phone_b, $record, $this->expiry_date, $this->subs_id, $this->request_id, $this->mapping_id, $this->is_privacy, $this->release);
} else { } else {
$result['msg'] = $call_phone['msg']; $result['msg'] = $call_phone['msg'];
...@@ -180,7 +180,7 @@ class CallPhoneService ...@@ -180,7 +180,7 @@ class CallPhoneService
$result['phone'] = $call_phone['phone']; $result['phone'] = $call_phone['phone'];
$result['msg'] = $call_phone['msg']; $result['msg'] = $call_phone['msg'];
$type = 'YunTongXunBindAxb'; $type = 'YunTongXunBindAxb';
$this->redis->set($call_key, $call_phone['phone']);
$bind->recordBindPhone($call_phone['phone'], $phone_a, $phone_b, $record, $this->expiry_date, $this->subs_id, $this->request_id, $this->mapping_id, $this->is_privacy, $this->release); $bind->recordBindPhone($call_phone['phone'], $phone_a, $phone_b, $record, $this->expiry_date, $this->subs_id, $this->request_id, $this->mapping_id, $this->is_privacy, $this->release);
} else { } else {
$result['msg'] = $call_phone['msg']; $result['msg'] = $call_phone['msg'];
......
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