diff --git a/api/controllers/plan/Notice.php b/api/controllers/plan/Notice.php index d40c35f7..b0ca9470 100644 --- a/api/controllers/plan/Notice.php +++ b/api/controllers/plan/Notice.php @@ -30,7 +30,7 @@ class Notice extends CI_Controller } $cluesRow = $this->clues_model->select($where, 'id asc', 1, 20); if ($cluesRow) { - $noticeAdmins = $this->sysAdmin->select(['role_id' => 2, 'status' => 1], '', 0, 0, 'id'); + $noticeAdmins = $this->sysAdmin->select(['role_id' => 2, 'status' => 1], '', 0, 0, 'id,other_json'); foreach ($cluesRow as $item) { debug_log("开始处理线: {$item['id']}", $logPath); $mobile = substr($item['mobile'], -4); @@ -38,6 +38,10 @@ class Notice extends CI_Controller //推送消息给中台客服 if ($noticeAdmins) { foreach ($noticeAdmins as $noticeAdmin) { + $otherJson = json_decode($noticeAdmin['other_json'], true); + if ($item['belong_id'] && $item['belong_id'] != $otherJson['belong_id']) { + continue; + } $params = [ 'platform' => Sys_notice_model::PLAT_FORM_ADMIN, 'uid' => $noticeAdmin['id'], diff --git a/api/controllers/plan/Plan.php b/api/controllers/plan/Plan.php index 88b3bf37..3e11acf4 100644 --- a/api/controllers/plan/Plan.php +++ b/api/controllers/plan/Plan.php @@ -46,6 +46,7 @@ class Plan extends CI_Controller $plan[] = array('url' => base_url(array('plan', 'report', 'index')), 'interval' => 20); //门店日报 $plan[] = array('url' => base_url(array('plan', 'callBack', 'downVideo')), 'interval' => 1); //外呼下载录音文件 + $plan[] = array('url' => base_url(array('plan', 'notice', 'clues')), 'interval' => 1); //消息推送 $this->plan = $plan; }