diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index 4dbe626e8..b59e9d615 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -91,6 +91,8 @@ class AjaxController extends ThinkController{ $map = []; if ($game) { $map['game_id'] = ['in', $game]; + } else { + $map['game_id'] = ['in', [-1]]; } $data = M('Server', 'tab_')->field('id, server_name, server_id')->where($map)->group('server_name')->select(); $this->AjaxReturn($data); diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 77ee795e0..1b9359ce3 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1916,6 +1916,25 @@ class ExportController extends Controller } break; case 23: + $params = I('get.'); + $map['tab_game_supersign.pay_status'] = 1; + if (isset($params['order_id'])) { + $map['tab_game_supersign.order_id'] = $params['order_id']; + } + if (isset($params['account'])) { + $map['tab_user.account'] = $params['account']; + } + if (isset($params['promote_id'])) { + $promoteId = $params['promote_id']; + if ($promoteId == 0) { + $map['promote_id'] = 0; + } else { + $promoteMap['chain'] = ['like', "%/$promoteId/%"]; + $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); + $promoteIds[] = $promoteId; + $map['tab_user.promote_id'] = ['in', $promoteIds]; + } + } $xlsCell = array( array('order_id', '订单号'), array('account', '游戏账号'), @@ -1925,7 +1944,7 @@ class ExportController extends Controller array('pay_time', '购买时间'), array('super_money', '超级签金额'), ); - $xlsData = 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])->order('id DESC')->select(); + $xlsData = 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($map)->order('id DESC')->select(); foreach($xlsData as $k => $v) { $xlsData[$k]['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); } @@ -3097,9 +3116,15 @@ class ExportController extends Controller $end_time = $end = strtotime($end) + 86400; $map = " 1=1 "; + $game_map = ""; if (isset($_REQUEST['game_name'])) { + $game_ids = implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')); $map .= " AND game_id in (" . implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) . ")"; + $game_map = " AND EXISTS (SELECT upi.user_id FROM tab_user_play_info as upi where upi.game_id in ({$game_ids}) AND upi.user_id = u.id "; + if (isset($_REQUEST['server_name'])) $game_map .= " AND upi.server_name = '{$_REQUEST['server_name']}' "; + $game_map .= ") "; } + if (isset($_REQUEST['server_name'])) { $map .= " AND server_name = '{$_REQUEST['server_name']}' "; } @@ -3114,10 +3139,11 @@ class ExportController extends Controller tab_user u WHERE u.register_time BETWEEN {$start_time} - AND {$end_time} + AND {$end_time} {$game_map} GROUP BY reg_date ORDER BY reg_date asc "); + $result = []; foreach ($users as $index => $item) { $ltv_start = strtotime($item['reg_date']); @@ -3133,7 +3159,7 @@ class ExportController extends Controller ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 7).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_7, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 14).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_14, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 30).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_30, - SUM(pay_amount) as total_amt + SUM(if (pay_time BETWEEN {$start_time} and ".($end_time).", pay_amount, 0)) as total_amt FROM tab_spend WHERE diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index 37f290871..e1653bac4 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -126,7 +126,9 @@ class PromoteGameRatioController extends ThinkController $params = I('get.'); $id = $params['id'] ?? 0; $id = intval($id); + $metaTitle = '游戏分成比例申请'; if ($id) { + $metaTitle .= '--修改'; $field = 'promote_id, game_id, ratio, begin_time, end_time, remark'; $map['id'] = $id; $promoteGameRatio = D(self::MODEL_NAME)->field($field)->where($map)->find(); @@ -138,7 +140,7 @@ class PromoteGameRatioController extends ThinkController $this->assign('gameList', getAllGameList()); $this->assign('promoteList', getPromoteByLevel(1)); - $this->meta_title = '游戏分成比例申请'; + $this->meta_title = $metaTitle; $this->display(); } } diff --git a/Application/Admin/Controller/StatisticsController.class.php b/Application/Admin/Controller/StatisticsController.class.php index 31040e7d4..d0e083ee1 100644 --- a/Application/Admin/Controller/StatisticsController.class.php +++ b/Application/Admin/Controller/StatisticsController.class.php @@ -1002,12 +1002,17 @@ if ($payids) { $end_time = $end_time > $end ? $end : $end_time; $map = " 1=1 "; + $game_map = ""; if (isset($_REQUEST['game_name'])) { - $map .= " AND game_id in (" . implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) . ")"; + $game_ids = implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')); + $map .= " AND game_id in ({$game_ids})"; + $game_map = " AND EXISTS (SELECT upi.user_id FROM tab_user_play_info as upi where upi.game_id in ({$game_ids}) AND upi.user_id = u.id "; + if (isset($_REQUEST['server_name'])) $game_map .= " AND upi.server_name = '{$_REQUEST['server_name']}' "; + $game_map .= ") "; } if (isset($_REQUEST['server_name'])) { $map .= " AND server_name = '{$_REQUEST['server_name']}' "; - } + } // 获取包含的用户id $users = M()->query(" SELECT @@ -1018,7 +1023,7 @@ if ($payids) { tab_user u WHERE u.register_time BETWEEN {$start_time} - AND {$end_time} + AND {$end_time} {$game_map} GROUP BY reg_date ORDER BY reg_date asc "); @@ -1037,7 +1042,7 @@ if ($payids) { ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 7).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_7, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 14).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_14, ROUND(SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 30).", pay_amount, 0))/{$item['total_count']}, 2) as ltv_30, - SUM(pay_amount) as total_amt + SUM(if (pay_time BETWEEN {$ltv_start} and ".($ltv_start+86400 * 30).", pay_amount, 0)) as total_amt FROM tab_spend WHERE diff --git a/Application/Admin/Controller/SuperStatisticalController.class.php b/Application/Admin/Controller/SuperStatisticalController.class.php index a2bfc3b93..5b11bc33f 100644 --- a/Application/Admin/Controller/SuperStatisticalController.class.php +++ b/Application/Admin/Controller/SuperStatisticalController.class.php @@ -102,8 +102,27 @@ class SuperStatisticalController extends ThinkController public function superDetail($p = 1,$row = 10) { $page = $p ? $p : 1; $row = $row ? $row : 10; - $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(); - $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(); + $params = I('get.'); + $map['tab_game_supersign.pay_status'] = 1; + if (isset($params['order_id'])) { + $map['tab_game_supersign.order_id'] = $params['order_id']; + } + if (isset($params['account'])) { + $map['tab_user.account'] = $params['account']; + } + if (isset($params['promote_id'])) { + $promoteId = $params['promote_id']; + if ($promoteId == 0) { + $map['promote_id'] = 0; + } else { + $promoteMap['chain'] = ['like', "%/$promoteId/%"]; + $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); + $promoteIds[] = $promoteId; + $map['tab_user.promote_id'] = ['in', $promoteIds]; + } + } + $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($map)->page($page,$row)->order('id DESC')->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($map)->count(); $super_money_all = $count * $this->super_money; $page = set_pagination($count, $row); diff --git a/Application/Admin/Controller/access_data_foldline.txt b/Application/Admin/Controller/access_data_foldline.txt index 89c4789df..1d3b7b6d6 100644 --- a/Application/Admin/Controller/access_data_foldline.txt +++ b/Application/Admin/Controller/access_data_foldline.txt @@ -1 +1 @@ -{"news":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":1},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":1},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"sum":{"news":2,"active":13,"player":5,"money":1330.05},"active":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":3},{"time":"10:00","count":2},{"time":"11:00","count":2},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":1},{"time":"15:00","count":1},{"time":"16:00","count":0},{"time":"17:00","count":1},{"time":"18:00","count":0},{"time":"19:00","count":2},{"time":"20:00","count":0},{"time":"21:00","count":1},{"time":"22:00","count":0},{"time":"23:00","count":0}],"player":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":1},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":1},{"time":"15:00","count":1},{"time":"16:00","count":2},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"money":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":"962.00"},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":"356.00"},{"time":"15:00","count":"0.03"},{"time":"16:00","count":"12.02"},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}]} \ No newline at end of file +{"news":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":2},{"time":"16:00","count":2},{"time":"17:00","count":1},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"sum":{"news":5,"active":17,"player":1,"money":6},"active":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":3},{"time":"10:00","count":1},{"time":"11:00","count":3},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":1},{"time":"15:00","count":3},{"time":"16:00","count":4},{"time":"17:00","count":2},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"player":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":1},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"money":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":"6.00"},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}]} \ No newline at end of file diff --git a/Application/Admin/View/PromoteGameRatio/applyRatio.html b/Application/Admin/View/PromoteGameRatio/applyRatio.html index 776077526..fe674744d 100644 --- a/Application/Admin/View/PromoteGameRatio/applyRatio.html +++ b/Application/Admin/View/PromoteGameRatio/applyRatio.html @@ -5,6 +5,15 @@ +
- 导出 {$_page|default=''}
diff --git a/Application/Admin/View/SuperStatistical/superDetail.html b/Application/Admin/View/SuperStatistical/superDetail.html index f1c5a3f59..f868fed0b 100644 --- a/Application/Admin/View/SuperStatistical/superDetail.html +++ b/Application/Admin/View/SuperStatistical/superDetail.html @@ -11,13 +11,35 @@ + +
@@ -26,6 +48,41 @@ +
+
+ +
+ +
+   +
+
+   +
+
+ + - +
+
+ +
+ + +
+ 搜索 +
+
@@ -74,4 +131,54 @@
+ \ No newline at end of file diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 2162efa41..53af22fda 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -77,9 +77,9 @@ class PlayersController extends BaseController { $rs[$key]['extend'] = encryption($v['extend']); $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); - $serverId = $v['server_id']; + $serverId1 = $v['server_id']; $gameId = $v['game_id']; - $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find(); + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find(); $rs[$key]['server_name'] = $serverInfo['server_name']; $rs[$key]['promote_id']= $promoteInfo['account']; } diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 9d82ca4ab..fc1d02789 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1888,7 +1888,7 @@ class QueryController extends BaseController if (empty($list['user_account']) ) { $list['user_account'] = M('user', 'tab_')->where("id = {$list['user_id']}")->getField('account'); } - $list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']); + $list['user_account'] = empty($list['user_account']) ? '--' : $list['user_account']; $list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name']; $list['sdk_version'] = empty($list['sdk_version']) ? '--' : getSDKTypeName($list['sdk_version']); $list['server_name'] = empty($list['server_name']) ? '--' : $list['server_name']; diff --git a/Application/Home/View/default/Home/landingPage2.html b/Application/Home/View/default/Home/landingPage2.html index 494a43ef9..f61386b50 100644 --- a/Application/Home/View/default/Home/landingPage2.html +++ b/Application/Home/View/default/Home/landingPage2.html @@ -52,18 +52,16 @@
-
+
+ +
+ +
+ -
- - -
- -
- - +
diff --git a/Application/Mobile/View/Index/business.html b/Application/Mobile/View/Index/business.html index 949beb895..5eb2574b4 100644 --- a/Application/Mobile/View/Index/business.html +++ b/Application/Mobile/View/Index/business.html @@ -9,7 +9,7 @@ - +
diff --git a/Public/Media/js/recharge.js b/Public/Media/js/recharge.js index 20448a92e..0437178f6 100644 --- a/Public/Media/js/recharge.js +++ b/Public/Media/js/recharge.js @@ -43,7 +43,7 @@ $(function() { var apitype = $("#apitype").val(); if (apitype == 'weixin') { var loading = new Cute.ui.dialog().loading('加载中...',{mask:true}); - Cute.api.post("/media.php/Recharge/beginPay",that.serialize(), function(json){ + Cute.api.post("/media.php?s=/Recharge/beginPay",that.serialize(), function(json){ loading.close(); if(json.status > 0){