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('绑定用户已存在'); }