From befc2ef62bbf1e1a80a4baefad5d1b912b791df5 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Thu, 26 Dec 2019 17:23:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AD=BE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/SuperStatisticalController.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/SuperStatisticalController.class.php b/Application/Admin/Controller/SuperStatisticalController.class.php index 7e1484ed8..19a44ca51 100644 --- a/Application/Admin/Controller/SuperStatisticalController.class.php +++ b/Application/Admin/Controller/SuperStatisticalController.class.php @@ -8,6 +8,12 @@ class SuperStatisticalController extends ThinkController private $ticketList_url = 'https://app.ipa365.com/Kirin/OpenApi/TicketList'; + private $pay_way = [ + 0 => '未知', + 1 => '支付宝', + 2 => '微信', + ]; + public function index() { $params = I('get.'); $startDate = empty($params['timestart']) ? '': $params['timestart']; @@ -148,9 +154,12 @@ class SuperStatisticalController extends ThinkController if(isset($params['game_id'])) { $map['tab_game_supersign.game_id'] = $params['game_id']; } - $data = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time,tab_game_supersign.pay_price')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->page($page,$row)->order('id DESC')->select(); + $data = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.pay_way,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time,tab_game_supersign.pay_price')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->page($page,$row)->order('id DESC')->select(); $count = M('game_supersign', 'tab_')->field('tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where($map)->count(); + foreach($data as $k => $v) { + $data[$k]['pay_way'] = $this->pay_way[$v['pay_way']]; + } $pay_price = M('game_supersign', 'tab_')->field('sum(pay_price) as pay_price')->where($map)->select(); $super_money_all = $pay_price[0]['pay_price'] == '' ? 0 : $pay_price[0]['pay_price']; $page = set_pagination($count, $row);