update entity map
This commit is contained in:
@@ -135,22 +135,19 @@ class EntityParseFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* 从数据中提取平台名称
|
||||
* 从数据中提取平台名称(从 meta 字段中获取)
|
||||
*
|
||||
* @param array $data
|
||||
* @return string
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private static function extractPlatformNameFromData(array $data): string
|
||||
{
|
||||
// 优先从 platform_id 获取,如果没有则尝试从其他字段获取
|
||||
if (isset($data['platform_id'])) {
|
||||
// 这里可以根据 platform_id 映射到平台名称
|
||||
// 简化处理:假设需要从数据库或配置中查找
|
||||
// 当前先直接使用 platform_id 作为平台名称
|
||||
return self::resolvePlatformName($data['platform_id']);
|
||||
if (!isset($data['meta']['platform_id'])) {
|
||||
throw new InvalidArgumentException("Cannot extract platform name from data: meta.platform_id missing");
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException("Cannot extract platform name from data: platform_id missing");
|
||||
return self::resolvePlatformName($data['meta']['platform_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user