From 0890e3967547c37f6480df6d63654294074839e9 Mon Sep 17 00:00:00 2001 From: chenzhi <chenzhi063@qq.com> Date: Mon, 23 Dec 2019 14:53:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=96=B0=E5=A2=9E=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancePromoteController.class.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index cf1892921..8304524a3 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -7,8 +7,17 @@ class FinancePromoteController extends AdminController parent::_initialize(); // echo "<pre>"; } - public function index() + public function index($p=1) { + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $arraypage = $page; + + if (isset($_REQUEST['row'])) { + $row = $_REQUEST['row']; + } else { + $row = 10; + } //排序 if(!array_key_exists("time_start",$_REQUEST)){ $this->redirect(ACTION_NAME, array('time_start' => date('Y-m-d',strtotime('-30 day')),"time_end"=>date('Y-m-d'))); @@ -58,6 +67,7 @@ class FinancePromoteController extends AdminController } } + $data = []; $count =array( @@ -94,6 +104,15 @@ class FinancePromoteController extends AdminController "allcount"=>"渠道游戏内充值合计" )); } + $pagecount = count($data); + $page = set_pagination($pagecount, $row); + if ($page) { + $this->assign('_page', $page); + } + + $size = $row; + $data = array_slice($data, ($arraypage - 1) * $size, $size); + $this->assign('list_data', $data); $this->assign('all_count', $count); $this->meta_title = '公会统计'; From 44dac56d85cec7547ddc93d7d68c57260113c863 Mon Sep 17 00:00:00 2001 From: zhengyongxing <as123498@qq.com> Date: Tue, 24 Dec 2019 10:43:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B8=A0=E9=81=93=E7=BB=9F=E8=AE=A1bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PayChannelController.class.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index 023d1eb7b..e2223f8d7 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -333,15 +333,18 @@ class PayChannelController extends ThinkController //推广后台充值数据 $spreadMap['order_status'] = array('egt',1); $spreadMap['pay_way'] = array('egt',1); - $spreadMap['create_time'] = $map['pay_time']; + if($map['pay_time']) { + $spreadMap['create_time'] = $map['pay_time']; + } //推广后台 $spreadDataPay = M("coin_pay_order","tab_") ->field("sum(pay_amount) as pay_amount,pay_way") ->where($spreadMap) ->select(false); - - $map['create_time'] = $map['pay_time']; - unset($map['pay_time']); + if ($map['pay_time']) { + $map['create_time'] = $map['pay_time']; + unset($map['pay_time']); + } //充值平台币数据 $depositData = M('deposit','tab_') ->field('sum(pay_amount) as pay_amount,pay_way') @@ -349,6 +352,13 @@ class PayChannelController extends ThinkController ->group('pay_way') ->select(false); + $bindMap['pay_status'] = 1; + $bindMap['pay_way'] = array('egt',1); + $bindMap['game_id'] =$_REQUEST['game_id']; + if ($map['pay_time']) { + $bindMap['create_time'] = $map['pay_time']; + } + $bindRechargeData = M('bind_recharge','tab_') ->field('sum(real_amount) as pay_amount,pay_way') ->where(array('pay_status'=>1,'pay_way'=>array('egt',1),'game_id'=>$_REQUEST['game_id'],'create_time'=>$map['pay_time'])) From 6e5cfb72b4e562c2b35a609a86ce058f31c7149a Mon Sep 17 00:00:00 2001 From: zhengyongxing <as123498@qq.com> Date: Tue, 24 Dec 2019 10:53:09 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B8=A0=E9=81=93=E7=BB=9F=E8=AE=A1bug?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PayChannelController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index e2223f8d7..b43b4e1f7 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -361,7 +361,7 @@ class PayChannelController extends ThinkController $bindRechargeData = M('bind_recharge','tab_') ->field('sum(real_amount) as pay_amount,pay_way') - ->where(array('pay_status'=>1,'pay_way'=>array('egt',1),'game_id'=>$_REQUEST['game_id'],'create_time'=>$map['pay_time'])) + ->where($bindMap) ->select(false); From 261adfa33c95118f18fab23029ec451fdc5fc6ba Mon Sep 17 00:00:00 2001 From: zhengyongxing <as123498@qq.com> Date: Tue, 24 Dec 2019 11:04:13 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B8=A0=E9=81=93=E7=BB=9F=E8=AE=A1bug?= =?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/PayChannelController.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index b43b4e1f7..ab2336694 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -354,7 +354,9 @@ class PayChannelController extends ThinkController $bindMap['pay_status'] = 1; $bindMap['pay_way'] = array('egt',1); - $bindMap['game_id'] =$_REQUEST['game_id']; + if($_REQUEST['game_id']) { + $bindMap['game_id'] =$_REQUEST['game_id']; + } if ($map['pay_time']) { $bindMap['create_time'] = $map['pay_time']; } @@ -364,9 +366,6 @@ class PayChannelController extends ThinkController ->where($bindMap) ->select(false); - -// var_dump($spreadDataPay);die(); - //将语句整合起来查询 $channelData = "select sum(pay_amount) as pay_amount,pay_way from ({$channelData} UNION ALL {$depositData} UNION ALL {$superSignDataPay} UNION ALL {$spreadDataPay} UNION ALL {$bindRechargeData})t group by pay_way;"; // var_dump($channelData);die();