Commit 176022fd by 杨树贤

修复脚本

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