修改待付款订单数量统计

This commit is contained in:
luofei 2023-07-08 16:46:29 +08:00
parent ea1980465f
commit 9eafcde2c7

View File

@ -48,7 +48,7 @@ class StoreGroupOrderDao extends BaseDao
$storeOrderWhere = StoreOrder::where('activity_type', $productType);
return StoreGroupOrder::hasWhere('orderList', $storeOrderWhere)->when($uid, function ($query, $uid) {
$query->where('StoreGroupOrder.uid', $uid);
})->where('StoreGroupOrder.is_del', 0)->where('StoreGroupOrder.paid', 0)->count();
})->where('StoreGroupOrder.is_del', 0)->whereRaw("StoreGroupOrder.paid=0 or (StoreGroupOrder.paid=1 and StoreGroupOrder.pay_type=8)")->count();
}
/**
@ -60,9 +60,6 @@ class StoreGroupOrderDao extends BaseDao
public function search(array $where)
{
$storeOrderWhere = StoreOrder::where('activity_type', $where['product_type']);
if (isset($where['paid']) && $where['paid'] == 0) {
$storeOrderWhere->whereRaw("StoreGroupOrder.paid=0 or (StoreGroupOrder.paid=1 and StoreGroupOrder.pay_type=8)");
}
return StoreGroupOrder::hasWhere('orderList', $storeOrderWhere)
->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
if ($where['paid'] == 0) {