瀏覽代碼

队列错误问题

Zhouzhendong 5 年之前
父節點
當前提交
459212172b
共有 3 個文件被更改,包括 1 次插入4 次删除
  1. 0 1
      app/Jobs/OrderCreateInstantBill.php
  2. 0 1
      app/Jobs/StoreCreateInstantBill.php
  3. 1 2
      app/Services/StoreService.php

+ 0 - 1
app/Jobs/OrderCreateInstantBill.php

@@ -7,7 +7,6 @@ use App\Services\OrderService;
 use Illuminate\Bus\Queueable;
 use Illuminate\Contracts\Queue\ShouldQueue;
 use Illuminate\Database\Eloquent\Collection;
-use Illuminate\Database\Eloquent\Model;
 use Illuminate\Foundation\Bus\Dispatchable;
 use Illuminate\Queue\InteractsWithQueue;
 

+ 0 - 1
app/Jobs/StoreCreateInstantBill.php

@@ -7,7 +7,6 @@ use App\Services\StoreService;
 use Illuminate\Bus\Queueable;
 use Illuminate\Contracts\Queue\ShouldQueue;
 use Illuminate\Database\Eloquent\Collection;
-use Illuminate\Database\Eloquent\Model;
 use Illuminate\Foundation\Bus\Dispatchable;
 use Illuminate\Queue\InteractsWithQueue;
 

+ 1 - 2
app/Services/StoreService.php

@@ -244,8 +244,7 @@ class StoreService
     }
 
     public function pushJob($asnHerders){
-        $stores = Store::query()->with(["storeItems"])->where('status','已入库')->whereIn('asn_code', data_get($asnHerders,'*.asnno'))->get();
-        dispatch(new StoreCreateInstantBill($stores));
+        dispatch(new StoreCreateInstantBill(Store::query()->with(["storeItems"])->where('status','已入库')->whereIn('asn_code', data_get($asnHerders,'*.asnno'))->get()));
     }
 
     public function insert($params)