|
...
|
...
|
@@ -102,14 +102,13 @@ class FetchTicketProjects extends Command |
|
|
|
$project->save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo "V5: {$item['postid']} - {$item['title']} - {$item['company']} - {$item['main_url']}\n";
|
|
|
|
}
|
|
|
|
$postids = collect($items)->pluck('postid')->toArray();
|
|
|
|
// 软删除 gl_ticket_projects 中不存在的项目
|
|
|
|
TicketProject::where('version', 5)
|
|
|
|
->whereNotIn('post_id', $postids)
|
|
|
|
->update(['is_del' => 1]);
|
|
|
|
echo "V5: fetch completed, total " . count($items) . " items\n";
|
|
|
|
echo date("Y-m-d H:i:s") . " V5: fetch completed, total " . count($items) . " items\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|