订单数量
This commit is contained in:
parent
0a67e0c090
commit
8eb46c9d08
@ -243,13 +243,23 @@ class OrderController extends BaseApiController
|
||||
{
|
||||
$userId = $this->request->userId;
|
||||
$where = ['uid' => $userId, 'paid' => 0];
|
||||
$no_pay = StoreOrder::where($where)->count();
|
||||
$no_pay = StoreOrder::where($where)->count();//待付款
|
||||
|
||||
$where['paid'] = 1;
|
||||
$where['status'] = 0;
|
||||
$waiting = StoreOrder::where($where)->count();
|
||||
$where['status'] = 1;
|
||||
$receiving = StoreOrder::where($where)->count();
|
||||
return $this->success('ok', ['no_pay' => $no_pay, 'waiting' => $waiting, 'receiving' => $receiving]);
|
||||
$waiting = StoreOrder::where($where)->count();//待核销
|
||||
|
||||
$where['status'] = 2;
|
||||
$receiving = StoreOrder::where($where)->count();//已核销
|
||||
|
||||
$where['status'] = -1;
|
||||
$applyRefund= StoreOrder::where($where)->count();//申请退款
|
||||
|
||||
$where['status'] = 4;
|
||||
$refund= StoreOrder::where($where)->count();//已退款
|
||||
|
||||
$all = StoreOrder::where(['uid' => $userId])->count();//全部
|
||||
return $this->success('ok', ['no_pay' => $no_pay, 'waiting' => $waiting, 'receiving' => $receiving,'all'=>$all,'applyRefund'=>$applyRefund,'refund'=>$refund]);
|
||||
}
|
||||
|
||||
#[
|
||||
|
Loading…
x
Reference in New Issue
Block a user