Update AISerpGenArticleJob.php

This commit is contained in:
charlesteh
2023-10-03 13:05:03 +08:00
committed by GitHub
parent 78736a9d32
commit 2ba58d5e20

View File

@@ -30,10 +30,10 @@ public function __construct()
*/
public function handle(): void
{
$category = Category::orderBy('serp_at', 'asc')
->orWhereNull('serp_at')
$category = Category::orderByRaw('ISNULL(serp_at) DESC')
->orderBy('serp_at', 'asc')
->first();
$news_serp_result = GetNewsSerpTask::handle($category, 'US');
if (is_null($news_serp_result)) {