add 数据之眼-财务-提现记录,资金记录
This commit is contained in:
parent
c08ff6d9dd
commit
0b96122b7d
@ -3,6 +3,7 @@
|
|||||||
namespace app\controller\api\dataview;
|
namespace app\controller\api\dataview;
|
||||||
|
|
||||||
use app\common\repositories\BaseRepository;
|
use app\common\repositories\BaseRepository;
|
||||||
|
use app\common\repositories\system\merchant\FinancialRecordRepository;
|
||||||
use app\common\repositories\user\UserBillRepository;
|
use app\common\repositories\user\UserBillRepository;
|
||||||
use app\common\repositories\user\UserExtractRepository;
|
use app\common\repositories\user\UserExtractRepository;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
@ -31,6 +32,7 @@ class Finance extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 提现记录
|
||||||
public function withdrawList(UserExtractRepository $repository)
|
public function withdrawList(UserExtractRepository $repository)
|
||||||
{
|
{
|
||||||
[$page,$limit] = $this->getPage();
|
[$page,$limit] = $this->getPage();
|
||||||
@ -38,10 +40,43 @@ class Finance extends BaseController
|
|||||||
return app('json')->success($repository->getList($where,$page,$limit));
|
return app('json')->success($repository->getList($where,$page,$limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 资金记录
|
||||||
public function billList(UserBillRepository $repository)
|
public function billList(UserBillRepository $repository)
|
||||||
{
|
{
|
||||||
[$page, $limit] = $this->getPage();
|
[$page, $limit] = $this->getPage();
|
||||||
$where = $this->request->params(['keyword', 'date', 'type']);
|
$where = $this->request->params(['keyword', 'date', 'type']);
|
||||||
return app('json')->success($repository->getList($where, $page, $limit));
|
return app('json')->success($repository->getList($where, $page, $limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 账单管理统计标题
|
||||||
|
public function financialRecordTitle(FinancialRecordRepository $repository)
|
||||||
|
{
|
||||||
|
$where = $this->request->params(['date']);
|
||||||
|
$where['is_mer'] = $this->request->merId() ?? 0 ;
|
||||||
|
if($where['is_mer'] == 0){
|
||||||
|
$data = $repository->getAdminTitle($where);
|
||||||
|
}else{
|
||||||
|
$data = $repository->getMerchantTitle($where);
|
||||||
|
}
|
||||||
|
return app('json')->success($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function financialRecord(FinancialRecordRepository $repository)
|
||||||
|
{
|
||||||
|
[$page, $limit] = $this->getPage();
|
||||||
|
$where = $this->request->params(['keyword', 'date', 'mer_id']);
|
||||||
|
$merId = $this->request->merId();
|
||||||
|
if ($merId) {
|
||||||
|
$where['mer_id'] = $merId;
|
||||||
|
$where['financial_type'] = ['order', 'mer_accoubts', 'brokerage_one', 'brokerage_two', 'refund_brokerage_one', 'refund_brokerage_two', 'refund_order','order_platform_coupon',
|
||||||
|
'order_svip_coupon','commission_to_service_team','commission_to_service_team_refund','commission_to_platform','commission_to_platform_refund','commission_to_village','commission_to_village_refund','commission_to_town','commission_to_town_refund','commission_to_entry_merchant','commission_to_entry_merchant_refund'
|
||||||
|
,'commission_to_cloud_warehouse','commission_to_cloud_warehouse_refund'];
|
||||||
|
} else {
|
||||||
|
$where['financial_type'] = ['order', 'sys_accoubts', 'brokerage_one', 'brokerage_two', 'refund_brokerage_one', 'refund_brokerage_two', 'refund_order','order_platform_coupon',
|
||||||
|
'order_svip_coupon','commission_to_service_team','commission_to_service_team_refund','commission_to_platform','commission_to_platform_refund','commission_to_village','commission_to_village_refund','commission_to_town','commission_to_town_refund'
|
||||||
|
,'commission_to_entry_merchant','commission_to_entry_merchant_refund'
|
||||||
|
,'commission_to_cloud_warehouse','commission_to_cloud_warehouse_refund'];
|
||||||
|
}
|
||||||
|
return app('json')->success($repository->getList($where, $page, $limit));
|
||||||
|
}
|
||||||
}
|
}
|
@ -759,6 +759,8 @@ Route::group('api/', function () {
|
|||||||
// api.dataview.Finance
|
// api.dataview.Finance
|
||||||
Route::get('withdraw_list', 'Finance/withdrawList');
|
Route::get('withdraw_list', 'Finance/withdrawList');
|
||||||
Route::get('bill_list', 'Finance/billList');
|
Route::get('bill_list', 'Finance/billList');
|
||||||
|
Route::get('financial_record_title', 'Finance/financialRecordTitle');
|
||||||
|
Route::get('financial_record', 'Finance/financialRecord');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user