Merge pull request 'fix(api): 修复演示逻辑中产品查询' () from dev into main

Reviewed-on: 
This commit is contained in:
mkm 2025-02-03 15:42:57 +08:00
commit 40732d55cc

@ -121,7 +121,7 @@ class DemoLogic extends BaseLogic
$cartInfo = BeforehandOrderCartInfo::where('bhoid', $params['id'])->select()->toArray(); $cartInfo = BeforehandOrderCartInfo::where('bhoid', $params['id'])->select()->toArray();
$productIds = array_column($cartInfo, 'product_id'); $productIds = array_column($cartInfo, 'product_id');
$products = StoreProduct::whereIn('id', $productIds)->select()->toArray(); $products = StoreProduct::whereIn('id', $productIds)->withTrashed()->select()->toArray();
$products = reset_index($products, 'id'); $products = reset_index($products, 'id');
$update = []; $update = [];
foreach ($cartInfo as $v) { foreach ($cartInfo as $v) {