update
This commit is contained in:
@ -44,9 +44,7 @@ class AutoPush extends BaseSpider
|
||||
{
|
||||
$query = AppWebsiteConfig::query()
|
||||
->select(['app_domain', 'id'])
|
||||
->where('is_delete', 0)
|
||||
->orderBy('id', 'DESC')
|
||||
->limit(10);
|
||||
->where('is_delete', 0);
|
||||
if ($id = $input->getOption('platform')) {
|
||||
$query = $query->where('id', $id);
|
||||
}
|
||||
@ -67,11 +65,11 @@ class AutoPush extends BaseSpider
|
||||
$this->commandLogger->info($result);
|
||||
};
|
||||
foreach ($query as $item) {
|
||||
$article = AppNews::query()->where('platform', $item['id'])->select(['id'])->get()->toArray();
|
||||
$article = AppNews::query()->where('platform', $item['id'])->select(['id'])->limit(10)->orderBy('id', 'DESC')->get()->toArray();
|
||||
foreach ($article as $articleItem) {
|
||||
$pushArray[] = 'https://' . $item['app_domain'] . '/news/' . $articleItem['id'];
|
||||
}
|
||||
var_dump($pushArray);
|
||||
|
||||
if ($pushArray) {
|
||||
$push();
|
||||
}
|
||||
|
Reference in New Issue
Block a user