更新统计number
This commit is contained in:
parent
156554ba24
commit
dd5448a976
@ -98,25 +98,33 @@ class StoreOrderDao extends BaseDao
|
|||||||
->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
|
->when(isset($where['status']) && $where['status'] !== '', function ($query) use ($where) {
|
||||||
switch ($where['status']) {
|
switch ($where['status']) {
|
||||||
case 0 :
|
case 0 :
|
||||||
$query->where('paid', 0)->whereIn('StoreOrder.status', [0, 9, 12]);
|
$query->where('paid', 1)->whereIn('StoreOrder.status', [0, 9, 12]);
|
||||||
|
break;
|
||||||
|
case 1 :
|
||||||
|
$query->where('paid', 1)->where('StoreOrder.status', 1);
|
||||||
|
break;
|
||||||
|
case 2 :
|
||||||
|
$query->where('paid', 1)->where('StoreOrder.status', 2)->where('pay_type', '<>', StoreGroupOrder::PAY_TYPE_CREDIT_BUY);
|
||||||
|
break;
|
||||||
|
case 3 :
|
||||||
|
$query->where('paid', 1)->where('StoreOrder.status', 1);
|
||||||
break;
|
break;
|
||||||
case 4 :
|
case 4 :
|
||||||
$query->where('paid', 1)->whereIn('StoreOrder.status', [0, 9, 12]);
|
$query->where('paid', 1)->whereIn('StoreOrder.status', [0, 9, 12]);
|
||||||
break;
|
break;
|
||||||
|
case -1 :
|
||||||
|
$query->where('paid', 0)->whereIn('StoreOrder.status', [0, 9, 12]);
|
||||||
case -2 :
|
case -2 :
|
||||||
$query->whereNotIn('StoreOrder.status', [10, 11]);
|
$query->whereNotIn('StoreOrder.status', [10, 11]);
|
||||||
break;
|
break;
|
||||||
case 10 :
|
case 10 :
|
||||||
$query->where('paid', 1)->whereIn('StoreOrder.status', [10, 11]);
|
$query->where('paid', 1)->whereIn('StoreOrder.status', [10, 11]);
|
||||||
break;
|
break;
|
||||||
case 2 :
|
|
||||||
$query->where('paid', 1)->where('StoreOrder.status', $where['status'])->where('pay_type', '<>', StoreGroupOrder::PAY_TYPE_CREDIT_BUY);
|
|
||||||
break;
|
|
||||||
case 20 :
|
case 20 :
|
||||||
$query->where('paid', 1)->whereIn('StoreOrder.status', [2, 3]);
|
$query->where('paid', 1)->whereIn('StoreOrder.status', [2, 3]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$query->where('paid', 1)->where('StoreOrder.status', $where['status']);
|
// $query->where('paid', 1)->where('StoreOrder.status', $where['status']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -585,11 +585,11 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
if ($product_type == 98) {
|
if ($product_type == 98) {
|
||||||
$isUser = 0;
|
$isUser = 0;
|
||||||
}
|
}
|
||||||
$noPay = $this->dao->search(['uid' => $uid, 'status' => 0, 'paid' => 0, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
$noPay = $this->dao->search(['uid' => $uid, 'status' => -1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
||||||
$noPostage = $this->dao->search(['uid' => $uid, 'status' => 4, 'paid' => 1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
$noPostage = $this->dao->search(['uid' => $uid, 'status' => 0, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
||||||
$noDeliver = $this->dao->search(['uid' => $uid, 'status' => 1, 'paid' => 1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
$noDeliver = $this->dao->search(['uid' => $uid, 'status' => 1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
||||||
$noComment = $this->dao->search(['uid' => $uid, 'status' => 2, 'paid' => 1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
$noComment = $this->dao->search(['uid' => $uid, 'status' => 2, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
||||||
$done = $this->dao->search(['uid' => $uid, 'status' => 3, 'paid' => 1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
$done = $this->dao->search(['uid' => $uid, 'status' => 3, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->count();
|
||||||
$refund = StoreRefundOrder::alias('t1')->join('store_order t2', 't1.order_id=t2.order_id')->where('t1.uid', $uid)->where('t1.status', 3)->where('t2.activity_type', $product_type)->count();
|
$refund = StoreRefundOrder::alias('t1')->join('store_order t2', 't1.order_id=t2.order_id')->where('t1.uid', $uid)->where('t1.status', 3)->where('t2.activity_type', $product_type)->count();
|
||||||
//$all = $this->dao->search(['uid' => $uid, 'status' => -2,'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
//$all = $this->dao->search(['uid' => $uid, 'status' => -2,'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||||
$orderPrice = $this->dao->search(['uid' => $uid, 'paid' => 1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->sum('pay_price');
|
$orderPrice = $this->dao->search(['uid' => $uid, 'paid' => 1, 'is_user' => $isUser])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->fetchSql(false)->sum('pay_price');
|
||||||
@ -1736,7 +1736,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
unset($order['takeOrderList'], $order->interest);
|
unset($order['takeOrderList'], $order->interest);
|
||||||
}
|
}
|
||||||
|
|
||||||
return compact( 'count','list');
|
return compact( 'count','list', 'where');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function userList($uid, $page, $limit)
|
public function userList($uid, $page, $limit)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user