|
|
@@ -646,15 +646,15 @@ where (commodities.owner_id,commodity_barcodes.code) in (select commodities.owne
|
|
|
Commodity::destroy($deleteCommodities);
|
|
|
}
|
|
|
|
|
|
- public function test2()
|
|
|
- {
|
|
|
- $owner = Owner::where('name', 'B站')->first();
|
|
|
- $commodities = Commodity::query()->where('owner_id', $owner->id)->get();
|
|
|
- $comID = array_column($commodities->toArray(), 'id');
|
|
|
- CommodityBarcode::query()->whereIn('commodity_id', $comID)->delete();
|
|
|
- Commodity::destroy($comID);
|
|
|
- return $comID;
|
|
|
- }
|
|
|
+// public function test2()
|
|
|
+// {
|
|
|
+// $owner = Owner::where('name', 'B站')->first();
|
|
|
+// $commodities = Commodity::query()->where('owner_id', $owner->id)->get();
|
|
|
+// $comID = array_column($commodities->toArray(), 'id');
|
|
|
+// CommodityBarcode::query()->whereIn('commodity_id', $comID)->delete();
|
|
|
+// Commodity::destroy($comID);
|
|
|
+// return $comID;
|
|
|
+// }
|
|
|
|
|
|
/*1*/
|
|
|
function socket(Request $request)
|