优化:用户钱包操作方法修改。---后台用户列表修改
This commit is contained in:
@@ -96,7 +96,7 @@ class User extends adminApi
|
||||
a.login_device,
|
||||
a.loginip,
|
||||
c.coin,
|
||||
c.earnings,
|
||||
d.earnings,
|
||||
b.is_real,
|
||||
a.init_code,
|
||||
a.status
|
||||
@@ -110,18 +110,20 @@ class User extends adminApi
|
||||
if($order_type=='coin'){
|
||||
$order = "c.coin ".$order_type_val_str;
|
||||
}elseif($order_type=='earnings'){
|
||||
$order = "c.earnings ".$order_type_val_str;
|
||||
$order = "d.earnings ".$order_type_val_str;
|
||||
}
|
||||
$user_data = db::name('user')->alias('a')
|
||||
->join('(SELECT * FROM fa_user_auth WHERE id IN (SELECT MAX(id) FROM fa_user_auth GROUP BY mobile)) b', 'a.mobile = b.mobile', 'LEFT')
|
||||
->join('user_wallet c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_coin c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_earnings d', 'a.id = d.user_id','LEFT')
|
||||
->where($where)
|
||||
->field($field)
|
||||
->order($order);
|
||||
$lists = $user_data->page($page, $page_limit)->select();
|
||||
$count = db::name('user')->alias('a')
|
||||
->join('(SELECT * FROM fa_user_auth WHERE id IN (SELECT MAX(id) FROM fa_user_auth GROUP BY mobile)) b', 'a.mobile = b.mobile', 'LEFT')
|
||||
->join('user_wallet c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_coin c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_earnings d', 'a.id = d.user_id','LEFT')
|
||||
->where($where)
|
||||
->field($field)
|
||||
->count();
|
||||
@@ -171,18 +173,20 @@ class User extends adminApi
|
||||
}
|
||||
$total_coin = db::name('user')->alias('a')
|
||||
->join('(SELECT * FROM fa_user_auth WHERE id IN (SELECT MAX(id) FROM fa_user_auth GROUP BY mobile)) b', 'a.mobile = b.mobile', 'LEFT')
|
||||
->join('user_wallet c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_coin c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_earnings d', 'a.id = d.user_id','LEFT')
|
||||
->where(['a.delete_time'=>0])
|
||||
->where($where)
|
||||
->field($field)
|
||||
->sum('c.coin');
|
||||
$total_earnings = db::name('user')->alias('a')
|
||||
->join('(SELECT * FROM fa_user_auth WHERE id IN (SELECT MAX(id) FROM fa_user_auth GROUP BY mobile)) b', 'a.mobile = b.mobile', 'LEFT')
|
||||
->join('user_wallet c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_coin c', 'a.id = c.user_id','LEFT')
|
||||
->join('user_wallet_earnings d', 'a.id = d.user_id','LEFT')
|
||||
->where(['a.delete_time'=>0])
|
||||
->where($where)
|
||||
->field($field)
|
||||
->sum('c.earnings');
|
||||
->sum('d.earnings');
|
||||
$return_data = [
|
||||
'page' =>$page,
|
||||
'page_limit' => $page_limit,
|
||||
|
||||
Reference in New Issue
Block a user