// +---------------------------------------------------------------------- namespace App\Http\Controllers\Admin; use App\Services\Common\FinanceService; /** * 平台财务管理-控制器 * @author laravel开发员 * @since 2020/11/11 * Class FinanceController * @package App\Http\Controllers */ class FinanceController extends Backend { /** * 构造函数 * @author laravel开发员 * @since 2020/11/11 * FinanceController constructor. */ public function __construct() { parent::__construct(); $this->service = new FinanceService(); } /** * 平台账户 * @return array * @throws \Psr\Container\ContainerExceptionInterface * @throws \Psr\Container\NotFoundExceptionInterface */ public function index() { $pageSize = request()->get('limit', 10); $list = $this->service->getDataList(request()->all(), $pageSize); $message = array( "msg" => '操作成功', "code" => 0, "data" => isset($list['list'])? $list['list']:[], "count" => isset($list['total'])? $list['total']:0, ); return $message; } /** * 统计 * @return array */ public function count() { $datas = $this->service->getCount(request()->all()); $message = array( "msg" => '操作成功', "code" => 0, "data" => $datas, ); return $message; } }