作者 刘锟

update

... ... @@ -237,6 +237,7 @@ class ProjectUpdate extends Command
$items = $data_page['data']['data'] ?? [];
$model = new Product();
$category_model = new Category();
$logic = new CategoryLogic();
foreach ($items as $item) {
... ... @@ -273,7 +274,7 @@ class ProjectUpdate extends Command
}
if ($new_category) {
$category_arr = $model->list(['original_id' => ['in', $new_category]]);
$category_arr = $category_model->list(['original_id' => ['in', $new_category]]);
$category_id = $logic->getLastCategory(array_column($category_arr, 'id'));
}
... ... @@ -340,7 +341,7 @@ class ProjectUpdate extends Command
}
if ($new_category) {
$category_arr = $model->list(['original_id' => ['in', $new_category]]);
$category_arr = $category_model->list(['original_id' => ['in', $new_category]]);
$category_id = $logic->getLastCategory(array_column($category_arr, 'id'));
}
}
... ...