@ -404,19 +404,28 @@ class FinancePromoteController extends AdminController
$map['game_id'] = ['in',$gameId];
$map['game_id'] = ['in',$gameId];
}
}
if (!empty(I('timestart'))) {
if (isset($_REQUEST['time_start']) & & isset($_REQUEST['time_end'])) {
$timestart = strtotime(I('timestart'));
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
$map['_string'] = "pay_time > {$timestart}";
} elseif (isset($_REQUEST['time_start'])) {
}
$map['pay_time'] = ['GT', strtotime($_REQUEST['time_start'])];
} elseif (isset($_REQUEST['time_end'])) {
if (!empty(I('timeend'))) {
$map['pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
$timeend = strtotime(I('timeend'));
$map['_string'] .= " and pay_time < {$timeend}";
}
}
if (!empty(I("promote_id"))) {
//判断是否有推广员
$promote_id[] = I("promote_id");
if ($_REQUEST['promote_id'] != '') {
if ($_REQUEST['promote_id'] == 0 || $_REQUEST['promote_type'] == 2) {
$map['promote_id'] = $_REQUEST['promote_id'];
} else {
$promoter_ids = D("Promote")->where("chain like '%/{$_REQUEST['promote_id']}/%' or id={$_REQUEST['promote_id']}")->field('id')->select();
if ($promoter_ids) {
$map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
}
}
}
}
// if (!empty(I("promote_id"))) {
// $promote_id[] = I("promote_id");
// }
if (!empty(I("root_id"))) {
if (!empty(I("root_id"))) {
$root_id = I("root_id");
$root_id = I("root_id");
@ -450,7 +459,7 @@ class FinancePromoteController extends AdminController
if (!empty(I('user_nickname'))) {
if (!empty(I('user_nickname'))) {
$map['game_player_name'] = array('like',I("user_nickname").'%');
$map['game_player_name'] = array('like',I("user_nickname").'%');
}
}
// var_dump($map);die();
// var_dump($map);die();
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$field = "pay_order_number,FROM_UNIXTIME(pay_time) as pay_time,user_account,user_nickname,game_name,promote_account,spend_ip,server_name,game_player_name,pay_amount,cost,pay_way";
$group = "";
$group = "";
$order = "pay_time DESC";
$order = "pay_time DESC";