| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?php
- /**
- * 运营分析
- */
- namespace app\v1\controller\dataReport;
- use app\v1\logic\dataReport\AnalyseLogic;
- use plugin\saiadmin\basic\BaseController;
- use support\Request;
- class AnalyseController extends BaseController
- {
- public function __construct()
- {
- $this->logic = new AnalyseLogic();
- parent::__construct();
- }
- // 注册按日
- public function getRegDayDataList(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['tdate', '']
- ]);
- $data = $this->logic->getRegDayDataList($where);
- $data['data'] = $this->logic->trandformListColumn($data['data'], ['game']);
- return $this->success($data);
- }
- // 注册按时s
- public function getRegHourDataList(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['tdate', '']
- ]);
- $data = $this->logic->getRegHourDataList($where);
- $data['data'] = $this->logic->trandformListColumn($data['data'], ['game']);
- return $this->success($data);
- }
- // 留存按日
- public function getRetentionDayDataList(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['tdate', ''],
- ['days', '']
- ]);
- $data = $this->logic->getRetentionDayDataList($where);
- $data['data'] = $this->logic->trandformListColumn($data['data'], ['game']);
- return $this->success($data);
- }
- //数据总览
- public function getDataOverview(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['tdate', ''],
- ['auth_id', ''],
- ['media_id', '']
- ]);
- $data = $this->logic->getDataOverview($where);
- return $this->success($data);
- }
- // 数据总览(按月)
- public function getDataOverviewByMonth(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['tdate', ''],
- ['auth_id', ''],
- ['media_id', '']
- ]);
- $data = $this->logic->getDataOverviewByMonth($where);
- return $this->success($data);
- }
- // 收入分析
- public function getIncomeAnalysis(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['tdate', '']
- ]);
- $data = $this->logic->getIncomeAnalysis($where);
- $data['data'] = $this->logic->trandformListColumn($data['data'], ['game']);
- return $this->success($data);
- }
- // 付费留存
- public function getPayRetention(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['tdate', ''],
- ['auth_id', ''],
- ['media_id', ''],
- ['show_type', '1']
- ]);
- $data = $this->logic->getPayRetention($where);
- return $this->success($data);
- }
- // 图表数据
- public function getChartData(Request $request)
- {
- $where = $request->more([
- ['game_id', ''],
- ['compare_date1', ''],
- ['compare_date2', ''],
- ['compare_date1_date', ''],
- ['compare_date2_date', ''],
- ['compare_type', 'day']
- ]);
- $data = $this->logic->getChartData($where);
- return $this->success($data);
- }
- }
|