更新订单统计信息接口
This commit is contained in:
parent
0a1878b6f1
commit
77c8f67606
@ -578,8 +578,9 @@ class StoreOrderRepository extends BaseRepository
|
||||
//ok
|
||||
$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();
|
||||
$orderPrice = $this->dao->search(['uid' => $uid, 'paid' => 1, 'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->sum('pay_price');
|
||||
$orderCount = $this->dao->search(['uid' => $uid, 'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||
return compact('noComment', 'done', 'refund', 'noDeliver', 'noPay', 'noPostage', 'orderCount');
|
||||
return compact('noComment', 'done', 'refund', 'noDeliver', 'noPay', 'noPostage', 'orderPrice', 'orderCount');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -165,7 +165,8 @@ class StoreOrder extends BaseController
|
||||
public function number()
|
||||
{
|
||||
$productType = $this->request->param('product_type', 0);
|
||||
return app('json')->success(['orderPrice' => $this->request->userInfo()->pay_price] + $this->repository->userOrderNumber($this->request->uid(), $productType));
|
||||
//['orderPrice' => $this->request->userInfo()->pay_price]
|
||||
return app('json')->success($this->repository->userOrderNumber($this->request->uid(), $productType));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user