|
...
|
...
|
@@ -616,10 +616,13 @@ class ProductLogic extends BaseLogic |
|
|
|
if (!$product) {
|
|
|
|
|
|
|
|
$category_id = '';
|
|
|
|
$category_arr = [];
|
|
|
|
if ($data[2]??'') {
|
|
|
|
//处理分类
|
|
|
|
$categoryLogic = new CategoryLogic();
|
|
|
|
$category_id = $categoryLogic->importProductCategory($project_id, $data[2]);
|
|
|
|
$category_info = $categoryLogic->importProductCategory($project_id, $data[2]);
|
|
|
|
$category_id = $category_info['category_id'];
|
|
|
|
$category_arr = $category_info['category_arr'];
|
|
|
|
}
|
|
|
|
|
|
|
|
$keyword_id = '';
|
|
...
|
...
|
@@ -805,6 +808,11 @@ class ProductLogic extends BaseLogic |
|
|
|
|
|
|
|
$this->edit(['route' => $route], ['id' => $id]);
|
|
|
|
|
|
|
|
//关联分类
|
|
|
|
if($category_arr){
|
|
|
|
CategoryRelated::saveRelated($id, $category_arr);
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|