|
...
|
...
|
@@ -259,6 +259,7 @@ class ProjectUpdate extends Command |
|
|
|
}
|
|
|
|
//分类
|
|
|
|
$category_id = '';
|
|
|
|
$category_arr = [];
|
|
|
|
if ($item['category'] ?? []) {
|
|
|
|
$category_arr = $category_model->list(['original_id' => ['in', array_column($item['category'], 'id')]]);
|
|
|
|
$category_id = $logic->getLastCategory(array_column($category_arr, 'id'));
|
|
...
|
...
|
@@ -291,7 +292,6 @@ class ProjectUpdate extends Command |
|
|
|
'route' => $route
|
|
|
|
]);
|
|
|
|
$this->set_map($route, RouteMap::SOURCE_PRODUCT, $id, $project_id);
|
|
|
|
CategoryRelated::saveRelated($id, array_column($category_arr, 'id'));
|
|
|
|
CollectTask::_insert($item['url'], $project_id, RouteMap::SOURCE_PRODUCT, $id, $link_type, $language_list, $page_list);
|
|
|
|
} else {
|
|
|
|
$id = $product['id'];
|
|
...
|
...
|
@@ -309,6 +309,10 @@ class ProjectUpdate extends Command |
|
|
|
]),
|
|
|
|
'sort' => $item['sort'] ?? 0,
|
|
|
|
], ['id' => $id]);
|
|
|
|
}
|
|
|
|
|
|
|
|
//关联分类
|
|
|
|
if($category_arr){
|
|
|
|
CategoryRelated::saveRelated($id, array_column($category_arr, 'id'));
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|