diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 53357ea5c..aeda732e5 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1404,6 +1404,11 @@ class ExportController extends Controller ->where($map) ->order('id DESC') ->select(); + foreach ($xlsData as $key => $value) { + checkEncryptionAuth($xlsData[$key]['user_account'],'provide_list'); + } + + $xlsCell = array( array('pay_order_number', "订单号"), array('user_account', "玩家账号"), diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index 9d641f429..77f8b8667 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -104,7 +104,7 @@ class TestResourceController extends ThinkController $page = set_pagination($count,$row); if($page) {$this->assign('_page', $page);} - $this->meta_title = '扶持号管理'; + $this->meta_title = '资源管理'; $this->assign('data',$data); $show_data_power = (is_administrator()|| session('user_auth')['show_data']); $this->assign('show_data_power', $show_data_power); @@ -120,34 +120,39 @@ class TestResourceController extends ThinkController $this->error('请选择资源后再进行操作'); } - $resourceData = M('test_resource','tab_') - ->field("promote_id") - ->where(['id'=>['in',$id]]) - ->select(); - - $resourceData = array_column($resourceData,'promote_id'); - - $promoteId = []; + if (!I('status','')&&I('status','')!='0') { + $this->error('请选择状态后在进行操作'); + } - foreach ($resourceData as $key => $value) { +// $resourceData = M('test_resource','tab_') +// ->field("promote_id") +// ->where(['id'=>['in',$id]]) +// ->select(); +// +// $resourceData = array_column($resourceData,'promote_id'); - $promoteData = M('promote','tab_') - ->field('id') - ->where("chain like '%/{$value}/%' or id = {$value}") - ->select(); - $promoteId = array_merge($promoteData, $promoteId); - } +// $promoteId = []; +// +// foreach ($resourceData as $key => $value) { +// +// $promoteData = M('promote','tab_') +// ->field('id') +// ->where("chain like '%/{$value}/%' or id = {$value}") +// ->select(); +// $promoteId = array_merge($promoteData, $promoteId); +// } - $promoteId = implode(',',array_column($promoteId,'id')); +// $promoteId = array_unique($resourceData); +// var_dump($promoteId);die(); $testResource = M('test_resource','tab_') ->field("user_id") - ->where(['promote_id'=>['in',$promoteId]]) + ->where(['id'=>['in',$id]]) ->group('user_id') ->select(); $data = [ - 'lock_status' => 0 + 'lock_status' => I('status','') ]; $user_id = implode(',',array_column($testResource,'user_id')); @@ -156,11 +161,11 @@ class TestResourceController extends ThinkController if ($isFreeze) { - $this->success('冻结成功',U('index')); + $this->success('操作成功',U('supportNumberList')); } else { - $this->error('冻结失败',U('index')); + $this->error('操作失败',U('supportNumberList')); } diff --git a/Application/Admin/View/TestResource/index.html b/Application/Admin/View/TestResource/index.html index ca242a95f..cdc995013 100644 --- a/Application/Admin/View/TestResource/index.html +++ b/Application/Admin/View/TestResource/index.html @@ -110,7 +110,7 @@ 批量申请后续 新增测试账号 - 批量锁定 + diff --git a/Application/Admin/View/TestResource/supportNumberList.html b/Application/Admin/View/TestResource/supportNumberList.html index 8999bc238..c4309060b 100644 --- a/Application/Admin/View/TestResource/supportNumberList.html +++ b/Application/Admin/View/TestResource/supportNumberList.html @@ -84,7 +84,20 @@
搜索
+
+
+ + + 批量开启 + + 批量锁定 + +
+
+ + +
@@ -94,6 +107,9 @@ + + + 产品名称 区服 测试账号 @@ -116,6 +132,7 @@ + {$s.game_name} {$s.server_name} {$s.user_account} @@ -204,6 +221,66 @@ } }) + $('#batch_freeze').click(function () { + var ids = $('.ids:checked'); + + if (ids.length > 0) { + var str = new Array(); + ids.each(function () { + str.push($(this).val()); + }); + param = str.join(','); + } else { + layer.msg('请选择要操作的数据',{skin:'textColor'}); + return false; + } + var url = "{:U('batchFreeze','','')}" + '/id/' + param + '/status/0'; + + layer.confirm('是否冻结选中推广员下的资源账号?', { + title:'冻结资源账号', + icon:3, + skin:'textColor', + btn: ['冻结','取消'] //按钮 + }, function(){ + + window.location.href = url; + + }, function(){ + layer.close(); + }); + + }); + + $('#batch_unfreeze').click(function () { + var ids = $('.ids:checked'); + + if (ids.length > 0) { + var str = new Array(); + ids.each(function () { + str.push($(this).val()); + }); + param = str.join(','); + } else { + layer.msg('请选择要操作的数据',{skin:'textColor'}); + return false; + } + var url = "{:U('batchFreeze','','')}" + '/id/' + param + '/status/1'; + + layer.confirm('是否冻结选中推广员下的资源账号?', { + title:'冻结资源账号', + icon:3, + skin:'textColor', + btn: ['冻结','取消'] //按钮 + }, function(){ + + window.location.href = url; + + }, function(){ + layer.close(); + }); + + }); + $('.unfroze-btn').on({ click: function() { var id = $(this).parents('tr').eq(0).attr('data-id') @@ -485,6 +562,8 @@ window.location.href = url; }); + +