Эх сурвалжийг харах

Merge branch 'zzd' of ssh://was.baoshi56.com:10022/var/git/bswas

LD 5 жил өмнө
parent
commit
531b2abd68

+ 3 - 15
app/Http/Controllers/TestController.php

@@ -175,21 +175,9 @@ class TestController extends Controller
 
     public function test()
     {
-        try{
-            Unit::query()->select("xx")->find(1);
-            //Unit::query()->create(["name"=>"tt1"]);
-        } catch(QueryException $qe){
-                if ($qe->getCode()!='23000'){
-                    dd(1);
-                }
-            }catch (\Exception $a){
-            dump(2);
-        }
-        dd(3);
-        Cache::flush();
-        $service = new OrderService();
-        $order = Order::query()->find(2748314);
-        dd($service->createInstantBill($order));
+        $service = new StoreService();
+        $store = Store::query()->find(151036);
+        $service->createInstantBill($store);
     }
     public function a(int $c)
     {

+ 1 - 1
app/Services/StoreService.php

@@ -320,7 +320,7 @@ class StoreService
         /** @var \stdClass $store */
         if (!$store || $store->status != "已入库") return false;
         if (Cache::has("owner_fee_details:stores_".$store->id))return true;
-        $store->loadMissing(["storeItems","warehouse"]);
+        $store->loadMissing(["storeItems.commodity","warehouse"]);
 
         /** @var OwnerPriceOperationService $service */
         $service = app("OwnerPriceOperationService");