Jelajahi Sumber

临时提交

ajun 5 tahun lalu
induk
melakukan
839f242eb5

+ 1 - 1
app/Services/CommodityBarcodeService.php

@@ -282,7 +282,7 @@ Class CommodityBarcodeService
     {
         $itemIds = [];
         foreach ($delete_Items as $item) {
-            array_push($storeItemIds, $item->id);
+            array_push($itemIds, $item->id);
         }
         try {
             CommodityBarcode::query()->whereIn('id', $itemIds)->delete();

+ 0 - 11
app/Services/CommodityService.php

@@ -499,17 +499,6 @@ Class CommodityService
         return $commodities;
     }
 
-    private function pushToCache($commodities)
-    {
-        if (count($commodities) < 1) return null;
-        foreach ($commodities as $commodity) {
-            $commodity_key = "owner_code_{$commodity['owner']['code']}_sku_{$commodity['sku']}";
-            Cache::remember($commodity_key, config('cache.expirations.forever'), function () use ($commodity) {
-                return $commodity;
-            });
-        }
-    }
-
 
     public function syncCommodityCreated()
     {

+ 2 - 2
phpunit.xml

@@ -34,8 +34,8 @@
         <server name="APP_ENV" value="testing"/>
         <server name="BCRYPT_ROUNDS" value="4"/>
         <server name="CACHE_DRIVER" value="redis"/>
-        <!--<server name="DB_CONNECTION" value="sqlite"/>
-        <server name="DB_DATABASE" value=":memory:"/>-->
+        <server name="DB_CONNECTION" value="sqlite"/>
+        <server name="DB_DATABASE" value=":memory:"/>
         <server name="MAIL_DRIVER" value="array"/>
         <server name="QUEUE_CONNECTION" value="sync"/>
         <server name="SESSION_DRIVER" value="array"/>