Merge branch 'master' into develop

# Conflicts:
#	app/queue/redis/InquiryToCrmNew.php
This commit is contained in:
mzl
2025-12-11 15:33:06 +08:00
parent 133cd0a801
commit cdd6d78995
+7 -2
View File
@@ -39,7 +39,7 @@ class InquiryToCrmNew implements Consumer
发过 没分 更新 (要同步)7 发过 没分 更新 (要同步)7
发过 分过 更新 (要同步)8 发过 分过 更新 (要同步)8
*/ */
var_dump('询单同步开始:'.$data['id']); // var_dump('询单同步开始:'.$data['id']);
try { try {
// 获取询盘信息 // 获取询盘信息
$info = InquiryLog::with(['channelInfo', 'countryInfo', 'enter'])->where('id', $data['id'])->first(); $info = InquiryLog::with(['channelInfo', 'countryInfo', 'enter'])->where('id', $data['id'])->first();
@@ -57,7 +57,7 @@ var_dump('询单同步开始:'.$data['id']);
// 更改库信息 // 更改库信息
$this->syncCustomer($info); $this->syncCustomer($info);
} catch (\Throwable $th) { } catch (\Throwable $th) {
var_dump('询单同步失败:'.$th->getMessage().' | '.$th->getLine().' | '.$th->getFile()); flg('询单同步失败:'.$th->getMessage().' | '.$th->getLine().' | '.$th->getFile(), false);
throw $th; throw $th;
} }
} }
@@ -133,6 +133,11 @@ var_dump('询单同步开始:'.$data['id']);
if (!$crmCustomerInfo->update($udata)) { if (!$crmCustomerInfo->update($udata)) {
throw new BusinessException('同步失败,更新客户线索失败'); throw new BusinessException('同步失败,更新客户线索失败');
} }
$info->sync_crm = 1;
if (!$info->save()) {
throw new BusinessException('标记询盘同步状态失败');
}
} else { } else {
$crmCustomer = new CrmCustomer(); $crmCustomer = new CrmCustomer();
$crmCustomer->sn = $info->order_no; $crmCustomer->sn = $info->order_no;