From eabf59d3e3afbfa97ae6e5ccf9368f7309628319 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Thu, 26 Dec 2019 18:20:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AD=BE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 240 +++++++++--------- .../SuperStatisticalController.class.php | 3 + .../Admin/View/SuperStatistical/index.html | 20 +- .../View/SuperStatistical/superDetail.html | 72 +++--- 4 files changed, 176 insertions(+), 159 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 105483f44..5825a0213 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2049,6 +2049,9 @@ class ExportController extends Controller if (isset($params['order_id'])) { $map['tab_game_supersign.order_id'] = $params['order_id']; } + if (isset($params['pay_way'])) { + $map['tab_game_supersign.pay_way'] = $params['pay_way']; + } if (isset($params['account'])) { $map['tab_user.account'] = $params['account']; } @@ -2166,6 +2169,7 @@ class ExportController extends Controller $map['tab_repair_pay.create_time'] = array('BETWEEN', [$startTime, $endTime]); } + if(isset($params['type'])) { $map['tab_repair_pay.type'] = $params['type']; } @@ -2464,8 +2468,8 @@ class ExportController extends Controller setPowerPromoteIds($map2); $data2 = $user->field('fgame_id,count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') ->where($map2) ->group('fgame_id') ->select(); @@ -2556,8 +2560,8 @@ class ExportController extends Controller setPowerPromoteIds($map2); $data2 = $spend ->field('game_id,sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, - sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, - sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') + sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, + sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') ->where($map2) ->group('game_id') ->select(); @@ -2650,8 +2654,8 @@ class ExportController extends Controller $data2 = $user ->field('register_way, count(IF(register_time ' . $today . ',1,null)) as today, - count(IF(register_time ' . $week . ',1,null)) as week, - count(IF(register_time ' . $mounth . ',1,null)) as mounth') + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') ->where($map2) ->group('register_way') ->select(); @@ -2737,9 +2741,9 @@ class ExportController extends Controller setPowerPromoteIds($map2); $data2 = $spend ->field('pay_way, - sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, - sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, - sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') + sum(IF(pay_time ' . $today . ',pay_amount,0)) as today, + sum(IF(pay_time ' . $week . ',pay_amount,0)) as week, + sum(IF(pay_time ' . $mounth . ',pay_amount,0)) as mounth') ->where($map2) ->group('pay_way') ->select(); @@ -2856,7 +2860,7 @@ class ExportController extends Controller } //为数据权限添加 setPowerPromoteIds($map, 'u.promote_id'); - $data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count, + $data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count, count(IF(register_time ' . $today . ',1,null)) as today, count(IF(register_time ' . $week . ',1,null)) as week, count(IF(register_time ' . $mounth . ',1,null)) as mounth') @@ -2876,7 +2880,7 @@ class ExportController extends Controller //官方渠道数据添加 $authorityData = M('user', 'tab_')->alias('u') ->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, - count(id) as count, + count(id) as count, count(IF(register_time ' . $today . ',1,null)) as today, count(IF(register_time ' . $week . ',1,null)) as week, count(IF(register_time ' . $mounth . ',1,null)) as mounth') @@ -3448,9 +3452,9 @@ class ExportController extends Controller array('mau','MAU'), ); - if (is_file(RUNTIME_PATH.'/access_data_user.txt')) { + if (is_file(RUNTIME_PATH.'/access_data_user.txt')) { - $filetxt = file_get_contents(RUNTIME_PATH.'/access_data_user.txt'); + $filetxt = file_get_contents(RUNTIME_PATH.'/access_data_user.txt'); $data = json_decode($filetxt,true); @@ -3483,30 +3487,30 @@ class ExportController extends Controller $this->exportExcel($xlsName, $xlsCell, $xlsData); } - /** - * ltv统计 - * @author 鹿文学 - */ - public function ltv($p=1, $start, $end) { - - $xlsName = $_REQUEST['xlsname']; - - $xlsCell = array( - array('date','日期'), - array('total_amt','充值金额'), - array('user_count','活跃用户'), - array('ltv_1','LTV1'), - array('ltv_2','LTV2'), - array('ltv_3','LTV3'), - array('ltv_4','LTV4'), - array('ltv_5','LTV5'), - array('ltv_6','LTV6'), - array('ltv_7','LTV7'), - array('ltv_14','LTV14'), - array('ltv_30','LTV30'), - ); - - $start_time = $start = strtotime($start); + /** + * ltv统计 + * @author 鹿文学 + */ + public function ltv($p=1, $start, $end) { + + $xlsName = $_REQUEST['xlsname']; + + $xlsCell = array( + array('date','日期'), + array('total_amt','充值金额'), + array('user_count','活跃用户'), + array('ltv_1','LTV1'), + array('ltv_2','LTV2'), + array('ltv_3','LTV3'), + array('ltv_4','LTV4'), + array('ltv_5','LTV5'), + array('ltv_6','LTV6'), + array('ltv_7','LTV7'), + array('ltv_14','LTV14'), + array('ltv_30','LTV30'), + ); + + $start_time = $start = strtotime($start); $end_time = $end = strtotime($end) + 86400; if (is_file(RUNTIME_PATH.'/access_data_ltv.txt')) { $filetxt = file_get_contents(RUNTIME_PATH.'/access_data_ltv.txt'); @@ -3877,21 +3881,21 @@ class ExportController extends Controller $xlsName = $_REQUEST['xlsname']; $xlsCell = array( -// array('id','编号'), +// array('id','编号'), array('order_number','订单号'), array('title','商品信息'), -// array('game_name','游戏名称'), -// array('server_name','区服名称'), -// array('small_account','小号账户'), -// array('seller_account','卖家账号'), - //// array('phone','卖家手机号'), +// array('game_name','游戏名称'), +// array('server_name','区服名称'), +// array('small_account','小号账户'), +// array('seller_account','卖家账号'), + //// array('phone','卖家手机号'), array('buyer_account','交易用户'), array('order_price','售价'), array('poundage','手续费'), array('pay_status','状态'), array('order_time','下单时间'), -// array('pay_time','付款时间'), -// array('send_time','发货时间'), +// array('pay_time','付款时间'), +// array('send_time','发货时间'), ); if(!empty($_REQUEST['order_number'])) {$extend['order_number']=array('like','%'.$_REQUEST['order_number'].'%');} @@ -3993,9 +3997,9 @@ class ExportController extends Controller } - if (is_file(RUNTIME_PATH.'/device_data_foldline.txt')) { + if (is_file(RUNTIME_PATH.'/device_data_foldline.txt')) { - $filetxt = file_get_contents(RUNTIME_PATH.'/device_data_foldline.txt'); + $filetxt = file_get_contents(RUNTIME_PATH.'/device_data_foldline.txt'); $xlsData = $data[$key]; @@ -4344,14 +4348,14 @@ class ExportController extends Controller $xlsName = $_REQUEST['xlsname']; -// $xlsCell = array( -// array('user_account','玩家账号'), -// array('game_name','游戏名称'), -// array('server_name','游戏区服'), -// array('user_nickname','角色名'), -// array('login_time','登录时间'), -// array('login_ip','最后登录ip'), -// ); +// $xlsCell = array( +// array('user_account','玩家账号'), +// array('game_name','游戏名称'), +// array('server_name','游戏区服'), +// array('user_nickname','角色名'), +// array('login_time','登录时间'), +// array('login_ip','最后登录ip'), +// ); $xlsCell = array( '玩家账号', @@ -4467,12 +4471,12 @@ class ExportController extends Controller ob_flush(); flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。 } -// $xlsData = []; +// $xlsData = []; exit(); -// $this->exportExcel($xlsName, $xlsCell, $xlsData); +// $this->exportExcel($xlsName, $xlsCell, $xlsData); } @@ -5895,7 +5899,7 @@ class ExportController extends Controller $xlsData = []; -// if(is_array($data)){ +// if(is_array($data)){ if($_REQUEST['type']==2) { $data=$model ->where($map) @@ -5944,9 +5948,9 @@ class ExportController extends Controller $v['grand_account'] = $v['account']; } $v['status'] = get_info_status($v['status'],3); -// $v['business_affairs'] = get_business_affairs_account($v['ba_id']); -// $v['grand_account'] = getTopPromote($v['id'])['id']; -// $v['promote_levels'] = get_promote_levels($v['id']); +// $v['business_affairs'] = get_business_affairs_account($v['ba_id']); +// $v['grand_account'] = getTopPromote($v['id'])['id']; +// $v['promote_levels'] = get_promote_levels($v['id']); switch ($v['ver_status']) { case '1': @@ -5993,7 +5997,7 @@ class ExportController extends Controller } } -// } +// } $this->exportExcel($xlsName, $xlsCell, $xlsData); @@ -6241,15 +6245,15 @@ class ExportController extends Controller $model = M('user','tab_'); -// $xlsCell = array( -// array('account','玩家账号'), -// array('register_time','注册时间'), -// array('login_time','最后登录时间'), -// array('register_type','注册来源'), -// array('register_ip','注册IP'), -// array('login_time','上次登录'), -// array('top_promote','所属推广员'), -// ); +// $xlsCell = array( +// array('account','玩家账号'), +// array('register_time','注册时间'), +// array('login_time','最后登录时间'), +// array('register_type','注册来源'), +// array('register_ip','注册IP'), +// array('login_time','上次登录'), +// array('top_promote','所属推广员'), +// ); $xlsCell = array( '玩家账号','注册时间','最后登录时间','注册来源','注册IP','上次登录','所属推广员', ); @@ -6329,35 +6333,35 @@ class ExportController extends Controller fclose($fp); exit(); -// $data = M()->table("({$data}) as a") +// $data = M()->table("({$data}) as a") // ->field("a.account,a.register_time,a.login_time,a.register_type,a.register_ip,a.top_promote,a.promote_account") // ->join("left join tab_promote on a.top_promote=tab_promote.id") // ->order("a.id desc") // ->select(false); -// var_dump($data);die(); +// var_dump($data);die(); -// $xlsData = []; +// $xlsData = []; -// if(is_array($data)){ +// if(is_array($data)){ // -// foreach($data as $k => $v) { +// foreach($data as $k => $v) { // -// $v['register_time'] = date('Y-m-d H:i:s',$v['register_time']); -// $v['login_time'] = $v['login_time']>0?date('Y-m-d H:i:s',$v['login_time']):'暂无登录'; +// $v['register_time'] = date('Y-m-d H:i:s',$v['register_time']); +// $v['login_time'] = $v['login_time']>0?date('Y-m-d H:i:s',$v['login_time']):'暂无登录'; // -// $v['register_type'] = get_registertype($v['register_type']); +// $v['register_type'] = get_registertype($v['register_type']); // -// $promote = get_parent_promoteto($v['promote_id']); +// $promote = get_parent_promoteto($v['promote_id']); // -// $v['top_promote'] = $promote?($v['promote_account'] . get_parent_promoteto($v['promote_id'])):get_promote_name($v['promote_id']); +// $v['top_promote'] = $promote?($v['promote_account'] . get_parent_promoteto($v['promote_id'])):get_promote_name($v['promote_id']); // -// $xlsData[] = $v; +// $xlsData[] = $v; // -// } +// } // // -// } +// } $this->exportExcel($xlsName, $xlsCell, $xlsData); @@ -6664,22 +6668,22 @@ class ExportController extends Controller $xlsName = $_REQUEST['xlsname']; -// $xlsCell = array( -// array('pay_order_number', "订单号"), -// array('pay_time', "充值时间"), -// array('promote_account', L('Subordinate_channel')), -// array('parent_id', "上级推广员"), -// array('user_account', "玩家账号"), -// array('game_name', "游戏名称"), -// array('server_name', L('Game_area_clothing')), -// array('game_player_name', "角色名"), -// array('spend_ip', "充值ip"), -// array('pay_amount', "应付金额"), -// array('cost', "实付金额"), -// array('pay_way', "充值方式"), -// array('promote_id', '商务专员'), -// array('is_check','对账状态') -// ); +// $xlsCell = array( +// array('pay_order_number', "订单号"), +// array('pay_time', "充值时间"), +// array('promote_account', L('Subordinate_channel')), +// array('parent_id', "上级推广员"), +// array('user_account', "玩家账号"), +// array('game_name', "游戏名称"), +// array('server_name', L('Game_area_clothing')), +// array('game_player_name', "角色名"), +// array('spend_ip', "充值ip"), +// array('pay_amount', "应付金额"), +// array('cost', "实付金额"), +// array('pay_way', "充值方式"), +// array('promote_id', '商务专员'), +// array('is_check','对账状态') +// ); $xlsCell = array( "订单号", "充值时间", L('Subordinate_channel'), "上线推广员", "玩家账号", "游戏名称", L('Game_area_clothing'), @@ -6869,22 +6873,22 @@ class ExportController extends Controller /* 执行查询 */ ->select(false); - // $xlsCell = array( -// array('pay_order_number', "订单号"), -// array('pay_time', "充值时间"), -// array('promote_account', L('Subordinate_channel')), -// array('parent_id', "上级推广员"), -// array('user_account', "玩家账号"), -// array('game_name', "游戏名称"), -// array('server_name', L('Game_area_clothing')), -// array('game_player_name', "角色名"), -// array('spend_ip', "充值ip"), -// array('pay_amount', "应付金额"), -// array('cost', "实付金额"), -// array('pay_way', "充值方式"), -// array('promote_id', '商务专员'), -// array('is_check','对账状态') -// ); + // $xlsCell = array( +// array('pay_order_number', "订单号"), +// array('pay_time', "充值时间"), +// array('promote_account', L('Subordinate_channel')), +// array('parent_id', "上级推广员"), +// array('user_account', "玩家账号"), +// array('game_name', "游戏名称"), +// array('server_name', L('Game_area_clothing')), +// array('game_player_name', "角色名"), +// array('spend_ip', "充值ip"), +// array('pay_amount', "应付金额"), +// array('cost', "实付金额"), +// array('pay_way', "充值方式"), +// array('promote_id', '商务专员'), +// array('is_check','对账状态') +// ); $xlsData = M()->table("({$xlsData}) as a") ->field("a.pay_order_number,a.pay_time,a.promote_account,tab_promote.account as parent_id, @@ -6898,9 +6902,9 @@ class ExportController extends Controller if (!$value['account']) { $value['account'] = "暂无"; } -// $xlsData[$key]['parent_id'] = get_top_promote($value['promote_id'], $value['parent_id']); +// $xlsData[$key]['parent_id'] = get_top_promote($value['promote_id'], $value['parent_id']); $xlsData[$key]['pay_way'] = get_pay_way($value['pay_way']); -// $xlsData[$key]['promote_id'] = get_promote_business_account($value['promote_id']); +// $xlsData[$key]['promote_id'] = get_promote_business_account($value['promote_id']); $xlsData[$key]['is_check'] = get_info_status($value['is_check'], 37); $xlsData[$key]['pay_time'] = date('Y-m-d H:i:s', $value['pay_time']); mb_convert_variables('GBK', 'UTF-8', $value); diff --git a/Application/Admin/Controller/SuperStatisticalController.class.php b/Application/Admin/Controller/SuperStatisticalController.class.php index 19a44ca51..ecab06174 100644 --- a/Application/Admin/Controller/SuperStatisticalController.class.php +++ b/Application/Admin/Controller/SuperStatisticalController.class.php @@ -132,6 +132,9 @@ class SuperStatisticalController extends ThinkController if (isset($params['order_id'])) { $map['tab_game_supersign.order_id'] = $params['order_id']; } + if (isset($params['pay_way'])) { + $map['tab_game_supersign.pay_way'] = $params['pay_way']; + } if (isset($params['account'])) { $map['tab_user.account'] = $params['account']; } diff --git a/Application/Admin/View/SuperStatistical/index.html b/Application/Admin/View/SuperStatistical/index.html index b0288070e..c90d8f4a2 100644 --- a/Application/Admin/View/SuperStatistical/index.html +++ b/Application/Admin/View/SuperStatistical/index.html @@ -35,10 +35,12 @@
+
+ 返回 +
-
@@ -105,14 +107,14 @@ {$_page|default=''}
- + diff --git a/Application/Admin/View/SuperStatistical/superDetail.html b/Application/Admin/View/SuperStatistical/superDetail.html index f3c9a31f1..bec9f65a9 100644 --- a/Application/Admin/View/SuperStatistical/superDetail.html +++ b/Application/Admin/View/SuperStatistical/superDetail.html @@ -96,6 +96,14 @@
+
+ +
@@ -149,7 +157,7 @@
- 导出 + 导出 {$_page|default=''}
@@ -166,10 +174,10 @@ \ No newline at end of file From dcf7efad6fa036d5854022f0e967038825eba339 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Fri, 27 Dec 2019 09:37:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Promote/linkInfo.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/Promote/linkInfo.html b/Application/Admin/View/Promote/linkInfo.html index 9ba1597d3..d7bda346e 100644 --- a/Application/Admin/View/Promote/linkInfo.html +++ b/Application/Admin/View/Promote/linkInfo.html @@ -130,7 +130,7 @@ $(".select_gallery").select2();