'need']); $id = (int)($_REQUEST['id'] ?? 0); if ($id <= 0) { Response::error('参数错误', 400); } $pdo = DB::getInstance()->getPdo(); $stmt = $pdo->prepare( "SELECT cn.*, c.display_name, c.industry, c.country, c.website FROM company_needs cn LEFT JOIN companies c ON c.id = cn.company_id WHERE cn.id = ?" ); $stmt->execute([$id]); $need = $stmt->fetch(); if (!$need) { Response::error('需求不存在'); } Response::success(['need' => $need]);