From 44a06e0be0fc8ec7349e368a413e59733853e47f Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 13 Jan 2024 11:04:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/order/StoreOrderDao.php | 11 +++++++---- app/controller/api/store/order/StoreOrder.php | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/common/dao/store/order/StoreOrderDao.php b/app/common/dao/store/order/StoreOrderDao.php index 924a9d7d..58403598 100644 --- a/app/common/dao/store/order/StoreOrderDao.php +++ b/app/common/dao/store/order/StoreOrderDao.php @@ -92,9 +92,6 @@ class StoreOrderDao extends BaseDao ->when(isset($where['activity_type']) && $where['activity_type'] != '', function ($query) use ($where) { $query->where('activity_type', $where['activity_type']); }) - ->when(isset($where['product_type']) && $where['product_type'] != '', function ($query) use ($where) { - $query->where('activity_type', $where['product_type']); - }) ->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) { // 12表示信用购 先货后款 switch ($where['status']) { @@ -223,7 +220,13 @@ class StoreOrderDao extends BaseDao $query->where('reconciliation_id', 0); }); })->order('StoreOrder.create_time DESC'); - + if (isset($where['source']) && $where['source'] == 103) { + $wheres['activity_type'] = [0, 98]; + $wheres['source'] = [2, 103]; + $query->where($wheres); + } else { + $query->where('activity_type', $where['product_type']); + } return $query; } diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index 4a2314ba..52052cfd 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -133,6 +133,7 @@ class StoreOrder extends BaseController [$page, $limit] = $this->getPage(); $where['status'] = $this->request->param('status'); $where['product_type'] = $this->request->param('product_type', 0); + $where['source'] = $this->request->param('source', 2); $where['search'] = $this->request->param('store_name'); $where['uid'] = $this->request->uid(); $where['is_user'] = 1;