|
|
|
@ -721,11 +721,20 @@ class UserEvent extends BaseEvent {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function arpu_analysis() {
|
|
|
|
|
$promote = M('promote', 'tab_')->where(['id' => session('promote_auth.pid')])->find();
|
|
|
|
|
$map = [
|
|
|
|
|
'_logic' => 'or',
|
|
|
|
|
'id' => $promote['id'],
|
|
|
|
|
'parent_id' => $promote['id'],
|
|
|
|
|
'grand_id' => $promote['id'],
|
|
|
|
|
];
|
|
|
|
|
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
|
|
|
|
|
|
|
|
|
|
if (IS_POST && $_POST['time_start'] && $_POST['time_end']) {
|
|
|
|
|
$request = $_REQUEST;
|
|
|
|
|
$game_id = $request['game_id'];
|
|
|
|
|
$promote_id = $request['promote_id'];
|
|
|
|
|
$this->assign('promote_arpu',$promote_id);
|
|
|
|
|
$this->assign('promote_arpu', $promote_id);
|
|
|
|
|
$start = strtotime($request['time_start']);
|
|
|
|
|
$end = strtotime($request['time_end'])+24*60*60-1;
|
|
|
|
|
if ($start>$end) {
|
|
|
|
@ -751,7 +760,7 @@ class UserEvent extends BaseEvent {
|
|
|
|
|
$bangbi = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($end-$start<=7776000 ) {
|
|
|
|
|
if ($end - $start <= 7776000 ) {
|
|
|
|
|
if ($promote_id <1) {
|
|
|
|
|
$pid = D('Promote')->get_child_promote(PID,'id');
|
|
|
|
|
if (empty($pid[0])) {
|
|
|
|
@ -761,19 +770,14 @@ class UserEvent extends BaseEvent {
|
|
|
|
|
$promote_id = PID.','.$id;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
if(PID == $promote_id) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pro_id1=get_prmoote_chlid_account($promote_id);
|
|
|
|
|
$pro_id1 = get_prmoote_chlid_account($promote_id);
|
|
|
|
|
$pro_arr = array_column($pro_id1,'id');
|
|
|
|
|
$pro_arr[] = $promote_id;
|
|
|
|
|
$promote_id=implode(',',$pro_arr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
$datelist = get_date_list($start,$end);
|
|
|
|
|
$user = D('User');
|
|
|
|
@ -924,7 +928,6 @@ class UserEvent extends BaseEvent {
|
|
|
|
|
//file_put_contents(dirname(__FILE__) . '/../Controller/arpu'.PID.'.txt',json_encode($data));
|
|
|
|
|
|
|
|
|
|
$this->assign('list_data',$data);
|
|
|
|
|
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|