Update AISerpGenArticleJob.php

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

View File

@@ -30,7 +30,7 @@ public function __construct()
*/ */
public function handle(): void 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') ->orderBy('serp_at', 'asc')
->first(); ->first();