正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
| @@ -76,7 +76,8 @@ class VideoTask extends Command | @@ -76,7 +76,8 @@ class VideoTask extends Command | ||
| 76 | if ($sub_task_num <= 0){ | 76 | if ($sub_task_num <= 0){ |
| 77 | break; | 77 | break; |
| 78 | } | 78 | } |
| 79 | - $task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first(); | 79 | +// $task_project = KeywordVideoTask::where(['status' => KeywordVideoTask::STATUS_OPEN])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first(); |
| 80 | + $task_project = KeywordVideoTask::where(['project_id' => 895])->orderBy('sort', 'desc')->orderBy('id', 'desc')->first(); | ||
| 80 | if (empty($task_project)){ | 81 | if (empty($task_project)){ |
| 81 | break; | 82 | break; |
| 82 | } | 83 | } |
| @@ -260,6 +261,7 @@ class VideoTask extends Command | @@ -260,6 +261,7 @@ class VideoTask extends Command | ||
| 260 | } | 261 | } |
| 261 | }else{ | 262 | }else{ |
| 262 | $product_all_id = Product::where('thumb','!=',null)->where("status",Product::STATUS_ON)->inRandomOrder()->take(20)->pluck('id')->toArray(); | 263 | $product_all_id = Product::where('thumb','!=',null)->where("status",Product::STATUS_ON)->inRandomOrder()->take(20)->pluck('id')->toArray(); |
| 264 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($product_all_id, true) . PHP_EOL, FILE_APPEND); | ||
| 263 | $products = Product::whereIn("id", $product_all_id)->orderByRaw(DB::raw("FIELD(id, " . implode(',', $product_all_id) . ")"))->get(); | 265 | $products = Product::whereIn("id", $product_all_id)->orderByRaw(DB::raw("FIELD(id, " . implode(',', $product_all_id) . ")"))->get(); |
| 264 | } | 266 | } |
| 265 | $data = []; | 267 | $data = []; |
-
请 注册 或 登录 后发表评论