From a1668b60fcd0d4cbdfd228e89acf61aa0a3ad351 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Mon, 4 Aug 2025 15:58:15 +0800 Subject: [PATCH] fix : change admin user info --- app/Service/Admin/User/EmployeeService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Service/Admin/User/EmployeeService.php b/app/Service/Admin/User/EmployeeService.php index 85b5233..62d4a20 100644 --- a/app/Service/Admin/User/EmployeeService.php +++ b/app/Service/Admin/User/EmployeeService.php @@ -61,7 +61,7 @@ class EmployeeService extends BaseService /** * @var array|string[] */ - private array $filed = ['id','username','avatar','chinese_name','mobile','status','last_login_ip','last_login_time','role_id']; + private array $filed = ['id','username','avatar','chinese_name','mobile','status','last_login_ip','last_login_time','role_id','bind_user_id']; /** * 列表 @@ -160,8 +160,8 @@ class EmployeeService extends BaseService $bindUserId = (int)$this->request->input('bind_user_id', 0); if ($bindUserId > 0) { - $oldBindUserId = $this->adminUserModel->getAdminInfoByBindUserId($bindUserId); - if (!empty($oldBindUserId) && $info->bind_user_id != $oldBindUserId) throw new ErrException('绑定用户已存在'); + $oldInfo = $this->adminUserModel->getAdminInfoByBindUserId($bindUserId); + if (!empty($oldBindUserId) && $info->bind_user_id != $oldInfo->bind_user_id) throw new ErrException('绑定用户已存在'); }