haozi 4 år sedan
förälder
incheckning
ef608f3faf
1 ändrade filer med 9 tillägg och 13 borttagningar
  1. 9 13
      app/Http/Controllers/TestController.php

+ 9 - 13
app/Http/Controllers/TestController.php

@@ -545,27 +545,23 @@ sql;
         $service->deleteCacheKey($update_set, $update_keys);
         // 清空保存 ans  号的栈
         // 清除 更新时间 开始 结束
-    public function teset12313(){
-        dd(route("discharge.storeApi"));
     }
-
     public function updateStoreItem()
     {
-        $storeIds=Store::query()
-            ->where('updated_at','>=','2021-09-22 10:00:0')
-            ->whereColumn('updated_at','<>','created_at')
+        $storeIds = Store::query()
+            ->where('updated_at', '>=', '2021-09-22 10:00:0')
+            ->whereColumn('updated_at', '<>', 'created_at')
             ->pluck('id');
 
-        $storeItemMaxIds=StoreItem::query()
+        $storeItemMaxIds = StoreItem::query()
             ->selectRaw('max(id) as max_id')
-            ->whereIn('store_id',$storeIds)
-            ->groupBy(['store_id','asn_line_code'])
+            ->whereIn('store_id', $storeIds)
+            ->groupBy(['store_id', 'asn_line_code'])
             ->get();
 //        dd($storeItemMaxIds->count());
-        $storeItems=StoreItem::query()
-            ->whereIn('store_id',$storeIds)
-            ->whereNotIn('id',$storeItemMaxIds)
+        $storeItems = StoreItem::query()
+            ->whereIn('store_id', $storeIds)
+            ->whereNotIn('id', $storeItemMaxIds)
             ->delete();
-
     }
 }