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