From bdb4a46049e4749b2e17222ea5d3692ffd4fdb9c Mon Sep 17 00:00:00 2001 From: Yao <734770036@qq.com> Date: Mon, 28 Oct 2024 16:28:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E4=BD=99?= =?UTF-8?q?=E9=A2=9D=E6=98=8E=E7=BB=86=20=E6=90=9C=E7=B4=A2=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/logic/finance/OrderLogic.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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();