|
|
@ -37,21 +37,23 @@ class SuperStatisticalController extends ThinkController
|
|
|
|
$this->display('index');
|
|
|
|
$this->display('index');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function lists() {
|
|
|
|
public function lists($p = 1,$row = 10) {
|
|
|
|
|
|
|
|
$page = $p ? $p : 1;
|
|
|
|
|
|
|
|
$row = $row ? $row : 10;
|
|
|
|
$map['supersign_token'] = ['NEQ',''];
|
|
|
|
$map['supersign_token'] = ['NEQ',''];
|
|
|
|
$supersign_game = M('game', 'tab_')->field('id,game_name,supersign_token')->where($map)->select();
|
|
|
|
$supersign_game = M('game', 'tab_')->field('id,game_name,supersign_token')->where($map)->page($page,$row)->select();
|
|
|
|
$data = [];
|
|
|
|
$data = [];
|
|
|
|
$count['authorization'] = 0;
|
|
|
|
$num['authorization'] = 0;
|
|
|
|
$count['pay_num'] = 0;
|
|
|
|
$num['pay_num'] = 0;
|
|
|
|
$count['promote_super_money'] = 0;
|
|
|
|
$num['promote_super_money'] = 0;
|
|
|
|
$count['official_super_money'] = 0;
|
|
|
|
$num['official_super_money'] = 0;
|
|
|
|
foreach($supersign_game as $k => $v) {
|
|
|
|
foreach($supersign_game as $k => $v) {
|
|
|
|
$arr['game_name'] = $v['game_name'];
|
|
|
|
$arr['game_name'] = $v['game_name'];
|
|
|
|
$arr['authorization_num'] = count($this->game_supersign_num($v['supersign_token']));
|
|
|
|
$arr['authorization_num'] = count($this->game_supersign_num($v['supersign_token']));
|
|
|
|
$count['authorization'] += $arr['authorization_num'];
|
|
|
|
$num['authorization'] += $arr['authorization_num'];
|
|
|
|
$game_supersign = M('game_supersign', 'tab_')->field('promote_id')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->where(['game_id' => $v['id'], 'pay_status' => 1])->select();
|
|
|
|
$game_supersign = M('game_supersign', 'tab_')->field('promote_id')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->where(['game_id' => $v['id'], 'pay_status' => 1])->select();
|
|
|
|
$arr['pay_game_supersign'] = count($game_supersign);
|
|
|
|
$arr['pay_game_supersign'] = count($game_supersign);
|
|
|
|
$count['pay_num'] += $arr['pay_game_supersign'];
|
|
|
|
$num['pay_num'] += $arr['pay_game_supersign'];
|
|
|
|
|
|
|
|
|
|
|
|
$arr['promote_super_money'] = 0;
|
|
|
|
$arr['promote_super_money'] = 0;
|
|
|
|
$arr['official_super_money'] = 0;
|
|
|
|
$arr['official_super_money'] = 0;
|
|
|
@ -62,12 +64,15 @@ class SuperStatisticalController extends ThinkController
|
|
|
|
$arr['official_super_money'] += $this->super_money;
|
|
|
|
$arr['official_super_money'] += $this->super_money;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$count['official_super_money'] += $arr['official_super_money'];
|
|
|
|
$num['official_super_money'] += $arr['official_super_money'];
|
|
|
|
$count['promote_super_money'] += $arr['promote_super_money'];
|
|
|
|
$num['promote_super_money'] += $arr['promote_super_money'];
|
|
|
|
$data[] = $arr;
|
|
|
|
$data[] = $arr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$count = M('game', 'tab_')->where($map)->count();
|
|
|
|
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
$this->assign('data', $data);
|
|
|
|
$this->assign('data', $data);
|
|
|
|
$this->assign('count', $count);
|
|
|
|
$this->assign('num', $num);
|
|
|
|
$this->display('lists');
|
|
|
|
$this->display('lists');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -94,26 +99,15 @@ class SuperStatisticalController extends ThinkController
|
|
|
|
return $re_data;
|
|
|
|
return $re_data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function superDetail() {
|
|
|
|
public function superDetail($p = 1,$row = 10) {
|
|
|
|
|
|
|
|
$page = $p ? $p : 1;
|
|
|
|
$page = intval($p);
|
|
|
|
$row = $row ? $row : 10;
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
$data = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where(['tab_game_supersign.pay_status' => 1])->page($page,$row)->order('id DESC')->select();
|
|
|
|
$row = 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['row'])) {
|
|
|
|
|
|
|
|
$row = $_REQUEST['row'];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$row = 10;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$data = M('game_supersign', 'tab_')->field('tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where(['tab_game_supersign.pay_status' => 1])->page($page,$row)->select();
|
|
|
|
|
|
|
|
$count = M('game_supersign', 'tab_')->field('tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where(['tab_game_supersign.pay_status' => 1])->count();
|
|
|
|
$count = M('game_supersign', 'tab_')->field('tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where(['tab_game_supersign.pay_status' => 1])->count();
|
|
|
|
$super_money_all = $count * $this->super_money;
|
|
|
|
$super_money_all = $count * $this->super_money;
|
|
|
|
|
|
|
|
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
if ($page) {
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->assign('data', $data);
|
|
|
|
$this->assign('data', $data);
|
|
|
|
$this->assign('super_money', $this->super_money);
|
|
|
|
$this->assign('super_money', $this->super_money);
|
|
|
|
$this->assign('super_money_all', $super_money_all);
|
|
|
|
$this->assign('super_money_all', $super_money_all);
|
|
|
|