From a327b56d1b0ec89d143f04f54056e4b4e5d90c34 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Thu, 24 Jul 2025 14:57:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/UserController.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/controller/UserController.php b/app/controller/UserController.php index c90a478..f71083e 100644 --- a/app/controller/UserController.php +++ b/app/controller/UserController.php @@ -2,6 +2,7 @@ namespace app\controller; +use app\model\Corp; use app\model\Country; use app\model\FeishuUser; use app\model\User; @@ -81,8 +82,8 @@ class UserController $result['feishu_openid'] = $result['openid']??''; if (!Util::isEmpty($language)) { - User::where('id', $userId) - ->update(['language' => $language]); +// User::where('id', $userId) +// ->update(['language' => $language]); locale($language); } @@ -257,6 +258,21 @@ class UserController return Util::success($user, trans('success')); } + public function getUsers(Request $request) + { + $userId = $request->user['id']; + $abbr = $request->input('abbr'); + if(empty($abbr)){ + return Util::fail([], 'abbr'.trans('not_null')); + } + $corpId = Corp::where('abbr', $abbr)->value('id'); + $where[] = ['corp_id' , $corpId]; + $where[] = ['status' , 1]; + $user = User::select('id','name')->where($where) + ->get(); + return Util::success($user, trans('success')); + } + /** * 修改 * @param Request $request