Commit 6c453de1 authored by zhuwei's avatar zhuwei

电话跟进

parent 8a41ab24
......@@ -8,6 +8,7 @@
namespace app\index\service;
use app\api_broker\service\VerifyRepetitionService;
use app\model\AAgents;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
......@@ -33,8 +34,24 @@ class PhoneFollowUpService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getPhoneFollowList(string $start_time, string $end_time, array $params, $field = 'id,user_id,create_time,content,user_status,labels_id,agent_id')
public function getPhoneFollowList(string $start_time, string $end_time, array $params, $field = 'id,user_id,create_time,content,user_status,labels_id,agent_id',$agent_id)
{
$vrs = new VerifyRepetitionService();
$page_no = isset($params['page_no']) ? $params['page_no'] : 1;
$page_size = isset($params['page_size']) ? $params['page_size'] : 15;
$is_check = $vrs->followUpClick($agent_id);
if($page_no == 1 && !$is_check){
$is_bool = $vrs->getCurrTimeSection();
$msg = "请勿频繁请求";
if($is_bool) {
$msg = "高峰期间每10秒钟只能搜索一次(6.30-8.30)";
}
return ['code'=>'101','data'=>$msg];
}
if (empty($start_time) || empty($end_time)) {
return false;
} else {
......@@ -60,10 +77,8 @@ class PhoneFollowUpService
unset($params['district_id']);
}
$page_no = isset($params['page_no']) ? $params['page_no'] : 1;
$page_size = isset($params['page_size']) ? $params['page_size'] : 15;
unset($params['page_no']);
unset($params['page_size']);
if (!empty($agent_where)) {
$m_agent = new AAgents();
......@@ -82,7 +97,9 @@ class PhoneFollowUpService
$data = $this->phoneFollowUp->getFollowList($page_no, $page_size, $order_ = 'id desc', $field, $where);
}
return $data;
return ['code'=>'200','data'=>$data];
}
}
\ 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