Commit 3082a830 authored by hujun's avatar hujun

获取被拨打人的次数

parent 0ca92a25
......@@ -40,4 +40,18 @@ class AliYunSecretReport extends BaseModel
{
return $this->where('id', $id)->update($data);
}
/**
* 获取被拨打人的次数
*
* @param $phone_b
* @return int|string
*/
public function getCallNumber($phone_b) {
$date = date('Y-m-d');
return $this->where('time','>',0)
->where('create_time', 'between time', [$date. ' 00:00:00', $date . ' 23:59:59'])
->where('peer_no', $phone_b)
->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