Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
yulingwei 5 years ago
commit 0965c480a3

@ -169,14 +169,16 @@ class MemberController extends ThinkController
$map['is_platform'] = 0; $map['is_platform'] = 0;
//数据 //数据
$usermodel = M('user', 'tab_'); $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') ->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1')
->where($map) ->where($map)
->group('tab_user.id') ->group('tab_user.id')
->where($hav) ->where($hav)
// ->order($order) // ->order($order)
->select(false); ->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') // $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('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) // ->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(); ->select();
} }
//计数 //计数
$sql = M('user', 'tab_')->field('tab_user.id,IFNULL(sum(ss.pay_amount),0) AS recharge_total') $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') ->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1')

Loading…
Cancel
Save