add 数据之眼-财务-提现记录,资金记录
This commit is contained in:
parent
8dd3daefaa
commit
c08ff6d9dd
47
app/controller/api/dataview/Finance.php
Normal file
47
app/controller/api/dataview/Finance.php
Normal 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));
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user