logistic_number = $logistic_number; } /** * Execute the job. * * @return void */ public function handle() { ini_set('max_execution_time', 60); LogService::log(LogisticYDSync::class, "{$this->logistic_number}-JOB-YD", ''); $this->logisticYDService = app('LogisticYDService'); //先订阅订单 $this->logisticYDService->registerApi([$this->logistic_number]); //查询订单路由信息 $nativeResponse = $this->logisticYDService->query($this->logistic_number); //格式化信息 $formattedData = $this->logisticYDService->format($nativeResponse); $this->orderPackageReceivedSyncService = app('OrderPackageReceivedSyncService'); //更新数据 $this->orderPackageReceivedSyncService->update([$formattedData]); } }