Explorar o código

自动揽收并发

loustwo %!s(int64=4) %!d(string=hai) anos
pai
achega
1c2cca67ab
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      app/Jobs/PackageCollectingAllocation.php

+ 3 - 1
app/Jobs/PackageCollectingAllocation.php

@@ -37,6 +37,8 @@ class PackageCollectingAllocation implements ShouldQueue
     {
         /** @var OrderPackageService $orderPackageService */
         $orderPackageService = app('OrderPackageService');
-        $orderPackageService->collectUpload([$this->orderPackage->logistic_number]);
+        if (OrderPackage::query()->select(1)->where('logistic_number',$this->orderPackage->logistic_number)->where('collecting_status',0)->first()){
+            $orderPackageService->collectUpload([$this->orderPackage->logistic_number]);
+        }
     }
 }