|
...
|
...
|
@@ -396,13 +396,6 @@ 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 ($api_type == 'news' && ($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->edit(['category_id' => $category_id], ['id' => $news['id']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|