修改待付款订单数量统计
This commit is contained in:
parent
ea1980465f
commit
9eafcde2c7
@ -48,7 +48,7 @@ class StoreGroupOrderDao extends BaseDao
|
|||||||
$storeOrderWhere = StoreOrder::where('activity_type', $productType);
|
$storeOrderWhere = StoreOrder::where('activity_type', $productType);
|
||||||
return StoreGroupOrder::hasWhere('orderList', $storeOrderWhere)->when($uid, function ($query, $uid) {
|
return StoreGroupOrder::hasWhere('orderList', $storeOrderWhere)->when($uid, function ($query, $uid) {
|
||||||
$query->where('StoreGroupOrder.uid', $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)
|
public function search(array $where)
|
||||||
{
|
{
|
||||||
$storeOrderWhere = StoreOrder::where('activity_type', $where['product_type']);
|
$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)
|
return StoreGroupOrder::hasWhere('orderList', $storeOrderWhere)
|
||||||
->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
|
->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
|
||||||
if ($where['paid'] == 0) {
|
if ($where['paid'] == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user