writeln("开始更新快递信息====>" . getDateFull()); $nextPage = 1; while (is_numeric($nextPage)) { $resp = (new SaasLivePlan)->where(["status" => 1])->page($nextPage, 10)->select(); if ($resp->isEmpty()) { $output->writeln("没有任务啦==".getDateFull()); $nextPage = null; return true; } foreach ($resp as $item) { $output->writeln("计划ID=={$item['plan_id']}==".getDateFull()); $planData = (new PlanLive)->config([ "appid" => sConf("wechat.mini_appid"), "secret" => sConf("wechat.mini_secret"), ])->token()->getPlanData([intval($item['plan_id'])]); print_r($planData); } $nextPage = $nextPage+1; $output->writeln("进入下一页=={$nextPage}==".getDateFull()); } } catch (\Throwable $throwable) { echo getDateFull()."===查询计划数据报错\n"; echo $throwable->getFile()."\n"; echo $throwable->getLine()."\n"; } return self::SUCCESS; } }