|
|
@@ -35,7 +35,7 @@ class LogisticAliJiSuSync implements ShouldQueue
|
|
|
*/
|
|
|
public function __construct($logistic_number)
|
|
|
{
|
|
|
- $this->logistic_number=$logistic_number;
|
|
|
+ $this->logistic_number = $logistic_number;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -47,13 +47,11 @@ class LogisticAliJiSuSync implements ShouldQueue
|
|
|
{
|
|
|
LogService::log(LogisticAliJiSuSync::class, "{$this->logistic_number}-JOB-AliJiSu", '');
|
|
|
$this->logisticAliJiSuApiService = app('LogisticAliJiSuApiService');
|
|
|
+ $response = $this->logisticAliJiSuApiService->query($this->logistic_number);
|
|
|
+ $format = $this->logisticAliJiSuApiService->format($response,$this->logistic_number);
|
|
|
try {
|
|
|
- $response = $this->logisticAliJiSuApiService->query($this->logistic_number);
|
|
|
- if ($response && $response->status==0){
|
|
|
- $format = $this->logisticAliJiSuApiService->format($response);
|
|
|
- $this->orderPackageReceivedSyncService = app('OrderPackageReceivedSyncService');
|
|
|
- if (count($format)>0 && $format['logistic_number']??false) $this->orderPackageReceivedSyncService->update([$format]);
|
|
|
- }
|
|
|
+ $this->orderPackageReceivedSyncService = app('OrderPackageReceivedSyncService');
|
|
|
+ if (count($format) > 0 && $format['logistic_number'] ?? false) $this->orderPackageReceivedSyncService->update([$format]);
|
|
|
} catch (\Exception $e) {
|
|
|
app('LogService')->log(__METHOD__, __FUNCTION__, "阿里极速数据同步快递数据 ERROR " . ' || ' . json_encode($this->logistic_number) . ' || ' . json_encode($e->getMessage()) . ' || ' . json_encode($e->getTraceAsString()));
|
|
|
}
|