This commit is contained in:
mkm 2024-01-04 18:42:12 +08:00
parent 43c0de00ab
commit a6de7e2ea9
2 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
/.vscode
*.log
.env
.example.env
.user.ini
.phpstorm.meta.php
.constant

View File

@ -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;
}