|
...
|
...
|
@@ -292,6 +292,13 @@ class ProjectUpdate extends Command |
|
|
|
echo 'date:' . date('Y-m-d H:i:s') . ', task_id: ' . $task->id . ', error: ' . $e->getMessage() . PHP_EOL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$category_id = '';
|
|
|
|
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'));
|
|
|
|
}
|
|
|
|
$model->where('id',$product['id'])->update(['category_id'=>$category_id]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|