|
|
|
@ -561,36 +561,49 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$gameId = implode(',',array_column($gameId,'id'));
|
|
|
|
|
$map['tab_spend.game_id'] = ['in',$gameId];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I('timestart'))) {
|
|
|
|
|
$timestart = strtotime(I('timestart'));
|
|
|
|
|
$map['_string'] = "pay_time > {$timestart}";
|
|
|
|
|
if (!empty(I("game_id"))) {
|
|
|
|
|
$map['tab_spend.game_id'] = I("game_id");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I('timeend'))) {
|
|
|
|
|
$timeend = strtotime(I('timeend'));
|
|
|
|
|
$map['_string'] .= " and pay_time < {$timeend}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I("promote_id"))) {
|
|
|
|
|
$promote_id[] = I("promote_id");
|
|
|
|
|
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("root_id"))) {
|
|
|
|
|
$root_id = I("root_id");
|
|
|
|
|
$promote_id = $this->getPromoteList($root_id);
|
|
|
|
|
array_push($promote_id, $root_id);
|
|
|
|
|
if ($_REQUEST['promote_id'] != '') {
|
|
|
|
|
if ($_REQUEST['promote_id'] == 0 || $_REQUEST['promote_type'] == 2) {
|
|
|
|
|
$map['tab_spend.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['tab_spend.promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['root_id']=='0') {
|
|
|
|
|
$map['tab_spend.promote_id'] = $_REQUEST['root_id'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promote_id = implode(',',$promote_id);
|
|
|
|
|
if ($promote_id) {
|
|
|
|
|
$map['tab_spend.promote_id'] = ['in',$promote_id];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (!empty(I("promote_id"))) {
|
|
|
|
|
// $promote_id[] = I("promote_id");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if (!empty(I("root_id"))) {
|
|
|
|
|
// $root_id = I("root_id");
|
|
|
|
|
// $promote_id = $this->getPromoteList($root_id);
|
|
|
|
|
// array_push($promote_id, $root_id);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if ($_REQUEST['root_id']=='0') {
|
|
|
|
|
// $map['tab_spend.promote_id'] = $_REQUEST['root_id'];
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// $promote_id = implode(',',$promote_id);
|
|
|
|
|
// if ($promote_id) {
|
|
|
|
|
// $map['tab_spend.promote_id'] = ['in',$promote_id];
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
$page = intval($p);
|
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
|
if (isset($_REQUEST['row'])) {
|
|
|
|
@ -599,9 +612,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$row = 10;
|
|
|
|
|
}
|
|
|
|
|
$map['pay_status'] = 1;
|
|
|
|
|
if (!empty(I("game_id"))) {
|
|
|
|
|
$map['tab_spend.game_id'] = I("game_id");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I('user_account'))) {
|
|
|
|
|
$map['tab_spend.user_account'] = array('like','%'.I("user_account").'%');
|
|
|
|
|
}
|
|
|
|
|