| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- namespace App\Http\Controllers\Api\v1;
- use App\Http\Controllers\Api\webApp;
- use App\Services\Api\AccountLogService;
- use App\Services\Api\BalanceLogService;
- /**
- * 账单明细
- * Class AccountController
- * @package App\Http\Controllers\Api
- */
- class AccountController extends webApp
- {
- /**
- * 列表
- * @return array
- */
- public function index()
- {
- $params =request()->post();
- $pageSize = request()->post('pageSize', 15);
- $params['user_id'] = isset($params['user_id']) && $params['user_id']? $params['user_id'] : $this->userId;
- $datas = AccountLogService::make()->getDataList($params, $pageSize);
- if($datas){
- return showJson(1010, true, $datas);
- }else{
- return showJson(1009, false);
- }
- }
- /**
- * 列表
- * @return array
- */
- public function types()
- {
- $datas = [
- ['id'=>0,'name'=>'全部'],
- ['id'=>1,'name'=>'礼物打赏'],
- ['id'=>2,'name'=>'升级消费'],
- ['id'=>3,'name'=>'商城购物'],
- ['id'=>4,'name'=>'节点会员升级'],
- ['id'=>5,'name'=>'充值/提现'],
- ['id'=>6,'name'=>'转账'],
- ['id'=>7,'name'=>'退款'],
- ['id'=>8,'name'=>'平台充兑'],
- ['id'=>9,'name'=>'奖励收益'],
- ['id'=>10,'name'=>'佣金/提成'],
- ['id'=>11,'name'=>'打赏小费'],
- ['id'=>12,'name'=>'团队奖励'],
- ['id'=>99,'name'=>'其他'],
- // ['id'=>13,'name'=>'管理奖励'],
- // ['id'=>14,'name'=>'点对点奖励'],
- // ['id'=>15,'name'=>'全球分红奖励'],
- // ['id'=>97,'name'=>'等级烧伤损失'],
- ];
- return showJson(1010, true, $datas);
- }
- /**
- * 统计
- * @return array
- */
- public function counts()
- {
- $coinType =request()->post('coin_type',1);
- $userType =request()->post('user_type',1);
- $type =request()->post('type',1);
- $datas = AccountLogService::make()->getCountsByType($this->userId, $coinType, $userType, $type);
- return showJson(1010, true, $datas);
- }
- /**
- * 余额明细
- * @return array
- */
- public function balance()
- {
- $params =request()->post();
- $pageSize = request()->post('pageSize', 15);
- $params['user_id'] = isset($params['user_id'])? $params['user_id'] : $this->userId;
- $datas = BalanceLogService::make()->getDataList($params, $pageSize);
- return showJson(1010, true, $datas);
- }
- }
|