diff --git a/.gitignore b/.gitignore index 7208e679..f609c241 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.vscode *.log .env +.example.env .user.ini .phpstorm.meta.php .constant diff --git a/app/common/dao/store/order/StoreCartDao.php b/app/common/dao/store/order/StoreCartDao.php index 25f117ea..b9a61c85 100644 --- a/app/common/dao/store/order/StoreCartDao.php +++ b/app/common/dao/store/order/StoreCartDao.php @@ -87,7 +87,6 @@ class StoreCartDao extends BaseDao $query->field('mer_id,mer_name,mer_state,mer_avatar,is_trader,type_id,credit_buy,street_id')->with(['type_names']); } ])->select(); - return $query; } @@ -153,7 +152,11 @@ class StoreCartDao extends BaseDao */ public function getCartCount(int $uid,$product_type,$source=0) { - $count = ($this->getModel()::getDB())->where(['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'product_type' => $product_type,'is_fail'=>0,'source'=>$source])->count(); + $where=['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'product_type' => $product_type,'is_fail'=>0,'source'=>$source]; + if($source==103){ + $where=['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'is_fail'=>0,'source'=>$source]; + } + $count = ($this->getModel()::getDB())->where($where)->count(); $data[0]['count'] = $count; return $data; }