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)