diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index c6d331b20..931b8da20 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2451,8 +2451,8 @@ class ExportController extends Controller ->select(); // dd($data); $map2 = array(); - $map['fgame_id'] = array('egt', 0); - $map['puid'] = 0; + $map2['fgame_id'] = array('egt', 0); + $map2['puid'] = 0; setPowerPromoteIds($map2); $data2 = $user->field('fgame_id,count(IF(register_time ' . $today . ',1,null)) as today, diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 72e6bee61..76b31514d 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -1019,10 +1019,8 @@ class FinanceController extends ThinkController 'pay_source' => 2, 'tab_deposit.pay_status' => 1, 'tab_deposit.pay_way' => ['gt', 0], - 'extend'=>['eq',''] - ,'tab_deposit.create_time'=>$time, + 'tab_deposit.create_time'=>$time, ])->field('tab_deposit.pay_way,"" as pay_type, SUM(tab_deposit.pay_amount) AS balance') - ->join("inner join tab_pay_info on tab_pay_info.order_id=tab_deposit.pay_order_number") ->group('tab_deposit.pay_way') ->select(); foreach ($deposit as $key => $value) { @@ -1076,7 +1074,7 @@ class FinanceController extends ThinkController $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } - $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 + $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 } //推广后台 @@ -1101,7 +1099,7 @@ class FinanceController extends ThinkController $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } - $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 + $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 } //官网充值 $offcialmap['pay_status'] = 1; @@ -1131,7 +1129,7 @@ class FinanceController extends ThinkController $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 } - $cashStatistics[$value['pay_way']]['pay_amount'] += $value['pay_amount'];//别表的平台币充值 + $cashStatistics[$value['pay_way']]['balance'] += $value['pay_amount'];//别表的平台币充值 } foreach ($cashStatistics as $key => $value) { diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index c0a53ccf6..0e704efb2 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -80,7 +80,6 @@ class PayChannelController extends ThinkController ->where($coinMap) ->sum('tab_deposit.pay_amount'); // var_dump($coinSum);die(); - $this->assign('coinSum',$coinSum); $data = array_merge($data,$coinData); $data = $this->unique_multi_array($data,'game_id'); @@ -251,9 +250,9 @@ class PayChannelController extends ThinkController } //汇总数据 - $sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + - $offcialData['pay_amount'] + $bindRechargeData['pay_amount'] + $spreadData['pay_amount']; - $sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin']; + $sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount']; + $sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'] + + $offcialData['pay_amount'] + $spreadData['pay_amount']; $sumData['test_coin'] = $sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin']; $sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin']; @@ -277,6 +276,8 @@ class PayChannelController extends ThinkController $payTypeDataExport['pay_amount'] .= $key.':'.$value." "; } } + $payTypeDataExport['pay_amount'] .= "平台币直充金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计):". + ($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost); $channelDataExport['game_name'] = '支付渠道'; foreach($channelData as $key => $value) { @@ -295,6 +296,8 @@ class PayChannelController extends ThinkController $this->meta_title = "支付渠道统计"; $size = $row;//每页显示的记录数 $data = array_slice($data, ($arraypage - 1) * $size, $size); + //平台币直充金额,下面列表 + $this->assign('coinSum',$coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost); $this->assign('sumData',$sumData); $this->assign('channelData',$channelData); @@ -438,6 +441,9 @@ class PayChannelController extends ThinkController $coinMap['tab_deposit.pay_way'] =$spreadMap['pay_way']=$map['pay_way'] = array('egt',1); $offcialmap['pay_way'] = array('egt',1); if (!empty($_REQUEST['pay_way']) || $_REQUEST['pay_way']=='0') { + if ($_REQUEST['pay_way']=="2") { + $_REQUEST['pay_way'] = ['in', '2,3,4']; + } $map['pay_way'] = $_REQUEST['pay_way']; $coinMap['tab_deposit.pay_way'] = $_REQUEST['pay_way']; $spreadMap['pay_way'] = $_REQUEST['pay_way']; @@ -463,6 +469,7 @@ class PayChannelController extends ThinkController // var_dump($spendData);die(); $coinMap['pay_status'] = 1; $coinMap['pay_source'] = 2; + $coinMap['extend'] = ''; $coinData = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account, @@ -562,7 +569,11 @@ class PayChannelController extends ThinkController foreach ($sumData as $key => $value) { if ($value['pay_way']>=1) { - $sumAllData['pay_amount'] += $value['pay_amount']; + if($model == 'deposit'||$model == 'coin_pay_order') { + $sumAllData['platform_amount'] += $value['pay_amount']; + } else { + $sumAllData['pay_amount'] += $value['pay_amount']; + } } } @@ -637,6 +648,9 @@ class PayChannelController extends ThinkController ->select(false); // var_dump($spendData);die(); $coinMap['pay_status'] = 1; + $coinMap['pay_source'] = 2; + $coinMap['extend'] = ''; + $coinData = M('pay_info','tab_') ->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number") ->field("pay_order_number,tab_deposit.create_time as pay_time,tab_deposit.user_account,tab_pay_info.game_name,tab_deposit.promote_account, @@ -765,7 +779,11 @@ class PayChannelController extends ThinkController foreach ($sumData as $key => $value) { if ($value['pay_way']>=1) { - $sumAllData['pay_amount'] += $value['pay_amount']; + if($model == 'deposit'||$model == 'coin_pay_order') { + $sumAllData['platform_amount'] += $value['pay_amount']; + } else { + $sumAllData['pay_amount'] += $value['pay_amount']; + } } } diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index a7acbcf85..cdbf674c5 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -58,8 +58,8 @@ class PlatformController extends ThinkController ->select(); // dd($data); $map2 = array(); - $map['fgame_id'] = array('egt', 0); - $map['puid'] = 0; + $map2['fgame_id'] = array('egt', 0); + $map2['puid'] = 0; setPowerPromoteIds($map2); $data2 = $user->field('fgame_id,count(IF(register_time ' . $today . ',1,null)) as today, diff --git a/Application/Admin/Controller/ServerController.class.php b/Application/Admin/Controller/ServerController.class.php index bfdd48ea1..0af4e3057 100644 --- a/Application/Admin/Controller/ServerController.class.php +++ b/Application/Admin/Controller/ServerController.class.php @@ -10,7 +10,12 @@ use Admin\Event\BatchImportExcelEvent; class ServerController extends ThinkController { const model_name = 'Server'; - public function lists(){ + public function lists($p=0){ + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $arraypage = $page; //默认显示第一页数据 + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + if(isset($_REQUEST['show_status'])){ $extend['show_status']=$_REQUEST['show_status']; unset($_REQUEST['show_status']); @@ -50,11 +55,19 @@ class ServerController extends ThinkController { $this->assign('show_status',1); } - $this->m_title = '区服列表'; - $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Server/lists','status'=>1])->find()); - + $this->m_title = '区服列表'; + $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Server/lists','status'=>1])->find()); - parent::order_lists(self::model_name,$_GET["p"],$extend); + $data = M("Server","tab_")->field("id,game_name,server_name,server_id,show_status,start_time,server_version,developers")->where($extend)->page($page,$row)->select(); + foreach($data as $k=>&$v){ + $v["start_time"] = set_show_time($v["start_time"]); + $v["server_version"] = get_systems_name($v["server_version"]); + } + $count = M("Server","tab_")->where($extend)->count("id"); + $this->assign('list_data', $data); + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + $this->display(); } public function add(){ diff --git a/Application/Admin/Controller/ServerNoticeController.class.php b/Application/Admin/Controller/ServerNoticeController.class.php index 59725c784..8f6974eb1 100644 --- a/Application/Admin/Controller/ServerNoticeController.class.php +++ b/Application/Admin/Controller/ServerNoticeController.class.php @@ -225,7 +225,7 @@ class ServerNoticeController extends ThinkController { - /** + /** * 区服状态修改 * @author 鹿文学 */ @@ -252,6 +252,36 @@ class ServerNoticeController extends ThinkController { $this->error($msg.'失败'); } } + /*** + * 获取区服列表 + */ + public function getGameServer() + { + $game_name = $_REQUEST['game_name']; + $sdk_version = $_REQUEST['sdk_version']; + $game_map = []; + if ($game_name) { + $game_map['relation_game_name'] = $game_name; + }else { + $this->AjaxReturn([]); + } + if ($sdk_version) { + $map['server_version'] = $game_map['sdk_version'] = $sdk_version; + }else { + $this->AjaxReturn([]); + } + $game = M("Game", 'tab_')->where($game_map)->getField('id', true); + + // 获取版本信息 + $map = []; + if ($game) { + $map['game_id'] = ['in', $game]; + } else { + $map['game_id'] = ['in', [-1]]; + } + $data = M('ServerNotice', 'tab_')->field('id, server_name, server_id')->where($map)->group('server_name')->select(); + $this->AjaxReturn($data); + } diff --git a/Application/Admin/View/Finance/payTypeStatistics.html b/Application/Admin/View/Finance/payTypeStatistics.html index 3c1f1eaf0..c32f57384 100644 --- a/Application/Admin/View/Finance/payTypeStatistics.html +++ b/Application/Admin/View/Finance/payTypeStatistics.html @@ -86,11 +86,11 @@