From 1285fe84d9a973391f3a9b9c51f079b3119150b9 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 13 Jan 2024 10:37:18 +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 --- .../store/order/StoreGroupOrderRepository.php | 10 ++++++++-- app/controller/api/store/order/StoreOrder.php | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/common/repositories/store/order/StoreGroupOrderRepository.php b/app/common/repositories/store/order/StoreGroupOrderRepository.php index d1e4ebdb..a274e747 100644 --- a/app/common/repositories/store/order/StoreGroupOrderRepository.php +++ b/app/common/repositories/store/order/StoreGroupOrderRepository.php @@ -65,8 +65,14 @@ class StoreGroupOrderRepository extends BaseRepository public function getList(array $where, $page, $limit) { $query = StoreGroupOrder::getDB()->alias('StoreGroupOrder'); - if (isset($where['product_type'])) { - $storeOrderWhere = StoreOrder::where('activity_type', $where['product_type']); + if($where['source'] == 103){ + $wheres['activity_type']=[0,98]; + $wheres['source']=[2,103]; + }else{ + $wheres['activity_type']=0; + } + if (isset($where['product_type']) || $where['source']==103) { + $storeOrderWhere = StoreOrder::where($wheres); $query->hasWhere('orderList', $storeOrderWhere); } $query->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) { diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index 8ef48321..2e3d26a7 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -178,7 +178,8 @@ class StoreOrder extends BaseController { [$page, $limit] = $this->getPage(); $productType = $this->request->param('product_type', 0); - $list = $groupOrderRepository->getList(['uid' => $this->request->uid(), 'paid' => 0, 'product_type' => $productType], $page, $limit); + $source = $this->request->param('source', 2); + $list = $groupOrderRepository->getList(['uid' => $this->request->uid(), 'paid' => 0, 'product_type' => $productType,$source], $page, $limit); return app('json')->success($list); }