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')