ask("请输入keyword1的内容:"); $keyword2 = $this->ask("请输入keyword2的内容:"); $keyword3 = $this->ask("请输入keyword3的内容:"); $data = array( 'title' => '72小时活动报名运营通知', 'template_id' => 'd149209e80157fd6e340a8049f7c02b7', 'page' => "fpdx/pages/starter/starter", 'parameters' => [ 'keyword1' => [ 'value' => $keyword1, ], 'keyword2' => [ 'value' => $keyword2, ], 'keyword3' => [ 'value' => $keyword3, ] ] ); $users = AuthKey::where('auth_type', config("qqprogram.public_id"))->get(['uid']); $bar = $this->output->createProgressBar($users->count()); $bar->start(); $k = 0; $uids = array(); foreach ($users as $user) { array_push($uids, $user->uid); if (1000 == $k) { PushQQminiprogramNoticeJob::dispatch($uids, $data); $uids = array(); $k = 0; } $k++; $bar->advance(); } !empty($uids) && PushQQminiprogramNoticeJob::dispatch($uids, $data); $bar->finish(); } }