Update AISerpGenArticleJob.php

This commit is contained in:
2023-10-03 16:14:36 +08:00
parent 2ba58d5e20
commit 1e7b75706e

View File

@@ -30,10 +30,10 @@ public function __construct()
*/
public function handle(): void
{
$category = Category::orderByRaw('ISNULL(serp_at) DESC')
$category = Category::orderByRaw('CASE WHEN serp_at IS NULL THEN 1 ELSE 0 END DESC')
->orderBy('serp_at', 'asc')
->first();
$news_serp_result = GetNewsSerpTask::handle($category, 'US');
if (is_null($news_serp_result)) {