diff --git a/app/admin/logic/finance/OrderLogic.php b/app/admin/logic/finance/OrderLogic.php index 545484bc..6276eb05 100644 --- a/app/admin/logic/finance/OrderLogic.php +++ b/app/admin/logic/finance/OrderLogic.php @@ -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();