Commit 3be90c83 by 杨树贤

新增

parent 7bd8aca3
Showing with 0 additions and 18 deletions
......@@ -1117,24 +1117,6 @@ class DataService
if (!$exists) {
// 联系人不存在,需要创建
//先去判断已经有的供应商联系人里面有没有一样的采购员
$existingContact = SupplierContactModel::where('supplier_id', $supplierId)
->where('can_check_uids', $followerCodeId)->where('supplier_telephone', '!=', '')
->first();
if (!empty($existingContact)) {
$existingContact = $existingContact->toArray();
\dump('已存在线上采购员相同联系人 : ' . $followerCodeId . ' 进行信息覆盖');
$contactData = [
'supplier_id' => $supplierId,
'supplier_consignee' => !empty($existingContact['supplier_consignee']) ? $existingContact['supplier_consignee'] : '',
'supplier_telephone' => !empty($existingContact['supplier_telephone']) ? $existingContact['supplier_telephone'] : '',
'supplier_fax' => !empty($existingContact['supplier_fax']) ? $existingContact['supplier_fax'] : '',
'supplier_qq' => !empty($existingContact['supplier_qq']) ? $existingContact['supplier_qq'] : '',
'supplier_mobile' => !empty($existingContact['supplier_mobile']) ? $existingContact['supplier_mobile'] : '',
'supplier_email' => !empty($existingContact['supplier_email']) ? $existingContact['supplier_email'] : '',
'supplier_position' => !empty($existingContact['supplier_position']) ? $existingContact['supplier_position'] : '',
];
}
$contactData = array_merge($contactData, [
'can_check_uids' => $followerCodeId,
'channel_user_type' => 4, // 数据跟单员
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment