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