|
|
@@ -569,6 +569,27 @@ class StoreOrderController
|
|
|
return app('json')->successful($data);
|
|
|
}
|
|
|
|
|
|
+ public function month(Request $request)
|
|
|
+ {
|
|
|
+ $uid = $request->uid();
|
|
|
+ $where = [];
|
|
|
+ $info = SystemStoreStaff::where('uid', $uid)->where('status', 1)->find();
|
|
|
+ if ($info) {
|
|
|
+ $where['store_id'] = $info['store_id'];
|
|
|
+ }
|
|
|
+ $start = StoreOrder::min('add_time');
|
|
|
+ $data = [];
|
|
|
+ while ($start < time()) {
|
|
|
+ $start_month = date('Y-m', $start);
|
|
|
+ $end = strtotime('+1month', strtotime($start_month)) - 1;
|
|
|
+ $frontPrice = StoreOrder:: getOrderTimeBusinessVolumePrice($start, $end, $where);
|
|
|
+ $frontNumber = StoreOrder:: getOrderTimeBusinessVolumeNumber($start, $end, $where);
|
|
|
+ $start = $end + 1;
|
|
|
+ $data[$start_month] = compact('frontPrice', 'frontNumber');
|
|
|
+ }
|
|
|
+ return app('json')->successful($data);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 订单支付
|
|
|
* @param Request $request
|