推广平台->数据管理->每日概况|数据汇总--区服检索更新

master
chenxiaojun 5 years ago
commit c68716bbae

@ -111,7 +111,7 @@ class QueryController extends BaseController
$map['tab_spend.is_check'] = ['neq', 2];
$data = M('Spend', 'tab_')
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.chain as chain')
->field('tab_spend.*,tab_promote.account as pro_account,tab_promote.real_name as pro_real_name,tab_promote.chain as chain')
->join('tab_game on tab_spend.game_id = tab_game.id')
->join('left join tab_promote on tab_spend.promote_id = tab_promote.id')
->where($map)
@ -126,31 +126,31 @@ class QueryController extends BaseController
if (!empty($data)) {
foreach ($data as &$list) {
$list['p_p_pro_account'] = $list['pro_account'];
$list['p_p_pro_real_name'] = $list['pro_real_name'];
$list['p_pro_account'] = $list['pro_account'];
$list['p_pro_real_name'] = $list['pro_real_name'];
if(!empty($list['chain'])) {
$chain = trim($list['chain'],'/');
$list['p_p_pro_account'] = $list['pro_account'];
$list['p_p_pro_real_name'] = $list['pro_real_name'];
$list['p_pro_account'] = $list['pro_account'];
$list['p_pro_real_name'] = $list['pro_real_name'];
if (!empty($list['chain'])) {
$chain = trim($list['chain'], '/');
$chainArr = explode('/', $chain);
if(!empty($chainArr[1])) {
$thisPromoteData1 = D('Promote')
->field('account,real_name')
->where(array('id' => $chainArr[1]))
->find();
if (!empty($chainArr[1])) {
$thisPromoteData1 = D('Promote')
->field('account,real_name')
->where(array('id' => $chainArr[1]))
->find();
$list['p_p_pro_account'] = $thisPromoteData1['account']; //部门长
$list['p_p_pro_real_name'] = $thisPromoteData1['real_name'];
}
if(!empty($chainArr[2])) {
$thisPromoteData2 = D('Promote')
->field('account,real_name')
->where(array('id' => $chainArr[2]))
->find();
if (!empty($chainArr[2])) {
$thisPromoteData2 = D('Promote')
->field('account,real_name')
->where(array('id' => $chainArr[2]))
->find();
$list['p_pro_account'] = $thisPromoteData2['account']; //组长
$list['p_pro_real_name'] = $thisPromoteData2['real_name'];
}
}
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
@ -1070,7 +1070,7 @@ class QueryController extends BaseController
{
$relationGameId = intval(I('relation_game_id', 0));
$sdkVersion = intval(I('sdk_version', 0));
$serverId = intval(I('server_id'), 0);
$serverId = I('server_id', '');
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
@ -1110,7 +1110,7 @@ class QueryController extends BaseController
$params['game_id'] = ['in', $gameIds];
}
}
if ($serverId > 0) {
if (!empty($serverId)) {
$params['server_id'] = $serverId;
}
$params['begin_time'] = $begTime;
@ -1230,7 +1230,7 @@ class QueryController extends BaseController
$ownId = intval(I('own_id'), 0);//本账号
$relationGameId = intval(I('relation_game_id', 0));
$sdkVersion = intval(I('sdk_version', 0));
$serverId = intval(I('server_id'), 0);
$serverId = I('server_id', '');
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
$initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
@ -1276,7 +1276,7 @@ class QueryController extends BaseController
$map['a.sdk_version'] = $sdkVersion;
}
$serverJoin = '';
if ($serverId > 0) {
if (!empty($serverId)) {
$serverJoin = 'tab_server as s on s.game_id = a.game_id';
$map['s.server_id'] = $serverId;
$params['server_id'] = $serverId;
@ -2100,7 +2100,7 @@ class QueryController extends BaseController
$this->assign('subPromotes', $subPromotes);
$this->assign('records', $records);
$this->assign('pagination', $pagination);
$this->assign('parentid',$parentId);
$this->assign('parentid', $parentId);
$this->assign('count', $count);
$this->display();
}

Loading…
Cancel
Save