Merge branches 'feature/fee_form' and 'release' of 47.111.118.107:wmtx/platform into feature/fee_form

 Conflicts:
	Application/Admin/Controller/FinanceController.class.php
master
zhengyongxing 5 years ago
commit 6249b6cf81

@ -41,7 +41,7 @@ class AmericaIpForbitController extends ThinkController
$appleInteriorBuyStatus = M('tool','tab_')->where(['name'=>'apple_interior_buy'])->getField('status');
$setAppleInteriorBuyStatus = $appleInteriorBuyStatus?0:1;
$setAppleInteriorBuyStatus = $appleInteriorBuyStatus?1:0;
$page = set_pagination($count, $row);

@ -9,6 +9,7 @@ use Base\Tool\Printer;
use Base\Tool\TaskClient;
use Base\Service\PromoteService;
use GuzzleHttp\Client;
use think\Db;
class ConsoleController extends Think {
@ -366,4 +367,66 @@ class ConsoleController extends Think {
}
}
}
public function coinRecords() {
$deposit = M('deposit', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,create_time as pay_time,2 as record_type')->where(['pay_status'=>1])->select(false);
// $agent = M('agent', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,real_amount as pay_amount,create_time as pay_time,3 as record_type')->where(['pay_status'=>1])->select(false);
// $spend = M('spend', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,pay_time,1 as record_type')->where(['pay_status' => 1,'pay_way'=>0])->select(false);
$query = M('spend', 'tab_')->field('pay_order_number,user_id,user_account,pay_status,pay_way,pay_amount,pay_time,record_type')->where(['pay_status' => 1,'pay_way'=>0])->union($deposit,'pay_time')->select(false);
$model = new \Think\Model();
$datas = $model->table('(' . $query . ') a ')->order('pay_time asc')->select();
foreach ($datas as $key => $data) {
if(empty($data['pay_order_number'])) {
$order = 0;
}else {
$order = $data['pay_order_number'];
}
$data['order_number'] = $order;
$data['user_id'] = $data['user_id'];
$data['value'] = $data['pay_amount'];
$data['before_value'] = 0;
$data['after_value'] = 0;
$data['create_time'] = $data['pay_time'];
if ($data['record_type'] == 1) {
$data['type'] = 'spend';
$data['remark'] ='历史消费spend';
$data['pay_type'] = 1;
$data['value'] = -$data['pay_amount'];
}
if ($data['record_type'] == 2) {
$data['type'] = 'deposit';
$data['remark'] ='历史充值deposit';
$data['pay_type'] = 2;
$data['value'] = $data['pay_amount'];
}
M('value_detail_log', 'tab_')->add($data);
}
echo "success";
}
public function updateValue() {
//$map['type'] = ['neq', '2'];
$valueDetails = M('value_detail_log', 'tab_')->field('user_id')->where($map)->group('user_id')->select();
foreach ($valueDetails as $key => $valueDetail) {
$user_id = $valueDetail['user_id'];
$map['user_id'] = $user_id;
$userValues = M('value_detail_log', 'tab_')->where($map)->select();
$currentValue = 0;
foreach ($userValues as $userValue) {
$id = $userValue['id'];
$userValue['before_value'] = $currentValue;
$userValue['after_value'] = $currentValue + $userValue['value'];
M('value_detail_log', 'tab_')->where(['id' => $id])->save($userValue);
$after_update = M('value_detail_log', 'tab_')->where(['id'=>$id])->find();
$currentValue = $after_update['after_value'];
}
}
}
}

@ -2631,10 +2631,18 @@ class ExportController extends Controller
$map['create_time'] = array('elt', (strtotime($_REQUEST['timeend']) + 86399));
}
$total = 0;
$t = M('value_detail_log', 'tab_')->where($map)->sum('value');
// $valueDetailDatas = M('value_detail_log', 'tab_')->field('order_number, user_id, before_value, value, after_value, create_time, type, remark, pay_type')
// ->where($map)
// ->page($page,$row)
// ->select();
$first = M('value_detail_log', 'tab_')->field('after_value')->where($map)->limit(1)->order('create_time')->select();
if (!empty($first[0]['after_value'])) {
$first = number_format($first[0]['after_value'],2,'.','');
}else {
$first = '0.00';
}
$csvFileName = '平台币明细'.'.csv';
//设置好告诉浏览器要下载excel文件的headers
@ -2665,7 +2673,7 @@ class ExportController extends Controller
$vlaueDetailData['create_time'] = date('Y-m-d H:i:s', $valueDetailData['create_time']);
if($valueDetailData['pay_type'] == 1) {
$vlaueDetailData['type'] = "消费";
$total -= $valueDetailData['value'];
$total += $valueDetailData['value'];
}
if($valueDetailData['pay_type'] == 2) {
$vlaueDetailData['type'] = "充值";
@ -2686,16 +2694,11 @@ class ExportController extends Controller
ob_flush();
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
}
if ($total >= 0) {
$fuhao = '+';
}else {
$fuhao = '-';
}
$alldatas['order_number'] = "汇总(检索时间内所有数据的统计)";
$alldatas['create_time'] = "";
$alldatas['type'] = $fuhao;
$alldatas['value'] = $total;
$alldatas['after_value'] = "";
$alldatas['type'] = "";
$alldatas['value'] = $t;
$alldatas['after_value'] = $first;
mb_convert_variables('GBK', 'UTF-8', $alldatas);
fputcsv($fp, $alldatas);
@ -8895,7 +8898,7 @@ class ExportController extends Controller
} else {
$xlsData = M('promote', 'tab_')->alias('p')
->field('p.id, p.level, p.account, count(if(p2.level = '.($level+1).', 1, null)) as lowerCount, count(if(pdl.type = 1, 1, null)) as signCount, count(if(pdl.type = 2, 1, null)) as tfCount, count(if(pdl.type = 3, 1, null)) as superSignCount')
->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%') and or p2.id = p.id", 'left')
->join("tab_promote p2 on p2.chain like CONCAT(p.chain, p.id, '/%') or p2.id = p.id", 'left')
->join("tab_package_download_log pdl on pdl.promote_id = p2.id $pdlMap", 'left')
->where($map)
->group('p.id')

@ -1258,16 +1258,17 @@ class FinanceController extends ThinkController
$map1['pay_type'] = 1;
$totalSpend = M('value_detail_log', 'tab_')->where($map1)->sum('value');
$totalSpend = empty($totalSpend) ? '0.00' : $totalSpend;
$totalSpend = number_format(abs($totalSpend),2,'.','');
$map2['create_time'] = $map['create_time'];
$map2['pay_type'] = 2;
$deposit = M('value_detail_log', 'tab_')->where($map2)->sum('value');
$deposit= empty($deposit) ? '0.00' : $deposit;
$deposit= empty($deposit) ? '0.00' : number_format($deposit,2,'.','');
$map3['create_time'] = $map['create_time'];
$map3['pay_type'] = 3;
$allpromoteCoin = M('value_detail_log', 'tab_')->where($map3)->sum('value');
$allpromoteCoin = empty($promoteCoin) ? '0.00' : $promoteCoin;
$allpromoteCoin = empty($promoteCoin) ? '0.00' : number_format($allpromoteCoin,2,'.','');
$map4['create_time'] = $map['create_time'];
$banlace = M('value_detail_log', 'tab_')->field('user_id, after_value')->where($map4)->group('user_id')->select();
@ -1275,7 +1276,7 @@ class FinanceController extends ThinkController
foreach($banlace as $k222 => $vvv) {
$banlaceTotal += $vvv['after_value'];
}
$banlaceTotal = number_format($banlaceTotal,2,'.','');
$map['user_id'] = ['in', $ids];
$newValueByTimeDatas = M('value_detail_log', 'tab_')->field('user_id, after_value')->where($map)->group('user_id')->select();
// var_dump($newValueByTimeDatas);die();
@ -1312,7 +1313,7 @@ class FinanceController extends ThinkController
$this->display();
}
public function definiteDetaile() {
public function definiteDetaile($p=1) {
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据
$row=10;
@ -1331,10 +1332,12 @@ class FinanceController extends ThinkController
} elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['create_time'] = array('elt', (strtotime($_REQUEST['timeend']) + 86399));
}
$total = 0;
$total = '0.00';
$t = M('value_detail_log', 'tab_')->where($map)->sum('value');
$valueDetailDatas = M('value_detail_log', 'tab_')->field('order_number, user_id, before_value, value, after_value, create_time, type, remark, pay_type')
->where($map)
->page($page,$row)
->order('create_time desc')
->select();
$counts = M('value_detail_log', 'tab_')->field('id')
->where($map)
@ -1347,7 +1350,7 @@ class FinanceController extends ThinkController
$vlaueDetailDatas[$key]['pay_type'] = $valueDetailData['pay_type'];
if($valueDetailData['pay_type'] == 1) {
$vlaueDetailDatas[$key]['type'] = "消费";
$total -= $valueDetailData['value'];
$total += $valueDetailData['value'];
}
if($valueDetailData['pay_type'] == 2) {
$vlaueDetailDatas[$key]['type'] = "充值";
@ -1358,20 +1361,24 @@ class FinanceController extends ThinkController
$total += $valueDetailData['value'];
}
}
if($total >= 0 ) {
$fuhao = '+';
if (!empty($vlaueDetailDatas[0]['after_value'])) {
$totalAfterValue = number_format($vlaueDetailDatas[0]['after_value'],2,'.','');
}else {
$fuhao = '-';
$totalAfterValue = '0.00';
}
$total = number_format($total,2,'.','');
// if($total >= 0 ) {
// $fuhao = '+';
// }else {
// $fuhao = '-';
// }
$page = set_pagination($counts,$row);
if($page) {$this->assign('_page', $page);}
$this->assign('fuhao', $fuhao);
$this->assign('total', $total);
$this->assign('total', $t);
$this->assign('listdata', $vlaueDetailDatas);
$this->assign('totalAfterValue', $totalAfterValue);
$this->display();
}

@ -149,7 +149,8 @@ class RepairController extends ThinkController {
'pay_order_number' => $orderNo,
'pay_status' => 0
])->save([
'pay_status' => 1
'pay_status' => 1,
'payed_time' => time()
]);
if ($r) {

@ -548,7 +548,7 @@ class TestResourceController extends ThinkController
$used_resource = $used_resource ?: 0;
$usable_resource = $allVerifyValue - $used_resource;//小于等于这个值自动审核
$usable_resource -= $resource;
if ($data['apply_resource'] <= $usable_resource&&$data['apply_resource']<$availableBalance) {
if ($data['apply_resource'] <= $usable_resource&&$data['apply_resource']<=$availableBalance) {
$data['verify_remark'] = '自动审核';
$data['verify_resource']= $data['apply_resource'];
$data['verify_time'] = time();

@ -287,11 +287,11 @@ class TimingController extends AdminController {
$data = M('spend','tab_')
->field("sum(`pay_amount`) as pay_amount,promote_id,promote_account,tab_spend.game_id,tab_spend.game_name,tab_spend.server_id,tab_spend.server_name,CASE WHEN old_value_ratio is NULL THEN 0 ELSE sum(`pay_amount`) * old_value_ratio END as available_balance")
->join('left join tab_resource_verify_config as config on tab_spend.game_id = config.game_id')
->join('left join tab_resource_verify_config as config on tab_spend.game_id = config.game_id and config.status = 1')
->where(['pay_status'=>1,'pay_way'=>['egt',1],'pay_time'=>['between',[$start,$start+86399]]])
->group('promote_id,game_id,server_id')
->select();
// var_dump($data);die();
// dump($data);die();
foreach ($data as $key => $value) {

@ -185,19 +185,23 @@
transition: all 0.1s ease-in;
}
a:hover {
color: transparent;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">ip限制白名单</h3>
<p class="description_text">说明:苹果内购白名单,名单中的用户支付成功可通知游戏</p>
<div class="demo">
<div class="wrap" ><span style="float: right;margin-top: 7px;margin-right: 120px"></span>
<input type="checkbox" id="checkbox_c2" class="chk_3" <if condition="$apple_interior_buy eq 1">checked</if> /><label for="checkbox_c2" style="float: right;margin-right: 5px" onclick="setAppleInteriorBuyStatus({$set_apple_interior_buy})"></label>
<span style="float: right;margin-top: 7px;margin-right: 5px"></span>
<span style="float: right;margin-top: 7px;margin-right: 30px">全游戏苹果内购支付成功通知默认限制</span>
</div>
</div>
<!-- <div class="demo">-->
<!-- <div class="wrap" ><span style="float: right;margin-top: 7px;margin-right: 120px">开</span>-->
<!-- <input type="checkbox" id="checkbox_c2" class="chk_3" <if condition="$apple_interior_buy eq 1">checked</if> /><label for="checkbox_c2" style="float: right;margin-right: 5px" onclick="setAppleInteriorBuyStatus({$set_apple_interior_buy})"></label>-->
<!-- <span style="float: right;margin-top: 7px;margin-right: 5px">关</span>-->
<!-- <span style="float: right;margin-top: 7px;margin-right: 30px">全游戏苹果内购支付成功通知默认限制</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="fr">-->
<!-- <a class="tabchose" href="">游戏充值统计</a>-->
<!-- <a class="" href="{:U('Finance/payTypeStatistics')}">充值方式统计</a>-->
@ -517,7 +521,15 @@
function setAppleInteriorBuyStatus(status) {
layer.confirm('【警告】是否确认打开全游戏苹果内购支付成功通知', {
var text = '【警告】是否确认打开全游戏苹果内购支付成功通知';
if(status == 0) {
text = '【警告】是否确认关闭全游戏苹果内购支付成功通知';
}
layer.confirm(text, {
btn: ['确认','取消'],
area: ['380px','120px'],
title: false

@ -108,7 +108,7 @@
<!-- 列表 -->
<tbody>
<empty name="show_data">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<td colspan="12" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="show_data" id="vo">
<tr>

@ -114,7 +114,7 @@
<tbody>
<empty name="data.data" >
<tr>
<td colspan="7" class="text-center"> aOh! 暂时还没有内容! </td>
<td colspan="8" class="text-center"> aOh! 暂时还没有内容! </td>
</tr>
<else />
<volist name="data.data" id="vo">

@ -139,7 +139,7 @@
<!-- 列表 -->
<tbody>
<empty name ="list_data">
<td colspan="11" class="text-center">aOh! 暂时还没有内容!</td>
<td colspan="12" class="text-center">aOh! 暂时还没有内容!</td>
<else />
<volist name="list_data" id="data">
<tr>

@ -118,7 +118,7 @@
<th>充值方式</th>
<th>
<a class="paixu" data-order='create_time'>
充值时间
支付时间
</a>
</th>
<th>订单状态</th>

@ -101,10 +101,12 @@
</empty>
<tr>
<td>汇总(检索时间内所有数据的统计)</td>
<td colspan="8">
<if condition="$total egt 0"><span style="color:red">{$fuhao}</span><else/><span style="color:green">{$fuhao}</span></if>
<td colspan="3">
<if condition="$total egt 0"><span style="color:red">{$total}</span><else/><span style="color:green">{$total}</span></if>
</td>
<td colspan="1">
<span >{$totalAfterValue}</span>
</td>
</tr>
</tbody>
</table>

@ -170,7 +170,7 @@
<!-- 列表 -->
<tbody>
<empty name="list_data">
<td colspan="17" class="text-center">aOh! 暂时还没有内容!</td>
<td colspan="18" class="text-center">aOh! 暂时还没有内容!</td>
<else/>
<volist name="list_data" id="data">
<tr>

@ -43,6 +43,7 @@
<div class="input-list search-title-box">
<label>搜索:</label>
<input type="hidden" name="pid" value="{:I('pid')}">
<input type="hidden" name="level" value="{:I('level')}">
</div>
<div class="input-list" >
<input type="text" id="time-start" name="create_time_start" class="" value="{:I('create_time_start')}" placeholder="创建开始时间" />

@ -76,7 +76,7 @@
<input type="text" id='user_account' name='user_account' value="{:I('user_account')}" placeholder="玩家账号">
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="type" class="select_gallery promote-id" name="type" data-title="会长账号">
<select id="type" class="select_gallery" name="type" data-title="会长账号">
<option value="">类型</option>
<?php foreach($types as $index => $item):?>
<option value="{$index}" <?php if (I('type') == $index):?>selected<?php endif;?> >{$item}</option>

@ -105,17 +105,22 @@
<div <?php if (empty($data['process_log']) || $data['type'] == 1):?>hidden<?php endif;?> >
<div style="font-size:large;">工单进度</div>
<div style="width: 600px;border: 0.5px solid #000;height: 100%;padding-top: 20px;padding-right: 50px;padding-left: 50px;margin-bottom: 50px;">
<div style="width: 600px;border: 0.5px solid #000;height: 700px;padding-top: 20px;padding-right: 50px;padding-left: 50px;margin-bottom: 50px;overflow: scroll;">
<?php foreach($data['process_log'] as $index => $log):?>
<p style="font-weight: bold;font-size: medium;margin-top: 10px;">{$index+1}. {$log['title']}</p>
<?php if ($log['type'] == 2):?>
<?php foreach($log['detail'] as $detail):?>
<p style="margin-left: 20px;">--<?php echo $detail['key_name'] . " 旧值:".$detail['old']." 新值:".$detail['new'] ?></p>
<?php endforeach;?>
<?php elseif($log['type'] == 3):?>
<p style="margin-left: 20px;"><label>内容:</label><span style="color: gray;">{$log['detail']}</span></p>
<?php endif;?>
<?php endforeach;?>
<p style="font-weight: bold;font-size: medium;margin-top: 10px;">{$index+1}. {$log['title']}</p>
<?php if ($log['type'] == 2):?>
<?php foreach($log['detail'] as $detail):?>
<p style="margin-left: 20px;word-break: break-all;">
<span style="color: blue;">--<?php echo $detail['key_name'];?></span></br>
<span style="color: red;font-size: x-small;">旧值:</span></br>
<span><?php echo $detail['old'];?></span></br>
<span style="color: red;font-size: x-small;">新值:</span></br>
<span><?php echo $detail['new'];?></span>
<?php endforeach;?>
<?php elseif($log['type'] == 3):?>
<p style="margin-left: 20px;"><label>内容:</label><span style="color: gray;">{$log['detail']}</span></p>
<?php endif;?>
<?php endforeach;?>
</div>
</div>
</div>

@ -240,12 +240,17 @@
<div <?php if (empty($data['process_log']) || $data['type'] == 1):?>hidden<?php endif;?> >
<div style="font-size:large;">工单进度</div>
<div style="width: 600px;border: 0.5px solid #000;height: 100%;padding-top: 20px;padding-right: 50px;padding-left: 50px;margin-bottom: 50px;">
<div style="width: 600px;border: 0.5px solid #000;height: 700px;padding-top: 20px;padding-right: 50px;padding-left: 50px;margin-bottom: 50px;overflow: scroll;">
<?php foreach($data['process_log'] as $index => $log):?>
<p style="font-weight: bold;font-size: medium;margin-top: 10px;">{$index+1}. {$log['title']}</p>
<?php if ($log['type'] == 2):?>
<?php foreach($log['detail'] as $detail):?>
<p style="margin-left: 20px;">--<?php echo $detail['key_name'] . " 旧值:".$detail['old']." 新值:".$detail['new'] ?></p>
<p style="margin-left: 20px;word-break: break-all;">
<span style="color: blue;">--<?php echo $detail['key_name'];?></span></br>
<span style="color: red;font-size: x-small;">旧值:</span></br>
<span><?php echo $detail['old'];?></span></br>
<span style="color: red;font-size: x-small;">新值:</span></br>
<span><?php echo $detail['new'];?></span>
<?php endforeach;?>
<?php elseif($log['type'] == 3):?>
<p style="margin-left: 20px;"><label>内容:</label><span style="color: gray;">{$log['detail']}</span></p>

@ -67,12 +67,8 @@ class PromoteCoinRecordService {
return $items;
}
public function addRecord($params,$valueDetailData = []) {
public function addRecord($params) {
$data = $this->createRecord($params);
if(!empty($valueDetailData)) {
$valueDetailData['order_number'] = $data['sn'];
addValueDetail($valueDetailData);
}
return M('PromoteCoinRecord', 'tab_')->add($data);
}

@ -515,17 +515,7 @@ class PromoteService {
'remark' => $remark,
];
$valueDetailData = [
'user_id' => $userId,
'before_value' => $before_value,
'value' => $num,
'after_value' => $num + $before_value,
'create_time' => time(),
'type' => 1,
'remark' => $remark,
'pay_type' => 3,
];
$promoteCoinRecordService->addRecord($fromRecord, $valueDetailData);
$promoteCoinRecordService->addRecord($fromRecord);
$incStatus = M('user_play', 'tab_')->where(['game_id' => $gameId, 'user_id' => $userId])->setInc('bind_balance', $num);
$decStatus = $this->decCoin($promoteId, $num, $isUseBind ? $gameId : 0);

@ -2358,6 +2358,7 @@ public function iosDetailExcelInfo($id,$map) {
}
$rs = M('promote', 'tab_')->field(['id'])->where($map1)->select();
$allids = array_column($rs, 'id');
array_push($allids, PID);
$allUserMap['promote_id'] = ['in', $allids];
$allTFMap['promote_id'] = ['in', $allids];
$allTFMap['type'] = 2;
@ -2386,12 +2387,20 @@ public function iosDetailExcelInfo($id,$map) {
$data = M('promote', 'tab_')->field(['id'])->where($map1)
->limit(($i-1)*$perSize ,$perSize)->select();
$ids = array_column($data, 'id');
if ($i == 1) {
array_unshift($ids, PID);
}
foreach($ids as $key => $id) {
$promote1 = M('promote', 'tab_')->field('account, level, parent_id, chain')->where(['id' => $id])->select();
$promote = $promote1[0];
$chain = $promote['chain'];
//$csvData['promote_id'] = $id;
$csvData['account'] = $promote['account'];
if($id == PID) {
$csvData['account'] = $promote['account'].'[自己]';
}else {
$csvData['account'] = $promote['account'];
}
$tfMap['promote_id'] = $id;
$tfMap['type'] = 2;
$companyMap['promote_id'] = $id;

@ -2519,10 +2519,15 @@ class QueryController extends BaseController
$query = M('promote', 'tab_')->field(['id'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query);
$ids = array_column($promotes, 'id');
if ($page == 1) {
array_push($ids, PID);
}
// var_dump($ids);die();
// $ids = M('promote', 'tab_')->where($map)->getField('id', true);
// $ids[] = $queryPromote['id'];
$allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select();
$allids = array_column($allPromote, 'id');
array_push($allids, PID);
$map = [];
$map['tab_package_download_log.promote_id'] = ['in', $ids];
@ -2545,7 +2550,11 @@ class QueryController extends BaseController
$promote = $promote1[0];
$chain = $promote['chain'];
$listData[$key]['promote_id'] = $id;
$listData[$key]['account'] = $promote['account'];
if($id == PID) {
$listData[$key]['account'] = $promote['account'].'<span style="color:blue;">'.'['.'自己'.']'.'</span>';
}else {
$listData[$key]['account'] = $promote['account'];
}
$tfMap['promote_id'] = $id;
$tfMap['type'] = 2;
$companyMap['promote_id'] = $id;

@ -500,7 +500,7 @@ class TestResourceController extends BaseController
$used_resource = $used_resource ?: 0;
$usable_resource = $allVerifyValue - $used_resource;//小于等于这个值自动审核
$usable_resource -= $resource;
if ($data['apply_resource'] <= $usable_resource&&$data['apply_resource']<$availableBalance) {
if ($data['apply_resource'] <= $usable_resource&&$data['apply_resource']<=$availableBalance) {
$data['verify_remark'] = '自动审核';
$data['verify_resource']= $data['apply_resource'];
$data['verify_time'] = time();

@ -23,9 +23,13 @@ class SsgController extends BaseController {
const CODE_ERROR = -97; //验证码错误
const RETURN_SUCCESS = 1;
const RETURN_FALSE = 2;
const signprice = 10; //充值金额
public $signprice = 10; //充值金额
public function _initialize()
{
parent::_initialize();
$this->signprice = C("SIGN_PRICE")?:10;
}
public function login()
{
$promoteId = I("promote_id", 0);
@ -511,7 +515,7 @@ class SsgController extends BaseController {
exit();
}
$this->assign("price", self::signprice);
$this->assign("price", $this->signprice);
//$this->assign("order_id", $orderId);
$this->assign("game_id",$gameId);
$this->assign("game_name",$gameInfo['game_name']);
@ -530,7 +534,7 @@ class SsgController extends BaseController {
}
$gameId = I("game_id", 0);
$paytype = I("pay_type", 'ali');
$price = self::signprice;
$price = $this->signprice;
$userId = $user['user_id'];
if (!$userId || !$gameId) {
//$this->error("参数有误!");
@ -682,18 +686,29 @@ class SsgController extends BaseController {
// 获取授权码
$list = $ipa365->ticketList(array(
'token' => $token,
'status'=>0,//未使用是0
'limit' => $i,
)); // @todo: 并发授权码已分配的情况
if($list['errno'] != 0){
$this->assign("error","超级签获取失败~{$list['errmsg']}");
$this->display('blank');
exit();
}
$code = $list['data']['list'][$i-1]['code'];
$codeExists = M('game_supersign', 'tab_')->field('id')->where(array(
'ticket' => $code,
))->find();
if (!$codeExists) {
break;
if($code){
$codeExists = M('game_supersign', 'tab_')->field('id')->where(array(
'ticket' => $code,
))->find();
if (!$codeExists) {
break;
}
}else{
$this->assign("error","超级签已售罄~");
$this->display('blank');
exit();
}
$i ++;
}
$game = M('game', 'tab_')->where(array(
'id' => $gameId,
))->find();

@ -1439,7 +1439,7 @@ CREATE TABLE `tab_work_order_info` (
`server_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区服ID',
`server_name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`role_name` varchar(255) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`score` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '评价分数',
`score` tinyint(1) unsigned NOT NULL DEFAULT '5' COMMENT '评价分数',
`attachment_url` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '附件ID',
`feedback` varchar(1000) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`status` tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '单号状态 1完成 2失败 3等待',

Loading…
Cancel
Save