Commit a5ddaeb7 by 杨树贤

fix

parent 507d4c2d
Showing with 8 additions and 3 deletions
......@@ -1241,7 +1241,8 @@ class DataService
$supplierList = SupplierChannelModel::whereNotIn('supplier_code', $inXslSupplierCodes)->select([
'supplier_id',
'channel_uid',
'supplier_code'
'supplier_code',
'region'
])->limit($num)->get();
$adminUserService = new AdminUserService();
foreach ($supplierList as $key => $supplier) {
......@@ -1263,13 +1264,17 @@ class DataService
}
}
//判断是否已经存在,不存在就新增,存在就更新
$exist = SupplierContactModel::where('supplier_id',$supplier['supplier_id'])->where('can_check_uids', $dataFollowersCodeId)->value('contact_id');
$exist = SupplierContactModel::where('supplier_id',$supplier['supplier_id'])->whereIn('can_check_uids', [
'10009',
'10546'
])->value('contact_id');
if ($exist) {
\dump('供应商 :' . $supplier['supplier_code'] . ' 存在' . $dataFollowersCodeId . ' 直接更新');
if ($updateData) {
SupplierContactModel::where('contact_id', $exist)->update([
'channel_user_type' => 4
'channel_user_type' => 4,
'can_check_uids' => $dataFollowersCodeId
]);
}
} else {
......
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