|
@@ -15,7 +15,6 @@ use Illuminate\Queue\SerializesModels;
|
|
|
class LogisticYTOSync implements ShouldQueue
|
|
class LogisticYTOSync implements ShouldQueue
|
|
|
{
|
|
{
|
|
|
public $tries = 2;
|
|
public $tries = 2;
|
|
|
-
|
|
|
|
|
public $timeout = 10;
|
|
public $timeout = 10;
|
|
|
|
|
|
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
@@ -27,7 +26,6 @@ class LogisticYTOSync implements ShouldQueue
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
protected $logistic_number;
|
|
protected $logistic_number;
|
|
|
-
|
|
|
|
|
protected $logisticYTOService;
|
|
protected $logisticYTOService;
|
|
|
protected $orderPackageReceivedSyncService;
|
|
protected $orderPackageReceivedSyncService;
|
|
|
|
|
|
|
@@ -53,7 +51,7 @@ class LogisticYTOSync implements ShouldQueue
|
|
|
$nativeResponse = $this->logisticYTOService->query($this->logistic_number);
|
|
$nativeResponse = $this->logisticYTOService->query($this->logistic_number);
|
|
|
$formattedData = $this->logisticYTOService->format($nativeResponse);
|
|
$formattedData = $this->logisticYTOService->format($nativeResponse);
|
|
|
$this->orderPackageReceivedSyncService = app('OrderPackageReceivedSyncService');
|
|
$this->orderPackageReceivedSyncService = app('OrderPackageReceivedSyncService');
|
|
|
- if ($formattedData['logistic_number']){
|
|
|
|
|
|
|
+ if (count($formattedData)>0 && $formattedData['logistic_number']){
|
|
|
$this->orderPackageReceivedSyncService->update([$formattedData]);
|
|
$this->orderPackageReceivedSyncService->update([$formattedData]);
|
|
|
}else{
|
|
}else{
|
|
|
LogService::log(LogisticYTOService::class, "YTO快递无快递异常", $formattedData);
|
|
LogService::log(LogisticYTOService::class, "YTO快递无快递异常", $formattedData);
|