@ -89,6 +89,12 @@ class ExportController extends Controller
$map['role_name'] = array('like','%'.trim($_REQUEST['role_name']).'%');
unset($_REQUEST['role_name']);
}
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
if (isset($_REQUEST['promote_id'])) {
$queryStr = '';
if ($_REQUEST['promote_id'] == 0) {
@ -395,6 +401,12 @@ class ExportController extends Controller
}
$hav = '';
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['tab_user.promote_id'] =array('in',$promoteRoot);
}
if ($_REQUEST['promote_id'] != '') {
if($_REQUEST['promote_id']=='UC'){
$maps['tab_user.promote_account'] = 'UC用户';
@ -403,7 +415,12 @@ class ExportController extends Controller
$maps['tab_user.promote_id'] = 0;
$hav .= "tab_user.promote_id = 0";
} else{
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
if ($promoteRoot) {
$promoteRoot = " and id IN({$promoteRoot})";
}
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}.$promoteRoot")->field('id')->select();
if ($promoter_ids) {
$map['tab_user.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
$hav .= "tab_user.promote_id in (" . implode(',', array_column($promoter_ids, 'id')) . ") ";
@ -1052,6 +1069,12 @@ class ExportController extends Controller
$map['pay_game_status'] = $_REQUEST['pay_game_status'];
unset($_REQUEST['pay_game_status']);
}
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
if(isset($_REQUEST['promote_id'])) {
if ($_REQUEST['promote_id'] == 0) {
$map['promote_id'] = 0;
@ -1156,6 +1179,12 @@ class ExportController extends Controller
$map['pay_ip'] = array('like', '%' . trim($_REQUEST['pay_ip']) . '%');
unset($_REQUEST['pay_ip']);
}
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
if (!isset($_REQUEST['promote_id'])) {
} else if (isset($_REQUEST['promote_id']) & & $_REQUEST['promote_id'] == 0) {
@ -1242,6 +1271,15 @@ class ExportController extends Controller
unset($_REQUEST['game_name']);
}
}
$game_ids = array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['sdk_version1']), 'id');
if ($game_ids) {
$map['game_id'] = ['in', $game_ids];
unset($_REQUEST['game_name'], $_REQUEST['sdk_version1']);
}
$map['op_account']=session('user_auth')['username'];
if (isset($_REQUEST['op_account'])) {
if ($_REQUEST['op_account'] == L('All')) {
unset($_REQUEST['op_account']);
@ -1561,6 +1599,8 @@ class ExportController extends Controller
$map['op_id'] = $_REQUEST['op_id'];
}
$map['op_account']=session('user_auth')['username'];
if (isset($_REQUEST['start']) & & isset($_REQUEST['end'])) {
$map['create_time'] = array('BETWEEN', array(strtotime($_REQUEST['start']), strtotime($_REQUEST['end']) + 24 * 60 * 60 - 1));
}
@ -1842,6 +1882,12 @@ class ExportController extends Controller
$startTime = strtotime($startDate);
$endTime = strtotime($endDate) + 86399;
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
if ($promoteId = I('promote_id')) {
if ($promoteId == 0) {
$map['promote_id'] = 0;
@ -2866,6 +2912,12 @@ class ExportController extends Controller
empty(I('pay_status')) || $map['pay_status'] = I('pay_status');
empty(I("account")) || $map['user_account'] = ["like","%".I("account")."%"];
empty(I("time_start")) || $map['create_time'] = ["between",[strtotime(I("time_start")),empty(I("time_end"))?time():strtotime(I("time_end"))+86400-1]];
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
$data = $model->getLists($map,"create_time desc",$p);
$xlsCell = array(
@ -3793,6 +3845,11 @@ if ($key == 'model'){
$map['user_account'] = array('like', '%' . trim($_REQUEST['account']) . '%');
}
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
if (isset($_REQUEST['promote_id'])) {
$map['promote_id'] = $_REQUEST['promote_id'];
}
@ -4148,6 +4205,11 @@ if ($key == 'model'){
array('op_account','发放人员'),
);
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
if(empty($_REQUEST['promote_id']& & $_REQUEST['promote_type'])){
$map['type'] = 1;
$map['source_id'] = 0;
@ -4216,6 +4278,12 @@ if ($key == 'model'){
);
$map['type'] = 2;
$map['source_id'] = 0;
$extend['op_id'] = session('user_auth')['uid'];
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot);
}
if(isset($_REQUEST['promote_id'])) {
$map['promote_id'] = $_REQUEST['promote_id'];
}
@ -4232,6 +4300,7 @@ if ($key == 'model'){
array('create_time','收回时间'),
array('op_account','收回人员'),
);
$extend['op_id'] = session('user_auth')['uid'];
$model = M('user_coin','tab_');
if(isset($_GET['account'])){
$map['user_account']= array('like','%'.I('account').'%') ;
@ -4313,6 +4382,9 @@ if ($key == 'model'){
}
$extend['execute_id'] = session('user_auth')['uid'];
$map['execute_id'] = session('user_auth')['uid'];
$page = intval($_REQUEST['p']);
$page = $page?$page:1;