From a2312d9eaa3fa87c730e738530099d3c90058b4c Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 4 Mar 2020 11:17:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8E=BB=E9=87=8Dbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MemberController.class.php | 14 ++++++++------ .../Controller/TestResourceController.class.php | 2 +- .../Controller/TestResourceController.class.php | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 5bd172959..ed28188d8 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -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); } diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index 6ac905d6a..9b1b564d5 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -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']); } } diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index cae0bb858..d3761c02e 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -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']); }