This commit is contained in:
mkm 2023-11-16 10:19:48 +08:00
parent 1156eec859
commit e842872027

View File

@ -149,7 +149,7 @@ class StoreCartDao extends BaseDao
*/
public function getCartCount(int $uid,$product_type)
{
$data = ($this->getModel()::getDB())->where(['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'product_type' => $product_type])->field('count(*) as count')->select();
$data = ($this->getModel()::getDB())->where(['uid' => $uid, 'is_del' => 0, 'is_new' => 0, 'is_pay' => 0,'product_type' => $product_type,'is_fail'=>0])->field('count(*) as count')->select();
$data[0]['count'] = $data[0]['count'] ? $data[0]['count'] : 0;
return $data;
}