修改线索发送消息脚本

This commit is contained in:
lccsw
2025-12-01 13:53:26 +08:00
parent 7e1a283b06
commit 6e14becf62
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -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'],
+1
View File
@@ -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;
}