add 数据之眼-财务-提现记录,资金记录

This commit is contained in:
chenbo 2023-12-07 16:57:54 +08:00
parent 8dd3daefaa
commit c08ff6d9dd
3 changed files with 53 additions and 5 deletions

View File

@ -0,0 +1,47 @@
<?php
namespace app\controller\api\dataview;
use app\common\repositories\BaseRepository;
use app\common\repositories\user\UserBillRepository;
use app\common\repositories\user\UserExtractRepository;
use crmeb\basic\BaseController;
use think\App;
use think\exception\ValidateException;
class Finance extends BaseController
{
/**
* @var repository
*/
protected $repository;
public $areaCode; // 区县地区码
public $streetCode; // 镇街道地区码
public function __construct(App $app, BaseRepository $repository)
{
parent::__construct($app);
$this->repository = $repository;
$this->areaCode = $this->request->param('areaCode', '');
$this->streetCode = $this->request->param('streetCode', '');
if ($this->areaCode == '' && $this->streetCode == '') {
throw new ValidateException('请选择地区');
}
}
public function withdrawList(UserExtractRepository $repository)
{
[$page,$limit] = $this->getPage();
$where = $this->request->params(['status','keyword','date','extract_type']);
return app('json')->success($repository->getList($where,$page,$limit));
}
public function billList(UserBillRepository $repository)
{
[$page, $limit] = $this->getPage();
$where = $this->request->params(['keyword', 'date', 'type']);
return app('json')->success($repository->getList($where, $page, $limit));
}
}

View File

@ -23,11 +23,6 @@ class Order extends BaseController
public $streetCode; // 镇街道地区码
/**
* StoreBrand constructor.
* @param App $app
* @param repository $repository
*/
public function __construct(App $app, BaseRepository $repository)
{
parent::__construct($app);

View File

@ -756,6 +756,12 @@ Route::group('api/', function () {
// api.dataview.Merchant
Route::get('merchant_list', 'Merchant/merchantList');
// api.dataview.Finance
Route::get('withdraw_list', 'Finance/withdrawList');
Route::get('bill_list', 'Finance/billList');
/**---------------------数据之眼可视化大屏api-------------------- end */