Merge branch 'feature/user_repeat' into release

master
zhengyongxing 5 years ago
commit 11f8434215

@ -134,7 +134,7 @@ class MemberController extends ThinkController
$data = M("user","tab_")
->field("tab_user.id,`device_number`,count(`device_number`) as device_count,`age_status`,`account`,`balance`,`gold_coin`,`alipay`,tab_user.promote_id,`register_type`,tab_user.promote_account,`register_time`,`lock_status`,lock_remark,`register_way`,`register_ip`,`login_time`,`check_status`,IFNULL(sum(ss.pay_amount), 0) AS recharge_total")
->where($map)
->group("tab_user.id,device_number,tab_user.promote_id,tab_user.login_ip")
->group("device_number,tab_user.register_ip")
// ->page($page, $row)
->order($order);
@ -159,7 +159,7 @@ class MemberController extends ThinkController
$data = $data->select(false);
$data = M()->table('(' . $data . ') as a ')->where(['device_count'=>['elt',1]]);
$data = M()->table('(' . $data . ') as a ');
if(!isset($_REQUEST['export'])){
$data ->page($page, $row);
@ -172,7 +172,7 @@ class MemberController extends ThinkController
$userRepeat = M("user","tab_")
->field("count(`device_number`) as device_count")
->where($map)
->group("tab_user.id,device_number,tab_user.promote_id,tab_user.login_ip")
->group("device_number,tab_user.register_ip")
// ->page($page, $row)
->order($order);
@ -196,9 +196,8 @@ class MemberController extends ThinkController
}
$userRepeat = $userRepeat->select(false);
$userRepeat = M()->table('(' . $userRepeat . ') as a ')->where(['device_count'=>['gt',1]])->count();
$userRepeat = M()->table('(' . $userRepeat . ') as a ')->count();
$this->assign('device_count',$userRepeat);
if(isset($_REQUEST['export'])){
$isadmin = is_administrator();
@ -350,7 +349,10 @@ class MemberController extends ThinkController
$this->assign('user_count',$user_count);
$this->assign('now_count', $now_count?:0);
$page = set_pagination($user_count-$userRepeat, $row);
$page = set_pagination($userRepeat, $row);
$this->assign('device_count',$user_count-$userRepeat);
if ($page) {
$this->assign('_page', $page);
}

@ -515,7 +515,7 @@ class TestResourceController extends ThinkController
$data['is_new'] = 2;
M('promote_game_available_balance','tab_')
->where(['promote_id'=>$data['promote_id'],'game_id'=>$data['game_id'],'server_id'=>$data['server_id']])
->where(['promote_id'=>$data['promote_id'],'game_id'=>$data['game_id'],'server_name'=>$data['server_name']])
->setDec('available_balance',$data['apply_resource']);
}
}

@ -481,6 +481,7 @@ class TestResourceController extends BaseController
} else {//非新用户
$availableBalance = getAvailableBalance($data['promote_id'],$data['game_id'],$data['server_id']);
// var_dump($availableBalance);die();
$promoteAllRecharge = sum_promote_total_money($data['promote_id']);//总充值量
$allVerifyValue = $promoteAllRecharge * $config['old_value_ratio'];//可充值总量
@ -504,7 +505,7 @@ class TestResourceController extends BaseController
$data['is_new'] = 2;
M('promote_game_available_balance','tab_')
->where(['promote_id'=>$data['promote_id'],'game_id'=>$data['game_id'],'server_id'=>$data['server_id']])
->where(['promote_id'=>$data['promote_id'],'game_id'=>$data['game_id'],'server_name'=>$data['server_name']])
->setDec('available_balance',$data['apply_resource']);
}

Loading…
Cancel
Save