From aed6a946a3cdf4a34baac187b283198b89df38c9 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Thu, 21 Mar 2024 15:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=8E=A5=E5=8F=97=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/server/StoreOrder.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/controller/api/server/StoreOrder.php b/app/controller/api/server/StoreOrder.php index e4e5ef41..f63770f4 100644 --- a/app/controller/api/server/StoreOrder.php +++ b/app/controller/api/server/StoreOrder.php @@ -87,8 +87,20 @@ class StoreOrder extends BaseController $where['search'] = $this->request->param('store_name'); $where['mer_id'] = $merId; $where['is_del'] = 0; - if($where['status'] == 2) $where['order_type'] = 0; - return app('json')->success($repository->merchantGetList($where, $page, $limit)); + $where['pay_time'] = $this->request->param('pay_time'); + $where['product_type'] = $this->request->param('product_type',0); + if ($where['product_type']==0){ + unset($where['product_type']); + } + $where['order_search'] = $this->request->param('search_info'); + $repository = \app()->make(StoreOrderRepository::class); + $result = $repository->merchantGetList($where, $page, $limit); + + foreach ($result['list'] as &$item) { + $item['pay_price'] = $item['consumption_money'] > 0 ? bcadd($item['pay_price'], $item['consumption_money'], 2) : $item['pay_price']; + } + + return app('json')->success($result); } public function order($merId, $id, StoreOrderRepository $repository)