Commit 176022fd by 杨树贤

修复脚本

parent d508e63f
......@@ -1679,10 +1679,10 @@ class DataService
foreach ($suppliers as $supplier) {
$oldSupplierName = $supplier['supplier_name'];
$supplier['supplier_name'] = replaceSpace($supplier['supplier_name']);
if ($oldSupplierName != $supplier['supplier_name']) {
dd($oldSupplierName,$supplier['supplier_name']);
}
if ($oldSupplierName === $supplier['supplier_name']) {
continue;
}
$region = $supplier['region'];
$regionType = $region == SupplierChannelModel::REGION_CN ? 1 : 2;
......@@ -1691,8 +1691,7 @@ class DataService
if (!empty($companyInfo)) {
$groupCode = array_get($companyInfo, 'group_code');
if ($groupCode) {
if ($oldSupplierName != $supplier['supplier_name']) {
dd($oldSupplierName,$supplier['supplier_name']);
dd($oldSupplierName, $supplier['supplier_name']);
continue;
//SupplierChannelModel::where('supplier_id', $supplier['supplier_id'])->update([
// 'supplier_name' => $supplier['supplier_name'],
......@@ -1702,7 +1701,6 @@ class DataService
}
}
}
}
}
......@@ -305,7 +305,7 @@ function getSpuSkuDb($id)
//去除特殊空格
function replaceSpace($str)
{
$str = str_replace(" ", " ", $str);
$str = str_replace(" ", " ", $str);
//头尾的空格去掉
$str = trim($str);
return $str;
......
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