logistic_number = $logistic_number; } /** * Execute the job. * * @return void */ public function handle() { //标记上有同步的操作 OrderPackage::query()->where('logistic_number', $this->logistic_number)->update(['sync_routes_flag'=> true]); $this->logisticYTOService = app('LogisticYTOService'); $this->orderPackageReceivedSyncService = app('OrderPackageReceivedSyncService'); $nativeResponse = $this->logisticYTOService->query($this->logistic_number); $formattedData = $this->logisticYTOService->format($nativeResponse,$this->logistic_number); try { if ($formattedData && isset($formattedData['logistic_number'])) $this->orderPackageReceivedSyncService->update([$formattedData]); } catch (\Exception $e) { } } }