From 4bf6352f9defeef24c60acf1faf250ed931ce0b9 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Wed, 18 Dec 2019 16:04:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=B7=BB=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 30 +++++++++++++------ .../Admin/View/Promote/ch_reg_list.html | 2 +- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 33e5e6e84..6ecfb747a 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -243,6 +243,8 @@ class ExportController extends Controller unset($_REQUEST['start']); unset($_REQUEST['end']); } + //为数据权限添加 + setPowerPromoteIds($map); $model = array( 'm_name' => 'User', 'join' => 'tab_promote ON tab_user.promote_id = tab_promote.id', @@ -983,6 +985,8 @@ class ExportController extends Controller unset($_REQUEST['game_name']); } } + //为数据权限添加 + setPowerPromoteIds($map); $map1 = $map; $map1['pay_status'] = 1; $total = M('Agent', 'tab_')->where($map1)->sum('amount'); @@ -1508,7 +1512,8 @@ class ExportController extends Controller $map['promote_account'] = $_REQUEST['promote_account']; } } - + //为数据权限添加 + setPowerPromoteIds($map); if ($_REQUEST['create_time'] == 2) { $order = 'create_time desc'; } elseif ($_REQUEST['create_time'] == 1) { @@ -1586,7 +1591,8 @@ class ExportController extends Controller unset($_REQUEST['game_name']); } } - + //为数据权限添加 + setPowerPromoteIds($map); $xlsData = M('settlement', 'tab_') ->field(array( 'settlement_number', @@ -5390,7 +5396,8 @@ if ($key == 'model'){ - + //为数据权限添加 + setPowerPromoteIds($map, 'id'); $xlsData = []; // if(is_array($data)){ @@ -5590,7 +5597,8 @@ if ($key == 'model'){ $row = $_REQUEST['row']?$_REQUEST['row']:10; - + //为数据权限添加 + setPowerPromoteIds($map); $data=$model ->field('tab_apply.*,tab_game.ratio as game_ratio,tab_game.money as game_money') ->join('LEFT JOIN tab_game ON tab_apply.game_id = tab_game.id') @@ -5770,7 +5778,8 @@ if ($key == 'model'){ $fp = fopen('php://output', 'a');//打开output流 mb_convert_variables('GBK', 'UTF-8', $xlsCell); fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 - + //为数据权限添加 + setPowerPromoteIds($map); $accessNum=$model ->join("left join tab_promote on tab_promote.id=tab_user.promote_id") ->field("tab_user.id,tab_user.account,tab_user.register_time,tab_user.login_time,tab_user.register_type @@ -5943,7 +5952,7 @@ if ($key == 'model'){ ); $map['type'] = 2; - $map['source_id'] = ['neq',0]; + $map['source_id'] = ['neq',0]; if(isset($_REQUEST['source_id'])) {$map['source_id'] = $_REQUEST['source_id'];} if(isset($_REQUEST['promote_id'])) {$map['promote_id'] = $_REQUEST['promote_id'];} @@ -5953,10 +5962,10 @@ if ($key == 'model'){ $page = $page?$page:1; $row = $_REQUEST['row']?$_REQUEST['row']:10; + //为数据权限添加 + setPowerPromoteIds($map); - - $data=$model - ->where($map) + $data = $model->where($map) ->order('id desc') ->select(); @@ -6322,6 +6331,9 @@ if ($key == 'model'){ $map['tab_spend.promote_id'] = $map['promote_id']; unset($map['promote_id']); + //为数据权限添加 + setPowerPromoteIds($map); + $csvFileName = $xlsName . '.csv'; //设置好告诉浏览器要下载excel文件的headers header('Content-Description: File Transfer'); diff --git a/Application/Admin/View/Promote/ch_reg_list.html b/Application/Admin/View/Promote/ch_reg_list.html index 4211f55cf..452be0303 100644 --- a/Application/Admin/View/Promote/ch_reg_list.html +++ b/Application/Admin/View/Promote/ch_reg_list.html @@ -165,7 +165,7 @@ background-color: #FF9797;
- 导出 + 导出 {$_page|default=''}