68 lines
1.2 KiB
PHP
68 lines
1.2 KiB
PHP
<?php
|
|
namespace App\Domains\Stats\Http\Controllers;
|
|
|
|
use App\Core\Controller;
|
|
use Illuminate\Http\Request;
|
|
use App\Domains\Stats\Services\OrderService;
|
|
|
|
class OrderController extends Controller
|
|
{
|
|
protected $request;
|
|
protected $orderService;
|
|
|
|
/**
|
|
* 构造函数,自动注入.
|
|
*/
|
|
public function __construct(Request $request, OrderService $orderService)
|
|
{
|
|
$this->request = $request;
|
|
$this->orderService = $orderService;
|
|
}
|
|
|
|
/**
|
|
* 列表.
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function index($type)
|
|
{
|
|
$conditions = $this->request->all();
|
|
$conditions['type'] = $type;
|
|
|
|
$res = $this->OrderService->index($conditions);
|
|
|
|
return res($res, '订单统计', 201);
|
|
}
|
|
|
|
|
|
/**
|
|
* 创建.
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function create()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* 编辑.
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function update($id)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* 删除.
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function destroy()
|
|
{
|
|
//
|
|
}
|
|
}
|