增加用户余额明细 搜索功能
This commit is contained in:
parent
c7ade9181b
commit
bdb4a46049
@ -298,14 +298,26 @@ class OrderLogic extends Logic
|
||||
public static function userMoneyLists($get){
|
||||
$page = $get['page'] ?? 1;
|
||||
$limit = $get['limit'] ?? 10;
|
||||
$where = [];
|
||||
// 会员信息
|
||||
if (!empty($get['search_key']) && !empty($get['keyword'])) {
|
||||
$keyword = $get['keyword'];
|
||||
if ($get['search_key'] == 'user_sn') {
|
||||
$where[] = ['u.sn', '=', $keyword];
|
||||
} elseif ($get['search_key'] == 'nickname') {
|
||||
$where[] = ['u.nickname', 'like', '%' . $keyword . '%'];
|
||||
}
|
||||
}
|
||||
|
||||
$lists = User::where('del','0')
|
||||
->field('id,nickname,avatar, sn as user_sn, mobile,user_money,earnings')
|
||||
->where($where)
|
||||
->page($page, $limit)
|
||||
->select();
|
||||
|
||||
$count = User::where('del','0')
|
||||
->field('id,nickname,avatar, sn as user_sn, mobile,user_money,earnings')
|
||||
->where($where)
|
||||
->count();
|
||||
foreach ($lists as &$item){
|
||||
$withdraw = WithdrawApply::where('user_id',$item['id'])->select();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user