From 387f7297733f04f600967bc9918aef28dc45535a Mon Sep 17 00:00:00 2001 From: zyx Date: Thu, 24 Oct 2019 19:20:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=85=AC=E5=91=8A?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/View/default/Promote/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index e6f4b96b8..6acc997d1 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -44,7 +44,7 @@
公告 - + {$gg_count} @@ -59,14 +59,14 @@ 游戏活动 - + {$zx_count} 资源号异常日志 - + {$rz_count} From 36b9b51817a5a983caf23469cd401b85b4350789 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 24 Oct 2019 19:28:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B1=87=E6=80=BB|=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E6=A6=82=E5=86=B5|=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2|?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=98=8E=E7=BB=86->=E6=A3=80=E7=B4=A2?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 48 +++++++++++-------- .../Home/View/default/Query/dailySummary.html | 2 +- .../Home/View/default/Query/recharge.html | 2 +- .../Home/View/default/Query/register.html | 2 +- .../Home/View/default/Query/summary.html | 2 +- 5 files changed, 31 insertions(+), 25 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index ab6cfaf4e..d593ace66 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1154,34 +1154,37 @@ class QueryController extends BaseController ->select());//创角用户 $newUserNumData = $userPlayInfoModel - ->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.user_id) as num') + ->field('tab_user_play_info.create_time') ->join($join) ->where($userPlayInfoWhere2) ->where($map) - ->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399)) + ->group('tab_user_play_info.user_id') + ->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399)) ->order('tab_user_play_info.id') - ->find(); - $list['new_user_num'] = empty($newUserNumData['num']) ? 0 : $newUserNumData['num'];//新创角用户 + ->select(); + $list['new_user_num'] = count($newUserNumData);//新创角用户 $newDeviceData = $userPlayInfoModel - ->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_device_number) as num') + ->field('tab_user_play_info.create_time') ->join($join) ->where($userPlayInfoWhere2) ->where($map) - ->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399)) + ->group('tab_user_play_info.create_device_number') + ->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399)) ->order('tab_user_play_info.id') - ->find(); - $list['new_device_num'] = empty($newDeviceData['num']) ? 0 : $newDeviceData['num'];//新创角设备 + ->select(); + $list['new_device_num'] = count($newDeviceData);//新创角设备 $newIpNumData = $userPlayInfoModel - ->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_ip) as num') + ->field('tab_user_play_info.create_time') ->join($join) ->where($userPlayInfoWhere2) ->where($map) - ->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399)) + ->group('tab_user_play_info.create_ip') + ->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399)) ->order('tab_user_play_info.id') - ->find(); - $list['new_ip_num'] = empty($newIpNumData['num']) ? 0 : $newIpNumData['num'];//新增创角IP + ->select(); + $list['new_ip_num'] = count($newIpNumData);//新增创角IP $list['login_user_num'] = count(M('UserGameLoginRecord', 'tab_') ->join($join) @@ -1451,28 +1454,31 @@ class QueryController extends BaseController ->count('distinct tab_user_play_info.user_id');//创角用户 $newUserNumData = $userPlayInfoModel - ->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.user_id) as num') + ->field('tab_user_play_info.create_time') ->where($userPlayInfoMap2) + ->group('tab_user_play_info.user_id') ->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399)) ->order('tab_user_play_info.id') - ->find(); - $list['new_user_num'] = empty($newUserNumData['num']) ? 0 : $newUserNumData['num'];//新创角用户 + ->select(); + $list['new_user_num'] = count($newUserNumData);//新创角用户 $newDeviceData = $userPlayInfoModel - ->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_device_number) as num') + ->field('tab_user_play_info.create_time') ->where($userPlayInfoMap2) + ->group('tab_user_play_info.create_device_number') ->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399)) ->order('tab_user_play_info.id') - ->find(); - $list['new_device_num'] = empty($newDeviceData['num']) ? 0 : $newDeviceData['num'];//新创角设备 + ->select(); + $list['new_device_num'] = count($newDeviceData);//新创角设备 $newIpData = $userPlayInfoModel - ->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_ip) as num') + ->field('tab_user_play_info.create_time') ->where($userPlayInfoMap2) + ->group('tab_user_play_info.create_ip') ->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399)) ->order('tab_user_play_info.id') - ->find(); - $list['new_ip_num'] = empty($newIpData['num']) ? 0 : $newIpData['num'];//新增创角IP + ->select(); + $list['new_ip_num'] = count($newIpData);//新增创角IP $list['login_user_num'] = $userGameLoginModel ->where($userGameLoginMap) diff --git a/Application/Home/View/default/Query/dailySummary.html b/Application/Home/View/default/Query/dailySummary.html index d612be1d1..725d12058 100644 --- a/Application/Home/View/default/Query/dailySummary.html +++ b/Application/Home/View/default/Query/dailySummary.html @@ -94,7 +94,7 @@ - + diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html index fd126b232..d31c923b3 100644 --- a/Application/Home/View/default/Query/recharge.html +++ b/Application/Home/View/default/Query/recharge.html @@ -85,7 +85,7 @@ - + diff --git a/Application/Home/View/default/Query/register.html b/Application/Home/View/default/Query/register.html index 169dca9da..222d82133 100644 --- a/Application/Home/View/default/Query/register.html +++ b/Application/Home/View/default/Query/register.html @@ -56,7 +56,7 @@ - + diff --git a/Application/Home/View/default/Query/summary.html b/Application/Home/View/default/Query/summary.html index 545019883..c6c56ef07 100644 --- a/Application/Home/View/default/Query/summary.html +++ b/Application/Home/View/default/Query/summary.html @@ -84,7 +84,7 @@ - + From 437909d53a922370beed4091b34203547048baa1 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 24 Oct 2019 19:35:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/RechargeSumController.class.php | 13 ++++++++++--- .../Admin/Controller/SpendController.class.php | 6 +++++- .../Admin/Controller/UserController.class.php | 10 ++++++++-- Application/Admin/View/Member/user_info.html | 2 +- Application/Admin/View/RechargeSum/summation.html | 2 +- Application/Admin/View/Spend/lists.html | 2 +- Application/Admin/View/User/rolelist.html | 8 +++++--- 7 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php index 84eec8aa7..8bd895682 100644 --- a/Application/Admin/Controller/RechargeSumController.class.php +++ b/Application/Admin/Controller/RechargeSumController.class.php @@ -44,7 +44,7 @@ class RechargeSumController extends ThinkController{ $map['pay_way'] = array('egt',0); } - if(!empty($_REQUEST['promote_id'])){ + if(isset($_REQUEST['promote_id'])){ // switch ($_REQUEST['promote_id']) { // case 'GUANFANG': // $map['promote_id'] = 0; @@ -59,8 +59,12 @@ class RechargeSumController extends ThinkController{ // $rmap['promote_id'] = $_REQUEST['promote_id']; // break; // } - $promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select(); - $promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null; + if ($_REQUEST['promote_id'] > 0) { + $promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select(); + $promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null; + } else { + $rmap['promote_id'] = $map['promote_id'] = 0; + } } //当天注册人数 @@ -88,6 +92,9 @@ class RechargeSumController extends ThinkController{ case 'GUANFANG': $data[$key]['promote_id'] = "官方渠道"; break; + case 0: + $data[$key]['promote_id'] = "官方渠道"; + break; case 'PROMOTE': $data[$key]['promote_id'] = "推广渠道"; break; diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index c58167a3b..688a73315 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -71,7 +71,11 @@ class SpendController extends ThinkController { unset($_REQUEST['pay_game_status']); } if(isset($_REQUEST['promote_id'])) { - $map['_complex'] = ['tp.parent_id'=>$_REQUEST['promote_id'], 'tp.grand_id'=>$_REQUEST['promote_id'], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or']; + if ($_REQUEST['promote_id'] == 0) { + $map['promote_id'] = 0; + } else { + $map['_complex'] = ['tp.parent_id'=>$_REQUEST['promote_id'], 'tp.grand_id'=>$_REQUEST['promote_id'], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or']; + } $tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id"; //unset($_REQUEST['promote_id']); } else { diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index aec80c71f..c95dec0b5 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -570,8 +570,14 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){ unset($_REQUEST['role_name']); } if (isset($_REQUEST['promote_id'])) { - $promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select(); - $promoter_ids ? $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null; + $queryStr = ''; + if ($_REQUEST['promote_id'] == 0) { + $map['promote_id'] = '0'; + } else { + $queryStr = "parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}"; + $promoter_ids = D("Promote")->where($queryStr)->field('id')->select(); + $promoter_ids ? $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null; + } } empty(I('user_account')) || $map['user_account'] = ['like',"%".I('user_account')."%"]; diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index 5bb75a9ad..a44d286fe 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -406,7 +406,7 @@ $(function(){ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = ''; // $.each(response.data, function(index, item){ // console.log(item.id); // str += ''; diff --git a/Application/Admin/View/RechargeSum/summation.html b/Application/Admin/View/RechargeSum/summation.html index 51ee0b684..585758b64 100644 --- a/Application/Admin/View/RechargeSum/summation.html +++ b/Application/Admin/View/RechargeSum/summation.html @@ -292,7 +292,7 @@ $(function(){ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ""; + str = ''; // $.each(response.data, function(index, item){ // console.log(item.id); // str += ''; diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index b160f7f19..5de823dd5 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -487,7 +487,7 @@ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ""; + str = ''; // $.each(response.data, function(index, item){ // console.log(item.id); // str += ''; diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index b5b65bc90..896e1ff41 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -101,7 +101,8 @@ 游戏区服 角色ID 角色名 - 游戏等级 + 游戏等级 + 所属推广员 最后登录时间 最后登录IP @@ -121,7 +122,8 @@ {$servername} {$data['role_id']} {$rolename} - {$data.role_level} + {$data.role_level} + {$data.promote_account} {$data.play_ip} @@ -246,7 +248,7 @@ $(".select_gallery").select2(); data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = ''; // $.each(response.data, function(index, item){ // console.log(item.id); // str += '';