diff --git a/app/common/dao/store/order/StoreOrderDao.php b/app/common/dao/store/order/StoreOrderDao.php index eddff786..8284e006 100644 --- a/app/common/dao/store/order/StoreOrderDao.php +++ b/app/common/dao/store/order/StoreOrderDao.php @@ -79,9 +79,9 @@ class StoreOrderDao extends BaseDao }) ->when(isset($where['order_type']) && $where['order_type'] >= 0 && $where['order_type'] !== '', function ($query) use ($where) { if ($where['order_type'] == 2) { - $query->where('is_virtual', 1); + $query->where('StoreOrder.is_virtual', 1); } else if($where['order_type'] == 0){ //实体发货订单 - $query->where('order_type', 0)->where('is_virtual',0); + $query->where('order_type', 0)->where('StoreOrder.is_virtual',0); } else if($where['order_type'] == 3) { //发货订单 $query->where('order_type', 0); } else { @@ -92,7 +92,7 @@ class StoreOrderDao extends BaseDao $query->where('activity_type', $where['activity_type']); }) ->when(isset($where['product_type']) && $where['product_type'] != 0, function ($query) use ($where) { - $query->where('is_virtual', $where['product_type']); + $query->where('StoreOrder.is_virtual', $where['product_type']); }) ->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) { switch ($where['status']) { diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 845ff36e..ba6a3a57 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -589,7 +589,7 @@ class StoreOrderRepository extends BaseRepository 'source' => $source ]; $where3=['uid' => $uid, 'status' => [0, 1, 2]]; - if ($product_type>98){ + if ($product_type>=98){ $where['is_virtual'] = $product_type; $where3['is_virtual'] = $product_type; } @@ -1681,10 +1681,8 @@ class StoreOrderRepository extends BaseRepository $query = $this->dao->search($where)->where('StoreOrder.is_del', 0); $count = $query->count(); - // 增加订单类型筛选 1 小组采购 2 普通商品 $query->hasWhere('groupOrder', ['source' => $source]); - $list = $query->with([ 'orderProduct', 'presellOrder', diff --git a/app/controller/api/store/order/StoreOrder.php b/app/controller/api/store/order/StoreOrder.php index c9bdc055..79860821 100644 --- a/app/controller/api/store/order/StoreOrder.php +++ b/app/controller/api/store/order/StoreOrder.php @@ -159,7 +159,6 @@ class StoreOrder extends BaseController $where['uid'] = $this->request->uid(); // $where['paid'] = 1; $where['source'] = $source; - return app('json')->success($this->repository->getList($where, $page, $limit, $source)); }