getPdo(); $stmt = $pdo->prepare("SELECT * FROM persons WHERE id = ?"); $stmt->execute([$id]); $person = $stmt->fetch(); if (!$person) { Response::error('人员不存在'); } $accounts = $pdo->prepare("SELECT id, platform, account_id, profile_url, remark, is_primary, is_active FROM social_accounts WHERE owner_type = 'person' AND owner_id = ? ORDER BY is_primary DESC, id DESC"); $accounts->execute([$id]); $experiences = $pdo->prepare( "SELECT pwe.id, pwe.company_id, c.display_name, c.industry, pwe.position, pwe.department, pwe.job_level, pwe.start_date, pwe.end_date, pwe.is_current FROM person_work_experiences pwe LEFT JOIN companies c ON c.id = pwe.company_id WHERE pwe.person_id = ? AND pwe.is_active = 1 ORDER BY pwe.is_current DESC, pwe.start_date DESC" ); $experiences->execute([$id]); Response::success(['person' => $person, 'accounts' => $accounts->fetchAll(), 'experiences' => $experiences->fetchAll()]);