From 295eb05d0ccaae4bbe7199dbf69b7aea2355f83c Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 4 Jan 2024 18:17:26 +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/StoreCartDao.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/common/dao/store/order/StoreCartDao.php b/app/common/dao/store/order/StoreCartDao.php index 581bf118..b3c58b25 100644 --- a/app/common/dao/store/order/StoreCartDao.php +++ b/app/common/dao/store/order/StoreCartDao.php @@ -71,7 +71,11 @@ class StoreCartDao extends BaseDao */ public function getAll(int $uid,$product_type,$source=0) { - $query = ($this->getModel())::where(['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'product_type' => $product_type,'source'=>$source]) + $where=['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'product_type' => $product_type,'source'=>$source]; + if($product_type==0 &&$source>0){ + $where=['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'source'=>$source]; + } + $query = ($this->getModel())::where($where) ->with([ 'product' => function ($query) { $query->field('product_id,image,store_name,is_show,status,is_del,unit_name,price,mer_status,is_used,product_type,once_max_count,once_min_count,pay_limit,mer_svip_status,svip_price_type');