Commit abf9e488 authored by hujun's avatar hujun

查询拨打次数

parent 7b74ff0d
...@@ -446,4 +446,17 @@ class CallPhoneService ...@@ -446,4 +446,17 @@ class CallPhoneService
return $id; return $id;
} }
/**
* 查询经纪人与客户绑定数量
*
* @param $phone_a
* @param $phone_b
* @param $status
* @return int|string
*/
public function getBindNum($phone_a, $phone_b, $status) {
$m_bind = new BindingPhone();
return $m_bind->getCallNumber($phone_a, $phone_b, $status);
}
} }
\ No newline at end of file
...@@ -187,4 +187,30 @@ class BindingPhone extends BaseModel ...@@ -187,4 +187,30 @@ class BindingPhone extends BaseModel
->count(); ->count();
return $r; return $r;
} }
/**
* 获取被拨打人的次数
*
* @param $phone_a
* @param $phone_b
* @param $status
* @return int|string
*/
public function getCallNumber($phone_a, $phone_b, $status = 0) {
if ($phone_a) {
$where['phone_a'] = $phone_a;
}
if ($phone_b) {
$where['phone_b'] = $phone_b;
}
if ($status) {
$where['status'] = $status;
}
return $this->where($where)
->count();
}
} }
\ No newline at end of file
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