Forráskód Böngészése

修改OwnerService

ajun 5 éve
szülő
commit
7ffbd1d9f5
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      app/Services/OwnerService.php

+ 2 - 2
app/Services/OwnerService.php

@@ -223,7 +223,7 @@ Class OwnerService
         $collect = collect();
         if(count($codes) == 0)return $collect;
         foreach ($codes as $code) {
-            $collect->push($this->getOwnerByCode($code));
+            $collect = $collect->push($this->getOwnerByCode($code));
         }
         return $collect;
     }
@@ -232,7 +232,7 @@ Class OwnerService
         return Cache::remember("getOwnerByCode_{$code}", config('cache.expirations.owners'), function ()use($code){
             $owner = Owner::query()->where('code',$code)->first();
             if($owner) return $owner;
-            $basCustomer = app('OracleBasCustomerService')->first(['Customer_Type'=>'OW','CustomerID'=>$code]);
+             $basCustomer = app('OracleBasCustomerService')->first(['Customer_Type'=>'OW','CustomerID'=>$code]);
             if(!$basCustomer)return null;
             return Owner::query()->create(['name'=>$basCustomer['descr_c'],'code'=>$basCustomer['customerid']]);
         });