From 7d70f856ce1ae51527cd5f136e3c04e5cf27989d Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 27 Nov 2019 15:38:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=8E=A9=E5=AE=B6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/MemberController.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 0d6029bf6..fd7a178c4 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -169,14 +169,16 @@ class MemberController extends ThinkController $map['is_platform'] = 0; //数据 $usermodel = M('user', 'tab_'); - $sql1 = $usermodel->field('tab_user.*,IFNULL(sum(b.pay_amount),0) as deposit_total') + + $userField = "tab_user.id,device_number,age_status,account,balance,gold_coin,alipay,tab_user.promote_id,register_type,tab_user.promote_account,register_time,lock_status,register_way,register_ip,login_time,check_status"; + + $sql1 = $usermodel->field("{$userField},IFNULL(sum(b.pay_amount),0) as deposit_total") ->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1') ->where($map) ->group('tab_user.id') ->where($hav) // ->order($order) ->select(false); - // $data = $usermodel->table('(' . $sql1 . ') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,IFNULL(sum(ss.pay_amount),0) as recharge_total,check_status') // ->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1') // ->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false) @@ -209,7 +211,6 @@ class MemberController extends ThinkController ->select(); } - //计数 $sql = M('user', 'tab_')->field('tab_user.id,IFNULL(sum(ss.pay_amount),0) AS recharge_total') ->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1')