Prechádzať zdrojové kódy

Merge branch 'yang'

zhouzhendong 4 rokov pred
rodič
commit
df050a2aaa
1 zmenil súbory, kde vykonal 20 pridanie a 0 odobranie
  1. 20 0
      app/Http/Controllers/TestController.php

+ 20 - 0
app/Http/Controllers/TestController.php

@@ -17,6 +17,7 @@ use App\Jobs\OrderCreateWaybill;
 use App\Jobs\SettlementBillReportTask;
 use App\Jobs\StoreCreateInstantBill;
 use App\Jobs\WeightUpdateInstantBill;
+use App\Log;
 use App\MaterialBox;
 use App\MaterialBoxModel;
 use App\Order;
@@ -93,4 +94,23 @@ class TestController extends Controller
         else if($a==0)dd(2);
         dd(3);
     }
+
+    public function update_order_packages_is_manual_update()
+    {
+        $descriptions = Log::query()
+            ->select('description')
+            ->whereBetween('created_at', ['2021-08-31 10:30:00', '2021-08-31 10:35:00'])
+            ->where('class', 'like', 'https://was.baoshi56.com/package/logistic/batchUpdate%')->pluck('description');
+        foreach ($descriptions as $description) {
+            $description = substr($description, 9);
+            $description = \Illuminate\Support\Str::before($description,"}");
+            $obj= json_decode($description.'}',true);
+            OrderPackage::query()
+                ->whereIn('logistic_number', $obj['logistic_numbers'])
+                ->update([
+                    'status' => '无',
+                    'is_manual_update' => false,
+                ]);
+        }
+    }
 }