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