后台URS用户绑定关系列表中的"同步信息"和"验证映射"功能报错,提示方法不存在:
UrsUserMappingService::validateMapping() 方法缺失UrsUserMappingService::syncUserInfo() 方法缺失[2025-06-16T06:03:29.534114+08:00] laravel.ERROR: Call to undefined method App\Module\UrsPromotion\Services\UrsUserMappingService::validateMapping()
[2025-06-16T06:03:29.534114+08:00] laravel.ERROR: Call to undefined method App\Module\UrsPromotion\Services\UrsUserMappingService::syncUserInfo()
在 UrsUserMappingService 类中添加映射关系验证方法:
功能特性:
返回格式:
[
'valid' => bool, // 验证是否通过
'updated' => bool, // 状态是否更新
'details' => array, // 验证详情
'reasons' => array // 失败原因
]
在 UrsUserMappingService 类中添加用户信息同步方法:
功能特性:
返回格式:
[
'success' => bool, // 同步是否成功
'updated_fields' => array, // 更新的字段列表
'sync_time' => string, // 同步时间
'error' => string // 错误信息
]
app/Module/UrsPromotion/Services/UrsUserMappingService.php
validateMapping() 静态方法(约90行代码)syncUserInfo() 静态方法(约90行代码)验证映射功能测试
映射关系验证通过!状态保持有效。验证详情:URS用户ID: 9003, 农场用户: urs-9003 (ID: 38998), 映射时间: 2025-06-16 12:31:43同步信息功能测试
用户信息同步成功!同步时间:2025-06-16 14:03:29日志检查
cbf8280e - 修复URS用户绑定关系后台管理功能成功修复了URS用户绑定关系后台管理中"同步信息"和"验证映射"功能的报错问题。通过添加缺失的方法实现,提供了完整的映射关系验证和用户信息同步功能,增强了系统的稳定性和用户体验。