物流订单商品名称

This commit is contained in:
chenbo 2024-01-02 16:08:40 +08:00
parent 9aba394a36
commit 96d20241b7

View File

@ -314,10 +314,11 @@ class Logistics extends BaseController
$query->whereBetween('ps_time', [$startTime, $endTime]);
})->count();
}
$list = $list->toArray();
foreach ($list as &$item) {
$item['product_name'] = StoreOrderProduct::alias('o')->join('store_product p', 'o.product_id=p.product_id')->where('o.order_id', $item['order_id'])->value('p.store_name');
}
unset($item);
return app('json')->success(compact('count', 'list'));
}
}