@ -404,19 +404,28 @@ class FinancePromoteController extends AdminController
$map['game_id'] = ['in',$gameId];
}
if (!empty(I('timestart'))) {
$timestart = strtotime(I('timestart'));
$map['_string'] = "pay_time > {$timestart}";
}
if (!empty(I('timeend'))) {
$timeend = strtotime(I('timeend'));
$map['_string'] .= " and pay_time < {$timeend}";
if (isset($_REQUEST['time_start']) & & isset($_REQUEST['time_end'])) {
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
} elseif (isset($_REQUEST['time_start'])) {
$map['pay_time'] = ['GT', strtotime($_REQUEST['time_start'])];
} elseif (isset($_REQUEST['time_end'])) {
$map['pay_time'] = ['LT', strtotime($_REQUEST['time_end']) + 86399];
}
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"))) {
$root_id = I("root_id");
@ -450,7 +459,7 @@ class FinancePromoteController extends AdminController
if (!empty(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";
$group = "";
$order = "pay_time DESC";
@ -481,7 +490,7 @@ class FinancePromoteController extends AdminController
$from = I('from', '');
$this->display($from);
}
private function gameStatisticsData($map, $row = 0, $page = 1)
{
$map['s.pay_status']=1;