Commit d6de799a authored by hujun's avatar hujun

1

parent 38ad1485
...@@ -96,7 +96,7 @@ class CellPhone extends Basic ...@@ -96,7 +96,7 @@ class CellPhone extends Basic
$call = new CallPhoneService(); $call = new CallPhoneService();
$result = $call->agentsUnBindRedis($this->params['phone_a'], $this->params['phone_b'], $this->params['phone_x'], $this->params['user_id'], $this->agentId); $result = $call->agentsUnBindRedis($this->params['phone_a'], $this->params['phone_b'], $this->params['phone_x'], $this->params['user_id'], $this->agentId);
if ($result['status'] == 'success') { if ($result['status'] == 'successful') {
$this->msg = $result['msg']; $this->msg = $result['msg'];
$this->data['phone'] = $result['phone']; $this->data['phone'] = $result['phone'];
} else { } else {
......
...@@ -293,7 +293,7 @@ class CallPhoneService ...@@ -293,7 +293,7 @@ class CallPhoneService
*/ */
public function agentsUnBindRedis($phone_a, $phone_b, $phone_x, $user_id = 0, $agent_id = 0) public function agentsUnBindRedis($phone_a, $phone_b, $phone_x, $user_id = 0, $agent_id = 0)
{ {
$data['status'] = 'success'; $data['status'] = 'successful';
$data['msg'] = ''; $data['msg'] = '';
if (empty($phone_x)) { if (empty($phone_x)) {
$data['status'] = 'failed'; $data['status'] = 'failed';
...@@ -315,7 +315,7 @@ class CallPhoneService ...@@ -315,7 +315,7 @@ class CallPhoneService
$this->user_id = $user_id; $this->user_id = $user_id;
$user_data = $this->getUserData(); $user_data = $this->getUserData();
if (empty($user_data['user_phone'])) { if (empty($user_data['user_phone'])) {
$data['status'] = 'failed'; $data['status'] = 'fail';
$data['msg'] = '没有客户信息,可以忽略。'; $data['msg'] = '没有客户信息,可以忽略。';
return $data; return $data;
} }
...@@ -327,7 +327,7 @@ class CallPhoneService ...@@ -327,7 +327,7 @@ class CallPhoneService
} }
if (empty($this->phone_b)) { if (empty($this->phone_b)) {
$data['status'] = 'failed'; $data['status'] = 'fail';
$data['msg'] = '解除失败,请联系运营人员!'; $data['msg'] = '解除失败,请联系运营人员!';
return $data; return $data;
} }
...@@ -389,7 +389,7 @@ class CallPhoneService ...@@ -389,7 +389,7 @@ class CallPhoneService
$where['a.status'] = 1; $where['a.status'] = 1;
$where['a.phone_a'] = $this->phone_a; $where['a.phone_a'] = $this->phone_a;
$where['a.type'] = $this->is_privacy; $where['a.type'] = $this->is_privacy;
$agent_call = $this->m_bind->getPhoneX('a.phone_a,a.phone_b,b.phone_x', $where, 'a.id ASC'); $agent_call = $this->m_bind->getPhoneX('a.id,a.phone_a,a.phone_b,b.phone_x', $where, 'a.id ASC');
$result_unbind = $this->agentsUnBindRedis($agent_call['phone_a'], $agent_call['phone_b'], $agent_call['phone_x']); $result_unbind = $this->agentsUnBindRedis($agent_call['phone_a'], $agent_call['phone_b'], $agent_call['phone_x']);
$data['msg'] = '号码使用完,请联系运营人员。'; $data['msg'] = '号码使用完,请联系运营人员。';
if ($result_unbind['status'] == 'successful') { if ($result_unbind['status'] == 'successful') {
...@@ -400,7 +400,7 @@ class CallPhoneService ...@@ -400,7 +400,7 @@ class CallPhoneService
$this->subs_id = $result->SecretBindDTO->SubsId; $this->subs_id = $result->SecretBindDTO->SubsId;
$this->request_id = $result->RequestId; $this->request_id = $result->RequestId;
$this->m_bind->unBind($agent_call['phone_x'], $agent_call['phone_a'], $agent_call['phone_b']); $this->m_bind->unBindTable($agent_call['id']);
} }
} else { } else {
$data['msg'] = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!'; $data['msg'] = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!';
...@@ -459,10 +459,12 @@ class CallPhoneService ...@@ -459,10 +459,12 @@ class CallPhoneService
$where['a.status'] = 1; $where['a.status'] = 1;
$where['a.phone_a'] = $this->phone_a; $where['a.phone_a'] = $this->phone_a;
$where['a.type'] = $this->is_privacy; $where['a.type'] = $this->is_privacy;
$agent_call = $this->m_bind->getPhoneX('a.phone_a,a.phone_b,b.phone_x', $where, 'a.id ASC'); $agent_call = $this->m_bind->getPhoneX('a.id,a.phone_a,a.phone_b,b.phone_x', $where, 'a.id ASC');
$result_unbind = $this->agentsUnBindRedis($agent_call['phone_a'], $agent_call['phone_b'], $agent_call['phone_x']); $result_unbind = $this->agentsUnBindRedis($agent_call['phone_a'], $agent_call['phone_b'], $agent_call['phone_x']);
if ($result_unbind['status'] == 'successful') { if ($result_unbind['status'] == 'successful') {
$result = $yun_tong_xun->setNumber($this->phone_a, $this->phone_b, $area, $this->expiry_date, $record); $result = $yun_tong_xun->setNumber($this->phone_a, $this->phone_b, $area, $this->expiry_date, $record);
if ($result['statusCode'] == '000000') { if ($result['statusCode'] == '000000') {
$data['status'] = 'success'; $data['status'] = 'success';
$data['msg'] = '绑定成功。'; $data['msg'] = '绑定成功。';
...@@ -470,7 +472,7 @@ class CallPhoneService ...@@ -470,7 +472,7 @@ class CallPhoneService
$this->mapping_id = $result['data']['mappingId']; $this->mapping_id = $result['data']['mappingId'];
} }
$this->m_bind->unBind($agent_call['phone_x'], $agent_call['phone_a'], $agent_call['phone_b']); $this->m_bind->unBindTable($agent_call['id']);
} }
} }
} }
......
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