if (!function_exists('diy_users_list'))
{
// 获取指定会员的文档列表
function diy_users_list($levels = 0, $paixun = 0, $limit = 10) {
$where = [];
if ($levels > 0){
$where['b.level_value'] = ['egt', $levels];
}
$where2 = [
'a.is_activation' => 1,
'a.admin_id' => 0,
];
$where = array_merge($where,$where2);
$paixun = getOrderBy($paixun, 'desc');
$result = \think\Db::name('users')->alias('a')
->field('a.users_id,a.username,a.open_level_time,a.level_maturity_days,a.level,b.level_name,a.reg_time,a.register_place,a.head_pic,a.login_count,a.province,a.users_money,a.email,a.last_ip,a.total_amount,a.is_lock')
->join('__USERS_LEVEL__ b', 'a.level = b.level_id', 'LEFT')
->where($where)
->order($paixun)
->limit($limit)
->select();
return $result;
}
}