diff --git a/app/common/dao/store/order/StoreGroupOrderDao.php b/app/common/dao/store/order/StoreGroupOrderDao.php index 42caf20d..4c15e208 100644 --- a/app/common/dao/store/order/StoreGroupOrderDao.php +++ b/app/common/dao/store/order/StoreGroupOrderDao.php @@ -48,7 +48,7 @@ class StoreGroupOrderDao extends BaseDao $storeOrderWhere = StoreOrder::where('activity_type', $productType); return StoreGroupOrder::hasWhere('orderList', $storeOrderWhere)->when($uid, function ($query, $uid) { $query->where('StoreGroupOrder.uid', $uid); - })->where('StoreGroupOrder.is_del', 0)->where('StoreGroupOrder.paid', 0)->count(); + })->where('StoreGroupOrder.is_del', 0)->whereRaw("StoreGroupOrder.paid=0 or (StoreGroupOrder.paid=1 and StoreGroupOrder.pay_type=8)")->count(); } /** @@ -60,9 +60,6 @@ class StoreGroupOrderDao extends BaseDao public function search(array $where) { $storeOrderWhere = StoreOrder::where('activity_type', $where['product_type']); - if (isset($where['paid']) && $where['paid'] == 0) { - $storeOrderWhere->whereRaw("StoreGroupOrder.paid=0 or (StoreGroupOrder.paid=1 and StoreGroupOrder.pay_type=8)"); - } return StoreGroupOrder::hasWhere('orderList', $storeOrderWhere) ->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) { if ($where['paid'] == 0) {