diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index 685ad3c6a..8db3fc557 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -103,7 +103,7 @@ class AjaxController extends ThinkController{ } public function getUserPlayGameName($user_id=0){ - $map['user_id'] = $user_id; + $map['user_account'] = $user_id; $data = M("UserPlay","tab_")->field("game_id,game_name,bind_balance")->where($map)->group('user_id,game_id')->select(); $this->AjaxReturn($data); } diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php index dcf6f6503..ef8cbb65f 100644 --- a/Application/Admin/Controller/ConsoleController.class.php +++ b/Application/Admin/Controller/ConsoleController.class.php @@ -129,8 +129,28 @@ class ConsoleController extends Think { public function deleteRepeatUserPlayInfo() { + /* INSERT INTO `tab_server`(`game_id`, `game_name`, `server_name`, `server_num`, `recommend_status`, `show_status`, `stop_status`, `server_status`, `icon`, `start_time`, `desride`, `prompt`, `parent_id`, `create_time`, `server_version`, `developers`, `server_id`) VALUES + (148, '王者纷争(安卓版)', 'O3-潜龙于渊', 3294, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3294'), + (148, '王者纷争(安卓版)', 'O4-攻心为上', 3301, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3301'), + (148, '王者纷争(安卓版)', 'O5-知人善用', 3311, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3311'), + (148, '王者纷争(安卓版)', 'O8-剑拔弩张', 3332, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3332'), + (148, '王者纷争(安卓版)', 'O12-七擒七纵', 3336, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3336'), + (148, '王者纷争(安卓版)', 'O15-遮空蔽日', 3375, 1, 1, 0, 0, NULL, 1571399818, NULL, NULL, NULL, 1571399818, 1, 0, '3375'); */ + // $gameId = 157; // $gameId = 155; + // $gameId = 153; + // $gameId = 150; + // $gameId = 151; + // 需要先执行上面sql插入区服才能清理干净 + // $gameId = 148; + // $gameId = 175; + // $gameId = 142; + // $gameId = 143; + // $gameId = 172; + // $gameId = 173; + // $gameId = 155; + // $gameId = 154; $gameId = 153; $sql = 'select id from tab_user_play_info a left join ( select role_id, server_id, game_id, count(1) from tab_user_play_info where server_id="' . $serverId . '" and game_id = ' . $gameId . ' GROUP BY role_id, server_id, game_id, server_name having count(1) > 1 @@ -175,4 +195,68 @@ class ConsoleController extends Think { } } } + + public function deleteRepeatUserPlayInfo2() + { + // $gameId = 157; + // $gameId = 148; + // $gameId = 150; + // $gameId = 151; + // $gameId = 158; + // $gameId = 175; + // $gameId = 142; + // $gameId = 143; + // $gameId = 172; + // $gameId = 173; + // $gameId = 154; + // $gameId = 155; + // $gameId = 176; + // $gameId = 165; + // $gameId = 164; + // $gameId = 179; + // $gameId = 156; + $gameId = 153; + $sql = 'select id from tab_user_play_info a left join ( + select role_id, server_id, game_id, count(1) from tab_user_play_info where server_id="' . $serverId . '" and game_id = ' . $gameId . ' GROUP BY role_id, server_id, game_id, server_name having count(1) > 1 + ) b on a.role_id=b.role_id where a.server_id=b.server_id and a.game_id=b.game_id and a.server_id="' . $serverId . '" and a.game_id = ' . $gameId . ' order by a.role_id, a.server_id, a.game_id'; + $model = new \Think\Model(); + + $servers = M('server', 'tab_')->field('server_id')->where(['game_id' => $gameId])->group('server_id')->select(); + foreach ($servers as $server) { + $serverId = $server['server_id']; + $sql = 'select a.id, a.role_id, a.server_id, a.game_id, a.role_level from tab_user_play_info a left join ( + select role_id, server_id, game_id, count(1) from tab_user_play_info where server_id="' . $serverId . '" and game_id = ' . $gameId . ' GROUP BY role_id, server_id, game_id having count(1) > 1 + ) b on a.role_id=b.role_id where a.server_id=b.server_id and a.game_id=b.game_id and a.server_id="' . $serverId . '" and a.game_id = ' . $gameId . ' order by a.role_id, a.server_id, a.game_id'; + // var_dump($sql); + + $result = $model->query($sql); + $uniqueRole = null; + $items = []; + foreach ($result as $item) { + $items[$item['role_id']][] = $item; + } + + $maxRoleIds = []; + $repeatIds = []; + foreach ($items as $roles) { + $maxRole = null; + foreach ($roles as $role) { + if ($maxRole == null) { + $maxRole = $role; + } elseif ($role['role_level'] >= $maxRole['role_level']) { + $repeatIds[] = $maxRole['id']; + $maxRole = $role; + } else { + $repeatIds[] = $role['id']; + } + } + $maxRoleIds[] = $maxRole['id']; + } + if (count($repeatIds) > 0) { + M('user_play_info', 'tab_')->where(['id' => ['in', $repeatIds], 'game_id' => $gameId, 'server_id' => $serverId])->delete(); + echo M()->getLastSql(); + echo PHP_EOL; + } + } + } } diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index c8feca33f..01c9b978d 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -219,6 +219,10 @@ class MemberController extends ThinkController ->group('tab_user.id') ->where($hav) ->having($havs)->select(false); + //获取总额 + $allcount = M()->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select(); + $this->assign('history_count', $allcount[0]['recharge_total']); + //替换为新表 if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){ $sql = M('user', 'tab_')->field('tab_user.id,IFNULL(sum(ss.pay_amount),0) AS recharge_total') @@ -234,7 +238,7 @@ class MemberController extends ThinkController $jcount = M('User', 'tab_')->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select(); $count = $jcount[0]['count']; // var_dump($jcount);die(); - $this->assign('pay_allcount', $jcount[0]['recharge_total']); + $this->assign('now_count', $jcount[0]['recharge_total']); $model = M('Model')->getByName('user'); diff --git a/Application/Admin/View/DeductBindRecord/deductBindBalance.html b/Application/Admin/View/DeductBindRecord/deductBindBalance.html index f426a7086..c6a001e74 100644 --- a/Application/Admin/View/DeductBindRecord/deductBindBalance.html +++ b/Application/Admin/View/DeductBindRecord/deductBindBalance.html @@ -49,12 +49,13 @@ 玩家账号: - + + + + + + + @@ -144,7 +145,7 @@ $(function(){ //$(".balance").text($('#user_id option:selected').attr('coin-balance')+'平台币'); $('#user_id').change(function(){ //$(".balance").text($('#user_id option:selected').attr('coin-balance')+'平台币'); - var user_id = $('#user_id option:selected').attr('value'); + var user_id = $('#user_id').val(); if(this.value !="请选择账号"){ getUserPlayGameName(user_id); diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index 83d7b0812..3111dcb7f 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -306,10 +306,23 @@ 汇总: - - 累计充值:{$pay_allcount} - - + + + + 当前用户累计充值:{$now_count}    + 历史累计充值:{$history_count} + + + 当前用户累计充值: 当前属于该推广员的用户的充值累计(不含用户换绑前记录)  /   + 历史累计充值: 历史中属于该推广员的用户的充值累计(含用户换绑前记录) + + + + 当前用户累计充值:{$now_count} + + + + diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index dac68565b..72465e89d 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2666,15 +2666,14 @@ class DownloadController extends BaseController { array('create_role_count','创角数'), array('create_role_user_count','创角用户'), array('new_create_role_user_count','新创角用户'), - array('new_create_role_device_count','新创角设备'), array('new_create_role_ip_count','新创角ip'), array('login_user_count','登陆用户数'), - array('recharge_count','充值人数'), - array('recharge_user_count','充值次数'), + array('recharge_user_count','充值人数'), + array('recharge_count','充值次数'), array('recharge_amount','充值总额'), - array('recharge_by_ban_coin','现金充值'), + array('recharge_by_ban_coin','绑定币充值'), array('recharge_by_coin','通用币充值'), - array('recharge_by_cash','绑定币充值'), + array('recharge_by_cash','现金充值'), ); diff --git a/Application/Home/Controller/PromoteCoinController.class.php b/Application/Home/Controller/PromoteCoinController.class.php index 2bc70a5ab..9a6ba8d00 100644 --- a/Application/Home/Controller/PromoteCoinController.class.php +++ b/Application/Home/Controller/PromoteCoinController.class.php @@ -625,10 +625,11 @@ class PromoteCoinController extends BaseController $level = I('level', 0); $account = I('account', ''); $mobile = I('mobile', ''); - $promote = $this->getLoginPromote(); $map = []; - $map['level'] = $level; + if ($level > 0) { + $map['level'] = $level; + } $map['chain'] = ['like', $promote['chain'] . $promote['id'] . '/%']; if ($account) { @@ -638,7 +639,6 @@ class PromoteCoinController extends BaseController $map['mobile_phone'] = ['like', '%' . $mobile . '%']; } $query = M('promote', 'tab_')->field(['id', 'account', 'real_name', 'mobile_phone'])->where($map); - list($promotes, $pagination, $count) = $this->paginate($query); $records = []; foreach ($promotes as $promote) { @@ -747,7 +747,6 @@ class PromoteCoinController extends BaseController } else { $map['_string'] = '1<>1'; } - $query = M('Game', 'tab_')->field(['id', 'game_name', 'sdk_version', 'icon'])->where($map); list($games, $pagination, $count) = $this->paginate($query); diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html index ee34e36d6..abebc7b7d 100644 --- a/Application/Home/View/default/Home/landingPage.html +++ b/Application/Home/View/default/Home/landingPage.html @@ -1,294 +1,133 @@ - - - - - - - - - - home + + + + + + + + + + {$game['relation_game_name']} + + + + - -
-
-
- -
-
{$game['relation_game_name']}
-
{$game['features']}
-
- -
免费安装
- -
免费安装
- - -
-
-
-
-
-
- {$game['game_score']} -
- - - - - -
-
-
14.48K个评分
-
-
- #{$game['recommend_level']} -
网络游戏
-
-
- 16+ -
年龄
-
-
-
-
    - -
  • - -
  • -
    -
-
-
-
简介
-
{$game['features']}
-
-
-
查看更多
-
-
-
-
评分及评论
-
-
- {$game['game_score']} - 满分5分 -
-
-
-
- - - - - -
-
-
-
-
-
-
- - - - -
-
-
-
-
-
-
- - - -
-
-
-
-
-
-
- - -
-
-
-
-
-
-
- -
-
-
-
-
-
14.48K个评分
-
-
-
-
-
新功能
-
更新说明:
-
1、优化用户体验
-
-
-
信息
-
- 大小 -
{$game['game_size']}MB
-
-
- 类别 -
游戏
-
-
- 语言 -
英语,简体中文
-
-
- 年龄分级 -
限16岁以上
-
-
- 价格 -
免费
-
-
隐私政策
-
-
-
-
-
闽ICP备19000000号-0
-
闽网文{2019}1554-099号
-
-
抵制不良游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。
-
适度游戏益脑,沉迷游戏伤身。合理安排时间,享受健康生活。
-
-
+ + + + + + + + + + + + -