diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index c6d331b20..105483f44 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2078,11 +2078,19 @@ class ExportController extends Controller array('device_number', '设备号'), array('game_name', '游戏'), array('pay_time', '购买时间'), - array('super_money', '超级签金额'), + array('pay_way', '支付方式'), + array('pay_price', '超级签金额'), ); - $xlsData = 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')->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)->order('id DESC')->select(); + $xlsData = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.pay_price,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')->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)->order('id DESC')->select(); foreach($xlsData as $k => $v) { $xlsData[$k]['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); + if($v['pay_way'] == 0) { + $xlsData[$k]['pay_way'] = '未知'; + }elseif ($v['pay_way'] == 1) { + $xlsData[$k]['pay_way'] = '支付宝'; + }elseif ($v['pay_way'] == 2) { + $xlsData[$k]['pay_way'] = '微信'; + } } break; case 24: 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); diff --git a/Application/Admin/View/SuperStatistical/superDetail.html b/Application/Admin/View/SuperStatistical/superDetail.html index cd1885c21..f3c9a31f1 100644 --- a/Application/Admin/View/SuperStatistical/superDetail.html +++ b/Application/Admin/View/SuperStatistical/superDetail.html @@ -116,6 +116,7 @@ 设备号 游戏 购买时间 + 支付方式 超级签金额 @@ -129,6 +130,7 @@ {$vo.device_number} {$vo.game_name} {$vo.pay_time|date='Y-m-d H:i:s',###} + {$vo.pay_way} {$vo.pay_price} @@ -139,6 +141,7 @@ -- -- -- + -- {$super_money_all} diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 2898fb1b7..73395f72c 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1863,7 +1863,7 @@ class QueryController extends BaseController ->field($field) ->join('join tab_user as u on u.id = s.user_id') ->where($map) - ->group('s.game_player_id, s.server_id, s.game_id') + ->group('s.game_player_id, s.server_id, s.game_id, s.user_id') ->having($having) ->buildSql(); $query = M()->alias('record')