diff --git a/backend/app/Entity/Parse/EntityParseFactory.php b/backend/app/Entity/Parse/EntityParseFactory.php index 56019ac..1ae50fc 100644 --- a/backend/app/Entity/Parse/EntityParseFactory.php +++ b/backend/app/Entity/Parse/EntityParseFactory.php @@ -121,11 +121,11 @@ class EntityParseFactory throw new InvalidArgumentException('Invalid message body: expected JSON array'); } - // 2. 从 data 中提取 platform_id - if (!isset($data['platform_id'])) { + // 2. 从 meta 中提取 platform_id + if (!isset($data['meta']['platform_id'])) { throw new InvalidArgumentException('Missing required field: platform_id'); } - $platformId = (int) $data['platform_id']; + $platformId = (int) $data['meta']['platform_id']; // 3. 如果未指定实体类型,从 routing key 中提取 if ($entityType === null) {