diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php
index 1b51e7fd5..49f24c7a4 100644
--- a/Application/Admin/Common/function.php
+++ b/Application/Admin/Common/function.php
@@ -591,6 +591,12 @@ function getAllGame()
return $list;
}
+function getAllIosGame()
+{
+ $list = M("game", 'tab_')->field('relation_game_name as game_name,id')->where(['sdk_version' => 2])->group('relation_game_name')->select();
+ return $list;
+}
+
/**
* 中间加密 替换字符串的子串
*/
diff --git a/Application/Admin/Controller/SuperStatisticalController.class.php b/Application/Admin/Controller/SuperStatisticalController.class.php
new file mode 100644
index 000000000..8d3b22fd0
--- /dev/null
+++ b/Application/Admin/Controller/SuperStatisticalController.class.php
@@ -0,0 +1,123 @@
+field('supersign_token')->where($map)->select();
+ $supersign_token = array_column($supersign_game, 'supersign_token');
+ $authorization_all_num = 0;
+ foreach($supersign_token as $k => $v) {
+ $authorization_all_num += count($this->game_supersign_num($v));
+ }
+ $where['pay_status'] = 1;
+ $data['buy_num'] = M('game_supersign', 'tab_')->where($where)->count();
+ $data['money_all'] = $data['buy_num'] * $this->super_money;
+ $data['authorization_all_num'] = $authorization_all_num;
+ $this->assign('data', $data);
+ $this->display('index');
+ }
+
+ public function lists() {
+ $map['supersign_token'] = ['NEQ',''];
+ $supersign_game = M('game', 'tab_')->field('id,game_name,supersign_token')->where($map)->select();
+ $data = [];
+ $count['authorization'] = 0;
+ $count['pay_num'] = 0;
+ $count['promote_super_money'] = 0;
+ $count['official_super_money'] = 0;
+ foreach($supersign_game as $k => $v) {
+ $arr['game_name'] = $v['game_name'];
+ $arr['authorization_num'] = count($this->game_supersign_num($v['supersign_token']));
+ $count['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();
+ $arr['pay_game_supersign'] = count($game_supersign);
+ $count['pay_num'] += $arr['pay_game_supersign'];
+
+ $arr['promote_super_money'] = 0;
+ $arr['official_super_money'] = 0;
+ foreach($game_supersign as $key => $val) {
+ if($val['promote_id'] != 0) {
+ $arr['promote_super_money'] += $this->super_money;
+ }else {
+ $arr['official_super_money'] += $this->super_money;
+ }
+ }
+ $count['official_super_money'] += $arr['official_super_money'];
+ $count['promote_super_money'] += $arr['promote_super_money'];
+ $data[] = $arr;
+ }
+ $this->assign('data', $data);
+ $this->assign('count', $count);
+ $this->display('lists');
+ }
+
+ private function game_supersign_num($token) {
+ $re_data = [];
+ $arr['token'] = $token;
+ $arr['limit'] = 2000;
+ for ($i = 1;$i > 0;$i++) {
+ if($i != 1) {
+ $pop = array_pop($data);
+ $arr['lastid'] = $pop['id'];
+ }
+ $curl_re = json_decode(curl_post($this->ticketList_url,$arr),true);
+ if($curl_re['errno'] == 0) {
+ $data = $curl_re['data']['list'];
+ $re_data = array_merge($re_data,$data);
+ } else {
+ break;
+ }
+ if(count($data) != $arr['limit']) {
+ break;
+ }
+ }
+ return $re_data;
+ }
+
+ public function superDetail() {
+
+ $page = intval($p);
+ $page = $page ? $page : 1; //默认显示第一页数据
+ $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();
+ $super_money_all = $count * $this->super_money;
+
+ $page = set_pagination($count, $row);
+ if ($page) {
+ $this->assign('_page', $page);
+ }
+ $this->assign('data', $data);
+ $this->assign('super_money', $this->super_money);
+ $this->assign('super_money_all', $super_money_all);
+ $this->display('superDetail');
+ }
+
+}
diff --git a/Application/Admin/View/SuperStatistical/index.html b/Application/Admin/View/SuperStatistical/index.html
new file mode 100644
index 000000000..0806a88de
--- /dev/null
+++ b/Application/Admin/View/SuperStatistical/index.html
@@ -0,0 +1,424 @@
+
+
+
+
+
+
+
+
+
+
+
超级签订单
+
说明:玩家点击游戏内道具购买时生成一条新订单
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已授权游戏总数 |
+ 超级签被购买数量 |
+ 超级签金额合计 |
+
+
+
+
+
+
+ aOh! 暂时还没有内容! |
+
+
+ {$data['authorization_all_num']} |
+ {$data['buy_num']} |
+ {$data['money_all']} |
+
+
+
+
+
+
+
+
+
导出
+ {$_page|default=''}
+
+
+
+
+
+
+
+
+ if(C('COLOR_STYLE')=='blue_color') echo '
+
+ ';
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/SuperStatistical/lists.html b/Application/Admin/View/SuperStatistical/lists.html
new file mode 100644
index 000000000..950af61bc
--- /dev/null
+++ b/Application/Admin/View/SuperStatistical/lists.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+ 充值查询列表|----软件管理平台
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 游戏 |
+ 已授权游戏数量 |
+ 超级签被购买数量 |
+ 推广超级签金额 |
+ 官方超级签金额 |
+
+
+
+
+
+
+ {$vo.game_name} |
+ {$vo.authorization_num} |
+ {$vo.pay_game_supersign} |
+ {$vo.promote_super_money} |
+ {$vo.official_super_money} |
+
+
+
+ 合计 |
+ {$count.authorization} |
+ {$count.pay_num} |
+ {$count.promote_super_money} |
+ {$count.official_super_money} |
+
+
+
+
+
+
+ {$_page|default=''}
+
+
+
+
\ No newline at end of file
diff --git a/Application/Admin/View/SuperStatistical/superDetail.html b/Application/Admin/View/SuperStatistical/superDetail.html
new file mode 100644
index 000000000..228bc8b42
--- /dev/null
+++ b/Application/Admin/View/SuperStatistical/superDetail.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+ 充值查询列表|----软件管理平台
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 订单号 |
+ 游戏账号 |
+ 所属推广员 |
+ 设备号 |
+ 游戏 |
+ 购买时间 |
+ 超级签金额 |
+
+
+
+
+
+
+ {$vo.order_id} |
+ {$vo.account} |
+ {$vo.promote_account} |
+ {$vo.device_number} |
+ {$vo.game_name} |
+ {$vo.pay_time|date='Y-m-d H:i:s',###} |
+ {$super_money} |
+
+
+
+ 合计 |
+ -- |
+ -- |
+ -- |
+ -- |
+ -- |
+ {$super_money_all} |
+
+
+
+
+
+
+ {$_page|default=''}
+
+
+
+
\ No newline at end of file
diff --git a/Data/update.sql b/Data/update.sql
index b27e6a430..357ba0da2 100644
--- a/Data/update.sql
+++ b/Data/update.sql
@@ -743,4 +743,6 @@ CREATE TABLE `tab_promote_game_ratio` (
`update_time` int(10) NOT NULL DEFAULT 0 COMMENT '更新时间',
PRIMARY KEY (`id`),
INDEX `promote_id`(`promote_id`, `game_id`, `status`) USING BTREE
-);
\ No newline at end of file
+);
+-- 超级签统计菜单
+INSERT INTO `platform`.`sys_menu`( `title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) VALUES ('游戏统计', 137, 0, 'SuperStatistical/index', 0, '', '财务管理', 0, 1);