value : null; return UserLogLogic::log($userId, $message, $sourceTypeValue, $sourceId, $sourceTable); } /** * 批量记录用户日志 * * @param array $logs 日志数据数组 * @return bool */ public static function batchLog(array $logs): bool { return UserLogLogic::batchLog($logs); } /** * 获取用户日志列表 * * @param int $userId 用户ID * @param int $page 页码 * @param int $pageSize 每页数量 * @param array $filters 过滤条件 * @return LengthAwarePaginator */ public static function getUserLogs( int $userId, int $page = 1, int $pageSize = 20, array $filters = [] ): LengthAwarePaginator { return UserLogLogic::getUserLogs($userId, $page, $pageSize, $filters); } /** * 清空用户日志 * * @param int $userId 用户ID * @return bool */ public static function clearUserLogs(int $userId): bool { return UserLogLogic::clearUserLogs($userId); } /** * 清理过期日志 * * @param int $days 保留天数 * @return int 删除的记录数 */ public static function cleanExpiredLogs(int $days = 30): int { return UserLogLogic::cleanExpiredLogs($days); } /** * 获取用户日志统计信息 * * @param int $userId 用户ID * @return array */ public static function getUserLogStats(int $userId): array { return UserLogLogic::getUserLogStats($userId); } }