调整询单与crm消息通知

This commit is contained in:
2025-08-25 16:03:34 +08:00
parent adc1d9658d
commit d6dae82157
+12 -12
View File
@@ -61,7 +61,7 @@ class InquiryToCrmNew implements Consumer
}
}
public function pushWs($title, $content, $recipient)
public function pushWs($title, $content, $recipient = [])
{
$wsdata = [
'sender_id' => 0,
@@ -84,21 +84,21 @@ class InquiryToCrmNew implements Consumer
// 消息推送
if ($info->status == 2 && empty($crmCustomerInfo->user_id)) {
// $notice = '分配';
$title = '[询单·分配]新的客户线索【' . $info->order_no . '】,请及时处理';
$content = '[询单·分配]新的客户线索【' . $info->order_no . '】,请及时处理';
$title = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
$content = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
$recipient = [$info->recipient];
$this->pushWs($title, $content, $recipient);
} else {
if ($info->status == 2 && $crmCustomerInfo->user_id == $info->recipient) {
// $notice = '更新';
$title = '[询单·更新]客户线索' . $info->order_no . '有新的调整,请及时处理';
$content = '[询单·更新]客户线索' . $info->order_no . '有新的调整,请及时处理';
$title = '[询单·更新] 客户线索' . $info->order_no . '有新的调整,请及时处理';
$content = '[询单·更新] 客户线索' . $info->order_no . '有新的调整,请及时处理';
$recipient = [$info->recipient];
$this->pushWs($title, $content, $recipient);
} else {
// $notice = '重新分配';
$title = '[询单·分配]新的客户线索【' . $info->order_no . '】,请及时处理';
$content = '[询单·分配]新的客户线索【' . $info->order_no . '】,请及时处理';
$title = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
$content = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
$recipient = [$info->recipient];
$this->pushWs($title, $content, $recipient);
}
@@ -145,16 +145,16 @@ class InquiryToCrmNew implements Consumer
// 消息推送
if ($info->status == 1) {
// $notice = '发布';
$title = '[询单·公海]新的客户线索【' . $info->order_no . '】发布';
$content = '[询单·公海]新的客户线索【' . $info->order_no . '】发布';
$title = '[询单·公海] 新的客户线索【' . $info->order_no . '】发布';
$content = '[询单·公海] 新的客户线索【' . $info->order_no . '】发布';
$recipient = [$info->recipient];
$this->pushWs($title, $content, $recipient);
$this->pushWs($title, $content);
}
if ($info->status == 2) {
// $notice = '分配';
$title = '[询单·分配]新的客户线索【' . $info->order_no . '】,请及时处理';
$content = '[询单·分配]新的客户线索【' . $info->order_no . '】,请及时处理';
$title = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
$content = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
$recipient = [$info->recipient];
$this->pushWs($title, $content, $recipient);
}