From 4e1d6938f8eb882222b528111e382b1ae2a39fc0 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 5 Feb 2020 18:36:39 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2--bug=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 | 1 - 1 file changed, 1 deletion(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index aa5387634..35fd05660 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -100,7 +100,6 @@ class QueryController extends BaseController } } $map['tab_spend.pay_time'] = ['between', [$begTime, $endTime - 1]]; - $map['tab_spend.is_check'] = ['neq', 2]; $data = []; $count = 0; From 6cecac48621674edbfb6bd5c9ef21e6abdc79e8b Mon Sep 17 00:00:00 2001 From: liaojinling <360197197@qq.com> Date: Wed, 5 Feb 2020 18:49:06 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E5=91=98=E6=B3=A8=E5=86=8C=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/IndexController.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/IndexController.class.php b/Application/Home/Controller/IndexController.class.php index 95f3a5f8d..c91fac847 100644 --- a/Application/Home/Controller/IndexController.class.php +++ b/Application/Home/Controller/IndexController.class.php @@ -99,12 +99,10 @@ class IndexController extends HomeController } } - public function register() + /* public function register() { if (IS_POST) { - if (!C('USER_ALLOW_REGISTER')) { - $this->ajaxReturn(array('status' => 0, 'info' => '已关闭用户注册!')); - } + $this->ajaxReturn(array('status' => 0, 'info' => '已关闭用户注册!')); // unset($_POST['remember']); $Promote = new PromoteApi(); @@ -120,7 +118,7 @@ class IndexController extends HomeController } else { $this->display(); } - } + } */ public function rule() { From edf8d07a4e86db13546689515bfc01eca31f2500 Mon Sep 17 00:00:00 2001 From: sk <599123572@qq.com> Date: Thu, 6 Feb 2020 15:45:20 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=85=85=E5=80=BC=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E6=9B=B4=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 9dc5af389..b910f6431 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1304,7 +1304,7 @@ class DownloadController extends BaseController { empty(I('user_account')) || $map['tab_spend.user_account'] = ['like', '%' . I('user_account') . '%']; empty(I('pay_order_number')) || $map['tab_spend.pay_order_number'] = I('pay_order_number'); // $map['tab_spend.pay_status'] = 1; - $map['tab_spend.is_check'] = ['neq', 2]; + // $map['tab_spend.is_check'] = ['neq', 2]; if (isset($_REQUEST['pay_status']) && $_REQUEST['pay_status'] !== '') { $payStatus = intval(I('pay_status')); From 1cfc48ded224677138a77206f7b017a1064bc2fc Mon Sep 17 00:00:00 2001 From: zyx Date: Sat, 8 Feb 2020 13:01:25 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BCcp?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index d61e779d8..f884e1056 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1176,6 +1176,7 @@ class ExportController extends Controller foreach($xlsData as $value) { $value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']); + $value['extend'] = $value['extend'].'`'; $value['pay_way'] = get_pay_way($value['pay_way']); $value['pay_status'] = get_info_status($value['pay_status'],9); $value['pay_game_status'] = get_info_status($value['pay_game_status'],14); From a9cae8424bb548bd420fe44a5e7a7ee71f139419 Mon Sep 17 00:00:00 2001 From: zyx Date: Sat, 8 Feb 2020 15:26:05 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BCbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 125 +++++++++++------- 1 file changed, 74 insertions(+), 51 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index f884e1056..76cd96221 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -1054,87 +1054,108 @@ class ExportController extends Controller break; case 7: + $startDate = empty($_REQUEST['timestart']) ? date('Y-m-d', strtotime('-6 day', time())) : $_REQUEST['timestart']; + $endDate = empty($_REQUEST['timeend']) ? date('Y-m-d') : $_REQUEST['timeend']; + + $startTime = strtotime($startDate); + $endTime = strtotime($endDate) + 86399; + $map['pay_time'] = array('BETWEEN', array($startTime, $endTime)); + + unset($_REQUEST['timestart']); + unset($_REQUEST['timeend']); + if (isset($_REQUEST['user_account'])) { - $map['user_account'] = array('like', '%' . trim($_REQUEST['user_account']) . '%'); + $map['user_account'] = array('like', trim($_REQUEST['user_account'])); unset($_REQUEST['user_account']); } if (isset($_REQUEST['spend_ip'])) { - $map['spend_ip'] = array('like', '%' . trim($_REQUEST['spend_ip']) . '%'); + $map['spend_ip'] = array('like', trim($_REQUEST['spend_ip']) . '%'); unset($_REQUEST['spend_ip']); } - if (isset($_REQUEST['time-start']) && isset($_REQUEST['time-end'])) { - $map['pay_time'] = array('BETWEEN', array(strtotime($_REQUEST['time-start']), strtotime($_REQUEST['time-end']) + 24 * 60 * 60 - 1)); - unset($_REQUEST['time-start']); - unset($_REQUEST['time-end']); - } - if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) { - $map['pay_time'] = array('BETWEEN', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 24 * 60 * 60 - 1)); - unset($_REQUEST['timestart']); - unset($_REQUEST['timeend']); - } - if (isset($_REQUEST['start']) && isset($_REQUEST['end'])) { - $map['pay_time'] = array('BETWEEN', array(strtotime($_REQUEST['start']), strtotime($_REQUEST['end']) + 24 * 60 * 60 - 1)); - unset($_REQUEST['start']); - unset($_REQUEST['end']); - } - if(isset($_REQUEST['game_name'])){ - if($_REQUEST['game_name']=='全部'){ + if (isset($_REQUEST['game_name'])) { + if ($_REQUEST['game_name'] == '全部') { unset($_REQUEST['game_name']); - }else{ - $map['tab_spend.game_id']= ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')]; + } else { + $map['game_id'] = ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')]; unset($_REQUEST['game_name']); } } - if(isset($_REQUEST['server_name'])){ - $map['tab_spend.server_name']=$_REQUEST['server_name']; - unset($_REQUEST['server_name']); + if (isset($_REQUEST['game_type']) && $_REQUEST['game_type']) { + $map['sdk_version'] = $_REQUEST['game_type']; + } + if (isset($_REQUEST['server_id'])) { + $map['server_id'] = $_REQUEST['server_id']; + unset($_REQUEST['server_id']); } if (isset($_REQUEST['pay_order_number'])) { - $map['pay_order_number'] = array('like', '%' . trim($_REQUEST['pay_order_number']) . '%'); + $map['pay_order_number'] = array('like', trim($_REQUEST['pay_order_number'])); unset($_REQUEST['pay_order_number']); } + if (isset($_REQUEST['extend'])) { + $map['extend'] = array('like', trim($_REQUEST['extend'])); + unset($_REQUEST['extend']); + } if (isset($_REQUEST['pay_status'])) { $map['pay_status'] = $_REQUEST['pay_status']; unset($_REQUEST['pay_status']); } if (isset($_REQUEST['pay_way'])) { - $map['pay_way'] = $_REQUEST['pay_way']; - unset($_REQUEST['pay_status']); + if ($_REQUEST['pay_way'] == 2) { + $map['pay_way'] = ['in', '2,3,4']; + } else { + $map['pay_way'] = $_REQUEST['pay_way']; + } + unset($_REQUEST['pay_way']); } if (isset($_REQUEST['pay_game_status'])) { $map['pay_game_status'] = $_REQUEST['pay_game_status']; unset($_REQUEST['pay_game_status']); } -// $promoteRoot = getPowerPromoteIds(); -// $data_empower_type = session('user_auth')['data_empower_type']; +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; // -// if ($promoteRoot) { -// $map['promote_id'] =array('in',$promoteRoot); -// } else if(!$promoteRoot&&$data_empower_type!=1){ -// $map['id'] = array('lt',1); -// } +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } setPowerPromoteIds($map,'promote_id'); - if(isset($_REQUEST['promote_id'])) { - if ($_REQUEST['promote_id'] == 0) { + if (isset($_REQUEST['promote_id'])) { + $promoteId = intval($_REQUEST['promote_id']); + if ($promoteId == 0) { $map['promote_id'] = 0; } else { - $map['_complex'] = ['tp.chain'=>['like', "%/{$_REQUEST['promote_id']}/%"], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or']; + $promoteMap['chain'] = ['like', "%/$promoteId/%"]; + $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); + $promoteIds[] = $promoteId; + $map['promote_id'] = ['in', $promoteIds]; } - $tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id"; - //unset($_REQUEST['promote_id']); + } + if ($_REQUEST['data_order'] != '') { + $data_order = reset(explode(',', $_REQUEST['data_order'])); + $data_order_type = end(explode(',', $_REQUEST['data_order'])); + $this->assign('userarpu_order', $data_order); + $this->assign('userarpu_order_type', $data_order_type); + $sort = $data_order == 3 ? 'desc' : 'asc'; + $order = $data_order_type . ' ' . $sort; } else { - $tab_promote_join = false; + $order = ' pay_time desc '; } + + // if (intval(($endTime + 1) - $startTime) / (24 * 3600) <= 31) { + // $map1 = $map; + // $map1['pay_status'] = 1; + // } else { + // $map = '1 = 2'; + // $map1 = $map; + // } $map1 = $map; $map1['pay_status'] = 1; - $total = D('Spend')->where($map1)->join($tab_promote_join)->sum('pay_amount'); - if (isset($map['pay_status']) && $map['pay_status'] == 0) { - $total = sprintf("%.2f", 0); - } else { - $total = sprintf("%.2f", $total); - } + $total = M('Spend','tab_')->where($map1)->sum('pay_amount'); +// var_dump($total);die(); + $total=$total?$total:0; $xlsCell = array( @@ -1155,10 +1176,7 @@ class ExportController extends Controller fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 $accessNum = D('Spend') - ->field('pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,server_name,game_player_id,game_player_name,cost,pay_amount,pay_way,pay_status,pay_game_status') ->where($map) - ->join($tab_promote_join) - ->order('pay_time DESC') ->count(); $perSize = 10000;//每次查询的条数 @@ -1167,11 +1185,16 @@ class ExportController extends Controller // var_dump($count);die(); for($i = 1; $i <= $pages; $i++) { $xlsData = D('Spend') +// ->field('pay_order_number,extend,pay_time,user_account,game_name,promote_account,spend_ip,server_id,server_name,game_player_id,game_player_name,cost,pay_amount,pay_way,pay_status,pay_game_status') +// ->where($map) +// ->limit(($i-1)*$perSize ,$perSize) +// ->join($tab_promote_join) +// ->order('pay_time DESC') +// ->select(); ->field('pay_order_number,extend,pay_time,user_account,game_name,promote_account,spend_ip,server_id,server_name,game_player_id,game_player_name,cost,pay_amount,pay_way,pay_status,pay_game_status') ->where($map) ->limit(($i-1)*$perSize ,$perSize) - ->join($tab_promote_join) - ->order('pay_time DESC') + ->order($order ? $order : 'pay_time desc') ->select(); foreach($xlsData as $value) { From 2af2505819e3cd0ed15e418dd27257cfcad992a7 Mon Sep 17 00:00:00 2001 From: liuweiwen <529520975@qq.com> Date: Mon, 10 Feb 2020 11:22:48 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=83=AD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 7b95f8c82..14f221229 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -7163,7 +7163,7 @@ class ExportController extends Controller if (!empty(I('timestart'))) { $timestart = strtotime(I('timestart')); - $map['_string'] = "s.pay_time > {$timestart}"; + $map['_string'] = "s.pay_time >= {$timestart}"; } if (!empty(I('timeend'))) {