From f8b93616cece026bf94398d03e10b51352e756ff Mon Sep 17 00:00:00 2001 From: liyang <316606755@qq.com> Date: Tue, 9 Mar 2021 20:58:18 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=B0=81=E8=A3=85?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/BaseController.class.php | 166 +++++++++++++++++- .../Controller/PromoteController.class.php | 1 + .../Home/View/default/Promote/edit_chlid.html | 13 ++ .../View/default/Public/promote_base.html | 33 +++- 4 files changed, 204 insertions(+), 9 deletions(-) diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 3705e3848..9261013fd 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -5,12 +5,12 @@ namespace Home\Controller; use Base\Service\PromoteCompanyService; use Think\Controller; use Base\Service\PromoteService; - class BaseController extends HomeController { protected $promotePermissions; protected $loginPromote = null; protected $canViewUserRecharge = true; + protected $isOpenQuery =true; protected $permControlUrls = [ 'Home/Query/recharge', @@ -58,6 +58,8 @@ class BaseController extends HomeController $this->assign("grand_id", $loginer['grand_id']); $this->assign('canViewUserRecharge', $this->canViewUserRecharge); + $this->assign("menus", $this->getMenus($loginer,$this->isOpenQuery,$this->canViewUserRecharge)); + $result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status'); if ($result['status'] == 1) { $this->assign('noapplysite', $result); @@ -431,4 +433,166 @@ class BaseController extends HomeController ->group('relation_game_id') ->select(); } + + function promote_is_active_class($promoteType) + { + return is_active_class( + ['Promote'], + ['children', 'addPromote', 'edit_chlid'], + function() use($promoteType) { + return $_GET["promote_type"] == $promoteType; + } + ); + } + /** + * 全部菜单 + * @return array[] + */ + function getMenus($loginer,$isOpenQuery,$canViewUserRecharge) + { + $menus =[ + [ + 'name' => '管理中心', + 'class'=>'prev_icon icon_guanli', + 'children'=>[ + ['name' => '部门长管理', 'url' => U('Promote/children', ['promote_type' => 0]), 'class'=>$this->promote_is_active_class(0),'perms'=>[ + 'level'=>[1] + ]], + ['name' => '组长管理', 'url' => U('Promote/children', ['promote_type' => 1]), 'class'=>$this->promote_is_active_class(1),'perms' => [ + 'level'=>[1,2,] + ]], + ['name' => '推广员管理', 'url' => U('Promote/children', ['promote_type' => 2]), 'class'=>$this->promote_is_active_class(2),'perms' => [ + 'level'=>[1,2,3] + ]] + ], + 'perms' => [ + 'level'=>[1,2,3], + ] + + ], + [ + 'name' => '数据管理', + 'class'=>'prev_icon icon_shujvi', + 'children'=>[ + ['name' => '每日概况', 'url' => U('Query/dailySummary'), 'class'=>is_active_class(['Query'], ['dailySummary']),], + ['name' => '数据汇总', 'url' => U('Query/summary'), 'class'=>is_active_class(['Query'], ['summary']),], + ['name' => '订单查询', 'url' => U('Query/recharge'), 'class'=>is_active_class(['Query'], ['recharge', 'viewSpendDetailed']),'perms' => [ + 'view-recharge'=>true + ]], + ['name' => '注册明细', 'url' => U('Query/register'), 'class'=>is_active_class(['Query'], ['register', 'viewRole']),], + ['name' => 'ARPU统计', 'url' => U('Query/arpu'), 'class'=>is_active_class(['Query'], ['arpu']),'perms' => [ + 'view-recharge'=>true + ]], + ['name' => '角色查询', 'url' => U('Query/userRoles'), 'class'=>is_active_class(['Query'], ['userRoles']),], + ['name' => '充值玩家', 'url' => U('Query/userRecharges'), 'class'=>is_active_class(['Query'], ['userRecharges']),'perms' => [ + 'view-recharge'=>true + ]], + ['name' => '团队/推广员业绩', 'url' => U('Query/achievement'), 'class'=>is_active_class(['Query'], ['achievement']),], + ['name' => 'IOS下载数统计', 'url' => U('Query/iosDownLoadData'), 'class'=>is_active_class(['Query'], ['iosDownLoadData']),], + ['name' => '用户留存率', 'url' => U('Query/userretention'), 'class'=>is_active_class(['Query'], ['userretention']),], + ['name' => '游戏分区数据汇总', 'url' => U('Query/gameData'), 'class'=>is_active_class(['Query'], ['gameData']),], + ], + 'perms' => [ + 'OpenQuery'=>$this->isOpenQuery, + ] + ], + [ + 'name' => '财务管理', + 'class'=>'prev_icon icon_caiwu', + 'children'=>[ + ['name' => '结算中心', 'url' => U('Finance/index'), 'class'=>is_active_class(['Finance'], ['index']),], + ['name' => '结算明细', 'url' => U('Finance/settlementDtl'), 'class'=>is_active_class(['Finance'], ['settlementDtl']),], + ['name' => '提现记录', 'url' => U('Finance/withdrawRecord'), 'class'=>is_active_class(['Finance'], ['withdrawRecord', 'withdrawDtl', 'settlementOrder']),],//// + ['name' => '公司结算', 'url' => U('Withdraw/index'), 'class'=>is_active_class(['Withdraw'], ['index', 'withdrawDetail', 'withdrawOrderDetail']),'perms' => [ + 'withdraw_show'=> 1 + ]]// + ], + 'perms' => [ + 'view-recharge'=>true, 'level'=>1 + ] + ], + [ + 'name' => '游戏管理', + 'class'=>'prev_icon icon_fenbao', + 'children'=>[ + ['name' => '专服管理', 'url' => U('Game/index'), 'class'=>is_active_class(['Game'], ['index']),], + ['name' => '混服管理', 'url' => U('Game/mix'), 'class'=>is_active_class(['Game'], ['mix']),], + ['name' => '分成比例', 'url' => U('GameDivide/index'), 'class'=>is_active_class(['GameDivide'], ['index']),], + ['name' => '设置', 'url' => U('Promote/setChildGamePermission'), 'class'=>is_active_class(['Promote'], ['setChildGamePermission']),],///// + ['name' => '资料专区', 'url' => U('Apply/feature'), 'class'=>is_active_class(['Apply'], ['feature']),] + ] + ], + [ + 'name' => '安全管理', + 'class'=>'prev_icon icon_fenbao', + 'children'=>[ + ['name' => '短信登录设置', 'url' => U('Safe/bindTel'), 'class'=>is_active_class(['Safe'], ['bindTel']),], + ['name' => '下载日志管理', 'url' => U('Download/listsIndex'), 'class'=>is_active_class(['Download'], ['listsIndex']),], + ['name' => '修改登录密码', 'url' => U('Safe/modifyloginpassword'), 'class'=>is_active_class(['Safe'], ['modifyloginpassword']),], + ['name' => '设置安全密码', 'url' => U('Safe/setSafeIndex'), 'class'=>is_active_class(['Safe'], ['setSafeIndex']),], + ['name' => '用户基本信息', 'url' => U('Safe/modifyBaseInfo'), 'class'=>is_active_class(['Safe'], ['modifyBaseInfo']),], + ['name' => '操作日志', 'url' => U('Safe/promoteLogs'), 'class'=>is_active_class(['Safe'], ['promoteLogs']),], + ] + ], + [ + 'name' => '测试资源', + 'class'=>'prev_icon icon_fenbao', + 'children'=>[ + ['name' => '测试资源申请', 'url' => U('TestingResource/index'), 'class'=>is_active_class(['TestingResource'], ['index']),], + ['name' => '测试资源申请记录', 'url' => U('TestingResource/batches'), 'class'=>is_active_class(['TestingResource'], ['batches']),], + ] + ], + [ + 'name' => '评级管理', + 'class'=>'prev_icon icon_fenbao', + 'children'=>[ + ['name' => '评级设定', 'url' => U('PromoteGrade/settings'), 'class'=>is_active_class(['PromoteGrade'], ['settings', 'setting']),], + ['name' => '>团队评级', 'url' => U('PromoteGrade/index'), 'class'=>is_active_class(['PromoteGrade'], ['index']),], + ] + ], + [ + 'name' => '平台币管理', + 'class'=>'prev_icon icon_fuli', + 'children'=>[ + ['name' => '我的平台币', 'url' => U('PromoteCoin/myCoin'), 'class'=>is_active_class(['PromoteCoin'], ['myCoin', 'coinRecord', 'coinRecordDesc']),], + ['name' => '平台币转移', 'url' => U('PromoteCoin/transferLogs'), 'class'=>is_active_class(['PromoteCoin'], ['shift', 'transferLogs']),], + ['name' => '平台币充值', 'url' => U('CoinOrder/order_list'), 'class'=>is_active_class(['CoinOrder'], ['order_list', 'order_add', 'order_detail']),], + ] + ], + [ + 'name' => '玩家管理', + 'class'=>'prev_icon icon_fuli', + 'children'=>[ + ['name' => '行为日志', 'url' => U('TestingResource/index'), 'class'=>is_active_class(['TestingResource'], ['index']),], + ] + ], + ]; + +// if ($loginer['level'] >= 4){ +// unset($menus[0]); +// } +// if ($loginer['level'] == 2){ +// unset($menus[0]['children'][0]); +// } +// if ($loginer['level'] == 3){ +// unset($menus[0]['children'][0]); +// unset($menus[0]['children'][1]); +// } + + foreach ($menus as $menu =>$v){ + if (isset($v['perms'])) + foreach ($v['children'] as $m){ + + } + } + + $permHandles = [ + 'level' => function($level, $levels) { + return in_array($level, $levels); + }, + 'view-recharge' => function ($canViewRecharge) { + reutrn $canViewRecharge; + } + ]; + } } diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index a7ce79580..f01709edb 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -1395,6 +1395,7 @@ class PromoteController extends BaseController $se['bank_account'] = $_REQUEST['bank_account']; $se['account_openin'] = $_REQUEST['account_openin']; $se['bank_area'] = $_REQUEST['s_province'] . ',' . $_REQUEST['s_city'] . ',' . $_REQUEST['s_county']; + $se['ts_over_manage'] = $_REQUEST['ts_over_manage']; $res = M("promote", "tab_")->where($map)->save($se); if ($res !== false) { diff --git a/Application/Home/View/default/Promote/edit_chlid.html b/Application/Home/View/default/Promote/edit_chlid.html index 86e011431..8943acbc3 100644 --- a/Application/Home/View/default/Promote/edit_chlid.html +++ b/Application/Home/View/default/Promote/edit_chlid.html @@ -79,6 +79,19 @@ + + 测试资源管理权限: + + + + + + + diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index b292b77dd..ca8a11d8f 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -37,10 +37,24 @@ - + –> - + <!––> @@ -231,6 +245,9 @@ $(this).next(".jsnavContent").slideToggle(300).siblings(".jsnavContent").slideUp(500); }); }); + var ts_over_manage = "" + + console.log(ts_over_manage); From 2f9a822583cc47079babfd02a3f052227a4e6988 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 18 Mar 2021 14:55:09 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E5=AD=90=E7=B3=BB?= =?UTF-8?q?=E7=BB=9Fbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementController.class.php | 5 +++-- .../Admin/View/CompanyStatement/editWmCpStatement.html | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 06eda5aeb..76426e10b 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -674,8 +674,9 @@ class CompanyStatementController extends ThinkController $real_statement_amount = number_format($v['platform_money']*(1-$v['promote_ratio']/100)*($v['ratio']/100)*(1-$v["fax_ratio"]/100),2,'.','');; - - $statement_info[$k]['other_amount'] = number_format($v["sum_money"] - $real_statement_amount,2,'.',''); + if (!$statement_info[$k]['other_amount']) { + $statement_info[$k]['other_amount'] = number_format($v["sum_money"] - $real_statement_amount,2,'.',''); + } $sum[$ckey]["ratio"] += $v["ratio"]; $sum[$ckey]["promote_ratio"] += $v["promote_ratio"]; diff --git a/Application/Admin/View/CompanyStatement/editWmCpStatement.html b/Application/Admin/View/CompanyStatement/editWmCpStatement.html index f3f315e64..fde41e5be 100644 --- a/Application/Admin/View/CompanyStatement/editWmCpStatement.html +++ b/Application/Admin/View/CompanyStatement/editWmCpStatement.html @@ -380,7 +380,7 @@ ${it.aggregate_money} {@if it.statement_type==0} - % + % % % @@ -546,16 +546,16 @@ var index = $(this).data("index"); var td = DATAOBJ.statement_info[index]; - if( $(this).attr("name") == "first_ratio"){ + if( $(this).attr("name") == "ratio"){ td['second_ratio'] = 100-val; } if( $(this).attr("name") == "second_ratio"){ - td['first_ratio'] = 100-val; + td['ratio'] = 100-val; } if(DATAOBJ.pay_type == 1){ //甲方收款 - var ratio = td['first_ratio']/100; + var ratio = td['ratio']/100; }else{ //乙方 var ratio = td['second_ratio']/100; From 68c873983bb0c0beeed65f7ca812e6d488f6efd8 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 19 Mar 2021 13:44:46 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E5=AD=90=E7=B3=BB=E7=BB=9F=E4=B8=8A?= =?UTF-8?q?=E6=B8=B8=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 32 +++++++++++-------- .../CompanyStatement/showCpStatementView.html | 32 ++++++++++++++++--- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 76426e10b..2d7b1c94b 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -642,18 +642,18 @@ class CompanyStatementController extends ThinkController ->select(); $use_data = [ - "01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"],"row"=>1], - "02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"],"row"=>1], - "03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"],"row"=>1], - "04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"],"row"=>1], - "05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"],"row"=>1], - "06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"],"row"=>1], - "07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"],"row"=>1], - "08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"],"row"=>1], - "09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"],"row"=>1], - "10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"],"row"=>1], - "11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"],"row"=>1], - "12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"],"row"=>1], + "01"=>["time"=>"01","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.01.01','statement_end_time'=>$time.'.01.'.date('t',strtotime($time.'01'))]]], + "02"=>["time"=>"02","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.02.01','statement_end_time'=>$time.'.02.'.date('t',strtotime($time.'02'))]]], + "03"=>["time"=>"03","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.03.01','statement_end_time'=>$time.'.03.'.date('t',strtotime($time.'03'))]]], + "04"=>["time"=>"04","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.04.01','statement_end_time'=>$time.'.04.'.date('t',strtotime($time.'04'))]]], + "05"=>["time"=>"05","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.05.01','statement_end_time'=>$time.'.05.'.date('t',strtotime($time.'05'))]]], + "06"=>["time"=>"06","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.06.01','statement_end_time'=>$time.'.06.'.date('t',strtotime($time.'06'))]]], + "07"=>["time"=>"07","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.07.01','statement_end_time'=>$time.'.07.'.date('t',strtotime($time.'07'))]]], + "08"=>["time"=>"08","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.08.01','statement_end_time'=>$time.'.08.'.date('t',strtotime($time.'08'))]]], + "09"=>["time"=>"09","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.09.01','statement_end_time'=>$time.'.09.'.date('t',strtotime($time.'09'))]]], + "10"=>["time"=>"10","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.10.01','statement_end_time'=>$time.'.10.'.date('t',strtotime($time.'10'))]]], + "11"=>["time"=>"11","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.11.01','statement_end_time'=>$time.'.11.'.date('t',strtotime($time.'11'))]]], + "12"=>["time"=>"12","show_company_name"=>$data[0]["company_name"],"row"=>1,"withdraw_type"=>$data[0]["withdraw_type"],"statement_info"=>[['statement_begin_time'=>$time.'.12.01','statement_end_time'=>$time.'.12.'.date('t',strtotime($time.'12'))]]], ]; $row = 0; @@ -719,10 +719,14 @@ class CompanyStatementController extends ThinkController $assign_data[] = array_values($use_data); } - +// dump($assign_data); foreach ($assign_data as $key => $value) { foreach ($value as $k => $v) { - $assign_data[$key][$k]["row"] = count($v["statement_info"])?count($v["statement_info"]):1; + if (count($v["statement_info"]) > 1) { + unset($assign_data[$key][$k]['statement_info'][0]); + $assign_data[$key][$k]['statement_info'] = array_values($assign_data[$key][$k]['statement_info']); + } + $assign_data[$key][$k]["row"] = count($assign_data[$key][$k]["statement_info"])?count($assign_data[$key][$k]["statement_info"]):1; } } diff --git a/Application/Admin/View/CompanyStatement/showCpStatementView.html b/Application/Admin/View/CompanyStatement/showCpStatementView.html index bab81c5f0..505fef986 100644 --- a/Application/Admin/View/CompanyStatement/showCpStatementView.html +++ b/Application/Admin/View/CompanyStatement/showCpStatementView.html @@ -126,9 +126,16 @@ {$datas['show_company_name']} - {$time}年{$datas["time"]}月 + + {$time}年{$datas["time"]}月 + - {$datas['statement_info'][0]['game_name']|default="--"}({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']}) + + + {$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']} + + + {$datas['statement_info'][0]['game_name']|default="--"} -- -- -- @@ -138,7 +145,12 @@ -- -{$datas['statement_info'][0]['sum_money']|default="--"} - {$datas['statement_info'][0]['game_name']|default="--"}({$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']}) + + + {$datas['statement_info'][0]['statement_begin_time']}-{$datas['statement_info'][0]['statement_end_time']} + + + {$datas['statement_info'][0]['game_name']|default="--"} {$datas['statement_info'][0]['platform_money']|default="--"} {$datas['statement_info'][0]['aggregate_money']|default="--"} {$datas['statement_info'][0]['sum_amount']|default="--"} @@ -154,7 +166,12 @@ - {$statement_info['game_name']|default="--"}({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']}) + + + {$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']} + + + {$statement_info['game_name']|default="--"} -- -- -- @@ -165,7 +182,12 @@ -{$statement_info['sum_money']|default="--"} - {$statement_info['game_name']|default="--"}({$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']}) + + + {$statement_info['statement_begin_time']}-{$statement_info['statement_end_time']} + + + {$statement_info['game_name']|default="--"} {$statement_info['platform_money']|default="--"} {$statement_info['aggregate_money']|default="--"} {$statement_info['sum_amount']|default="--"} From a45775039000caa1e58ccb7120cdad77219a4f7a Mon Sep 17 00:00:00 2001 From: liyang <316606755@qq.com> Date: Fri, 19 Mar 2021 14:46:21 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E3=80=81=E9=A2=9D=E5=A4=96=E9=A2=9D=E5=BA=A6=E3=80=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=B5=84=E6=BA=90=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestingResourceController.class.php | 8 + .../Home/Controller/BaseController.class.php | 162 ----------- .../Controller/DownloadController.class.php | 6 + .../Controller/PromoteController.class.php | 3 +- .../Home/Controller/QueryController.class.php | 5 +- .../View/default/Public/promote_base.html | 263 +++++++++--------- .../Home/View/default/Query/userRoles.html | 5 + 7 files changed, 152 insertions(+), 300 deletions(-) diff --git a/Application/Admin/Controller/TestingResourceController.class.php b/Application/Admin/Controller/TestingResourceController.class.php index 882a80204..2f73776f3 100644 --- a/Application/Admin/Controller/TestingResourceController.class.php +++ b/Application/Admin/Controller/TestingResourceController.class.php @@ -574,6 +574,14 @@ class TestingResourceController extends ThinkController $otherQuota = I('other_quota', 0); $otherQuotaRemark = I('otherQuotaRemark', ''); M('user_play_info', 'tab_')->where(['id' => $id])->save(['testing_other_quota' => $otherQuota,'testing_other_quota_remark' => $otherQuotaRemark]); + $admin_account = $_SESSION['onethink_admin']['user_auth']['username']; + $otherQuotaRemark = !empty($otherQuotaRemark) ? $otherQuotaRemark : '无'; + addOperationLog(array( + "op_type"=>1, + 'op_name'=>'修改额外额度记录', + "key"=>'/'.$admin_account.'修改了额外额度'.$otherQuota.',备注信息为'.$otherQuotaRemark.'/', + "url"=>U("TestingResource/index") + )); return $this->ajaxReturn(['status' => 1, 'message' => '设置成功']); } diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 9261013fd..a63a06a89 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -58,7 +58,6 @@ class BaseController extends HomeController $this->assign("grand_id", $loginer['grand_id']); $this->assign('canViewUserRecharge', $this->canViewUserRecharge); - $this->assign("menus", $this->getMenus($loginer,$this->isOpenQuery,$this->canViewUserRecharge)); $result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status'); if ($result['status'] == 1) { @@ -434,165 +433,4 @@ class BaseController extends HomeController ->select(); } - function promote_is_active_class($promoteType) - { - return is_active_class( - ['Promote'], - ['children', 'addPromote', 'edit_chlid'], - function() use($promoteType) { - return $_GET["promote_type"] == $promoteType; - } - ); - } - /** - * 全部菜单 - * @return array[] - */ - function getMenus($loginer,$isOpenQuery,$canViewUserRecharge) - { - $menus =[ - [ - 'name' => '管理中心', - 'class'=>'prev_icon icon_guanli', - 'children'=>[ - ['name' => '部门长管理', 'url' => U('Promote/children', ['promote_type' => 0]), 'class'=>$this->promote_is_active_class(0),'perms'=>[ - 'level'=>[1] - ]], - ['name' => '组长管理', 'url' => U('Promote/children', ['promote_type' => 1]), 'class'=>$this->promote_is_active_class(1),'perms' => [ - 'level'=>[1,2,] - ]], - ['name' => '推广员管理', 'url' => U('Promote/children', ['promote_type' => 2]), 'class'=>$this->promote_is_active_class(2),'perms' => [ - 'level'=>[1,2,3] - ]] - ], - 'perms' => [ - 'level'=>[1,2,3], - ] - - ], - [ - 'name' => '数据管理', - 'class'=>'prev_icon icon_shujvi', - 'children'=>[ - ['name' => '每日概况', 'url' => U('Query/dailySummary'), 'class'=>is_active_class(['Query'], ['dailySummary']),], - ['name' => '数据汇总', 'url' => U('Query/summary'), 'class'=>is_active_class(['Query'], ['summary']),], - ['name' => '订单查询', 'url' => U('Query/recharge'), 'class'=>is_active_class(['Query'], ['recharge', 'viewSpendDetailed']),'perms' => [ - 'view-recharge'=>true - ]], - ['name' => '注册明细', 'url' => U('Query/register'), 'class'=>is_active_class(['Query'], ['register', 'viewRole']),], - ['name' => 'ARPU统计', 'url' => U('Query/arpu'), 'class'=>is_active_class(['Query'], ['arpu']),'perms' => [ - 'view-recharge'=>true - ]], - ['name' => '角色查询', 'url' => U('Query/userRoles'), 'class'=>is_active_class(['Query'], ['userRoles']),], - ['name' => '充值玩家', 'url' => U('Query/userRecharges'), 'class'=>is_active_class(['Query'], ['userRecharges']),'perms' => [ - 'view-recharge'=>true - ]], - ['name' => '团队/推广员业绩', 'url' => U('Query/achievement'), 'class'=>is_active_class(['Query'], ['achievement']),], - ['name' => 'IOS下载数统计', 'url' => U('Query/iosDownLoadData'), 'class'=>is_active_class(['Query'], ['iosDownLoadData']),], - ['name' => '用户留存率', 'url' => U('Query/userretention'), 'class'=>is_active_class(['Query'], ['userretention']),], - ['name' => '游戏分区数据汇总', 'url' => U('Query/gameData'), 'class'=>is_active_class(['Query'], ['gameData']),], - ], - 'perms' => [ - 'OpenQuery'=>$this->isOpenQuery, - ] - ], - [ - 'name' => '财务管理', - 'class'=>'prev_icon icon_caiwu', - 'children'=>[ - ['name' => '结算中心', 'url' => U('Finance/index'), 'class'=>is_active_class(['Finance'], ['index']),], - ['name' => '结算明细', 'url' => U('Finance/settlementDtl'), 'class'=>is_active_class(['Finance'], ['settlementDtl']),], - ['name' => '提现记录', 'url' => U('Finance/withdrawRecord'), 'class'=>is_active_class(['Finance'], ['withdrawRecord', 'withdrawDtl', 'settlementOrder']),],//// - ['name' => '公司结算', 'url' => U('Withdraw/index'), 'class'=>is_active_class(['Withdraw'], ['index', 'withdrawDetail', 'withdrawOrderDetail']),'perms' => [ - 'withdraw_show'=> 1 - ]]// - ], - 'perms' => [ - 'view-recharge'=>true, 'level'=>1 - ] - ], - [ - 'name' => '游戏管理', - 'class'=>'prev_icon icon_fenbao', - 'children'=>[ - ['name' => '专服管理', 'url' => U('Game/index'), 'class'=>is_active_class(['Game'], ['index']),], - ['name' => '混服管理', 'url' => U('Game/mix'), 'class'=>is_active_class(['Game'], ['mix']),], - ['name' => '分成比例', 'url' => U('GameDivide/index'), 'class'=>is_active_class(['GameDivide'], ['index']),], - ['name' => '设置', 'url' => U('Promote/setChildGamePermission'), 'class'=>is_active_class(['Promote'], ['setChildGamePermission']),],///// - ['name' => '资料专区', 'url' => U('Apply/feature'), 'class'=>is_active_class(['Apply'], ['feature']),] - ] - ], - [ - 'name' => '安全管理', - 'class'=>'prev_icon icon_fenbao', - 'children'=>[ - ['name' => '短信登录设置', 'url' => U('Safe/bindTel'), 'class'=>is_active_class(['Safe'], ['bindTel']),], - ['name' => '下载日志管理', 'url' => U('Download/listsIndex'), 'class'=>is_active_class(['Download'], ['listsIndex']),], - ['name' => '修改登录密码', 'url' => U('Safe/modifyloginpassword'), 'class'=>is_active_class(['Safe'], ['modifyloginpassword']),], - ['name' => '设置安全密码', 'url' => U('Safe/setSafeIndex'), 'class'=>is_active_class(['Safe'], ['setSafeIndex']),], - ['name' => '用户基本信息', 'url' => U('Safe/modifyBaseInfo'), 'class'=>is_active_class(['Safe'], ['modifyBaseInfo']),], - ['name' => '操作日志', 'url' => U('Safe/promoteLogs'), 'class'=>is_active_class(['Safe'], ['promoteLogs']),], - ] - ], - [ - 'name' => '测试资源', - 'class'=>'prev_icon icon_fenbao', - 'children'=>[ - ['name' => '测试资源申请', 'url' => U('TestingResource/index'), 'class'=>is_active_class(['TestingResource'], ['index']),], - ['name' => '测试资源申请记录', 'url' => U('TestingResource/batches'), 'class'=>is_active_class(['TestingResource'], ['batches']),], - ] - ], - [ - 'name' => '评级管理', - 'class'=>'prev_icon icon_fenbao', - 'children'=>[ - ['name' => '评级设定', 'url' => U('PromoteGrade/settings'), 'class'=>is_active_class(['PromoteGrade'], ['settings', 'setting']),], - ['name' => '>团队评级', 'url' => U('PromoteGrade/index'), 'class'=>is_active_class(['PromoteGrade'], ['index']),], - ] - ], - [ - 'name' => '平台币管理', - 'class'=>'prev_icon icon_fuli', - 'children'=>[ - ['name' => '我的平台币', 'url' => U('PromoteCoin/myCoin'), 'class'=>is_active_class(['PromoteCoin'], ['myCoin', 'coinRecord', 'coinRecordDesc']),], - ['name' => '平台币转移', 'url' => U('PromoteCoin/transferLogs'), 'class'=>is_active_class(['PromoteCoin'], ['shift', 'transferLogs']),], - ['name' => '平台币充值', 'url' => U('CoinOrder/order_list'), 'class'=>is_active_class(['CoinOrder'], ['order_list', 'order_add', 'order_detail']),], - ] - ], - [ - 'name' => '玩家管理', - 'class'=>'prev_icon icon_fuli', - 'children'=>[ - ['name' => '行为日志', 'url' => U('TestingResource/index'), 'class'=>is_active_class(['TestingResource'], ['index']),], - ] - ], - ]; - -// if ($loginer['level'] >= 4){ -// unset($menus[0]); -// } -// if ($loginer['level'] == 2){ -// unset($menus[0]['children'][0]); -// } -// if ($loginer['level'] == 3){ -// unset($menus[0]['children'][0]); -// unset($menus[0]['children'][1]); -// } - - foreach ($menus as $menu =>$v){ - if (isset($v['perms'])) - foreach ($v['children'] as $m){ - - } - } - - $permHandles = [ - 'level' => function($level, $levels) { - return in_array($level, $levels); - }, - 'view-recharge' => function ($canViewRecharge) { - reutrn $canViewRecharge; - } - ]; - } } diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 3bec61a7b..8d6e55026 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2002,6 +2002,7 @@ class DownloadController extends BaseController $serverId = I('server_id', 0); $isSelf = I('is_self', 0); $roleName = I('role_name', ''); + $roleId = I('role_id', ''); $userAccount = I('user_account', ''); $promoteId = I('promote_id', 0); $sdkVersion = I('sdk_version', 0); @@ -2036,6 +2037,9 @@ class DownloadController extends BaseController if ($roleName != '') { $map['role_name'] = ['like', '%' . $roleName . '%']; } + if ($roleId != '') { + $map['role_id'] = $roleId; + } if ($userAccount != '') { $map['user_account'] = ['like', '%' . $userAccount . '%']; } @@ -3120,6 +3124,7 @@ public function iosDetailExcelInfo($id,$map) { array('device_number','设备码'), array('register_time','注册时间'), array('register_ip','注册IP'), + array('role_id','角色ID'), array('login_time','最近登录时间'), array('login_ip','最近登录IP'), @@ -3144,6 +3149,7 @@ public function iosDetailExcelInfo($id,$map) { 'role.server_name', 'role.sdk_version', 'role.role_name', + 'role.role_id', 'role.role_level', 'role.create_time', 'role.play_time', diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index f01709edb..c54ea9248 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -1352,7 +1352,7 @@ class PromoteController extends BaseController // if (!preg_match($pattern, $_REQUEST['email'])) { // $this->error('您输入的电子邮箱地址不合法', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0)))); // }; - + $_POST['ts_over_apply'] = $_POST['ts_over_manage']; $user = new PromoteApi(); $res = $user->edit($_POST); @@ -1395,7 +1395,6 @@ class PromoteController extends BaseController $se['bank_account'] = $_REQUEST['bank_account']; $se['account_openin'] = $_REQUEST['account_openin']; $se['bank_area'] = $_REQUEST['s_province'] . ',' . $_REQUEST['s_city'] . ',' . $_REQUEST['s_county']; - $se['ts_over_manage'] = $_REQUEST['ts_over_manage']; $res = M("promote", "tab_")->where($map)->save($se); if ($res !== false) { diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 583974407..7894fbc41 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1705,6 +1705,7 @@ class QueryController extends BaseController $serverId = I('server_id', 0); $isSelf = I('is_self', 0); $roleName = I('role_name', ''); + $roleId = I('role_id', ''); $userAccount = I('user_account', ''); $promoteId = I('promote_id', 0); $sdkVersion = I('sdk_version', 0); @@ -1736,6 +1737,8 @@ class QueryController extends BaseController } if ($roleName != '') { $map['role_name'] = ['like', '%' . $roleName . '%']; + }if ($roleId != '') { + $map['role_id'] = $roleId; } if ($userAccount != '') { $map['user_account'] = ['like', '%' . $userAccount . '%']; @@ -1792,12 +1795,12 @@ class QueryController extends BaseController 'role.server_name', 'role.sdk_version', 'role.role_name', + 'role.role_id', 'role.role_level', 'role.create_time', 'role.play_time', 'role.play_ip' ]; - $query = M('user_play_info', 'tab_') ->field($columns) ->alias('role') diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index ca8a11d8f..eec420a4b 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -37,149 +37,145 @@ - - - - - - - - - - - - <!– - + + + + - –> + 我的平台币 + 平台币转移 + + 平台币充值 + + - <!––> - - - - - - - --> + + + + + + @@ -245,9 +241,6 @@ $(this).next(".jsnavContent").slideToggle(300).siblings(".jsnavContent").slideUp(500); }); }); - var ts_over_manage = "" - - console.log(ts_over_manage); diff --git a/Application/Home/View/default/Query/userRoles.html b/Application/Home/View/default/Query/userRoles.html index ecb8c5b46..31f4a578a 100644 --- a/Application/Home/View/default/Query/userRoles.html +++ b/Application/Home/View/default/Query/userRoles.html @@ -74,6 +74,9 @@ +
+ +
@@ -115,6 +118,7 @@ 注册IP + 角色ID 最近登录时间 @@ -166,6 +170,7 @@ {$record.device_number} {$record.register_time} {$record.register_ip} + {$record.role_id} {$record.login_time} {$record.login_ip} From 5cd8ca285758bd4d913b2e76cad2396db9a37736 Mon Sep 17 00:00:00 2001 From: liyang <316606755@qq.com> Date: Fri, 19 Mar 2021 14:53:25 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E3=80=81=E9=A2=9D=E5=A4=96=E9=A2=9D=E5=A4=96=E3=80=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=B5=84=E6=BA=90=E6=9D=83=E9=99=90=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/BaseController.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index a63a06a89..4817777a8 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -5,12 +5,13 @@ namespace Home\Controller; use Base\Service\PromoteCompanyService; use Think\Controller; use Base\Service\PromoteService; + class BaseController extends HomeController { protected $promotePermissions; protected $loginPromote = null; protected $canViewUserRecharge = true; - protected $isOpenQuery =true; + protected $permControlUrls = [ 'Home/Query/recharge', @@ -58,7 +59,6 @@ class BaseController extends HomeController $this->assign("grand_id", $loginer['grand_id']); $this->assign('canViewUserRecharge', $this->canViewUserRecharge); - $result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status'); if ($result['status'] == 1) { $this->assign('noapplysite', $result); @@ -432,5 +432,4 @@ class BaseController extends HomeController ->group('relation_game_id') ->select(); } - } From 7c60d8321b49cf97cc53ba290155502af34d6484 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 19 Mar 2021 15:31:53 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=B8=9A=E7=BB=A9bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MarketPercentageController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index fdd4be162..870914382 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -828,17 +828,17 @@ class MarketPercentageController extends ThinkController $value['company_profit'] = "0.00"; } // - $data[$key]['should_performance_commission'] = substr(number_format($value["performance_commission"] * ($market_percentage["performance_monthly_ratio"]/100), 4, '.', ''),0,-2)+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']; - $data[$key]['should_month_bonus_ratio'] = substr(number_format($value["achievement_bonus"] * ($market_percentage["month_bonus_ratio"]/100), 4, '.', ''),0,-2) + $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; + $data[$key]['should_performance_commission'] = number_format($value["performance_commission"] * ($market_percentage["performance_monthly_ratio"]/100), 2, '.', '')+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']; $data[$key]['extend_commission'] += $this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; + $data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'], 2, '.', ''); + $data[$key]['should_month_bonus_ratio'] = $data[$key]['extend_commission'] - $data[$key]['should_performance_commission']; // dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']); // dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']); // $data[$key]['wait_commission'] += $this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; - $data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'], 2, '.', ''); $data[$key]['wait_commission'] = number_format($data[$key]['wait_commission'], 2, '.', ''); $data[$key]['achievement_bonus'] = $achievement_bonus; From c06b954bf7d03c5d2bb3645bc78ae875319fbe74 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 19 Mar 2021 15:48:27 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=B8=9A=E7=BB=A9bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MarketPercentageController.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index 870914382..c5f704f60 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -839,8 +839,12 @@ class MarketPercentageController extends ThinkController // $data[$key]['wait_commission'] += $this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']+$this->returnWaitMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']; + $data[$key]['wait_commission'] = number_format($data[$key]['wait_commission'], 2, '.', ''); + + $data[$key]['wait_performance_commission'] = $data[$key]['wait_commission'] - $data[$key]['wait_achievement_commission']; + $data[$key]['achievement_bonus'] = $achievement_bonus; $sum['performance_revenue'] += $data[$key]['performance_revenue']; From 22b17c50103403394eeebbd5e3ca523ffef16066 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 19 Mar 2021 15:55:36 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E4=B8=9A=E7=BB=A9?= =?UTF-8?q?=E7=B3=BB=E7=BB=9Fbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MarketPercentageController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index c5f704f60..0c161cba5 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -843,7 +843,7 @@ class MarketPercentageController extends ThinkController $data[$key]['wait_commission'] = number_format($data[$key]['wait_commission'], 2, '.', ''); - $data[$key]['wait_performance_commission'] = $data[$key]['wait_commission'] - $data[$key]['wait_achievement_commission']; + $data[$key]['wait_achievement_commission'] = $data[$key]['wait_commission'] - $data[$key]['wait_performance_commission']; $data[$key]['achievement_bonus'] = $achievement_bonus; From d7f13aad934199e8f43239e382ccfa7b661afa33 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 19 Mar 2021 16:51:54 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=8A=9F=E8=83=BD=E8=B4=9F=E6=95=B0=E5=8F=AF=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/CompanyStatement/editWmCpStatement.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/CompanyStatement/editWmCpStatement.html b/Application/Admin/View/CompanyStatement/editWmCpStatement.html index fde41e5be..e292a9d01 100644 --- a/Application/Admin/View/CompanyStatement/editWmCpStatement.html +++ b/Application/Admin/View/CompanyStatement/editWmCpStatement.html @@ -529,7 +529,13 @@ var type = $(this).attr("name"); - if(!CHECK.number.test(val)){ + if(!CHECK.number.test(val)&&type!='other_amount'&&type!="sum_money"){ + layer.msg('结算单中的罚款和税率必须是数字,且不能为空'); + dom.val(vdata); + return false; + } + + if(!CHECK.othernumber.test(val)&&(type=='other_amount'||type=="sum_money")){ layer.msg('结算单中的罚款和税率必须是数字,且不能为空'); dom.val(vdata); return false; @@ -580,6 +586,7 @@ } var CHECK = { number: /^\d+(\.{1}\d+)?$/, + othernumber: /^\-?\d+(\.{1}\d+)?$/, mobile: /^1[3456789]\d{9}$/, BankNo: /^([1-9]{1})\d{10,19}$/, money: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/ From 42a8fc94f769f9353fea2e6f4b4d5dff68fa4cfb Mon Sep 17 00:00:00 2001 From: liyang <316606755@qq.com> Date: Fri, 19 Mar 2021 18:32:19 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2-?= =?UTF-8?q?=E6=9C=AC=E6=8E=A8=E5=B9=BF=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 7894fbc41..189f23544 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1764,9 +1764,11 @@ class QueryController extends BaseController $map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]]; } if ($isSelf) { - $map['promote_id'] = $queryPromote['id']; + $map['role.promote_id'] = $queryPromote['id']; } + + $orderBy = 'create_time desc'; $sortNameData = ['login_time', 'create_time', 'role_level', 'register_time', 'role.promote_account']; if (!empty($sortName)) { @@ -1812,11 +1814,14 @@ class QueryController extends BaseController list($records, $pagination, $count) = $this->paginate($query->order($orderBy)); $countRow = $countQuery->field(['count(distinct user_id) user_count'])->find(); - + $subSql = M('user', 'tab_')->field('id')->where(['is_repeat' => 0])->select(false); $map['_string'] = str_replace('role.promote_id', 'promote_id', $map['_string']) . ' and user_id in (' . $subSql . ')'; + $map['promote_id'] = $map['role.promote_id']; + unset($map['role.promote_id']); $uniqueCountRow = M('user_play_info', 'tab_')->field(['count(distinct user_id) user_count, count(*) count'])->where($map)->find(); + /* $users = []; if (count($records) > 0) { $userIds = array_column($records, 'user_id'); From f69b0ddf14a8f039d621c4d5350b22ec982cb73c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 22 Mar 2021 09:16:26 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SocietyInfoController.class.php | 31 +++++++++++-- Application/Admin/View/SocietyInfo/lists.html | 43 ++++++++++++++++++- 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/SocietyInfoController.class.php b/Application/Admin/Controller/SocietyInfoController.class.php index 4423d2a57..624f38e71 100644 --- a/Application/Admin/Controller/SocietyInfoController.class.php +++ b/Application/Admin/Controller/SocietyInfoController.class.php @@ -71,14 +71,37 @@ class SocietyInfoController extends ThinkController $map['communication_time'] = array('elt', time() - $gap * 86400); } if (I('sociaty_level') && I('sociaty_level') != '0') $map['sociaty_level'] = I('sociaty_level'); + //获取分页数据 $query = $model->where($map)->order("communication_time desc"); $count = $query->count(); + + $order_query = $query + ->where($map); + + if (I('data_order')) { + $data_order = reset(explode(',', $_REQUEST['data_order'])); + $data_order_type = end(explode(',', $_REQUEST['data_order'])); + + if ($data_order == 4 && $data_order_type == "create_time") { + $order_query = $order_query->order("create_time desc"); + } else if($data_order == 3 && $data_order_type == "create_time") { + $order_query = $order_query->order("create_time asc"); + } + + if ($data_order == 4 && $data_order_type == "communication_time") { + $order_query = $order_query->order("communication_time desc"); + } else if($data_order == 3 && $data_order_type == "communication_time") { + $order_query = $order_query->order("communication_time asc"); + } + + $this->assign('userarpu_order', $data_order); + $this->assign('userarpu_order_type', $data_order_type); + } + if($is_export){ $map['id'] = ['in',$_REQUEST['ids']]; - $parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account") - ->where($map) - ->order("communication_time desc") + $parseData = $order_query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account") ->select(); foreach ($parseData as &$v) { $v['sociaty_level'] = $this->level[$v['sociaty_level']]; @@ -96,7 +119,7 @@ class SocietyInfoController extends ThinkController $this->export($head, $parseData, "公会信息-".date('Ymd')); return ; } else { - $societyInfos = $model->where($map)->order("communication_time desc")->field("*")->page($page,$row)->select(); + $societyInfos = $order_query->page($page,$row)->field("*")->select(); // dump($societyInfos);die(); } diff --git a/Application/Admin/View/SocietyInfo/lists.html b/Application/Admin/View/SocietyInfo/lists.html index 29495cd47..60652ab17 100644 --- a/Application/Admin/View/SocietyInfo/lists.html +++ b/Application/Admin/View/SocietyInfo/lists.html @@ -89,6 +89,8 @@  
+ + @@ -165,8 +167,28 @@ 是否为意向客户 备注信息 对接人 - 录入时间 - 最后沟通时间 + + + + 录入时间▲ + + 录入时间▼ + 录入时间 + + + + + + + 最后沟通时间▲ + + 最后沟通时间▼ + 最后沟通时间 + + + 操作 @@ -429,6 +451,23 @@ return false; }); + $(".paixu").click(function () { + var that = $(this); + $data_order = that.attr('data-order'); + $order_type = '{$userarpu_order}'; + if ($order_type == '' || $order_type == '4') { + $(".sortBy").attr('name', 'data_order'); + val = '3,' + $data_order; + $(".sortBy").attr('value', val); + $("#search").click(); + } else if ($order_type == '3') { + $(".sortBy").attr('name', 'data_order'); + val = '4,' + $data_order; + $(".sortBy").attr('value', val); + $("#search").click(); + } + }); + $("#excel_back").click(function () { $(".search_list").show(); $(".excel_list").hide(); From 97fae33c433ddfdd8e25efbf121be8f0b293c7d9 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 22 Mar 2021 09:23:15 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/SocietyInfoController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/SocietyInfoController.class.php b/Application/Admin/Controller/SocietyInfoController.class.php index 624f38e71..a1167be06 100644 --- a/Application/Admin/Controller/SocietyInfoController.class.php +++ b/Application/Admin/Controller/SocietyInfoController.class.php @@ -75,7 +75,9 @@ class SocietyInfoController extends ThinkController //获取分页数据 $query = $model->where($map)->order("communication_time desc"); $count = $query->count(); - + if($_REQUEST['ids'] && $is_export) { + $map['id'] = ['in',$_REQUEST['ids']]; + } $order_query = $query ->where($map); From da588a3d86d5f24d98e1150863f0a71befcff062 Mon Sep 17 00:00:00 2001 From: liyang <316606755@qq.com> Date: Mon, 22 Mar 2021 10:51:30 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 2 +- Application/Home/View/default/TestingResource/batches.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 189f23544..ec413f8b3 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1844,7 +1844,7 @@ class QueryController extends BaseController $hideChar .= '*'; } - if($record['create_time'] == 0) { + if($records[$key]['create_time'] == 0) { $records[$key]['create_time'] = date('Y-m-d', $value['play_time']) . '
' . date('H:i:s', $value['play_time']); } else { $records[$key]['create_time'] = date('Y-m-d', $value['create_time']) . '
' . date('H:i:s', $value['create_time']); diff --git a/Application/Home/View/default/TestingResource/batches.html b/Application/Home/View/default/TestingResource/batches.html index 919674553..2578afd3a 100644 --- a/Application/Home/View/default/TestingResource/batches.html +++ b/Application/Home/View/default/TestingResource/batches.html @@ -84,7 +84,7 @@ +
@@ -535,48 +535,17 @@ body { $('#verify-quota').html(verifyQuota) $('#quota').html(quota-verifyQuota) } - $('#test_account').on({ - blur: function() { - var gameId = $('#game-select').val() - if (gameId == 0) { - return layer.msg('请选择游戏') - } - var serverId = $('#server-select').val() - if (serverId == 0) { - return layer.msg('请选择区服') - } - var userAccount = $('#test_account').val() - if (userAccount == '') { - return layer.msg('请输入测试资源账号') - } - getUserRoles(userAccount, gameId, serverId, function(roles, isTestingAccount) { - if (roles.length == 0) { - return layer.msg('当前账号在该区服未创建角色') - } - if (!isTestingAccount) { - return layer.msg('此账号非测试账号') - } - var html = ""; - for (var i in roles){ - html += "" - } - $("#role-select").html(html); - $("#role-select").select2(); - }) - } - }) - function getUserRoles(userAccount, gameId, serverId, callback) { + function getUserRoles(bindRoleId, gameId, callback) { $.ajax({ url: "{:U('getUserRoles')}", type: "post", - data: { user_account: userAccount, game_id: gameId, server_id: serverId }, + data: { role_id: bindRoleId, game_id: gameId }, dataType: 'json', success: function(result){ if (result.status == 1) { var roles = result.data.roles - var isTestingAccount = result.data.is_testing_account - callback(roles, isTestingAccount) + callback(roles) } else { layer.msg(result.message) } @@ -584,7 +553,7 @@ body { }) } - $('#bind_account').on({ + $('#bind_role_id').on({ blur: function () { var gameId = $('#game-select').val() if (gameId == 0) { @@ -594,16 +563,13 @@ body { if (serverId == 0) { return layer.msg('请选择区服') } - var userAccount = $('#bind_account').val() - if (userAccount == '') { - return layer.msg('请输入玩家账号') + var bindRoleId = $('#bind_role_id').val() + if (bindRoleId == '') { + return layer.msg('请输入角色ID') } - getUserRoles(userAccount, gameId, serverId, function(roles, isTestingAccount) { + getUserRoles(bindRoleId, gameId, function(roles) { if (roles.length == 0) { - return layer.msg('玩家账号在该区服未创建角色') - } - if (isTestingAccount) { - return layer.msg('此账号为测试账号,无法绑定') + return layer.msg('未查询到角色') } var html = ""; for (var i in roles){ diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index c4821b93e..a10ab1221 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -2,6 +2,7 @@ namespace Base\Repository; +use Base\Service\GameService; use Base\Tool\Registry; use Base\Service\PromoteService; @@ -222,7 +223,7 @@ class TestingResourceRepository 'provide_status' => $batch['provide_status'], 'provide_status_text' => $this->getProvideStatusText($batch['provide_status']), 'provide_time' => $batch['provide_time'] == 0 ? '--' : date('Y-m-d H:i:s', $batch['provide_time']), - 'content' => $content, + 'content' => '', ]; } return $records; @@ -317,6 +318,7 @@ class TestingResourceRepository foreach ($roles as $role) { $bindingOrWhere[] = '(role_id="' . $role['role_id'] . '" and game_id=' . $role['game_id'] . ')'; } + $bindingOrWhereStr = '(' . implode(' or ', $bindingOrWhere) . ')'; $userIds = array_unique(array_column($roles, 'user_id')); $users = []; @@ -325,15 +327,30 @@ class TestingResourceRepository $applyRecords = []; $testingUsers = []; if (count($roles) > 0) { + $games = M('game', 'tab_')->field(['id', 'data_share'])->where(['id' => ['in', array_column($roles, 'game_id')]])->select(); + $games = index_by_column('id', $games); + + $gameRepository = new GameRepository(); + $baseGames = $gameRepository->getBaseGames(); + $testingUsers = M('testing_user', 'tab_')->where(['user_id' => ['in', $userIds]])->select(); $testingUsers = index_by_column('user_id', $testingUsers); $users = M('user', 'tab_')->field(['id', 'phone', 'lock_status'])->where(['id' => ['in', $userIds]])->select(); $users = index_by_column('id', $users); - $bindingRows = M('testing_binding', 'tab_')->where(['_string' => implode(' or ', $bindingOrWhere)])->select(); + $bindingRows = M('testing_binding', 'tab_')->where(['_string' => $bindingOrWhereStr])->select(); $bindingRoleIds = []; foreach ($bindingRows as $bindingRow) { $bindings[$this->getGameRoleId($bindingRow['game_id'], $bindingRow['role_id'])] = $bindingRow; $bindingRoleIds[] = $this->getGameRoleId($bindingRow['game_id'], $bindingRow['bind_role_id']); + $game = $games[$bindingRow['game_id']]; + $gameIds = [$bindingRow['game_id']]; + if ($game['data_share'] == 1) { + $baseGame = $gameRepository->getBaseGameByGameId($bindingRow['game_id'], $baseGames); + $gameIds = $gameRepository->getGameIdsByBaseGame($baseGame); + } + foreach ($gameIds as $gameId) { + $bindingRoleIds[] = $this->getGameRoleId($gameId, $bindingRow['bind_role_id']); + } } if (count($bindings) > 0) { $bindingRoles = M('user_play_info', 'tab_') @@ -347,7 +364,7 @@ class TestingResourceRepository ->field('sum(apply_amount) amount, game_id, role_id') ->where([ 'verify_status' => 0, - '_string' => implode(' or ', $bindingOrWhere) + '_string' => $bindingOrWhereStr, ]) ->group('game_id,role_id')->select(); $verifyRecords = []; @@ -359,7 +376,7 @@ class TestingResourceRepository ->field('sum(provide_amount) amount, game_id, role_id') ->where([ 'verify_status' => 1, - '_string' => implode(' or ', $bindingOrWhere) + '_string' => $bindingOrWhereStr, ]) ->group('game_id,role_id')->select(); $provideRecords = []; @@ -371,9 +388,8 @@ class TestingResourceRepository ->field('sum(provide_amount) amount, game_id, role_id') ->where([ 'verify_status' => 1, - '_string' => implode(' or ', $bindingOrWhere), - 'provide_time' => ['egt', strtotime(date('Y-m-d 00:00:00'))], - 'provide_time' => ['elt', strtotime(date('Y-m-d 23:59:59'))], + '_string' => $bindingOrWhereStr, + 'provide_time' => ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]], ]) ->group('game_id,role_id')->select(); $todayProvideRecords = []; @@ -384,7 +400,7 @@ class TestingResourceRepository $applyItems = M('testing_resource_batch', 'tab_') ->field('sum(apply_amount) amount, game_id, role_id') ->where([ - '_string' => implode(' or ', $bindingOrWhere), + '_string' => $bindingOrWhereStr, ]) ->group('game_id,role_id')->select(); $applyRecords = []; @@ -466,11 +482,19 @@ class TestingResourceRepository $testingUser = $testingUsers[$role['user_id']] ?? null; $binding = $bindings[$role['game_role_id']] ?? null; $bindingRole = null; + + $baseGame = $gameRepository->getBaseGameByGameId($role['game_id'], $baseGames); + if ($binding) { - $bindGameRoleId = $this->getGameRoleId($binding['game_id'], $binding['bind_role_id']); - $bindingRole = $bindingRoles[$bindGameRoleId] ? $bindingRoles[$bindGameRoleId] : null; + $gameIds = $gameRepository->getGameIdsByBaseGame($baseGame); + foreach ($gameIds as $gameId) { + $bindGameRoleId = $this->getGameRoleId($gameId, $binding['bind_role_id']); + if (isset($bindingRoles[$bindGameRoleId])) { + $bindingRole = $bindingRoles[$bindGameRoleId]; + break; + } + } } - $baseGame = $gameRepository->getBaseGameByGameId($role['game_id'], $baseGames); $gameSetting = null; if ($baseGame && isset($gameSettings[$baseGame['id']])) { $gameSetting = $gameSettings[$baseGame['id']]; diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index bd482148e..1fbccfdbd 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -2,6 +2,7 @@ namespace Base\Service; use Base\Facade\Request; +use Base\Repository\GameRepository; use Base\Tool\GameResource; use Base\Repository\TestingResourceRepository; use Base\Repository\SpendRepository; @@ -167,17 +168,16 @@ class TestingResourceService $spendRepository = new SpendRepository(); $spendMap = $spendRepository->withIsCheck($spendMap); - $spendQuota += M('spend', 'tab_') + $spendQuota = M('spend', 'tab_') ->where($spendMap) - ->group('game_id,game_player_id') ->sum('pay_amount'); $totalQuota += round($gameSetting['rate'] / 100 * $spendQuota, 2); } $providedQuota = M('testing_resource_batch', 'tab_') - ->where(['provide_status' => [in, [1, 2]], 'game_id' => $role['game_id'], 'role_id' => $role['role_id']]) + ->where(['provide_status' => ['in', [1, 2]], 'game_id' => $role['game_id'], 'role_id' => $role['role_id']]) ->sum('provide_amount'); $providingQuota = M('testing_resource_batch', 'tab_') - ->where(['verify_status' => [in, [0, 1]], 'provide_status' => 0, 'game_id' => $role['game_id'], 'role_id' => $role['role_id']]) + ->where(['verify_status' => ['in', [0, 1]], 'provide_status' => 0, 'game_id' => $role['game_id'], 'role_id' => $role['role_id']]) ->sum('apply_amount'); return round(floatval($totalQuota) - floatval($providedQuota) - floatval($providingQuota), 2); } @@ -300,9 +300,24 @@ class TestingResourceService throw new \Exception('测试角色所属推广员异常'); } + $game = M('game', 'tab_')->where(['id' => $gameId])->find(); + if (is_null($game)) { + throw new \Exception('游戏不存在'); + } + $gameIds = [$gameId]; + if ($game['data_share'] == 1) { + $gameRepository = new GameRepository(); + $baseGames = $gameRepository->getBaseGames(); + $baseGame = $gameRepository->getBaseGameByGameId($gameId, $baseGames); + if (is_null($baseGame)) { + throw new \Exception('游戏不存在'); + } + $gameIds = $gameRepository->getGameIdsByBaseGame($baseGame); + } + $bindRole = M('user_play_info', 'tab_') ->field(['id', 'role_id', 'user_id', 'promote_id']) - ->where(['game_role_id' => $bindGameRoleId]) + ->where(['role_id' => $bindRoleId, 'game_id' => ['in', $gameIds]]) ->find(); if (is_null($bindRole)) { throw new \Exception('玩家角色不存在'); diff --git a/Application/Home/Controller/TestingResourceController.class.php b/Application/Home/Controller/TestingResourceController.class.php index 1d8f5bea8..c9a014e3d 100644 --- a/Application/Home/Controller/TestingResourceController.class.php +++ b/Application/Home/Controller/TestingResourceController.class.php @@ -10,6 +10,7 @@ use Think\Model; use Base\Service\TestingResourceService; use Base\Repository\TestingResourceRepository; use Base\Repository\GameRepository; +use Base\Service\GameService; class TestingResourceController extends BaseController { @@ -135,11 +136,21 @@ class TestingResourceController extends BaseController $bindingRole = null; if ($role) { $servers = M('server', 'tab_')->field('id,server_name,server_id')->where(['game_id' => $role['game_id']])->order('server_id asc')->select(); + $game = M('game', 'tab_')->where(['id' => $role['game_id']])->find(['id', 'data_share']); $binding = M('testing_binding', 'tab_')->where(['game_id' => $role['game_id'], 'role_id' => $role['role_id']])->find(); if ($binding) { + + $gameIds = [$role['game_id']]; + if ($game['data_share'] == 1) { + $gameRepository = new GameRepository(); + $baseGames = $gameRepository->getBaseGames(); + $baseGame = $gameRepository->getBaseGameByGameId($role['game_id'], $baseGames); + $gameIds = $gameRepository->getGameIdsByBaseGame($baseGame); + } + $bindingRole = M('user_play_info', 'tab_') ->field(['id', 'role_id', 'user_id', 'game_id', 'server_id', 'user_account', 'role_name']) - ->where(['game_id' => $binding['game_id'], 'role_id' => $binding['bind_role_id']]) + ->where(['game_id' => ['in', $gameIds], 'role_id' => $binding['bind_role_id']]) ->find(); if ($bindingRole) { $bindingRole['binding_time'] = $binding['create_time']; @@ -230,25 +241,29 @@ class TestingResourceController extends BaseController public function getUserRoles() { $gameId = I('game_id', 0); - $serverId = I('server_id', 0); - $userAccount = I('user_account', ''); - $server = M('server', 'tab_')->field(['id', 'server_name', 'server_id'])->where(['id' => $serverId])->find(); - if (is_null($server)) { - return $this->ajaxReturn(['status' => 0, 'message' => '区服不存在']); - } + $roleId = I('role_id', 0); - $user = M('user', 'tab_')->field(['id', 'promote_id'])->where(['account' => $userAccount])->find(); - if (is_null($user)) { - return $this->ajaxReturn(['status' => 0, 'message' => '账号不存在']); + $game = M('game', 'tab_')->where(['id' => $gameId])->find(); + if (is_null($game)) { + return $this->ajaxReturn(['status' => 0, 'message' => '游戏不存在']); } - $testingUser = M('testing_user', 'tab_')->where(['user_account' => $userAccount])->find(); - $isTestingAccount = is_null($testingUser) ? false : true; - + $gameIds = [$gameId]; + if ($game['data_share'] == 1) { + $gameRepository = new GameRepository(); + $baseGames = $gameRepository->getBaseGames(); + $baseGame = $gameRepository->getBaseGameByGameId($gameId, $baseGames); + if (is_null($baseGame)) { + return $this->ajaxReturn(['status' => 0, 'message' => '游戏不存在']); + } + $gameIds = $gameRepository->getGameIdsByBaseGame($baseGame); + } + $roles = M('user_play_info', 'tab_') ->field(['id', 'role_id', 'role_name']) - ->where(['user_account' => $userAccount, 'game_id' => $gameId, 'server_id' => $server['server_id']]) + ->where(['role_id' => $roleId, 'game_id' => ['in', $gameIds]]) ->select(); - return $this->ajaxReturn(['status' => 1, 'message' => '获取成功', 'data' => ['roles' => $roles, 'is_testing_account' => $isTestingAccount]]); + + return $this->ajaxReturn(['status' => 1, 'message' => '获取成功', 'data' => ['roles' => $roles]]); } } \ No newline at end of file diff --git a/Application/Home/View/default/TestingResource/apply.html b/Application/Home/View/default/TestingResource/apply.html index b43622e30..0c52547e7 100644 --- a/Application/Home/View/default/TestingResource/apply.html +++ b/Application/Home/View/default/TestingResource/apply.html @@ -216,9 +216,9 @@