推广平台->数据管理->数据管理->订单查询--更新

master
chenxiaojun 5 years ago
parent f596288f31
commit 1af46a74ee

@ -955,4 +955,20 @@ public function auto_rrdae(){
} }
} }
} }
//用户推广员数据刷新
public function updateUserPromoteAccount()
{
$map['promote_id'] = ['gt', 0];
$map['_string'] = "promote_account = '' or promote_account = '自然注册' or promote_account = '官方渠道'";
$userData = M('user', 'tab_')->field('id,promote_id')->where($map)->select();
$userPlayData = M('user_play', 'tab_')->field('id,promote_id')->where($map)->select();
$userPlayInfoData = M('user_play_info', 'tab_')->field('id,promote_id')->where($map)->select();
foreach ($userData as $list) {
$promoteAccount = M('promote', 'tab_')->where(array('id' => $list['promote_id']))->getField('account');
$res = M()->query("update `tab_user` set promote_account = '{$promoteAccount}' where id = {$list['id']}");
}
}
} }

@ -32,7 +32,7 @@ class QueryController extends BaseController
$serverId = trim(I('server_id', '')); $serverId = trim(I('server_id', ''));
$gamePlayerName = trim(I('game_player_name', '')); $gamePlayerName = trim(I('game_player_name', ''));
$userAccount = trim(I('user_account', '')); $userAccount = trim(I('user_account', ''));
$orderNumber = trim(I('order_number', '')); $payOrderNumber = trim(I('pay_order_number', ''));
$nowTime = date('Y-m-d'); $nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime))); $initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime'); $initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
@ -71,8 +71,8 @@ class QueryController extends BaseController
if (!empty($userAccount)) { if (!empty($userAccount)) {
$map['tab_spend.user_account'] = $userAccount; $map['tab_spend.user_account'] = $userAccount;
} }
if (!empty($orderNumber)) { if (!empty($payOrderNumber)) {
$map['tab_spend.order_number'] = $orderNumber; $map['tab_spend.pay_order_number'] = $payOrderNumber;
} }
if (isset($_REQUEST['pay_way']) && $_REQUEST['pay_way'] !== '') { if (isset($_REQUEST['pay_way']) && $_REQUEST['pay_way'] !== '') {
$payWay = intval(I('pay_way')); $payWay = intval(I('pay_way'));
@ -146,7 +146,7 @@ class QueryController extends BaseController
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8); $list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
//订单隐藏算法 //订单隐藏算法
$orderLen = strlen($list['order_number']); $orderLen = strlen($list['pay_order_number']);
$strLen = 4; $strLen = 4;
$hideChar = ''; $hideChar = '';
@ -158,7 +158,7 @@ class QueryController extends BaseController
$hideChar .= '*'; $hideChar .= '*';
} }
$list['order_number'] = substr($list['order_number'], 0, $strLen) . $hideChar . substr($list['order_number'], $orderLen - $strLen); $list['pay_order_number'] = substr($list['pay_order_number'], 0, $strLen) . $hideChar . substr($list['pay_order_number'], $orderLen - $strLen);
} }
} }
@ -172,7 +172,7 @@ class QueryController extends BaseController
$parameter['server_id'] = $serverId; $parameter['server_id'] = $serverId;
$parameter['game_player_name'] = $gamePlayerName; $parameter['game_player_name'] = $gamePlayerName;
$parameter['user_account'] = $userAccount; $parameter['user_account'] = $userAccount;
$parameter['order_number'] = $orderNumber; $parameter['pay_order_number'] = $payOrderNumber;
$parameter['own_id'] = $ownId; $parameter['own_id'] = $ownId;
$parameter['level_promote_2'] = $levelPromote[0]; $parameter['level_promote_2'] = $levelPromote[0];
$parameter['level_promote_3'] = $levelPromote[1]; $parameter['level_promote_3'] = $levelPromote[1];

@ -127,8 +127,8 @@
</div> </div>
<div class="form-group normal_space"> <div class="form-group normal_space">
<input type="text" name="order_number" class="txt normal_txt" placeholder="请输入订单号" <input type="text" name="pay_order_number" class="txt normal_txt" placeholder="请输入订单号"
value="{:I('order_number')}"> value="{:I('pay_order_number')}">
</div> </div>
<div class="form-group normal_space"> <div class="form-group normal_space">
@ -190,7 +190,7 @@
<volist name="listData" id="vo"> <volist name="listData" id="vo">
<tr class="num2"> <tr class="num2">
<td title="玩家ID{$vo.user_id}">{$vo.user_account}</td> <td title="玩家ID{$vo.user_id}">{$vo.user_account}</td>
<td>{$vo.order_number}</td> <td>{$vo.pay_order_number}</td>
<td>{:get_pay_way($vo['pay_way'])}</td> <td>{:get_pay_way($vo['pay_way'])}</td>
<td>{$vo.pay_amount}</td> <td>{$vo.pay_amount}</td>
<td>{$vo.game_name}</td> <td>{$vo.game_name}</td>

Loading…
Cancel
Save