更新用户数据

This commit is contained in:
yaooo 2023-11-23 18:09:51 +08:00
parent 56918bc1fb
commit fd0e8b3322
4 changed files with 6 additions and 4 deletions

View File

@ -34,6 +34,7 @@ class BaseAdminController extends BaseLikeAdminController
if (isset($this->request->adminInfo) && $this->request->adminInfo) { if (isset($this->request->adminInfo) && $this->request->adminInfo) {
$this->adminInfo = $this->request->adminInfo; $this->adminInfo = $this->request->adminInfo;
$this->adminId = $this->request->adminInfo['admin_id']; $this->adminId = $this->request->adminInfo['admin_id'];
$this->userId = $this->request->adminInfo['user_id'];
} }
} }

View File

@ -16,9 +16,9 @@
namespace app\adminapi\controller\land; namespace app\adminapi\controller\land;
use app\adminapi\controller\BaseAdminController; use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\land\LandPlantActionLists; use app\adminapi\lists\land\LandPlantActionLists;
use app\adminapi\logic\land\LandPlantActionLogic; use app\adminapi\logic\land\LandPlantActionLogic;
use app\adminapi\validate\land\LandPlantActionValidate; use app\adminapi\validate\land\LandPlantActionValidate;

View File

@ -71,7 +71,7 @@ class LoginMiddleware
//给request赋值用于控制器 //给request赋值用于控制器
$request->adminInfo = $adminInfo; $request->adminInfo = $adminInfo;
$request->adminId = $adminInfo['admin_id'] ?? 0; $request->adminId = $adminInfo['admin_id'] ?? 0;
$request->userId = $adminInfo['user_id'] ?? 0;
return $next($request); return $next($request);
} }

View File

@ -89,6 +89,7 @@ class AdminTokenCache extends BaseCache
$adminInfo = [ $adminInfo = [
'admin_id' => $admin->id, 'admin_id' => $admin->id,
'user_id' => $admin->user_id,
'root' => $admin->root, 'root' => $admin->root,
'name' => $admin->name, 'name' => $admin->name,
'account' => $admin->account, 'account' => $admin->account,