初始化代码
This commit is contained in:
113
application/admin/controller/Statistics.php
Normal file
113
application/admin/controller/Statistics.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Request;
|
||||
|
||||
class Statistics extends Common
|
||||
{
|
||||
//首页基础数据
|
||||
public function welcome_data()
|
||||
{
|
||||
$reslut = model('Statistics')->welcome_data();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//打赏礼物数据根据天
|
||||
public function get_send_gift_data_by_day()
|
||||
{
|
||||
$reslut = model('Statistics')->get_send_gift_data_by_day();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//打赏礼物数据根据小时
|
||||
public function get_send_gift_data_by_hour()
|
||||
{
|
||||
$reslut = model('Statistics')->get_send_gift_data_by_hour();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
//打赏礼物数据根据小时
|
||||
public function get_room_type_date()
|
||||
{
|
||||
$reslut = model('Statistics')->get_room_type_date();
|
||||
return ajaxReturn($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
//充值排行统计
|
||||
public function get_recharge_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_recharge_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//送礼排行统计
|
||||
public function get_send_gift_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_send_gift_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//收礼排行统计
|
||||
public function get_receive_gift_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_receive_gift_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
|
||||
//陪玩排行统计
|
||||
public function get_player_order_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$order = input('order', 'order_num');
|
||||
$sort = input('sort', 'desc');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_player_order_rank_list($uid, $time_section, $order, $sort, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
//用户消费排行统计
|
||||
public function get_user_consume_rank_list()
|
||||
{
|
||||
$uid = input('uid', 0);
|
||||
$time_section = input('time_section', '');
|
||||
$page = input('page', 1);
|
||||
$limit = input('limit', 20);
|
||||
$reslut = model('Statistics')->get_user_consume_rank_list($uid, $time_section, $page, $limit);
|
||||
$data = [];
|
||||
$data['code'] = 0;
|
||||
$data['msg'] = '获取成功';
|
||||
$data['count'] = $reslut['data']['count'];
|
||||
$data['data'] = $reslut['data']['list'];
|
||||
return json($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user