update
This commit is contained in:
@ -71,7 +71,7 @@ class BaiduRecordCommand extends BaseSpider
|
|||||||
}
|
}
|
||||||
|
|
||||||
$query = $query->get();
|
$query = $query->get();
|
||||||
|
$this->log->info(__FUNCTION__);
|
||||||
foreach ($query as $index => $item) {
|
foreach ($query as $index => $item) {
|
||||||
sleep(3);
|
sleep(3);
|
||||||
try {
|
try {
|
||||||
|
@ -50,7 +50,7 @@ class NewsController extends AbstractController
|
|||||||
$ids[] = $item->id;
|
$ids[] = $item->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = AppNews::query()->whereIn('id', $ids)->orderBy('id', 'desc')->get()->toArray();
|
$value = AppNews::formatQuery(['created_at'])->whereIn('id', $ids)->orderBy('id', 'desc')->get()->toArray();
|
||||||
// $value = AppNews::find($ids, ['title', 'is_record'])->toArray();
|
// $value = AppNews::find($ids, ['title', 'is_record'])->toArray();
|
||||||
return ['code' => 0, 'msg' => 'ok', 'count' => $pagination->total(), 'data' => $value];
|
return ['code' => 0, 'msg' => 'ok', 'count' => $pagination->total(), 'data' => $value];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user