Merge remote-tracking branch 'origin/release-1.0.0' into release-1.0.0

# Conflicts:
#	Application/Admin/Controller/ExportController.class.php
#	Application/Admin/Controller/PlatformController.class.php
master
liuweiwen 5 years ago
commit 4c327a679a

@ -1019,10 +1019,8 @@ class FinanceController extends ThinkController
'pay_source' => 2, 'pay_source' => 2,
'tab_deposit.pay_status' => 1, 'tab_deposit.pay_status' => 1,
'tab_deposit.pay_way' => ['gt', 0], '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') ])->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') ->group('tab_deposit.pay_way')
->select(); ->select();
foreach ($deposit as $key => $value) { 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']]['pay_amount'] = '0.00';
$cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 $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']]['pay_amount'] = '0.00';
$cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 $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; $offcialmap['pay_status'] = 1;
@ -1131,7 +1129,7 @@ class FinanceController extends ThinkController
$cashStatistics[$value['pay_way']]['pay_amount'] = '0.00'; $cashStatistics[$value['pay_way']]['pay_amount'] = '0.00';
$cashStatistics[$value['pay_way']]['balance'] = 0;//别表的平台币充值 $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) { foreach ($cashStatistics as $key => $value) {

@ -298,6 +298,10 @@ class GameController extends ThinkController
$this->error('一句话简介不能超过30个字'); $this->error('一句话简介不能超过30个字');
exit; exit;
} }
if ($_POST['beta_status'] == 1 && empty($_POST['beta_url'])) {
return $this->error("请在Beta按钮开启的情况填写Beta链接");
}
if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) { if (!empty($_POST['beta_url']) && !preg_match("/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/i", $_POST['beta_url'])) {
return $this->error("请填写正确的Beta链接"); return $this->error("请填写正确的Beta链接");
} }
@ -316,6 +320,7 @@ class GameController extends ThinkController
$game = D(self::model_name);//M('$this->$model_name','tab_'); $game = D(self::model_name);//M('$this->$model_name','tab_');
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount']; $_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
$_POST['detail_content'] = $content; $_POST['detail_content'] = $content;
$_POST['pay_config'] = json_encode($_POST['pay_config']);
$res = $game->update(); $res = $game->update();
$id = $res["id"]; $id = $res["id"];
$sibling = D("Game")->find($id); $sibling = D("Game")->find($id);
@ -371,6 +376,7 @@ class GameController extends ThinkController
} else { } else {
$id || $this->error('id不能为空'); $id || $this->error('id不能为空');
$data = D(self::model_name)->detailback($id); $data = D(self::model_name)->detailback($id);
$data['pay_config'] = json_decode($data['pay_config'],true);
$data || $this->error('数据不存在!'); $data || $this->error('数据不存在!');
if (!empty($data['and_dow_address'])) { if (!empty($data['and_dow_address'])) {
$data['and_dow_address'] = ltrim($data['and_dow_address'], '.'); $data['and_dow_address'] = ltrim($data['and_dow_address'], '.');

@ -80,7 +80,6 @@ class PayChannelController extends ThinkController
->where($coinMap) ->where($coinMap)
->sum('tab_deposit.pay_amount'); ->sum('tab_deposit.pay_amount');
// var_dump($coinSum);die(); // var_dump($coinSum);die();
$this->assign('coinSum',$coinSum);
$data = array_merge($data,$coinData); $data = array_merge($data,$coinData);
$data = $this->unique_multi_array($data,'game_id'); $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'] + $sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount'];
$offcialData['pay_amount'] + $bindRechargeData['pay_amount'] + $spreadData['pay_amount']; $sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'] +
$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['test_coin'] = $sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin'];
$sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['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'] .= $key.''.$value." ";
} }
} }
$payTypeDataExport['pay_amount'] .= "平台币直充金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计)".
($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost);
$channelDataExport['game_name'] = '支付渠道'; $channelDataExport['game_name'] = '支付渠道';
foreach($channelData as $key => $value) { foreach($channelData as $key => $value) {
@ -295,6 +296,8 @@ class PayChannelController extends ThinkController
$this->meta_title = "支付渠道统计"; $this->meta_title = "支付渠道统计";
$size = $row;//每页显示的记录数 $size = $row;//每页显示的记录数
$data = array_slice($data, ($arraypage - 1) * $size, $size); $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('sumData',$sumData);
$this->assign('channelData',$channelData); $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); $coinMap['tab_deposit.pay_way'] =$spreadMap['pay_way']=$map['pay_way'] = array('egt',1);
$offcialmap['pay_way'] = array('egt',1); $offcialmap['pay_way'] = array('egt',1);
if (!empty($_REQUEST['pay_way']) || $_REQUEST['pay_way']=='0') { 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']; $map['pay_way'] = $_REQUEST['pay_way'];
$coinMap['tab_deposit.pay_way'] = $_REQUEST['pay_way']; $coinMap['tab_deposit.pay_way'] = $_REQUEST['pay_way'];
$spreadMap['pay_way'] = $_REQUEST['pay_way']; $spreadMap['pay_way'] = $_REQUEST['pay_way'];
@ -563,9 +569,13 @@ class PayChannelController extends ThinkController
foreach ($sumData as $key => $value) { foreach ($sumData as $key => $value) {
if ($value['pay_way']>=1) { if ($value['pay_way']>=1) {
if($model == 'deposit'||$model == 'coin_pay_order') {
$sumAllData['platform_amount'] += $value['pay_amount'];
} else {
$sumAllData['pay_amount'] += $value['pay_amount']; $sumAllData['pay_amount'] += $value['pay_amount'];
} }
} }
}
$this->meta_title = "游戏订单查看"; $this->meta_title = "游戏订单查看";
$sumAllData['sum'] = $sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount']; $sumAllData['sum'] = $sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount'];
@ -769,9 +779,13 @@ class PayChannelController extends ThinkController
foreach ($sumData as $key => $value) { foreach ($sumData as $key => $value) {
if ($value['pay_way']>=1) { if ($value['pay_way']>=1) {
if($model == 'deposit'||$model == 'coin_pay_order') {
$sumAllData['platform_amount'] += $value['pay_amount'];
} else {
$sumAllData['pay_amount'] += $value['pay_amount']; $sumAllData['pay_amount'] += $value['pay_amount'];
} }
} }
}
$sumAllData['sum'] = $sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount']; $sumAllData['sum'] = $sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount'];

@ -64,7 +64,8 @@ class RechargeSumController extends ThinkController
//当天注册人数 //当天注册人数
$registerNum = D('User')->where(array_merge($rmap, array('puid' => 0)))->join("tab_user_play on tab_user.id = tab_user_play.user_id and tab_user.fgame_id = tab_user_play.game_id", 'left')->field("tab_user.id")->select(); $registerNum = D('User')->where(array_merge($rmap, array('puid' => 0)))->join("tab_user_play on tab_user.id = tab_user_play.user_id and tab_user.fgame_id = tab_user_play.game_id", 'left')->field("tab_user.id")->select();
$registerNum = $registerNum ? array_column($registerNum, 'id') : []; $registerNum = $registerNum ? array_column($registerNum, 'id') : [];
// if ($key ==2)
// dd(D('User')->_sql());
//当天活跃人数 //当天活跃人数
$livenNum = D('UserPlay')->where($map)->count("id"); $livenNum = D('UserPlay')->where($map)->count("id");

@ -139,7 +139,7 @@
<notemtpy name = "data"> <notemtpy name = "data">
<volist name="data" id="data"> <volist name="data" id="data">
<tr> <tr>
<td ><if condition="$data.pay_type neq ''">{$data.pay_type}<else/></if></td> <td ><if condition="$data.pay_type neq ''"><if condition="$data.pay_type eq '微信(扫码)'"> 微信<else/>{$data.pay_type}</if><else/></if></td>
<td ><if condition="$data.pay_amount neq ''">{$data.pay_amount}<else/></if></td> <td ><if condition="$data.pay_amount neq ''">{$data.pay_amount}<else/></if></td>
<td ><if condition="$data.balance neq ''">{$data.balance}<else/>0</if></td> <td ><if condition="$data.balance neq ''">{$data.balance}<else/>0</if></td>
<td ><if condition="$data.total neq ''">{$data.total}<else/>0</if></td> <td ><if condition="$data.total neq ''">{$data.total}<else/>0</if></td>

@ -490,6 +490,39 @@
<!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> --> <!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> -->
</td> </td>
</tr> </tr>
<tr>
<td class="l noticeinfo">支付宝</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[zfb]">
<option value="gf" >官方</option>
<option value="sq" >双乾</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">微信</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[wx]">
<option value="gf" selected="selected">官方</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">快捷支付</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[quick]">
<option value="sq" selected="selected">双乾</option>
</select>
</span>
</td>
</tr>
<tr> <tr>
<td class="l noticeinfo">是否开启强更</td> <td class="l noticeinfo">是否开启强更</td>
<td class="r table_radio table_radio2"> <td class="r table_radio table_radio2">

@ -663,6 +663,39 @@
<!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> --> <!-- <span class="notice-text" style="line-height:1.4;width:68%;">ios版游戏内的支付方式二选一默认是第三方支付。上架版选择第三方支付则为wap支付选择苹果内购则为苹果内购非上架版选择第三方支付则为wap支付选择苹果内购则为app支付。金猪支付下支付宝始终是app支付订单充值方式记录为支付宝其它皆为wap支付订单充值方式记录为金猪支付</span> -->
</td> </td>
</tr> </tr>
<tr>
<td class="l noticeinfo">支付宝</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[zfb]">
<option value="gf" <?php echo $data['pay_config']['zfb'] == 'gf' ? "selected" : ''; ?>>官方</option>
<option value="sq" <?php echo $data['pay_config']['zfb'] == 'sq' ? "selected" : ''; ?>>双乾</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">微信</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[wx]">
<option value="gf" selected="selected">官方</option>
</select>
</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">快捷支付</td>
<td class="r table_radio">
<span class="form_select">
<select name="pay_config[quick]">
<option value="sq" selected="selected">双乾</option>
</select>
</span>
</td>
</tr>
<tr> <tr>
<td class="l noticeinfo">是否开启强更</td> <td class="l noticeinfo">是否开启强更</td>
<td class="r table_radio table_radio2"> <td class="r table_radio table_radio2">

@ -71,21 +71,29 @@
</div> </div>
</div> </div>
<div class="input-list input-list-server search_label_rehab"> <!-- <div class="input-list input-list-server search_label_rehab">-->
<select id="pay_way" name="pay_way" class="select_gallery" style="width:120px;"> <!-- <select id="pay_way" name="pay_way" class="select_gallery" style="width:120px;">-->
<option value="">请选择支付渠道</option> <!-- <option value="">请选择支付渠道</option>-->
<option value="1">支付宝</option> <!-- <option value="1">支付宝</option>-->
<option value="2">微信(扫码)</option> <!-- <option value="2">微信(扫码)</option>-->
<option value="3">微信app</option> <!-- <option value="3">微信app</option>-->
<option value="4">威富通</option> <!-- <option value="4">威富通</option>-->
<option value="5">聚宝云</option> <!-- <option value="5">聚宝云</option>-->
<option value="6">竣付通</option> <!-- <option value="6">竣付通</option>-->
<option value="7">金猪</option> <!-- <option value="7">金猪</option>-->
<option value="9">双乾支付-支付宝</option> <!-- <option value="9">双乾支付-支付宝</option>-->
<option value="10">双乾支付-银联</option> <!-- <option value="10">双乾支付-银联</option>-->
<option value="15">双乾支付-快捷</option> <!-- <option value="15">双乾支付-快捷</option>-->
<option value="0">平台币</option> <!-- <option value="0">平台币</option>-->
<option value="-1">绑币</option> <!-- <option value="-1">绑币</option>-->
<!-- </select>-->
<!-- </div>-->
<div class="input-list input-list-spend search_label_rehab">
<select id="pay_way_id" name="pay_way" class="select_gallery" style="width:120px;">
<option value="">充值方式</option>
<volist name=":cash_pay_way()" id="vo">
<option value="{$vo.key}">{$vo.value}</option>
</volist>
</select> </select>
</div> </div>

@ -188,8 +188,8 @@
</tr> </tr>
<tr> <tr>
<td><span>官网</span></td> <td><span>官网</span></td>
<td >{$offcialData['pay_amount']}</td> <td >0</td>
<td>0</td> <td>{$offcialData['pay_amount']}</td>
<td><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$offcialData.test_coin neq ''">{$offcialData.test_coin}<else/>0</if></a></td> <td><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$offcialData.test_coin neq ''">{$offcialData.test_coin}<else/>0</if></a></td>
<td><if condition="$offcialData.pay_amount neq ''">{$offcialData['sum']}<else/>0</if></td> <td><if condition="$offcialData.pay_amount neq ''">{$offcialData['sum']}<else/>0</if></td>
<td> <td>
@ -198,8 +198,8 @@
</tr> </tr>
<tr> <tr>
<td><span>推广后台</span></td> <td><span>推广后台</span></td>
<td ><span><if condition="$spreadData.pay_amount neq ''">{$spreadData['pay_amount']}<else/>0</if></span></td> <td ><span>0</span></td>
<td>0</td> <td>{$spreadData['pay_amount']}</td>
<td>0</td> <td>0</td>
<td><if condition="$spreadData['pay_amount'] neq ''">{$spreadData['sum']}<else/>0</if></td> <td><if condition="$spreadData['pay_amount'] neq ''">{$spreadData['sum']}<else/>0</if></td>
<td> <td>

@ -912,3 +912,7 @@ ALTER TABLE `tab_game`
ADD COLUMN `beta_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Beta版状态'; ADD COLUMN `beta_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Beta版状态';
ALTER TABLE `tab_game` ALTER TABLE `tab_game`
ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接'; ADD COLUMN `beta_url` varchar(150) NOT NULL DEFAULT '' COMMENT 'Beta链接';
-- 游戏支付方式渠道配置
ALTER TABLE `tab_game`
ADD COLUMN `pay_config` varchar(255) NOT NULL COMMENT '支付渠道 wx 微信 zfb 支付宝 quick 快捷 (gf 官方 sq 双乾';
Loading…
Cancel
Save