Commit f82e7fcf authored by hujun's avatar hujun

根据id 取客户手机号

parent 75913f36
...@@ -173,11 +173,31 @@ class CellPhone extends Basic ...@@ -173,11 +173,31 @@ class CellPhone extends Basic
* 解除绑定关系 * 解除绑定关系
* *
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function agentsUnBind() public function agentsUnBind()
{ {
if (empty($this->params['user_id'])) {
return $this->response(101, '客户id为空');
}
if (empty($this->params['phone_b'])) {
$m_user = new Users();
$user_phone = $m_user->selectUser($this->params['user_id'], 'user_phone');
if (empty($user_phone['user_phone'])) {
return $this->response(101, '没有用户信息');
}
$phone_b = $user_phone['user_phone'];
} else {
$phone_b = $this->params['phone_b'];
}
$call_phone = new CallPhoneService(); $call_phone = new CallPhoneService();
$data = $call_phone->agentsUnBind($this->params['phone_a'], $this->params['phone_b'], $this->params['phone_x']); $data = $call_phone->agentsUnBind($this->params['phone_a'], $phone_b, $this->params['phone_x']);
$result['msg'] = ''; $result['msg'] = '';
if ($data['status'] == 'success') { if ($data['status'] == 'success') {
$result['code'] = 200; $result['code'] = 200;
......
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