From 9c7a5d0a6cf839b2e414572aefd6c4514c4825f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E6=A1=83?= <1098598843@qq.com> Date: Wed, 8 Feb 2023 13:57:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E8=B4=AD=E6=8E=A5=E5=8F=A36?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/order/StoreCartDao.php | 2 +- app/common/repositories/store/order/StoreCartRepository.php | 4 ++-- app/common/repositories/store/product/ProductRepository.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/common/dao/store/order/StoreCartDao.php b/app/common/dao/store/order/StoreCartDao.php index 3b15391f..28be855a 100644 --- a/app/common/dao/store/order/StoreCartDao.php +++ b/app/common/dao/store/order/StoreCartDao.php @@ -139,7 +139,7 @@ class StoreCartDao extends BaseDao */ public function getCartCount(int $uid) { - $data = ($this->getModel()::getDB())->where(['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0])->field('SUM(cart_num) as count')->select(); + $data = ($this->getModel()::getDB())->where(['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0, 'is_dg' => 0])->field('SUM(cart_num) as count')->select(); $data[0]['count'] = $data[0]['count'] ? $data[0]['count'] : 0; return $data; } diff --git a/app/common/repositories/store/order/StoreCartRepository.php b/app/common/repositories/store/order/StoreCartRepository.php index 1600c150..ef670eff 100644 --- a/app/common/repositories/store/order/StoreCartRepository.php +++ b/app/common/repositories/store/order/StoreCartRepository.php @@ -100,7 +100,7 @@ class StoreCartRepository extends BaseRepository */ public function getOne(int $id,int $uid) { - $where = [$this->dao->getPk() => $id,'is_del'=>0,'is_fail'=>0,'is_new'=>0,'is_pay'=>0,'uid' => $uid]; + $where = [$this->dao->getPk() => $id,'is_del'=>0,'is_fail'=>0,'is_new'=>0,'is_pay'=>0,'is_dg' => 0,'uid' => $uid]; return ($this->dao->getWhere($where)); } @@ -112,7 +112,7 @@ class StoreCartRepository extends BaseRepository */ public function getCartByProductSku($sku,$uid) { - $where = ['is_del'=>0,'is_fail'=>0,'is_new'=>0,'is_pay'=>0,'uid' => $uid,'product_type' => 0,'product_attr_unique' => $sku]; + $where = ['is_del'=>0,'is_fail'=>0,'is_new'=>0,'is_pay'=>0,'is_dg' => 0,'uid' => $uid,'product_type' => 0,'product_attr_unique' => $sku]; return ($this->dao->getWhere($where)); } diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index d10d61dc..12a274f7 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -1818,6 +1818,7 @@ class ProductRepository extends BaseRepository 'is_del' => 0, 'is_new' => 0, 'is_fail' => 0, + 'is_dg' => 0, 'product_type' => 0, 'product_id' => $productId, 'uid' => $uid,