|
...
|
...
|
@@ -76,7 +76,8 @@ class VideoTask extends Command |
|
|
|
if ($sub_task_num <= 0){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
$task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first();
|
|
|
|
// $task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first();
|
|
|
|
$task_project = KeywordVideoTask::where(['project_id' => 895])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first();
|
|
|
|
if (empty($task_project)){
|
|
|
|
break;
|
|
|
|
}
|
|
...
|
...
|
@@ -260,6 +261,7 @@ class VideoTask extends Command |
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$product_all_id = Product::where('thumb','!=',null)->where("status",Product::STATUS_ON)->inRandomOrder()->take(20)->pluck('id')->toArray();
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($product_all_id, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
$products = Product::whereIn("id", $product_all_id)->orderByRaw(DB::raw("FIELD(id, " . implode(',', $product_all_id) . ")"))->get();
|
|
|
|
}
|
|
|
|
$data = [];
|
...
|
...
|
|