获取用户
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\controller;
|
namespace app\controller;
|
||||||
|
|
||||||
|
use app\model\Corp;
|
||||||
use app\model\Country;
|
use app\model\Country;
|
||||||
use app\model\FeishuUser;
|
use app\model\FeishuUser;
|
||||||
use app\model\User;
|
use app\model\User;
|
||||||
@@ -81,8 +82,8 @@ class UserController
|
|||||||
$result['feishu_openid'] = $result['openid']??'';
|
$result['feishu_openid'] = $result['openid']??'';
|
||||||
|
|
||||||
if (!Util::isEmpty($language)) {
|
if (!Util::isEmpty($language)) {
|
||||||
User::where('id', $userId)
|
// User::where('id', $userId)
|
||||||
->update(['language' => $language]);
|
// ->update(['language' => $language]);
|
||||||
locale($language);
|
locale($language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,6 +258,21 @@ class UserController
|
|||||||
return Util::success($user, trans('success'));
|
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
|
* @param Request $request
|
||||||
|
|||||||
Reference in New Issue
Block a user