cqp 10 ماه پیش
والد
کامیت
0a0588e024
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      app/Service/ImportService.php

+ 4 - 4
app/Service/ImportService.php

@@ -520,8 +520,6 @@ class ImportService extends Service
                 if(in_array($t,$array_clean)) return [false, '产品编码:'. $value[1] .'在文件中重复出现'];
                 $array_clean[] = $t;
 
-                $value[2] = $this->convertHyphens($value[2]);
-
                 if(! empty($value[8])){
                     if(! isset($map_attr[$value[8]])) return [false, '产品属性不存在' . $value[8]];
                     $value[8] = $map_attr[$value[8]];
@@ -567,8 +565,7 @@ class ImportService extends Service
                 $category_parent[$id] = $this->getAncestors($id, $idMap);
             }
         }
-        $category_tree = $this->makeTree(0,$category_list);
-        $category_map = $this->generateTitleToIdMap($category_tree);
+        $category_map = array_column($category_list,'id','title');
 
         //基础类型
         $basic = (new BasicTypeService())->getMyBasicList($user, 20);
@@ -659,6 +656,9 @@ class ImportService extends Service
                     }
                 }
 
+                //安装费
+                if($tmp['build_fee'] == "") unset($tmp['build_fee']);
+
                 //产品主表
                 $update[$product_id] = $tmp;
             }else{