飞书消息更换为站内提醒
This commit is contained in:
+13
-6
@@ -23,13 +23,20 @@ class Task
|
||||
];
|
||||
$customer = Customer::where($where)->get();
|
||||
foreach ($customer as $item) {
|
||||
$res =[
|
||||
'id'=>$item->id,
|
||||
'category'=>'crm',
|
||||
'scene'=>'crm-person-follow-up',
|
||||
'receive type'=>'person'
|
||||
$contacts = $item->contacts??$item['phone'];
|
||||
$contacts = $contacts??$item['whatsApp'];
|
||||
$contacts = $contacts??$item['email'];
|
||||
$data = [
|
||||
'sender_id' => 0, //发送人ID 0默认系统
|
||||
'sender_type' => 'system', //发送者类型 user admin system
|
||||
'title' => '客户跟进提醒 - ' . $contacts, //标题
|
||||
'content' => $contacts . ' 到达预定跟进时间,请及时跟进', //内容
|
||||
'scene' => 1, //场景 0系统公共 1系统通知
|
||||
'recipient' => [$item->user_id], //接收人 空为全部
|
||||
'push_method' => 0 //推送方式0系统推送1手动推送
|
||||
];
|
||||
\Webman\RedisQueue\Redis::send("feishu-message",$res);
|
||||
\Webman\RedisQueue\Redis::send("notice",$data);
|
||||
|
||||
$item->warn = 1;
|
||||
$item->save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user