调整询单提醒为邮件
This commit is contained in:
@@ -75,6 +75,16 @@ class InquiryToCrmNew implements Consumer
|
||||
\Webman\RedisQueue\Redis::send('notice', $wsdata);
|
||||
}
|
||||
|
||||
public function pushEmail($id, $title, $email)
|
||||
{
|
||||
$options = [
|
||||
'id' => $id,
|
||||
'email' => $email,
|
||||
'title' => $title,
|
||||
];
|
||||
\Webman\RedisQueue\Redis::send('email-message', $options);
|
||||
}
|
||||
|
||||
public function syncCustomer(Model $info)
|
||||
{
|
||||
$uInfo = $this->recipientInfo($info);
|
||||
@@ -87,25 +97,28 @@ class InquiryToCrmNew implements Consumer
|
||||
$title = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
|
||||
$content = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
|
||||
$recipient = [$info->recipient];
|
||||
$this->pushWs($title, $content, $recipient);
|
||||
// $this->pushWs($title, $content, $recipient);
|
||||
$this->pushEmail($info->id, $title, $uInfo['uinfo']['email']);
|
||||
} else {
|
||||
if ($info->status == 2 && $crmCustomerInfo->user_id == $info->recipient) {
|
||||
// $notice = '更新';
|
||||
$title = '[询单·更新] 客户线索' . $info->order_no . '有新的调整,请及时处理';
|
||||
$content = '[询单·更新] 客户线索' . $info->order_no . '有新的调整,请及时处理';
|
||||
$recipient = [$info->recipient];
|
||||
$this->pushWs($title, $content, $recipient);
|
||||
// $this->pushWs($title, $content, $recipient);
|
||||
$this->pushEmail($info->id, $title, $uInfo['uinfo']['email']);
|
||||
} else {
|
||||
// $notice = '重新分配';
|
||||
$title = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
|
||||
$content = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
|
||||
$recipient = [$info->recipient];
|
||||
$this->pushWs($title, $content, $recipient);
|
||||
// $this->pushWs($title, $content, $recipient);
|
||||
$this->pushEmail($info->id, $title, $uInfo['uinfo']['email']);
|
||||
}
|
||||
}
|
||||
|
||||
$udata = [
|
||||
'corp_id' => $uInfo['corpId'],
|
||||
'corp_id' => $uInfo['corpId'],
|
||||
'user_id' => $info->recipient,
|
||||
'channel_id' => $info->channel,
|
||||
'country_id' => $info->country,
|
||||
@@ -151,7 +164,8 @@ class InquiryToCrmNew implements Consumer
|
||||
$title = '[询单·公海] 新的客户线索【' . $info->order_no . '】发布';
|
||||
$content = '[询单·公海] 新的客户线索【' . $info->order_no . '】发布';
|
||||
$recipient = [$info->recipient];
|
||||
$this->pushWs($title, $content);
|
||||
// $this->pushWs($title, $content);
|
||||
$this->pushEmail($info->id, $title, $uInfo['uinfo']['email']);
|
||||
}
|
||||
|
||||
if ($info->status == 2) {
|
||||
@@ -159,7 +173,8 @@ class InquiryToCrmNew implements Consumer
|
||||
$title = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
|
||||
$content = '[询单·分配] 新的客户线索【' . $info->order_no . '】,请及时处理';
|
||||
$recipient = [$info->recipient];
|
||||
$this->pushWs($title, $content, $recipient);
|
||||
// $this->pushWs($title, $content, $recipient);
|
||||
$this->pushEmail($info->id, $title, $uInfo['uinfo']['email']);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user