From e1a10f9fb0c781866f4f1cdafc0f0b561a328e1b Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Mon, 25 Aug 2025 16:36:18 +0800 Subject: [PATCH 1/4] Revert "Merge branch 'feature/ticket' into develop" This reverts commit 69731bf0db07cfa47165415434319b4b361c3fad, reversing changes made to 375f77189e977005f3bc720a8f6c5bce1d8cebdc. --- config/whitelist.php | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 config/whitelist.php diff --git a/config/whitelist.php b/config/whitelist.php deleted file mode 100644 index 1736876..0000000 --- a/config/whitelist.php +++ /dev/null @@ -1,13 +0,0 @@ - [ - '/', // 首页 - '/index/index', // 首页 - '/index/view', // 飞书调试 - '/perm', // 调试-添加权限 - - '/common/preset/corps', // 公司列表 - '/common/preset/feishu/app', // 飞书应用信息 - ] -]; \ No newline at end of file From b176c01f54abc97bb2bc3b9c882c2b6c1ee0de51 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 27 Aug 2025 15:39:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?crm=E5=AE=A2=E6=88=B7=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E5=AD=97=E6=AE=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/CrmCustomer.php | 2 +- app/common/utils/email/Emails.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/model/CrmCustomer.php b/app/common/model/CrmCustomer.php index bc439db..2c262b3 100644 --- a/app/common/model/CrmCustomer.php +++ b/app/common/model/CrmCustomer.php @@ -40,7 +40,7 @@ class CrmCustomer extends Model /** * 允许自动填充模型字段 */ - protected $fillable = ['id', 'sn', 'corp_abbr', 'user_id', 'user_sn', 'type', 'grade', 'sex', 'channel_id', 'country_id', 'car_type_id', 'magnitude', 'email', 'phone', 'WhatsApp', 'contacts', 'describe', 'desc_collect', 'address', 'lat', 'lng', 'follow_last', 'follow_next', 'warn', 'follow_remark', 'enter_user_id', 'created_at', 'updated_at', 'deleted_at']; + protected $fillable = ['id', 'sn', 'corp_id', 'user_id', 'user_sn', 'type', 'grade', 'sex', 'channel_id', 'country_id', 'car_type_id', 'magnitude', 'email', 'phone', 'WhatsApp', 'contacts', 'describe', 'desc_collect', 'address', 'lat', 'lng', 'follow_last', 'follow_next', 'warn', 'follow_remark', 'enter_user_id', 'created_at', 'updated_at', 'deleted_at']; /** * 不允许自动填充模型字段 diff --git a/app/common/utils/email/Emails.php b/app/common/utils/email/Emails.php index 18b06c2..933e6b4 100644 --- a/app/common/utils/email/Emails.php +++ b/app/common/utils/email/Emails.php @@ -480,7 +480,7 @@ class Emails // 同步客户 $crmCustomer = new CrmCustomer(); $crmCustomer->sn = $inquiryLogResult->order_no; - $crmCustomer->corp_abbr = $recipientInfo->corp_id; + $crmCustomer->corp_id = $recipientInfo->corp_id; $crmCustomer->user_id = $assignedUid; $crmCustomer->type = 1; $crmCustomer->channel_id = $inquiryLogResult->channel; From 45de47dd3d937c21af1d036ff46ae3462d4bf047 Mon Sep 17 00:00:00 2001 From: mzl Date: Mon, 1 Sep 2025 13:47:23 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8A=A5=E9=87=8D=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/crm/service/CustomerService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/crm/service/CustomerService.php b/app/crm/service/CustomerService.php index 01d8115..c20ceab 100644 --- a/app/crm/service/CustomerService.php +++ b/app/crm/service/CustomerService.php @@ -358,7 +358,10 @@ class CustomerService * 查询客户关系是否重复 */ public function distinct($params,$corpId){ - + // 9.1 add 报重修正 + if (!$params['email'] && !$params['phone'] && !$params['whatsApp']) { + return false; + } $customer = Customer::where('corp_id',$corpId) ->where((function (Builder $query) use ($params) { if(!empty($params['email'])) From 00bc346b874c8565f5a9adb797e791c43ce451b1 Mon Sep 17 00:00:00 2001 From: mzl Date: Tue, 2 Sep 2025 08:54:37 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=8F=91=E9=80=81=E7=9A=84=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/utils/email/Emails.php | 34 ++++++++++++++++++------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/app/common/utils/email/Emails.php b/app/common/utils/email/Emails.php index 933e6b4..68aca42 100644 --- a/app/common/utils/email/Emails.php +++ b/app/common/utils/email/Emails.php @@ -497,22 +497,28 @@ class Emails } // 邮件模板 + // $data = [ + // 'order_no' => $inquiryLogResult->order_no, + // 'enter_user_id' => $enterUser->name, + // 'recipient' => $recipientInfo->name, + // 'quality' => (new \app\inquiry\service\InquiryLogService())->qualityName($inquiryLogResult->quality), + // 'channel' => $channelInfo->name, + // 'email' => $inquiryLogResult->email && $inquiryLogResult->email != '' ? $inquiryLogResult->email : ' - ', + // 'tel' => $inquiryLogResult->tel && $inquiryLogResult->tel != '' ? $inquiryLogResult->tel : ' - ', + // 'whatsapp' => $inquiryLogResult->whatsapp && $inquiryLogResult->whatsapp != '' ? $inquiryLogResult->whatsapp : ' - ', + // 'country' => $countryName, + // 'contacts' => $inquiryLogResult->contacts && $inquiryLogResult->contacts != '' ? $inquiryLogResult->contacts : ' - ', + // 'content' => $inquiryLogResult->content && $inquiryLogResult->content != '' ? $inquiryLogResult->content : ' - ', + // 'r_time' => $inquiryLogResult->r_time ? date('Y-m-d H:i:s', $inquiryLogResult->r_time) : ' - ', + // 't_time' => $inquiryLogResult->t_time ? date('Y-m-d H:i:s', $inquiryLogResult->t_time) : ' - ' + // ]; + // \app\common\utils\email\MailSend::send($recipientInfo->email, '【XYH】新的客户线索', replaceTpl($data)); + + // 9.2 修改消息发送 $data = [ - 'order_no' => $inquiryLogResult->order_no, - 'enter_user_id' => $enterUser->name, - 'recipient' => $recipientInfo->name, - 'quality' => (new \app\inquiry\service\InquiryLogService())->qualityName($inquiryLogResult->quality), - 'channel' => $channelInfo->name, - 'email' => $inquiryLogResult->email && $inquiryLogResult->email != '' ? $inquiryLogResult->email : ' - ', - 'tel' => $inquiryLogResult->tel && $inquiryLogResult->tel != '' ? $inquiryLogResult->tel : ' - ', - 'whatsapp' => $inquiryLogResult->whatsapp && $inquiryLogResult->whatsapp != '' ? $inquiryLogResult->whatsapp : ' - ', - 'country' => $countryName, - 'contacts' => $inquiryLogResult->contacts && $inquiryLogResult->contacts != '' ? $inquiryLogResult->contacts : ' - ', - 'content' => $inquiryLogResult->content && $inquiryLogResult->content != '' ? $inquiryLogResult->content : ' - ', - 'r_time' => $inquiryLogResult->r_time ? date('Y-m-d H:i:s', $inquiryLogResult->r_time) : ' - ', - 't_time' => $inquiryLogResult->t_time ? date('Y-m-d H:i:s', $inquiryLogResult->t_time) : ' - ' + 'id' => $inquiryLogResult->id ]; - \app\common\utils\email\MailSend::send($recipientInfo->email, '【XYH】新的客户线索', replaceTpl($data)); + \Webman\RedisQueue\Redis::send('inquiry-to-crm-new', $data); // 更新状态 $record->update(['status' => 1]);