From 689ceda884e78bb7c72d32d9cbb2cb7f0e7c094a Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:17:10 +0800 Subject: [PATCH 01/86] =?UTF-8?q?refactor:=20=E5=88=A0=E9=99=A4=20db/singl?= =?UTF-8?q?e-main=20=E6=97=A7=E5=BA=93=E8=BF=81=E7=A7=BB=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按 C406 D8 删除仅服务旧库迁移的工具目录;slnx 未引用该项目,无需调整。 Linear: GFX-1232 --- .../single-main/migrate-default-instance.sh | 18 -- .../migration/ConfigurationCollisionGuard.cs | 78 ------ .../migration/LegacyRiskPolicyMigration.cs | 170 ------------ .../migration/LegacyRiskPolicySmokeTests.cs | 100 ------- .../migration/LogCredentialCleanup.cs | 81 ------ .../LogCredentialCleanupSmokeTests.cs | 65 ----- .../migration/MigrationSmokeTests.cs | 108 -------- .../migration/PostgresMigrationSmokeTests.cs | 78 ------ .../db/single-main/migration/Program.cs | 96 ------- .../migration/ScopeColumnRetirement.cs | 73 ----- .../migration/SingleMainMigration.cs | 249 ------------------ .../db/single-main/migration/migration.csproj | 11 - 12 files changed, 1127 deletions(-) delete mode 100755 GameFrameX.Admin.Unified.Api/db/single-main/migrate-default-instance.sh delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/ConfigurationCollisionGuard.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicyMigration.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicySmokeTests.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanup.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanupSmokeTests.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/MigrationSmokeTests.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/PostgresMigrationSmokeTests.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/Program.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/ScopeColumnRetirement.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/SingleMainMigration.cs delete mode 100644 GameFrameX.Admin.Unified.Api/db/single-main/migration/migration.csproj diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migrate-default-instance.sh b/GameFrameX.Admin.Unified.Api/db/single-main/migrate-default-instance.sh deleted file mode 100755 index 40df03f3..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migrate-default-instance.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# 默认自托管实例旧租户库 → 主库;停机、备份后运行,源库保持只读。 -# 主库必须只有默认租户 1300000000001,源库最多一个应用;其他存量多租户库不支持。 -# 环境变量:GFX_MIGRATION_DATABASE_TYPE=PostgreSQL(或 Sqlite), -# GFX_MIGRATION_SOURCE / GFX_MIGRATION_TARGET 为源/目标连接串,不打印凭据。 -# --dry-run:真实执行退场列删除/业务索引重建/建表/复制/冲突核对,事务回滚;--execute:事务提交。 -# 已有同主键且相同的记录跳过;不同则整体回滚,不覆盖。源/目标退场表打印残留清单,不自动 DROP。 -# 确认迁移与备份、重复执行完成后可手动 DROP;system_tenant_entity 可能含加密的旧连接串,按敏感凭据处理。 -# --self-test-postgres:使用显式 GFX_TEST_PG_CONNECTION_STRING,创建并删除临时源/目标库验证真实 PostgreSQL。 -# --redact-logs-dry-run / --redact-logs:仅需目标连接;预览受影响行数 / 事务清理主库既有日志,重跑幂等。 -# --self-test:仅临时 SQLite 文件,验证回滚、保真、幂等、冲突和多租户拒绝。 -set -euo pipefail -SCRIPT_DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -if [ "$#" -ne 1 ]; then - echo '必须显式指定 --dry-run、--execute、--self-test 或 --self-test-postgres' >&2 - exit 64 -fi -dotnet run --project "${SCRIPT_DIRECTORY}/migration/migration.csproj" -- "$1" diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/ConfigurationCollisionGuard.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/ConfigurationCollisionGuard.cs deleted file mode 100644 index 799ef43e..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/ConfigurationCollisionGuard.cs +++ /dev/null @@ -1,78 +0,0 @@ -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.Release; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal static class ConfigurationCollisionGuard -{ - private static readonly (Type EntityType, string[] Keys, bool UniqueTarget)[] Rules = - { - (typeof(TenantClientApiPolicyEntity), Array.Empty(), true), - (typeof(TenantAdvertisementCallbackConfigEntity), new[] { "Provider" }, true), - (typeof(TenantEmailConfigEntity), new[] { "Purpose" }, false), - (typeof(TenantGamePaymentConfigEntity), new[] { "PackageIdNormalized", "PayChannel", "IsSandbox" }, true), - (typeof(TenantSessionKeyEntity), new[] { "Kid" }, true), - (typeof(TenantAppSignatureKeyEntity), new[] { "Kid" }, true), - (typeof(TenantGameLoginTicketKeyEntity), new[] { "Kid" }, true), - (typeof(TenantGameAppRemoteConfigEntity), new[] { "Channel", "Platform", "AppVersion", "Package", "Language" }, false), - (typeof(TenantGameAppFeatureSwitchEntity), new[] { "SwitchKey", "Audience", "Channel", "Platform", "Package", "Language" }, false), - (typeof(TenantGameAppReleaseVersionEntity), new[] { "Channel", "Platform", "OldVersion", "AppVersion", "Package", "Language" }, true), - (typeof(TenantGameAppAssetPackageVersionEntity), new[] { "Channel", "Platform", "AppVersion", "Package", "Language", "AssetPackageName" }, true), - }; - - internal static void Validate(ISqlSugarClient database, bool legacyScope) - { - foreach (var rule in Rules) - { - if (!legacyScope && !rule.UniqueTarget) - { - continue; - } - - var entity = database.EntityMaintenance.GetEntityInfo(rule.EntityType); - if (!database.DbMaintenance.IsAnyTable(entity.DbTableName, false)) - { - continue; - } - - var columns = database.DbMaintenance.GetColumnInfosByTableName(entity.DbTableName, false) - .Select(column => column.DbColumnName).ToHashSet(StringComparer.OrdinalIgnoreCase); - var scopes = new[] { "app_id", "game_app_id", "game_app_id_normalized" }.Where(columns.Contains).ToArray(); - if (legacyScope && scopes.Length == 0) - { - continue; - } - - var keys = rule.Keys.Select(property => entity.Columns.Single(column => column.PropertyName == property).DbColumnName).ToArray(); - if (keys.Any(key => !columns.Contains(key))) - { - throw new InvalidOperationException($"表 {entity.DbTableName} 缺少业务键列,无法安全验证配置碰撞。"); - } - - var keySql = keys.Length == 0 ? "'single' AS configuration_key" : string.Join(", ", keys.Select(Quote)); - var grouping = keys.Length == 0 ? "configuration_key" : string.Join(", ", keys.Select(Quote)); - var predicate = columns.Contains("is_deleted") ? " WHERE is_deleted = false" : string.Empty; - var rows = $"SELECT {keySql} FROM {Quote(entity.DbTableName)}{predicate}"; - if (legacyScope) - { - // 同业务键的默认层与应用层不能按 Id 或优先级擅自选胜者。 - rows += $" GROUP BY {grouping}, {string.Join(", ", scopes.Select(Quote))}"; - } - - var collisions = database.Ado.GetInt($"SELECT COUNT(*) FROM (SELECT {grouping} FROM ({rows}) candidates GROUP BY {grouping} HAVING COUNT(*) > 1) conflicts"); - if (collisions > 0) - { - throw new InvalidOperationException($"表 {entity.DbTableName} 存在配置作用域碰撞;请先人工确认并清理重复业务配置,迁移不会自动选取或覆盖。"); - } - } - } - - private static string Quote(string identifier) - { - return "\"" + identifier.Replace("\"", "\"\"") + "\""; - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicyMigration.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicyMigration.cs deleted file mode 100644 index e5ae91e7..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicyMigration.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System.Data; -using System.Globalization; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal sealed class LegacyRiskPolicyMigration -{ - private const string ApplicationTable = "tenant_game_app_entity"; - private const string PolicyTable = "tenant_client_api_policy_entity"; - private readonly long _applicationId; - private readonly bool _signatureRequired; - private readonly bool _deviceProofRequired; - private readonly string? _riskPolicy; - private bool _targetNeedsRiskColumns; - - private LegacyRiskPolicyMigration(DataRow row) - { - _applicationId = Convert.ToInt64(row["id"], CultureInfo.InvariantCulture); - _signatureRequired = Convert.ToBoolean(row["signature_required"], CultureInfo.InvariantCulture); - _deviceProofRequired = Convert.ToBoolean(row["device_proof_required"], CultureInfo.InvariantCulture); - _riskPolicy = row["risk_policy"] is DBNull ? null : Convert.ToString(row["risk_policy"], CultureInfo.InvariantCulture); - } - - internal static LegacyRiskPolicyMigration? Prepare(ISqlSugarClient source, ISqlSugarClient target) - { - if (!source.DbMaintenance.IsAnyTable(ApplicationTable, false)) - { - return null; - } - - var rows = source.Ado.GetDataTable($"SELECT id, signature_required, device_proof_required, risk_policy FROM {ApplicationTable} WHERE is_deleted = false ORDER BY id"); - if (rows.Rows.Count == 0) - { - return null; - } - - var migration = new LegacyRiskPolicyMigration(rows.Rows[0]); - foreach (DataRow row in rows.Rows) - { - migration.RequireSame(row, $"旧应用 {row["id"]}"); - } - - // 在建表补列前核对已经存在的风险值,不能把用户设置误判为新增列默认值。 - migration.ValidateExistingPolicy(source, "源库"); - migration.ValidateExistingPolicy(target, "目标库"); - migration._targetNeedsRiskColumns = target.DbMaintenance.IsAnyTable(PolicyTable, false) - && !target.DbMaintenance.GetColumnInfosByTableName(PolicyTable, false).Any(column => column.DbColumnName == "risk_policy"); - return migration; - } - - internal void CompleteLegacyTarget(ISqlSugarClient target) - { - if (!_targetNeedsRiskColumns) - { - return; - } - - target.CodeFirst.InitTables(); - target.Updateable() - .SetColumns(row => new TenantClientApiPolicyEntity - { - SignatureRequired = _signatureRequired, - DeviceProofRequired = _deviceProofRequired, - RiskPolicy = _riskPolicy!, - }).Where(row => row.IsDeleted == false && row.IsEnabled == true).ExecuteCommand(); - } - - internal void EnrichCopiedPolicy(string tableName, DataTable rows) - { - if (!string.Equals(tableName, PolicyTable, StringComparison.OrdinalIgnoreCase)) - { - return; - } - - var values = new (string Name, Type Type, object Value)[] - { - ("signature_required", typeof(bool), _signatureRequired), - ("device_proof_required", typeof(bool), _deviceProofRequired), - ("risk_policy", typeof(string), (object?)_riskPolicy ?? DBNull.Value), - }; - foreach (var value in values) - { - if (rows.Columns.Contains(value.Name)) - { - continue; - } - - rows.Columns.Add(value.Name, value.Type); - foreach (DataRow row in rows.Rows) - { - row[value.Name] = value.Value; - } - } - } - - internal void Apply(ISqlSugarClient target) - { - target.CodeFirst.InitTables(); - var policies = target.Queryable().Where(row => row.IsDeleted == false).ToList(); - var enabled = policies.Where(row => row.IsEnabled == true).ToArray(); - if (policies.Count > 0 && enabled.Length != 1) - { - throw new InvalidOperationException("旧应用风险配置需要唯一启用策略;现有策略均禁用或有多条启用记录,拒绝自动变更开关。"); - } - - if (policies.Count == 0) - { - // 旧实例可以只有应用风险设置而无运行策略;沿用应用主键,不生成随机迁移身份。 - target.Insertable(new TenantClientApiPolicyEntity - { - Id = _applicationId, - IsEnabled = true, - SignatureRequired = _signatureRequired, - DeviceProofRequired = _deviceProofRequired, - RiskPolicy = _riskPolicy!, - }).ExecuteCommand(); - } - else - { - target.Updateable() - .SetColumns(row => new TenantClientApiPolicyEntity - { - SignatureRequired = _signatureRequired, - DeviceProofRequired = _deviceProofRequired, - RiskPolicy = _riskPolicy!, - }).Where(row => row.Id == enabled[0].Id).ExecuteCommand(); - } - - Console.WriteLine($"旧应用 {_applicationId} 风险配置带入:SignatureRequired={_signatureRequired}, DeviceProofRequired={_deviceProofRequired}, RiskPolicy={System.Text.Json.JsonSerializer.Serialize(_riskPolicy)}"); - } - - private void ValidateExistingPolicy(ISqlSugarClient database, string description) - { - if (!database.DbMaintenance.IsAnyTable(PolicyTable, false)) - { - return; - } - - var columns = database.DbMaintenance.GetColumnInfosByTableName(PolicyTable, false) - .Select(column => column.DbColumnName).ToHashSet(StringComparer.OrdinalIgnoreCase); - var count = new[] { "signature_required", "device_proof_required", "risk_policy" }.Count(columns.Contains); - if (count == 0) - { - return; - } - - if (count != 3) - { - throw new InvalidOperationException($"{description}策略的风险字段不完整,拒绝自动迁移。"); - } - - var rows = database.Ado.GetDataTable($"SELECT id, signature_required, device_proof_required, risk_policy FROM {PolicyTable} WHERE is_deleted = false AND is_enabled = true"); - foreach (DataRow row in rows.Rows) - { - RequireSame(row, $"{description}策略 {row["id"]}"); - } - } - - private void RequireSame(DataRow row, string description) - { - var candidate = new LegacyRiskPolicyMigration(row); - if (_signatureRequired != candidate._signatureRequired || _deviceProofRequired != candidate._deviceProofRequired - || !string.Equals(_riskPolicy, candidate._riskPolicy, StringComparison.Ordinal)) - { - throw new InvalidOperationException($"风险配置冲突:旧应用 {_applicationId} ({_signatureRequired}, {_deviceProofRequired}, {System.Text.Json.JsonSerializer.Serialize(_riskPolicy)}) 与 {description} ({candidate._signatureRequired}, {candidate._deviceProofRequired}, {System.Text.Json.JsonSerializer.Serialize(candidate._riskPolicy)});拒绝迁移,未覆盖风险配置。"); - } - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicySmokeTests.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicySmokeTests.cs deleted file mode 100644 index fa8bf5cb..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LegacyRiskPolicySmokeTests.cs +++ /dev/null @@ -1,100 +0,0 @@ -using GameFrameX.Entity.Tenant.ClientApiConfig; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal static class LegacyRiskPolicySmokeTests -{ - internal static void Run(string directory) - { - Verify(directory, "existing", true, "AuditOnly"); - Verify(directory, "existing-target", true, "FailClosed", true); - Verify(directory, "missing", false, null); - Console.WriteLine("风险迁移自测通过:旧策略保真、缺策略补建、空值保留、dry-run 回滚、幂等、源目标风险冲突与禁用策略拒绝。"); - } - - private static void Verify(string directory, string name, bool existingPolicy, string? riskPolicy, bool existingTarget = false) - { - using (var source = SingleMainMigration.Connect(DbType.Sqlite, $"DataSource={Path.Combine(directory, name + "-source.db")}")) - using (var target = SingleMainMigration.Connect(DbType.Sqlite, $"DataSource={Path.Combine(directory, name + "-target.db")}")) - { - var types = new[] { typeof(TenantClientApiPolicyEntity) }; - target.Ado.ExecuteCommand("CREATE TABLE system_tenant_entity (id BIGINT PRIMARY KEY, is_deleted BOOLEAN)"); - target.Ado.ExecuteCommand("INSERT INTO system_tenant_entity VALUES (1300000000001, 0)"); - source.Ado.ExecuteCommand("CREATE TABLE tenant_game_app_entity (id BIGINT PRIMARY KEY, is_deleted BOOLEAN, signature_required BOOLEAN, device_proof_required BOOLEAN, risk_policy TEXT)"); - source.Ado.ExecuteCommand("INSERT INTO tenant_game_app_entity VALUES (8101, false, true, true, @risk)", new SugarParameter("@risk", riskPolicy)); - if (existingPolicy) - { - source.CodeFirst.InitTables(); - source.Insertable(new TenantClientApiPolicyEntity { Id = 9101, IsEnabled = true, SigningKey = "existing-signing-key", LifetimeMinutes = 37 }).ExecuteCommand(); - if (existingTarget) - { - target.CodeFirst.InitTables(); - target.Insertable(new TenantClientApiPolicyEntity { Id = 9101, IsEnabled = true, SigningKey = "existing-signing-key", LifetimeMinutes = 37 }).ExecuteCommand(); - } - - foreach (var column in new[] { "signature_required", "device_proof_required", "risk_policy" }) - { - source.Ado.ExecuteCommand($"ALTER TABLE tenant_client_api_policy_entity DROP COLUMN {column}"); - if (existingTarget) - { - target.Ado.ExecuteCommand($"ALTER TABLE tenant_client_api_policy_entity DROP COLUMN {column}"); - } - } - } - - SingleMainMigration.Run(source, target, true, types); - Require(existingTarget - ? !target.DbMaintenance.GetColumnInfosByTableName("tenant_client_api_policy_entity", false).Any(column => column.DbColumnName == "risk_policy") - : !target.DbMaintenance.IsAnyTable("tenant_client_api_policy_entity", false), "dry-run 风险建表和更新必须回滚"); - SingleMainMigration.Run(source, target, false, types); - SingleMainMigration.Run(source, target, false, types); - var policy = target.Queryable().Single(); - Require(policy.SignatureRequired && policy.DeviceProofRequired && (riskPolicy == null ? target.Ado.GetInt("SELECT COUNT(*) FROM tenant_client_api_policy_entity WHERE risk_policy IS NULL") == 1 : policy.RiskPolicy == riskPolicy) && policy.IsEnabled == true, "风险三字段及空值必须原样迁移"); - Require(policy.Id == (existingPolicy ? 9101 : 8101), "风险策略身份必须稳定"); - if (existingPolicy) - { - Require(policy.SigningKey == "existing-signing-key" && policy.LifetimeMinutes == 37, "原策略其他字段不得改写"); - } - - target.Updateable().SetColumns(row => row.SignatureRequired == false).Where(row => row.Id == policy.Id).ExecuteCommand(); - Reject(() => SingleMainMigration.Run(source, target, false, types), "风险配置冲突"); - Require(!target.Queryable().Single().SignatureRequired, "冲突不得覆盖目标设置"); - target.Updateable().SetColumns(row => row.SignatureRequired == true).Where(row => row.Id == policy.Id).ExecuteCommand(); - target.Updateable().SetColumns(row => row.IsEnabled == false).Where(row => row.Id == policy.Id).ExecuteCommand(); - Reject(() => SingleMainMigration.Run(source, target, false, types), existingPolicy ? "主键碰撞" : "唯一启用策略"); - Require(target.Queryable().Single().IsEnabled == false, "禁用策略不得被自动启用"); - Require(source.Ado.GetInt("SELECT COUNT(*) FROM tenant_game_app_entity WHERE signature_required = true AND device_proof_required = true") == 1, "源应用风险配置必须保持不变"); - - if (!existingPolicy) - { - source.CodeFirst.InitTables(); - source.Insertable(new TenantClientApiPolicyEntity { Id = 9201, IsEnabled = true, SignatureRequired = false }).ExecuteCommand(); - Reject(() => SingleMainMigration.Run(source, target, true, types), "风险配置冲突"); - } - } - } - - private static void Reject(Action operation, string message) - { - try - { - operation(); - } - catch (InvalidOperationException exception) - { - Require(exception.Message.Contains(message, StringComparison.Ordinal), "实际异常:" + exception.Message); - return; - } - - throw new InvalidOperationException("应拒绝迁移:" + message); - } - - private static void Require(bool condition, string message) - { - if (!condition) - { - throw new InvalidOperationException(message); - } - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanup.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanup.cs deleted file mode 100644 index 2d45ca91..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanup.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Data; -using GameFrameX.Core.Logging; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -/// 仅处理日志白名单;使用与运行时相同的脱敏规则,不输出日志内容。 -internal static class LogCredentialCleanup -{ - internal static bool IsLogTable(string tableName) - { - return new[] { "system", "tenant" }.Any(prefix => new[] { "operation", "exception", "visit", "diff", "audit" } - .Any(kind => tableName.Equals($"{prefix}_log_{kind}_entity", StringComparison.OrdinalIgnoreCase))); - } - - internal static void RedactRow(string tableName, DataRow row) - { - if (!IsLogTable(tableName)) - { - return; - } - - var snapshot = new System.Text.Json.Nodes.JsonObject(); - foreach (DataColumn column in row.Table.Columns) - { - if (row[column] is string value) - { - snapshot[column.ColumnName] = value; - } - } - - var redacted = System.Text.Json.Nodes.JsonNode.Parse(SensitiveLogRedactor.Redact(snapshot.ToJsonString())!)!; - foreach (DataColumn column in row.Table.Columns) - { - if (row[column] is string value) - { - row[column] = tableName.EndsWith("_diff_entity", StringComparison.OrdinalIgnoreCase) - && column.ColumnName.ToLowerInvariant() is "sql" or "parameters" - ? SensitiveLogRedactor.Mask : redacted[column.ColumnName]!.GetValue(); - } - } - } - - internal static int Apply(ISqlSugarClient database, bool dryRun) - { - var affected = 0; - foreach (var table in database.DbMaintenance.GetTableInfoList(false).Where(table => IsLogTable(table.Name))) - { - var rows = database.Ado.GetDataTable($"SELECT * FROM {Quote(table.Name)}"); - var changedRows = 0; - foreach (DataRow row in rows.Rows) - { - var original = row.ItemArray; - RedactRow(table.Name, row); - var columns = rows.Columns.Cast().Where(column => !Equals(row[column], original[column.Ordinal])).ToArray(); - if (columns.Length == 0) - { - continue; - } - - changedRows++; - if (!dryRun) - { - var parameters = columns.Select((column, index) => new SugarParameter($"@value{index}", row[column], column.DataType)).ToList(); - parameters.Add(new SugarParameter("@identity", row["id"])); - database.Ado.ExecuteCommand($"UPDATE {Quote(table.Name)} SET {string.Join(", ", columns.Select((column, index) => $"{Quote(column.ColumnName)} = @value{index}"))} WHERE id = @identity", parameters); - } - } - - affected += changedRows; - Console.WriteLine($"日志脱敏 {table.Name}: 受影响 {changedRows} 行{(dryRun ? "(仅预览)" : "")}。"); - } - - return affected; - } - - private static string Quote(string identifier) - { - return "\"" + identifier.Replace("\"", "\"\"") + "\""; - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanupSmokeTests.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanupSmokeTests.cs deleted file mode 100644 index 72049645..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/LogCredentialCleanupSmokeTests.cs +++ /dev/null @@ -1,65 +0,0 @@ -using GameFrameX.Core.Logging; -using GameFrameX.Entity.Log; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal static class LogCredentialCleanupSmokeTests -{ - internal static void Run(ISqlSugarClient source, ISqlSugarClient target) - { - const string plain = "historical-login-credential-23456"; - var payload = "{\"Password\":\"" + plain + "\",\"AccessToken\":\"" + plain + "\",\"RefreshToken\":\"" + plain + "\"}"; - source.CodeFirst.InitTables(); - target.CodeFirst.InitTables(); - var row = new TenantLogOperationEntity { Id = 6401 }; - foreach (var property in typeof(TenantLogOperationEntity).GetProperties().Where(property => property.CanWrite && property.PropertyType == typeof(string))) - { - property.SetValue(row, string.Empty); - } - - row.Message = payload; - row.RequestParam = payload; - row.ReturnResult = payload; - row.Exception = plain; - source.Insertable(row).ExecuteCommand(); - var mainRow = new SystemLogOperationEntity { Id = 6402 }; - foreach (var property in typeof(SystemLogOperationEntity).GetProperties().Where(property => property.CanWrite && property.PropertyType == typeof(string))) - { - property.SetValue(mainRow, string.Empty); - } - - mainRow.Message = payload; - mainRow.Exception = plain; - target.Insertable(mainRow).ExecuteCommand(); - source.Insertable(new TenantLogAuditEntity { Id = 6410, TableName = "system_user_entity", ColumnName = "Password", OldValue = plain, NewValue = plain }).ExecuteCommand(); - target.Insertable(new SystemLogAuditEntity { Id = 6411, TableName = "system_user_entity", ColumnName = "Password", OldValue = plain, NewValue = plain }).ExecuteCommand(); - Require(LogCredentialCleanup.Apply(target, true) == 2, "独立清理预览仅报告受影响行数"); - Require(target.Queryable().InSingle(6402).Message == payload, "清理预览不得改写数据"); - var types = new[] { typeof(TenantLogOperationEntity), typeof(SystemLogOperationEntity), typeof(TenantLogAuditEntity), typeof(SystemLogAuditEntity) }; - SingleMainMigration.Run(source, target, true, types); - Require(target.Queryable().InSingle(6402).Message == payload, "迁移预览必须回滚脱敏"); - SingleMainMigration.Run(source, target, false, types); - SingleMainMigration.Run(source, target, false, types); - Require(!target.Queryable().InSingle(6402).Message!.Contains(plain) && !target.Queryable().InSingle(6402).Exception!.Contains(plain), "主库旧日志必须脱敏"); - var migrated = target.Queryable().InSingle(6401); - Require(!migrated.Message!.Contains(plain) && !migrated.RequestParam!.Contains(plain) && !migrated.ReturnResult!.Contains(plain) && !migrated.Exception!.Contains(plain), "迁入日志各快照必须脱敏"); - Require(target.Queryable().InSingle(6411).OldValue == SensitiveLogRedactor.Mask && target.Queryable().InSingle(6411).NewValue == SensitiveLogRedactor.Mask, "主库审计新旧值必须脱敏"); - Require(target.Queryable().InSingle(6410).OldValue == SensitiveLogRedactor.Mask && target.Queryable().InSingle(6410).NewValue == SensitiveLogRedactor.Mask, "迁入审计新旧值必须脱敏"); - Require(source.Queryable().InSingle(6410).OldValue == plain, "源审计值不得改写"); - Require(source.Queryable().InSingle(6401).Message == payload, "源日志不得改写"); - Require(LogCredentialCleanup.Apply(target, false) == 0, "再次清理必须幂等"); - // 模拟尚未运行整库迁移的主库,独立清理模式同样可以收敛。 - target.Updateable().SetColumns(item => item.Message == payload).Where(item => item.Id == 6402).ExecuteCommand(); - Require(LogCredentialCleanup.Apply(target, false) == 1 && LogCredentialCleanup.Apply(target, false) == 0, "独立清理必须幂等"); - Console.WriteLine("日志凭据自测通过:主库清理、迁入脱敏、预览不写、源只读、execute 重跑与独立清理幂等。"); - } - - private static void Require(bool condition, string message) - { - if (!condition) - { - throw new InvalidOperationException(message); - } - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/MigrationSmokeTests.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/MigrationSmokeTests.cs deleted file mode 100644 index 1b37ba2a..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/MigrationSmokeTests.cs +++ /dev/null @@ -1,108 +0,0 @@ -using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Log; -using GameFrameX.Entity.Global; -using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal static class MigrationSmokeTests -{ - internal static void Run() - { - var directory = Path.Combine(Path.GetTempPath(), "gfx-single-main-" + Guid.NewGuid().ToString("N")); - Directory.CreateDirectory(directory); - try - { - using (var source = SingleMainMigration.Connect(DbType.Sqlite, $"DataSource={Path.Combine(directory, "source.db")}")) - using (var target = SingleMainMigration.Connect(DbType.Sqlite, $"DataSource={Path.Combine(directory, "target.db")}")) - { - var types = new[] { typeof(TenantGameHomeOnlineSampleEntity), typeof(TenantGameGoodsEntity), typeof(SystemUserEntity), typeof(SystemLogVisitEntity), typeof(TenantClientApiPolicyEntity) }; - target.Ado.ExecuteCommand("CREATE TABLE system_tenant_entity (id BIGINT PRIMARY KEY, is_deleted BOOLEAN)"); - target.Ado.ExecuteCommand("INSERT INTO system_tenant_entity VALUES (1300000000001, 0)"); - target.CodeFirst.InitTables(); - target.Ado.ExecuteCommand("ALTER TABLE system_user_entity ADD COLUMN tenant_id BIGINT NOT NULL DEFAULT 0"); - target.CodeFirst.InitTables(); - target.CodeFirst.InitTables(); - target.Insertable(new GlobalMenuEntity { Id = 9001, Key = "permission:auto:migration", Title = "迁移菜单", AppScope = (MenuAppScopeEnum)2 }).ExecuteCommand(); - source.CodeFirst.InitTables(); - source.Insertable(new TenantGameGoodsEntity { Id = 8001, Name = "主库资源", ConfigId = 42 }).ExecuteCommand(); - source.CodeFirst.InitTables(); - source.Insertable(new TenantGameHomeOnlineSampleEntity { Id = 7001, SampleTime = 1000, OnlineCount = 42 }).ExecuteCommand(); - source.Ado.ExecuteCommand("ALTER TABLE tenant_game_home_online_sample_entity ADD COLUMN tenant_id BIGINT NOT NULL DEFAULT 1300000000001"); - source.Ado.ExecuteCommand("ALTER TABLE tenant_game_home_online_sample_entity ADD COLUMN app_id BIGINT NOT NULL DEFAULT 100"); - target.CodeFirst.InitTables(); - target.Ado.ExecuteCommand("DROP INDEX ux_home_online_sample_tenant_time"); - target.Ado.ExecuteCommand("ALTER TABLE tenant_game_home_online_sample_entity ADD COLUMN tenant_id BIGINT NOT NULL DEFAULT 1300000000001"); - target.Ado.ExecuteCommand("ALTER TABLE tenant_game_home_online_sample_entity ADD COLUMN app_id BIGINT NOT NULL DEFAULT 100"); - target.Ado.ExecuteCommand("CREATE UNIQUE INDEX ux_home_online_sample_tenant_time ON tenant_game_home_online_sample_entity (tenant_id, sample_time)"); - source.CodeFirst.InitTables(); - source.Insertable(new[] { new TenantClientApiPolicyEntity { Id = 9101 }, new TenantClientApiPolicyEntity { Id = 9102 } }).ExecuteCommand(); - source.Ado.ExecuteCommand("ALTER TABLE tenant_client_api_policy_entity ADD COLUMN app_id BIGINT NOT NULL DEFAULT 0"); - source.Ado.ExecuteCommand("UPDATE tenant_client_api_policy_entity SET app_id = 100 WHERE id = 9102"); - Reject(() => SingleMainMigration.Run(source, target, true, types), "默认层与应用层策略碰撞必须拒绝", "配置作用域碰撞"); - source.Deleteable().Where(row => row.Id == 9102).ExecuteCommand(); - SingleMainMigration.Run(source, target, true, types); - Require(target.DbMaintenance.GetColumnInfosByTableName("tenant_game_home_online_sample_entity", false).Any(column => column.DbColumnName == "tenant_id"), "dry-run 删列必须回滚"); - Require(target.Queryable().Count() == 0, "dry-run 数据复制必须回滚"); - Require((int)target.Queryable().Single().AppScope == 2, "dry-run 菜单作用域更新必须回滚"); - Require(!target.DbMaintenance.IsAnyTable("tenant_game_goods_entity", false), "dry-run 新建表必须回滚"); - Require(target.DbMaintenance.GetColumnInfosByTableName("system_user_entity", false).Any(column => column.DbColumnName == "tenant_id"), "dry-run 系统表删列必须回滚"); - SingleMainMigration.Run(source, target, false, types); - SingleMainMigration.Run(source, target, false, types); - - LogCredentialCleanupSmokeTests.Run(source, target); - Require(target.Queryable().Count() == 1, "重复迁移必须幂等"); - Require(!target.DbMaintenance.GetColumnInfosByTableName("tenant_game_home_online_sample_entity", false).Any(column => column.DbColumnName is "tenant_id" or "app_id"), "业务作用域列必须删除"); - Require(!target.DbMaintenance.GetColumnInfosByTableName("system_user_entity", false).Any(column => column.DbColumnName == "tenant_id"), "系统表作用域列必须删除"); - Require(target.DbMaintenance.GetColumnInfosByTableName("system_log_visit_entity", false).Any(column => column.DbColumnName == "tenant_id"), "历史审计归属列必须保留"); - Require(target.Queryable().Single().ConfigId == 42, "新建业务表应保真复制"); - Require(target.Queryable().Single().AppScope == MenuAppScopeEnum.Console, "手建菜单作用域必须塌缩"); - Reject(() => target.Insertable(new TenantGameHomeOnlineSampleEntity { Id = 7002, SampleTime = 1000, OnlineCount = 1 }).ExecuteCommand(), "业务时间键仍应唯一", "UNIQUE"); - Require(target.Queryable().Single().OnlineCount == 42, "业务字段必须保真"); - target.Insertable(new TenantClientApiPolicyEntity { Id = 9103 }).ExecuteCommand(); - Reject(() => SingleMainMigration.Run(source, target, false, types), "源目标不同主键的策略碰撞必须拒绝", "配置作用域碰撞"); - Require(target.Queryable().Count() == 2, "拒绝迁移不能改写原目标配置"); - target.Deleteable().Where(row => row.Id == 9103).ExecuteCommand(); - target.Updateable().SetColumns(row => row.OnlineCount == 99).Where(row => row.Id == 7001).ExecuteCommand(); - Reject(() => SingleMainMigration.Run(source, target, false, types), "冲突必须拒绝", "主键碰撞"); - Require(target.Queryable().Single().OnlineCount == 99, "冲突不得覆盖目标"); - target.Ado.ExecuteCommand("INSERT INTO system_tenant_entity VALUES (9000, 0)"); - Reject(() => SingleMainMigration.Run(source, target, true, types), "多租户必须拒绝", "多租户"); - Require(source.Queryable().Single().OnlineCount == 42, "源库必须不变"); - } - - LegacyRiskPolicySmokeTests.Run(directory); - Console.WriteLine("迁移自测通过:dry-run 删列/复制回滚、业务索引重建、保真复制、幂等重跑、冲突拒绝、多租户拒绝、源库只读。"); - } - finally - { - Directory.Delete(directory, true); - } - } - - private static void Reject(Action operation, string message, string expectedError) - { - try - { - operation(); - } - catch (Exception error) - { - Require(error.Message.Contains(expectedError, StringComparison.OrdinalIgnoreCase), message + ",实际异常:" + error.Message); - return; - } - - throw new InvalidOperationException(message); - } - - private static void Require(bool condition, string message) - { - if (!condition) - { - throw new InvalidOperationException(message); - } - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/PostgresMigrationSmokeTests.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/PostgresMigrationSmokeTests.cs deleted file mode 100644 index 36db0861..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/PostgresMigrationSmokeTests.cs +++ /dev/null @@ -1,78 +0,0 @@ -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; -using Npgsql; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal static class PostgresMigrationSmokeTests -{ - internal static void Run(string maintenanceConnection) - { - var suffix = Guid.NewGuid().ToString("N"); - var sourceName = "gfx_c400_fix_source_" + suffix; - var targetName = "gfx_c400_fix_target_" + suffix; - using (var maintenance = SingleMainMigration.Connect(DbType.PostgreSQL, maintenanceConnection)) - { - try - { - maintenance.Ado.ExecuteCommand($"CREATE DATABASE \"{sourceName}\""); - maintenance.Ado.ExecuteCommand($"CREATE DATABASE \"{targetName}\""); - using (var source = SingleMainMigration.Connect(DbType.PostgreSQL, new NpgsqlConnectionStringBuilder(maintenanceConnection) { Database = sourceName }.ConnectionString)) - using (var target = SingleMainMigration.Connect(DbType.PostgreSQL, new NpgsqlConnectionStringBuilder(maintenanceConnection) { Database = targetName }.ConnectionString)) - { - var types = new[] { typeof(TenantGameHomeOnlineSampleEntity), typeof(TenantClientApiPolicyEntity) }; - target.Ado.ExecuteCommand("CREATE TABLE system_tenant_entity (id BIGINT PRIMARY KEY, is_deleted BOOLEAN)"); - target.Ado.ExecuteCommand("INSERT INTO system_tenant_entity VALUES (1300000000001, false)"); - source.CodeFirst.InitTables(); - source.Insertable(new TenantGameHomeOnlineSampleEntity { Id = 7001, SampleTime = 1000, OnlineCount = 42 }).ExecuteCommand(); - source.Ado.ExecuteCommand("ALTER TABLE tenant_game_home_online_sample_entity ADD COLUMN tenant_id BIGINT DEFAULT 1300000000001"); - source.Ado.ExecuteCommand("ALTER TABLE tenant_game_home_online_sample_entity ADD COLUMN app_id BIGINT DEFAULT 100"); - source.Ado.ExecuteCommand("CREATE TABLE tenant_game_app_entity (id BIGINT PRIMARY KEY, is_deleted BOOLEAN, signature_required BOOLEAN, device_proof_required BOOLEAN, risk_policy TEXT)"); - source.Ado.ExecuteCommand("INSERT INTO tenant_game_app_entity VALUES (8101, false, true, false, NULL)"); - source.CodeFirst.InitTables(); - source.Insertable(new TenantClientApiPolicyEntity { Id = 9101, IsEnabled = true, SigningKey = "postgres-test-signing-key" }).ExecuteCommand(); - foreach (var column in new[] { "signature_required", "device_proof_required", "risk_policy" }) - { - source.Ado.ExecuteCommand($"ALTER TABLE tenant_client_api_policy_entity DROP COLUMN {column}"); - } - - SingleMainMigration.Run(source, target, true, types); - Require(!target.DbMaintenance.IsAnyTable("tenant_game_home_online_sample_entity", false), "PostgreSQL dry-run 建表/复制必须全部回滚"); - SingleMainMigration.Run(source, target, false, types); - SingleMainMigration.Run(source, target, false, types); - - LogCredentialCleanupSmokeTests.Run(source, target); - Require(target.Ado.GetInt("SELECT COUNT(*) FROM tenant_game_home_online_sample_entity WHERE online_count = 42 AND update_time IS NULL AND deleted_id IS NULL") == 1, "PostgreSQL 非文本NULL必须保真复制且重跑幂等"); - Require(target.Ado.GetInt("SELECT COUNT(*) FROM tenant_client_api_policy_entity WHERE signature_required = true AND device_proof_required = false AND risk_policy IS NULL") == 1, "PostgreSQL 风险三字段必须保真"); - Require(source.Ado.GetInt("SELECT COUNT(*) FROM tenant_game_home_online_sample_entity WHERE tenant_id = 1300000000001 AND app_id = 100") == 1, "PostgreSQL 源库保持不变"); - target.Ado.ExecuteCommand("UPDATE tenant_game_home_online_sample_entity SET online_count = 99"); - try - { - SingleMainMigration.Run(source, target, false, types); - throw new InvalidOperationException("PostgreSQL 主键冲突必须拒绝"); - } - catch (InvalidOperationException exception) when (exception.Message.Contains("主键碰撞", StringComparison.Ordinal)) - { - Require(target.Ado.GetInt("SELECT online_count FROM tenant_game_home_online_sample_entity") == 99, "PostgreSQL 冲突不得覆盖"); - } - } - - Console.WriteLine("PostgreSQL 迁移自测通过:NULL类型绑定、dry-run回滚、execute及再次execute、风险保真、冲突拒绝和源库只读。"); - } - finally - { - maintenance.Ado.ExecuteCommand($"DROP DATABASE IF EXISTS \"{sourceName}\" WITH (FORCE)"); - maintenance.Ado.ExecuteCommand($"DROP DATABASE IF EXISTS \"{targetName}\" WITH (FORCE)"); - } - } - } - - private static void Require(bool condition, string message) - { - if (!condition) - { - throw new InvalidOperationException(message); - } - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/Program.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/Program.cs deleted file mode 100644 index 3cb96cf0..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/Program.cs +++ /dev/null @@ -1,96 +0,0 @@ -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal static class Program -{ - private static int Main(string[] arguments) - { - try - { - if (arguments.SequenceEqual(new[] { "--self-test" })) - { - MigrationSmokeTests.Run(); - return 0; - } - - if (arguments.SequenceEqual(new[] { "--self-test-postgres" })) - { - PostgresMigrationSmokeTests.Run(RequiredEnvironment("GFX_TEST_PG_CONNECTION_STRING")); - return 0; - } - - if (arguments.Length == 1 && arguments[0] is "--redact-logs-dry-run" or "--redact-logs") - { - var cleanupType = Enum.Parse(RequiredEnvironment("GFX_MIGRATION_DATABASE_TYPE"), true); - using (var database = SingleMainMigration.Connect(cleanupType, RequiredEnvironment("GFX_MIGRATION_TARGET"))) - { - database.Ado.BeginTran(); - try - { - LogCredentialCleanup.Apply(database, arguments[0] == "--redact-logs-dry-run"); - database.Ado.CommitTran(); - } - catch - { - database.Ado.RollbackTran(); - throw; - } - } - - return 0; - } - - if (arguments.Length != 1 || (arguments[0] != "--dry-run" && arguments[0] != "--execute")) - { - Console.Error.WriteLine("用法:--dry-run | --execute | --self-test | --self-test-postgres | --redact-logs-dry-run | --redact-logs;连接通过 GFX_MIGRATION_SOURCE / GFX_MIGRATION_TARGET,类型通过 GFX_MIGRATION_DATABASE_TYPE 指定。"); - return 64; - } - - var databaseType = Enum.Parse(RequiredEnvironment("GFX_MIGRATION_DATABASE_TYPE"), true); - using (var source = SingleMainMigration.Connect(databaseType, RequiredEnvironment("GFX_MIGRATION_SOURCE"))) - using (var target = SingleMainMigration.Connect(databaseType, RequiredEnvironment("GFX_MIGRATION_TARGET"))) - { - SingleMainMigration.Run(source, target, arguments[0] == "--dry-run"); - } - - return 0; - } - catch (Exception exception) - { - if (arguments.SequenceEqual(new[] { "--self-test" })) - { - Console.Error.WriteLine(exception); - } - - // 数据库异常可能包含连接凭据或行内容,不直接打印异常消息。 - Console.Error.WriteLine($"迁移终止,目标事务已回滚;错误类型:{exception.GetType().Name}。"); - for (Exception? current = exception; current != null; current = current.InnerException) - { - if (current.Data["MigrationTable"] is string tableName - && tableName.All(character => char.IsAsciiLetterOrDigit(character) || character == '_')) - { - Console.Error.WriteLine($"当前表:{tableName}"); - } - - if (current is System.Data.Common.DbException databaseException - && databaseException.SqlState is string sqlState - && sqlState.Length == 5 && sqlState.All(char.IsAsciiLetterOrDigit)) - { - Console.Error.WriteLine($"SQLSTATE:{sqlState}"); - } - } - if (exception is InvalidOperationException && exception.Source == typeof(SingleMainMigration).Assembly.GetName().Name) - { - Console.Error.WriteLine(exception.Message); - } - - return 1; - } - } - - private static string RequiredEnvironment(string name) - { - return Environment.GetEnvironmentVariable(name) ?? throw new ArgumentException($"缺少环境变量 {name}"); - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/ScopeColumnRetirement.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/ScopeColumnRetirement.cs deleted file mode 100644 index dee89c69..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/ScopeColumnRetirement.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Text.RegularExpressions; -using SqlSugar; - -namespace GameFrameX.DatabaseMigration; - -internal static class ScopeColumnRetirement -{ - private static readonly string[] RetiredColumns = { "tenant_id", "app_id", "game_app_id", "game_app_id_normalized" }; - - internal static void Apply(ISqlSugarClient target, IEnumerable entityTypes) - { - var existingTables = target.DbMaintenance.GetTableInfoList(false).Select(table => table.Name) - .ToHashSet(StringComparer.OrdinalIgnoreCase); - foreach (var entityType in entityTypes) - { - var entity = target.EntityMaintenance.GetEntityInfo(entityType); - if (!existingTables.Contains(entity.DbTableName)) - { - continue; - } - - // 当前模型仍声明的同名字段(历史审计归属、支付品牌标识)不能删除。 - var currentColumns = entity.Columns.Where(column => !column.IsIgnore).Select(column => column.DbColumnName) - .ToHashSet(StringComparer.OrdinalIgnoreCase); - var removedColumns = target.DbMaintenance.GetColumnInfosByTableName(entity.DbTableName, false) - .Select(column => column.DbColumnName) - .Where(column => RetiredColumns.Contains(column, StringComparer.OrdinalIgnoreCase) && !currentColumns.Contains(column)) - .ToArray(); - if (removedColumns.Length == 0) - { - continue; - } - - if (target.CurrentConnectionConfig.DbType == DbType.Sqlite) - { - var indexes = target.Ado.GetDataTable("SELECT name, sql FROM sqlite_master WHERE type = 'index' AND tbl_name = @table AND sql IS NOT NULL", - new SugarParameter("@table", entity.DbTableName)); - foreach (System.Data.DataRow index in indexes.Rows) - { - var definition = Convert.ToString(index["sql"]) ?? string.Empty; - if (removedColumns.Any(column => Regex.IsMatch(definition, @"\b" + Regex.Escape(column) + @"\b", RegexOptions.IgnoreCase))) - { - target.Ado.ExecuteCommand($"DROP INDEX {Quote(Convert.ToString(index["name"])!)}"); - } - } - } - - foreach (var column in removedColumns) - { - // PostgreSQL 同时移除依赖该列的旧索引;不使用 CASCADE 删除其他对象。 - try - { - target.Ado.ExecuteCommand($"ALTER TABLE {Quote(entity.DbTableName)} DROP COLUMN {Quote(column)}"); - } - catch (Exception exception) - { - exception.Data["MigrationTable"] = entity.DbTableName; - throw; - } - Console.WriteLine($"删除退场列:{entity.DbTableName}.{column}"); - } - - target.Utilities.RemoveCacheAll(); - // 按当前实体的业务键重建索引;塌缩后的唯一键冲突会终止并回滚迁移。 - target.CodeFirst.InitTables(entityType); - } - } - - private static string Quote(string identifier) - { - return "\"" + identifier.Replace("\"", "\"\"") + "\""; - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/SingleMainMigration.cs b/GameFrameX.Admin.Unified.Api/db/single-main/migration/SingleMainMigration.cs deleted file mode 100644 index f86525ac..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/SingleMainMigration.cs +++ /dev/null @@ -1,249 +0,0 @@ -using System.Data; -using System.Globalization; -using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.System; -using GameFrameX.Entity.Global; -using GameFrameX.Entity.Tenant; -using SqlSugar; -using DatabaseType = SqlSugar.DbType; - -namespace GameFrameX.DatabaseMigration; - -internal static class SingleMainMigration -{ - private const long DefaultTenantId = 1300000000001; - - internal static SqlSugarClient Connect(DatabaseType databaseType, string connectionString) - { - if (databaseType != DatabaseType.Sqlite && databaseType != DatabaseType.PostgreSQL) - { - throw new InvalidOperationException("迁移仅支持 SQLite dry-run 与 PostgreSQL 发布库。"); - } - - var configuration = new ConnectionConfig - { - ConfigId = "main", - DbType = databaseType, - ConnectionString = connectionString, - IsAutoCloseConnection = false, - }; - SqlSugarUnifiedConfig.ConfigureBaseSettings(configuration); - configuration.IsAutoCloseConnection = false; - return new SqlSugarClient(configuration); - } - - internal static void Run(ISqlSugarClient source, ISqlSugarClient target, bool dryRun, Type[]? entityTypes = null) - { - if (source.CurrentConnectionConfig.ConnectionString == target.CurrentConnectionConfig.ConnectionString) - { - throw new InvalidOperationException("源库与目标库必须不同。"); - } - - if (source.CurrentConnectionConfig.DbType != target.CurrentConnectionConfig.DbType) - { - throw new InvalidOperationException("源库与目标库必须使用相同数据库类型。"); - } - - source.Ado.BeginTran(IsolationLevel.Serializable); - target.Ado.BeginTran(IsolationLevel.Serializable); - try - { - source.Ado.ExecuteCommand(source.CurrentConnectionConfig.DbType == DatabaseType.Sqlite - ? "PRAGMA query_only = ON" : "SET TRANSACTION READ ONLY"); - ValidateDefaultInstance(source, target); - var riskMigration = LegacyRiskPolicyMigration.Prepare(source, target); - ConfigurationCollisionGuard.Validate(source, true); - ConfigurationCollisionGuard.Validate(target, true); - var currentTypes = entityTypes ?? typeof(TenantUserEntity).Assembly.GetTypes() - .Where(type => type.IsClass && !type.IsAbstract && type.IsDefined(typeof(SugarTable), false)) - .OrderBy(type => type.FullName, StringComparer.Ordinal).ToArray(); - ScopeColumnRetirement.Apply(target, currentTypes); - riskMigration?.CompleteLegacyTarget(target); - NormalizeMenuScope(target); - LogCredentialCleanup.Apply(target, false); - var types = currentTypes.Where(SqlSugarEntityBoundary.IsTenantTable).ToArray(); - var sourceTables = source.DbMaintenance.GetTableInfoList(false).Select(table => table.Name).ToHashSet(StringComparer.OrdinalIgnoreCase); - var copiedTables = new HashSet(StringComparer.OrdinalIgnoreCase); - foreach (var entityType in types) - { - var tableName = target.EntityMaintenance.GetEntityInfo(entityType).DbTableName; - if (!sourceTables.Contains(tableName)) - { - continue; - } - - // 目标业务表按当前实体创建;已退场实体不在程序集清单,不搬运。 - try - { - target.CodeFirst.InitTables(entityType); - CopyTable(source, target, tableName, riskMigration); - } - catch (Exception exception) - { - exception.Data["MigrationTable"] = tableName; - throw; - } - copiedTables.Add(tableName); - } - - riskMigration?.Apply(target); - ConfigurationCollisionGuard.Validate(target, false); - - foreach (var ignored in sourceTables.Except(copiedTables).OrderBy(name => name, StringComparer.Ordinal)) - { - Console.WriteLine($"未迁移表:{ignored}"); - } - - ReportRetiredTables(source, "源库"); - ReportRetiredTables(target, "目标库"); - if (dryRun) - { - target.Ado.RollbackTran(); - Console.WriteLine("dry-run 完成:已执行删列、业务索引重建、建表、碰撞核对、复制并回滚全部目标变更。"); - } - else - { - target.Ado.CommitTran(); - Console.WriteLine("迁移已提交;重复执行只核对既有行,不覆盖目标值。"); - } - } - catch - { - target.Ado.RollbackTran(); - throw; - } - finally - { - source.Ado.RollbackTran(); - if (source.CurrentConnectionConfig.DbType == DatabaseType.Sqlite) - { - source.Ado.ExecuteCommand("PRAGMA query_only = OFF"); - } - - target.Utilities.RemoveCacheAll(); - } - } - - private static void ReportRetiredTables(ISqlSugarClient database, string label) - { - var retiredTables = new HashSet(StringComparer.OrdinalIgnoreCase) - { - "system_tenant_entity", "system_tenant_menu_sync_state_entity", - "global_package_entity", "global_package_menu_entity", "tenant_game_app_entity", - "tenant_notice_entity", "tenant_notice_user_entity", "tenant_organization_entity", - "tenant_position_entity", "tenant_role_organization_entity", "tenant_user_extension_organization_entity", - }; - var remaining = database.DbMaintenance.GetTableInfoList(false).Select(table => table.Name) - .Where(retiredTables.Contains).OrderBy(name => name, StringComparer.Ordinal).ToArray(); - Console.WriteLine($"{label}残留退场表(不自动删除):{(remaining.Length == 0 ? "无" : string.Join(", ", remaining))}"); - if (remaining.Length > 0) - { - Console.WriteLine("确认迁移、备份及重复执行完成后,可由运维手动 DROP;system_tenant_entity 可能含加密的旧租户库连接串,备份与清理按敏感凭据处理。"); - } - } - - private static void NormalizeMenuScope(ISqlSugarClient target) - { - var tableName = target.EntityMaintenance.GetEntityInfo().DbTableName; - if (target.DbMaintenance.IsAnyTable(tableName, false) - && target.DbMaintenance.GetColumnInfosByTableName(tableName, false).Any(column => column.DbColumnName == "app_scope")) - { - target.Ado.ExecuteCommand($"UPDATE {Quote(tableName)} SET app_scope = 0 WHERE app_scope <> 0"); - } - } - - private static void ValidateDefaultInstance(ISqlSugarClient source, ISqlSugarClient target) - { - const string registryTable = "system_tenant_entity"; - if (!target.DbMaintenance.IsAnyTable(registryTable, false)) - { - throw new InvalidOperationException("目标必须是已有主库,缺少租户登记表,无法确认默认实例。"); - } - - var registered = target.Ado.GetDataTable($"SELECT id FROM {Quote(registryTable)} WHERE is_deleted = false"); - if (registered.Rows.Count != 1 || Convert.ToInt64(registered.Rows[0][0], CultureInfo.InvariantCulture) != DefaultTenantId) - { - throw new InvalidOperationException("只支持主库仅登记默认租户的自托管实例;多租户老库必须另行迁移。"); - } - - if (source.DbMaintenance.IsAnyTable("tenant_game_app_entity", false)) - { - var applications = source.Ado.GetDataTable("SELECT id FROM tenant_game_app_entity WHERE is_deleted = false"); - if (applications.Rows.Count > 1) - { - throw new InvalidOperationException("源库包含多个应用,无法自动塌缩配置。"); - } - } - } - - private static void CopyTable(ISqlSugarClient source, ISqlSugarClient target, string tableName, LegacyRiskPolicyMigration? riskMigration) - { - var sourceColumns = source.DbMaintenance.GetColumnInfosByTableName(tableName, false); - var targetColumns = target.DbMaintenance.GetColumnInfosByTableName(tableName, false); - var columns = targetColumns.Select(column => column.DbColumnName) - .Where(column => sourceColumns.Any(sourceColumn => string.Equals(sourceColumn.DbColumnName, column, StringComparison.OrdinalIgnoreCase))) - .ToArray(); - if (!columns.Any(column => string.Equals(column, "id", StringComparison.OrdinalIgnoreCase))) - { - throw new InvalidOperationException($"表 {tableName} 无 id 主键,拒绝自动合并。"); - } - - var scopeColumn = sourceColumns.FirstOrDefault(column => string.Equals(column.DbColumnName, "tenant_id", StringComparison.OrdinalIgnoreCase)); - if (scopeColumn != null && source.Ado.GetInt($"SELECT COUNT(*) FROM {Quote(tableName)} WHERE {Quote(scopeColumn.DbColumnName)} IS NOT NULL AND {Quote(scopeColumn.DbColumnName)} NOT IN (0, {DefaultTenantId})") > 0) - { - throw new InvalidOperationException($"表 {tableName} 含非默认租户记录。"); - } - - var sourceColumnList = string.Join(", ", columns.Select(Quote)); - var rows = source.Ado.GetDataTable($"SELECT {sourceColumnList} FROM {Quote(tableName)} ORDER BY id"); - riskMigration?.EnrichCopiedPolicy(tableName, rows); - columns = rows.Columns.Cast().Select(column => column.ColumnName).ToArray(); - var columnList = string.Join(", ", columns.Select(Quote)); - var inserted = 0; - foreach (DataRow row in rows.Rows) - { - LogCredentialCleanup.RedactRow(tableName, row); - var existing = target.Ado.GetDataTable($"SELECT {columnList} FROM {Quote(tableName)} WHERE id = @identity", new SugarParameter("@identity", row["id"])); - if (existing.Rows.Count != 0) - { - if (columns.Any(column => !ValuesEqual(row[column], existing.Rows[0][column]))) - { - throw new InvalidOperationException($"表 {tableName} 主键碰撞且内容不同;未覆盖目标数据。"); - } - - continue; - } - - var parameters = columns.Select((column, index) => new SugarParameter($"@value{index}", row[column], rows.Columns[column]!.DataType)).ToArray(); - target.Ado.ExecuteCommand($"INSERT INTO {Quote(tableName)} ({columnList}) VALUES ({string.Join(", ", parameters.Select(parameter => parameter.ParameterName))})", parameters); - inserted++; - } - - Console.WriteLine($"{tableName}: 检查 {rows.Rows.Count} 行,新增 {inserted} 行。"); - } - - private static bool ValuesEqual(object left, object right) - { - if (left is DBNull || right is DBNull) - { - return left is DBNull && right is DBNull; - } - - if (left is bool || right is bool) - { - return Convert.ToBoolean(left, CultureInfo.InvariantCulture) == Convert.ToBoolean(right, CultureInfo.InvariantCulture); - } - - if (left is byte[] leftBytes && right is byte[] rightBytes) - { - return leftBytes.SequenceEqual(rightBytes); - } - - return Convert.ToString(left, CultureInfo.InvariantCulture) == Convert.ToString(right, CultureInfo.InvariantCulture); - } - - private static string Quote(string identifier) - { - return "\"" + identifier.Replace("\"", "\"\"") + "\""; - } -} diff --git a/GameFrameX.Admin.Unified.Api/db/single-main/migration/migration.csproj b/GameFrameX.Admin.Unified.Api/db/single-main/migration/migration.csproj deleted file mode 100644 index 0e9771a3..00000000 --- a/GameFrameX.Admin.Unified.Api/db/single-main/migration/migration.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - Exe - false - - - - - - - From 5d30f9136a88d2d698e7fa0674e8a73e30bf0df9 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:28:39 +0800 Subject: [PATCH 02/86] =?UTF-8?q?refactor:=20=E5=BA=94=E7=94=A8=20C406=20?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=94=B9=E5=90=8D=E8=84=9A=E6=9C=AC=EF=BC=88?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E5=85=A8=E9=87=8F=E6=9C=BA=E6=A2=B0=E5=8E=BB?= =?UTF-8?q?=20Tenant=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按契约 §3/D2 执行:Token 删除 Tenant 成分并修正大小写;命名空间段 Tenant→Business; 边界 Attribute 改 BusinessTable;删除撞名零引用的 TenantFileResponse、TenantRoleResponse。 本提交点 build 尚未修复(BusinessTableAttribute 待 D3 批次新增),已按契约 §3 通知节点提交。 Linear: GFX-1232 --- .../AdvertisementCallbackConfigCrypto.cs | 10 +- .../AdvertisementCallbackHandlerBase.cs | 8 +- ...ons.cs => AdvertisementCallbackOptions.cs} | 2 +- .../IAdvertisementCallbackHandler.cs | 2 +- .../RoleResolution.cs | 4 +- .../AdMobAdvertisementCallbackHandler.cs | 6 +- .../PangleAdvertisementCallbackHandler.cs | 8 +- .../TopOnAdvertisementCallbackHandler.cs | 6 +- .../UnityAdsAdvertisementCallbackHandler.cs | 6 +- .../Audit/Logging/BaseLogService.cs | 22 +- .../Audit/Logging/LogDiffService.cs | 10 +- .../Audit/Logging/LogExceptionService.cs | 8 +- .../Audit/Logging/LogOperationService.cs | 8 +- .../Audit/Logging/LogVisitService.cs | 10 +- .../Audit/Retention/AuditRetentionService.cs | 2 +- .../AdvertisementCallbackConfigService.cs | 30 +- ... AddAdvertisementCallbackConfigRequest.cs} | 2 +- .../AdvertisementCallbackConfigResponse.cs | 4 +- ...PageAdvertisementCallbackConfigRequest.cs} | 2 +- ...dateAdvertisementCallbackConfigRequest.cs} | 2 +- ...ddGameAdvertisementRewardEntityRequest.cs} | 2 +- .../Dto/GameAdvertisementRewardResponse.cs | 4 +- ...geGameAdvertisementRewardEntityRequest.cs} | 2 +- ...teGameAdvertisementRewardEntityRequest.cs} | 2 +- .../GameAdvertisementRewardService.cs | 18 +- .../AppScope/AssetPackageScopeValidator.cs | 4 +- .../AppScope/PackageScopeValidator.cs | 4 +- .../ChannelDefinitionManagementServiceBase.cs | 10 +- .../ChannelDefinitionService.cs | 12 +- .../Dto/AddChannelDefinitionRequest.cs | 2 +- .../Dto/ChannelDefinitionResponse.cs | 2 +- .../Dto/UpdateChannelDefinitionRequest.cs | 2 +- .../ClientApiPolicy/ClientApiPolicyService.cs | 28 +- ...equest.cs => AddClientApiPolicyRequest.cs} | 2 +- .../Dto/ClientApiPolicyResponse.cs | 2 +- ...quest.cs => PageClientApiPolicyRequest.cs} | 2 +- ...est.cs => UpdateClientApiPolicyRequest.cs} | 2 +- .../Device/DeviceGroup/DeviceGroupService.cs | 24 +- ...oupRequest.cs => AddDeviceGroupRequest.cs} | 2 +- .../DeviceGroup/Dto/DeviceGroupResponse.cs | 4 +- ...Request.cs => UpdateDeviceGroupRequest.cs} | 2 +- ...eRequest.cs => AddGameAppDeviceRequest.cs} | 2 +- .../Dto/GameAppDeviceResponse.cs | 4 +- ...quest.cs => UpdateGameAppDeviceRequest.cs} | 2 +- .../GameAppDevice/GameAppDeviceService.cs | 12 +- .../Dto/GameAppFeatureSwitchBaseRequest.cs | 2 +- .../Dto/GameAppFeatureSwitchResponse.cs | 4 +- .../FeatureSwitchDeliveryResolver.cs | 22 +- .../GameAppFeatureSwitchService.cs | 12 +- .../Dto/GameAppAssetPackageResponse.cs | 4 +- .../GameAppAssetPackageService.cs | 4 +- .../Dto/GameAppAssetPackageVersionResponse.cs | 4 +- .../GameAppAssetPackageVersionService.cs | 30 +- ...meAppAssetPackageVersionHistoryResponse.cs | 4 +- ...ameAppAssetPackageVersionHistoryService.cs | 4 +- .../Dto/GameAppPackageResponse.cs | 4 +- .../GameAppPackage/GameAppPackageService.cs | 28 +- .../Dto/GameAppReleaseVersionResponse.cs | 4 +- .../GameAppReleaseVersionService.cs | 8 +- .../Dto/GameAppRemoteConfigResponse.cs | 4 +- .../GameAppRemoteConfigService.cs | 10 +- .../Dto/GameAppRemoteConfigKeyResponse.cs | 4 +- .../GameAppRemoteConfigKeyService.cs | 4 +- .../Dto/GameAppRemoteConfigModeResponse.cs | 4 +- .../GameAppRemoteConfigModeService.cs | 4 +- .../Dto/GameAppServerConfigResponse.cs | 4 +- .../GameAppServerConfigService.cs | 4 +- .../GameAppVersionDefinitionPageResponse.cs | 4 +- .../GameAppVersionDefinitionService.cs | 6 +- .../Dto/GamePaymentConfigResponse.cs | 2 +- .../GamePaymentConfigService.cs | 22 +- ...st.cs => PageGameLoginTicketKeyRequest.cs} | 2 +- .../GameLoginTicketKeyService.cs | 14 +- ...st.cs => AddObjectStorageConfigRequest.cs} | 2 +- .../ObjectStorageConfigService.cs | 32 +- ...t.cs => PageObjectStorageConfigRequest.cs} | 2 +- ...cs => UpdateObjectStorageConfigRequest.cs} | 2 +- .../AppSignatureKey/AppSignatureKeyService.cs | 22 +- ...quest.cs => PageAppSignatureKeyRequest.cs} | 2 +- ...KeyRequest.cs => PageSessionKeyRequest.cs} | 2 +- .../Security/SessionKey/SessionKeyService.cs | 20 +- ...st.cs => AddGameCommodityEntityRequest.cs} | 6 +- .../Dto/GameCommodityResponse.cs | 2 +- ...t.cs => PageGameCommodityEntityRequest.cs} | 2 +- ...cs => UpdateGameCommodityEntityRequest.cs} | 2 +- .../GameCommodity/GameCommodityService.cs | 12 +- ...equest.cs => AddGameGoodsEntityRequest.cs} | 2 +- .../GameGoods/Dto/GameGoodsResponse.cs | 2 +- ...quest.cs => PageGameGoodsEntityRequest.cs} | 2 +- ...est.cs => UpdateGameGoodsEntityRequest.cs} | 2 +- .../GameGoods/GameGoodsService.cs | 16 +- ... => AddGameGoodsCatalogueEntityRequest.cs} | 2 +- .../Dto/GameGoodsCatalogueResponse.cs | 2 +- ...=> PageGameGoodsCatalogueEntityRequest.cs} | 2 +- ... UpdateGameGoodsCatalogueEntityRequest.cs} | 2 +- .../GameGoodsCatalogueService.cs | 14 +- ...equest.cs => AddGameOrderEntityRequest.cs} | 2 +- .../GameOrder/Dto/GameOrderResponse.cs | 4 +- ...quest.cs => PageGameOrderEntityRequest.cs} | 2 +- ...est.cs => UpdateGameOrderEntityRequest.cs} | 2 +- .../FulfillmentLedgerIdempotencyStore.cs | 18 +- .../GameOrder/GameOrderService.cs | 12 +- .../GameOrder/GameOrderShipService.cs | 36 +- .../Dto/GameOrderFulfillmentResponse.cs | 4 +- ... PageGameOrderFulfillmentEntityRequest.cs} | 2 +- ...pdateGameOrderFulfillmentEntityRequest.cs} | 2 +- .../GameOrderChannelRefundService.cs | 18 +- .../GameOrderFulfillmentService.cs | 20 +- ...t.cs => AddGameRedeemCodeEntityRequest.cs} | 2 +- .../Dto/GameRedeemCodeResponse.cs | 2 +- ....cs => PageGameRedeemCodeEntityRequest.cs} | 2 +- ...s => UpdateGameRedeemCodeEntityRequest.cs} | 2 +- .../GameRedeemCode/GameRedeemCodeService.cs | 12 +- ... AddGameRedeemCodeChannelEntityRequest.cs} | 2 +- .../Dto/GameRedeemCodeChannelResponse.cs | 2 +- ...PageGameRedeemCodeChannelEntityRequest.cs} | 2 +- ...dateGameRedeemCodeChannelEntityRequest.cs} | 2 +- .../GameRedeemCodeChannelService.cs | 14 +- ...ddGameRedeemCodeUseRecordEntityRequest.cs} | 2 +- .../Dto/GameRedeemCodeUseRecordResponse.cs | 6 +- ...geGameRedeemCodeUseRecordEntityRequest.cs} | 4 +- ...teGameRedeemCodeUseRecordEntityRequest.cs} | 2 +- .../GameRedeemCodeUseRecordService.cs | 28 +- ...uest.cs => AddGameWebShopEntityRequest.cs} | 2 +- .../GameWebShop/Dto/GameWebShopResponse.cs | 2 +- ...est.cs => PageGameWebShopEntityRequest.cs} | 2 +- ...t.cs => UpdateGameWebShopEntityRequest.cs} | 2 +- .../GameWebShop/GameWebShopService.cs | 8 +- ...cs => AddGameWebShopOrderEntityRequest.cs} | 2 +- .../Dto/GameWebShopOrderResponse.cs | 2 +- ...s => PageGameWebShopOrderEntityRequest.cs} | 2 +- ...=> UpdateGameWebShopOrderEntityRequest.cs} | 2 +- .../GameWebShopOrderService.cs | 18 +- .../GameHome/GameHomeOnlineCounter.cs | 8 +- .../Dashboard/GameHome/GameHomeService.cs | 42 +- .../GameFrameX.Application/GlobalUsings.cs | 4 +- .../Asset/OnlineAssetAuditQueryService.cs | 2 +- .../Asset/OnlineAssetGrantCommandService.cs | 2 +- .../Console/Dto/OnlineAuditSourceKind.cs | 2 +- .../Dto/OnlineControlledCommandRequest.cs | 2 +- .../Console/OnlineAuditSearchService.cs | 18 +- .../GmCenter/Console/OnlineAuditSourceMap.cs | 14 +- .../Console/OnlineControlledCommandService.cs | 2 +- .../AntiCheatEventIdempotencyStore.cs | 8 +- ...est.cs => AddGameAntiCheatEventRequest.cs} | 2 +- ...st.cs => PageGameAntiCheatEventRequest.cs} | 2 +- ... UpdateGameAntiCheatEventReviewRequest.cs} | 2 +- .../GameAntiCheatEventService.cs | 16 +- ...quest.cs => AddGameReportEntityRequest.cs} | 2 +- .../GameReport/Dto/GameReportResponse.cs | 2 +- ... => LinkPenaltyGameReportEntityRequest.cs} | 2 +- ...uest.cs => PageGameReportEntityRequest.cs} | 2 +- ...st.cs => UpdateGameReportEntityRequest.cs} | 2 +- .../GmCenter/GameReport/GameReportService.cs | 22 +- ... => PageGameOnlineConfigRolloutRequest.cs} | 2 +- .../GameOnlineConfigRolloutService.cs | 24 +- .../Dispatch/IOnlineLiveOpsDispatchService.cs | 8 +- .../Dispatch/OnlineLiveOpsDispatchService.cs | 36 +- ...s => AddGameOnlinePlayerSegmentRequest.cs} | 2 +- ... => PageGameOnlinePlayerSegmentRequest.cs} | 2 +- ...> UpdateGameOnlinePlayerSegmentRequest.cs} | 2 +- .../GameOnlinePlayerSegmentService.cs | 22 +- .../OnlineRolloutSemanticMap.cs | 2 +- .../Social/Dto/OnlinePenaltyLinkRequest.cs | 2 +- .../Social/OnlinePenaltyLinkCommandService.cs | 20 +- .../Social/OnlineReportCaseService.cs | 4 +- ...cs => AddGameAnnouncementEntityRequest.cs} | 2 +- .../Dto/GameAnnouncementResponse.cs | 4 +- ...s => PageGameAnnouncementEntityRequest.cs} | 2 +- ...=> UpdateGameAnnouncementEntityRequest.cs} | 2 +- .../GameAnnouncementService.cs | 10 +- ...AddGameBannerAnnouncementEntityRequest.cs} | 2 +- .../Dto/GameBannerAnnouncementResponse.cs | 2 +- ...ageGameBannerAnnouncementEntityRequest.cs} | 2 +- ...ateGameBannerAnnouncementEntityRequest.cs} | 2 +- .../GameBannerAnnouncementService.cs | 10 +- ...Request.cs => AddGameMailEntityRequest.cs} | 2 +- .../GameMail/Dto/GameMailResponse.cs | 2 +- ...equest.cs => PageGameMailEntityRequest.cs} | 2 +- ...uest.cs => UpdateGameMailEntityRequest.cs} | 2 +- .../NoticeCenter/GameMail/GameMailService.cs | 28 +- ...cs => AddGameMailCampaignEntityRequest.cs} | 2 +- ...s => PageGameMailCampaignEntityRequest.cs} | 2 +- ...=> UpdateGameMailCampaignEntityRequest.cs} | 2 +- .../GameMailCampaignService.cs | 26 +- ...cs => AddGameMailTemplateEntityRequest.cs} | 2 +- .../Dto/GameMailTemplateResponse.cs | 2 +- ...s => PageGameMailTemplateEntityRequest.cs} | 2 +- ...=> UpdateGameMailTemplateEntityRequest.cs} | 2 +- .../GameMailTemplateService.cs | 18 +- ...dGameMailTemplateCategoryEntityRequest.cs} | 2 +- .../Dto/GameMailTemplateCategoryResponse.cs | 2 +- ...eGameMailTemplateCategoryEntityRequest.cs} | 2 +- ...eGameMailTemplateCategoryEntityRequest.cs} | 2 +- .../GameMailTemplateCategoryService.cs | 12 +- ... => AddGameRewardTemplateEntityRequest.cs} | 2 +- .../Dto/GameRewardTemplateResponse.cs | 2 +- ...=> PageGameRewardTemplateEntityRequest.cs} | 2 +- ... UpdateGameRewardTemplateEntityRequest.cs} | 2 +- .../GameRewardTemplateService.cs | 20 +- ...ddGameRewardTemplateGroupEntityRequest.cs} | 2 +- .../Dto/GameRewardTemplateGroupResponse.cs | 2 +- ...geGameRewardTemplateGroupEntityRequest.cs} | 2 +- ...teGameRewardTemplateGroupEntityRequest.cs} | 2 +- .../GameRewardTemplateGroupService.cs | 12 +- .../DataBase/SystemDatabaseService.cs | 2 +- .../Platform/Email/SystemEmailDispatcher.cs | 12 +- .../Email/SystemEmailProviderService.cs | 14 +- .../Platform/Job/EmailTask.cs | 12 +- .../Platform/Job/GameHomeOnlineSampleJob.cs | 12 +- .../Platform/Job/GameTimeJobDispatchJob.cs | 14 +- .../{BoundTenantUser.cs => BoundUser.cs} | 6 +- ...uest.cs => AddGameAppOpenAccessRequest.cs} | 2 +- .../Dto/GameAppOpenAccessResponse.cs | 2 +- ...est.cs => PageGameAppOpenAccessRequest.cs} | 2 +- ...t.cs => UpdateGameAppOpenAccessRequest.cs} | 2 +- .../GameAppOpenAccessService.cs | 28 +- .../OpenAccess/SystemOpenAccessService.cs | 24 +- ...uest.cs => AddGameTimeJobEntityRequest.cs} | 2 +- .../GameTimeJob/Dto/GameTimeJobResponse.cs | 2 +- ...est.cs => PageGameTimeJobEntityRequest.cs} | 2 +- ...t.cs => UpdateGameTimeJobEntityRequest.cs} | 2 +- .../TimeJob/GameTimeJob/GameTimeJobService.cs | 14 +- ...uest.cs => AddGamePenaltyEntityRequest.cs} | 2 +- .../GamePenalty/Dto/GamePenaltyResponse.cs | 2 +- ...est.cs => PageGamePenaltyEntityRequest.cs} | 2 +- ...t.cs => RevokeGamePenaltyEntityRequest.cs} | 2 +- ...=> SyncOnlineRuntimeGamePenaltyRequest.cs} | 2 +- ...t.cs => UpdateGamePenaltyEntityRequest.cs} | 2 +- .../GamePenaltyEnforcementService.cs | 6 +- .../GamePenalty/GamePenaltyService.cs | 20 +- .../IGamePenaltyEnforcementService.cs | 2 +- ...s => AddGamePenaltyAppealEntityRequest.cs} | 2 +- .../Dto/GamePenaltyAppealResponse.cs | 4 +- ... => PageGamePenaltyAppealEntityRequest.cs} | 2 +- ...> ReviewGamePenaltyAppealEntityRequest.cs} | 2 +- ...> UpdateGamePenaltyAppealEntityRequest.cs} | 2 +- .../GamePenaltyAppealService.cs | 22 +- ...Request.cs => AddGameRoleEntityRequest.cs} | 2 +- ...uest.cs => DeleteGameRoleEntityRequest.cs} | 2 +- ...equest.cs => PageGameRoleEntityRequest.cs} | 2 +- ...uest.cs => UpdateGameRoleEntityRequest.cs} | 2 +- .../PlayerCenter/GameRole/GameRoleService.cs | 24 +- ...t.cs => AddGameUserEntityByMailRequest.cs} | 2 +- ...uest.cs => DeleteGameUserEntityRequest.cs} | 2 +- ...equest.cs => PageGameUserEntityRequest.cs} | 2 +- ...t.cs => QueryByIdGameUserEntityRequest.cs} | 2 +- ...uest.cs => UpdateGameUserEntityRequest.cs} | 2 +- .../PlayerCenter/GameUser/GameUserService.cs | 18 +- .../Client/GameAppAssetPackageSeedData.cs | 8 +- .../Client/GameAppDeviceGroupSeedData.cs | 8 +- .../Client/GameAppReleaseVersionSeedData.cs | 8 +- .../Client/GameAppRemoteConfigKeySeedData.cs | 8 +- .../Client/GameAppRemoteConfigModeSeedData.cs | 8 +- .../Client/GameAppRemoteConfigSeedData.cs | 8 +- .../Client/GameAppServerConfigSeedData.cs | 10 +- .../GameAppVersionDefinitionSeedData.cs | 8 +- .../Game/GameRedeemCodeChannelSeedData.cs | 8 +- .../System/BusinessChannelSeedData.cs | 10 +- .../System/ChannelDefinitionSeedData.cs | 2 +- .../System/GlobalDictionaryDataSeedData.cs | 4 +- .../System/GlobalMenuSeedData.AppCenter.cs | 502 +++++++++--------- .../System/GlobalMenuSeedData.Automation.cs | 12 +- .../System/GlobalMenuSeedData.Content.cs | 88 +-- .../System/GlobalMenuSeedData.Dashboard.cs | 6 +- .../System/GlobalMenuSeedData.GlobalConfig.cs | 30 +- .../System/GlobalMenuSeedData.Goods.cs | 40 +- .../System/GlobalMenuSeedData.Online.cs | 66 +-- .../System/GlobalMenuSeedData.OnlineMatch.cs | 12 +- .../System/GlobalMenuSeedData.OnlineSocial.cs | 12 +- .../GlobalMenuSeedData.OperationsRoots.cs | 12 +- .../SeedData/System/GlobalMenuSeedData.Ops.cs | 42 +- .../System/GlobalMenuSeedData.Platform.cs | 78 +-- .../System/GlobalMenuSeedData.Player.cs | 52 +- .../System/GlobalMenuSeedData.RedeemCode.cs | 38 +- .../GlobalMenuSeedData.RewardTemplate.cs | 4 +- .../System/GlobalMenuSeedData.System.cs | 202 +++---- .../System/GlobalMenuSeedData.TrustCenter.cs | 44 +- .../System/GlobalMenuSeedData.WebShop.cs | 24 +- ...Request.cs => AddGameAreaEntityRequest.cs} | 2 +- .../GameArea/Dto/GameAreaResponse.cs | 2 +- ...equest.cs => PageGameAreaEntityRequest.cs} | 2 +- ...uest.cs => UpdateGameAreaEntityRequest.cs} | 2 +- .../ServerCenter/GameArea/GameAreaService.cs | 16 +- ...cs => AddGameAreaClassifyEntityRequest.cs} | 2 +- .../Dto/GameAreaClassifyResponse.cs | 2 +- ...s => PageGameAreaClassifyEntityRequest.cs} | 2 +- ...=> UpdateGameAreaClassifyEntityRequest.cs} | 2 +- .../GameAreaClassifyService.cs | 12 +- .../GameAreaMerge/GameAreaMergeClient.cs | 2 +- .../GameAreaMerge/GameAreaMergeService.cs | 38 +- .../GameAreaProvisionService.cs | 20 +- ...st.cs => AddGameDockerTagEntityRequest.cs} | 2 +- .../Dto/GameDockerTagResponse.cs | 2 +- ...t.cs => PageGameDockerTagEntityRequest.cs} | 2 +- ...cs => UpdateGameDockerTagEntityRequest.cs} | 2 +- .../GameDockerTag/GameDockerTagService.cs | 12 +- .../GameServerEndpointUrlBuilder.cs | 8 +- .../Mail/IMailCampaignServerClient.cs | 16 +- .../Mail/MailCampaignServerClient.cs | 10 +- .../Online/IOnlineServerEndpointResolver.cs | 2 +- .../Online/OnlineScopeContextFactory.cs | 4 +- .../ServerCenter/Online/OnlineServerClient.cs | 6 +- .../Online/OnlineServerEndpointResolver.cs | 4 +- .../Dto/GameAnnouncementResponse.cs | 4 +- .../GameAnnouncementController.cs | 8 +- .../GameAppVersionController.cs | 8 +- .../GameArea/GameAreaController.cs | 10 +- .../GameAssetPackageVersionController.cs | 18 +- .../GameRedeemCodeController.cs | 36 +- ...Request.cs => AddGameRoleEntityRequest.cs} | 2 +- ...uest.cs => DeleteGameRoleEntityRequest.cs} | 2 +- ...est.cs => GetByIdGameRoleEntityRequest.cs} | 2 +- ...Request.cs => GetGameRoleEntityRequest.cs} | 2 +- ...est.cs => GetListGameRoleEntityRequest.cs} | 2 +- ...uest.cs => UpdateGameRoleEntityRequest.cs} | 2 +- .../GameRole/GameRoleController.cs | 44 +- ...sponse.cs => GetGameUserEntityResponse.cs} | 2 +- ...quest.cs => LoginGameUserEntityRequest.cs} | 2 +- ...t.cs => QueryByIdGameUserEntityRequest.cs} | 2 +- ...uest.cs => UpdateGameUserEntityRequest.cs} | 2 +- .../GameUser/GameUserController.cs | 398 +++++++------- .../GameUserArchiveController.cs | 10 +- .../GameUserEmail/GameUserEmailController.cs | 16 +- .../GameUserMisc/GameUserMiscController.cs | 14 +- .../GameUserPay/GameUserPayController.cs | 22 +- .../GameUserRace/GameUserRaceController.cs | 8 +- .../GameUserRank/GameUserRankController.cs | 24 +- .../GameUserRewardController.cs | 6 +- .../GameServerConfigProvider.cs | 4 +- .../GameUserSessionController.cs | 18 +- ...s => GameWebShopEntityBuyNotifyRequest.cs} | 2 +- ...uest.cs => GameWebShopEntityBuyRequest.cs} | 2 +- ...nse.cs => GameWebShopEntityBuyResponse.cs} | 2 +- .../GameWebShop/GameWebShopController.cs | 66 +-- .../GameFrameX.Client.Api/GlobalUsing.cs | 4 +- ...vertisementRewardLedgerIdempotencyStore.cs | 8 +- .../Advertisement/GameAdWebHookController.cs | 32 +- .../GameAdvertisementRewardService.cs | 22 +- ...ponse.cs => AddGameOrderEntityResponse.cs} | 2 +- ...est.cs => CreateGameOrderEntityRequest.cs} | 2 +- .../Payment/GameOrderController.ApplePay.cs | 6 +- .../Payment/GameOrderController.cs | 50 +- .../Payment/PaymentOptionSettingProvider.cs | 22 +- ... => PublicCallbackResolutionMiddleware.cs} | 4 +- .../GameFrameX.Client.Api/Program.cs | 24 +- .../Properties/AssemblyInfo.cs | 2 +- .../GameRemoteConfigController.cs | 6 +- .../Auth/ClientApiSessionKeyIssuer.cs | 12 +- .../Services/Auth/ClientApiTokenIssuer.cs | 10 +- .../AreaPolicyOptions.cs} | 4 +- .../ClientApiOptionsProvider.cs} | 56 +- .../ClientApiTokenPolicyOptions.cs} | 4 +- .../EmailOptions.cs} | 4 +- .../GameLoginTicketPolicyOptions.cs} | 4 +- .../IClientApiOptionsProvider.cs} | 16 +- .../MissingContextException.cs | 13 + .../OrderPolicyOptions.cs} | 4 +- .../ClientApiPlatformDefaults.cs | 2 +- .../MissingTenantContextException.cs | 13 - ...nfigSelector.cs => EmailConfigSelector.cs} | 8 +- ...onsSnapshot.cs => EmailOptionsSnapshot.cs} | 4 +- ...{TenantEmailPurpose.cs => EmailPurpose.cs} | 2 +- .../{TenantEmailSender.cs => EmailSender.cs} | 22 +- ...{ITenantEmailSender.cs => IEmailSender.cs} | 10 +- .../GameLoginTicket/GameLoginTicketIssuer.cs | 6 +- .../GameLoginTicketKeyResolver.cs | 20 +- .../AppVersionFallbackMatcher.cs | 22 +- .../AssetPackageVersionFallbackMatcher.cs | 20 +- .../PackageVersion/GameAppPackageResolver.cs | 16 +- .../PayVerification/GamePayReceiptVerifier.cs | 6 +- .../PayVerification/IPayReceiptVerifier.cs | 2 +- .../PublicCallbackNotifyUrlBuilder.cs | 2 +- .../PublicCallbackRouteResolver.cs | 4 +- .../RemoteConfigDeliveryService.cs | 10 +- .../RemoteConfigFallbackMatcher.cs | 22 +- .../RemoteConfigRolloutMatcher.cs | 6 +- .../RemoteConfigScoredCandidate.cs | 4 +- .../DatabaseOwnership.cs | 2 +- .../LauncherOptions.cs | 2 +- .../SqlSugarEntityBoundary.cs | 22 +- .../ChannelDefinitionNamingTests.cs | 14 +- ...sts.cs => GameAppOpenAccessEntityTests.cs} | 34 +- .../AppManagement/GameAppPackageTests.cs | 18 +- .../MainDatabaseOpenAccessServiceTests.cs | 14 +- .../MainDatabasePackageServiceTests.cs | 14 +- .../AssetPackageScopeValidatorTests.cs | 12 +- .../AppScope/PackageScopeValidatorTests.cs | 12 +- .../AdminActionStyleContractTests.cs | 12 +- .../AdminEndpointGolden.baseline.txt | 58 +- ...dminEndpointParameterShapeContractTests.cs | 8 +- .../AdminEndpointReturnContractTests.cs | 6 +- .../ConnectionStringLogGuardTests.cs | 2 +- ...ts.cs => CredentialWritePathGuardTests.cs} | 22 +- .../DockerfileCsprojContractTests.cs | 2 +- .../FileNameTypeNameAlignmentTests.cs | 2 +- .../NamingAbbreviationBaseline.baseline.txt | 6 +- .../NamingAbbreviationGuardTests.cs | 2 +- .../OnlineErrorCodeContractTests.cs | 2 +- .../OnlineOverviewIsolationTests.cs | 6 +- .../OnlineSocialCommandWhitelistTests.cs | 2 +- .../RuntimeCredentialReadPathGuardTests.cs | 14 +- ...uardTests.cs => SecretCryptoGuardTests.cs} | 20 +- .../ThirdPartyContractNamingGuardTests.cs | 2 +- .../ThirdPartyContractWireRoundTripTests.cs | 2 +- .../ThreeHostApiRoutingContractTests.cs | 4 +- .../ApiEndpointCatalogSyncTests.cs | 4 +- .../Authorization/ApiEndpointIdentityTests.cs | 4 +- .../RoleAuthorizationCacheTests.cs | 28 +- .../CredentialWritePathCryptoTests.cs} | 58 +- .../ObjectStorageConfigCryptoTests.cs} | 58 +- .../ReadActionClassifierTests.cs} | 22 +- .../Business/SecretCryptoTests.cs | 144 +++++ .../MainDatabaseGovernanceServiceTests.cs | 14 +- .../ClientApiAccountEndpointTests.cs | 24 +- .../ClientApi/ClientApiConfigEndpointTests.cs | 80 +-- .../ClientApi/ClientApiEndpointCoverage.cs | 2 +- .../ClientApiEndpointCoverageMatrix.cs | 16 +- .../ClientApiEndpointCoverageTests.cs | 4 +- .../ClientApiFeatureSwitchEndpointTests.cs | 34 +- ...ientApiGameUserDeviceLoginEndpointTests.cs | 14 +- ...ts.cs => ClientApiOptionsProviderTests.cs} | 8 +- .../ClientApi/ClientApiOrderCreateTests.cs | 20 +- .../ClientApiPaymentCallbackEndpointTests.cs | 22 +- .../ClientApiPenaltyEnforcementTests.cs | 34 +- .../ClientApiPolicyScopeResolutionTests.cs | 22 +- .../ClientApiRedeemCodeEndpointTests.cs | 52 +- .../ClientApi/ClientApiRiskPolicyTests.cs | 12 +- .../ClientApi/ClientApiRoleEndpointTests.cs | 38 +- .../ClientApiSessionKeyIssuerTests.cs | 20 +- .../ClientApi/ClientApiTestDb.cs | 184 +++---- .../ClientApi/ClientApiTokenIssuerTests.cs | 14 +- .../ClientApiUserEmailEndpointTests.cs | 28 +- .../ClientApiWeChatPayCallbackTests.cs | 20 +- .../ClientApiWebShopEndpointTests.cs | 94 ++-- .../CryptoEnvelopeMiddlewareTests.cs | 18 +- ...mailSenderTests.cs => EmailSenderTests.cs} | 24 +- .../FakeGamePenaltyEnforcementService.cs | 8 +- .../ClientApi/FakeOptionsProvider.cs | 44 +- .../GameAdvertisementRewardServiceTests.cs | 66 +-- .../GameAppPackageResolverInheritanceTests.cs | 24 +- .../GameLoginTicketSingleMainTests.cs | 30 +- .../ClientApi/KeyResolverQueryTests.cs | 18 +- .../ClientApi/KeyRingSingleMainTests.cs | 18 +- .../MainDatabaseAdvertisementLedgerTests.cs | 8 +- .../PaymentOptionSettingSingleMainTests.cs | 8 +- ...Tests.cs => PublicCallbackRoutingTests.cs} | 34 +- .../PublicCallbackSingleMainTests.cs | 16 +- .../RemoteConfigRolloutMatcherTests.cs | 6 +- .../RuntimeCredentialDecryptClosureTests.cs | 112 ++-- .../SignatureValidationMiddlewareTests.cs | 10 +- .../Email/EmailProviderSelectorTests.cs | 38 +- .../Enum/AdminEnumVisibilityTests.cs | 2 +- .../BusinessTableIdempotencyStoreTests.cs | 58 +- .../GameUserArchiveOtherProgressTests.cs | 8 +- .../GameApi/GameUserArchiveRoundTripTests.cs | 8 +- .../GameApi/GameUserMiscTests.cs | 20 +- .../GameApi/GameUserPayTests.cs | 66 +-- .../GameApi/GameUserRaceTests.cs | 14 +- .../GameApi/GameUserRankTests.cs | 36 +- .../GameApi/GameUserRewardTests.cs | 8 +- .../GameApi/GameUserSessionTests.cs | 56 +- .../GameAppDeviceContractTests.cs} | 24 +- .../GameAppDeviceScopeIsolationTests.cs} | 44 +- .../BackendDuplicationDtoContractTests.cs | 16 +- .../BusinessPageSearchKeyRemovalGuardTests.cs | 4 +- .../FeatureSwitchDeliveryResolverTests.cs | 18 +- .../GameAppFeatureSwitchServiceTests.cs | 28 +- .../GameAppServerConfigServiceTests.cs | 16 +- ...cs => GameCommodityEntityContractTests.cs} | 12 +- .../MainDatabaseAreaServiceTests.cs | 14 +- .../MainDatabaseContentServiceTests.cs | 30 +- .../MainDatabaseGoodsServiceTests.cs | 32 +- .../MainDatabasePlayerServiceTests.cs | 14 +- .../MainDatabaseRedeemCodeServiceTests.cs | 12 +- .../MainDatabaseRewardServiceTests.cs | 16 +- .../MainDatabaseTimeJobServiceTests.cs | 8 +- .../MainDatabaseWebShopServiceTests.cs | 8 +- .../RewardTemplateContractTests.cs | 18 +- ...ameOrderFulfillmentServiceContractTests.cs | 4 +- .../GameOrder/GameOrderShipServiceTests.cs | 28 +- .../MainDatabaseOrderServiceTests.cs | 14 +- .../GameFrameX.Core.Tests/GlobalUsings.cs | 2 +- .../FeatureSwitchSyncControllerTests.cs | 46 +- ...> GameAppOpenAccessAuthMiddlewareTests.cs} | 32 +- ...> GameAppOpenAccessDecryptClosureTests.cs} | 52 +- .../PackageBuildReportSingleMainTests.cs | 20 +- .../Integration/ClientApiTestHostTests.cs | 6 +- .../DiffLogCredentialRedactionTests.cs | 6 +- .../Logging/LogPagePostgresTests.cs | 6 +- .../Logging/LogPageSearchKeyFilterTests.cs | 40 +- .../Logging/MonitorLoggingPipelineTests.cs | 114 ++-- .../Logging/SensitiveLogRedactorTests.cs | 2 +- .../MailCampaignEntityServiceContractTests.cs | 4 +- .../MailCampaignServerClientTests.cs | 6 +- ...jectStorageActiveConfigConcurrencyTests.cs | 50 +- .../ObjectStorageActiveConfigGuardTests.cs | 18 +- .../OnlineAssetAuditQueryServiceTests.cs | 6 +- .../OnlineAssetGrantCommandServiceTests.cs | 6 +- .../OnlineAssetLedgerQueryServiceTests.cs | 6 +- .../Online/Asset/OnlineAssetMenuSeedTests.cs | 6 +- .../Online/Asset/OnlineAssetTestSupport.cs | 14 +- ...OnlineAssetTransactionQueryServiceTests.cs | 6 +- .../Console/OnlineAuditSearchServiceTests.cs | 24 +- .../Console/OnlineConsoleMenuSeedTests.cs | 8 +- .../OnlineControlledCommandServiceTests.cs | 6 +- .../OnlineOverviewQueryServiceTests.cs | 6 +- .../OnlinePlayerTimelineQueryServiceTests.cs | 6 +- .../GameOnlineConfigRolloutServiceTests.cs | 38 +- .../GameOnlinePlayerSegmentServiceTests.cs | 34 +- .../OnlineLiveOpsDispatchServiceTests.cs | 62 +-- .../OnlinePenaltyLinkCommandServiceTests.cs | 28 +- .../Social/OnlineReportCaseServiceTests.cs | 30 +- .../PayConfig/PaymentConfigScopeTests.cs | 14 +- ...PaymentOptionSettingDecryptClosureTests.cs | 36 +- .../Payment/AppleServerApiVerifyTests.cs | 16 +- .../Platform/Job/EmailTaskTests.cs | 18 +- .../Job/GameTimeJobDispatchJobTests.cs | 14 +- .../Job/TriggerPersistenceWriteBackTests.cs | 2 +- .../ProjectDependencyInjectionSetupTests.cs | 4 +- ...ameAreaMergeCancellationAndReclaimTests.cs | 20 +- .../GameAreaMergeClientTimeoutTests.cs | 6 +- .../GameAreaMergeRehearsalTests.cs | 8 +- .../GameAreaMergeServiceTests.cs | 12 +- .../GameAreaMerge/GameAreaMergeTestContext.cs | 14 +- .../GameAreaProvisionServiceTests.cs | 24 +- .../GameServerEndpointUrlBuilderTests.cs | 6 +- .../Online/OnlineScopeContextFactoryTests.cs | 32 +- .../Online/OnlineServerClientTests.cs | 26 +- .../SqlSugar/AdvancedQueryAreaFilterTests.cs | 12 +- .../AdvancedQueryBannerActiveFilterTests.cs | 14 +- .../SqlSugar/AdvancedQueryMailFilterTests.cs | 12 +- ...dvancedQueryRedeemCodeActiveFilterTests.cs | 14 +- .../AdvancedQueryUserStatusFilterTests.cs | 12 +- ...nnelDefinitionSoftDeleteVisibilityTests.cs | 20 +- .../SqlSugar/ClientApiPolicyServiceTests.cs | 30 +- .../CodeFirstSchemaEvolutionPostgresTests.cs | 10 +- .../SqlSugar/DiffLogCompletionTests.cs | 10 +- .../SqlSugar/EntityTableNameAlignmentTests.cs | 10 +- ...ppAssetPackageVersionPackageFilterTests.cs | 14 +- .../GameAppAssetPackageVersionSelectTests.cs | 30 +- .../GameAppPackageDisabledVisibilityTests.cs | 22 +- ...GameAppReleaseVersionPackageFilterTests.cs | 14 +- .../GameRedeemCodeUseRecordChannelTests.cs | 32 +- ...cs => GameRoleAdvertisementEntityTests.cs} | 18 +- .../MainDatabaseVersionDefinitionTests.cs | 6 +- .../SqlSugar/OptimisticConcurrencyTests.cs | 16 +- .../PhysicalTableNamespaceBoundaryTests.cs | 10 +- .../SqlSugar/SeedInsertOnlyTests.cs | 22 +- .../SqlSugarDatabaseInitializationTests.cs | 82 +-- ...Tests.cs => SqlSugarDiffLogPrefixTests.cs} | 48 +- .../SqlSugar/SqlSugarEntityBoundaryTests.cs | 110 ++-- .../SqlSugarRepositoryDiResolutionTests.cs | 4 +- .../SqlSugarTransactionBoundaryTests.cs | 10 +- .../LongIdentifierStringSchemaFilterTests.cs | 6 +- .../System/AuthTestHost.cs | 38 +- ...rovider.cs => FakeDbConnectionProvider.cs} | 10 +- .../System/GameHomeServiceTests.cs | 34 +- .../GlobalMenuSeedAudiencePrefixGuardTests.cs | 6 +- .../Job/LogJobRetentionBoundaryTests.cs | 22 +- .../System/LogFieldSerializationGuardTests.cs | 2 +- ...tionTests.cs => LogQueryIsolationTests.cs} | 38 +- .../System/MenuSeedCatalogTestData.cs | 2 +- ...uSeedPermissionRouteReconciliationTests.cs | 4 +- .../System/MenuSeedStaleRowCleanerTests.cs | 12 +- .../System/OnlineUserHubBoundaryTests.cs | 2 +- .../PlatformPasswordPolicyConfigTests.cs | 6 +- .../System/SuperAdminOnlyMenuSeedDataTests.cs | 6 +- ...serServiceTests.cs => UserServiceTests.cs} | 8 +- .../Tenant/KeyLifecycleRotateTests.cs | 52 +- .../Tenant/TenantSecretCryptoTests.cs | 144 ----- .../JsonSerializerOptionsProviderTests.cs | 10 +- ...tJsonSerializerOptionsHostContractTests.cs | 10 +- .../CryptogramUtility.cs | 2 +- .../Api/AdminApiRouteNaming.cs | 2 +- .../GameFrameX.Core/Api/MenuSeedRouteName.cs | 8 +- .../GameFrameX.Core/Const/CacheConst.cs | 4 +- .../Const/MenuSeed/MenuSeedCatalog.cs | 6 +- .../Const/MenuSeed/MenuSeedDefinition.cs | 2 +- .../{TenantErrorCode.cs => ErrorCode.cs} | 36 +- .../Enum/Errors/ErrorSegmentRegistry.cs | 2 +- .../Enum/Errors/GameHomeErrorCode.cs | 6 +- .../Enum/Errors/OnlineErrorCode.cs | 4 +- .../Enum/Errors/OrganizationErrorCode.cs | 2 +- .../GameFrameX.Core/GlobalUsings.cs | 2 +- .../GameFrameX.Core/Hub/OnlineUserHub.cs | 8 +- .../GameFrameX.Core/Job/LogJob.cs | 8 +- .../GameFrameX.Core/Job/OnlineUserJob.cs | 4 +- .../Logging/DatabaseLoggingWriter.cs | 6 +- .../GameAppRiskEnforcementModeResolver.cs | 4 +- .../Middleware/MiddlewareResponseWriter.cs | 4 +- .../Middleware/ProtoVersionMiddleware.cs | 2 +- .../PublicStartupEndpointAttribute.cs | 2 +- .../Middleware/RuntimeKeyMaterialCache.cs | 6 +- .../Middleware/SessionKeyResolver.cs | 14 +- .../Middleware/SignatureKeyResolver.cs | 16 +- .../SignatureValidationMiddleware.cs | 4 +- .../Middleware/SignatureValidationOptions.cs | 2 +- .../GameFrameX.Core/Option/DbSettings.cs | 2 +- .../Service/Auth/SystemAuthService.cs | 8 +- .../Service/Base/BaseService.cs | 2 +- .../DefaultDatabaseSeeder.cs} | 12 +- .../ObjectStorageConfigCrypto.cs} | 12 +- .../ReadActionClassifier.cs} | 8 +- .../SecretCrypto.cs} | 14 +- .../Service/File/Dto/TenantFileResponse.cs | 93 ---- .../{TenantFileService.cs => FileService.cs} | 58 +- .../Service/Menu/Dto/AddMenuRequest.cs | 2 +- .../Service/Menu/Dto/GlobalMenuResponse.cs | 4 +- .../Service/Menu/GlobalMenuService.cs | 18 +- .../Service/Message/SystemEmailPurpose.cs | 2 +- .../Service/Message/SystemMessageService.cs | 6 +- ...eUserResponse.cs => OnlineUserResponse.cs} | 2 +- ...ineUserService.cs => OnlineUserService.cs} | 12 +- .../PlatformPasswordPolicyConfigProvider.cs | 4 +- .../PlatformPasswordPolicyConfigService.cs | 2 +- .../PlatformPasswordPolicySettings.cs | 2 +- .../Service/Role/Dto/AddRoleRequest.cs | 2 +- .../Service/Role/Dto/TenantRoleResponse.cs | 69 --- ...tRoleMenuService.cs => RoleMenuService.cs} | 12 +- .../{TenantRoleService.cs => RoleService.cs} | 24 +- .../Tenant/GameServerConfigBaselineSeed.cs | 12 +- .../Tenant/Payment/PaymentConfigCrypto.cs | 10 +- .../Service/User/Dto/ResetPwdResponse.cs | 2 +- ...{TenantUserResponse.cs => UserResponse.cs} | 2 +- ...tUserRoleService.cs => UserRoleService.cs} | 16 +- .../{TenantUserService.cs => UserService.cs} | 34 +- .../SignatureAuth/SignatureSpec.cs | 2 +- .../SqlSugar/SqlSugarFilter.cs | 4 +- .../GameFrameX.Core/SqlSugar/SqlSugarSetup.cs | 12 +- .../ChannelDefinitionEntity.cs} | 6 +- .../AdvertisementCallbackConfigEntity.cs} | 6 +- .../ClientApiConfig/ClientApiPolicyEntity.cs} | 6 +- .../ClientApiConfig/EmailConfigEntity.cs} | 8 +- .../Device/GameAppDeviceEntity.cs} | 8 +- .../Device/GameAppDeviceGroupEntity.cs} | 10 +- .../GameAppDeviceGroupRelationEntity.cs} | 8 +- .../FileEntity.cs} | 8 +- .../Announcement/GameAnnouncementEntity.cs} | 6 +- .../GameBannerAnnouncementEntity.cs} | 6 +- .../Game/App/GameAppOpenAccessEntity.cs} | 14 +- .../Game/App/GameAppPackageEntity.cs} | 8 +- .../Game/AppSignatureKeyEntity.cs} | 8 +- .../GameAppFeatureSwitchEntity.cs} | 6 +- .../Game/GameAdvertisementRewardEntity.cs} | 8 +- .../Game/GameAntiCheatEventEntity.cs} | 6 +- .../Game/GameAreaClassifyEntity.cs} | 6 +- .../Game/GameAreaEntity.cs} | 8 +- .../Game/GameAreaMergePlanEntity.cs} | 6 +- .../Game/GameClientLocalizationEntity.cs} | 6 +- .../Game/GameCommodityEntity.cs} | 8 +- .../Game/GameDockerTagEntity.cs} | 6 +- .../Game/GameGoodsCatalogueEntity.cs} | 6 +- .../Game/GameGoodsEntity.cs} | 6 +- .../Game/GameHomeOnlineSampleEntity.cs} | 8 +- .../Game/GameLoginTicketKeyEntity.cs} | 6 +- .../Game/GameMailCampaignEntity.cs} | 12 +- .../Game/GameMailEntity.cs} | 6 +- .../Game/GameMailTemplateCategoryEntity.cs} | 6 +- .../Game/GameMailTemplateEntity.cs} | 6 +- .../Game/GameOrderEntity.cs} | 8 +- .../Game/GameOrderFulfillmentEntity.cs} | 8 +- .../Game/GamePaymentConfigEntity.cs} | 6 +- .../Game/GamePenaltyAppealEntity.cs} | 8 +- .../Game/GamePenaltyEntity.cs} | 6 +- .../Game/GameRankEntryEntity.cs} | 6 +- .../Game/GameRedeemCodeChannelEntity.cs} | 6 +- .../GameRedeemCodeChannelRoleUsageEntity.cs} | 12 +- .../Game/GameRedeemCodeEntity.cs} | 8 +- .../Game/GameRedeemCodeUseRecordEntity.cs} | 6 +- .../Game/GameReportEntity.cs} | 6 +- .../Game/GameRewardTemplateEntity.cs} | 8 +- .../Game/GameRewardTemplateGroupEntity.cs} | 6 +- .../Game/GameRoleAdvertisementEntity.cs} | 6 +- .../Game/GameRoleEntity.cs} | 6 +- .../Game/GameTimeJobEntity.cs} | 6 +- .../Game/GameUserArchiveEntity.cs} | 6 +- .../Game/GameUserEmailEntity.cs} | 6 +- .../Game/GameUserEntity.cs} | 8 +- .../Game/GameUserLogoutRecordEntity.cs} | 6 +- .../Game/GameUserRewardEntity.cs} | 6 +- .../Game/GameWebShopEntity.cs} | 6 +- .../Game/GameWebShopOrderEntity.cs} | 6 +- .../Online/GameOnlineConfigRolloutEntity.cs} | 8 +- .../Online/GameOnlinePlayerSegmentEntity.cs} | 6 +- .../GameAppAssetPackageVersionEntity.cs} | 6 +- ...ameAppAssetPackageVersionHistoryEntity.cs} | 8 +- .../Release/GameAppReleaseVersionEntity.cs} | 6 +- .../GameAppVersionDefinitionEntity.cs} | 6 +- .../GameAppRemoteConfigEntity.cs} | 6 +- .../GameAppRemoteConfigKeyEntity.cs} | 6 +- .../GameAppRemoteConfigModeEntity.cs} | 6 +- .../Resource/GameAppAssetPackageEntity.cs} | 6 +- .../GameAppServerConfigEntity.cs} | 6 +- .../Game/SessionKeyEntity.cs} | 8 +- .../ObjectStorageConfigEntity.cs} | 6 +- .../OnlineUserEntity.cs} | 6 +- .../RoleEntity.cs} | 6 +- .../RoleMenuEntity.cs} | 6 +- .../GameFrameX.Entity/Business/UserEntity.cs | 13 + .../UserRoleEntity.cs} | 10 +- .../WechatUserEntity.cs} | 8 +- .../Enum/AntiCheatProviderEnum.cs | 2 +- .../Enum/AntiCheatSuggestedActionEnum.cs | 2 +- .../Enum/AntiCheatTargetTypeEnum.cs | 8 +- .../Enum/AppealStatusEnum.cs | 2 +- .../Enum/ChannelScopeEnum.cs | 2 +- .../Enum/FulfillmentStatusEnum.cs | 2 +- .../Enum/FulfillmentTypeEnum.cs | 2 +- .../Enum/ManualReviewStateEnum.cs | 2 +- .../Enum/PenaltyActionTypeEnum.cs | 2 +- .../Enum/PenaltyStatusEnum.cs | 2 +- .../Enum/PenaltyTargetTypeEnum.cs | 8 +- .../Enum/ReportStatusEnum.cs | 2 +- .../GameFrameX.Entity/Enum/ReportTypeEnum.cs | 2 +- .../Enum/RiskEnforcementModeEnum.cs | 2 +- .../Enum/RiskEnforcementModeParser.cs | 2 +- .../GameFrameX.Entity/Enum/RiskLevelEnum.cs | 2 +- .../Enum/{TenantTypeEnum.cs => TypeEnum.cs} | 2 +- .../Game/Online/LiveOpsSourceKind.cs | 10 +- .../Game/Online/OnlineConfigRolloutKind.cs | 8 +- .../Global/GlobalMenuEntity.cs | 2 +- .../GameFrameX.Entity/GlobalUsing.cs | 2 +- .../GameFrameX.Entity/Log/LogAuditEntity.cs | 11 + .../GameFrameX.Entity/Log/LogAuditFields.cs | 2 +- .../GameFrameX.Entity/Log/LogDiffEntity.cs | 11 + .../GameFrameX.Entity/Log/LogDiffFields.cs | 4 +- .../Log/LogExceptionEntity.cs | 11 + .../Log/LogOperationEntity.cs | 11 + .../GameFrameX.Entity/Log/LogVisitEntity.cs | 11 + .../GameFrameX.Entity/Log/LogVisitFields.cs | 4 +- .../Log/TenantLogAuditEntity.cs | 11 - .../Log/TenantLogDiffEntity.cs | 11 - .../Log/TenantLogExceptionEntity.cs | 11 - .../Log/TenantLogOperationEntity.cs | 11 - .../Log/TenantLogVisitEntity.cs | 11 - .../Routing/GlobalTableAttribute.cs | 2 +- .../Routing/PlatformTableAttribute.cs | 2 +- .../System/ChannelDefinition.cs | 2 +- .../System/SystemEmailProviderEntity.cs | 2 +- .../System/SystemRegisterEmailCodeEntity.cs | 2 +- .../System/SystemUserBase.cs | 4 +- .../System/SystemWechatPayEntity.cs | 2 +- .../FeatureSwitchAudienceValues.cs | 4 +- .../Tenant/Game/GamePropItem.cs | 2 +- .../Tenant/TenantUserEntity.cs | 13 - .../Const/OpenAccessScopeConst.cs | 2 +- .../FeatureSwitchSyncController.cs | 2 +- .../PackageBuildReportController.cs | 26 +- .../FeatureSwitchSyncRequest.cs | 2 +- .../GameFrameX.Hub.Api/GlobalUsing.cs | 2 +- ....cs => GameAppOpenAccessAuthMiddleware.cs} | 20 +- .../GameFrameX.Hub.Api/Program.cs | 4 +- .../Services/HubUserAuditHandler.cs | 4 +- .../ProjectDependencyInjectionSetup.cs | 2 +- .../Handlers/ApiEndpointCatalogSync.cs | 2 +- .../GameFrameX.Web.Api/Startup.cs | 4 +- .../DefaultObjectStorageAdapterFactory.cs | 2 +- .../IObjectStorageAdapterFactory.cs | 2 +- .../docker/postgres/init.sql | 2 +- .../docs/postman-envelope-pre-request.js | 2 +- 761 files changed, 5095 insertions(+), 5257 deletions(-) rename GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/{TenantAdvertisementCallbackOptions.cs => AdvertisementCallbackOptions.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/{AddTenantAdvertisementCallbackConfigRequest.cs => AddAdvertisementCallbackConfigRequest.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/{PageTenantAdvertisementCallbackConfigRequest.cs => PageAdvertisementCallbackConfigRequest.cs} (77%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/{UpdateTenantAdvertisementCallbackConfigRequest.cs => UpdateAdvertisementCallbackConfigRequest.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/{AddTenantGameAdvertisementRewardEntityRequest.cs => AddGameAdvertisementRewardEntityRequest.cs} (82%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/{PageTenantGameAdvertisementRewardEntityRequest.cs => PageGameAdvertisementRewardEntityRequest.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/{UpdateTenantGameAdvertisementRewardEntityRequest.cs => UpdateGameAdvertisementRewardEntityRequest.cs} (80%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/{AddTenantClientApiPolicyRequest.cs => AddClientApiPolicyRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/{PageTenantClientApiPolicyRequest.cs => PageClientApiPolicyRequest.cs} (68%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/{UpdateTenantClientApiPolicyRequest.cs => UpdateClientApiPolicyRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/{AddTenantDeviceGroupRequest.cs => AddDeviceGroupRequest.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/{UpdateTenantDeviceGroupRequest.cs => UpdateDeviceGroupRequest.cs} (88%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/{AddTenantGameAppDeviceRequest.cs => AddGameAppDeviceRequest.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/{UpdateTenantGameAppDeviceRequest.cs => UpdateGameAppDeviceRequest.cs} (88%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/{PageTenantGameLoginTicketKeyRequest.cs => PageGameLoginTicketKeyRequest.cs} (70%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/{AddTenantObjectStorageConfigRequest.cs => AddObjectStorageConfigRequest.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/{PageTenantObjectStorageConfigRequest.cs => PageObjectStorageConfigRequest.cs} (83%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/{UpdateTenantObjectStorageConfigRequest.cs => UpdateObjectStorageConfigRequest.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/Dto/{PageTenantAppSignatureKeyRequest.cs => PageAppSignatureKeyRequest.cs} (69%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/Dto/{PageTenantSessionKeyRequest.cs => PageSessionKeyRequest.cs} (69%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/{AddTenantGameCommodityEntityRequest.cs => AddGameCommodityEntityRequest.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/{PageTenantGameCommodityEntityRequest.cs => PageGameCommodityEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/{UpdateTenantGameCommodityEntityRequest.cs => UpdateGameCommodityEntityRequest.cs} (87%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/{AddTenantGameGoodsEntityRequest.cs => AddGameGoodsEntityRequest.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/{PageTenantGameGoodsEntityRequest.cs => PageGameGoodsEntityRequest.cs} (83%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/{UpdateTenantGameGoodsEntityRequest.cs => UpdateGameGoodsEntityRequest.cs} (74%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/{AddTenantGameGoodsCatalogueEntityRequest.cs => AddGameGoodsCatalogueEntityRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/{PageTenantGameGoodsCatalogueEntityRequest.cs => PageGameGoodsCatalogueEntityRequest.cs} (83%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/{UpdateTenantGameGoodsCatalogueEntityRequest.cs => UpdateGameGoodsCatalogueEntityRequest.cs} (71%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/{AddTenantGameOrderEntityRequest.cs => AddGameOrderEntityRequest.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/{PageTenantGameOrderEntityRequest.cs => PageGameOrderEntityRequest.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/{UpdateTenantGameOrderEntityRequest.cs => UpdateGameOrderEntityRequest.cs} (72%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/{PageTenantGameOrderFulfillmentEntityRequest.cs => PageGameOrderFulfillmentEntityRequest.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/{UpdateTenantGameOrderFulfillmentEntityRequest.cs => UpdateGameOrderFulfillmentEntityRequest.cs} (80%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/{AddTenantGameRedeemCodeEntityRequest.cs => AddGameRedeemCodeEntityRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/{PageTenantGameRedeemCodeEntityRequest.cs => PageGameRedeemCodeEntityRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/{UpdateTenantGameRedeemCodeEntityRequest.cs => UpdateGameRedeemCodeEntityRequest.cs} (80%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/{AddTenantGameRedeemCodeChannelEntityRequest.cs => AddGameRedeemCodeChannelEntityRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/{PageTenantGameRedeemCodeChannelEntityRequest.cs => PageGameRedeemCodeChannelEntityRequest.cs} (76%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/{UpdateTenantGameRedeemCodeChannelEntityRequest.cs => UpdateGameRedeemCodeChannelEntityRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/{AddTenantGameRedeemCodeUseRecordEntityRequest.cs => AddGameRedeemCodeUseRecordEntityRequest.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/{PageTenantGameRedeemCodeUseRecordEntityRequest.cs => PageGameRedeemCodeUseRecordEntityRequest.cs} (71%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/{UpdateTenantGameRedeemCodeUseRecordEntityRequest.cs => UpdateGameRedeemCodeUseRecordEntityRequest.cs} (64%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/{AddTenantGameWebShopEntityRequest.cs => AddGameWebShopEntityRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/{PageTenantGameWebShopEntityRequest.cs => PageGameWebShopEntityRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/{UpdateTenantGameWebShopEntityRequest.cs => UpdateGameWebShopEntityRequest.cs} (75%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/{AddTenantGameWebShopOrderEntityRequest.cs => AddGameWebShopOrderEntityRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/{PageTenantGameWebShopOrderEntityRequest.cs => PageGameWebShopOrderEntityRequest.cs} (88%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/{UpdateTenantGameWebShopOrderEntityRequest.cs => UpdateGameWebShopOrderEntityRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/{AddTenantGameAntiCheatEventRequest.cs => AddGameAntiCheatEventRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/{PageTenantGameAntiCheatEventRequest.cs => PageGameAntiCheatEventRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/{UpdateTenantGameAntiCheatEventReviewRequest.cs => UpdateGameAntiCheatEventReviewRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/{AddTenantGameReportEntityRequest.cs => AddGameReportEntityRequest.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/{LinkPenaltyTenantGameReportEntityRequest.cs => LinkPenaltyGameReportEntityRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/{PageTenantGameReportEntityRequest.cs => PageGameReportEntityRequest.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/{UpdateTenantGameReportEntityRequest.cs => UpdateGameReportEntityRequest.cs} (76%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/Dto/{PageTenantGameOnlineConfigRolloutRequest.cs => PageGameOnlineConfigRolloutRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/{AddTenantGameOnlinePlayerSegmentRequest.cs => AddGameOnlinePlayerSegmentRequest.cs} (77%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/{PageTenantGameOnlinePlayerSegmentRequest.cs => PageGameOnlinePlayerSegmentRequest.cs} (88%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/{UpdateTenantGameOnlinePlayerSegmentRequest.cs => UpdateGameOnlinePlayerSegmentRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/{AddTenantGameAnnouncementEntityRequest.cs => AddGameAnnouncementEntityRequest.cs} (62%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/{PageTenantGameAnnouncementEntityRequest.cs => PageGameAnnouncementEntityRequest.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/{UpdateTenantGameAnnouncementEntityRequest.cs => UpdateGameAnnouncementEntityRequest.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/{AddTenantGameBannerAnnouncementEntityRequest.cs => AddGameBannerAnnouncementEntityRequest.cs} (70%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/{PageTenantGameBannerAnnouncementEntityRequest.cs => PageGameBannerAnnouncementEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/{UpdateTenantGameBannerAnnouncementEntityRequest.cs => UpdateGameBannerAnnouncementEntityRequest.cs} (74%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/{AddTenantGameMailEntityRequest.cs => AddGameMailEntityRequest.cs} (77%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/{PageTenantGameMailEntityRequest.cs => PageGameMailEntityRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/{UpdateTenantGameMailEntityRequest.cs => UpdateGameMailEntityRequest.cs} (73%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/{AddTenantGameMailCampaignEntityRequest.cs => AddGameMailCampaignEntityRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/{PageTenantGameMailCampaignEntityRequest.cs => PageGameMailCampaignEntityRequest.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/{UpdateTenantGameMailCampaignEntityRequest.cs => UpdateGameMailCampaignEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/{AddTenantGameMailTemplateEntityRequest.cs => AddGameMailTemplateEntityRequest.cs} (77%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/{PageTenantGameMailTemplateEntityRequest.cs => PageGameMailTemplateEntityRequest.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/{UpdateTenantGameMailTemplateEntityRequest.cs => UpdateGameMailTemplateEntityRequest.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/{AddTenantGameMailTemplateCategoryEntityRequest.cs => AddGameMailTemplateCategoryEntityRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/{PageTenantGameMailTemplateCategoryEntityRequest.cs => PageGameMailTemplateCategoryEntityRequest.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/{UpdateTenantGameMailTemplateCategoryEntityRequest.cs => UpdateGameMailTemplateCategoryEntityRequest.cs} (90%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/{AddTenantGameRewardTemplateEntityRequest.cs => AddGameRewardTemplateEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/{PageTenantGameRewardTemplateEntityRequest.cs => PageGameRewardTemplateEntityRequest.cs} (85%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/{UpdateTenantGameRewardTemplateEntityRequest.cs => UpdateGameRewardTemplateEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/{AddTenantGameRewardTemplateGroupEntityRequest.cs => AddGameRewardTemplateGroupEntityRequest.cs} (88%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/{PageTenantGameRewardTemplateGroupEntityRequest.cs => PageGameRewardTemplateGroupEntityRequest.cs} (82%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/{UpdateTenantGameRewardTemplateGroupEntityRequest.cs => UpdateGameRewardTemplateGroupEntityRequest.cs} (88%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/{BoundTenantUser.cs => BoundUser.cs} (54%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/{AddTenantGameAppOpenAccessRequest.cs => AddGameAppOpenAccessRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/{PageTenantGameAppOpenAccessRequest.cs => PageGameAppOpenAccessRequest.cs} (90%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/{UpdateTenantGameAppOpenAccessRequest.cs => UpdateGameAppOpenAccessRequest.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/{AddTenantGameTimeJobEntityRequest.cs => AddGameTimeJobEntityRequest.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/{PageTenantGameTimeJobEntityRequest.cs => PageGameTimeJobEntityRequest.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/{UpdateTenantGameTimeJobEntityRequest.cs => UpdateGameTimeJobEntityRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/{AddTenantGamePenaltyEntityRequest.cs => AddGamePenaltyEntityRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/{PageTenantGamePenaltyEntityRequest.cs => PageGamePenaltyEntityRequest.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/{RevokeTenantGamePenaltyEntityRequest.cs => RevokeGamePenaltyEntityRequest.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/{SyncOnlineRuntimeTenantGamePenaltyRequest.cs => SyncOnlineRuntimeGamePenaltyRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/{UpdateTenantGamePenaltyEntityRequest.cs => UpdateGamePenaltyEntityRequest.cs} (76%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/{AddTenantGamePenaltyAppealEntityRequest.cs => AddGamePenaltyAppealEntityRequest.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/{PageTenantGamePenaltyAppealEntityRequest.cs => PageGamePenaltyAppealEntityRequest.cs} (85%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/{ReviewTenantGamePenaltyAppealEntityRequest.cs => ReviewGamePenaltyAppealEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/{UpdateTenantGamePenaltyAppealEntityRequest.cs => UpdateGamePenaltyAppealEntityRequest.cs} (75%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/{AddTenantGameRoleEntityRequest.cs => AddGameRoleEntityRequest.cs} (65%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/{DeleteTenantGameRoleEntityRequest.cs => DeleteGameRoleEntityRequest.cs} (72%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/{PageTenantGameRoleEntityRequest.cs => PageGameRoleEntityRequest.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/{UpdateTenantGameRoleEntityRequest.cs => UpdateGameRoleEntityRequest.cs} (87%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/{AddTenantGameUserEntityByMailRequest.cs => AddGameUserEntityByMailRequest.cs} (90%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/{DeleteTenantGameUserEntityRequest.cs => DeleteGameUserEntityRequest.cs} (67%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/{PageTenantGameUserEntityRequest.cs => PageGameUserEntityRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/{QueryByIdTenantGameUserEntityRequest.cs => QueryByIdGameUserEntityRequest.cs} (60%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/{UpdateTenantGameUserEntityRequest.cs => UpdateGameUserEntityRequest.cs} (84%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/{AddTenantGameAreaEntityRequest.cs => AddGameAreaEntityRequest.cs} (84%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/{PageTenantGameAreaEntityRequest.cs => PageGameAreaEntityRequest.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/{UpdateTenantGameAreaEntityRequest.cs => UpdateGameAreaEntityRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/{AddTenantGameAreaClassifyEntityRequest.cs => AddGameAreaClassifyEntityRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/{PageTenantGameAreaClassifyEntityRequest.cs => PageGameAreaClassifyEntityRequest.cs} (77%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/{UpdateTenantGameAreaClassifyEntityRequest.cs => UpdateGameAreaClassifyEntityRequest.cs} (71%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/{AddTenantGameDockerTagEntityRequest.cs => AddGameDockerTagEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/{PageTenantGameDockerTagEntityRequest.cs => PageGameDockerTagEntityRequest.cs} (78%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/{UpdateTenantGameDockerTagEntityRequest.cs => UpdateGameDockerTagEntityRequest.cs} (72%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/{AddTenantGameRoleEntityRequest.cs => AddGameRoleEntityRequest.cs} (83%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/{DeleteTenantGameRoleEntityRequest.cs => DeleteGameRoleEntityRequest.cs} (70%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/{GetByIdTenantGameRoleEntityRequest.cs => GetByIdGameRoleEntityRequest.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/{GetTenantGameRoleEntityRequest.cs => GetGameRoleEntityRequest.cs} (85%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/{GetListTenantGameRoleEntityRequest.cs => GetListGameRoleEntityRequest.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/{UpdateTenantGameRoleEntityRequest.cs => UpdateGameRoleEntityRequest.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/{GetTenantGameUserEntityResponse.cs => GetGameUserEntityResponse.cs} (97%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/{LoginTenantGameUserEntityRequest.cs => LoginGameUserEntityRequest.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/{QueryByIdTenantGameUserEntityRequest.cs => QueryByIdGameUserEntityRequest.cs} (84%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/{UpdateTenantGameUserEntityRequest.cs => UpdateGameUserEntityRequest.cs} (80%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/{TenantGameWebShopEntityBuyNotifyRequest.cs => GameWebShopEntityBuyNotifyRequest.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/{TenantGameWebShopEntityBuyRequest.cs => GameWebShopEntityBuyRequest.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/{TenantGameWebShopEntityBuyResponse.cs => GameWebShopEntityBuyResponse.cs} (85%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/{AddTenantGameOrderEntityResponse.cs => AddGameOrderEntityResponse.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/{CreateTenantGameOrderEntityRequest.cs => CreateGameOrderEntityRequest.cs} (97%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Middleware/{PublicCallbackTenantResolutionMiddleware.cs => PublicCallbackResolutionMiddleware.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/TenantAreaPolicyOptions.cs => ClientApiOptions/AreaPolicyOptions.cs} (68%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs => ClientApiOptions/ClientApiOptionsProvider.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/TenantClientApiTokenPolicyOptions.cs => ClientApiOptions/ClientApiTokenPolicyOptions.cs} (78%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/TenantEmailOptions.cs => ClientApiOptions/EmailOptions.cs} (84%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/TenantGameLoginTicketPolicyOptions.cs => ClientApiOptions/GameLoginTicketPolicyOptions.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/IClientApiTenantOptionsProvider.cs => ClientApiOptions/IClientApiOptionsProvider.cs} (66%) create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/MissingContextException.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/TenantOrderPolicyOptions.cs => ClientApiOptions/OrderPolicyOptions.cs} (66%) delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/MissingTenantContextException.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/{TenantEmailConfigSelector.cs => EmailConfigSelector.cs} (80%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/{TenantEmailOptionsSnapshot.cs => EmailOptionsSnapshot.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/{TenantEmailPurpose.cs => EmailPurpose.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/{TenantEmailSender.cs => EmailSender.cs} (76%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/{ITenantEmailSender.cs => IEmailSender.cs} (65%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/{TenantGameAppOpenAccessEntityTests.cs => GameAppOpenAccessEntityTests.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/{TenantCredentialWritePathGuardTests.cs => CredentialWritePathGuardTests.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/{TenantSecretCryptoGuardTests.cs => SecretCryptoGuardTests.cs} (64%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/{Tenant/TenantCredentialWritePathCryptoTests.cs => Business/CredentialWritePathCryptoTests.cs} (56%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/{Tenant/TenantObjectStorageConfigCryptoTests.cs => Business/ObjectStorageConfigCryptoTests.cs} (55%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/{Tenant/TenantReadActionClassifierTests.cs => Business/ReadActionClassifierTests.cs} (72%) create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/SecretCryptoTests.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/{ClientApiTenantOptionsProviderTests.cs => ClientApiOptionsProviderTests.cs} (67%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/{TenantEmailSenderTests.cs => EmailSenderTests.cs} (60%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/{PublicCallbackTenantRoutingTests.cs => PublicCallbackRoutingTests.cs} (87%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/{TenantGameAppDevice/TenantGameAppDeviceContractTests.cs => GameAppDevice/GameAppDeviceContractTests.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/{TenantGameAppDevice/TenantGameAppDeviceScopeIsolationTests.cs => GameAppDevice/GameAppDeviceScopeIsolationTests.cs} (76%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/{TenantGameCommodityEntityContractTests.cs => GameCommodityEntityContractTests.cs} (83%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/{TenantGameAppOpenAccessAuthMiddlewareTests.cs => GameAppOpenAccessAuthMiddlewareTests.cs} (68%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/{TenantGameAppOpenAccessDecryptClosureTests.cs => GameAppOpenAccessDecryptClosureTests.cs} (77%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/{TenantGameRoleAdvertisementEntityTests.cs => GameRoleAdvertisementEntityTests.cs} (65%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/{SqlSugarDiffLogTenantPrefixTests.cs => SqlSugarDiffLogPrefixTests.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/{FakeTenantDbConnectionProvider.cs => FakeDbConnectionProvider.cs} (54%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/{LogTenantQueryIsolationTests.cs => LogQueryIsolationTests.cs} (68%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/{TenantUserServiceTests.cs => UserServiceTests.cs} (57%) delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantSecretCryptoTests.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/{TenantErrorCode.cs => ErrorCode.cs} (77%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/{Tenant/DefaultTenantDatabaseSeeder.cs => Business/DefaultDatabaseSeeder.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/{Tenant/ObjectStorage/TenantObjectStorageConfigCrypto.cs => Business/ObjectStorage/ObjectStorageConfigCrypto.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/{Tenant/TenantReadActionClassifier.cs => Business/ReadActionClassifier.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/{Tenant/TenantSecretCrypto.cs => Business/SecretCrypto.cs} (92%) delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/Dto/TenantFileResponse.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/{TenantFileService.cs => FileService.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/Dto/{TenantOnlineUserResponse.cs => OnlineUserResponse.cs} (97%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/{TenantOnlineUserService.cs => OnlineUserService.cs} (82%) delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/TenantRoleResponse.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/{TenantRoleMenuService.cs => RoleMenuService.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/{TenantRoleService.cs => RoleService.cs} (90%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/{TenantUserResponse.cs => UserResponse.cs} (99%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/{TenantUserRoleService.cs => UserRoleService.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/{TenantUserService.cs => UserService.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/TenantChannelDefinitionEntity.cs => Business/ChannelDefinitionEntity.cs} (68%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/ClientApiConfig/TenantAdvertisementCallbackConfigEntity.cs => Business/ClientApiConfig/AdvertisementCallbackConfigEntity.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/ClientApiConfig/TenantClientApiPolicyEntity.cs => Business/ClientApiConfig/ClientApiPolicyEntity.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/ClientApiConfig/TenantEmailConfigEntity.cs => Business/ClientApiConfig/EmailConfigEntity.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Device/TenantGameAppDeviceEntity.cs => Business/Device/GameAppDeviceEntity.cs} (56%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Device/TenantGameAppDeviceGroupEntity.cs => Business/Device/GameAppDeviceGroupEntity.cs} (65%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Device/TenantGameAppDeviceGroupRelationEntity.cs => Business/Device/GameAppDeviceGroupRelationEntity.cs} (65%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/TenantFileEntity.cs => Business/FileEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Announcement/TenantGameAnnouncementEntity.cs => Business/Game/Announcement/GameAnnouncementEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Announcement/TenantGameBannerAnnouncementEntity.cs => Business/Game/Announcement/GameBannerAnnouncementEntity.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/App/TenantGameAppOpenAccessEntity.cs => Business/Game/App/GameAppOpenAccessEntity.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/App/TenantGameAppPackageEntity.cs => Business/Game/App/GameAppPackageEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantAppSignatureKeyEntity.cs => Business/Game/AppSignatureKeyEntity.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/FeatureSwitch/TenantGameAppFeatureSwitchEntity.cs => Business/Game/FeatureSwitch/GameAppFeatureSwitchEntity.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameAdvertisementRewardEntity.cs => Business/Game/GameAdvertisementRewardEntity.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameAntiCheatEventEntity.cs => Business/Game/GameAntiCheatEventEntity.cs} (97%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameAreaClassifyEntity.cs => Business/Game/GameAreaClassifyEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameAreaEntity.cs => Business/Game/GameAreaEntity.cs} (98%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameAreaMergePlanEntity.cs => Business/Game/GameAreaMergePlanEntity.cs} (97%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameClientLocalizationEntity.cs => Business/Game/GameClientLocalizationEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameCommodityEntity.cs => Business/Game/GameCommodityEntity.cs} (74%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameDockerTagEntity.cs => Business/Game/GameDockerTagEntity.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameGoodsCatalogueEntity.cs => Business/Game/GameGoodsCatalogueEntity.cs} (54%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameGoodsEntity.cs => Business/Game/GameGoodsEntity.cs} (84%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameHomeOnlineSampleEntity.cs => Business/Game/GameHomeOnlineSampleEntity.cs} (81%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameLoginTicketKeyEntity.cs => Business/Game/GameLoginTicketKeyEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameMailCampaignEntity.cs => Business/Game/GameMailCampaignEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameMailEntity.cs => Business/Game/GameMailEntity.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameMailTemplateCategoryEntity.cs => Business/Game/GameMailTemplateCategoryEntity.cs} (80%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameMailTemplateEntity.cs => Business/Game/GameMailTemplateEntity.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameOrderEntity.cs => Business/Game/GameOrderEntity.cs} (97%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameOrderFulfillmentEntity.cs => Business/Game/GameOrderFulfillmentEntity.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGamePaymentConfigEntity.cs => Business/Game/GamePaymentConfigEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGamePenaltyAppealEntity.cs => Business/Game/GamePenaltyAppealEntity.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGamePenaltyEntity.cs => Business/Game/GamePenaltyEntity.cs} (97%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRankEntryEntity.cs => Business/Game/GameRankEntryEntity.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRedeemCodeChannelEntity.cs => Business/Game/GameRedeemCodeChannelEntity.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRedeemCodeChannelRoleUsageEntity.cs => Business/Game/GameRedeemCodeChannelRoleUsageEntity.cs} (85%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRedeemCodeEntity.cs => Business/Game/GameRedeemCodeEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRedeemCodeUseRecordEntity.cs => Business/Game/GameRedeemCodeUseRecordEntity.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameReportEntity.cs => Business/Game/GameReportEntity.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRewardTemplateEntity.cs => Business/Game/GameRewardTemplateEntity.cs} (85%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRewardTemplateGroupEntity.cs => Business/Game/GameRewardTemplateGroupEntity.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRoleAdvertisementEntity.cs => Business/Game/GameRoleAdvertisementEntity.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameRoleEntity.cs => Business/Game/GameRoleEntity.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameTimeJobEntity.cs => Business/Game/GameTimeJobEntity.cs} (87%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameUserArchiveEntity.cs => Business/Game/GameUserArchiveEntity.cs} (98%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameUserEmailEntity.cs => Business/Game/GameUserEmailEntity.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameUserEntity.cs => Business/Game/GameUserEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameUserLogoutRecordEntity.cs => Business/Game/GameUserLogoutRecordEntity.cs} (86%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameUserRewardEntity.cs => Business/Game/GameUserRewardEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameWebShopEntity.cs => Business/Game/GameWebShopEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantGameWebShopOrderEntity.cs => Business/Game/GameWebShopOrderEntity.cs} (91%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Online/TenantGameOnlineConfigRolloutEntity.cs => Business/Game/Online/GameOnlineConfigRolloutEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Online/TenantGameOnlinePlayerSegmentEntity.cs => Business/Game/Online/GameOnlinePlayerSegmentEntity.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Release/TenantGameAppAssetPackageVersionEntity.cs => Business/Game/Release/GameAppAssetPackageVersionEntity.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Release/TenantGameAppAssetPackageVersionHistoryEntity.cs => Business/Game/Release/GameAppAssetPackageVersionHistoryEntity.cs} (79%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Release/TenantGameAppReleaseVersionEntity.cs => Business/Game/Release/GameAppReleaseVersionEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Release/TenantGameAppVersionDefinitionEntity.cs => Business/Game/Release/GameAppVersionDefinitionEntity.cs} (82%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigEntity.cs => Business/Game/RemoteConfig/GameAppRemoteConfigEntity.cs} (96%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigKeyEntity.cs => Business/Game/RemoteConfig/GameAppRemoteConfigKeyEntity.cs} (89%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigModeEntity.cs => Business/Game/RemoteConfig/GameAppRemoteConfigModeEntity.cs} (87%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/Resource/TenantGameAppAssetPackageEntity.cs => Business/Game/Resource/GameAppAssetPackageEntity.cs} (83%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/ServerConfig/TenantGameAppServerConfigEntity.cs => Business/Game/ServerConfig/GameAppServerConfigEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/Game/TenantSessionKeyEntity.cs => Business/Game/SessionKeyEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/ObjectStorage/TenantObjectStorageConfigEntity.cs => Business/ObjectStorage/ObjectStorageConfigEntity.cs} (94%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/TenantOnlineUserEntity.cs => Business/OnlineUserEntity.cs} (93%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/TenantRoleEntity.cs => Business/RoleEntity.cs} (92%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/TenantRoleMenuEntity.cs => Business/RoleMenuEntity.cs} (87%) create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserEntity.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/TenantUserRoleEntity.cs => Business/UserRoleEntity.cs} (76%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant/TenantWechatUserEntity.cs => Business/WechatUserEntity.cs} (95%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/{TenantTypeEnum.cs => TypeEnum.cs} (89%) create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditEntity.cs create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffEntity.cs create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogExceptionEntity.cs create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogOperationEntity.cs create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitEntity.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogAuditEntity.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogDiffEntity.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogExceptionEntity.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogOperationEntity.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogVisitEntity.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserEntity.cs rename GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Middleware/{TenantGameAppOpenAccessAuthMiddleware.cs => GameAppOpenAccessAuthMiddleware.cs} (93%) diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs index ec5ef190..15d5b291 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs @@ -1,11 +1,11 @@ using System.Collections.Concurrent; using System.Text.Json.Nodes; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; namespace GameFrameX.Advertisement.Abstract; /// -/// 广告回调配置 ConfigJson 敏感字段级加解密收口(C371 / GFX-838,对齐 C370 TenantObjectStorageConfigCrypto): +/// 广告回调配置 ConfigJson 敏感字段级加解密收口(C371 / GFX-838,对齐 C370 ObjectStorageConfigCrypto): /// 写入侧在 NormalizeConfigJson 规范化之后、落库之前调用 ; /// 读取侧在构建回调验签上下文之前调用 。 /// 敏感字段集合由 Provider Schema 的 Sensitive 标记或 Type == "secret" 驱动(与表单脱敏 / 必填校验同源判定), @@ -40,7 +40,7 @@ public static string EncryptConfigJson(string provider, string configJson) return configJson; } - return TransformSensitiveFields(configJson, sensitiveKeys, TenantSecretCrypto.Encrypt); + return TransformSensitiveFields(configJson, sensitiveKeys, SecretCrypto.Encrypt); } /// @@ -52,7 +52,7 @@ public static string EncryptConfigJson(string provider, string configJson) /// 敏感字段为明文的 ConfigJson public static string DecryptConfigJson(string provider, string configJson) { - if (string.IsNullOrWhiteSpace(configJson) || !configJson.Contains(TenantSecretCrypto.EncryptedPrefix, StringComparison.Ordinal)) + if (string.IsNullOrWhiteSpace(configJson) || !configJson.Contains(SecretCrypto.EncryptedPrefix, StringComparison.Ordinal)) { return configJson; } @@ -70,7 +70,7 @@ private static string DecryptCore(string provider, string configJson) return configJson; } - return TransformSensitiveFields(configJson, sensitiveKeys, TenantSecretCrypto.Decrypt); + return TransformSensitiveFields(configJson, sensitiveKeys, SecretCrypto.Decrypt); } /// diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackHandlerBase.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackHandlerBase.cs index 653d5cd2..44c26d82 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackHandlerBase.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackHandlerBase.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Json; using GameFrameX.Foundation.Logger; using Microsoft.AspNetCore.Http; @@ -11,9 +11,9 @@ namespace GameFrameX.Advertisement.Abstract; /// public abstract class AdvertisementCallbackHandlerBase { - protected readonly Repository RoleRepository; + protected readonly Repository RoleRepository; - protected AdvertisementCallbackHandlerBase(Repository roleRepository) + protected AdvertisementCallbackHandlerBase(Repository roleRepository) { RoleRepository = roleRepository; } @@ -21,7 +21,7 @@ protected AdvertisementCallbackHandlerBase(Repository role /// /// 反序列化 ConfigJson 为强类型 Option;校验 Provider 绑定与类型匹配。 /// - protected static TOption? DeserializeOption(TenantAdvertisementCallbackOptions advertisementOptions) where TOption : class, IAdvertisementCallbackOptionSetting + protected static TOption? DeserializeOption(AdvertisementCallbackOptions advertisementOptions) where TOption : class, IAdvertisementCallbackOptionSetting { if (string.IsNullOrWhiteSpace(advertisementOptions?.ConfigJson)) { diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/TenantAdvertisementCallbackOptions.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackOptions.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/TenantAdvertisementCallbackOptions.cs rename to GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackOptions.cs index e8aa8fc6..392d1e1c 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/TenantAdvertisementCallbackOptions.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackOptions.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Advertisement.Abstract; /// /// 租户广告回调配置快照。null 引用表示该作用域未配置广告回调材料。 /// -public sealed class TenantAdvertisementCallbackOptions +public sealed class AdvertisementCallbackOptions { /// /// 广告平台 Provider。 diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/IAdvertisementCallbackHandler.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/IAdvertisementCallbackHandler.cs index 2ba76a63..bb2f6b4b 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/IAdvertisementCallbackHandler.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/IAdvertisementCallbackHandler.cs @@ -13,7 +13,7 @@ public interface IAdvertisementCallbackHandler string ProviderName { get; } /// schema 取参 + 按平台算法验签。 - OptionVerification Verify(TenantAdvertisementCallbackOptions advertisementOptions, IQueryCollection query); + OptionVerification Verify(AdvertisementCallbackOptions advertisementOptions, IQueryCollection query); /// 从已验签 Option + query 解析角色 + 用户。 Task ResolveRoleAsync(object option, IQueryCollection query); diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/RoleResolution.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/RoleResolution.cs index a6746384..7228cceb 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/RoleResolution.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/RoleResolution.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Advertisement.Abstract; @@ -7,6 +7,6 @@ namespace GameFrameX.Advertisement.Abstract; /// public sealed class RoleResolution { - public TenantGameRoleEntity Role { get; set; } = null!; + public GameRoleEntity Role { get; set; } = null!; public long UserId { get; set; } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.AdMob/AdMobAdvertisementCallbackHandler.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.AdMob/AdMobAdvertisementCallbackHandler.cs index e7d9f928..77495051 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.AdMob/AdMobAdvertisementCallbackHandler.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.AdMob/AdMobAdvertisementCallbackHandler.cs @@ -3,7 +3,7 @@ using GameFrameX.Foundation.Json; using GameFrameX.Foundation.Logger; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; using GameFrameX.Core.SignatureAuth; @@ -19,11 +19,11 @@ public string ProviderName get { return "GoogleAdMob"; } } - public AdMobAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) + public AdMobAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) { } - public OptionVerification Verify(TenantAdvertisementCallbackOptions advertisementOptions, IQueryCollection query) + public OptionVerification Verify(AdvertisementCallbackOptions advertisementOptions, IQueryCollection query) { var option = DeserializeOption(advertisementOptions); if (option == null || string.IsNullOrWhiteSpace(option.verificationKeys)) diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Pangle/PangleAdvertisementCallbackHandler.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Pangle/PangleAdvertisementCallbackHandler.cs index 4acb17b7..192dab8b 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Pangle/PangleAdvertisementCallbackHandler.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Pangle/PangleAdvertisementCallbackHandler.cs @@ -1,13 +1,13 @@ using GameFrameX.Advertisement.Abstract; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Hash; using Microsoft.AspNetCore.Http; namespace GameFrameX.Advertisement.Pangle; /// -/// Pangle 广告回调处理器(SHA256(SecurityKey:TransId) 验签,密钥取租户配置 )。 +/// Pangle 广告回调处理器(SHA256(SecurityKey:TransId) 验签,密钥取租户配置 )。 /// 与 TopOn / AdMob / UnityAds 不同:不进发奖链路,仅由宿主 Controller 调用 验签,保持既有 HTTP 响应行为。 /// public sealed class PangleAdvertisementCallbackHandler : AdvertisementCallbackHandlerBase, IAdvertisementCallbackHandler @@ -17,11 +17,11 @@ public string ProviderName get { return "Pangle"; } } - public PangleAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) + public PangleAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) { } - public OptionVerification Verify(TenantAdvertisementCallbackOptions advertisementOptions, IQueryCollection query) + public OptionVerification Verify(AdvertisementCallbackOptions advertisementOptions, IQueryCollection query) { if (advertisementOptions == null || string.IsNullOrWhiteSpace(advertisementOptions.PangleSecurityKey)) { diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.TopOn/TopOnAdvertisementCallbackHandler.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.TopOn/TopOnAdvertisementCallbackHandler.cs index ad59cc57..46fb5751 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.TopOn/TopOnAdvertisementCallbackHandler.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.TopOn/TopOnAdvertisementCallbackHandler.cs @@ -2,7 +2,7 @@ using System.Text; using GameFrameX.Advertisement.Abstract; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; namespace GameFrameX.Advertisement.TopOn; @@ -17,11 +17,11 @@ public string ProviderName get { return "TopOn"; } } - public TopOnAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) + public TopOnAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) { } - public OptionVerification Verify(TenantAdvertisementCallbackOptions advertisementOptions, IQueryCollection query) + public OptionVerification Verify(AdvertisementCallbackOptions advertisementOptions, IQueryCollection query) { var option = DeserializeOption(advertisementOptions); if (option == null || string.IsNullOrWhiteSpace(option.signingSecret)) diff --git a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.UnityAds/UnityAdsAdvertisementCallbackHandler.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.UnityAds/UnityAdsAdvertisementCallbackHandler.cs index 523f942c..47bdf25f 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.UnityAds/UnityAdsAdvertisementCallbackHandler.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.UnityAds/UnityAdsAdvertisementCallbackHandler.cs @@ -2,7 +2,7 @@ using GameFrameX.Advertisement.Abstract; using GameFrameX.Core.SignatureAuth; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; namespace GameFrameX.Advertisement.UnityAds; @@ -17,11 +17,11 @@ public string ProviderName get { return "UnityAds"; } } - public UnityAdsAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) + public UnityAdsAdvertisementCallbackHandler(Repository roleRepository) : base(roleRepository) { } - public OptionVerification Verify(TenantAdvertisementCallbackOptions advertisementOptions, IQueryCollection query) + public OptionVerification Verify(AdvertisementCallbackOptions advertisementOptions, IQueryCollection query) { var option = DeserializeOption(advertisementOptions); if (option == null || string.IsNullOrWhiteSpace(option.signingSecret)) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/BaseLogService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/BaseLogService.cs index e4173028..2b0bbd81 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/BaseLogService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/BaseLogService.cs @@ -15,11 +15,11 @@ namespace GameFrameX.Application.Audit.Logging; /// 为统一投影目标(共享字段基类),保证前端字段形状不随实体拆分而变化。 /// /// 主库新日志实体 -/// 主库历史日志实体 +/// 主库历史日志实体 /// 日志投影 DTO,字段与实体共享基类一致 -public abstract class BaseLogService : IAdminApiController +public abstract class BaseLogService : IAdminApiController where TSystemLog : EntityBase, new() - where TTenantLog : EntityBase, new() + where TLog : EntityBase, new() where TDto : class, new() { /// @@ -28,9 +28,9 @@ public abstract class BaseLogService : IAdminApiCo protected readonly SqlSugarRepository SystemLogRepository; /// - /// 租户日志仓储(主库 tenant_log_* 历史表) + /// 租户日志仓储(主库 log_* 历史表) /// - protected readonly SqlSugarRepository TenantLogRepository; + protected readonly SqlSugarRepository LogRepository; /// /// 当前登录用户。 @@ -41,12 +41,12 @@ public abstract class BaseLogService : IAdminApiCo /// 构造函数 /// /// 平台日志仓储 - /// 租户日志仓储 + /// 租户日志仓储 /// 当前登录用户 - protected BaseLogService(SqlSugarRepository systemLogRepository, SqlSugarRepository tenantLogRepository, CurrentUserContext currentUserContext) + protected BaseLogService(SqlSugarRepository systemLogRepository, SqlSugarRepository logRepository, CurrentUserContext currentUserContext) { SystemLogRepository = systemLogRepository; - TenantLogRepository = tenantLogRepository; + LogRepository = logRepository; CurrentUserContext = currentUserContext; } @@ -74,7 +74,7 @@ public virtual async Task> PageAsync(PageLogRequest inpu { var timestampRange = ConvertToTimestampRange(input); var current = QueryFiltered(SystemLogRepository, input, timestampRange).Select(); - var historical = QueryFiltered(TenantLogRepository, input, timestampRange).Select(); + var historical = QueryFiltered(LogRepository, input, timestampRange).Select(); var page = await SystemLogRepository.Context.UnionAll(current, historical) .OrderBy(BuildProjectionOrder(input)) .ToPagedListAsync(input.Page, input.PageSize); @@ -114,7 +114,7 @@ private string BuildProjectionOrder(PageLogRequest input) public virtual async Task ClearAsync() { var count = await SystemLogRepository.AsDeleteable().Where(u => u.Id > 0).ExecuteCommandAsync(); - count += await TenantLogRepository.AsDeleteable().Where(u => u.Id > 0).ExecuteCommandAsync(); + count += await LogRepository.AsDeleteable().Where(u => u.Id > 0).ExecuteCommandAsync(); return count > 0; } @@ -128,7 +128,7 @@ protected async Task> QueryExportListAsync(LogRequest in var timestampRange = ConvertToTimestampRange(input); var pageInput = new PageLogRequest { StartTime = input.StartTime, EndTime = input.EndTime }; var current = QueryFiltered(SystemLogRepository, pageInput, timestampRange).Select(); - var historical = QueryFiltered(TenantLogRepository, pageInput, timestampRange).Select(); + var historical = QueryFiltered(LogRepository, pageInput, timestampRange).Select(); var rows = await SystemLogRepository.Context.UnionAll(current, historical) .OrderBy(u => u.LogDateTime, OrderByType.Desc) .ToListAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogDiffService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogDiffService.cs index cdc78c08..663266a4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogDiffService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogDiffService.cs @@ -4,19 +4,19 @@ namespace GameFrameX.Application.Audit.Logging; /// -/// 系统差异日志服务。C156 起:SuperAdmin 查询主库 system_log_diff,普通租户查询当前租户库 tenant_log_diff。 +/// 系统差异日志服务。C156 起:SuperAdmin 查询主库 system_log_diff,普通租户查询当前租户库 log_diff。 /// [ApiDescriptionSettings(Order = 330)] -public class LogDiffService : BaseLogService +public class LogDiffService : BaseLogService { /// /// 构造函数 /// /// 平台差异日志仓储(主库) - /// 租户差异日志仓储(当前租户库) + /// 租户差异日志仓储(当前租户库) /// 当前登录用户 - public LogDiffService(SqlSugarRepository systemLogDiffRepository, SqlSugarRepository tenantLogDiffRepository, CurrentUserContext currentUserContext) - : base(systemLogDiffRepository, tenantLogDiffRepository, currentUserContext) + public LogDiffService(SqlSugarRepository systemLogDiffRepository, SqlSugarRepository logDiffRepository, CurrentUserContext currentUserContext) + : base(systemLogDiffRepository, logDiffRepository, currentUserContext) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogExceptionService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogExceptionService.cs index 4dfd7af3..7f74d6db 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogExceptionService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogExceptionService.cs @@ -8,16 +8,16 @@ namespace GameFrameX.Application.Audit.Logging; /// 系统异常日志服务。统一查询主库新日志与历史日志。 /// [ApiDescriptionSettings(Order = 350)] -public class LogExceptionService : BaseLogService +public class LogExceptionService : BaseLogService { /// /// 构造函数 /// /// 平台异常日志仓储(主库) - /// 租户异常日志仓储(当前租户库) + /// 租户异常日志仓储(当前租户库) /// 当前登录用户 - public LogExceptionService(SqlSugarRepository systemLogExceptionRepository, SqlSugarRepository tenantLogExceptionRepository, CurrentUserContext currentUserContext) - : base(systemLogExceptionRepository, tenantLogExceptionRepository, currentUserContext) + public LogExceptionService(SqlSugarRepository systemLogExceptionRepository, SqlSugarRepository logExceptionRepository, CurrentUserContext currentUserContext) + : base(systemLogExceptionRepository, logExceptionRepository, currentUserContext) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogOperationService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogOperationService.cs index f357aea8..c6495818 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogOperationService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogOperationService.cs @@ -8,16 +8,16 @@ namespace GameFrameX.Application.Audit.Logging; /// 系统操作日志服务。统一查询主库新日志与历史日志。 /// [ApiDescriptionSettings(Order = 360)] -public class LogOperationService : BaseLogService +public class LogOperationService : BaseLogService { /// /// 构造函数 /// /// 平台操作日志仓储(主库) - /// 租户操作日志仓储(当前租户库) + /// 租户操作日志仓储(当前租户库) /// 当前登录用户 - public LogOperationService(SqlSugarRepository systemLogOperationRepository, SqlSugarRepository tenantLogOperationRepository, CurrentUserContext currentUserContext) - : base(systemLogOperationRepository, tenantLogOperationRepository, currentUserContext) + public LogOperationService(SqlSugarRepository systemLogOperationRepository, SqlSugarRepository logOperationRepository, CurrentUserContext currentUserContext) + : base(systemLogOperationRepository, logOperationRepository, currentUserContext) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogVisitService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogVisitService.cs index 17ca3c0b..6f313495 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogVisitService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Logging/LogVisitService.cs @@ -4,19 +4,19 @@ namespace GameFrameX.Application.Audit.Logging; /// -/// 系统访问日志服务。C156 起:SuperAdmin 查询主库 system_log_visit,普通租户查询当前租户库 tenant_log_visit。 +/// 系统访问日志服务。C156 起:SuperAdmin 查询主库 system_log_visit,普通租户查询当前租户库 log_visit。 /// [ApiDescriptionSettings(Order = 340)] -public class LogVisitService : BaseLogService +public class LogVisitService : BaseLogService { /// /// 构造函数 /// /// 平台访问日志仓储(主库) - /// 租户访问日志仓储(当前租户库) + /// 租户访问日志仓储(当前租户库) /// 当前登录用户 - public LogVisitService(SqlSugarRepository systemLogVisitRepository, SqlSugarRepository tenantLogVisitRepository, CurrentUserContext currentUserContext) - : base(systemLogVisitRepository, tenantLogVisitRepository, currentUserContext) + public LogVisitService(SqlSugarRepository systemLogVisitRepository, SqlSugarRepository logVisitRepository, CurrentUserContext currentUserContext) + : base(systemLogVisitRepository, logVisitRepository, currentUserContext) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Retention/AuditRetentionService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Retention/AuditRetentionService.cs index 6fab0026..ede4a563 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Retention/AuditRetentionService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Retention/AuditRetentionService.cs @@ -1,4 +1,4 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.Extension.Const; using GameFrameX.Entity.Log; using GameFrameX.Foundation.Orm.Entity; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs index 66944904..c8d9db03 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using GameFrameX.Advertisement.Abstract; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; #pragma warning disable CS8604, CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Trim()/.Value 实际安全 @@ -14,22 +14,22 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 111)] public class AdvertisementCallbackConfigService - : GenericCrudService + : GenericCrudService { private readonly IAdvertisementCallbackConfigSchemaProvider _schemaProvider; private const string SupportedProviderMessage = "广告平台只支持 TopOn、GoogleAdMob、Pangle、UnityAds"; public AdvertisementCallbackConfigService( - SqlSugarRepository repository, + SqlSugarRepository repository, IAdvertisementCallbackConfigSchemaProvider schemaProvider) : base(repository) { _schemaProvider = schemaProvider; } - protected override ISugarQueryable BuildPageQuery(PageTenantAdvertisementCallbackConfigRequest input) + protected override ISugarQueryable BuildPageQuery(PageAdvertisementCallbackConfigRequest input) { var searchKey = input.SearchKey?.Trim(); var provider = NormalizeProvider(input.Provider, false); @@ -43,19 +43,19 @@ protected override ISugarQueryable BuildPag /// /// 新增广告回调配置(主库内 Provider 唯一)。 /// - public override async Task AddAsync(AddTenantAdvertisementCallbackConfigRequest input) + public override async Task AddAsync(AddAdvertisementCallbackConfigRequest input) { var provider = NormalizeProvider(input.Provider, true); var configJson = NormalizeConfigJson(provider, input.ConfigJson, null); await CheckUniqueScopeAsync(provider, null); - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Provider = provider; entity.ConfigJson = configJson; ApplyConfigSummary(entity, configJson); // C371:确定最终明文之后、落库之前加密——汇总列整列密文 + ConfigJson 敏感字段级密文(Encrypt 幂等兼容存量明文/密文) - entity.SigningSecret = TenantSecretCrypto.Encrypt(entity.SigningSecret) ?? string.Empty; - entity.VerificationKeys = TenantSecretCrypto.Encrypt(entity.VerificationKeys) ?? string.Empty; + entity.SigningSecret = SecretCrypto.Encrypt(entity.SigningSecret) ?? string.Empty; + entity.VerificationKeys = SecretCrypto.Encrypt(entity.VerificationKeys) ?? string.Empty; entity.ConfigJson = AdvertisementCallbackConfigCrypto.EncryptConfigJson(provider, configJson); entity.ParameterPurposeJson = BuildParameterPurposeJson(provider); entity.IsEnabled = input.IsEnabled; @@ -66,7 +66,7 @@ public override async Task AddAsync(AddTena /// /// 更新广告回调配置。敏感字段回传 ****** 时保留原值。 /// - public override async Task UpdateAsync(UpdateTenantAdvertisementCallbackConfigRequest input) + public override async Task UpdateAsync(UpdateAdvertisementCallbackConfigRequest input) { var entity = await Repository.GetFirstAsync(e => e.Id == input.Id); if (entity == null) @@ -81,8 +81,8 @@ public override async Task UpdateAsync(UpdateTenantAdvertisementCallbackConfigRe entity.ConfigJson = configJson; ApplyConfigSummary(entity, configJson); // C371:确定最终明文之后、落库之前加密——保留语义下 NormalizeConfigJson 回填的可能是存量密文,Encrypt 幂等跳过不换密文 - entity.SigningSecret = TenantSecretCrypto.Encrypt(entity.SigningSecret) ?? string.Empty; - entity.VerificationKeys = TenantSecretCrypto.Encrypt(entity.VerificationKeys) ?? string.Empty; + entity.SigningSecret = SecretCrypto.Encrypt(entity.SigningSecret) ?? string.Empty; + entity.VerificationKeys = SecretCrypto.Encrypt(entity.VerificationKeys) ?? string.Empty; entity.ConfigJson = AdvertisementCallbackConfigCrypto.EncryptConfigJson(provider, configJson); entity.ParameterPurposeJson = BuildParameterPurposeJson(provider); entity.IsEnabled = input.IsEnabled; @@ -109,7 +109,7 @@ await Repository.AsUpdateable(entity) /// [HttpPost(CrudActionRoutes.Page)] [ApiDescriptionSettings(Name = "Page")] - public override async Task> PageAsync(PageTenantAdvertisementCallbackConfigRequest input) + public override async Task> PageAsync(PageAdvertisementCallbackConfigRequest input) { var result = await base.PageAsync(input); foreach (var item in result.Items) @@ -265,7 +265,7 @@ private static bool IsSensitiveField(AdvertisementCallbackConfigField field) return field.Sensitive || field.Type == "secret"; } - private static void ApplyConfigSummary(Entity.Tenant.ClientApiConfig.TenantAdvertisementCallbackConfigEntity entity, string configJson) + private static void ApplyConfigSummary(Entity.Business.ClientApiConfig.AdvertisementCallbackConfigEntity entity, string configJson) { entity.CallbackUrl = GetConfigString(configJson, "callbackUrl"); entity.SigningSecret = GetConfigString(configJson, "signingSecret"); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AddTenantAdvertisementCallbackConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AddAdvertisementCallbackConfigRequest.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AddTenantAdvertisementCallbackConfigRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AddAdvertisementCallbackConfigRequest.cs index 763bfbf3..3a76a2f7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AddTenantAdvertisementCallbackConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AddAdvertisementCallbackConfigRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; /// /// 租户广告回调配置新增输入参数 /// -public class AddTenantAdvertisementCallbackConfigRequest : BaseAddRequest +public class AddAdvertisementCallbackConfigRequest : BaseAddRequest { /// /// 广告平台 Provider。当前首批配置支持 TopOn、GoogleAdMob、Pangle、UnityAds。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AdvertisementCallbackConfigResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AdvertisementCallbackConfigResponse.cs index 5e6cc833..0264824b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AdvertisementCallbackConfigResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/AdvertisementCallbackConfigResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; /// /// 租户广告回调配置输出参数(敏感字段已脱敏) /// -public class AdvertisementCallbackConfigResponse : IBasePageResponse +public class AdvertisementCallbackConfigResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageTenantAdvertisementCallbackConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageAdvertisementCallbackConfigRequest.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageTenantAdvertisementCallbackConfigRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageAdvertisementCallbackConfigRequest.cs index 95a2ef3a..9da84a54 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageTenantAdvertisementCallbackConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageAdvertisementCallbackConfigRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; /// /// 租户广告回调验签配置分页查询输入参数 /// -public class PageTenantAdvertisementCallbackConfigRequest : BaseAppActivePageRequest +public class PageAdvertisementCallbackConfigRequest : BaseAppActivePageRequest { /// /// 广告平台 Provider。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/UpdateTenantAdvertisementCallbackConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/UpdateAdvertisementCallbackConfigRequest.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/UpdateTenantAdvertisementCallbackConfigRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/UpdateAdvertisementCallbackConfigRequest.cs index a940df6a..ec7b658a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/UpdateTenantAdvertisementCallbackConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/UpdateAdvertisementCallbackConfigRequest.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; /// 租户广告回调配置更新输入参数。 /// 敏感字段提交 ****** 时表示保留原值。 /// -public class UpdateTenantAdvertisementCallbackConfigRequest : BaseUpdateRequest +public class UpdateAdvertisementCallbackConfigRequest : BaseUpdateRequest { /// /// 广告平台 Provider。当前首批配置支持 TopOn、GoogleAdMob、Pangle、UnityAds。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/AddTenantGameAdvertisementRewardEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/AddGameAdvertisementRewardEntityRequest.cs similarity index 82% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/AddTenantGameAdvertisementRewardEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/AddGameAdvertisementRewardEntityRequest.cs index 3c8724ad..4af262cf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/AddTenantGameAdvertisementRewardEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/AddGameAdvertisementRewardEntityRequest.cs @@ -4,6 +4,6 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementReward.Dto; /// 广告奖励发放账本新增输入参数。仅满足 GenericCrudService 的 TAddRequest 泛型约束; /// AddAsync 端点已由 OnAddingAsync 抛错关闭(账本由广告回调链路产生,不支持管理后台直接创建)。 /// -public class AddTenantGameAdvertisementRewardEntityRequest : BaseAddRequest +public class AddGameAdvertisementRewardEntityRequest : BaseAddRequest { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/GameAdvertisementRewardResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/GameAdvertisementRewardResponse.cs index 5533915e..5b945de5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/GameAdvertisementRewardResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/GameAdvertisementRewardResponse.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementReward.Dto; /// 广告奖励发放账本输出参数(C114 / GFX-111 后端跟进)。投影暴露实体全字段: /// Provider/TransactionId/AdvertisementUnit/RoleId/UserId/AreaId/RewardItem/RewardAmount/Status/IdempotencyKey/FailureReason/IsSandbox + 审计列。 /// -public class GameAdvertisementRewardResponse : IBasePageResponse +public class GameAdvertisementRewardResponse : IBasePageResponse { /// /// Id @@ -29,7 +29,7 @@ public class GameAdvertisementRewardResponse : IBasePageResponse - /// 角色 Id。反查自 TenantGameRoleEntity。 + /// 角色 Id。反查自 GameRoleEntity。 /// public string RoleId { get; set; } = null!; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/PageTenantGameAdvertisementRewardEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/PageGameAdvertisementRewardEntityRequest.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/PageTenantGameAdvertisementRewardEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/PageGameAdvertisementRewardEntityRequest.cs index 384beedf..7ccc9805 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/PageTenantGameAdvertisementRewardEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/PageGameAdvertisementRewardEntityRequest.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementReward.Dto; /// 广告奖励发放账本分页/导出查询输入参数(C114 / GFX-111 后端跟进)。 /// 过滤字段对齐前端检索表单:Provider/Status/RoleId 常用 + TransactionId/AdvertisementUnit/AreaId/时间范围 高级。 /// -public class PageTenantGameAdvertisementRewardEntityRequest : BaseAreaPageRequest +public class PageGameAdvertisementRewardEntityRequest : BaseAreaPageRequest { /// /// 广告平台 Provider(等值匹配,标准化值 TopOn / GoogleAdMob / UnityAds)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/UpdateTenantGameAdvertisementRewardEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/UpdateGameAdvertisementRewardEntityRequest.cs similarity index 80% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/UpdateTenantGameAdvertisementRewardEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/UpdateGameAdvertisementRewardEntityRequest.cs index 5a19eb0d..759ff1f2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/UpdateTenantGameAdvertisementRewardEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/Dto/UpdateGameAdvertisementRewardEntityRequest.cs @@ -4,6 +4,6 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementReward.Dto; /// 广告奖励发放账本更新输入参数。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束; /// UpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持管理后台修改)。 /// -public class UpdateTenantGameAdvertisementRewardEntityRequest : BaseUpdateRequest +public class UpdateGameAdvertisementRewardEntityRequest : BaseUpdateRequest { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/GameAdvertisementRewardService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/GameAdvertisementRewardService.cs index 5136c71f..0f5caf6f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/GameAdvertisementRewardService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementReward/GameAdvertisementRewardService.cs @@ -9,16 +9,16 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementReward; /// 只读:PageAsync(继承基类)/ GetAsync 详情(继承基类)/ ExportAsync 导出当前过滤列表(上限 1000 行,文件化由前端处理)。 /// 事实数据铁律:OnAddingAsync / OnUpdatingAsync 抛错关闭默认 AddAsync/UpdateAsync 端点,无 DeleteAsync 端点。 /// 高风险动作 RetryAsync / MarkProcessedAsync 涉及 C114 幂等状态机(同 IdempotencyKey 复用账本行从 Failed 翻回), -/// 留待单独 change 落地;前端对应按钮已由 tenantGameAdRewardEntity:retry / :markProcessed 权限码门控,未种码即隐藏。 +/// 留待单独 change 落地;前端对应按钮已由 gameAdRewardEntity:retry / :markProcessed 权限码门控,未种码即隐藏。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameAdvertisementRewardService - : GenericCrudService + : GenericCrudService { public GameAdvertisementRewardService( - SqlSugarRepository repository) + SqlSugarRepository repository) : base(repository) { } @@ -26,7 +26,7 @@ public GameAdvertisementRewardService( /// /// 账本由广告服务端回调链路产生(Client.Api GameAdvertisementRewardService),禁止管理后台直接创建。 /// - protected override Task OnAddingAsync(AddTenantGameAdvertisementRewardEntityRequest input) + protected override Task OnAddingAsync(AddGameAdvertisementRewardEntityRequest input) { throw new Exception("广告奖励账本由广告回调链路产生,不支持通过管理后台直接创建"); } @@ -34,7 +34,7 @@ protected override Task OnAddingAsync(AddTenantGameAdvertisementRewardEntityRequ /// /// 账本为事实数据,禁止管理后台修改。 /// - protected override Task OnUpdatingAsync(UpdateTenantGameAdvertisementRewardEntityRequest input) + protected override Task OnUpdatingAsync(UpdateGameAdvertisementRewardEntityRequest input) { throw new Exception("广告奖励账本为事实数据,不支持修改"); } @@ -42,7 +42,7 @@ protected override Task OnUpdatingAsync(UpdateTenantGameAdvertisementRewardEntit /// /// 账本分页查询过滤。 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameAdvertisementRewardEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameAdvertisementRewardEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Provider), u => u.Provider == input.Provider) @@ -66,7 +66,7 @@ protected override ISugarQueryable BuildPageQue [HttpPost(CrudActionRoutes.Export)] [ApiDescriptionSettings(Name = "Export")] [DisplayName("导出广告奖励账本")] - public async Task> ExportAsync(PageTenantGameAdvertisementRewardEntityRequest input) + public async Task> ExportAsync(PageGameAdvertisementRewardEntityRequest input) { return await BuildPageQuery(input).Take(1000).ToListAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/AssetPackageScopeValidator.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/AssetPackageScopeValidator.cs index 84bfad83..b432dd62 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/AssetPackageScopeValidator.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/AssetPackageScopeValidator.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.Resource; +using GameFrameX.Entity.Business.Game.Resource; namespace GameFrameX.Application.ClientDelivery.AppScope; @@ -8,7 +8,7 @@ public static class AssetPackageScopeValidator /// /// 校验版本引用的资源包定义存在。 /// - public static async Task ValidateAsync(string? assetPackageName, ISugarQueryable assetPackageQuery) + public static async Task ValidateAsync(string? assetPackageName, ISugarQueryable assetPackageQuery) { var normalizedName = assetPackageName?.Trim() ?? string.Empty; if (normalizedName.Length == 0) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/PackageScopeValidator.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/PackageScopeValidator.cs index dc8b82f3..354f9106 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/PackageScopeValidator.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AppScope/PackageScopeValidator.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Application.ClientDelivery.AppScope; @@ -9,7 +9,7 @@ public static class PackageScopeValidator public const string DefaultPackage = "default"; /// 空值及默认包放行,其它包名必须存在且启用。 - public static async Task ValidateAsync(string? package, ISugarQueryable packageQuery) + public static async Task ValidateAsync(string? package, ISugarQueryable packageQuery) { var normalized = string.IsNullOrWhiteSpace(package) ? string.Empty : package.Trim(); if (normalized.Length == 0 || normalized == DefaultPackage) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionManagementServiceBase.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionManagementServiceBase.cs index 2089bb40..a2c8411b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionManagementServiceBase.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionManagementServiceBase.cs @@ -161,7 +161,7 @@ protected async Task> QueryAvailableAsy var searchKey = input?.SearchKey?.Trim(); var pageSize = Math.Min(input.PageSize > 0 ? input.PageSize : BaseSelectPageRequest.DefaultPageSize, BaseSelectPageRequest.MaxPageSize); var channels = new List(); - if (ManagedScope == ChannelScopeEnum.Tenant && _globalChannelRepository != null) + if (ManagedScope == ChannelScopeEnum.Business && _globalChannelRepository != null) { channels.AddRange(await _globalChannelRepository.AsQueryable() .Filter(null, true) @@ -270,15 +270,15 @@ private async Task CheckCodeUniqueAsync(string code, ChannelScopeEnum scope, lon throw BusinessError.Oh("租户渠道编码不能与系统渠道重复"); } - var existsTenantCode = excludeId.HasValue + var existsCode = excludeId.HasValue ? await Repository.AsQueryable().Filter(null, true) - .AnyAsync(u => u.Scope == ChannelScopeEnum.Tenant && + .AnyAsync(u => u.Scope == ChannelScopeEnum.Business && u.Code == code && u.Id != excludeId.Value) : await Repository.AsQueryable().Filter(null, true) - .AnyAsync(u => u.Scope == ChannelScopeEnum.Tenant && + .AnyAsync(u => u.Scope == ChannelScopeEnum.Business && u.Code == code); - if (existsTenantCode) + if (existsCode) { throw BusinessError.Oh("租户渠道编码已存在"); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionService.cs index 56ae3f65..a3f69a31 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionService.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Application.ClientDelivery.ChannelDefinition.Dto; using GameFrameX.Core.Export; using GameFrameX.Core.Service.User; @@ -12,17 +12,17 @@ namespace GameFrameX.Application.ClientDelivery.ChannelDefinition; /// [ApiDescriptionSettings(Order = 101)] public class ChannelDefinitionService - : ChannelDefinitionManagementServiceBase + : ChannelDefinitionManagementServiceBase { - private readonly SqlSugarRepository _packageRepository; + private readonly SqlSugarRepository _packageRepository; /// /// 租户渠道定义服务 /// public ChannelDefinitionService( - SqlSugarRepository repository, + SqlSugarRepository repository, SqlSugarRepository globalChannelRepository, - SqlSugarRepository packageRepository, + SqlSugarRepository packageRepository, CurrentUserContext currentUserContext) : base(repository, globalChannelRepository, currentUserContext) { @@ -32,7 +32,7 @@ public ChannelDefinitionService( /// protected override ChannelScopeEnum ManagedScope { - get { return ChannelScopeEnum.Tenant; } + get { return ChannelScopeEnum.Business; } } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/AddChannelDefinitionRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/AddChannelDefinitionRequest.cs index 8dc785ba..288189e5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/AddChannelDefinitionRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/AddChannelDefinitionRequest.cs @@ -17,7 +17,7 @@ public class AddChannelDefinitionRequest : BaseIsDefaultNamedAddRequest /// /// 渠道作用域 /// - public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Tenant; + public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Business; /// /// 适用平台编码 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/ChannelDefinitionResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/ChannelDefinitionResponse.cs index 30327d30..da325031 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/ChannelDefinitionResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/ChannelDefinitionResponse.cs @@ -28,7 +28,7 @@ public class ChannelDefinitionResponse : IBaseResponse /// /// 渠道作用域 /// - public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Tenant; + public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Business; /// /// 适用平台编码 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/UpdateChannelDefinitionRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/UpdateChannelDefinitionRequest.cs index 232b40da..56abc436 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/UpdateChannelDefinitionRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/Dto/UpdateChannelDefinitionRequest.cs @@ -17,7 +17,7 @@ public class UpdateChannelDefinitionRequest : BaseIsDefaultNamedUpdateRequest /// /// 渠道作用域 /// - public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Tenant; + public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Business; /// /// 适用平台编码 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs index 7f537958..25fae5b8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs @@ -4,7 +4,7 @@ using GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; using GameFrameX.Core.Enum.Errors; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; #pragma warning disable CS8604, CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Trim()/.Value 实际安全 namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy; @@ -14,14 +14,14 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy; /// 主库保存唯一运行策略,所有请求读取同一行。 /// 敏感字段(SigningKey)承载 C368 空值防护语义:新增空白自动生成 64-hex、更新空白与 ****** 同义保留原值; /// 输出恒为脱敏占位;该密钥纯服务端内部使用,任何响应均不回显明文。 -/// 签名密钥以 密文落库(C371):PreserveIfMasked 先换回库中原值(密文形态), +/// 签名密钥以 密文落库(C371):PreserveIfMasked 先换回库中原值(密文形态), /// Encrypt 幂等跳过已密文值,新明文在落库前加密。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 112)] public class ClientApiPolicyService - : GenericCrudService + : GenericCrudService { /// /// 票据固定到期时间上限(秒):30 天(C142 决策口径)。 @@ -30,7 +30,7 @@ public class ClientApiPolicyService private readonly GameFrameX.Core.Service.User.CurrentUserContext _currentUserContext; - public ClientApiPolicyService(SqlSugarRepository repository, + public ClientApiPolicyService(SqlSugarRepository repository, GameFrameX.Core.Service.User.CurrentUserContext currentUserContext) : base(repository) { @@ -54,7 +54,7 @@ public async Task RotateAsync(BaseIdRequest input) } var plain = Convert.ToHexString(RandomNumberGenerator.GetBytes(32)).ToLowerInvariant(); - entity.SigningKey = TenantSecretCrypto.Encrypt(plain) ?? string.Empty; + entity.SigningKey = SecretCrypto.Encrypt(plain) ?? string.Empty; entity.UpdateTime = TimerHelper.UnixTimeSeconds(); await Repository.AsUpdateable(entity) .UpdateColumns(e => new { e.SigningKey, e.UpdateTime, }) @@ -64,7 +64,7 @@ await Repository.AsUpdateable(entity) LogHelper.Info($"[KeyAudit] action=PolicySigningKeyRotate policyId={entity.Id} oldKeyRevoked=immediately operator={_currentUserContext.Account}"); } - protected override ISugarQueryable BuildPageQuery(PageTenantClientApiPolicyRequest input) + protected override ISugarQueryable BuildPageQuery(PageClientApiPolicyRequest input) { var searchKey = input.SearchKey?.Trim(); return Repository.AsQueryable() @@ -77,12 +77,12 @@ protected override ISugarQueryable BuildPageQuery(PageT /// 新增主库唯一运行策略。SigningKey 空白时服务端生成 64 位十六进制密钥。 /// [DisplayName("新增 Client API 运行策略")] - public override async Task AddAsync(AddTenantClientApiPolicyRequest input) + public override async Task AddAsync(AddClientApiPolicyRequest input) { await CheckUniqueScopeAsync(null); ValidateTicketExpireTime(input.TicketExpireTime); - var entity = input.Adapt(); + var entity = input.Adapt(); entity.SigningKey = ResolveSigningKeyForStorage(input.SigningKey, null); entity.IsEnabled = true; await Repository.InsertAsync(entity); @@ -96,7 +96,7 @@ public override async Task AddAsync(AddTenantClientApiP /// 更新运行策略。SigningKey 回传 ****** 或留空均保留原值(C368:空白与掩码同义),新明文加密落库。 /// [DisplayName("更新 Client API 运行策略")] - public override async Task UpdateAsync(UpdateTenantClientApiPolicyRequest input) + public override async Task UpdateAsync(UpdateClientApiPolicyRequest input) { var entity = await Repository.GetFirstAsync(e => e.Id == input.Id); if (entity == null) @@ -144,7 +144,7 @@ await Repository.AsUpdateable(entity) [HttpPost(CrudActionRoutes.Page)] [ApiDescriptionSettings(Name = "Page")] [DisplayName("分页查询 Client API 运行策略")] - public override async Task> PageAsync(PageTenantClientApiPolicyRequest input) + public override async Task> PageAsync(PageClientApiPolicyRequest input) { var result = await base.PageAsync(input); foreach (var item in result.Items) @@ -177,7 +177,7 @@ public override async Task GetAsync([FromQuery] BaseIdR /// 解析签名密钥最终落库值(C368 + C371 组合语义)。 /// 新增:空白 → CSPRNG 生成 64-hex;非空明文透传。 /// 更新:****** 或空白 → 保留库中原值(密文形态);新明文透传。 - /// 最终值经 :明文加密为 enc:sec:v1: 密文,已密文值幂等透传。 + /// 最终值经 :明文加密为 enc:sec:v1: 密文,已密文值幂等透传。 /// private static string ResolveSigningKeyForStorage(string? inputKey, string? storedKey) { @@ -200,7 +200,7 @@ private static string ResolveSigningKeyForStorage(string? inputKey, string? stor plain = inputKey.Trim(); } - return TenantSecretCrypto.Encrypt(plain) ?? string.Empty; + return SecretCrypto.Encrypt(plain) ?? string.Empty; } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/AddTenantClientApiPolicyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/AddClientApiPolicyRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/AddTenantClientApiPolicyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/AddClientApiPolicyRequest.cs index 07d063ba..67fd7886 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/AddTenantClientApiPolicyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/AddClientApiPolicyRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; /// /// 租户 Client API 运行策略新增输入参数 /// -public class AddTenantClientApiPolicyRequest : BaseAddRequest +public class AddClientApiPolicyRequest : BaseAddRequest { /// /// 是否要求请求签名。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/ClientApiPolicyResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/ClientApiPolicyResponse.cs index b3f878a9..27ec8399 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/ClientApiPolicyResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/ClientApiPolicyResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; /// /// 租户 Client API 运行策略输出参数 /// -public class ClientApiPolicyResponse : IBasePageResponse +public class ClientApiPolicyResponse : IBasePageResponse { /// /// 是否要求请求签名。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageTenantClientApiPolicyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageClientApiPolicyRequest.cs similarity index 68% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageTenantClientApiPolicyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageClientApiPolicyRequest.cs index 9eb648d5..53a1da64 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageTenantClientApiPolicyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageClientApiPolicyRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; /// /// 租户 Client API 运行策略分页查询输入参数 /// -public class PageTenantClientApiPolicyRequest : BaseAppActivePageRequest +public class PageClientApiPolicyRequest : BaseAppActivePageRequest { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/UpdateTenantClientApiPolicyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/UpdateClientApiPolicyRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/UpdateTenantClientApiPolicyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/UpdateClientApiPolicyRequest.cs index bb21ec12..e5b37d28 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/UpdateTenantClientApiPolicyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/UpdateClientApiPolicyRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; /// /// 租户 Client API 运行策略更新输入参数 /// -public class UpdateTenantClientApiPolicyRequest : BaseUpdateRequest +public class UpdateClientApiPolicyRequest : BaseUpdateRequest { /// /// 是否要求请求签名。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/DeviceGroupService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/DeviceGroupService.cs index 958433c6..5aae4c4d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/DeviceGroupService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/DeviceGroupService.cs @@ -1,5 +1,5 @@ using GameFrameX.Application.ClientDelivery.Device.DeviceGroup.Dto; -using GameFrameX.Entity.Tenant.Device; +using GameFrameX.Entity.Business.Device; namespace GameFrameX.Application.ClientDelivery.Device.DeviceGroup; @@ -8,14 +8,14 @@ namespace GameFrameX.Application.ClientDelivery.Device.DeviceGroup; /// 分组绑定主库中真实存在的设备。 /// [ApiDescriptionSettings(Order = 100)] -public class DeviceGroupService : GenericCrudSelectService +public class DeviceGroupService : GenericCrudSelectService { /// /// 设备码分组服务 /// /// - public DeviceGroupService(SqlSugarRepository repository) + public DeviceGroupService(SqlSugarRepository repository) : base(repository) { } @@ -25,11 +25,11 @@ public DeviceGroupService(SqlSugarRepository rep /// /// /// - public override async Task AddAsync(AddTenantDeviceGroupRequest input) + public override async Task AddAsync(AddDeviceGroupRequest input) { await EnsureDevicesExistAsync(input.DeviceIds); - var diviceGroup = new TenantGameAppDeviceGroupEntity + var diviceGroup = new GameAppDeviceGroupEntity { Name = input.Name ?? string.Empty, Description = input.Description, @@ -37,7 +37,7 @@ public override async Task AddAsync(AddTenantDeviceGroupReq var result = await Repository.InsertAsync(diviceGroup); if (result && input.DeviceIds != null && input.DeviceIds.Count > 0) { - var relation = input.DeviceIds.Select(did => new TenantGameAppDeviceGroupRelationEntity + var relation = input.DeviceIds.Select(did => new GameAppDeviceGroupRelationEntity { DeviceGroupId = diviceGroup.Id, DeviceId = did, @@ -51,7 +51,7 @@ public override async Task AddAsync(AddTenantDeviceGroupReq /// /// 更新前:校验记录存在及分组设备存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantDeviceGroupRequest input) + protected override async Task OnUpdatingAsync(UpdateDeviceGroupRequest input) { var existing = await Repository.GetFirstAsync(g => g.Id == input.Id); if (existing == null) @@ -65,15 +65,15 @@ protected override async Task OnUpdatingAsync(UpdateTenantDeviceGroupRequest inp /// /// 更新后(主表已走统一 InnerUpdateAsync 乐观锁):重建分组关系,只绑定有效设备。 /// - protected override async Task OnUpdatedAsync(UpdateTenantDeviceGroupRequest input, TenantGameAppDeviceGroupEntity before, TenantGameAppDeviceGroupEntity after) + protected override async Task OnUpdatedAsync(UpdateDeviceGroupRequest input, GameAppDeviceGroupEntity before, GameAppDeviceGroupEntity after) { //删除旧的关系 - await Repository.AsSugarClient().Deleteable() + await Repository.AsSugarClient().Deleteable() .Where(g => g.DeviceGroupId == input.Id).ExecuteCommandAsync(); //插入新关系 if (input.DeviceIds != null && input.DeviceIds.Count > 0) { - var relation = input.DeviceIds.Select(did => new TenantGameAppDeviceGroupRelationEntity + var relation = input.DeviceIds.Select(did => new GameAppDeviceGroupRelationEntity { DeviceGroupId = input.Id, DeviceId = did, @@ -97,7 +97,7 @@ public async Task GetDetailAsync(BaseIdRequest input) } //查询分组关联设备 - var devices = await Repository.AsSugarClient().Queryable() + var devices = await Repository.AsSugarClient().Queryable() .Where(d => d.DeviceGroupId == deviceGroup.Id).Select(x => x.DeviceId).ToListAsync(); var returndeviceGroup = new DeviceGroupResponse @@ -155,7 +155,7 @@ private async Task EnsureDevicesExistAsync(List? deviceIds) var distinctIds = deviceIds.Distinct().ToList(); var matchCount = await Repository.AsSugarClient() - .Queryable() + .Queryable() .Where(u => distinctIds.Contains(u.Id)) .CountAsync(); if (matchCount != distinctIds.Count) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/AddTenantDeviceGroupRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/AddDeviceGroupRequest.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/AddTenantDeviceGroupRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/AddDeviceGroupRequest.cs index 744112d7..17c6873c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/AddTenantDeviceGroupRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/AddDeviceGroupRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.Device.DeviceGroup.Dto; /// /// 机器码分组增加输入参数 /// -public class AddTenantDeviceGroupRequest : BaseNamedDescriptionRequest +public class AddDeviceGroupRequest : BaseNamedDescriptionRequest { /// /// 机器码列表(必须与本分组同应用,跨应用设备由服务拒绝) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/DeviceGroupResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/DeviceGroupResponse.cs index c4c32480..98b2c7d3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/DeviceGroupResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/DeviceGroupResponse.cs @@ -3,9 +3,9 @@ namespace GameFrameX.Application.ClientDelivery.Device.DeviceGroup.Dto; /// /// 机器码分组输出参数 /// -// 纯 POCO 投影(C228):属性名与 TenantGameAppDeviceGroupEntity 保持一致, +// 纯 POCO 投影(C228):属性名与 GameAppDeviceGroupEntity 保持一致, // 供 .Select<DeviceGroupResponse>() 自动投影与 Mapster 按名映射。 -public class DeviceGroupResponse : IBasePageResponse +public class DeviceGroupResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/UpdateTenantDeviceGroupRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/UpdateDeviceGroupRequest.cs similarity index 88% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/UpdateTenantDeviceGroupRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/UpdateDeviceGroupRequest.cs index 7bba6672..34159563 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/UpdateTenantDeviceGroupRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/DeviceGroup/Dto/UpdateDeviceGroupRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.Device.DeviceGroup.Dto; /// /// 机器码分组更新输入参数 /// -public class UpdateTenantDeviceGroupRequest : BaseNamedDescriptionRequest, ICrudUpdateRequest +public class UpdateDeviceGroupRequest : BaseNamedDescriptionRequest, ICrudUpdateRequest { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/AddTenantGameAppDeviceRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/AddGameAppDeviceRequest.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/AddTenantGameAppDeviceRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/AddGameAppDeviceRequest.cs index 8e42530f..40881248 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/AddTenantGameAppDeviceRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/AddGameAppDeviceRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.Device.GameAppDevice.Dto; /// /// 机器码增加输入参数 /// -public class AddTenantGameAppDeviceRequest : BaseNamedDescriptionRequest +public class AddGameAppDeviceRequest : BaseNamedDescriptionRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/GameAppDeviceResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/GameAppDeviceResponse.cs index 9b2250da..b230afa9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/GameAppDeviceResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/GameAppDeviceResponse.cs @@ -3,9 +3,9 @@ namespace GameFrameX.Application.ClientDelivery.Device.GameAppDevice.Dto; /// /// 机器码输出参数 /// -// 纯 POCO 投影(C228):属性名与 TenantGameAppDeviceEntity(含 EntityBasicSelect 的 Name/Description)保持一致, +// 纯 POCO 投影(C228):属性名与 GameAppDeviceEntity(含 EntityBasicSelect 的 Name/Description)保持一致, // 供 .Select<GameAppDeviceResponse>() 自动投影与 Mapster 按名映射。 -public class GameAppDeviceResponse : IBasePageResponse +public class GameAppDeviceResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/UpdateTenantGameAppDeviceRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/UpdateGameAppDeviceRequest.cs similarity index 88% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/UpdateTenantGameAppDeviceRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/UpdateGameAppDeviceRequest.cs index b01cd83b..106bf867 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/UpdateTenantGameAppDeviceRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/Dto/UpdateGameAppDeviceRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.Device.GameAppDevice.Dto; /// /// 机器码更新输入参数 /// -public class UpdateTenantGameAppDeviceRequest : BaseNamedDescriptionRequest, ICrudUpdateRequest +public class UpdateGameAppDeviceRequest : BaseNamedDescriptionRequest, ICrudUpdateRequest { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/GameAppDeviceService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/GameAppDeviceService.cs index df16bd3e..fd16d6da 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/GameAppDeviceService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Device/GameAppDevice/GameAppDeviceService.cs @@ -1,5 +1,5 @@ using GameFrameX.Application.ClientDelivery.Device.GameAppDevice.Dto; -using GameFrameX.Entity.Tenant.Device; +using GameFrameX.Entity.Business.Device; namespace GameFrameX.Application.ClientDelivery.Device.GameAppDevice; @@ -8,14 +8,14 @@ namespace GameFrameX.Application.ClientDelivery.Device.GameAppDevice; /// 机器码 DeviceUniqueIdentifier 在主库内唯一。 /// [ApiDescriptionSettings(Order = 100)] -public class GameAppDeviceService : GenericCrudSelectService +public class GameAppDeviceService : GenericCrudSelectService { /// /// 设备码服务 /// /// - public GameAppDeviceService(SqlSugarRepository repository) + public GameAppDeviceService(SqlSugarRepository repository) : base(repository) { } @@ -23,7 +23,7 @@ public GameAppDeviceService(SqlSugarRepository reposi /// /// 新增前校验:机器码在主库内唯一。 /// - protected override async Task OnAddingAsync(AddTenantGameAppDeviceRequest input) + protected override async Task OnAddingAsync(AddGameAppDeviceRequest input) { await EnsureDeviceUniqueIdentifierUniqueAsync(input.DeviceUniqueIdentifier, null); } @@ -31,7 +31,7 @@ protected override async Task OnAddingAsync(AddTenantGameAppDeviceRequest input) /// /// 更新前:校验记录存在;机器码唯一性排除自身。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameAppDeviceRequest input) + protected override async Task OnUpdatingAsync(UpdateGameAppDeviceRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -50,7 +50,7 @@ protected override ISugarQueryable BuildPageQuery(GameApp return Repository.AsQueryable() .Where(u => u.IsDeleted == false) .WhereIF(input.GroupId > 0, - u => SqlFunc.Subqueryable() + u => SqlFunc.Subqueryable() .Where(r => r.DeviceId == u.Id && r.DeviceGroupId == input.GroupId.Value) .Any()) .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchBaseRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchBaseRequest.cs index 00e73c66..b35095fb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchBaseRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchBaseRequest.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.FeatureSwitch; namespace GameFrameX.Application.ClientDelivery.FeatureSwitch.Dto; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchResponse.cs index f483ff08..8dd44f83 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/Dto/GameAppFeatureSwitchResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.FeatureSwitch; namespace GameFrameX.Application.ClientDelivery.FeatureSwitch.Dto; /// /// 活动/功能开关管理输出参数(字段名与实体逐字一致,名映射投影) /// -public class GameAppFeatureSwitchResponse : IBasePageResponse +public class GameAppFeatureSwitchResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/FeatureSwitchDeliveryResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/FeatureSwitchDeliveryResolver.cs index ffbd5a58..1f6c2d8c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/FeatureSwitchDeliveryResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/FeatureSwitchDeliveryResolver.cs @@ -2,7 +2,7 @@ using System.Text; using GameFrameX.Application.ClientDelivery.Rollout; using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.FeatureSwitch; namespace GameFrameX.Application.ClientDelivery.FeatureSwitch; @@ -36,13 +36,13 @@ public sealed class FeatureSwitchDeliveryResolver /// private const int ChannelScopeScore = 2; - private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _repository; /// /// 初始化活动/功能开关投放解析器。 /// /// 主库开关注册表仓储(自带软删除过滤)。 - public FeatureSwitchDeliveryResolver(SqlSugarRepository repository) + public FeatureSwitchDeliveryResolver(SqlSugarRepository repository) { _repository = repository; } @@ -65,7 +65,7 @@ public async Task ResolveAsync(FeatureSwitchDeliver /// 候选行集合,顺序不参与计算。 /// 投放解析入参。 /// 投放版本号与生效开关集合。 - public static FeatureSwitchDeliveryResult Resolve(IReadOnlyList candidates, FeatureSwitchDeliveryQuery query) + public static FeatureSwitchDeliveryResult Resolve(IReadOnlyList candidates, FeatureSwitchDeliveryQuery query) { var effective = candidates.Where(row => IsEffective(row, query)).ToList(); var switches = effective.Where(row => IsScopeMatch(row, query)) @@ -84,7 +84,7 @@ public static FeatureSwitchDeliveryResult Resolve(IReadOnlyList候选行。 /// 投放解析入参。 /// 有效返回 true,否则返回 false。 - private static bool IsEffective(TenantGameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) + private static bool IsEffective(GameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) { if (row.IsEnabled == false) { @@ -127,7 +127,7 @@ private static bool IsAudienceMatch(string audience, FeatureSwitchAudience targe /// 候选行。 /// 本次判定的 UTC 服务器时间。 /// 落在窗内返回 true,否则返回 false。 - private static bool IsInTimeWindow(TenantGameAppFeatureSwitchEntity row, DateTime nowUtc) + private static bool IsInTimeWindow(GameAppFeatureSwitchEntity row, DateTime nowUtc) { if (row.StartTime.HasValue && nowUtc < ToUtc(row.StartTime.Value)) { @@ -149,7 +149,7 @@ private static bool IsInTimeWindow(TenantGameAppFeatureSwitchEntity row, DateTim /// 候选行。 /// 投放解析入参。 /// 四维全部匹配返回 true,否则返回 false。 - private static bool IsScopeMatch(TenantGameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) + private static bool IsScopeMatch(GameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) { return IsDimensionMatch(row.Platform, query.Platform, GameDimensionConst.PlatformDefault) && IsDimensionMatch(row.Language, query.Language, GameDimensionConst.LanguageDefault) @@ -196,7 +196,7 @@ private static bool IsPackageMatch(string rowValue, IReadOnlyList? packa /// 候选行。 /// 投放解析入参。 /// 命中返回 true,否则返回 false。 - private static bool IsRolloutHit(TenantGameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) + private static bool IsRolloutHit(GameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) { if (query.Audience == FeatureSwitchAudience.Server) { @@ -216,7 +216,7 @@ private static bool IsRolloutHit(TenantGameAppFeatureSwitchEntity row, FeatureSw /// 同开关键的候选行(已通过作用域与灰度过滤)。 /// 投放解析入参,提供评分所需的作用域上下文。 /// 该开关键的投放投影。 - private static FeatureSwitchEffectiveItem SelectWinner(IGrouping group, FeatureSwitchDeliveryQuery query) + private static FeatureSwitchEffectiveItem SelectWinner(IGrouping group, FeatureSwitchDeliveryQuery query) { var winner = group.OrderByDescending(row => CalculateScore(row, query)) .ThenByDescending(row => row.Priority) @@ -231,7 +231,7 @@ private static FeatureSwitchEffectiveItem SelectWinner(IGrouping候选行。 /// 投放解析入参。 /// 作用域评分。 - private static int CalculateScore(TenantGameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) + private static int CalculateScore(GameAppFeatureSwitchEntity row, FeatureSwitchDeliveryQuery query) { var score = 0; @@ -265,7 +265,7 @@ private static int CalculateScore(TenantGameAppFeatureSwitchEntity row, FeatureS /// /// 有效候选行集合。 /// 小写 32 位 hex 版本号。 - private static string BuildVersion(IReadOnlyList effective) + private static string BuildVersion(IReadOnlyList effective) { var projection = effective.OrderBy(row => row.SwitchKey, StringComparer.Ordinal) .ThenBy(row => row.Id) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/GameAppFeatureSwitchService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/GameAppFeatureSwitchService.cs index fc1d305a..31b98498 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/GameAppFeatureSwitchService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/FeatureSwitch/GameAppFeatureSwitchService.cs @@ -1,8 +1,8 @@ using GameFrameX.Application.ClientDelivery.AppScope; using GameFrameX.Application.ClientDelivery.FeatureSwitch.Dto; using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.FeatureSwitch; namespace GameFrameX.Application.ClientDelivery.FeatureSwitch; @@ -12,17 +12,17 @@ namespace GameFrameX.Application.ClientDelivery.FeatureSwitch; /// Default 哨兵、同作用域组合不重复。 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppFeatureSwitchService : GenericCrudService +public class GameAppFeatureSwitchService : GenericCrudService { - private readonly SqlSugarRepository _packageRepository; + private readonly SqlSugarRepository _packageRepository; /// /// 初始化活动/功能开关管理服务。 /// /// 开关注册表仓储。 /// 分包仓储,供包名作用域校验使用。 - public GameAppFeatureSwitchService(SqlSugarRepository repository, - SqlSugarRepository packageRepository) : base(repository) + public GameAppFeatureSwitchService(SqlSugarRepository repository, + SqlSugarRepository packageRepository) : base(repository) { _packageRepository = packageRepository; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/Dto/GameAppAssetPackageResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/Dto/GameAppAssetPackageResponse.cs index 6537cd7c..c17ebd0e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/Dto/GameAppAssetPackageResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/Dto/GameAppAssetPackageResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.Resource; +using GameFrameX.Entity.Business.Game.Resource; namespace GameFrameX.Application.ClientDelivery.GameAppAssetPackage.Dto; /// /// 资源包输出参数 /// -public class GameAppAssetPackageResponse : IBasePageResponse +public class GameAppAssetPackageResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/GameAppAssetPackageService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/GameAppAssetPackageService.cs index 2d081dcf..6c2616fc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/GameAppAssetPackageService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackage/GameAppAssetPackageService.cs @@ -6,9 +6,9 @@ namespace GameFrameX.Application.ClientDelivery.GameAppAssetPackage; /// 资源包服务 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppAssetPackageService : GenericCrudSelectService +public class GameAppAssetPackageService : GenericCrudSelectService { - public GameAppAssetPackageService(SqlSugarRepository repository) : base(repository) + public GameAppAssetPackageService(SqlSugarRepository repository) : base(repository) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/Dto/GameAppAssetPackageVersionResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/Dto/GameAppAssetPackageVersionResponse.cs index 34a2c7ff..684c15f6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/Dto/GameAppAssetPackageVersionResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/Dto/GameAppAssetPackageVersionResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Application.ClientDelivery.GameAppAssetPackageVersion.Dto; /// /// 资源包版本输出参数 /// -public class GameAppAssetPackageVersionResponse : IBasePageResponse +public class GameAppAssetPackageVersionResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/GameAppAssetPackageVersionService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/GameAppAssetPackageVersionService.cs index 030dba4a..a1ba2189 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/GameAppAssetPackageVersionService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersion/GameAppAssetPackageVersionService.cs @@ -1,8 +1,8 @@ using GameFrameX.Application.ClientDelivery.AppScope; using GameFrameX.Application.ClientDelivery.GameAppAssetPackageVersion.Dto; using GameFrameX.Application.ClientDelivery.GameAppAssetPackageVersionHistory.Dto; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.Resource; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.Resource; namespace GameFrameX.Application.ClientDelivery.GameAppAssetPackageVersion; @@ -11,17 +11,17 @@ namespace GameFrameX.Application.ClientDelivery.GameAppAssetPackageVersion; /// 资源包版本服务 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppAssetPackageVersionService : GenericCrudService +public class GameAppAssetPackageVersionService : GenericCrudService { - protected readonly SqlSugarRepository RepositoryAssetPackageVersionHistory; - private readonly SqlSugarRepository _packageRepository; - private readonly SqlSugarRepository _assetPackageRepository; + protected readonly SqlSugarRepository RepositoryAssetPackageVersionHistory; + private readonly SqlSugarRepository _packageRepository; + private readonly SqlSugarRepository _assetPackageRepository; public GameAppAssetPackageVersionService( - SqlSugarRepository service, - SqlSugarRepository rep2, - SqlSugarRepository packageRepository, - SqlSugarRepository assetPackageRepository) : base(service) + SqlSugarRepository service, + SqlSugarRepository rep2, + SqlSugarRepository packageRepository, + SqlSugarRepository assetPackageRepository) : base(service) { RepositoryAssetPackageVersionHistory = rep2; _packageRepository = packageRepository; @@ -143,10 +143,10 @@ private async Task CheckAssetPackageVersionUniqueAsync(string? channel, string? /// /// 新增后自动插入版本历史记录 /// - protected override async Task OnAddedAsync(AddGameAppAssetPackageVersionRequest input, Entity.Tenant.Game.Release.TenantGameAppAssetPackageVersionEntity entity) + protected override async Task OnAddedAsync(AddGameAppAssetPackageVersionRequest input, Entity.Business.Game.Release.GameAppAssetPackageVersionEntity entity) { var historyInput = new AddGameAppAssetPackageVersionHistoryRequest(); - var historyEntity = historyInput.Adapt(); + var historyEntity = historyInput.Adapt(); historyEntity.CreatedTime = entity.CreatedTime; historyEntity.CreatedId = entity.CreatedId; historyEntity.CreatedName = entity.CreatedName; @@ -159,7 +159,7 @@ protected override async Task OnAddedAsync(AddGameAppAssetPackageVersionRequest /// /// 更新后自动插入版本历史记录(仅当版本号变化时) /// - protected override async Task OnUpdatedAsync(UpdateGameAppAssetPackageVersionRequest input, Entity.Tenant.Game.Release.TenantGameAppAssetPackageVersionEntity before, Entity.Tenant.Game.Release.TenantGameAppAssetPackageVersionEntity after) + protected override async Task OnUpdatedAsync(UpdateGameAppAssetPackageVersionRequest input, Entity.Business.Game.Release.GameAppAssetPackageVersionEntity before, Entity.Business.Game.Release.GameAppAssetPackageVersionEntity after) { if (input.ResourceVersion == before.ResourceVersion) { @@ -167,7 +167,7 @@ protected override async Task OnUpdatedAsync(UpdateGameAppAssetPackageVersionReq } var historyInput = new AddGameAppAssetPackageVersionHistoryRequest(); - var entity = historyInput.Adapt(); + var entity = historyInput.Adapt(); entity.CreatedTime = after.CreatedTime; entity.CreatedId = after.CreatedId; entity.CreatedName = after.CreatedName; @@ -212,7 +212,7 @@ public async Task ReturnAsync(GameAppAssetPackageVersionReturnByIdRequest input) } var historyInput = new AddGameAppAssetPackageVersionHistoryRequest(); - var entity = historyInput.Adapt(); + var entity = historyInput.Adapt(); entity.VersionId = input.Id; entity.CreatedId = repositoryAssetPackageVersionHistory.CreatedId; entity.CreatedName = repositoryAssetPackageVersionHistory.CreatedName; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/Dto/GameAppAssetPackageVersionHistoryResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/Dto/GameAppAssetPackageVersionHistoryResponse.cs index 199c65ef..1205ae5d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/Dto/GameAppAssetPackageVersionHistoryResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/Dto/GameAppAssetPackageVersionHistoryResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Application.ClientDelivery.GameAppAssetPackageVersionHistory.Dto; /// /// 资源包版本记录输出参数 /// -public class GameAppAssetPackageVersionHistoryResponse : IBasePageResponse +public class GameAppAssetPackageVersionHistoryResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/GameAppAssetPackageVersionHistoryService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/GameAppAssetPackageVersionHistoryService.cs index 6c9ccb1d..b61afa9d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/GameAppAssetPackageVersionHistoryService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppAssetPackageVersionHistory/GameAppAssetPackageVersionHistoryService.cs @@ -6,9 +6,9 @@ namespace GameFrameX.Application.ClientDelivery.GameAppAssetPackageVersionHistor /// 资源包版本记录服务 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppAssetPackageVersionHistoryService : GenericCrudService +public class GameAppAssetPackageVersionHistoryService : GenericCrudService { - public GameAppAssetPackageVersionHistoryService(SqlSugarRepository repository) : base(repository) + public GameAppAssetPackageVersionHistoryService(SqlSugarRepository repository) : base(repository) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/Dto/GameAppPackageResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/Dto/GameAppPackageResponse.cs index d78374e6..cc23c9aa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/Dto/GameAppPackageResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/Dto/GameAppPackageResponse.cs @@ -1,12 +1,12 @@ using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Application.ClientDelivery.GameAppPackage.Dto; /// /// 游戏应用分包输出参数 /// -public class GameAppPackageResponse : IBasePageResponse +public class GameAppPackageResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs index 05a62de9..372e8ede 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Application.ClientDelivery.GameAppPackage.Dto; using GameFrameX.Entity.Enum; using GameFrameX.Entity.Global; @@ -12,24 +12,24 @@ namespace GameFrameX.Application.ClientDelivery.GameAppPackage; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 101)] public class GameAppPackageService - : GenericCrudSelectService { private readonly SqlSugarRepository _globalPlatformRepository; private readonly SqlSugarRepository _globalChannelDefinitionRepository; - private readonly SqlSugarRepository _tenantChannelDefinitionRepository; + private readonly SqlSugarRepository _tenantChannelDefinitionRepository; public GameAppPackageService( - SqlSugarRepository repository, + SqlSugarRepository repository, SqlSugarRepository globalPlatformRepository, SqlSugarRepository globalChannelDefinitionRepository, - SqlSugarRepository tenantChannelDefinitionRepository) + SqlSugarRepository channelDefinitionRepository) : base(repository) { _globalPlatformRepository = globalPlatformRepository; _globalChannelDefinitionRepository = globalChannelDefinitionRepository; - _tenantChannelDefinitionRepository = tenantChannelDefinitionRepository; + _tenantChannelDefinitionRepository = channelDefinitionRepository; } protected override ISugarQueryable BuildPageQuery(PageGameAppPackageRequest input) @@ -114,7 +114,7 @@ public override async Task AddAsync(AddGameAppPackageReq await ValidateParentPackageAsync(input.ParentPackageId, input.PackageKind); var channel = await ValidatePackageAsync(input.PackageName, input.PlatformCode, input.ChannelId); - var entity = input.Adapt(); + var entity = input.Adapt(); NormalizePackageKind(entity); FillChannel(entity, channel); await FillSnapshotsAsync(entity); @@ -139,7 +139,7 @@ public override async Task UpdateAsync(UpdateGameAppPackageRequest input) await ValidateParentPackageAsync(input.ParentPackageId, input.PackageKind, input.Id); var channel = await ValidatePackageAsync(input.PackageName, input.PlatformCode, input.ChannelId, input.Id); - var entity = input.Adapt(); + var entity = input.Adapt(); NormalizePackageKind(entity); FillChannel(entity, channel); await FillSnapshotsAsync(entity); @@ -160,7 +160,7 @@ protected override async Task OnAddingAsync(AddGameAppPackageRequest input) await ValidatePackageAsync(input.PackageName, input.PlatformCode, input.ChannelId); } - protected override async Task OnAddedAsync(AddGameAppPackageRequest input, TenantGameAppPackageEntity entity) + protected override async Task OnAddedAsync(AddGameAppPackageRequest input, GameAppPackageEntity entity) { await FillSnapshotsAsync(entity); entity.IsEnabled = true; @@ -189,7 +189,7 @@ protected override async Task OnUpdatingAsync(UpdateGameAppPackageRequest input) await ValidatePackageAsync(input.PackageName, input.PlatformCode, input.ChannelId, input.Id); } - protected override async Task OnUpdatedAsync(UpdateGameAppPackageRequest input, TenantGameAppPackageEntity before, TenantGameAppPackageEntity after) + protected override async Task OnUpdatedAsync(UpdateGameAppPackageRequest input, GameAppPackageEntity before, GameAppPackageEntity after) { var entity = await Repository.GetFirstAsync(u => u.Id == input.Id); if (entity == null) @@ -348,10 +348,10 @@ internal static void EnsurePackageKindConsistency(long? parentPackageId, Package } /// - /// 规整 与 的一致性: + /// 规整 与 的一致性: /// 指定母包即视为子包,强制 (自动纠正 Master/Normal→Derived),避免运行时按子包语义回退时字段表达与实际关系冲突。 /// - internal static void NormalizePackageKind(TenantGameAppPackageEntity entity) + internal static void NormalizePackageKind(GameAppPackageEntity entity) { if (entity.ParentPackageId.HasValue) { @@ -359,7 +359,7 @@ internal static void NormalizePackageKind(TenantGameAppPackageEntity entity) } } - private async Task FillSnapshotsAsync(TenantGameAppPackageEntity entity) + private async Task FillSnapshotsAsync(GameAppPackageEntity entity) { var platform = await _globalPlatformRepository.GetFirstAsync(u => u.Name == entity.PlatformCode); entity.PlatformName = platform?.Name ?? entity.PlatformCode; @@ -402,7 +402,7 @@ private async Task FillSnapshotsAsync(TenantGameAppPackageEntity entity) .FirstAsync(u => u.Id == channelId); } - private static void FillChannel(TenantGameAppPackageEntity entity, GameFrameX.Entity.System.ChannelDefinition channel) + private static void FillChannel(GameAppPackageEntity entity, GameFrameX.Entity.System.ChannelDefinition channel) { entity.ChannelId = channel.Id; entity.ChannelCode = string.IsNullOrWhiteSpace(channel.Code) ? channel.Name : channel.Code; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/Dto/GameAppReleaseVersionResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/Dto/GameAppReleaseVersionResponse.cs index f88e7c8b..ba703ad4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/Dto/GameAppReleaseVersionResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/Dto/GameAppReleaseVersionResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Application.ClientDelivery.GameAppReleaseVersion.Dto; /// /// 游戏版本管理输出参数 /// -public class GameAppReleaseVersionResponse : IBasePageResponse +public class GameAppReleaseVersionResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/GameAppReleaseVersionService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/GameAppReleaseVersionService.cs index 314d16f5..f0bcd4a9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/GameAppReleaseVersionService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/GameAppReleaseVersionService.cs @@ -1,6 +1,6 @@ using GameFrameX.Application.ClientDelivery.AppScope; using GameFrameX.Application.ClientDelivery.GameAppReleaseVersion.Dto; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Application.ClientDelivery.GameAppReleaseVersion; @@ -8,11 +8,11 @@ namespace GameFrameX.Application.ClientDelivery.GameAppReleaseVersion; /// 游戏版本管理服务 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppReleaseVersionService : GenericCrudService +public class GameAppReleaseVersionService : GenericCrudService { - private readonly SqlSugarRepository _packageRepository; + private readonly SqlSugarRepository _packageRepository; - public GameAppReleaseVersionService(SqlSugarRepository repository, SqlSugarRepository packageRepository) : base(repository) + public GameAppReleaseVersionService(SqlSugarRepository repository, SqlSugarRepository packageRepository) : base(repository) { _packageRepository = packageRepository; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/Dto/GameAppRemoteConfigResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/Dto/GameAppRemoteConfigResponse.cs index d9b1a103..a6c844d7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/Dto/GameAppRemoteConfigResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/Dto/GameAppRemoteConfigResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; namespace GameFrameX.Application.ClientDelivery.GameAppRemoteConfig.Dto; /// /// 远程配置管理输出参数 /// -public class GameAppRemoteConfigResponse : IBasePageResponse +public class GameAppRemoteConfigResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/GameAppRemoteConfigService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/GameAppRemoteConfigService.cs index 573e542b..6b6306db 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/GameAppRemoteConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/GameAppRemoteConfigService.cs @@ -4,7 +4,7 @@ using GameFrameX.Application.GmCenter.LiveOps.Dispatch; using GameFrameX.Application.GmCenter.LiveOps.Dispatch.Dto; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Application.ClientDelivery.GameAppRemoteConfig; @@ -12,13 +12,13 @@ namespace GameFrameX.Application.ClientDelivery.GameAppRemoteConfig; /// 远程配置管理服务 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppRemoteConfigService : GenericCrudService +public class GameAppRemoteConfigService : GenericCrudService { - private readonly SqlSugarRepository _packageRepository; + private readonly SqlSugarRepository _packageRepository; private readonly IOnlineLiveOpsDispatchService _dispatchService; - public GameAppRemoteConfigService(SqlSugarRepository repository, - SqlSugarRepository packageRepository, + public GameAppRemoteConfigService(SqlSugarRepository repository, + SqlSugarRepository packageRepository, IOnlineLiveOpsDispatchService dispatchService) : base(repository) { _packageRepository = packageRepository; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/Dto/GameAppRemoteConfigKeyResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/Dto/GameAppRemoteConfigKeyResponse.cs index 215d9836..98dda76c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/Dto/GameAppRemoteConfigKeyResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/Dto/GameAppRemoteConfigKeyResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; namespace GameFrameX.Application.ClientDelivery.GameAppRemoteConfigKey.Dto; /// /// 远程配置内容键定义输出参数 /// -public class GameAppRemoteConfigKeyResponse : IBasePageResponse +public class GameAppRemoteConfigKeyResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/GameAppRemoteConfigKeyService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/GameAppRemoteConfigKeyService.cs index a311a225..4937aca6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/GameAppRemoteConfigKeyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigKey/GameAppRemoteConfigKeyService.cs @@ -6,11 +6,11 @@ namespace GameFrameX.Application.ClientDelivery.GameAppRemoteConfigKey; /// 远程配置内容键定义管理服务 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppRemoteConfigKeyService : GenericCrudService +public class GameAppRemoteConfigKeyService : GenericCrudService { private static readonly string[] AllowedValueTypes = { "string", "bool", "long", }; - public GameAppRemoteConfigKeyService(SqlSugarRepository repository) : base(repository) + public GameAppRemoteConfigKeyService(SqlSugarRepository repository) : base(repository) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/Dto/GameAppRemoteConfigModeResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/Dto/GameAppRemoteConfigModeResponse.cs index 70eb32a8..e87429e8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/Dto/GameAppRemoteConfigModeResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/Dto/GameAppRemoteConfigModeResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; namespace GameFrameX.Application.ClientDelivery.GameAppRemoteConfigMode.Dto; /// /// 远程配置模式定义输出参数 /// -public class GameAppRemoteConfigModeResponse : IBasePageResponse +public class GameAppRemoteConfigModeResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/GameAppRemoteConfigModeService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/GameAppRemoteConfigModeService.cs index aea0fd87..66c4a389 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/GameAppRemoteConfigModeService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/GameAppRemoteConfigModeService.cs @@ -6,9 +6,9 @@ namespace GameFrameX.Application.ClientDelivery.GameAppRemoteConfigMode; /// 远程配置模式定义管理服务 /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppRemoteConfigModeService : GenericCrudService +public class GameAppRemoteConfigModeService : GenericCrudService { - public GameAppRemoteConfigModeService(SqlSugarRepository repository) : base(repository) + public GameAppRemoteConfigModeService(SqlSugarRepository repository) : base(repository) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/Dto/GameAppServerConfigResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/Dto/GameAppServerConfigResponse.cs index 94703f42..3b89de8b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/Dto/GameAppServerConfigResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/Dto/GameAppServerConfigResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.ServerConfig; +using GameFrameX.Entity.Business.Game.ServerConfig; namespace GameFrameX.Application.ClientDelivery.GameAppServerConfig.Dto; /// /// 游戏运营配置管理输出参数 /// -public class GameAppServerConfigResponse : IBasePageResponse +public class GameAppServerConfigResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/GameAppServerConfigService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/GameAppServerConfigService.cs index d0e20da3..e040e17d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/GameAppServerConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppServerConfig/GameAppServerConfigService.cs @@ -8,9 +8,9 @@ namespace GameFrameX.Application.ClientDelivery.GameAppServerConfig; /// 游戏运营配置管理服务(登录 Config md5 差异下发内容源的运营维护面) /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] -public class GameAppServerConfigService : GenericCrudService +public class GameAppServerConfigService : GenericCrudService { - public GameAppServerConfigService(SqlSugarRepository repository) : base(repository) + public GameAppServerConfigService(SqlSugarRepository repository) : base(repository) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/Dto/GameAppVersionDefinitionPageResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/Dto/GameAppVersionDefinitionPageResponse.cs index 7e5f9da0..c2f2dd68 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/Dto/GameAppVersionDefinitionPageResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/Dto/GameAppVersionDefinitionPageResponse.cs @@ -1,11 +1,11 @@ -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Application.ClientDelivery.GameAppVersionDefinition.Dto; /// /// 版本管理输出参数 /// -public class GameAppVersionDefinitionPageResponse : IBasePageResponse +public class GameAppVersionDefinitionPageResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/GameAppVersionDefinitionService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/GameAppVersionDefinitionService.cs index 4b479072..1ff6fc21 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/GameAppVersionDefinitionService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/GameAppVersionDefinitionService.cs @@ -1,5 +1,5 @@ using GameFrameX.Application.ClientDelivery.GameAppVersionDefinition.Dto; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Application.ClientDelivery.GameAppVersionDefinition; @@ -8,12 +8,12 @@ namespace GameFrameX.Application.ClientDelivery.GameAppVersionDefinition; /// [ApiDescriptionSettings(ClientConst.GroupName, Order = 100)] public class GameAppVersionDefinitionService - : GenericCrudSelectService { public GameAppVersionDefinitionService( - SqlSugarRepository repository) + SqlSugarRepository repository) : base(repository) { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/Dto/GamePaymentConfigResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/Dto/GamePaymentConfigResponse.cs index b64b6924..6c0458d9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/Dto/GamePaymentConfigResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/Dto/GamePaymentConfigResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.GamePaymentConfig.Dto; /// /// 游戏支付配置输出参数 /// -public class GamePaymentConfigResponse : IBasePageResponse +public class GamePaymentConfigResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/GamePaymentConfigService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/GamePaymentConfigService.cs index 15b0dbb1..2e785b47 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/GamePaymentConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GamePaymentConfig/GamePaymentConfigService.cs @@ -1,8 +1,8 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Application.ClientDelivery.GamePaymentConfig.Dto; using GameFrameX.Payment.Abstract; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; #pragma warning disable CS8604, CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Trim()/.Value 实际安全 namespace GameFrameX.Application.ClientDelivery.GamePaymentConfig; @@ -12,16 +12,16 @@ namespace GameFrameX.Application.ClientDelivery.GamePaymentConfig; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GamePaymentConfigService - : GenericCrudService { - private readonly SqlSugarRepository _packageRepository; + private readonly SqlSugarRepository _packageRepository; private readonly IPaymentConfigSchemaProvider _schemaProvider; public GamePaymentConfigService( - SqlSugarRepository repository, - SqlSugarRepository packageRepository, + SqlSugarRepository repository, + SqlSugarRepository packageRepository, IPaymentConfigSchemaProvider schemaProvider) : base(repository) { @@ -54,7 +54,7 @@ public override async Task AddAsync(AddGamePaymentCon await ValidateScopeAsync(scope.PackageId); await CheckUniqueAsync(scope.PackageId, payChannel, input.IsSandbox); - var entity = input.Adapt(); + var entity = input.Adapt(); entity.PayChannel = payChannel; ApplyScope(entity, scope); entity.IsEnabled = true; @@ -156,8 +156,8 @@ public static PaymentConfigScope BuildScope(long? packageId) return new PaymentConfigScope(normalizedPackageId == 0 ? null : normalizedPackageId, normalizedPackageId); } - public static Entity.Tenant.Game.TenantGamePaymentConfigEntity? PickBestConfig( - IEnumerable configs, + public static Entity.Business.Game.GamePaymentConfigEntity? PickBestConfig( + IEnumerable configs, long? packageId) { var scope = BuildScope(packageId); @@ -188,7 +188,7 @@ private async Task ValidateScopeAsync(long? packageId) } } - private static void ApplyScope(Entity.Tenant.Game.TenantGamePaymentConfigEntity entity, PaymentConfigScope scope) + private static void ApplyScope(Entity.Business.Game.GamePaymentConfigEntity entity, PaymentConfigScope scope) { entity.PackageId = scope.PackageId; entity.PackageIdNormalized = scope.PackageIdNormalized; @@ -200,7 +200,7 @@ private static long NormalizeNullableId(long? id) return idValue > 0 ? idValue : 0; } - private static int GetScopePriority(Entity.Tenant.Game.TenantGamePaymentConfigEntity config, PaymentConfigScope scope) + private static int GetScopePriority(Entity.Business.Game.GamePaymentConfigEntity config, PaymentConfigScope scope) { if (scope.PackageIdNormalized > 0 && config.PackageIdNormalized == scope.PackageIdNormalized) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageTenantGameLoginTicketKeyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageGameLoginTicketKeyRequest.cs similarity index 70% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageTenantGameLoginTicketKeyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageGameLoginTicketKeyRequest.cs index 6c8a5358..c0385c88 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageTenantGameLoginTicketKeyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageGameLoginTicketKeyRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.ClientDelivery.LoginTicket.GameLoginTicketKey.D /// /// 租户 Game 登录票据签名密钥分页查询输入参数。 /// -public class PageTenantGameLoginTicketKeyRequest : BaseAppActivePageRequest +public class PageGameLoginTicketKeyRequest : BaseAppActivePageRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/GameLoginTicketKeyService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/GameLoginTicketKeyService.cs index 12044c31..e1ecd4e7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/GameLoginTicketKeyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/GameLoginTicketKeyService.cs @@ -1,8 +1,8 @@ using System.Security.Cryptography; using GameFrameX.Foundation.Logger; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Application.ClientDelivery.LoginTicket.GameLoginTicketKey.Dto; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.Service.User; #pragma warning disable CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Trim()/.Value 实际安全 @@ -14,11 +14,11 @@ namespace GameFrameX.Application.ClientDelivery.LoginTicket.GameLoginTicketKey; /// 作用域:主库。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 114)] -public class GameLoginTicketKeyService : BaseService +public class GameLoginTicketKeyService : BaseService { private readonly CurrentUserContext _currentUserContext; - public GameLoginTicketKeyService(SqlSugarRepository repository, CurrentUserContext currentUserContext) + public GameLoginTicketKeyService(SqlSugarRepository repository, CurrentUserContext currentUserContext) : base(repository) { _currentUserContext = currentUserContext; @@ -29,7 +29,7 @@ public GameLoginTicketKeyService(SqlSugarRepository [HttpPost("page")] [ApiDescriptionSettings(Name = "Page")] - public async Task> PageAsync(PageTenantGameLoginTicketKeyRequest input) + public async Task> PageAsync(PageGameLoginTicketKeyRequest input) { return await Repository.AsQueryable() .Where(u => u.IsDeleted == false) @@ -78,11 +78,11 @@ public async Task RotateAsync(GameLoginTicketKeyRotateRequest input) using (var rsa = RSA.Create(2048)) { - var entity = new TenantGameLoginTicketKeyEntity + var entity = new GameLoginTicketKeyEntity { Kid = $"admin-rotate-{TimerHelper.TimestampSecondsToDateTime(now, true):yyyyMMddHHmmss}-{Convert.ToHexString(RandomNumberGenerator.GetBytes(4)).ToLowerInvariant()}", Algorithm = "RS256", - PrivateKeyPem = TenantSecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem()) ?? string.Empty, + PrivateKeyPem = SecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem()) ?? string.Empty, PublicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(), NotBeforeTime = now, ExpireTime = input.ExpireTime, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddTenantObjectStorageConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddObjectStorageConfigRequest.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddTenantObjectStorageConfigRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddObjectStorageConfigRequest.cs index 9b997379..91eb0430 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddTenantObjectStorageConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddObjectStorageConfigRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.ObjectStorageConfig; /// /// 新增租户对象存储配置入参。 /// -public class AddTenantObjectStorageConfigRequest : BaseAddRequest +public class AddObjectStorageConfigRequest : BaseAddRequest { /// 存储提供商名称(local / aliyun / tencent-cos / qiniu)。 public string Provider { get; set; } = string.Empty; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs index 0f54754f..bf6ca560 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs @@ -2,9 +2,9 @@ using GameFrameX.Core.Const; using GameFrameX.Core.Extension.Const; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; -using GameFrameX.Core.Service.Tenant.ObjectStorage; -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Core.Service.Business; +using GameFrameX.Core.Service.Business.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; using GameFrameX.ObjectStorage.Abstract; #pragma warning disable CS8604, CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Trim()/.Value 实际安全 @@ -16,9 +16,9 @@ namespace GameFrameX.Application.ClientDelivery.ObjectStorageConfig; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 111)] public class ObjectStorageConfigService - : GenericCrudService + : GenericCrudService { /// /// 启用切换进程级串行锁。同租户“停用其它 + 写当前启用”必须串行,避免并发 AddAsync/UpdateAsync 产生多条启用配置。 @@ -30,7 +30,7 @@ public class ObjectStorageConfigService private readonly IObjectStorageAdapterFactory _adapterFactory; public ObjectStorageConfigService( - SqlSugarRepository repository, + SqlSugarRepository repository, IObjectStorageConfigSchemaProvider schemaProvider, IObjectStorageAdapterFactory adapterFactory) : base(repository) @@ -39,7 +39,7 @@ public ObjectStorageConfigService( _adapterFactory = adapterFactory; } - protected override ISugarQueryable BuildPageQuery(PageTenantObjectStorageConfigRequest input) + protected override ISugarQueryable BuildPageQuery(PageObjectStorageConfigRequest input) { var searchKey = input.SearchKey?.Trim(); var provider = NormalizeProvider(input.Provider); @@ -55,18 +55,18 @@ protected override ISugarQueryable BuildPageQuery(P /// /// 新增配置。校验 Provider 已注册、规范化 ConfigJson;若启用则在事务内停用同租户其它配置。 /// - public override async Task AddAsync(AddTenantObjectStorageConfigRequest input) + public override async Task AddAsync(AddObjectStorageConfigRequest input) { var provider = NormalizeProvider(input.Provider); EnsureProviderRegistered(provider); - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Provider = provider; #pragma warning disable CS8625 // 第 4 参数 existingConfigJson=null 表示新增场景无旧值,跨项目方法签名不可改 entity.ConfigJson = ObjectStorageConfigNormalizer.Normalize(_schemaProvider, provider, input.ConfigJson ?? string.Empty, null); #pragma warning restore CS8625 // 凭证静态加密收口(C370):规范化之后、落库之前对 schema 敏感字段加密 - entity.ConfigJson = TenantObjectStorageConfigCrypto.EncryptConfigJson(provider, entity.ConfigJson); + entity.ConfigJson = ObjectStorageConfigCrypto.EncryptConfigJson(provider, entity.ConfigJson); await ActiveConfigTransitionLock.WaitAsync(); try @@ -96,7 +96,7 @@ public override async Task AddAsync(AddTenantObject /// /// 更新配置。Provider 必须与既有记录一致;ConfigJson 规范化(****** 沿用旧值);启用时事务停用其它。 /// - public override async Task UpdateAsync(UpdateTenantObjectStorageConfigRequest input) + public override async Task UpdateAsync(UpdateObjectStorageConfigRequest input) { var entity = await Repository.GetFirstAsync(e => e.Id == input.Id); if (entity == null) @@ -118,7 +118,7 @@ public override async Task UpdateAsync(UpdateTenantObjectStorageConfigRequest in entity.Remark = input.Remark; entity.ConfigJson = ObjectStorageConfigNormalizer.Normalize(_schemaProvider, entity.Provider, input.ConfigJson ?? string.Empty, entity.ConfigJson); // 凭证静态加密收口(C370):Normalize 的 ****** 保留语义从旧值(密文)取回的仍是密文,Encrypt 幂等跳过;新明文字段在此加密 - entity.ConfigJson = TenantObjectStorageConfigCrypto.EncryptConfigJson(entity.Provider, entity.ConfigJson); + entity.ConfigJson = ObjectStorageConfigCrypto.EncryptConfigJson(entity.Provider, entity.ConfigJson); entity.RowVersion = input.RowVersion; await ActiveConfigTransitionLock.WaitAsync(); @@ -161,7 +161,7 @@ await Repository.AsUpdateable(entity) /// [HttpPost(CrudActionRoutes.Page)] [ApiDescriptionSettings(Name = "Page")] - public override async Task> PageAsync(PageTenantObjectStorageConfigRequest input) + public override async Task> PageAsync(PageObjectStorageConfigRequest input) { var result = await base.PageAsync(input); foreach (var item in result.Items) @@ -228,14 +228,14 @@ public async Task TestConnectionAsync([FromQuery] BaseIdRequest input) throw BusinessError.Oh("不支持的存储提供商: " + entity.Provider); } - var context = _adapterFactory.BuildContext(entity.Provider, TenantObjectStorageConfigCrypto.DecryptConfigJson(entity.Provider, entity.ConfigJson), entity.PathTemplate); + var context = _adapterFactory.BuildContext(entity.Provider, ObjectStorageConfigCrypto.DecryptConfigJson(entity.Provider, entity.ConfigJson), entity.PathTemplate); return await adapter.TestConnectionAsync(context, default); } private async Task DeactivateOthersAsync(long currentId) { await Repository.AsUpdateable() - .SetColumns(e => new TenantObjectStorageConfigEntity { IsEnabled = false, }) + .SetColumns(e => new ObjectStorageConfigEntity { IsEnabled = false, }) .Where(e => e.IsEnabled == true && e.Id != currentId) .ExecuteCommandAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageTenantObjectStorageConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageObjectStorageConfigRequest.cs similarity index 83% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageTenantObjectStorageConfigRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageObjectStorageConfigRequest.cs index 5139ad13..219c54f3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageTenantObjectStorageConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageObjectStorageConfigRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.ObjectStorageConfig; /// /// 租户对象存储配置分页查询入参。 /// -public class PageTenantObjectStorageConfigRequest : BasePageRequest +public class PageObjectStorageConfigRequest : BasePageRequest { /// 按提供商过滤。 public string? Provider { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateTenantObjectStorageConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateObjectStorageConfigRequest.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateTenantObjectStorageConfigRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateObjectStorageConfigRequest.cs index 3e317478..244ac1ef 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateTenantObjectStorageConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateObjectStorageConfigRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ClientDelivery.ObjectStorageConfig; /// /// 更新租户对象存储配置入参。Provider 必须与既有记录一致。 /// -public class UpdateTenantObjectStorageConfigRequest : BaseUpdateRequest +public class UpdateObjectStorageConfigRequest : BaseUpdateRequest { /// 存储提供商名称(必须等于既有记录的 Provider)。 public string Provider { get; set; } = string.Empty; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/AppSignatureKeyService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/AppSignatureKeyService.cs index 9bd5e933..7baf12c7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/AppSignatureKeyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/AppSignatureKeyService.cs @@ -1,8 +1,8 @@ using System.Security.Cryptography; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Application.ClientDelivery.Security.AppSignatureKey.Dto; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; #pragma warning disable CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Value 实际安全 namespace GameFrameX.Application.ClientDelivery.Security.AppSignatureKey; @@ -11,12 +11,12 @@ namespace GameFrameX.Application.ClientDelivery.Security.AppSignatureKey; /// App 传输签名密钥环管理服务(change C2 sig-keyring-server)。 /// 密钥明文仅服务端随机生成(不接受外部提交,避免弱密钥入环),仅 AddAsync/RotateAsync 响应一次性回显; /// 列表/详情一律脱敏 ******;实体禁删(历史 key 是在途请求与多版本客户端的验签依据),退场走 DisableAsync 或租约到期。 -/// 作用域:主库。路由前缀 /api/tenantAppSignatureKeyEntity(动态路由规则:去 Service 后缀 + lowerCamelCase)。 +/// 作用域:主库。路由前缀 /api/appSignatureKeyEntity(动态路由规则:去 Service 后缀 + lowerCamelCase)。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 114)] -public class AppSignatureKeyService : BaseService +public class AppSignatureKeyService : BaseService { - public AppSignatureKeyService(SqlSugarRepository repository) + public AppSignatureKeyService(SqlSugarRepository repository) : base(repository) { } @@ -26,7 +26,7 @@ public AppSignatureKeyService(SqlSugarRepository re /// [HttpPost("page")] [ApiDescriptionSettings(Name = "Page")] - public async Task> PageAsync(PageTenantAppSignatureKeyRequest input) + public async Task> PageAsync(PageAppSignatureKeyRequest input) { var page = await Repository.AsQueryable() .Where(u => u.IsDeleted == false) @@ -56,10 +56,10 @@ public async Task AddAsync(AppSignatureKeyAddRequ ValidateLease(notBefore, input.ExpireTime, now); var plainSecret = GenerateSecret(); - var entity = new TenantAppSignatureKeyEntity + var entity = new AppSignatureKeyEntity { Kid = GenerateKid(now), - Secret = TenantSecretCrypto.Encrypt(plainSecret) ?? string.Empty, + Secret = SecretCrypto.Encrypt(plainSecret) ?? string.Empty, NotBeforeTime = notBefore, ExpireTime = input.ExpireTime, IsEnabled = true, @@ -87,10 +87,10 @@ public async Task RotateAsync(AppSignatureKeyRota } var plainSecret = GenerateSecret(); - var entity = new TenantAppSignatureKeyEntity + var entity = new AppSignatureKeyEntity { Kid = GenerateKid(now), - Secret = TenantSecretCrypto.Encrypt(plainSecret) ?? string.Empty, + Secret = SecretCrypto.Encrypt(plainSecret) ?? string.Empty, NotBeforeTime = now, ExpireTime = null, IsEnabled = true, @@ -231,7 +231,7 @@ private static string GenerateSecret() /// /// 一次性回显输出:库内密文(C371),响应携带生成时明文。 /// - private static AppSignatureKeyRevealResponse ToRevealOutput(TenantAppSignatureKeyEntity entity, string plainSecret) + private static AppSignatureKeyRevealResponse ToRevealOutput(AppSignatureKeyEntity entity, string plainSecret) { return new AppSignatureKeyRevealResponse { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/Dto/PageTenantAppSignatureKeyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/Dto/PageAppSignatureKeyRequest.cs similarity index 69% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/Dto/PageTenantAppSignatureKeyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/Dto/PageAppSignatureKeyRequest.cs index 1e13437a..229417a6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/Dto/PageTenantAppSignatureKeyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/Dto/PageAppSignatureKeyRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.ClientDelivery.Security.AppSignatureKey.Dto; /// /// App 传输签名密钥分页查询输入参数。 /// -public class PageTenantAppSignatureKeyRequest : BaseAppActivePageRequest +public class PageAppSignatureKeyRequest : BaseAppActivePageRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/Dto/PageTenantSessionKeyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/Dto/PageSessionKeyRequest.cs similarity index 69% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/Dto/PageTenantSessionKeyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/Dto/PageSessionKeyRequest.cs index 5c93a1e7..1d5dea9e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/Dto/PageTenantSessionKeyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/Dto/PageSessionKeyRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.ClientDelivery.Security.SessionKey.Dto; /// /// App 会话密钥分页查询输入参数。 /// -public class PageTenantSessionKeyRequest : BaseAppActivePageRequest +public class PageSessionKeyRequest : BaseAppActivePageRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/SessionKeyService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/SessionKeyService.cs index ccd0a7c0..ea22c61d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/SessionKeyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/Security/SessionKey/SessionKeyService.cs @@ -2,7 +2,7 @@ using GameFrameX.Application.ClientDelivery.Security.SessionKey.Dto; using GameFrameX.Core.Service.Base; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; #pragma warning disable CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Value 实际安全 namespace GameFrameX.Application.ClientDelivery.Security.SessionKey; @@ -11,12 +11,12 @@ namespace GameFrameX.Application.ClientDelivery.Security.SessionKey; /// App 会话密钥环管理服务(change C5 server-envelope-middleware;C7 登录自动签发见 Client.Api 的 ClientApiSessionKeyIssuer)。 /// 密钥明文仅服务端随机生成(不接受外部提交,避免弱密钥入环),仅 AddAsync/RotateAsync 响应一次性回显; /// 列表/详情一律脱敏 ******;实体禁删(历史 key 是在途加密信封的解密依据),退场走 DisableAsync 或租约到期。 -/// 作用域:主库。路由前缀 /api/tenantSessionKeyEntity。 +/// 作用域:主库。路由前缀 /api/sessionKeyEntity。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 114)] -public class SessionKeyService : BaseService +public class SessionKeyService : BaseService { - public SessionKeyService(SqlSugarRepository repository) + public SessionKeyService(SqlSugarRepository repository) : base(repository) { } @@ -26,7 +26,7 @@ public SessionKeyService(SqlSugarRepository repository) /// [HttpPost(CrudActionRoutes.Page)] [ApiDescriptionSettings(Name = "Page")] - public async Task> PageAsync(PageTenantSessionKeyRequest input) + public async Task> PageAsync(PageSessionKeyRequest input) { var page = await Repository.AsQueryable() .Where(u => u.IsDeleted == false) @@ -56,10 +56,10 @@ public async Task AddAsync(SessionKeyAddRequest input) ValidateLease(notBefore, input.ExpireTime, now); var plainSecret = GenerateSecret(); - var entity = new TenantSessionKeyEntity + var entity = new SessionKeyEntity { Kid = GenerateKid(now), - Secret = TenantSecretCrypto.Encrypt(plainSecret) ?? string.Empty, + Secret = SecretCrypto.Encrypt(plainSecret) ?? string.Empty, NotBeforeTime = notBefore, ExpireTime = input.ExpireTime, IsEnabled = true, @@ -108,10 +108,10 @@ public async Task RotateAsync(SessionKeyRotateRequest } var plainSecret = GenerateSecret(); - var entity = new TenantSessionKeyEntity + var entity = new SessionKeyEntity { Kid = GenerateKid(now), - Secret = TenantSecretCrypto.Encrypt(plainSecret) ?? string.Empty, + Secret = SecretCrypto.Encrypt(plainSecret) ?? string.Empty, NotBeforeTime = now, ExpireTime = null, IsEnabled = true, @@ -254,7 +254,7 @@ public static string GenerateSecret() /// /// 一次性回显输出:库内密文(C371),响应携带生成时明文。 /// - private static SessionKeyRevealResponse ToRevealOutput(TenantSessionKeyEntity entity, string plainSecret) + private static SessionKeyRevealResponse ToRevealOutput(SessionKeyEntity entity, string plainSecret) { return new SessionKeyRevealResponse { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/AddTenantGameCommodityEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/AddGameCommodityEntityRequest.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/AddTenantGameCommodityEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/AddGameCommodityEntityRequest.cs index e758b68f..15ed8163 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/AddTenantGameCommodityEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/AddGameCommodityEntityRequest.cs @@ -6,10 +6,10 @@ namespace GameFrameX.Application.CommerceCenter.GameCommodity.Dto; /// 游戏商品交易增加输入参数 /// // C391(GFX-923 / Api#291):AddRequest 继承空基类 BaseAddRequest,不携带主键 Id(对齐 -// AddTenantGameGoodsCatalogueEntityRequest 的既定修正注释)。此前 Id:long 带 [Required] 属新增语义错误。 +// AddGameGoodsCatalogueEntityRequest 的既定修正注释)。此前 Id:long 带 [Required] 属新增语义错误。 // 契约:CategoryId 统一 long(Id 后缀契约兼容数字/字符串提交);Number 为数量、保持 long, // 前端 TextField 提交 JS string,加 AllowReadingFromString 宽容读取,防整个 body 反序列化失败 → input null → NRE。 -public class AddTenantGameCommodityEntityRequest : BaseAddRequest +public class AddGameCommodityEntityRequest : BaseAddRequest { /// /// 状态 @@ -18,7 +18,7 @@ public class AddTenantGameCommodityEntityRequest : BaseAddRequest public string Status { get; set; } = null!; /// - /// 类别Id。引用 TenantGameGoodsCatalogueEntity.Id;Id 后缀契约兼容数字/字符串提交。 + /// 类别Id。引用 GameGoodsCatalogueEntity.Id;Id 后缀契约兼容数字/字符串提交。 /// [Required(ErrorMessage = "类别不能为空")] public long CategoryId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/GameCommodityResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/GameCommodityResponse.cs index 74321e7f..372fe06b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/GameCommodityResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/GameCommodityResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameCommodity.Dto; /// /// 游戏商品交易输出参数 /// -public class GameCommodityResponse : IBasePageResponse +public class GameCommodityResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/PageTenantGameCommodityEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/PageGameCommodityEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/PageTenantGameCommodityEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/PageGameCommodityEntityRequest.cs index 445befa8..fdb4436d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/PageTenantGameCommodityEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/PageGameCommodityEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.CommerceCenter.GameCommodity.Dto; /// /// 游戏商品交易分页查询输入参数 /// -public class PageTenantGameCommodityEntityRequest : BasePageRequest +public class PageGameCommodityEntityRequest : BasePageRequest { /// /// 状态 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/UpdateTenantGameCommodityEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/UpdateGameCommodityEntityRequest.cs similarity index 87% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/UpdateTenantGameCommodityEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/UpdateGameCommodityEntityRequest.cs index edd3c88a..6031c6ae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/UpdateTenantGameCommodityEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/Dto/UpdateGameCommodityEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameCommodity.Dto; /// /// 游戏商品交易更新输入参数 /// -public class UpdateTenantGameCommodityEntityRequest : BaseUpdateRequest +public class UpdateGameCommodityEntityRequest : BaseUpdateRequest { /// /// 创建者姓名 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/GameCommodityService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/GameCommodityService.cs index 13de7a53..41fb9969 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/GameCommodityService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameCommodity/GameCommodityService.cs @@ -8,11 +8,11 @@ namespace GameFrameX.Application.CommerceCenter.GameCommodity; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameCommodityService - : GenericCrudService + : GenericCrudService { - public GameCommodityService(SqlSugarRepository repository) + public GameCommodityService(SqlSugarRepository repository) : base(repository) { } @@ -20,7 +20,7 @@ public GameCommodityService(SqlSugarRepository /// 更新前校验记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameCommodityEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameCommodityEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -29,7 +29,7 @@ protected override async Task OnUpdatingAsync(UpdateTenantGameCommodityEntityReq } } - protected override ISugarQueryable BuildPageQuery(PageTenantGameCommodityEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameCommodityEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/AddTenantGameGoodsEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/AddGameGoodsEntityRequest.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/AddTenantGameGoodsEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/AddGameGoodsEntityRequest.cs index 55c604f2..94702ea4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/AddTenantGameGoodsEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/AddGameGoodsEntityRequest.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoods.Dto; // AddAsync 必须继承 BaseAddRequest(空基类),不应携带主键/版本号。 // 此前继承 GameGoodsBaseRequest(其又继承 BaseUpdateRequest),会把 [Required] Id/Version 带入 AddAsync 校验, // 导致新增报 {"Version":["版本号不能为空"]}。业务字段在此直接声明,与 AddGameAppRequest 约定一致。 -public class AddTenantGameGoodsEntityRequest : BaseAddRequest +public class AddGameGoodsEntityRequest : BaseAddRequest { /// /// 配置ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/GameGoodsResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/GameGoodsResponse.cs index b238c6fb..c0370491 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/GameGoodsResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/GameGoodsResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoods.Dto; /// /// 游戏资源输出参数 /// -public class GameGoodsResponse : IBasePageResponse +public class GameGoodsResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/PageTenantGameGoodsEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/PageGameGoodsEntityRequest.cs similarity index 83% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/PageTenantGameGoodsEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/PageGameGoodsEntityRequest.cs index e74f03a4..2c53f6ea 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/PageTenantGameGoodsEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/PageGameGoodsEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoods.Dto; /// /// 游戏资源分页查询输入参数 /// -public class PageTenantGameGoodsEntityRequest : BasePageRequest +public class PageGameGoodsEntityRequest : BasePageRequest { /// /// 配置ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/UpdateTenantGameGoodsEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/UpdateGameGoodsEntityRequest.cs similarity index 74% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/UpdateTenantGameGoodsEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/UpdateGameGoodsEntityRequest.cs index a25c0814..c30cf34b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/UpdateTenantGameGoodsEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/Dto/UpdateGameGoodsEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoods.Dto; /// /// 游戏资源更新输入参数 /// -public class UpdateTenantGameGoodsEntityRequest : GameGoodsBaseRequest +public class UpdateGameGoodsEntityRequest : GameGoodsBaseRequest { // Id, ClassifyId, Name, Description 已从 GameGoodsBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/GameGoodsService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/GameGoodsService.cs index 2700b0cd..fdf95acc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/GameGoodsService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoods/GameGoodsService.cs @@ -8,16 +8,16 @@ namespace GameFrameX.Application.CommerceCenter.GameGoods; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameGoodsService - : GenericCrudSelectService + : GenericCrudSelectService { - public GameGoodsService(SqlSugarRepository repository) + public GameGoodsService(SqlSugarRepository repository) : base(repository) { } - protected override async Task OnAddingAsync(AddTenantGameGoodsEntityRequest input) + protected override async Task OnAddingAsync(AddGameGoodsEntityRequest input) { var exists = await Repository.IsAnyAsync(u => u.ConfigId == input.ConfigId); if (exists) @@ -29,7 +29,7 @@ protected override async Task OnAddingAsync(AddTenantGameGoodsEntityRequest inpu /// /// 更新前校验记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameGoodsEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameGoodsEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -38,7 +38,7 @@ protected override async Task OnUpdatingAsync(UpdateTenantGameGoodsEntityRequest } } - protected override ISugarQueryable BuildPageQuery(PageTenantGameGoodsEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameGoodsEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => @@ -58,7 +58,7 @@ public override async Task> SelectStringAsync var query = await Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => u.Name.Contains(input.SearchKey.Trim())) - .LeftJoin((g, c) => g.ClassifyId == c.Id) + .LeftJoin((g, c) => g.ClassifyId == c.Id) .Select((g, c) => new GameGoodsSelectPageStringResponse { Id = g.Id.ToString(), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/AddTenantGameGoodsCatalogueEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/AddGameGoodsCatalogueEntityRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/AddTenantGameGoodsCatalogueEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/AddGameGoodsCatalogueEntityRequest.cs index 8d9afc17..eb658ffc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/AddTenantGameGoodsCatalogueEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/AddGameGoodsCatalogueEntityRequest.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoodsCatalogue.Dto; // AddAsync 必须继承 BaseAddRequest(空基类),不应携带主键/版本号。 // 此前继承 GameGoodsCatalogueBaseRequest(其又继承 BaseUpdateRequest),会把 [Required] Id/Version 带入 AddAsync 校验, // 导致新增报 {"Version":["版本号不能为空"]}。业务字段在此直接声明,与 AddGameAppRequest 约定一致。 -public class AddTenantGameGoodsCatalogueEntityRequest : BaseAddRequest +public class AddGameGoodsCatalogueEntityRequest : BaseAddRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/GameGoodsCatalogueResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/GameGoodsCatalogueResponse.cs index a1403062..457ee21b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/GameGoodsCatalogueResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/GameGoodsCatalogueResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoodsCatalogue.Dto; /// /// 游戏道具分类输出参数 /// -public class GameGoodsCatalogueResponse : IBasePageResponse +public class GameGoodsCatalogueResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/PageTenantGameGoodsCatalogueEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/PageGameGoodsCatalogueEntityRequest.cs similarity index 83% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/PageTenantGameGoodsCatalogueEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/PageGameGoodsCatalogueEntityRequest.cs index aeb29ec3..84314fdc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/PageTenantGameGoodsCatalogueEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/PageGameGoodsCatalogueEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoodsCatalogue.Dto; /// /// 游戏道具分类分页查询输入参数 /// -public class PageTenantGameGoodsCatalogueEntityRequest : BasePageRequest +public class PageGameGoodsCatalogueEntityRequest : BasePageRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/UpdateTenantGameGoodsCatalogueEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/UpdateGameGoodsCatalogueEntityRequest.cs similarity index 71% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/UpdateTenantGameGoodsCatalogueEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/UpdateGameGoodsCatalogueEntityRequest.cs index 81798763..9813563e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/UpdateTenantGameGoodsCatalogueEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/Dto/UpdateGameGoodsCatalogueEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameGoodsCatalogue.Dto; /// /// 游戏道具分类更新输入参数 /// -public class UpdateTenantGameGoodsCatalogueEntityRequest : GameGoodsCatalogueBaseRequest +public class UpdateGameGoodsCatalogueEntityRequest : GameGoodsCatalogueBaseRequest { // Id 和所有公共字段已从 GameGoodsCatalogueBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/GameGoodsCatalogueService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/GameGoodsCatalogueService.cs index 84f71f33..4b8c3c49 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/GameGoodsCatalogueService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameGoodsCatalogue/GameGoodsCatalogueService.cs @@ -8,21 +8,21 @@ namespace GameFrameX.Application.CommerceCenter.GameGoodsCatalogue; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameGoodsCatalogueService - : GenericCrudSelectService + : GenericCrudSelectService { - public GameGoodsCatalogueService(SqlSugarRepository repository) + public GameGoodsCatalogueService(SqlSugarRepository repository) : base(repository) { } - protected override async Task OnAddingAsync(AddTenantGameGoodsCatalogueEntityRequest input) + protected override async Task OnAddingAsync(AddGameGoodsCatalogueEntityRequest input) { await CheckNameUniqueAsync(input.Name); } - protected override async Task OnUpdatingAsync(UpdateTenantGameGoodsCatalogueEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameGoodsCatalogueEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -33,7 +33,7 @@ protected override async Task OnUpdatingAsync(UpdateTenantGameGoodsCatalogueEnti await CheckNameUniqueAsync(input.Name, input.Id); } - protected override ISugarQueryable BuildPageQuery(PageTenantGameGoodsCatalogueEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameGoodsCatalogueEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/AddTenantGameOrderEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/AddGameOrderEntityRequest.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/AddTenantGameOrderEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/AddGameOrderEntityRequest.cs index efb335e9..027121d4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/AddTenantGameOrderEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/AddGameOrderEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 游戏支付订单增加输入参数 /// -public class AddTenantGameOrderEntityRequest : BaseAddRequest +public class AddGameOrderEntityRequest : BaseAddRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/GameOrderResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/GameOrderResponse.cs index bf530b8c..fd9a51a0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/GameOrderResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/GameOrderResponse.cs @@ -1,11 +1,11 @@ using GameFrameX.Core.BaseInputOutput; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Application.CommerceCenter.GameOrder.Dto; /// /// 游戏支付订单输出参数 /// -public class GameOrderResponse : TenantGameOrderEntity, IBasePageResponse +public class GameOrderResponse : GameOrderEntity, IBasePageResponse { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/PageTenantGameOrderEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/PageGameOrderEntityRequest.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/PageTenantGameOrderEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/PageGameOrderEntityRequest.cs index 0d362e4f..fe8eb413 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/PageTenantGameOrderEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/PageGameOrderEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.CommerceCenter.GameOrder.Dto; /// /// 游戏支付订单分页查询输入参数 /// -public class PageTenantGameOrderEntityRequest : BaseAreaPageRequest +public class PageGameOrderEntityRequest : BaseAreaPageRequest { /// /// 订单状态 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/UpdateTenantGameOrderEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/UpdateGameOrderEntityRequest.cs similarity index 72% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/UpdateTenantGameOrderEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/UpdateGameOrderEntityRequest.cs index 73c6430a..375c53ab 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/UpdateTenantGameOrderEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/Dto/UpdateGameOrderEntityRequest.cs @@ -5,6 +5,6 @@ namespace GameFrameX.Application.CommerceCenter.GameOrder.Dto; /// /// 游戏支付订单更新输入参数 /// -public class UpdateTenantGameOrderEntityRequest : BaseUpdateRequest +public class UpdateGameOrderEntityRequest : BaseUpdateRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/FulfillmentLedgerIdempotencyStore.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/FulfillmentLedgerIdempotencyStore.cs index 1aa5649a..ac1d35ab 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/FulfillmentLedgerIdempotencyStore.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/FulfillmentLedgerIdempotencyStore.cs @@ -1,5 +1,5 @@ using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Idempotency; using GameFrameX.Foundation.Utility; using SqlSugar; @@ -49,14 +49,14 @@ public sealed class FulfillmentLedgerIdempotencyStore : IIdempotencyStore /// /// 占位模板:携带订单快照全字段(Type / ItemsJson / OperatorId / 审计列),占位成功即账本行落库。 /// - private readonly TenantGameOrderFulfillmentEntity _ledgerTemplate; + private readonly GameOrderFulfillmentEntity _ledgerTemplate; /// /// 初始化存储。 /// /// 租户路由的数据库客户端(与发货服务同源)。 /// 占位模板(订单快照字段已就绪,IdempotencyKey 以占位记录为准覆盖)。 - public FulfillmentLedgerIdempotencyStore(ISqlSugarClient db, TenantGameOrderFulfillmentEntity ledgerTemplate) + public FulfillmentLedgerIdempotencyStore(ISqlSugarClient db, GameOrderFulfillmentEntity ledgerTemplate) { _db = db; _ledgerTemplate = ledgerTemplate; @@ -92,7 +92,7 @@ public async Task TryBeginProcessingAsync(IdempotencyRecord newRecord, Can catch (Exception) { // 并发同键由账本唯一索引仲裁:输家重读既有行按状态判定;重读无行 = 非冲突异常,原样上抛 - var existing = await _db.Queryable() + var existing = await _db.Queryable() .FirstAsync(u => u.IdempotencyKey == newRecord.IdempotencyKey); if (existing == null) { @@ -106,7 +106,7 @@ public async Task TryBeginProcessingAsync(IdempotencyRecord newRecord, Can } // 法定覆盖:存量 Failed 允许重试复用同一行——条件更新(仅 Failed 可翻回 Pending)保证并发重试恰一 - var rows = await _db.Updateable() + var rows = await _db.Updateable() .SetColumns(u => u.Status == FulfillmentStatusEnum.Pending) .SetColumns(u => u.FailureReason == null) .SetColumns(u => u.ItemsJson == _ledgerTemplate.ItemsJson) @@ -129,7 +129,7 @@ public async Task CompleteAsync(IdempotencyCompletionRequest request, Cancellati } // 落定成功:仅 Pending 可翻 Success(退款作废等业务终态由服务先行落定,此处做存在性校验) - var rows = await _db.Updateable() + var rows = await _db.Updateable() .SetColumns(u => u.Status == FulfillmentStatusEnum.Success) .SetColumns(u => u.FailureReason == null) .Where(u => u.IdempotencyKey == request.Identifier.IdempotencyKey && u.Status == FulfillmentStatusEnum.Pending) @@ -149,7 +149,7 @@ public async Task FailAsync(IdempotencyFailureRequest request, CancellationToken } // 落定失败:仅 Pending 可翻 Failed;失败原因(业务事实)由服务先行写入 - var rows = await _db.Updateable() + var rows = await _db.Updateable() .SetColumns(u => u.Status == FulfillmentStatusEnum.Failed) .Where(u => u.IdempotencyKey == request.Identifier.IdempotencyKey && u.Status == FulfillmentStatusEnum.Pending) .ExecuteCommandAsync(); @@ -167,7 +167,7 @@ public async Task FailAsync(IdempotencyFailureRequest request, CancellationToken throw new ArgumentNullException(nameof(identifier)); } - var entity = await _db.Queryable() + var entity = await _db.Queryable() .FirstAsync(u => u.IdempotencyKey == identifier.IdempotencyKey); if (entity == null) { @@ -194,7 +194,7 @@ public Task RemoveExpiredRecordsAsync(ExpiredRecordRemovalRequest request, private async Task EnsureRecordExistsAsync(IdempotencyRecordIdentifier identifier) { - var exists = await _db.Queryable() + var exists = await _db.Queryable() .AnyAsync(u => u.IdempotencyKey == identifier.IdempotencyKey); if (!exists) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderService.cs index 679d105d..daad460a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderService.cs @@ -9,12 +9,12 @@ namespace GameFrameX.Application.CommerceCenter.GameOrder; /// 游戏支付订单服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameOrderService : GenericCrudService +public class GameOrderService : GenericCrudService { private readonly GameOrderShipService _shipService; private readonly CurrentUserContext _currentUserContext; - public GameOrderService(SqlSugarRepository repository, GameOrderShipService shipService, CurrentUserContext currentUserContext) : base(repository) + public GameOrderService(SqlSugarRepository repository, GameOrderShipService shipService, CurrentUserContext currentUserContext) : base(repository) { _shipService = shipService; _currentUserContext = currentUserContext; @@ -23,12 +23,12 @@ public GameOrderService(SqlSugarRepository /// 订单由可信客户端下单和支付回调链路产生,禁止管理后台直接创建。 /// - protected override Task OnAddingAsync(AddTenantGameOrderEntityRequest input) + protected override Task OnAddingAsync(AddGameOrderEntityRequest input) { throw new Exception("游戏订单由客户端下单链路产生,不支持通过管理后台直接创建"); } - protected override ISugarQueryable BuildPageQuery(PageTenantGameOrderEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameOrderEntityRequest input) { return Repository.AsQueryable() .WhereIF(input.Status.HasValue, u => u.Status == input.Status) @@ -53,7 +53,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenantG /// [HttpPost] [ApiDescriptionSettings(Name = "Summary")] - public async Task SummaryAsync(PageTenantGameOrderEntityRequest input) + public async Task SummaryAsync(PageGameOrderEntityRequest input) { var baseQuery = Repository.AsQueryable() .WhereIF(input.Status.HasValue, u => u.Status == input.Status) @@ -117,7 +117,7 @@ public async Task SummaryAsync(PageTenantGameOrderEnti /// [HttpPost] [ApiDescriptionSettings(Name = "Send")] - public async Task SendAsync(AddTenantGameOrderEntityRequest input) + public async Task SendAsync(AddGameOrderEntityRequest input) { await _shipService.CompensateAsync(input.Id, "人工补发", _currentUserContext.UserId); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderShipService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderShipService.cs index 04d375cc..e8d64f3b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderShipService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrder/GameOrderShipService.cs @@ -239,7 +239,7 @@ public async Task> CompensateAsync( /// 创建发货链路的协调器 + 账本表即 Store(占位模板携带订单快照全字段)。 /// private FulfillmentIdempotencyContext CreateFulfillmentCoordinator( - Entity.Tenant.Game.TenantGameOrderEntity order, FulfillmentTypeEnum type, long operatorId, string idempotencyScope) + Entity.Business.Game.GameOrderEntity order, FulfillmentTypeEnum type, long operatorId, string idempotencyScope) { var idempotencyKey = BuildFulfillmentIdempotencyKey(type, order, operatorId); var template = BuildFulfillmentTemplate(order, type, GetItemsJson(order), operatorId); @@ -255,13 +255,13 @@ private FulfillmentIdempotencyContext CreateFulfillmentCoordinator( /// /// 构造占位账本模板(订单快照全字段;并发恰一由账本唯一索引在库层仲裁)。 /// - private static TenantGameOrderFulfillmentEntity BuildFulfillmentTemplate( - Entity.Tenant.Game.TenantGameOrderEntity order, FulfillmentTypeEnum type, string itemsJson, long operatorId) + private static GameOrderFulfillmentEntity BuildFulfillmentTemplate( + Entity.Business.Game.GameOrderEntity order, FulfillmentTypeEnum type, string itemsJson, long operatorId) { var now = TimerHelper.UnixTimeSeconds(); var operatorName = operatorId > 0 ? "admin" : "system"; - return new TenantGameOrderFulfillmentEntity + return new GameOrderFulfillmentEntity { OrderId = order.Id, PayChannel = order.PayChannel ?? string.Empty, @@ -300,7 +300,7 @@ private static TenantGameOrderFulfillmentEntity BuildFulfillmentTemplate( /// private async Task WriteFailureReasonAsync(string idempotencyKey, string failureReason) { - await _db.Updateable() + await _db.Updateable() .SetColumns(u => u.FailureReason == failureReason) .Where(u => u.IdempotencyKey == idempotencyKey) .ExecuteCommandAsync(); @@ -311,7 +311,7 @@ private async Task WriteFailureReasonAsync(string idempotencyKey, string failure /// private async Task SettleVoidedAsync(string idempotencyKey) { - await _db.Updateable() + await _db.Updateable() .SetColumns(u => u.Status == FulfillmentStatusEnum.Voided) .SetColumns(u => u.FailureReason == null) .Where(u => u.IdempotencyKey == idempotencyKey) @@ -321,7 +321,7 @@ private async Task SettleVoidedAsync(string idempotencyKey) /// /// 调游戏服 req_player_send_item 发货。ShipAsync 与 CompensateAsync 共用。 /// - private async Task SendItemsAsync(Entity.Tenant.Game.TenantGameOrderEntity gameOrderEntity, bool isRecharge, bool forceSandbox) + private async Task SendItemsAsync(Entity.Business.Game.GameOrderEntity gameOrderEntity, bool isRecharge, bool forceSandbox) { var gameAreaEntity = await GetGameAreaAsync(gameOrderEntity); var roleId = await GetRoleIdAsync(gameOrderEntity); @@ -356,7 +356,7 @@ private async Task SendItemsAsync(Entity.Tenant.Game.TenantGame }; } - private static string GetItemsJson(Entity.Tenant.Game.TenantGameOrderEntity gameOrderEntity) + private static string GetItemsJson(Entity.Business.Game.GameOrderEntity gameOrderEntity) { var playerCreateOrderResult = GetPlayerCreateOrderResult(gameOrderEntity); return JsonHelper.Serialize(playerCreateOrderResult.RewardsItem, EmbeddedJsonOptions.Instance); @@ -365,7 +365,7 @@ private static string GetItemsJson(Entity.Tenant.Game.TenantGameOrderEntity game /// /// 构造权益发货幂等键。规则见 change C113 §3。 /// - private static string BuildFulfillmentIdempotencyKey(FulfillmentTypeEnum type, Entity.Tenant.Game.TenantGameOrderEntity order, long operatorId) + private static string BuildFulfillmentIdempotencyKey(FulfillmentTypeEnum type, Entity.Business.Game.GameOrderEntity order, long operatorId) { var channel = order.PayChannel ?? string.Empty; var providerTx = !string.IsNullOrWhiteSpace(order.ProviderTransactionId) @@ -388,26 +388,26 @@ private static string BuildFulfillmentIdempotencyKey(FulfillmentTypeEnum type, E } } - private async Task GetOrderAsync(long orderId) + private async Task GetOrderAsync(long orderId) { - return await _db.Queryable().FirstAsync(u => u.Id == orderId) + return await _db.Queryable().FirstAsync(u => u.Id == orderId) ?? throw BusinessError.Oh(CommonErrorCode.RecordNotFound); } - private async Task GetGameAreaAsync(Entity.Tenant.Game.TenantGameOrderEntity gameOrderEntity) + private async Task GetGameAreaAsync(Entity.Business.Game.GameOrderEntity gameOrderEntity) { - return await _db.Queryable().Filter(null, true).Where(u => u.IsDeleted == false).FirstAsync(u => u.Id == gameOrderEntity.AreaId) + return await _db.Queryable().Filter(null, true).Where(u => u.IsDeleted == false).FirstAsync(u => u.Id == gameOrderEntity.AreaId) ?? throw new Exception("区服不存在"); } - private async Task GetRoleIdAsync(Entity.Tenant.Game.TenantGameOrderEntity gameOrderEntity) + private async Task GetRoleIdAsync(Entity.Business.Game.GameOrderEntity gameOrderEntity) { if (!long.TryParse(gameOrderEntity.RoleId, out var roleId)) { throw new Exception("角色ID无效"); } - var gameRoleEntity = await _db.Queryable().FirstAsync(u => u.Id == roleId); + var gameRoleEntity = await _db.Queryable().FirstAsync(u => u.Id == roleId); if (gameRoleEntity == null) { throw new Exception("角色不存在"); @@ -416,7 +416,7 @@ private async Task GetRoleIdAsync(Entity.Tenant.Game.TenantGameOrderEntity return roleId; } - private static PlayerCreateOrderResponse GetPlayerCreateOrderResult(Entity.Tenant.Game.TenantGameOrderEntity gameOrderEntity) + private static PlayerCreateOrderResponse GetPlayerCreateOrderResult(Entity.Business.Game.GameOrderEntity gameOrderEntity) { if (string.IsNullOrWhiteSpace(gameOrderEntity.Content)) { @@ -429,7 +429,7 @@ private static PlayerCreateOrderResponse GetPlayerCreateOrderResult(Entity.Tenan private async Task UpdateStatusAsync(long orderId, OrderStatusEnum status) { - await _db.Updateable() + await _db.Updateable() .SetColumns(u => u.Status == status) .Where(u => u.Id == orderId) .ExecuteCommandAsync(); @@ -447,7 +447,7 @@ private async Task AddRoleAllRechargeAsync(long roleId, uint amount) return; } - await _db.Updateable() + await _db.Updateable() .SetColumns(u => u.AllRecharge == (u.AllRecharge ?? 0) + amountInt) .Where(u => u.Id == roleId) .ExecuteCommandAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/GameOrderFulfillmentResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/GameOrderFulfillmentResponse.cs index fd4bb71e..7ec31f6d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/GameOrderFulfillmentResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/GameOrderFulfillmentResponse.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.CommerceCenter.GameOrderFulfillment.Dto; /// 权益发货账本输出参数(C120)。投影暴露实体全字段: /// Type/Status/FailureReason/IdempotencyKey/OperatorId/ItemsJson/订单快照(OrderId/PayChannel/ProviderTransactionId/Sku/RoleId/AreaId/AccountId/Amount)/审计列。 /// -public class GameOrderFulfillmentResponse : IBasePageResponse +public class GameOrderFulfillmentResponse : IBasePageResponse { /// /// Id @@ -14,7 +14,7 @@ public class GameOrderFulfillmentResponse : IBasePageResponse - /// 来源订单 Id(TenantGameOrderEntity.Id)。 + /// 来源订单 Id(GameOrderEntity.Id)。 /// public long OrderId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/PageTenantGameOrderFulfillmentEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/PageGameOrderFulfillmentEntityRequest.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/PageTenantGameOrderFulfillmentEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/PageGameOrderFulfillmentEntityRequest.cs index e83b2972..b7b3f224 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/PageTenantGameOrderFulfillmentEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/PageGameOrderFulfillmentEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.CommerceCenter.GameOrderFulfillment.Dto; /// /// 权益发货账本分页查询输入参数(C120)。过滤字段严格锁定见 change C120 §3 BuildPageQuery 表。 /// -public class PageTenantGameOrderFulfillmentEntityRequest : BaseAreaPageRequest +public class PageGameOrderFulfillmentEntityRequest : BaseAreaPageRequest { /// /// 来源订单 Id(账本 OrderId 为 long,非订单表的字符串 OrderId)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/UpdateTenantGameOrderFulfillmentEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/UpdateGameOrderFulfillmentEntityRequest.cs similarity index 80% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/UpdateTenantGameOrderFulfillmentEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/UpdateGameOrderFulfillmentEntityRequest.cs index 1dd8c682..76554744 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/UpdateTenantGameOrderFulfillmentEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/Dto/UpdateGameOrderFulfillmentEntityRequest.cs @@ -4,6 +4,6 @@ namespace GameFrameX.Application.CommerceCenter.GameOrderFulfillment.Dto; /// 权益发货账本更新输入参数(C120)。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束; /// UpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持修改)。 /// -public class UpdateTenantGameOrderFulfillmentEntityRequest : BaseUpdateRequest +public class UpdateGameOrderFulfillmentEntityRequest : BaseUpdateRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderChannelRefundService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderChannelRefundService.cs index 00d75dad..43cdbba2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderChannelRefundService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderChannelRefundService.cs @@ -1,7 +1,7 @@ using System.Text.Json; using GameFrameX.Core.Enum.Errors; using GameFrameX.Core.Exceptions; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Foundation.Logger; using GameFrameX.Payment.Abstract; using GameFrameX.Payment.Abstract.Models; @@ -12,7 +12,7 @@ namespace GameFrameX.Application.CommerceCenter.GameOrderFulfillment; /// 渠道退款路由服务:按订单支付渠道解析 与主库支付配置,执行渠道侧退款。 /// 渠道退款必须先于本地账本扣除(GameOrderShipService.RefundAsync)成功执行: /// 渠道失败 / 渠道不支持主动退款 / 渠道配置缺失时抛 (错误码进 PaymentErrorCode 段 704),本地账本不动。 -/// 渠道配置来源:主库 TenantGamePaymentConfigEntity 中对应支付渠道的基础分包配置, +/// 渠道配置来源:主库 GamePaymentConfigEntity 中对应支付渠道的基础分包配置, /// IsSandbox 与订单匹配者优先;ConfigJson 经 反序列化为渠道 Option 类型。 /// public class GameOrderChannelRefundService @@ -39,7 +39,7 @@ public GameOrderChannelRefundService(IEnumerable refundManagers, /// 订单实体(PayChannel / ProviderTransactionId / Amount / IsSandbox 等路由与上下文来源) /// 退款原因(管理员填写,透传渠道描述字段并落账本 FailureReason) /// 渠道未注册(PayChannelNotSupported)/ 配置缺失(RefundConfigMissing)/ 不支持主动退款(RefundNotSupported)/ 渠道返回失败(RefundChannelFailed) - public async Task RefundByOrderAsync(Entity.Tenant.Game.TenantGameOrderEntity order, string reason) + public async Task RefundByOrderAsync(Entity.Business.Game.GameOrderEntity order, string reason) { var channel = (order.PayChannel ?? string.Empty).Trim().ToLowerInvariant(); if (string.IsNullOrEmpty(channel) || !_refundManagers.TryGetValue(channel, out var refundManager)) @@ -69,7 +69,7 @@ public async Task RefundByOrderAsync(Entity.Tenant.Game.TenantGameOrderEntity or /// /// 查询渠道侧退款状态(按订单渠道路由,供管理员核对渠道退款进展)。 /// - public async Task QueryByOrderAsync(Entity.Tenant.Game.TenantGameOrderEntity order) + public async Task QueryByOrderAsync(Entity.Business.Game.GameOrderEntity order) { var channel = (order.PayChannel ?? string.Empty).Trim().ToLowerInvariant(); if (string.IsNullOrEmpty(channel) || !_refundManagers.TryGetValue(channel, out var refundManager)) @@ -90,17 +90,17 @@ public async Task QueryByOrderAsync(Entity.Te /// /// 从主库解析渠道基础分包支付配置,IsSandbox 与订单匹配者优先。 /// - private IPaymentOptionSetting? ResolveOptionSetting(string channel, Entity.Tenant.Game.TenantGameOrderEntity order) + private IPaymentOptionSetting? ResolveOptionSetting(string channel, Entity.Business.Game.GameOrderEntity order) { var isSandbox = order.IsSandbox ?? false; - var configs = _db.Queryable() + var configs = _db.Queryable() .Where(u => u.PayChannel == channel && u.IsEnabled == true) .Where(u => u.PackageIdNormalized == 0) .OrderByDescending(u => u.Id) .ToList(); - TenantGamePaymentConfigEntity? sandboxMatched = null; - TenantGamePaymentConfigEntity? environmentFallback = null; + GamePaymentConfigEntity? sandboxMatched = null; + GamePaymentConfigEntity? environmentFallback = null; foreach (var config in configs) { if (string.IsNullOrWhiteSpace(config.ConfigJson)) @@ -144,7 +144,7 @@ public async Task QueryByOrderAsync(Entity.Te /// /// 构造渠道退款上下文:渠道交易号按渠道挑选(Apple 优先 originalTransactionId,其余用 ProviderTransactionId)。 /// - private static RefundOrderContext BuildContext(string channel, Entity.Tenant.Game.TenantGameOrderEntity order, string reason) + private static RefundOrderContext BuildContext(string channel, Entity.Business.Game.GameOrderEntity order, string reason) { var transactionId = order.ProviderTransactionId ?? string.Empty; if (string.Equals(channel, "apple", StringComparison.Ordinal)) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderFulfillmentService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderFulfillmentService.cs index 92ea8c21..95000285 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderFulfillmentService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameOrderFulfillment/GameOrderFulfillmentService.cs @@ -15,20 +15,20 @@ namespace GameFrameX.Application.CommerceCenter.GameOrderFulfillment; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameOrderFulfillmentService - : GenericCrudService + PageGameOrderFulfillmentEntityRequest> { private readonly GameOrderShipService _shipService; private readonly GameOrderChannelRefundService _channelRefundService; - private readonly SqlSugarRepository _orderRepository; + private readonly SqlSugarRepository _orderRepository; private readonly CurrentUserContext _currentUserContext; public GameOrderFulfillmentService( - SqlSugarRepository repository, - SqlSugarRepository orderRepository, + SqlSugarRepository repository, + SqlSugarRepository orderRepository, GameOrderShipService shipService, GameOrderChannelRefundService channelRefundService, CurrentUserContext currentUserContext) @@ -51,7 +51,7 @@ protected override Task OnAddingAsync(FulfillmentActionRequest input) /// /// 账本为事实数据,禁止管理后台修改。 /// - protected override Task OnUpdatingAsync(UpdateTenantGameOrderFulfillmentEntityRequest input) + protected override Task OnUpdatingAsync(UpdateGameOrderFulfillmentEntityRequest input) { throw new Exception("权益发货账本为事实数据,不支持修改"); } @@ -59,7 +59,7 @@ protected override Task OnUpdatingAsync(UpdateTenantGameOrderFulfillmentEntityRe /// /// 账本分页查询过滤(字段穷举见 change C120 §3)。 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameOrderFulfillmentEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameOrderFulfillmentEntityRequest input) { return Repository.AsQueryable() .WhereIF(input.OrderId.HasValue, u => u.OrderId == input.OrderId.Value) @@ -83,7 +83,7 @@ protected override ISugarQueryable BuildPageQuery( /// [HttpPost] [ApiDescriptionSettings(Name = "Export")] - public async Task> ExportAsync(PageTenantGameOrderFulfillmentEntityRequest input) + public async Task> ExportAsync(PageGameOrderFulfillmentEntityRequest input) { return await BuildPageQuery(input).Take(1000).ToListAsync(); } @@ -143,7 +143,7 @@ public async Task ResendAsync(FulfillmentActionReques /// 解析退款动作对应的订单(C310):input.Id 兼容订单 Id(GameOrderShipService 既有口径)与账本行 Id(账本页动作语义)两种传参, /// 后者按账本行 OrderId 映射回订单实体。 /// - private async Task GetOrderForChannelRefundAsync(long inputId) + private async Task GetOrderForChannelRefundAsync(long inputId) { var order = await _orderRepository.GetFirstAsync(u => u.Id == inputId); if (order != null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/AddTenantGameRedeemCodeEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/AddGameRedeemCodeEntityRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/AddTenantGameRedeemCodeEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/AddGameRedeemCodeEntityRequest.cs index 6836ca29..378ac875 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/AddTenantGameRedeemCodeEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/AddGameRedeemCodeEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 兑换码增加输入参数 /// -public class AddTenantGameRedeemCodeEntityRequest : BaseAddRequest +public class AddGameRedeemCodeEntityRequest : BaseAddRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/GameRedeemCodeResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/GameRedeemCodeResponse.cs index 1b970111..b1129e6a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/GameRedeemCodeResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/GameRedeemCodeResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCode.Dto; /// /// 兑换码输出参数 /// -public class GameRedeemCodeResponse : IBasePageResponse +public class GameRedeemCodeResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/PageTenantGameRedeemCodeEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/PageGameRedeemCodeEntityRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/PageTenantGameRedeemCodeEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/PageGameRedeemCodeEntityRequest.cs index af4c07b4..e6a8095a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/PageTenantGameRedeemCodeEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/PageGameRedeemCodeEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCode.Dto; /// /// 兑换码分页查询输入参数 /// -public class PageTenantGameRedeemCodeEntityRequest : BaseAreaPageRequest +public class PageGameRedeemCodeEntityRequest : BaseAreaPageRequest { /// /// 兑换码 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/UpdateTenantGameRedeemCodeEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/UpdateGameRedeemCodeEntityRequest.cs similarity index 80% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/UpdateTenantGameRedeemCodeEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/UpdateGameRedeemCodeEntityRequest.cs index 845c2bb3..65533eb9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/UpdateTenantGameRedeemCodeEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/Dto/UpdateGameRedeemCodeEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 兑换码更新输入参数 /// -public class UpdateTenantGameRedeemCodeEntityRequest : BaseUpdateRequest +public class UpdateGameRedeemCodeEntityRequest : BaseUpdateRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/GameRedeemCodeService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/GameRedeemCodeService.cs index 8cc57140..6f02b91f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/GameRedeemCodeService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCode/GameRedeemCodeService.cs @@ -8,16 +8,16 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCode; /// 兑换码服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameRedeemCodeService : GenericCrudService +public class GameRedeemCodeService : GenericCrudService { - public GameRedeemCodeService(SqlSugarRepository repository) : base(repository) + public GameRedeemCodeService(SqlSugarRepository repository) : base(repository) { } /// /// 构建分页查询条件 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameRedeemCodeEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameRedeemCodeEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => @@ -35,7 +35,7 @@ protected override ISugarQueryable BuildPageQuery(PageTe /// /// 新增前解析并校验附件道具。 /// - protected override async Task OnAddingAsync(AddTenantGameRedeemCodeEntityRequest input) + protected override async Task OnAddingAsync(AddGameRedeemCodeEntityRequest input) { var gamePropItemEntities = JsonHelper.Deserialize>(input.Contents); @@ -44,7 +44,7 @@ protected override async Task OnAddingAsync(AddTenantGameRedeemCodeEntityRequest // 批量预加载所有商品,避免 N+1 查询 var goodsIds = gamePropItemEntities.Select(p => p.Id).Distinct().ToList(); var goodsDict = (await Repository.AsSugarClient() - .Queryable() + .Queryable() .Where(m => goodsIds.Contains(m.Id)) .ToListAsync()) .ToDictionary(m => m.Id); @@ -65,7 +65,7 @@ protected override async Task OnAddingAsync(AddTenantGameRedeemCodeEntityRequest /// /// 更新前验证记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameRedeemCodeEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameRedeemCodeEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/AddTenantGameRedeemCodeChannelEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/AddGameRedeemCodeChannelEntityRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/AddTenantGameRedeemCodeChannelEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/AddGameRedeemCodeChannelEntityRequest.cs index e4d7379b..d0e69ff0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/AddTenantGameRedeemCodeChannelEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/AddGameRedeemCodeChannelEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeChannel.Dto; /// /// 兑换码渠道增加输入参数 /// -public class AddTenantGameRedeemCodeChannelEntityRequest : BaseAddRequest +public class AddGameRedeemCodeChannelEntityRequest : BaseAddRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/GameRedeemCodeChannelResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/GameRedeemCodeChannelResponse.cs index fc984d9e..45c8802e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/GameRedeemCodeChannelResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/GameRedeemCodeChannelResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeChannel.Dto; /// /// 兑换码渠道输出参数 /// -public class GameRedeemCodeChannelResponse : IBasePageResponse +public class GameRedeemCodeChannelResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/PageTenantGameRedeemCodeChannelEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/PageGameRedeemCodeChannelEntityRequest.cs similarity index 76% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/PageTenantGameRedeemCodeChannelEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/PageGameRedeemCodeChannelEntityRequest.cs index dd09c8ed..aea8de4f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/PageTenantGameRedeemCodeChannelEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/PageGameRedeemCodeChannelEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeChannel.Dto; /// /// 兑换码渠道分页查询输入参数 /// -public class PageTenantGameRedeemCodeChannelEntityRequest : BasePageRequest +public class PageGameRedeemCodeChannelEntityRequest : BasePageRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/UpdateTenantGameRedeemCodeChannelEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/UpdateGameRedeemCodeChannelEntityRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/UpdateTenantGameRedeemCodeChannelEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/UpdateGameRedeemCodeChannelEntityRequest.cs index 588b8223..ad6d46a2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/UpdateTenantGameRedeemCodeChannelEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/Dto/UpdateGameRedeemCodeChannelEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeChannel.Dto; /// /// 兑换码渠道更新输入参数 /// -public class UpdateTenantGameRedeemCodeChannelEntityRequest : BaseUpdateRequest +public class UpdateGameRedeemCodeChannelEntityRequest : BaseUpdateRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/GameRedeemCodeChannelService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/GameRedeemCodeChannelService.cs index 2350ca59..ae1dc61d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/GameRedeemCodeChannelService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/GameRedeemCodeChannelService.cs @@ -8,11 +8,11 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeChannel; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameRedeemCodeChannelService - : GenericCrudSelectService + : GenericCrudSelectService { - public GameRedeemCodeChannelService(SqlSugarRepository repository) + public GameRedeemCodeChannelService(SqlSugarRepository repository) : base(repository) { } @@ -20,7 +20,7 @@ public GameRedeemCodeChannelService(SqlSugarRepository /// 新增前校验每角色可用次数。 /// - protected override Task OnAddingAsync(AddTenantGameRedeemCodeChannelEntityRequest input) + protected override Task OnAddingAsync(AddGameRedeemCodeChannelEntityRequest input) { EnsureValidRoleUsageLimit(input.RoleUsageLimit); return Task.CompletedTask; @@ -29,7 +29,7 @@ protected override Task OnAddingAsync(AddTenantGameRedeemCodeChannelEntityReques /// /// 更新前验证记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameRedeemCodeChannelEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameRedeemCodeChannelEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -51,7 +51,7 @@ private static void EnsureValidRoleUsageLimit(int roleUsageLimit) } } - protected override ISugarQueryable BuildPageQuery(PageTenantGameRedeemCodeChannelEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameRedeemCodeChannelEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/AddTenantGameRedeemCodeUseRecordEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/AddGameRedeemCodeUseRecordEntityRequest.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/AddTenantGameRedeemCodeUseRecordEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/AddGameRedeemCodeUseRecordEntityRequest.cs index 29017481..e71083d4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/AddTenantGameRedeemCodeUseRecordEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/AddGameRedeemCodeUseRecordEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 兑换记录增加输入参数 /// -public class AddTenantGameRedeemCodeUseRecordEntityRequest : BaseAddRequest +public class AddGameRedeemCodeUseRecordEntityRequest : BaseAddRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/GameRedeemCodeUseRecordResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/GameRedeemCodeUseRecordResponse.cs index e3bc4734..6c87d51b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/GameRedeemCodeUseRecordResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/GameRedeemCodeUseRecordResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.Dto; /// /// 兑换记录输出参数 /// -public class GameRedeemCodeUseRecordResponse : IBasePageResponse +public class GameRedeemCodeUseRecordResponse : IBasePageResponse { /// /// Id @@ -62,12 +62,12 @@ public class GameRedeemCodeUseRecordResponse : IBasePageResponse - /// 兑换码渠道/分组ID(来自关联的 TenantGameRedeemCodeEntity.ChannelId) + /// 兑换码渠道/分组ID(来自关联的 GameRedeemCodeEntity.ChannelId) /// public long? ChannelId { get; set; } /// - /// 兑换码渠道/分组名称(来自关联的 TenantGameRedeemCodeChannelEntity.Name) + /// 兑换码渠道/分组名称(来自关联的 GameRedeemCodeChannelEntity.Name) /// public string ChannelName { get; set; } = null!; } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/PageTenantGameRedeemCodeUseRecordEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/PageGameRedeemCodeUseRecordEntityRequest.cs similarity index 71% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/PageTenantGameRedeemCodeUseRecordEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/PageGameRedeemCodeUseRecordEntityRequest.cs index abf9bd94..951c3abc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/PageTenantGameRedeemCodeUseRecordEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/PageGameRedeemCodeUseRecordEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.Dto; /// /// 兑换记录分页查询输入参数 /// -public class PageTenantGameRedeemCodeUseRecordEntityRequest : BaseAreaPageRequest +public class PageGameRedeemCodeUseRecordEntityRequest : BaseAreaPageRequest { /// /// 兑换码 @@ -16,7 +16,7 @@ public class PageTenantGameRedeemCodeUseRecordEntityRequest : BaseAreaPageReques public long? PlayerId { get; set; } /// - /// 兑换码渠道/分组ID(关联 TenantGameRedeemCodeEntity.ChannelId 过滤) + /// 兑换码渠道/分组ID(关联 GameRedeemCodeEntity.ChannelId 过滤) /// public long? ChannelId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/UpdateTenantGameRedeemCodeUseRecordEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/UpdateGameRedeemCodeUseRecordEntityRequest.cs similarity index 64% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/UpdateTenantGameRedeemCodeUseRecordEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/UpdateGameRedeemCodeUseRecordEntityRequest.cs index 2deaea0d..cbf2ac3b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/UpdateTenantGameRedeemCodeUseRecordEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/Dto/UpdateGameRedeemCodeUseRecordEntityRequest.cs @@ -3,6 +3,6 @@ /// /// 兑换记录更新输入参数 /// -public class UpdateTenantGameRedeemCodeUseRecordEntityRequest : BaseUpdateRequest +public class UpdateGameRedeemCodeUseRecordEntityRequest : BaseUpdateRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/GameRedeemCodeUseRecordService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/GameRedeemCodeUseRecordService.cs index ea47faa1..ec4f05dc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/GameRedeemCodeUseRecordService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameRedeemCodeUseRecord/GameRedeemCodeUseRecordService.cs @@ -7,15 +7,15 @@ namespace GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameRedeemCodeUseRecordService - : GenericCrudService + : GenericCrudService { - private readonly SqlSugarRepository _areaRepository; + private readonly SqlSugarRepository _areaRepository; public GameRedeemCodeUseRecordService( - SqlSugarRepository repository, - SqlSugarRepository areaRepository) + SqlSugarRepository repository, + SqlSugarRepository areaRepository) : base(repository) { _areaRepository = areaRepository; @@ -25,22 +25,22 @@ public GameRedeemCodeUseRecordService( /// 新增前解析并校验附件道具。 /// 新增前解析并校验附件道具。 /// - protected override Task OnAddingAsync(AddTenantGameRedeemCodeUseRecordEntityRequest input) + protected override Task OnAddingAsync(AddGameRedeemCodeUseRecordEntityRequest input) { throw new Exception("兑换码使用记录由客户端兑换链路产生,不支持通过管理后台直接创建"); } - protected override ISugarQueryable BuildPageQuery(PageTenantGameRedeemCodeUseRecordEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameRedeemCodeUseRecordEntityRequest input) { return Repository.AsQueryable() .WhereIF(input.AreaId > 0, u => u.AreaId == input.AreaId) .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code == input.Code) .WhereIF(input.PlayerId > 0, u => u.PlayerId == input.PlayerId) //处理外键和TreeSelector相关字段的连接 - .LeftJoin((u, areaid) => u.AreaId == areaid.Id) + .LeftJoin((u, areaid) => u.AreaId == areaid.Id) //关联兑换码(Code+AreaId 复合,回避跨区同名兑换码歧义)取渠道ID,再关联渠道取名称 - .LeftJoin((u, areaid, code) => u.Code == code.Code && u.AreaId == code.AreaId) - .LeftJoin((u, areaid, code, channel) => code.ChannelId == channel.Id) + .LeftJoin((u, areaid, code) => u.Code == code.Code && u.AreaId == code.AreaId) + .LeftJoin((u, areaid, code, channel) => code.ChannelId == channel.Id) .WhereIF(input.ChannelId > 0, (u, areaid, code, channel) => code.ChannelId == input.ChannelId) .Select((u, areaid, code, channel) => new GameRedeemCodeUseRecordResponse { @@ -60,7 +60,7 @@ protected override ISugarQueryable BuildPageQue }); } - protected override ISugarQueryable ApplyOrdering(ISugarQueryable query, PageTenantGameRedeemCodeUseRecordEntityRequest input) + protected override ISugarQueryable ApplyOrdering(ISugarQueryable query, PageGameRedeemCodeUseRecordEntityRequest input) { if (!string.IsNullOrEmpty(input.OrderBy)) { @@ -78,8 +78,8 @@ protected override ISugarQueryable ApplyOrderin /// 获取区服下拉列表(AreaId 外键关联) /// [HttpGet] - [ApiDescriptionSettings(Name = "TenantGameAreaEntityAreaIdDropdown")] - public async Task> TenantGameAreaEntityAreaIdDropdownAsync() + [ApiDescriptionSettings(Name = "GameAreaEntityAreaIdDropdown")] + public async Task> GameAreaEntityAreaIdDropdownAsync() { var list = await _areaRepository.AsQueryable() .Select(a => new BaseSelectPageResponse { Id = a.Id, Value = a.Name, Label = a.Description, }) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/AddTenantGameWebShopEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/AddGameWebShopEntityRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/AddTenantGameWebShopEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/AddGameWebShopEntityRequest.cs index 8db1e979..c93d8084 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/AddTenantGameWebShopEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/AddGameWebShopEntityRequest.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShop.Dto; // AddAsync 必须继承 BaseAddRequest(空基类),不应携带主键/版本号。 // 此前继承 GameWebShopBaseRequest(其又继承 BaseUpdateRequest),会把 [Required] Id/Version 带入 AddAsync 校验, // 导致新增报 {"Version":["版本号不能为空"]}。业务字段在此直接声明,与 B1 约定一致。 -public class AddTenantGameWebShopEntityRequest : BaseAddRequest +public class AddGameWebShopEntityRequest : BaseAddRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/GameWebShopResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/GameWebShopResponse.cs index 0354bae4..13314124 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/GameWebShopResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/GameWebShopResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShop.Dto; /// /// 游戏邮件输出参数 /// -public class GameWebShopResponse : IBasePageResponse +public class GameWebShopResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/PageTenantGameWebShopEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/PageGameWebShopEntityRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/PageTenantGameWebShopEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/PageGameWebShopEntityRequest.cs index fed62983..bb3fb8e3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/PageTenantGameWebShopEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/PageGameWebShopEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShop.Dto; /// /// 游戏邮件分页查询输入参数 /// -public class PageTenantGameWebShopEntityRequest : BaseAreaPageRequest +public class PageGameWebShopEntityRequest : BaseAreaPageRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/UpdateTenantGameWebShopEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/UpdateGameWebShopEntityRequest.cs similarity index 75% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/UpdateTenantGameWebShopEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/UpdateGameWebShopEntityRequest.cs index 85d13e9d..06885f5f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/UpdateTenantGameWebShopEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/Dto/UpdateGameWebShopEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShop.Dto; /// /// 游戏商城实体更新输入参数 /// -public class UpdateTenantGameWebShopEntityRequest : GameWebShopBaseRequest +public class UpdateGameWebShopEntityRequest : GameWebShopBaseRequest { // Id、所有公共字段和 ToData() 方法已从 GameWebShopBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/GameWebShopService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/GameWebShopService.cs index d6ee20bf..08594dc1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/GameWebShopService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShop/GameWebShopService.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShop; /// 游戏角色服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameWebShopService : GenericCrudSelectService +public class GameWebShopService : GenericCrudSelectService { private readonly HttpClient _httpClient; @@ -17,7 +17,7 @@ public class GameWebShopService : GenericCrudSelectService /// /// - public GameWebShopService(SqlSugarRepository repository, HttpClient httpClient) : base(repository) + public GameWebShopService(SqlSugarRepository repository, HttpClient httpClient) : base(repository) { _httpClient = httpClient; } @@ -25,7 +25,7 @@ public GameWebShopService(SqlSugarRepository /// 构建分页查询条件 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameWebShopEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameWebShopEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => @@ -38,7 +38,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenan /// /// 更新前验证记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameWebShopEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameWebShopEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/AddTenantGameWebShopOrderEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/AddGameWebShopOrderEntityRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/AddTenantGameWebShopOrderEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/AddGameWebShopOrderEntityRequest.cs index 27a75cba..b756fdc8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/AddTenantGameWebShopOrderEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/AddGameWebShopOrderEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 游戏商城订单实体新增输入参数 /// -public class AddTenantGameWebShopOrderEntityRequest : BaseAddRequest +public class AddGameWebShopOrderEntityRequest : BaseAddRequest { /// /// 商品名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/GameWebShopOrderResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/GameWebShopOrderResponse.cs index 4cb711ee..1eaeeeda 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/GameWebShopOrderResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/GameWebShopOrderResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShopOrder.Dto; /// /// 网页商城订单输出参数 /// -public class GameWebShopOrderResponse : IBasePageResponse +public class GameWebShopOrderResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/PageTenantGameWebShopOrderEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/PageGameWebShopOrderEntityRequest.cs similarity index 88% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/PageTenantGameWebShopOrderEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/PageGameWebShopOrderEntityRequest.cs index 05d6c5e9..fa6b6851 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/PageTenantGameWebShopOrderEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/PageGameWebShopOrderEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShopOrder.Dto; /// /// 游戏邮件分页查询输入参数 /// -public class PageTenantGameWebShopOrderEntityRequest : BaseAreaPageRequest +public class PageGameWebShopOrderEntityRequest : BaseAreaPageRequest { /// /// 标题 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/UpdateTenantGameWebShopOrderEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/UpdateGameWebShopOrderEntityRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/UpdateTenantGameWebShopOrderEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/UpdateGameWebShopOrderEntityRequest.cs index 33a599c1..884f82a2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/UpdateTenantGameWebShopOrderEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/Dto/UpdateGameWebShopOrderEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 游戏商城订单实体更新输入参数 /// -public class UpdateTenantGameWebShopOrderEntityRequest : BaseUpdateRequest +public class UpdateGameWebShopOrderEntityRequest : BaseUpdateRequest { /// /// 商品名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/GameWebShopOrderService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/GameWebShopOrderService.cs index 1a752ceb..f243b504 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/GameWebShopOrderService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/CommerceCenter/GameWebShopOrder/GameWebShopOrderService.cs @@ -14,11 +14,11 @@ namespace GameFrameX.Application.CommerceCenter.GameWebShopOrder; /// 页面商城订单 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameWebShopOrderService : GenericCrudSelectService +public class GameWebShopOrderService : GenericCrudSelectService { private readonly SqlSugarRepository _configService; - private readonly SqlSugarRepository _webShopService; - private readonly SqlSugarRepository _gameAreaService; + private readonly SqlSugarRepository _webShopService; + private readonly SqlSugarRepository _gameAreaService; private readonly HttpClient _httpClient; /// @@ -31,10 +31,10 @@ public class GameWebShopOrderService : GenericCrudSelectService /// public GameWebShopOrderService( - SqlSugarRepository repository, + SqlSugarRepository repository, SqlSugarRepository configService, - SqlSugarRepository webShopService, - SqlSugarRepository gameAreaService, + SqlSugarRepository webShopService, + SqlSugarRepository gameAreaService, HttpClient httpClient) : base(repository) { _configService = configService; @@ -46,7 +46,7 @@ public GameWebShopOrderService( /// /// 商城订单由可信客户端下单和支付回调链路产生,禁止管理后台直接创建。 /// - protected override Task OnAddingAsync(AddTenantGameWebShopOrderEntityRequest input) + protected override Task OnAddingAsync(AddGameWebShopOrderEntityRequest input) { throw new Exception("商城订单由客户端商城下单链路产生,不支持通过管理后台直接创建"); } @@ -54,7 +54,7 @@ protected override Task OnAddingAsync(AddTenantGameWebShopOrderEntityRequest inp /// /// 构建分页查询条件 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameWebShopOrderEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameWebShopOrderEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => @@ -97,7 +97,7 @@ public async Task RedoAsync(BaseUpdateRequest input) // 批量预加载所有商品,避免 N+1 查询 var goodsIds = list.Select(p => p.Id).Distinct().ToList(); var goodsDict = (await Repository.AsSugarClient() - .Queryable() + .Queryable() .Where(m => goodsIds.Contains(m.Id)) .ToListAsync()) .ToDictionary(m => m.Id); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs index 24ed4794..29f4af34 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs @@ -14,12 +14,12 @@ public static class GameHomeOnlineCounter /// /// 按指定租户库连接聚合全服在线人数。无可用区服时返回 0。 /// - /// 租户业务库连接(必须已路由到目标租户库)。 + /// 租户业务库连接(必须已路由到目标租户库)。 /// HTTP 客户端工厂。 /// 启用区服在线人数之和。 - public static async Task GetTotalOnlineAsync(ISqlSugarClient tenantDb, IHttpClientFactory httpClientFactory) + public static async Task GetTotalOnlineAsync(ISqlSugarClient db, IHttpClientFactory httpClientFactory) { - var areas = await tenantDb.Queryable() + var areas = await db.Queryable() .Where(u => u.IsEnabled == true && u.HttpManageUrl != null && u.HttpManageUrl != "") .ToListAsync(); @@ -43,7 +43,7 @@ public static async Task GetTotalOnlineAsync(ISqlSugarClient tenantDb, IHtt /// 查询单个区服在线人数。Control 能力前缀为空(构造器抛异常)或调用异常时降级为 0, /// 与历史「全局地址缺失 / 游戏服不可达降级 0」语义一致(来源 change C175)。 /// - private static async Task GetAreaOnlineAsync(HttpClient client, Entity.Tenant.Game.TenantGameAreaEntity area) + private static async Task GetAreaOnlineAsync(HttpClient client, Entity.Business.Game.GameAreaEntity area) { string url; try diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs index c6dc3bd3..35f3f202 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs @@ -2,7 +2,7 @@ using GameFrameX.Application.Dashboard.GameHome.Dto; using GameFrameX.Core.Enum.Errors; using GameFrameX.Core.Exceptions; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Enum; using GameFrameX.Foundation.Http.Normalization; @@ -17,10 +17,10 @@ public class GameHomeService : IAdminApiController private readonly IHttpClientFactory _httpClientFactory; private readonly ISqlSugarClient _tenantDbConnectionProvider; - public GameHomeService(IHttpClientFactory httpClientFactory, ISqlSugarClient tenantDbConnectionProvider) + public GameHomeService(IHttpClientFactory httpClientFactory, ISqlSugarClient dbConnectionProvider) { _httpClientFactory = httpClientFactory; - _tenantDbConnectionProvider = tenantDbConnectionProvider; + _tenantDbConnectionProvider = dbConnectionProvider; } /// @@ -35,8 +35,8 @@ public async Task> GetOnlineAsync() // C175:从全局 GameServerOptions.HttpRootUrl 改为区服级聚合。仅统计启用且配置了管理地址的区服, // 每个区服按 Control 能力前缀调用 GetOnlinePlayer,求和返回全服在线人数。 // C321:区服表是租户库表,经租户库连接路由查询;平台面(无租户上下文)返回明确业务错误而非裸 500。 - var tenantDb = ResolveTenantDb("首页在线人数"); - var total = await GameHomeOnlineCounter.GetTotalOnlineAsync(tenantDb, _httpClientFactory); + var db = ResolveDb("首页在线人数"); + var total = await GameHomeOnlineCounter.GetTotalOnlineAsync(db, _httpClientFactory); return HttpJsonResultData.Success(new GameHomeOnlineResponse { OnlineCount = total, }); } @@ -49,31 +49,31 @@ public async Task> GetOnlineAsync() [DisplayName("首页运营驾驶舱聚合读数")] public async Task> OverviewAsync() { - var tenantDb = ResolveTenantDb("首页运营驾驶舱聚合读数"); + var db = ResolveDb("首页运营驾驶舱聚合读数"); // 今日 0 点(服务器本地时区,运营视角)转 Unix 秒;CreatedTime 审计列为 Unix 秒,同为绝对时间可直接比较 var todayStart = new DateTimeOffset(DateTime.Now.Date).ToUnixTimeSeconds(); // 订单读数:今日订单数 + 待办细分(待发货/退款中为全量待办视角,不限下单日期) - var todayOrderCount = await tenantDb.Queryable() + var todayOrderCount = await db.Queryable() .Where(u => u.CreatedTime >= todayStart) .CountAsync(); - var pendingShipmentCount = await tenantDb.Queryable() + var pendingShipmentCount = await db.Queryable() .Where(u => u.Status == OrderStatusEnum.NotShipped) .CountAsync(); - var refundingCount = await tenantDb.Queryable() + var refundingCount = await db.Queryable() .Where(u => u.Status == OrderStatusEnum.InitiateRefund || u.Status == OrderStatusEnum.RefundAgreement) .CountAsync(); // 玩家读数:总数 + 今日新增(CreatedTime 索引见实体 SugarIndex) - var playerTotalCount = await tenantDb.Queryable() + var playerTotalCount = await db.Queryable() .CountAsync(); - var playerTodayNewCount = await tenantDb.Queryable() + var playerTodayNewCount = await db.Queryable() .Where(u => u.CreatedTime >= todayStart) .CountAsync(); // 区服读数:按 ServerStatus 分组计数(全局 ISafeEnabledFilter 已隐藏禁用区服,AreaTotalCount 即启用区服总数) - var areaStatusCounts = await tenantDb.Queryable() + var areaStatusCounts = await db.Queryable() .GroupBy(u => u.ServerStatus) .Select(u => new { ServerStatus = u.ServerStatus, Count = SqlFunc.AggregateCount(u.Id), }) .ToListAsync(); @@ -93,7 +93,7 @@ public async Task> OverviewAsync() } } - var onlineCount = await GameHomeOnlineCounter.GetTotalOnlineAsync(tenantDb, _httpClientFactory); + var onlineCount = await GameHomeOnlineCounter.GetTotalOnlineAsync(db, _httpClientFactory); return HttpJsonResultData.Success(new GameHomeOverviewResponse { @@ -118,14 +118,14 @@ public async Task> OverviewAsync() [DisplayName("首页 24h 在线人数时序")] public async Task> OnlineTrendAsync() { - var tenantDb = ResolveTenantDb("首页在线趋势"); + var db = ResolveDb("首页在线趋势"); // 当前整点桶(Unix 秒整点值与时区无关)往前共 24 个桶,含当前进行中桶 var currentBucket = DateTimeOffset.UtcNow.ToUnixTimeSeconds() / 3600 * 3600; var earliestBucket = currentBucket - 23 * 3600; // 一次回读窗口内全部采样,内存中按桶归并取每桶最后采样 - var samples = await tenantDb.Queryable() + var samples = await db.Queryable() .Where(u => u.SampleTime >= earliestBucket && u.SampleTime < currentBucket + 3600) .OrderBy(u => u.SampleTime) .ToListAsync(); @@ -153,16 +153,16 @@ public async Task> OnlineTrendAs /// /// 解析当前请求的租户库连接。区服/订单/玩家/采样均为租户库表,平台面(SuperAdmin 无目标租户)主库无对应物理表, - /// 返回明确业务错误而非让查询落到主库触发 42P01 裸 500(lesson:2026-07-11-superadminonly-tenant-coupling-d1016)。 + /// 返回明确业务错误而非让查询落到主库触发 42P01 裸 500(lesson:2026-07-11-superadminonly-coupling-d1016)。 /// - private ISqlSugarClient ResolveTenantDb(string operationName) + private ISqlSugarClient ResolveDb(string operationName) { - var tenantDb = _tenantDbConnectionProvider; - if (tenantDb == null) + var db = _tenantDbConnectionProvider; + if (db == null) { - throw BusinessError.Oh(GameHomeErrorCode.TenantDbUnavailable); + throw BusinessError.Oh(GameHomeErrorCode.DbUnavailable); } - return tenantDb; + return db; } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GlobalUsings.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GlobalUsings.cs index a55d84a1..74a1ab2f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GlobalUsings.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GlobalUsings.cs @@ -27,8 +27,8 @@ global using GameFrameX.Core.SqlSugar; global using GameFrameX.Entity; global using GameFrameX.Entity.System; -global using GameFrameX.Entity.Tenant; -global using GameFrameX.Entity.Tenant.Game; +global using GameFrameX.Entity.Business; +global using GameFrameX.Entity.Business.Game; global using GameFrameX.Core.BaseInputOutput; global using GameFrameX.Core.Utility; global using SqlSugar; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetAuditQueryService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetAuditQueryService.cs index ea406de2..d3b1389f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetAuditQueryService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetAuditQueryService.cs @@ -8,7 +8,7 @@ namespace GameFrameX.Application.GmCenter.Asset; /// /// Online 资产审计查询服务。路由前缀 /api/onlineAssetAuditQuery(change C340 / vault:C4 S3.7)。 /// 命令审计行(操作者/命令类型/目标玩家/时间窗)实时透传 Online;Admin 侧审计另有 -/// MonitorLogging 全 action 自动落库(TenantLogOperationEntity),本服务覆盖「按 Online 命令语义反查」的展示半边。 +/// MonitorLogging 全 action 自动落库(LogOperationEntity),本服务覆盖「按 Online 命令语义反查」的展示半边。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 134)] public class OnlineAssetAuditQueryService : IAdminApiController diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs index f63d13b9..8a1067bf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.GmCenter.Asset; /// -/// Online 资产人工发放/撤销受限命令服务(高危;权限码 onlineAssetGrantCommand:grant / :revoke 仅同步 TenantAdmin)。 +/// Online 资产人工发放/撤销受限命令服务(高危;权限码 onlineAssetGrantCommand:grant / :revoke 仅同步 Admin)。 /// /// 路由前缀 /api/onlineAssetGrantCommand(change C340 / vault:C4 S3.6「Admin 人工发放或撤销」六类来源之一)。 /// 经 调 Online Grant API——Admin 侧零直写(守护测试 OnlineAssetCommandWhitelistTests); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineAuditSourceKind.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineAuditSourceKind.cs index da40646a..e759c6f1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineAuditSourceKind.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineAuditSourceKind.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.GmCenter.Console.Dto; public enum OnlineAuditSourceKind { /// - /// Admin 操作日志(TenantLogOperationEntity,MonitorLogging 全 action 自动落库)。 + /// Admin 操作日志(LogOperationEntity,MonitorLogging 全 action 自动落库)。 /// AdminOperation = 1, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs index 39c859fd..0d4163a3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.GmCenter.Console.Dto; /// /// 受控操作命令输入参数(高危端点;change C344 / vault:C9 S8.1)。 /// -/// 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 TenantAdmin),Reason 与 +/// 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 Admin),Reason 与 /// ReviewerOperatorId 对全部四命令必填——双人复核字段落地 vault「审批(如需)」,不做通用审批流。 /// 目标标识按命令取值:CancelTicket → TicketId;EndAbnormalMatch → MatchId;SuspendResumePlayer / MatchIsolation → PlayerId。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSearchService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSearchService.cs index df212c1f..d02facdc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSearchService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSearchService.cs @@ -3,8 +3,8 @@ using GameFrameX.Application.ServerCenter.Online; using GameFrameX.Core.Enum; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Online; // S3/C401 断链修复点 namespace GameFrameX.Application.GmCenter.Console; @@ -12,9 +12,9 @@ namespace GameFrameX.Application.GmCenter.Console; /// /// Online 控制台统一审计检索服务。路由前缀 /api/onlineAuditSearch(change C344 / vault:C9 S8.2)。 /// -/// 三来源实时归并(Admin 侧零事件镜像、零落地表):Admin 操作日志(, +/// 三来源实时归并(Admin 侧零事件镜像、零落地表):Admin 操作日志(, /// MonitorLogging 全 action 自动落库)+ Online 审计事件(IOnlineServerClient 实时透传)+ 各域命令事实源表 -/// (处罚落账 / 配置灰度 )。 +/// (处罚落账 / 配置灰度 )。 /// 三来源 → 五维统一字段的映射唯一来源是 ,本 Service 不散落第二套映射。 /// /// @@ -32,8 +32,8 @@ public class OnlineAuditSearchService : IAdminApiController private const string QueryOnlineAuditEventsAction = "query_online_audit_events"; private readonly SqlSugarRepository _operationLogRepository; - private readonly SqlSugarRepository _penaltyRepository; - private readonly SqlSugarRepository _rolloutRepository; + private readonly SqlSugarRepository _penaltyRepository; + private readonly SqlSugarRepository _rolloutRepository; private readonly IOnlineServerClient _onlineServerClient; private readonly OnlineScopeContextFactory _scopeContextFactory; @@ -42,8 +42,8 @@ public class OnlineAuditSearchService : IAdminApiController /// public OnlineAuditSearchService( SqlSugarRepository operationLogRepository, - SqlSugarRepository penaltyRepository, - SqlSugarRepository rolloutRepository, + SqlSugarRepository penaltyRepository, + SqlSugarRepository rolloutRepository, IOnlineServerClient onlineServerClient, OnlineScopeContextFactory scopeContextFactory) { @@ -122,7 +122,7 @@ public async Task PageAsync(PageOnlineAuditSearch private async Task> QueryAdminOperationSourceAsync(PageOnlineAuditSearchRequest input, long? cursorSeconds) { var current = await QueryOperationLogsAsync(_operationLogRepository.AsQueryable(), input, cursorSeconds); - var historical = await QueryOperationLogsAsync(_operationLogRepository.Context.Queryable(), input, cursorSeconds); + var historical = await QueryOperationLogsAsync(_operationLogRepository.Context.Queryable(), input, cursorSeconds); current.AddRange(historical); return current; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs index 9285586f..87c2557d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs @@ -1,8 +1,8 @@ using System.Text.Json; using GameFrameX.Application.GmCenter.Console.Dto; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Online; namespace GameFrameX.Application.GmCenter.Console; @@ -11,12 +11,12 @@ namespace GameFrameX.Application.GmCenter.Console; /// /// 三来源口径(Admin 侧零事件镜像,全部实时读取原表/透传 Online): /// -/// AdminOperation:(租户操作日志, +/// AdminOperation:(租户操作日志, /// MonitorLogging 全 action 自动落库)——操作者取账号,目标对象/作用域从 RequestParam JSON 尽力提取 /// (提取不到即 null,不伪造);命令类型取 Controller.Action;时间取 LogDateTime。 /// OnlineAuditEvent:Online 审计事件(经 IOnlineServerClient 实时透传)——五维直映。 -/// DomainCommandRecord:各域命令事实源表——处罚落账(,C350) -/// 与配置灰度发布记录(,C343);资产人工发放/撤销的审计在 Online 侧, +/// DomainCommandRecord:各域命令事实源表——处罚落账(,C350) +/// 与配置灰度发布记录(,C343);资产人工发放/撤销的审计在 Online 侧, /// 由 OnlineAuditEvent 来源覆盖(本地无镜像表)。 /// /// 禁止在 Service 内散落第二套映射——新增来源必须回到本文件登记并同步守护说明。 @@ -89,7 +89,7 @@ public static OnlineAuditSearchEntryResponse FromOnlineAuditEvent(OnlineAuditEve /// /// 处罚落账行(C350 事实源)→ 统一审计行。 /// - public static OnlineAuditSearchEntryResponse FromPenaltyRecord(TenantGamePenaltyEntity penalty) + public static OnlineAuditSearchEntryResponse FromPenaltyRecord(GamePenaltyEntity penalty) { return new OnlineAuditSearchEntryResponse { @@ -107,7 +107,7 @@ public static OnlineAuditSearchEntryResponse FromPenaltyRecord(TenantGamePenalty /// /// 配置灰度发布记录行(C343 事实源)→ 统一审计行。 /// - public static OnlineAuditSearchEntryResponse FromConfigRolloutRecord(TenantGameOnlineConfigRolloutEntity rollout) + public static OnlineAuditSearchEntryResponse FromConfigRolloutRecord(GameOnlineConfigRolloutEntity rollout) { return new OnlineAuditSearchEntryResponse { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs index 98369bb3..a73d7d8a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.GmCenter.Console; /// -/// Online 控制台受控操作命令服务(高危;权限码 onlineControlledCommand:execute 仅同步 TenantAdmin)。 +/// Online 控制台受控操作命令服务(高危;权限码 onlineControlledCommand:execute 仅同步 Admin)。 /// /// 路由前缀 /api/onlineControlledCommand(change C344 / vault:C9 S8.1)。 /// 只承载四条新命令( 严格四值),经 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/AntiCheatEventIdempotencyStore.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/AntiCheatEventIdempotencyStore.cs index efec6185..5e931f9d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/AntiCheatEventIdempotencyStore.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/AntiCheatEventIdempotencyStore.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Idempotency; using GameFrameX.Foundation.Utility; using SqlSugar; @@ -30,19 +30,19 @@ public sealed class AntiCheatEventIdempotencyStore : IIdempotencyStore /// public const string RequestDigest = "anti-cheat-key-replay"; - private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _repository; /// /// 占位模板:携带全部业务字段(含 IdempotencyKey),占位成功即事件入账。 /// - private readonly TenantGameAntiCheatEventEntity _eventTemplate; + private readonly GameAntiCheatEventEntity _eventTemplate; /// /// 初始化存储。 /// /// 事件仓储(租户路由)。 /// 占位模板(业务字段已就绪,IdempotencyKey 以占位记录为准覆盖)。 - public AntiCheatEventIdempotencyStore(SqlSugarRepository repository, TenantGameAntiCheatEventEntity eventTemplate) + public AntiCheatEventIdempotencyStore(SqlSugarRepository repository, GameAntiCheatEventEntity eventTemplate) { _repository = repository; _eventTemplate = eventTemplate; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/AddTenantGameAntiCheatEventRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/AddGameAntiCheatEventRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/AddTenantGameAntiCheatEventRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/AddGameAntiCheatEventRequest.cs index 7c5a9026..16b61b35 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/AddTenantGameAntiCheatEventRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/AddGameAntiCheatEventRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.GmCenter.GameAntiCheatEvent.Dto; /// /// 反作弊事件上报输入(SubmitAsync 接入)。不含复核相关字段——上报一律落 Pending,复核由 ReviewAsync 动作单独驱动。 /// -public class AddTenantGameAntiCheatEventRequest : BaseAddRequest +public class AddGameAntiCheatEventRequest : BaseAddRequest { /// /// 上报来源 Provider。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/PageTenantGameAntiCheatEventRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/PageGameAntiCheatEventRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/PageTenantGameAntiCheatEventRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/PageGameAntiCheatEventRequest.cs index 2eff1f93..97d39101 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/PageTenantGameAntiCheatEventRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/PageGameAntiCheatEventRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.GmCenter.GameAntiCheatEvent.Dto; /// /// 反作弊事件分页查询输入。 /// -public class PageTenantGameAntiCheatEventRequest : BasePageRequest +public class PageGameAntiCheatEventRequest : BasePageRequest { /// /// Provider 过滤。可空。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/UpdateTenantGameAntiCheatEventReviewRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/UpdateGameAntiCheatEventReviewRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/UpdateTenantGameAntiCheatEventReviewRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/UpdateGameAntiCheatEventReviewRequest.cs index a7f360ca..cbb078d7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/UpdateTenantGameAntiCheatEventReviewRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/Dto/UpdateGameAntiCheatEventReviewRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.GmCenter.GameAntiCheatEvent.Dto; /// /// 反作弊事件人工复核输入(ReviewAsync 动作)。仅允许在 Pending 状态下迁移到 Approved/Rejected/Escalated。 /// -public class UpdateTenantGameAntiCheatEventReviewRequest : BaseUpdateRequest +public class UpdateGameAntiCheatEventReviewRequest : BaseUpdateRequest { /// /// 目标复核状态。仅允许 Approved / Rejected / Escalated(不允许回到 Pending)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/GameAntiCheatEventService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/GameAntiCheatEventService.cs index 3a467678..d718766c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/GameAntiCheatEventService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/GameAntiCheatEventService.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.GmCenter.GameAntiCheatEvent.Dto; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Core.Const; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Enum; using GameFrameX.Foundation.Idempotency; @@ -14,7 +14,7 @@ namespace GameFrameX.Application.GmCenter.GameAntiCheatEvent; /// [ApiDescriptionSettings(Order = 100)] public sealed class GameAntiCheatEventService - : BaseService + : BaseService { /// /// 合法的人工复核目标状态(Pending → Approved/Rejected/Escalated 单向迁移)。 @@ -27,7 +27,7 @@ public sealed class GameAntiCheatEventService ManualReviewStateEnum.Escalated, }; - public GameAntiCheatEventService(SqlSugarRepository repository) + public GameAntiCheatEventService(SqlSugarRepository repository) : base(repository) { } @@ -38,7 +38,7 @@ public GameAntiCheatEventService(SqlSugarRepository> PageAsync( - PageTenantGameAntiCheatEventRequest input) + PageGameAntiCheatEventRequest input) { var targetId = string.IsNullOrWhiteSpace(input.TargetId) ? null : input.TargetId.Trim(); var query = Repository.AsQueryable() @@ -76,7 +76,7 @@ public async Task DetailAsync([FromQuery] BaseIdRequ /// [HttpPost("submit")] [ApiDescriptionSettings(Name = "Submit")] - public async Task SubmitAsync(AddTenantGameAntiCheatEventRequest input) + public async Task SubmitAsync(AddGameAntiCheatEventRequest input) { var idempotencyKey = input.IdempotencyKey?.Trim() ?? string.Empty; if (idempotencyKey.Length == 0) @@ -84,7 +84,7 @@ public async Task SubmitAsync(AddTenantGameAntiCheat throw BusinessError.Oh("幂等键不能为空"); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.ManualReviewState = ManualReviewStateEnum.Pending; #pragma warning disable CS8625 // 新建反作弊事件初始化字段为 null(DB schema 允许 null;= null! 仅满足 CS8618) entity.ReviewerId = null; @@ -117,7 +117,7 @@ public async Task SubmitAsync(AddTenantGameAntiCheat /// [HttpPost("review")] [ApiDescriptionSettings(Name = "Review")] - public async Task ReviewAsync(UpdateTenantGameAntiCheatEventReviewRequest input) + public async Task ReviewAsync(UpdateGameAntiCheatEventReviewRequest input) { if (!ValidReviewTargets.Contains(input.ManualReviewState)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/AddTenantGameReportEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/AddGameReportEntityRequest.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/AddTenantGameReportEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/AddGameReportEntityRequest.cs index 4bf7e831..0fd7a0b2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/AddTenantGameReportEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/AddGameReportEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.GmCenter.GameReport.Dto; /// /// 举报新增输入参数。Status / HandlerId 服务端强制(Status=Pending,HandlerId=null)。 /// -public class AddTenantGameReportEntityRequest : BaseAddRequest +public class AddGameReportEntityRequest : BaseAddRequest { /// /// 举报人 UserId。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/GameReportResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/GameReportResponse.cs index 8cc31cf8..3ff1efa4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/GameReportResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/GameReportResponse.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.GmCenter.GameReport.Dto; /// /// 举报输出参数(含处理人 / 结果处罚关联,供后台只读展示)。 /// -public class GameReportResponse : IBasePageResponse +public class GameReportResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/LinkPenaltyTenantGameReportEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/LinkPenaltyGameReportEntityRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/LinkPenaltyTenantGameReportEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/LinkPenaltyGameReportEntityRequest.cs index 8dbc48c4..6e9045e3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/LinkPenaltyTenantGameReportEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/LinkPenaltyGameReportEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.GmCenter.GameReport.Dto; /// /// 举报关联处罚输入参数。仅 Confirmed 举报可关联;不自动创建处罚(创建走 GamePenaltyService.AddAsync)。 /// -public class LinkPenaltyTenantGameReportEntityRequest +public class LinkPenaltyGameReportEntityRequest { /// /// 举报 Id。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/PageTenantGameReportEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/PageGameReportEntityRequest.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/PageTenantGameReportEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/PageGameReportEntityRequest.cs index 59601e67..d4d32732 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/PageTenantGameReportEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/PageGameReportEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.GmCenter.GameReport.Dto; /// /// 举报分页查询输入参数。 /// -public class PageTenantGameReportEntityRequest : BasePageRequest +public class PageGameReportEntityRequest : BasePageRequest { /// /// 被举报对象类型(可选过滤)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/UpdateTenantGameReportEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/UpdateGameReportEntityRequest.cs similarity index 76% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/UpdateTenantGameReportEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/UpdateGameReportEntityRequest.cs index 572b922c..2a444a84 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/UpdateTenantGameReportEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/Dto/UpdateGameReportEntityRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.GmCenter.GameReport.Dto; /// /// 举报更新输入参数。举报为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。 /// -public class UpdateTenantGameReportEntityRequest : BaseUpdateRequest +public class UpdateGameReportEntityRequest : BaseUpdateRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/GameReportService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/GameReportService.cs index 8853289a..9789f582 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/GameReportService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameReport/GameReportService.cs @@ -6,21 +6,21 @@ namespace GameFrameX.Application.GmCenter.GameReport; /// -/// 举报事实源管理服务。路由前缀 /api/tenantGameReportEntity。 +/// 举报事实源管理服务。路由前缀 /api/gameReportEntity。 /// AddAsync:服务端强制 Status=Pending、HandlerId=null。 /// LinkPenaltyAsync:仅 Confirmed 举报可关联已存在处罚;写 ResultPenaltyId + HandlerId,不自动创建处罚。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameReportService - : GenericCrudService + : GenericCrudService { private readonly CurrentUserContext _currentUserContext; - private readonly SqlSugarRepository _penaltyRepository; + private readonly SqlSugarRepository _penaltyRepository; - public GameReportService(SqlSugarRepository repository, - SqlSugarRepository penaltyRepository, + public GameReportService(SqlSugarRepository repository, + SqlSugarRepository penaltyRepository, CurrentUserContext currentUserContext) : base(repository) { @@ -31,7 +31,7 @@ public GameReportService(SqlSugarRepository /// 录入举报:Status/HandlerId 服务端强制。 /// - public override async Task AddAsync(AddTenantGameReportEntityRequest input) + public override async Task AddAsync(AddGameReportEntityRequest input) { if (string.IsNullOrWhiteSpace(input.TargetId)) { @@ -43,7 +43,7 @@ public override async Task AddAsync(AddTenantGameReportEntit throw BusinessError.Oh("证据JSON不能为空"); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Status = ReportStatusEnum.Pending; entity.HandlerId = null; await Repository.InsertWithDiffLogAsync(entity); @@ -53,7 +53,7 @@ public override async Task AddAsync(AddTenantGameReportEntit /// /// 分页查询:按 TargetType / TargetId / ReportType / Status 过滤。 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameReportEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameReportEntityRequest input) { return Repository.AsQueryable() @@ -70,7 +70,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenant /// [HttpPost("linkPenalty")] [ApiDescriptionSettings(Name = "LinkPenalty")] - public async Task LinkPenaltyAsync(LinkPenaltyTenantGameReportEntityRequest input) + public async Task LinkPenaltyAsync(LinkPenaltyGameReportEntityRequest input) { var report = await Repository.GetFirstAsync(r => r.Id == input.Id); if (report == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/Dto/PageTenantGameOnlineConfigRolloutRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/Dto/PageGameOnlineConfigRolloutRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/Dto/PageTenantGameOnlineConfigRolloutRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/Dto/PageGameOnlineConfigRolloutRequest.cs index c8698ab5..31d6e5a6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/Dto/PageTenantGameOnlineConfigRolloutRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/Dto/PageGameOnlineConfigRolloutRequest.cs @@ -8,7 +8,7 @@ namespace GameFrameX.Application.GmCenter.LiveOps.ConfigRollout.Dto; /// /// 配置灰度版本行分页查询输入(来源 change C343 / vault:C8 S7.7)。 /// -public sealed class PageTenantGameOnlineConfigRolloutRequest : BasePageRequest +public sealed class PageGameOnlineConfigRolloutRequest : BasePageRequest { /// /// 配置族过滤。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/GameOnlineConfigRolloutService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/GameOnlineConfigRolloutService.cs index b2e166e3..0df325e8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/GameOnlineConfigRolloutService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/ConfigRollout/GameOnlineConfigRolloutService.cs @@ -11,12 +11,12 @@ using GameFrameX.Core.Enum.Errors; using GameFrameX.Core.Service.User; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game.Online; namespace GameFrameX.Application.GmCenter.LiveOps.ConfigRollout; /// -/// 配置灰度发布(Rollout)版本行管理服务(来源 change C343 / vault:C8 S7.7-S7.8)。路由前缀 /api/tenantGameOnlineConfigRollout(去后缀 + lowerCamelCase)。 +/// 配置灰度发布(Rollout)版本行管理服务(来源 change C343 / vault:C8 S7.7-S7.8)。路由前缀 /api/gameOnlineConfigRollout(去后缀 + lowerCamelCase)。 /// 版本化铁律:版本行只由 publish / rollback 两个动作追加,历史行不可修改不可删除(无 add/update/delete action); /// ConfigVersion 按 ConfigKind + ConfigKey 维度递增分配(发布与回滚共用序列); /// 回滚 = 版本化新下发(新行 + TargetVersion 指向恢复目标,语义对照见 OnlineRolloutSemanticMap), @@ -27,8 +27,8 @@ namespace GameFrameX.Application.GmCenter.LiveOps.ConfigRollout; [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameOnlineConfigRolloutService : IAdminApiController { - private readonly SqlSugarRepository _repository; - private readonly SqlSugarRepository _segmentRepository; + private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _segmentRepository; private readonly IOnlineLiveOpsDispatchService _dispatchService; private readonly CurrentUserContext _currentUserContext; @@ -39,8 +39,8 @@ public class GameOnlineConfigRolloutService : IAdminApiController /// /// /// - public GameOnlineConfigRolloutService(SqlSugarRepository repository, - SqlSugarRepository segmentRepository, + public GameOnlineConfigRolloutService(SqlSugarRepository repository, + SqlSugarRepository segmentRepository, IOnlineLiveOpsDispatchService dispatchService, CurrentUserContext currentUserContext) { @@ -56,7 +56,7 @@ public GameOnlineConfigRolloutService(SqlSugarRepository> PageAsync(PageTenantGameOnlineConfigRolloutRequest input) + public async Task> PageAsync(PageGameOnlineConfigRolloutRequest input) { return await _repository.AsQueryable() .WhereIF(input.ConfigKind.HasValue, u => u.ConfigKind == input.ConfigKind.Value) @@ -81,7 +81,7 @@ public async Task PublishAsync(PublishConfigRollou await EnsureConfigSourceAsync(input.ConfigKind, input.ConfigKey); var segment = await EnsureSegmentSyncedAsync(input.SegmentId); - var entity = new TenantGameOnlineConfigRolloutEntity + var entity = new GameOnlineConfigRolloutEntity { ServerId = input.ServerId, ConfigKind = input.ConfigKind, @@ -133,7 +133,7 @@ public async Task RollbackAsync(RollbackConfigRol new { input.ConfigKind, configKey, input.TargetVersion, message = "回滚目标版本不存在", }); } - var entity = new TenantGameOnlineConfigRolloutEntity + var entity = new GameOnlineConfigRolloutEntity { ServerId = input.ServerId, ConfigKind = input.ConfigKind, @@ -202,7 +202,7 @@ private async Task EnsureConfigSourceAsync(OnlineConfigRolloutKind kind, string /// /// 分群校验:必须存在且已同步 Online(未同步分群 Online 无法解释命中)。 /// - private async Task EnsureSegmentSyncedAsync(long segmentId) + private async Task EnsureSegmentSyncedAsync(long segmentId) { var segment = await _segmentRepository.GetFirstAsync(u => u.Id == segmentId); if (segment == null) @@ -234,14 +234,14 @@ private async Task AllocateConfigVersionAsync(OnlineConfigRolloutKind kind, /// /// 下发确认收尾:回写 Online 确认版本 + 将同配置其余生效行(Published)置 RolledBack(新版本替代,历史行不可变仅状态流转)。 /// - private async Task ConfirmDispatchedAsync(TenantGameOnlineConfigRolloutEntity entity, string? confirmVersion) + private async Task ConfirmDispatchedAsync(GameOnlineConfigRolloutEntity entity, string? confirmVersion) { entity.OnlineConfirmVersion = confirmVersion; await _repository.Context.Updateable(entity) .UpdateColumns(p => new { p.OnlineConfirmVersion, }) .ExecuteCommandAsync(); - await _repository.Context.Updateable() + await _repository.Context.Updateable() .SetColumns(p => p.Status == OnlineConfigRolloutStatus.RolledBack) .Where(u => u.ConfigKind == entity.ConfigKind && u.ConfigKey == entity.ConfigKey diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/IOnlineLiveOpsDispatchService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/IOnlineLiveOpsDispatchService.cs index d45296f0..1d9d46cf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/IOnlineLiveOpsDispatchService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/IOnlineLiveOpsDispatchService.cs @@ -1,6 +1,6 @@ using GameFrameX.Application.GmCenter.LiveOps.Dispatch.Dto; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game.Online; namespace GameFrameX.Application.GmCenter.LiveOps.Dispatch; @@ -45,7 +45,7 @@ public interface IOnlineLiveOpsDispatchService /// 同步理由(审计)。 /// 同步结果(Online 分群标识 + 确认版本)。 /// 作用域越界 / Online 协议码非 0(镜像段透出)。 - Task SyncSegmentToOnlineAsync(TenantGameOnlinePlayerSegmentEntity segment, long serverId, string reason); + Task SyncSegmentToOnlineAsync(GameOnlinePlayerSegmentEntity segment, long serverId, string reason); /// /// 灰度发布下发 Online(publishConfigRollout;调用前版本行已由灰度 Service 分配 ConfigVersion)。 @@ -53,7 +53,7 @@ public interface IOnlineLiveOpsDispatchService /// 已落库的发布版本行(含 ServerId/ConfigKind/ConfigKey/ConfigVersion/SegmentId/Percent)。 /// 下发结果(Online 确认版本回执,原样回写版本行)。 /// 作用域越界 / Online 协议码非 0(镜像段透出)。 - Task PublishRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout); + Task PublishRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout); /// /// 灰度回滚下发 Online(rollbackConfigRollout;回滚 = 版本化新下发,TargetVersion 指向目标历史版本)。 @@ -61,5 +61,5 @@ public interface IOnlineLiveOpsDispatchService /// 已落库的回滚版本行(Status=Published、TargetVersion>0 的版本化新行)。 /// 下发结果(Online 确认版本回执,原样回写版本行)。 /// 作用域越界 / Online 协议码非 0(镜像段透出)。 - Task RollbackRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout); + Task RollbackRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/OnlineLiveOpsDispatchService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/OnlineLiveOpsDispatchService.cs index c2c199ef..4869dfe1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/OnlineLiveOpsDispatchService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/Dispatch/OnlineLiveOpsDispatchService.cs @@ -12,11 +12,11 @@ using GameFrameX.Core.Service.User; using GameFrameX.Entity.Game.Mail; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Device; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Announcement; -using GameFrameX.Entity.Tenant.Game.Online; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Device; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Announcement; +using GameFrameX.Entity.Business.Game.Online; +using GameFrameX.Entity.Business.Game.RemoteConfig; // S3/C401 断链修复点 namespace GameFrameX.Application.GmCenter.LiveOps.Dispatch; @@ -72,11 +72,11 @@ public class OnlineLiveOpsDispatchService : IOnlineLiveOpsDispatchService, IAdmi private readonly IOnlineServerClient _onlineServerClient; private readonly OnlineScopeContextFactory _scopeFactory; - private readonly SqlSugarRepository _remoteConfigRepository; - private readonly SqlSugarRepository _deviceGroupRepository; - private readonly SqlSugarRepository _timeJobRepository; - private readonly SqlSugarRepository _announcementRepository; - private readonly SqlSugarRepository _mailCampaignRepository; + private readonly SqlSugarRepository _remoteConfigRepository; + private readonly SqlSugarRepository _deviceGroupRepository; + private readonly SqlSugarRepository _timeJobRepository; + private readonly SqlSugarRepository _announcementRepository; + private readonly SqlSugarRepository _mailCampaignRepository; /// /// @@ -90,11 +90,11 @@ public class OnlineLiveOpsDispatchService : IOnlineLiveOpsDispatchService, IAdmi /// public OnlineLiveOpsDispatchService(IOnlineServerClient onlineServerClient, OnlineScopeContextFactory scopeFactory, - SqlSugarRepository remoteConfigRepository, - SqlSugarRepository deviceGroupRepository, - SqlSugarRepository timeJobRepository, - SqlSugarRepository announcementRepository, - SqlSugarRepository mailCampaignRepository) + SqlSugarRepository remoteConfigRepository, + SqlSugarRepository deviceGroupRepository, + SqlSugarRepository timeJobRepository, + SqlSugarRepository announcementRepository, + SqlSugarRepository mailCampaignRepository) { _onlineServerClient = onlineServerClient; _scopeFactory = scopeFactory; @@ -217,7 +217,7 @@ public async Task DispatchAsync(OnlineLiveOpsDisp /// [NonAction] - public async Task SyncSegmentToOnlineAsync(TenantGameOnlinePlayerSegmentEntity segment, long serverId, string reason) + public async Task SyncSegmentToOnlineAsync(GameOnlinePlayerSegmentEntity segment, long serverId, string reason) { var scope = await _scopeFactory.CreateAsync(serverId, ActionSyncPlayerSegment + ":" + segment.Id); var ack = await _onlineServerClient.PostAsync(ActionSyncPlayerSegment, @@ -242,7 +242,7 @@ public async Task SyncSegmentToOnlineAsync(Tena /// [NonAction] - public async Task PublishRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout) + public async Task PublishRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout) { var scope = await _scopeFactory.CreateAsync(rollout.ServerId, ActionPublishConfigRollout + ":" + rollout.ConfigKey + ":v" + rollout.ConfigVersion); var ack = await _onlineServerClient.PostAsync(ActionPublishConfigRollout, @@ -262,7 +262,7 @@ public async Task PublishRolloutToOnlineAsy /// [NonAction] - public async Task RollbackRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout) + public async Task RollbackRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout) { // 回滚 = 版本化新下发:以新 ConfigVersion 行下发 rollbackConfigRollout,TargetVersion 指向要恢复的历史版本(语义对照见 OnlineRolloutSemanticMap)。 var scope = await _scopeFactory.CreateAsync(rollout.ServerId, ActionRollbackConfigRollout + ":" + rollout.ConfigKey + ":v" + rollout.ConfigVersion + "->" + rollout.TargetVersion); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/AddTenantGameOnlinePlayerSegmentRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/AddGameOnlinePlayerSegmentRequest.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/AddTenantGameOnlinePlayerSegmentRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/AddGameOnlinePlayerSegmentRequest.cs index 8b54b103..78c345cc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/AddTenantGameOnlinePlayerSegmentRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/AddGameOnlinePlayerSegmentRequest.cs @@ -5,6 +5,6 @@ namespace GameFrameX.Application.GmCenter.LiveOps.PlayerSegment.Dto; /// /// 新增玩家分群输入。 /// -public sealed class AddTenantGameOnlinePlayerSegmentRequest : GameOnlinePlayerSegmentBaseRequest +public sealed class AddGameOnlinePlayerSegmentRequest : GameOnlinePlayerSegmentBaseRequest { } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/PageTenantGameOnlinePlayerSegmentRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/PageGameOnlinePlayerSegmentRequest.cs similarity index 88% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/PageTenantGameOnlinePlayerSegmentRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/PageGameOnlinePlayerSegmentRequest.cs index bfff3ac7..5742e418 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/PageTenantGameOnlinePlayerSegmentRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/PageGameOnlinePlayerSegmentRequest.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.GmCenter.LiveOps.PlayerSegment.Dto; /// /// 玩家分群分页查询输入。 /// -public sealed class PageTenantGameOnlinePlayerSegmentRequest : BasePageRequest +public sealed class PageGameOnlinePlayerSegmentRequest : BasePageRequest { /// /// 名称模糊过滤。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/UpdateTenantGameOnlinePlayerSegmentRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/UpdateGameOnlinePlayerSegmentRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/UpdateTenantGameOnlinePlayerSegmentRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/UpdateGameOnlinePlayerSegmentRequest.cs index b272b332..f66b7282 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/UpdateTenantGameOnlinePlayerSegmentRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/UpdateGameOnlinePlayerSegmentRequest.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.GmCenter.LiveOps.PlayerSegment.Dto; /// /// 更新玩家分群输入(编辑定义后须重新 syncOnline 生效)。 /// -public sealed class UpdateTenantGameOnlinePlayerSegmentRequest : GameOnlinePlayerSegmentBaseRequest +public sealed class UpdateGameOnlinePlayerSegmentRequest : GameOnlinePlayerSegmentBaseRequest { // 同步状态机字段不在 BaseRequest:Adapt 后 enum/long 默认 0 穿透 IgnoreColumns 写库, // 会把同步回执清零(见 OnUpdatingAsync 回填),与 MailCampaign Update 同范式。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/GameOnlinePlayerSegmentService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/GameOnlinePlayerSegmentService.cs index f1086e3e..3fbccbbe 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/GameOnlinePlayerSegmentService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/GameOnlinePlayerSegmentService.cs @@ -9,25 +9,25 @@ using GameFrameX.Application.GmCenter.LiveOps.PlayerSegment.Dto; using GameFrameX.Application.GmCenter.RolloutSemanticMap; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game.Online; using GameFrameX.Foundation.Json; #pragma warning disable CS8602, CS8604 // WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Trim() 实际安全 namespace GameFrameX.Application.GmCenter.LiveOps.PlayerSegment; /// -/// 玩家分群管理服务(来源 change C343 / vault:C8 S7.5)。路由前缀 /api/tenantGameOnlinePlayerSegment(去后缀 + lowerCamelCase)。 +/// 玩家分群管理服务(来源 change C343 / vault:C8 S7.5)。路由前缀 /api/gameOnlinePlayerSegment(去后缀 + lowerCamelCase)。 /// Admin 只编排分群定义(名称 + 条件白名单校验),不解释、不复算命中(语义解释在 Online 侧,对照见 OnlineRolloutSemanticMap); /// 定义生效须经 syncOnline 经统一下发入口同步 Online(Online 分配分群标识回写 LastOnlineSegmentId); /// 编辑定义不会自动重同步,须再次 syncOnline(显式生效,避免隐式半生效状态)。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameOnlinePlayerSegmentService - : GenericCrudService + : GenericCrudService { - private readonly SqlSugarRepository _rolloutRepository; + private readonly SqlSugarRepository _rolloutRepository; private readonly IOnlineLiveOpsDispatchService _dispatchService; /// @@ -36,8 +36,8 @@ public class GameOnlinePlayerSegmentService /// /// /// - public GameOnlinePlayerSegmentService(SqlSugarRepository repository, - SqlSugarRepository rolloutRepository, + public GameOnlinePlayerSegmentService(SqlSugarRepository repository, + SqlSugarRepository rolloutRepository, IOnlineLiveOpsDispatchService dispatchService) : base(repository) { @@ -48,7 +48,7 @@ public GameOnlinePlayerSegmentService(SqlSugarRepository /// 分页查询:按 Name / SyncStatus 过滤。 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameOnlinePlayerSegmentRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameOnlinePlayerSegmentRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) @@ -59,7 +59,7 @@ protected override ISugarQueryable BuildPageQue /// /// 新增前:条件白名单校验(初始 NotSynced,须 syncOnline 后才可被灰度引用)。 /// - protected override Task OnAddingAsync(AddTenantGameOnlinePlayerSegmentRequest input) + protected override Task OnAddingAsync(AddGameOnlinePlayerSegmentRequest input) { ValidateConditions(input.ConditionsJson); return Task.CompletedTask; @@ -68,7 +68,7 @@ protected override Task OnAddingAsync(AddTenantGameOnlinePlayerSegmentRequest in /// /// 更新前:同步状态机字段从既有实体回填(同步回执不可经编辑清除)。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameOnlinePlayerSegmentRequest input) + protected override async Task OnUpdatingAsync(UpdateGameOnlinePlayerSegmentRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs index 4af8b72d..1037c9af 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs @@ -12,7 +12,7 @@ namespace GameFrameX.Application.GmCenter.RolloutSemanticMap; /// 灰度维度SegmentId(玩家分群行)+ Percent玩家 / 事件数据维度命中 + 百分比桶稳定展开,命中记录可查(VC-7.11)设备维度(deviceId) /// 百分比语义PublishPercentMin=1 ~ PublishPercentMax=100(发布语义:0 无意义即拒绝,100 全量)桶序 < percent 即命中,分群未命中直接不生效记录级 RolloutPercent 0-100:0=关闭、100=全量(Math.Clamp 防漂移) /// 短路优先级不设白名单(Admin 不编排个体豁免)分群命中是前置条件,百分比只在分群内展开DeviceWhitelistJson 白名单命中即生效(先于百分比) -/// 稳定性依据不承诺(Admin 不计算桶)同一玩家对同一版本的桶归属稳定(重复判定结果一致,可回溯命中记录)稳定桶 = SHA256(tenantId:appId:deviceId:recordId) % 100,同键恒定 +/// 稳定性依据不承诺(Admin 不计算桶)同一玩家对同一版本的桶归属稳定(重复判定结果一致,可回溯命中记录)稳定桶 = SHA256(id:appId:deviceId:recordId) % 100,同键恒定 /// 回滚语义回滚 = 版本化新下发(新 ConfigVersion 行 + TargetVersion 指向目标历史版本;旧行置 RolledBack 不可变)按新版本命令生效,Online 侧确认版本回执(VC-7.12:回滚后行为恢复 + 审计完整)无版本概念(记录级覆盖),不适用于本对照行 /// /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs index 6df9a7cc..4b8457cb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.GmCenter.Social.Dto; /// -/// 处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。 +/// 处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 Admin)。 /// 作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。 /// public class OnlinePenaltyLinkRequest diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs index 43827867..fa2dbba6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.GmCenter.Social; /// -/// Online 处罚联动命令服务(高危;权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。 +/// Online 处罚联动命令服务(高危;权限码 onlinePenaltyLinkCommand:execute 仅同步 Admin)。 /// /// 路由前缀 /api/onlinePenaltyLinkCommand(change C350 / vault:C7、vault:C2 S1.4)。 /// 经 调 Online 显式命令接口(踢下线 / 吊销 Token / 禁言,三命令硬白名单,X3 红线); @@ -15,7 +15,7 @@ namespace GameFrameX.Application.GmCenter.Social; /// 一律经 ,不得绕过本服务直调 Online 命令接口(守护测试 OnlineSocialCommandWhitelistTests)。 /// /// -/// 语义契约:Admin 侧处罚事实仍以 TenantGamePenaltyEntity 为唯一事实源,本服务只把「已生效的事实」同步到 Online 运行时 +/// 语义契约:Admin 侧处罚事实仍以 GamePenaltyEntity 为唯一事实源,本服务只把「已生效的事实」同步到 Online 运行时 /// (事实源先行);联动失败不回滚事实源,可按 IdempotencyKey 重试(见 )。 /// /// @@ -37,8 +37,8 @@ public class OnlinePenaltyLinkCommandService : IAdminApiController /// private const string MutePlayerAction = "mute_player"; - private readonly SqlSugarRepository _penaltyRepository; - private readonly SqlSugarRepository _gameAreaRepository; + private readonly SqlSugarRepository _penaltyRepository; + private readonly SqlSugarRepository _gameAreaRepository; private readonly IOnlineServerClient _onlineServerClient; private readonly OnlineScopeContextFactory _scopeContextFactory; @@ -46,8 +46,8 @@ public class OnlinePenaltyLinkCommandService : IAdminApiController /// Online 处罚联动命令服务构造函数。 /// public OnlinePenaltyLinkCommandService( - SqlSugarRepository penaltyRepository, - SqlSugarRepository gameAreaRepository, + SqlSugarRepository penaltyRepository, + SqlSugarRepository gameAreaRepository, IOnlineServerClient onlineServerClient, OnlineScopeContextFactory scopeContextFactory) { @@ -73,7 +73,7 @@ public Task ExecuteAsync(OnlinePenaltyLinkRequest inp /// /// 联动命令唯一执行入口(供处置流与 gamePenaltyEntity 页同步动作复用)。 /// - /// 「事实源先行、联动可重试」:调用前处罚事实必须已写入 TenantGamePenaltyEntity 且处于生效中—— + /// 「事实源先行、联动可重试」:调用前处罚事实必须已写入 GamePenaltyEntity 且处于生效中—— /// Online 命令只是把既有事实生效到运行时,本方法不产生任何新处罚;联动失败不影响事实源状态, /// 重新调用同(PenaltyId, Command, ServerId)组合时 Online 侧按 IdempotencyKey 返回首次结果(vault:C2 S1.5), /// 因此重试天然幂等,不会重复处罚。 @@ -121,7 +121,7 @@ public async Task ExecuteLinkAsync(long penaltyId, On /// /// 确定联动目标区服集:处罚行 AreaId 有值 = 单区服;null(全区服生效)= App 下全部区服逐一联动。 /// - private async Task> ResolveLinkTargetServerIdsAsync(TenantGamePenaltyEntity penalty) + private async Task> ResolveLinkTargetServerIdsAsync(GamePenaltyEntity penalty) { if (penalty.AreaId.HasValue) { @@ -143,7 +143,7 @@ private async Task> ResolveLinkTargetServerIdsAsync(TenantGamePenalty /// 向单个区服下发联动命令并落一条结果(含旧 Token 吊销确认字段)。 /// 单区服命令失败(Online 业务码 / 传输异常)不中断其余区服——聚合语义下逐区服呈现成败,可针对性重试。 /// - private async Task ExecuteForServerAsync(TenantGamePenaltyEntity penalty, OnlinePenaltyCommandKind command, long serverId) + private async Task ExecuteForServerAsync(GamePenaltyEntity penalty, OnlinePenaltyCommandKind command, long serverId) { var action = MapCommandToAction(command); try @@ -225,7 +225,7 @@ private static string MapCommandToAction(OnlinePenaltyCommandKind command) /// /// 构建联动命令幂等键:penalty-{PenaltyId}-{command}-{serverId}。 /// - /// 为什么先写事实源:Admin 侧处罚以 TenantGamePenaltyEntity 为唯一事实源,Online 命令只负责「生效到运行时」; + /// 为什么先写事实源:Admin 侧处罚以 GamePenaltyEntity 为唯一事实源,Online 命令只负责「生效到运行时」; /// 若命令先于事实落库,联路中断会出现「运行时已被限制但 Admin 无记录」的不可审计状态。 /// 为什么重试幂等:同一(处罚 + 命令 + 区服)组合的重复调用携带相同 IdempotencyKey,Online 侧按 vault:C2 S1.5 /// 契约返回首次执行结果,不会重复踢人 / 重复吊销;因此联动失败可以直接安全重试(含 gamePenaltyEntity 页的手动同步)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlineReportCaseService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlineReportCaseService.cs index d4e6917f..ae2bcf59 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlineReportCaseService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlineReportCaseService.cs @@ -10,7 +10,7 @@ namespace GameFrameX.Application.GmCenter.Social; /// /// Online 举报案件处置服务。路由前缀 /api/onlineReportCase(change C350 / vault:C7)。 -/// 案件数据实时透传 Online(Admin 不落镜像);处置流三步:事实源写入(Mute/Ban 落 TenantGamePenaltyEntity) +/// 案件数据实时透传 Online(Admin 不落镜像);处置流三步:事实源写入(Mute/Ban 落 GamePenaltyEntity) /// → 联动命令(经 ,失败不回滚事实源、可重试)→ 当事人通知 + 案件状态回写 /// (失败不阻断处置,原因分别落响应字段)。三步状态经 MonitorLogging 自动落租户操作审计。 /// @@ -178,7 +178,7 @@ private async Task WritePenaltyFactAsync(OnlineReportHandle throw BusinessError.Oh(CommonErrorCode.ParameterValidationFailed, new { field = "DurationMinutes", }); } - return await _penaltyEntityService.AddAsync(new AddTenantGamePenaltyEntityRequest + return await _penaltyEntityService.AddAsync(new AddGamePenaltyEntityRequest { AreaId = input.ServerId, TargetType = PenaltyTargetTypeEnum.Account, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/AddTenantGameAnnouncementEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/AddGameAnnouncementEntityRequest.cs similarity index 62% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/AddTenantGameAnnouncementEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/AddGameAnnouncementEntityRequest.cs index b22d47ad..a53be918 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/AddTenantGameAnnouncementEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/AddGameAnnouncementEntityRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.NoticeCenter.GameAnnouncement.Dto; /// /// 游戏公告增加输入参数 /// -public class AddTenantGameAnnouncementEntityRequest : GameAnnouncementBaseRequest +public class AddGameAnnouncementEntityRequest : GameAnnouncementBaseRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/GameAnnouncementResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/GameAnnouncementResponse.cs index e3b11443..aa6969dd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/GameAnnouncementResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/GameAnnouncementResponse.cs @@ -1,11 +1,11 @@ using GameFrameX.Core.BaseInputOutput; -using GameFrameX.Entity.Tenant.Game.Announcement; +using GameFrameX.Entity.Business.Game.Announcement; namespace GameFrameX.Application.NoticeCenter.GameAnnouncement.Dto; /// /// 游戏公告输出参数 /// -public class GameAnnouncementResponse : TenantGameAnnouncementEntity, IBasePageResponse +public class GameAnnouncementResponse : GameAnnouncementEntity, IBasePageResponse { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/PageTenantGameAnnouncementEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/PageGameAnnouncementEntityRequest.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/PageTenantGameAnnouncementEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/PageGameAnnouncementEntityRequest.cs index aaf3f5fb..a46b67a3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/PageTenantGameAnnouncementEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/PageGameAnnouncementEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameAnnouncement.Dto; /// /// 游戏公告分页查询输入参数 /// -public class PageTenantGameAnnouncementEntityRequest : BaseAreaPageRequest +public class PageGameAnnouncementEntityRequest : BaseAreaPageRequest { /// /// 语言 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/UpdateTenantGameAnnouncementEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/UpdateGameAnnouncementEntityRequest.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/UpdateTenantGameAnnouncementEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/UpdateGameAnnouncementEntityRequest.cs index 683603dd..24b82a03 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/UpdateTenantGameAnnouncementEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/Dto/UpdateGameAnnouncementEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameAnnouncement.Dto; /// /// 游戏公告更新输入参数 /// -public class UpdateTenantGameAnnouncementEntityRequest : GameAnnouncementBaseRequest, ICrudUpdateRequest +public class UpdateGameAnnouncementEntityRequest : GameAnnouncementBaseRequest, ICrudUpdateRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/GameAnnouncementService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/GameAnnouncementService.cs index bc60cc88..09e99f5d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/GameAnnouncementService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameAnnouncement/GameAnnouncementService.cs @@ -11,13 +11,13 @@ namespace GameFrameX.Application.NoticeCenter.GameAnnouncement; /// 游戏公告服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameAnnouncementService : GenericCrudService +public class GameAnnouncementService : GenericCrudService { private const string DefaultLanguage = "default"; private readonly IOnlineLiveOpsDispatchService _dispatchService; public GameAnnouncementService( - SqlSugarRepository repository, + SqlSugarRepository repository, IOnlineLiveOpsDispatchService dispatchService) : base(repository) { _dispatchService = dispatchService; @@ -26,7 +26,7 @@ public GameAnnouncementService( /// /// 构建分页查询条件(含日期范围过滤) /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameAnnouncementEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameAnnouncementEntityRequest input) { var language = input.Language?.Trim(); var hasLanguage = !string.IsNullOrWhiteSpace(language); @@ -48,7 +48,7 @@ protected override ISugarQueryable BuildPageQuery(Page /// /// 新增前标准化多语言字段。 /// - protected override Task OnAddingAsync(AddTenantGameAnnouncementEntityRequest input) + protected override Task OnAddingAsync(AddGameAnnouncementEntityRequest input) { NormalizeInput(input); return Task.CompletedTask; @@ -57,7 +57,7 @@ protected override Task OnAddingAsync(AddTenantGameAnnouncementEntityRequest inp /// /// 更新前校验记录存在并标准化多语言字段。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameAnnouncementEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameAnnouncementEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/AddTenantGameBannerAnnouncementEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/AddGameBannerAnnouncementEntityRequest.cs similarity index 70% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/AddTenantGameBannerAnnouncementEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/AddGameBannerAnnouncementEntityRequest.cs index 0f5c6db6..df74141f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/AddTenantGameBannerAnnouncementEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/AddGameBannerAnnouncementEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameBannerAnnouncement.Dto; /// /// 游戏内横幅公告增加输入参数 /// -public class AddTenantGameBannerAnnouncementEntityRequest : GameBannerAnnouncementBaseRequest +public class AddGameBannerAnnouncementEntityRequest : GameBannerAnnouncementBaseRequest { // Id 和所有公共字段已从 GameBannerAnnouncementBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/GameBannerAnnouncementResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/GameBannerAnnouncementResponse.cs index 2ff0a348..7a8d311b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/GameBannerAnnouncementResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/GameBannerAnnouncementResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameBannerAnnouncement.Dto; /// /// 游戏内横幅公告输出参数 /// -public class GameBannerAnnouncementResponse : IBasePageResponse +public class GameBannerAnnouncementResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/PageTenantGameBannerAnnouncementEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/PageGameBannerAnnouncementEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/PageTenantGameBannerAnnouncementEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/PageGameBannerAnnouncementEntityRequest.cs index 7676515c..d9093753 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/PageTenantGameBannerAnnouncementEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/PageGameBannerAnnouncementEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameBannerAnnouncement.Dto; /// /// 游戏内横幅公告分页查询输入参数 /// -public class PageTenantGameBannerAnnouncementEntityRequest : BaseAreaPageRequest +public class PageGameBannerAnnouncementEntityRequest : BaseAreaPageRequest { /// /// 内容 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/UpdateTenantGameBannerAnnouncementEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/UpdateGameBannerAnnouncementEntityRequest.cs similarity index 74% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/UpdateTenantGameBannerAnnouncementEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/UpdateGameBannerAnnouncementEntityRequest.cs index fb5fb500..001e7fd7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/UpdateTenantGameBannerAnnouncementEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/Dto/UpdateGameBannerAnnouncementEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 游戏内横幅公告更新输入参数 /// -public class UpdateTenantGameBannerAnnouncementEntityRequest : GameBannerAnnouncementBaseRequest +public class UpdateGameBannerAnnouncementEntityRequest : GameBannerAnnouncementBaseRequest { // Id 字段已从 GameBannerAnnouncementBaseRequest → BaseUpdateRequest 继承 // 所有公共字段也已继承 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/GameBannerAnnouncementService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/GameBannerAnnouncementService.cs index 72dd1d70..90804fa9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/GameBannerAnnouncementService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameBannerAnnouncement/GameBannerAnnouncementService.cs @@ -7,17 +7,17 @@ namespace GameFrameX.Application.NoticeCenter.GameBannerAnnouncement; /// 游戏内横幅公告服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameBannerAnnouncementService : GenericCrudService +public class GameBannerAnnouncementService : GenericCrudService { public GameBannerAnnouncementService( - SqlSugarRepository repository) : base(repository) + SqlSugarRepository repository) : base(repository) { } /// /// 构建分页查询条件(含日期范围过滤) /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameBannerAnnouncementEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameBannerAnnouncementEntityRequest input) { var query = Repository.AsQueryable() .WhereIF(input.AreaId > 0, u => u.AreaId == input.AreaId) @@ -38,7 +38,7 @@ protected override ISugarQueryable BuildPageQuer /// /// 新增前初始化本地化字段。 /// - protected override Task OnAddingAsync(AddTenantGameBannerAnnouncementEntityRequest input) + protected override Task OnAddingAsync(AddGameBannerAnnouncementEntityRequest input) { // 实体列 NOT NULL 且前端无此字段:无本地化 key 语义 = 直接展示 Content,兜底空串 input.ContentLocalizationKey ??= string.Empty; @@ -48,7 +48,7 @@ protected override Task OnAddingAsync(AddTenantGameBannerAnnouncementEntityReque /// /// 更新前校验记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameBannerAnnouncementEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameBannerAnnouncementEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/AddTenantGameMailEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/AddGameMailEntityRequest.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/AddTenantGameMailEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/AddGameMailEntityRequest.cs index aefa003b..0da5a32f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/AddTenantGameMailEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/AddGameMailEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMail.Dto; /// /// 游戏邮件增加输入参数 /// -public class AddTenantGameMailEntityRequest : GameMailBaseRequest +public class AddGameMailEntityRequest : GameMailBaseRequest { // Id 和所有公共字段已从 GameMailBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/GameMailResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/GameMailResponse.cs index fb8ed35e..16ff1678 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/GameMailResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/GameMailResponse.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMail.Dto; /// /// 游戏邮件输出参数 /// -public class GameMailResponse : IBasePageResponse +public class GameMailResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/PageTenantGameMailEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/PageGameMailEntityRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/PageTenantGameMailEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/PageGameMailEntityRequest.cs index 1f78b698..2f5fce04 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/PageTenantGameMailEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/PageGameMailEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMail.Dto; /// /// 游戏邮件分页查询输入参数 /// -public class PageTenantGameMailEntityRequest : BaseAreaPageRequest +public class PageGameMailEntityRequest : BaseAreaPageRequest { /// /// 标题 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/UpdateTenantGameMailEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/UpdateGameMailEntityRequest.cs similarity index 73% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/UpdateTenantGameMailEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/UpdateGameMailEntityRequest.cs index 036ddbfe..64d26f3f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/UpdateTenantGameMailEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/Dto/UpdateGameMailEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMail.Dto; /// /// 游戏邮件更新输入参数 /// -public class UpdateTenantGameMailEntityRequest : GameMailBaseRequest +public class UpdateGameMailEntityRequest : GameMailBaseRequest { // Id 和所有公共字段已从 GameMailBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/GameMailService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/GameMailService.cs index 582b08db..007e7602 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/GameMailService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMail/GameMailService.cs @@ -14,27 +14,27 @@ namespace GameFrameX.Application.NoticeCenter.GameMail; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameMailService - : GenericCrudService + : GenericCrudService { - private readonly SqlSugarRepository _gameAreaEntityRepository; + private readonly SqlSugarRepository _gameAreaEntityRepository; private readonly HttpClient _httpClientFactory; /// /// /// /// - /// + /// /// - public GameMailService(SqlSugarRepository repository, SqlSugarRepository systemTenantGameAreaEntity, HttpClient httpClientFactory) + public GameMailService(SqlSugarRepository repository, SqlSugarRepository systemGameAreaEntity, HttpClient httpClientFactory) : base(repository) { _httpClientFactory = httpClientFactory; - _gameAreaEntityRepository = systemTenantGameAreaEntity; + _gameAreaEntityRepository = systemGameAreaEntity; } - protected override ISugarQueryable BuildPageQuery(PageTenantGameMailEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameMailEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => @@ -49,13 +49,13 @@ protected override ISugarQueryable BuildPageQuery(PageTenantGa /// /// 新增前校验角色并解析附件道具。 /// - protected override async Task OnAddingAsync(AddTenantGameMailEntityRequest input) + protected override async Task OnAddingAsync(AddGameMailEntityRequest input) { if (!input.IsAllPost) { var playerIdList = JsonHelper.Deserialize>(input.PlayerIdListJson); - var listAsync = await Repository.AsSugarClient().Queryable().Where(m => playerIdList.Contains(m.Id.ToString())).ToListAsync(); + var listAsync = await Repository.AsSugarClient().Queryable().Where(m => playerIdList.Contains(m.Id.ToString())).ToListAsync(); if (listAsync.Count != playerIdList.Count) { throw new Exception("有玩家的ID不存在"); @@ -70,7 +70,7 @@ protected override async Task OnAddingAsync(AddTenantGameMailEntityRequest input // 批量预加载所有商品,避免 N+1 查询 var goodsIds = list.Select(p => p.Id).Distinct().ToList(); var goodsDict = (await Repository.AsSugarClient() - .Queryable() + .Queryable() .Where(m => goodsIds.Contains(m.Id)) .ToListAsync()) .ToDictionary(m => m.Id); @@ -92,7 +92,7 @@ protected override async Task OnAddingAsync(AddTenantGameMailEntityRequest input /// /// 更新前校验记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameMailEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameMailEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -126,12 +126,12 @@ public async Task SendAsync(BaseIdRequest input) // 如果不是全区发的获取角色列表 if (entity.IsAllPost) { - playerIdArray = Repository.AsSugarClient().Queryable().Where(u => entity.AreaId == u.AreaId).ToList(m => m.Id); + playerIdArray = Repository.AsSugarClient().Queryable().Where(u => entity.AreaId == u.AreaId).ToList(m => m.Id); } else { var playerIdList = JsonHelper.Deserialize>(entity.PlayerIdListJson); - playerIdArray = Repository.AsSugarClient().Queryable().Where(u => entity.AreaId == u.AreaId && playerIdList.Contains(u.Id.ToString())).ToList(m => m.Id); + playerIdArray = Repository.AsSugarClient().Queryable().Where(u => entity.AreaId == u.AreaId && playerIdList.Contains(u.Id.ToString())).ToList(m => m.Id); } //获取所有的符合要求的邮件 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/AddTenantGameMailCampaignEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/AddGameMailCampaignEntityRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/AddTenantGameMailCampaignEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/AddGameMailCampaignEntityRequest.cs index 3ad051b4..b5ae7fbd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/AddTenantGameMailCampaignEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/AddGameMailCampaignEntityRequest.cs @@ -9,6 +9,6 @@ namespace GameFrameX.Application.NoticeCenter.GameMailCampaign.Dto; /// /// 新增 Campaign 输入。 /// -public sealed class AddTenantGameMailCampaignEntityRequest : GameMailCampaignBaseRequest +public sealed class AddGameMailCampaignEntityRequest : GameMailCampaignBaseRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/PageTenantGameMailCampaignEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/PageGameMailCampaignEntityRequest.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/PageTenantGameMailCampaignEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/PageGameMailCampaignEntityRequest.cs index bd4798ed..717c01dc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/PageTenantGameMailCampaignEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/PageGameMailCampaignEntityRequest.cs @@ -11,7 +11,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailCampaign.Dto; /// /// Campaign 分页查询输入。 /// -public sealed class PageTenantGameMailCampaignEntityRequest : BasePageRequest +public sealed class PageGameMailCampaignEntityRequest : BasePageRequest { /// /// 名称模糊过滤。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/UpdateTenantGameMailCampaignEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/UpdateGameMailCampaignEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/UpdateTenantGameMailCampaignEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/UpdateGameMailCampaignEntityRequest.cs index 4e79a5bd..5e93a624 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/UpdateTenantGameMailCampaignEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/Dto/UpdateGameMailCampaignEntityRequest.cs @@ -11,7 +11,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailCampaign.Dto; /// /// 更新 Campaign 输入。仅 Draft 可更新(Published/Revoked 主体不可变 B1)。 /// -public sealed class UpdateTenantGameMailCampaignEntityRequest : GameMailCampaignBaseRequest +public sealed class UpdateGameMailCampaignEntityRequest : GameMailCampaignBaseRequest { // 发布状态机字段不在 BaseRequest:Adapt 后 enum/long 默认 0 穿透 IgnoreColumns 写库, // 会把 Failed(3) 重置为 Draft 并清掉 LastServerCode(见 OnUpdatingAsync 回填) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/GameMailCampaignService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/GameMailCampaignService.cs index 44b2399b..4b70e5b9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/GameMailCampaignService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailCampaign/GameMailCampaignService.cs @@ -18,17 +18,17 @@ namespace GameFrameX.Application.NoticeCenter.GameMailCampaign; /// -/// 运营邮件 Campaign 草稿/发布/撤回管理服务。路由前缀 /api/tenantGameMailCampaignEntity(历史框架 去后缀 + lowerCamelCase)。 +/// 运营邮件 Campaign 草稿/发布/撤回管理服务。路由前缀 /api/gameMailCampaignEntity(历史框架 去后缀 + lowerCamelCase)。 /// 状态机 B1/B3/B4:Draft 可自由增删改与发布重试;Published/Revoked 主体不可编辑/删除(B1),仅 Published 可撤回(撤回不可逆 B3);Server 拒绝落 Failed。 /// 与既有 GameMailService(直发 post_mail)是两套独立系统,不合并。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameMailCampaignService - : GenericCrudService + : GenericCrudService { - private readonly SqlSugarRepository _gameAreaRepository; + private readonly SqlSugarRepository _gameAreaRepository; private readonly IMailCampaignServerClient _serverClient; private readonly IOnlineLiveOpsDispatchService _dispatchService; private readonly CurrentUserContext _currentUserContext; @@ -41,8 +41,8 @@ public class GameMailCampaignService /// /// /// - public GameMailCampaignService(SqlSugarRepository repository, - SqlSugarRepository gameAreaRepository, + public GameMailCampaignService(SqlSugarRepository repository, + SqlSugarRepository gameAreaRepository, IMailCampaignServerClient serverClient, IOnlineLiveOpsDispatchService dispatchService, CurrentUserContext currentUserContext) @@ -57,7 +57,7 @@ public GameMailCampaignService(SqlSugarRepository /// /// 分页查询:按 Name / MailType / PublishStatus / TemplateId / ServerCampaignId / AreaId 过滤。 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameMailCampaignEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameMailCampaignEntityRequest input) { return Repository.AsQueryable() .WhereIF(input.AreaId.HasValue, u => u.AreaId == input.AreaId.Value) @@ -72,7 +72,7 @@ protected override ISugarQueryable BuildPageQuery(Page /// /// 新增前校验内容(多语言标题至少 1 项、附件数量>0)。 /// - protected override Task OnAddingAsync(AddTenantGameMailCampaignEntityRequest input) + protected override Task OnAddingAsync(AddGameMailCampaignEntityRequest input) { ValidateDraftContent(input.TitlesJson, input.AttachmentsJson); return Task.CompletedTask; @@ -81,7 +81,7 @@ protected override Task OnAddingAsync(AddTenantGameMailCampaignEntityRequest inp /// /// 更新前:仅 Draft 可编辑(Published/Revoked 主体不可变 B1);AreaId 从既有实体回填不可变。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameMailCampaignEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameMailCampaignEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -281,7 +281,7 @@ public Task DispatchOnlineAsync(OnlineLiveOpsSour /// /// 解析目标区服(调用 Server 接口的目标地址由区服 HttpManageUrl + FulfillmentApiPrefix 承载,来源 change C175)。 /// - private async Task ResolveAreaAsync(long areaId) + private async Task ResolveAreaAsync(long areaId) { var area = await _gameAreaRepository.GetFirstAsync(u => u.Id == areaId); if (area == null || string.IsNullOrWhiteSpace(area.HttpManageUrl)) @@ -315,7 +315,7 @@ private static void ValidateDraftContent(string titlesJson, string attachmentsJs } } - private static PreviewMailCampaignRequest BuildPreviewRequest(TenantGameMailCampaignEntity entity) + private static PreviewMailCampaignRequest BuildPreviewRequest(GameMailCampaignEntity entity) { return new PreviewMailCampaignRequest { @@ -332,7 +332,7 @@ private static PreviewMailCampaignRequest BuildPreviewRequest(TenantGameMailCamp }; } - private static PublishMailCampaignRequest BuildPublishRequest(TenantGameMailCampaignEntity entity) + private static PublishMailCampaignRequest BuildPublishRequest(GameMailCampaignEntity entity) { return new PublishMailCampaignRequest { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/AddTenantGameMailTemplateEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/AddGameMailTemplateEntityRequest.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/AddTenantGameMailTemplateEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/AddGameMailTemplateEntityRequest.cs index 80ec7491..8ce848ed 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/AddTenantGameMailTemplateEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/AddGameMailTemplateEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplate.Dto; /// /// 邮件模板增加输入参数 /// -public class AddTenantGameMailTemplateEntityRequest : GameMailTemplateBaseRequest +public class AddGameMailTemplateEntityRequest : GameMailTemplateBaseRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/GameMailTemplateResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/GameMailTemplateResponse.cs index c7b86156..baa44946 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/GameMailTemplateResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/GameMailTemplateResponse.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplate.Dto; /// /// 邮件模板输出参数 /// -public class GameMailTemplateResponse : IBasePageResponse +public class GameMailTemplateResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/PageTenantGameMailTemplateEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/PageGameMailTemplateEntityRequest.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/PageTenantGameMailTemplateEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/PageGameMailTemplateEntityRequest.cs index c8b7f093..176c37a4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/PageTenantGameMailTemplateEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/PageGameMailTemplateEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplate.Dto; /// /// 邮件模板分页查询输入参数 /// -public class PageTenantGameMailTemplateEntityRequest : BasePageRequest +public class PageGameMailTemplateEntityRequest : BasePageRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/UpdateTenantGameMailTemplateEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/UpdateGameMailTemplateEntityRequest.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/UpdateTenantGameMailTemplateEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/UpdateGameMailTemplateEntityRequest.cs index a3f3ecd8..40bda8d6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/UpdateTenantGameMailTemplateEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/Dto/UpdateGameMailTemplateEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplate.Dto; /// /// 邮件模板更新输入参数 /// -public class UpdateTenantGameMailTemplateEntityRequest : GameMailTemplateBaseRequest, ICrudUpdateRequest +public class UpdateGameMailTemplateEntityRequest : GameMailTemplateBaseRequest, ICrudUpdateRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/GameMailTemplateService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/GameMailTemplateService.cs index 126e5b1d..bddb0b04 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/GameMailTemplateService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplate/GameMailTemplateService.cs @@ -8,28 +8,28 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplate; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameMailTemplateService - : GenericCrudSelectService + : GenericCrudSelectService { - private readonly SqlSugarRepository _categoryRepository; + private readonly SqlSugarRepository _categoryRepository; public GameMailTemplateService( - SqlSugarRepository repository, - SqlSugarRepository categoryRepository) + SqlSugarRepository repository, + SqlSugarRepository categoryRepository) : base(repository) { _categoryRepository = categoryRepository; } - protected override ISugarQueryable BuildPageQuery(PageTenantGameMailTemplateEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameMailTemplateEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => u.Name.Contains(input.SearchKey.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) .WhereIF(input.CategoryId.HasValue, u => u.CategoryId == input.CategoryId.Value) .WhereIF(input.IsEnabled.HasValue, u => u.IsEnabled == input.IsEnabled.Value) - .LeftJoin((t, c) => t.CategoryId == c.Id) + .LeftJoin((t, c) => t.CategoryId == c.Id) .Select((t, c) => new GameMailTemplateResponse { Id = t.Id, @@ -58,7 +58,7 @@ protected override ISugarQueryable BuildPageQuery(Page /// /// 更新前校验记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameMailTemplateEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameMailTemplateEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/AddTenantGameMailTemplateCategoryEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/AddGameMailTemplateCategoryEntityRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/AddTenantGameMailTemplateCategoryEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/AddGameMailTemplateCategoryEntityRequest.cs index ad291168..808497f1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/AddTenantGameMailTemplateCategoryEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/AddGameMailTemplateCategoryEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplateCategory.Dto; /// /// 邮件模板分类增加输入参数 /// -public class AddTenantGameMailTemplateCategoryEntityRequest : BaseAddRequest +public class AddGameMailTemplateCategoryEntityRequest : BaseAddRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/GameMailTemplateCategoryResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/GameMailTemplateCategoryResponse.cs index 14a1abaf..f07c44ac 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/GameMailTemplateCategoryResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/GameMailTemplateCategoryResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplateCategory.Dto; /// /// 邮件模板分类输出参数 /// -public class GameMailTemplateCategoryResponse : IBasePageResponse +public class GameMailTemplateCategoryResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/PageTenantGameMailTemplateCategoryEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/PageGameMailTemplateCategoryEntityRequest.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/PageTenantGameMailTemplateCategoryEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/PageGameMailTemplateCategoryEntityRequest.cs index 90d4dd09..5136e960 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/PageTenantGameMailTemplateCategoryEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/PageGameMailTemplateCategoryEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplateCategory.Dto; /// /// 邮件模板分类分页查询输入参数 /// -public class PageTenantGameMailTemplateCategoryEntityRequest : BasePageRequest +public class PageGameMailTemplateCategoryEntityRequest : BasePageRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/UpdateTenantGameMailTemplateCategoryEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/UpdateGameMailTemplateCategoryEntityRequest.cs similarity index 90% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/UpdateTenantGameMailTemplateCategoryEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/UpdateGameMailTemplateCategoryEntityRequest.cs index bade24cc..c9b86a2f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/UpdateTenantGameMailTemplateCategoryEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/Dto/UpdateGameMailTemplateCategoryEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplateCategory.Dto; /// /// 邮件模板分类更新输入参数 /// -public class UpdateTenantGameMailTemplateCategoryEntityRequest : BaseUpdateRequest +public class UpdateGameMailTemplateCategoryEntityRequest : BaseUpdateRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/GameMailTemplateCategoryService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/GameMailTemplateCategoryService.cs index b1d1b87c..59b68804 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/GameMailTemplateCategoryService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameMailTemplateCategory/GameMailTemplateCategoryService.cs @@ -8,18 +8,18 @@ namespace GameFrameX.Application.NoticeCenter.GameMailTemplateCategory; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameMailTemplateCategoryService - : GenericCrudSelectService + : GenericCrudSelectService { public GameMailTemplateCategoryService( - SqlSugarRepository repository) + SqlSugarRepository repository) : base(repository) { } - protected override ISugarQueryable BuildPageQuery(PageTenantGameMailTemplateCategoryEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameMailTemplateCategoryEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) @@ -30,7 +30,7 @@ protected override ISugarQueryable BuildPageQu /// /// 更新前校验记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameMailTemplateCategoryEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameMailTemplateCategoryEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/AddTenantGameRewardTemplateEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/AddGameRewardTemplateEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/AddTenantGameRewardTemplateEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/AddGameRewardTemplateEntityRequest.cs index 049ffdbe..6222725a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/AddTenantGameRewardTemplateEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/AddGameRewardTemplateEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplate.Dto; /// /// 奖励模板增加输入参数。 /// -public class AddTenantGameRewardTemplateEntityRequest : BaseAddRequest +public class AddGameRewardTemplateEntityRequest : BaseAddRequest { /// /// 名称。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/GameRewardTemplateResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/GameRewardTemplateResponse.cs index 83288ba8..2da44eb2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/GameRewardTemplateResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/GameRewardTemplateResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplate.Dto; /// /// 奖励模板输出参数。 /// -public class GameRewardTemplateResponse : IBasePageResponse +public class GameRewardTemplateResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/PageTenantGameRewardTemplateEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/PageGameRewardTemplateEntityRequest.cs similarity index 85% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/PageTenantGameRewardTemplateEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/PageGameRewardTemplateEntityRequest.cs index eb355bca..42be03f7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/PageTenantGameRewardTemplateEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/PageGameRewardTemplateEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplate.Dto; /// /// 奖励模板分页查询输入参数。 /// -public class PageTenantGameRewardTemplateEntityRequest : BasePageRequest +public class PageGameRewardTemplateEntityRequest : BasePageRequest { /// /// 名称。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/UpdateTenantGameRewardTemplateEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/UpdateGameRewardTemplateEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/UpdateTenantGameRewardTemplateEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/UpdateGameRewardTemplateEntityRequest.cs index d13bb25e..8a313052 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/UpdateTenantGameRewardTemplateEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/Dto/UpdateGameRewardTemplateEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplate.Dto; /// /// 奖励模板更新输入参数。 /// -public class UpdateTenantGameRewardTemplateEntityRequest : BaseUpdateRequest +public class UpdateGameRewardTemplateEntityRequest : BaseUpdateRequest { /// /// 名称。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/GameRewardTemplateService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/GameRewardTemplateService.cs index b6c3d429..32baa2cc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/GameRewardTemplateService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplate/GameRewardTemplateService.cs @@ -9,28 +9,28 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplate; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameRewardTemplateService - : GenericCrudSelectService + : GenericCrudSelectService { - private readonly SqlSugarRepository _groupRepository; + private readonly SqlSugarRepository _groupRepository; public GameRewardTemplateService( - SqlSugarRepository repository, - SqlSugarRepository groupRepository) + SqlSugarRepository repository, + SqlSugarRepository groupRepository) : base(repository) { _groupRepository = groupRepository; } - protected override ISugarQueryable BuildPageQuery(PageTenantGameRewardTemplateEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameRewardTemplateEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => u.Name.Contains(input.SearchKey.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) .WhereIF(input.GroupId.HasValue, u => u.GroupId == input.GroupId.Value) .WhereIF(input.IsEnabled.HasValue, u => u.IsEnabled == input.IsEnabled.Value) - .LeftJoin((t, g) => t.GroupId == g.Id) + .LeftJoin((t, g) => t.GroupId == g.Id) .Select((t, g) => new GameRewardTemplateResponse { Id = t.Id, @@ -100,14 +100,14 @@ public async Task CopySnapshotAsync(GameRewa }; } - protected override async Task OnAddingAsync(AddTenantGameRewardTemplateEntityRequest input) + protected override async Task OnAddingAsync(AddGameRewardTemplateEntityRequest input) { await ValidateGroupAsync(input.GroupId); ValidateRewardItemsJson(input.RewardItemsJson); input.SnapshotSchemaVersion = 1; } - protected override async Task OnUpdatingAsync(UpdateTenantGameRewardTemplateEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameRewardTemplateEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/AddTenantGameRewardTemplateGroupEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/AddGameRewardTemplateGroupEntityRequest.cs similarity index 88% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/AddTenantGameRewardTemplateGroupEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/AddGameRewardTemplateGroupEntityRequest.cs index 93716e0d..d96bc6f1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/AddTenantGameRewardTemplateGroupEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/AddGameRewardTemplateGroupEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplateGroup.Dto; /// /// 奖励模板分组增加输入参数。 /// -public class AddTenantGameRewardTemplateGroupEntityRequest : BaseAddRequest +public class AddGameRewardTemplateGroupEntityRequest : BaseAddRequest { /// /// 名称。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/GameRewardTemplateGroupResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/GameRewardTemplateGroupResponse.cs index 36be884e..4f7cd10d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/GameRewardTemplateGroupResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/GameRewardTemplateGroupResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplateGroup.Dto; /// /// 奖励模板分组输出参数。 /// -public class GameRewardTemplateGroupResponse : IBasePageResponse +public class GameRewardTemplateGroupResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/PageTenantGameRewardTemplateGroupEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/PageGameRewardTemplateGroupEntityRequest.cs similarity index 82% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/PageTenantGameRewardTemplateGroupEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/PageGameRewardTemplateGroupEntityRequest.cs index 35cd5cfe..66269303 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/PageTenantGameRewardTemplateGroupEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/PageGameRewardTemplateGroupEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplateGroup.Dto; /// /// 奖励模板分组分页查询输入参数。 /// -public class PageTenantGameRewardTemplateGroupEntityRequest : BasePageRequest +public class PageGameRewardTemplateGroupEntityRequest : BasePageRequest { /// /// 名称。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/UpdateTenantGameRewardTemplateGroupEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/UpdateGameRewardTemplateGroupEntityRequest.cs similarity index 88% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/UpdateTenantGameRewardTemplateGroupEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/UpdateGameRewardTemplateGroupEntityRequest.cs index 4d0aa159..58096c7c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/UpdateTenantGameRewardTemplateGroupEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/Dto/UpdateGameRewardTemplateGroupEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplateGroup.Dto; /// /// 奖励模板分组更新输入参数。 /// -public class UpdateTenantGameRewardTemplateGroupEntityRequest : BaseUpdateRequest +public class UpdateGameRewardTemplateGroupEntityRequest : BaseUpdateRequest { /// /// 名称。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/GameRewardTemplateGroupService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/GameRewardTemplateGroupService.cs index 1229e694..dc046b94 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/GameRewardTemplateGroupService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/GameRewardTemplateGroupService.cs @@ -8,18 +8,18 @@ namespace GameFrameX.Application.NoticeCenter.GameRewardTemplateGroup; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameRewardTemplateGroupService - : GenericCrudSelectService + : GenericCrudSelectService { public GameRewardTemplateGroupService( - SqlSugarRepository repository) + SqlSugarRepository repository) : base(repository) { } - protected override ISugarQueryable BuildPageQuery(PageTenantGameRewardTemplateGroupEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameRewardTemplateGroupEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => u.Name.Contains(input.SearchKey.Trim())) @@ -49,7 +49,7 @@ public override async Task> SelectAsync(BaseSelectP return rows.Select(u => new BaseSelectPageResponse { Id = u.Id, Value = u.Name, Label = u.Name, }).ToList(); } - protected override async Task OnUpdatingAsync(UpdateTenantGameRewardTemplateGroupEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameRewardTemplateGroupEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs index 3177f79c..e6b329e6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs @@ -261,6 +261,6 @@ private static DatabaseOwnership ResolveDatabaseOwnership(string configId) return DatabaseOwnership.System; } - return DatabaseOwnership.Tenant; + return DatabaseOwnership.Business; } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailDispatcher.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailDispatcher.cs index d722a982..b94478ef 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailDispatcher.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailDispatcher.cs @@ -1,4 +1,4 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Email.Abstract; namespace GameFrameX.Application.Platform.Email; @@ -8,7 +8,7 @@ namespace GameFrameX.Application.Platform.Email; /// 本类仅承担 Provider 名 → 的解析与转发;具体发送由 反射收集的各渠道实现承担。 /// 调用方传入已选中的 ;本类不读取数据库,避免重复选择策略。 /// 凭证解密收口(C370):落库密文(enc:sec:v1:)在 构建发送参数时经 -/// 解密——发信是所有 Provider 配置读取路径的唯一必经点,且为低频事件路径 +/// 解密——发信是所有 Provider 配置读取路径的唯一必经点,且为低频事件路径 /// (租户生命周期 / 账单 / 安全通知),每信一次解密的 PBKDF2 派生开销在秒级投递耗时内,不引入缓存。 /// 入口校验(空配置 / 空收件人 / 未注册渠道)抛 ;渠道发送结果(含失败原因)经 返回。 /// @@ -59,14 +59,14 @@ private static EmailSendOptions BuildOptions(GameFrameX.Entity.System.SystemEmai Body = body, TemplateId = provider.TemplateId, TemplateDataJson = provider.TemplateDataJson, - SecretId = TenantSecretCrypto.Decrypt(provider.SecretId), - SecretKey = TenantSecretCrypto.Decrypt(provider.SecretKey), + SecretId = SecretCrypto.Decrypt(provider.SecretId), + SecretKey = SecretCrypto.Decrypt(provider.SecretKey), SmtpHost = provider.Host, SmtpPort = provider.Port, SmtpEnableSsl = provider.EnableSsl, SmtpUseDefaultCredentials = provider.UseDefaultCredentials, - SmtpUserName = TenantSecretCrypto.Decrypt(provider.UserName), - SmtpPassword = TenantSecretCrypto.Decrypt(provider.Password), + SmtpUserName = SecretCrypto.Decrypt(provider.UserName), + SmtpPassword = SecretCrypto.Decrypt(provider.Password), }; } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailProviderService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailProviderService.cs index c0c49b02..fa1c8830 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailProviderService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailProviderService.cs @@ -1,6 +1,6 @@ using GameFrameX.Application.Platform.Email.Dto; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Email.Abstract; using Microsoft.Extensions.Logging; @@ -9,7 +9,7 @@ namespace GameFrameX.Application.Platform.Email; /// /// 平台系统邮件 Provider 配置管理服务。 -/// 主库 / SuperAdmin-only;与租户业务邮件(TenantEmailConfigEntity)分域,禁止互相 fallback。 +/// 主库 / SuperAdmin-only;与租户业务邮件(EmailConfigEntity)分域,禁止互相 fallback。 /// 敏感字段(UserName / Password / SecretId / SecretKey)输出脱敏 ******;更新时回传 ****** 保留原值。 /// 调用方必须显式传入 SystemEmailPurpose;缺配置时 与 SystemMessageService.SendEmailAsync 均返回明确错误,禁止静默成功。 /// @@ -222,15 +222,15 @@ private static void MaskSensitiveFields(SystemEmailProviderResponse output) } /// - /// 凭证敏感字段落库前静态加密(C370 收口):新明文加密为 enc:sec:v1: 密文, + /// 凭证敏感字段落库前静态加密(C370 收口):新明文加密为 enc:sec:v1: 密文, /// 保留的库中旧值已是密文则幂等透传。 /// private static void EncryptProviderSecrets(GameFrameX.Entity.System.SystemEmailProviderEntity entity) { - entity.UserName = TenantSecretCrypto.Encrypt(entity.UserName); - entity.Password = TenantSecretCrypto.Encrypt(entity.Password); - entity.SecretId = TenantSecretCrypto.Encrypt(entity.SecretId); - entity.SecretKey = TenantSecretCrypto.Encrypt(entity.SecretKey); + entity.UserName = SecretCrypto.Encrypt(entity.UserName); + entity.Password = SecretCrypto.Encrypt(entity.Password); + entity.SecretId = SecretCrypto.Encrypt(entity.SecretId); + entity.SecretKey = SecretCrypto.Encrypt(entity.SecretKey); } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/EmailTask.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/EmailTask.cs index b1612f2f..395c13b6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/EmailTask.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/EmailTask.cs @@ -24,15 +24,15 @@ public class EmailTask : IScheduleJob private readonly ILogger _logger; private readonly HttpClient _httpClientFactory; private readonly SystemCacheService _systemCacheService; - private readonly SqlSugarRepository _mailRepository; - private readonly SqlSugarRepository _gameAreaEntityRepository; - private readonly SqlSugarRepository _gameRoleEntityRepository; + private readonly SqlSugarRepository _mailRepository; + private readonly SqlSugarRepository _gameAreaEntityRepository; + private readonly SqlSugarRepository _gameRoleEntityRepository; - public EmailTask(ILogger logger, SqlSugarRepository mailRepository, SqlSugarRepository systemTenantGameAreaEntity, SqlSugarRepository systemTenantGameRoleEntity, HttpClient httpClientFactory, SystemCacheService systemCacheService) + public EmailTask(ILogger logger, SqlSugarRepository mailRepository, SqlSugarRepository systemGameAreaEntity, SqlSugarRepository systemGameRoleEntity, HttpClient httpClientFactory, SystemCacheService systemCacheService) { _mailRepository = mailRepository; - _gameAreaEntityRepository = systemTenantGameAreaEntity; - _gameRoleEntityRepository = systemTenantGameRoleEntity; + _gameAreaEntityRepository = systemGameAreaEntity; + _gameRoleEntityRepository = systemGameRoleEntity; _logger = logger; _httpClientFactory = httpClientFactory; _systemCacheService = systemCacheService; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs index fa18c72d..1caaa30e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.Dashboard.GameHome; using GameFrameX.Core.Job; using Microsoft.Extensions.Logging; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; @@ -39,21 +39,21 @@ public async Task ExecuteAsync(JobExecutingContext context, CancellationToken st /// /// 采样落表(桶起点唯一)。 - /// 用普通 Insertable/Updateable 而非 DiffLog 变体(lesson:2026-07-13-sqlsugar-insertwithdifflog-tenant-prefix-loss)。 + /// 用普通 Insertable/Updateable 而非 DiffLog 变体(lesson:2026-07-13-sqlsugar-insertwithdifflog-prefix-loss)。 /// - private static async Task UpsertSampleAsync(ISqlSugarClient tenantDb, long bucketTime, int onlineCount, CancellationToken stoppingToken) + private static async Task UpsertSampleAsync(ISqlSugarClient db, long bucketTime, int onlineCount, CancellationToken stoppingToken) { - var existing = await tenantDb.Queryable() + var existing = await db.Queryable() .Where(u => u.SampleTime == bucketTime) .FirstAsync(stoppingToken); if (existing != null) { existing.OnlineCount = onlineCount; - await tenantDb.Updateable(existing).ExecuteCommandAsync(stoppingToken); + await db.Updateable(existing).ExecuteCommandAsync(stoppingToken); return; } - await tenantDb.Insertable(new Entity.Tenant.Game.TenantGameHomeOnlineSampleEntity + await db.Insertable(new Entity.Business.Game.GameHomeOnlineSampleEntity { SampleTime = bucketTime, OnlineCount = onlineCount, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameTimeJobDispatchJob.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameTimeJobDispatchJob.cs index 5f3cd4b9..b05a4d59 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameTimeJobDispatchJob.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameTimeJobDispatchJob.cs @@ -8,7 +8,7 @@ namespace GameFrameX.Application.Platform.Job; /// /// 业务定时任务扫描派发作业(C404 / GFX-1216 调度合一)。 -/// 接替已退役的 ScheduledTaskHostedService:周期扫描 全表, +/// 接替已退役的 ScheduledTaskHostedService:周期扫描 全表, /// 按行的 cron(NCrontab 含秒 6 段)到期执行。语义与旧引擎对齐: /// /// 首次见到的行 NextRun = GetNextOccurrence(当下)——停机错过的时间窗不补跑。 @@ -72,12 +72,12 @@ public async Task ExecuteAsync(JobExecutingContext context, CancellationToken st private async Task ScanAndExecuteAsync(CancellationToken cancellationToken) { - List rows; + List rows; using (var scope = _scopeFactory.CreateScope()) { var database = scope.ServiceProvider.GetRequiredService(); // 与旧引擎同口径:走全局自动过滤器(启用行 / 未删除行)。 - rows = await database.Queryable().ToListAsync(cancellationToken); + rows = await database.Queryable().ToListAsync(cancellationToken); } var dueTasks = ReconcileTracking(rows, Clock()); @@ -93,7 +93,7 @@ private async Task ScanAndExecuteAsync(CancellationToken cancellationToken) /// /// 对账内存跟踪与表数据:新行初始化、变更行重置、消失行移除;返回本次到期的任务。 /// - private List ReconcileTracking(List rows, DateTime now) + private List ReconcileTracking(List rows, DateTime now) { var dueTasks = new List(); @@ -175,7 +175,7 @@ private async Task ExecuteBusinessTaskAsync(TrackedBusinessTask tracked, Cancell if (row.IsOnce && row.Id > 0) { - var repository = scope.ServiceProvider.GetRequiredService>(); + var repository = scope.ServiceProvider.GetRequiredService>(); await repository.DeleteByIdAsync(row.Id); TrackedTasks.Remove(row.Id); _logger.LogInformation("完成执行一次性定时任务并删除记录: {Description}", row.Description); @@ -211,7 +211,7 @@ private async Task ExecuteBusinessTaskAsync(TrackedBusinessTask tracked, Cancell } } - private static string BuildFingerprint(TenantGameTimeJobEntity row) + private static string BuildFingerprint(GameTimeJobEntity row) { return $"{row.Name}|{row.Cron}|{row.IsOnce}|{row.MailId}"; } @@ -260,6 +260,6 @@ private sealed class TrackedBusinessTask public DateTime? NextRun { get; set; } - public TenantGameTimeJobEntity? CurrentRow { get; set; } + public GameTimeJobEntity? CurrentRow { get; set; } } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/BoundTenantUser.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/BoundUser.cs similarity index 54% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/BoundTenantUser.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/BoundUser.cs index 12d864de..7345640d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/BoundTenantUser.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/BoundUser.cs @@ -1,11 +1,11 @@ namespace GameFrameX.Application.Platform.OpenAccess; /// 开放接口身份绑定的用户。 -public sealed class BoundTenantUser +public sealed class BoundUser { - public TenantUserEntity User { get; } + public UserEntity User { get; } - public BoundTenantUser(TenantUserEntity user) + public BoundUser(UserEntity user) { User = user; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/AddTenantGameAppOpenAccessRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/AddGameAppOpenAccessRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/AddTenantGameAppOpenAccessRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/AddGameAppOpenAccessRequest.cs index 32d44f01..747c8083 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/AddTenantGameAppOpenAccessRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/AddGameAppOpenAccessRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess.Dto; /// /// 新增应用开放访问凭证输入。AccessSecret 由服务端生成,仅签发响应中返回一次。 /// -public class AddTenantGameAppOpenAccessRequest : BaseAddRequest +public class AddGameAppOpenAccessRequest : BaseAddRequest { /// /// 绑定的系统用户 Id。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/GameAppOpenAccessResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/GameAppOpenAccessResponse.cs index 2fe00eb6..29895612 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/GameAppOpenAccessResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/GameAppOpenAccessResponse.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess.Dto; /// /// 应用开放访问凭证输出。 -/// 注意: 永不输出(明文仅签发 / 轮换时一次性返回)。 +/// 注意: 永不输出(明文仅签发 / 轮换时一次性返回)。 /// Output 不含 AccessSecret 字段,Service 投影时也不得引入。 /// public class GameAppOpenAccessResponse diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/PageTenantGameAppOpenAccessRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/PageGameAppOpenAccessRequest.cs similarity index 90% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/PageTenantGameAppOpenAccessRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/PageGameAppOpenAccessRequest.cs index 73caff1c..6f2af2c4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/PageTenantGameAppOpenAccessRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/PageGameAppOpenAccessRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess.Dto; /// /// 应用开放访问凭证分页查询输入。 /// -public class PageTenantGameAppOpenAccessRequest : BasePageRequest +public class PageGameAppOpenAccessRequest : BasePageRequest { /// /// 访问 Key 关键字。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/UpdateTenantGameAppOpenAccessRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/UpdateGameAppOpenAccessRequest.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/UpdateTenantGameAppOpenAccessRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/UpdateGameAppOpenAccessRequest.cs index 200e532f..8cade9b1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/UpdateTenantGameAppOpenAccessRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/Dto/UpdateGameAppOpenAccessRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess.Dto; /// /// 更新应用开放访问凭证输入。绑定用户和接口范围由服务端校验。 /// -public class UpdateTenantGameAppOpenAccessRequest : BaseUpdateRequest +public class UpdateGameAppOpenAccessRequest : BaseUpdateRequest { /// /// 绑定的系统用户 Id。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/GameAppOpenAccessService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/GameAppOpenAccessService.cs index 0cc85443..5eb1744b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/GameAppOpenAccessService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/GameAppOpenAccessService.cs @@ -1,8 +1,8 @@ using System.ComponentModel; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using System.Security.Cryptography; using GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess.Dto; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; namespace GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess; @@ -15,15 +15,15 @@ namespace GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess; [ApiDescriptionSettings(Order = 185)] public class GameAppOpenAccessService : IAdminApiController { - private readonly SqlSugarRepository _repository; - private readonly SqlSugarRepository _userRepository; + private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _userRepository; /// /// 应用开放访问凭证管理服务构造函数。 /// public GameAppOpenAccessService( - SqlSugarRepository repository, - SqlSugarRepository userRepository) + SqlSugarRepository repository, + SqlSugarRepository userRepository) { _repository = repository; _userRepository = userRepository; @@ -36,14 +36,14 @@ public GameAppOpenAccessService( /// 凭证分页(含绑定用户账号 / 姓名回显)。 [DisplayName("获取应用开放访问凭证分页列表")] [ApiDescriptionSettings(Name = "Page")] - public async Task> PageAsync(PageTenantGameAppOpenAccessRequest input) + public async Task> PageAsync(PageGameAppOpenAccessRequest input) { var accessKey = input.AccessKey?.Trim() ?? string.Empty; var scenario = input.Scenario?.Trim() ?? string.Empty; var subjectName = input.SubjectName?.Trim() ?? string.Empty; return await _repository.AsQueryable().ClearFilter().Where(u => u.IsDeleted == false) - .LeftJoin((u, t) => u.BindUserId == t.Id) + .LeftJoin((u, t) => u.BindUserId == t.Id) .WhereIF(!string.IsNullOrWhiteSpace(accessKey), (u, t) => u.AccessKey.Contains(accessKey)) .WhereIF(!string.IsNullOrWhiteSpace(scenario), (u, t) => u.Scenario == scenario) .WhereIF(!string.IsNullOrWhiteSpace(subjectName), (u, t) => u.SubjectName.Contains(subjectName)) @@ -81,7 +81,7 @@ public async Task> PageAsync(PageTe [ApiDescriptionSettings(Name = "Add")] [HttpPost] [DisplayName("签发应用开放访问凭证")] - public async Task AddAsync(AddTenantGameAppOpenAccessRequest input) + public async Task AddAsync(AddGameAppOpenAccessRequest input) { await EnsureBindUserExistsAsync(input.BindUserId); var scopes = EnsureValidScopes(input.ScopesJson); @@ -94,7 +94,7 @@ public async Task AddAsync(AddTenantGameAppOpen var accessSecret = GenerateAccessSecret(); - var entity = new TenantGameAppOpenAccessEntity + var entity = new GameAppOpenAccessEntity { BindUserId = input.BindUserId, Scenario = input.Scenario.Trim(), @@ -102,7 +102,7 @@ public async Task AddAsync(AddTenantGameAppOpen SubjectName = input.SubjectName.Trim(), ScopesJson = NormalizeScopesJson(scopes), AccessKey = accessKey, - AccessSecret = TenantSecretCrypto.Encrypt(accessSecret) ?? string.Empty, + AccessSecret = SecretCrypto.Encrypt(accessSecret) ?? string.Empty, ExpiresTime = input.ExpiresTime, }; await _repository.InsertAsync(entity); @@ -123,7 +123,7 @@ public async Task AddAsync(AddTenantGameAppOpen [ApiDescriptionSettings(Name = "Update")] [HttpPost] [DisplayName("更新应用开放访问凭证")] - public async Task UpdateAsync(UpdateTenantGameAppOpenAccessRequest input) + public async Task UpdateAsync(UpdateGameAppOpenAccessRequest input) { var existing = await GetCredentialAsync(input.Id); await EnsureBindUserExistsAsync(input.BindUserId); @@ -226,7 +226,7 @@ public async Task RefreshAsync(GameAppOpenAcces var existing = await GetCredentialAsync(input.Id); var plainSecret = GenerateAccessSecret(); - existing.AccessSecret = TenantSecretCrypto.Encrypt(plainSecret) ?? string.Empty; + existing.AccessSecret = SecretCrypto.Encrypt(plainSecret) ?? string.Empty; existing.RowVersion = input.RowVersion; await _repository.Context.UpdateWithOptimisticLockAsync(existing); @@ -322,7 +322,7 @@ private async Task EnsureBindUserExistsAsync(long bindUserId) /// /// 凭证 Id。 /// 凭证实体。 - private async Task GetCredentialAsync(long id) + private async Task GetCredentialAsync(long id) { var entity = await _repository.AsQueryable().ClearFilter().Where(u => u.IsDeleted == false).FirstAsync(u => u.Id == id); if (entity == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs index 99afa6f5..c49d46fc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.Platform.OpenAccess.Dto; using GameFrameX.Core.Const; using GameFrameX.Core.Service.Cache; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Foundation.Http.Normalization; namespace GameFrameX.Application.Platform.OpenAccess; @@ -21,11 +21,11 @@ public class SystemOpenAccessService : IAdminApiController /// public SystemOpenAccessService(SqlSugarRepository systemOpenAccessRepository, SystemCacheService systemCacheService, - ISqlSugarClient tenantDbConnectionProvider) + ISqlSugarClient dbConnectionProvider) { _systemOpenAccessRepository = systemOpenAccessRepository; _systemCacheService = systemCacheService; - _tenantDbConnectionProvider = tenantDbConnectionProvider; + _tenantDbConnectionProvider = dbConnectionProvider; } /// @@ -64,7 +64,7 @@ public async Task AddOpenAccessAsync(AddOpenAccessRequest input) var openAccess = input.Adapt(); // 凭证静态加密收口(C370):AccessSecret 以 enc:sec:v1: 密文落库 - openAccess.AccessSecret = TenantSecretCrypto.Encrypt(openAccess.AccessSecret) ?? string.Empty; + openAccess.AccessSecret = SecretCrypto.Encrypt(openAccess.AccessSecret) ?? string.Empty; await _systemOpenAccessRepository.InsertAsync(openAccess); } @@ -85,7 +85,7 @@ public async Task UpdateOpenAccessAsync(UpdateOpenAccessRequest input) var openAccess = input.Adapt(); // 凭证静态加密收口(C370):幂等——存量密文行重写不换密文 - openAccess.AccessSecret = TenantSecretCrypto.Encrypt(openAccess.AccessSecret) ?? string.Empty; + openAccess.AccessSecret = SecretCrypto.Encrypt(openAccess.AccessSecret) ?? string.Empty; _systemCacheService.Remove(CacheConst.KeyOpenAccess + openAccess.AccessKey); await _systemOpenAccessRepository.Context.UpdateWithOptimisticLockAsync(openAccess); @@ -137,7 +137,7 @@ public Task GetByKeyAsync([FromQuery] string accessKey) var entity = _systemOpenAccessRepository.AsQueryable().First(u => u.AccessKey == accessKey); if (entity != null) { - entity.AccessSecret = TenantSecretCrypto.Decrypt(entity.AccessSecret) ?? string.Empty; + entity.AccessSecret = SecretCrypto.Decrypt(entity.AccessSecret) ?? string.Empty; } return entity; @@ -151,23 +151,23 @@ public Task GetByKeyAsync([FromQuery] string accessKey) /// /// [NonAction] - public BoundTenantUser GetBoundTenantUser(SystemOpenAccessEntity openAccess) + public BoundUser GetBoundUser(SystemOpenAccessEntity openAccess) { - var tenantDb = _tenantDbConnectionProvider; - tenantDb.QueryFilter.ClearAndBackup(); + var db = _tenantDbConnectionProvider; + db.QueryFilter.ClearAndBackup(); try { - var user = tenantDb.Queryable().First(u => u.Id == openAccess.BindUserId); + var user = db.Queryable().First(u => u.Id == openAccess.BindUserId); if (user == null) { throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); } - return new BoundTenantUser(user); + return new BoundUser(user); } finally { - tenantDb.QueryFilter.Restore(); + db.QueryFilter.Restore(); } } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/AddTenantGameTimeJobEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/AddGameTimeJobEntityRequest.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/AddTenantGameTimeJobEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/AddGameTimeJobEntityRequest.cs index 4d45e16d..353c28d0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/AddTenantGameTimeJobEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/AddGameTimeJobEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.Platform.TimeJob.GameTimeJob.Dto; /// /// 游戏定时任务增加输入参数 /// -public class AddTenantGameTimeJobEntityRequest : BaseAddRequest +public class AddGameTimeJobEntityRequest : BaseAddRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/GameTimeJobResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/GameTimeJobResponse.cs index 5cc50585..3ac7217f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/GameTimeJobResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/GameTimeJobResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.Platform.TimeJob.GameTimeJob.Dto; /// /// 游戏定时任务输出参数 /// -public class GameTimeJobResponse : IBasePageResponse +public class GameTimeJobResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/PageTenantGameTimeJobEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/PageGameTimeJobEntityRequest.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/PageTenantGameTimeJobEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/PageGameTimeJobEntityRequest.cs index 84c1c6f5..d30e8dfa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/PageTenantGameTimeJobEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/PageGameTimeJobEntityRequest.cs @@ -3,7 +3,7 @@ /// /// 游戏定时任务分页查询输入参数 /// -public class PageTenantGameTimeJobEntityRequest : BasePageRequest +public class PageGameTimeJobEntityRequest : BasePageRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/UpdateTenantGameTimeJobEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/UpdateGameTimeJobEntityRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/UpdateTenantGameTimeJobEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/UpdateGameTimeJobEntityRequest.cs index 6ee4b66b..da820bbc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/UpdateTenantGameTimeJobEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/Dto/UpdateGameTimeJobEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.Platform.TimeJob.GameTimeJob.Dto; /// /// 游戏定时任务更新输入参数 /// -public class UpdateTenantGameTimeJobEntityRequest : BaseUpdateRequest +public class UpdateGameTimeJobEntityRequest : BaseUpdateRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/GameTimeJobService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/GameTimeJobService.cs index de0d5218..857c8566 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/GameTimeJobService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/TimeJob/GameTimeJob/GameTimeJobService.cs @@ -7,11 +7,11 @@ namespace GameFrameX.Application.Platform.TimeJob.GameTimeJob; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameTimeJobService - : GenericCrudSelectService + : GenericCrudSelectService { - public GameTimeJobService(SqlSugarRepository repository) + public GameTimeJobService(SqlSugarRepository repository) : base(repository) { } @@ -19,7 +19,7 @@ public GameTimeJobService(SqlSugarRepository /// 手动新增时由服务端固定任务来源。 /// - protected override Task OnAddingAsync(AddTenantGameTimeJobEntityRequest input) + protected override Task OnAddingAsync(AddGameTimeJobEntityRequest input) { // 任务来源是系统标记非用户输入字段,手动新增固定 Manual,否则实体 NOT NULL 列 insert 500 input.Source = "Manual"; @@ -29,7 +29,7 @@ protected override Task OnAddingAsync(AddTenantGameTimeJobEntityRequest input) /// /// 更新前验证记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameTimeJobEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameTimeJobEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -38,7 +38,7 @@ protected override async Task OnUpdatingAsync(UpdateTenantGameTimeJobEntityReque } } - protected override ISugarQueryable BuildPageQuery(PageTenantGameTimeJobEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameTimeJobEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/AddTenantGamePenaltyEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/AddGamePenaltyEntityRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/AddTenantGamePenaltyEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/AddGamePenaltyEntityRequest.cs index c3906b6a..0e727013 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/AddTenantGamePenaltyEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/AddGamePenaltyEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty.Dto; /// /// 处罚新增输入参数。审计字段(Status / OperatorId / RevokeAsync*)由服务端强制写入,不在此暴露。 /// -public class AddTenantGamePenaltyEntityRequest : BaseAddRequest +public class AddGamePenaltyEntityRequest : BaseAddRequest { /// /// 区服作用域。null = 全区服生效。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/GamePenaltyResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/GamePenaltyResponse.cs index eb3ede6b..88d9a9c1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/GamePenaltyResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/GamePenaltyResponse.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty.Dto; /// /// 处罚输出参数(包含全部审计字段,供后台只读展示)。 /// -public class GamePenaltyResponse : IBasePageResponse +public class GamePenaltyResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/PageTenantGamePenaltyEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/PageGamePenaltyEntityRequest.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/PageTenantGamePenaltyEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/PageGamePenaltyEntityRequest.cs index fe2a7a39..b7e4d2e7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/PageTenantGamePenaltyEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/PageGamePenaltyEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty.Dto; /// /// 处罚分页查询输入参数。 /// -public class PageTenantGamePenaltyEntityRequest : BasePageRequest +public class PageGamePenaltyEntityRequest : BasePageRequest { /// /// 处罚对象类型(可选过滤)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/RevokeTenantGamePenaltyEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/RevokeGamePenaltyEntityRequest.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/RevokeTenantGamePenaltyEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/RevokeGamePenaltyEntityRequest.cs index e1eba632..cc5b21d4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/RevokeTenantGamePenaltyEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/RevokeGamePenaltyEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty.Dto; /// /// 撤销处罚输入参数。 /// -public class RevokeTenantGamePenaltyEntityRequest +public class RevokeGamePenaltyEntityRequest { /// /// 处罚 Id。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/SyncOnlineRuntimeTenantGamePenaltyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/SyncOnlineRuntimeGamePenaltyRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/SyncOnlineRuntimeTenantGamePenaltyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/SyncOnlineRuntimeGamePenaltyRequest.cs index 9608c5b9..d1eebf4a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/SyncOnlineRuntimeTenantGamePenaltyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/SyncOnlineRuntimeGamePenaltyRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty.Dto; /// /// 处罚同步 Online 运行时输入参数(联动命令按 ActionType 服务端推导,不暴露给请求体)。 /// -public class SyncOnlineRuntimeTenantGamePenaltyRequest +public class SyncOnlineRuntimeGamePenaltyRequest { /// /// 处罚事实源行 Id(必须处于生效中)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/UpdateTenantGamePenaltyEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/UpdateGamePenaltyEntityRequest.cs similarity index 76% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/UpdateTenantGamePenaltyEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/UpdateGamePenaltyEntityRequest.cs index 7d8747ba..4ad3a0d0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/UpdateTenantGamePenaltyEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/Dto/UpdateGamePenaltyEntityRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty.Dto; /// /// 处罚更新输入参数。处罚为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。 /// -public class UpdateTenantGamePenaltyEntityRequest : BaseUpdateRequest +public class UpdateGamePenaltyEntityRequest : BaseUpdateRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyEnforcementService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyEnforcementService.cs index 4120482a..08442ff8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyEnforcementService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyEnforcementService.cs @@ -12,15 +12,15 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty; /// public class GamePenaltyEnforcementService : IGamePenaltyEnforcementService { - private readonly SqlSugarRepository _penaltyRepository; + private readonly SqlSugarRepository _penaltyRepository; - public GamePenaltyEnforcementService(SqlSugarRepository penaltyRepository) + public GamePenaltyEnforcementService(SqlSugarRepository penaltyRepository) { _penaltyRepository = penaltyRepository; } /// - public async Task GetLoginBlockingPenaltyAsync( + public async Task GetLoginBlockingPenaltyAsync( PenaltyTargetTypeEnum targetType, string targetId, long? areaId = null) { if (string.IsNullOrEmpty(targetId)) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyService.cs index 0a15625e..08e95b23 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/GamePenaltyService.cs @@ -9,21 +9,21 @@ namespace GameFrameX.Application.PlayerCenter.GamePenalty; /// -/// 处罚事实源管理服务。路由前缀 /api/tenantGamePenaltyEntity(历史框架 去后缀 + lowerCamelCase)。 +/// 处罚事实源管理服务。路由前缀 /api/gamePenaltyEntity(历史框架 去后缀 + lowerCamelCase)。 /// AddAsync:服务端强制 Status=Active、OperatorId=当前操作人,忽略请求体审计字段(防越权)。 /// RevokeAsync:撤销生效中处罚,写 RevokeOperatorId / RevokeReason / RevokeTime 审计。 /// SyncOnlineRuntimeAsync:把生效中处罚同步到 Online 运行时(经 OnlinePenaltyLinkCommandService 唯一联动入口,change C350)。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GamePenaltyService - : GenericCrudService + : GenericCrudService { private readonly CurrentUserContext _currentUserContext; private readonly OnlinePenaltyLinkCommandService _penaltyLinkCommandService; - public GamePenaltyService(SqlSugarRepository repository, + public GamePenaltyService(SqlSugarRepository repository, CurrentUserContext currentUserContext, OnlinePenaltyLinkCommandService penaltyLinkCommandService) : base(repository) @@ -35,7 +35,7 @@ public GamePenaltyService(SqlSugarRepository /// 新增处罚。审计字段服务端强制。 /// - public override async Task AddAsync(AddTenantGamePenaltyEntityRequest input) + public override async Task AddAsync(AddGamePenaltyEntityRequest input) { if (string.IsNullOrWhiteSpace(input.TargetId)) { @@ -47,7 +47,7 @@ public override async Task AddAsync(AddTenantGamePenaltyEnt throw BusinessError.Oh("处罚原因不能为空"); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Status = PenaltyStatusEnum.Active; entity.OperatorId = _currentUserContext.UserId; await Repository.InsertWithDiffLogAsync(entity); @@ -57,7 +57,7 @@ public override async Task AddAsync(AddTenantGamePenaltyEnt /// /// 分页查询:按 TargetType / TargetId / Status / ActionType 过滤。 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGamePenaltyEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGamePenaltyEntityRequest input) { return Repository.AsQueryable() @@ -74,7 +74,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenan /// [HttpPost("revoke")] [ApiDescriptionSettings(Name = "Revoke")] - public async Task RevokeAsync(RevokeTenantGamePenaltyEntityRequest input) + public async Task RevokeAsync(RevokeGamePenaltyEntityRequest input) { var entity = await Repository.GetFirstAsync(p => p.Id == input.Id); if (entity == null) @@ -105,7 +105,7 @@ await Repository.Context.Updateable(entity) [HttpPost("syncOnlineRuntime")] [ApiDescriptionSettings(Name = "SyncOnlineRuntime")] [DisplayName("同步Online运行时")] - public async Task SyncOnlineRuntimeAsync(SyncOnlineRuntimeTenantGamePenaltyRequest input) + public async Task SyncOnlineRuntimeAsync(SyncOnlineRuntimeGamePenaltyRequest input) { var command = await MapActionTypeToLinkCommand(input.Id); return await _penaltyLinkCommandService.ExecuteLinkAsync(input.Id, command); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/IGamePenaltyEnforcementService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/IGamePenaltyEnforcementService.cs index ab0bc528..f765a42a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/IGamePenaltyEnforcementService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenalty/IGamePenaltyEnforcementService.cs @@ -15,6 +15,6 @@ public interface IGamePenaltyEnforcementService /// 对象标识(AccountId / RoleId / 设备标识 / IP)。 /// 当前区服 Id;null 时仅命中 AreaId 为空的处罚。 /// 命中返回处罚实体(含原因),未命中返回 null。 - Task GetLoginBlockingPenaltyAsync( + Task GetLoginBlockingPenaltyAsync( PenaltyTargetTypeEnum targetType, string targetId, long? areaId = null); } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/AddTenantGamePenaltyAppealEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/AddGamePenaltyAppealEntityRequest.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/AddTenantGamePenaltyAppealEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/AddGamePenaltyAppealEntityRequest.cs index 4f4fdec0..2087fc87 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/AddTenantGamePenaltyAppealEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/AddGamePenaltyAppealEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenaltyAppeal.Dto; /// /// 申诉新增输入参数。关联处罚由服务端验证。 /// -public class AddTenantGamePenaltyAppealEntityRequest : BaseAddRequest +public class AddGamePenaltyAppealEntityRequest : BaseAddRequest { /// /// 关联处罚 Id(必须为生效中处罚)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/GamePenaltyAppealResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/GamePenaltyAppealResponse.cs index 9a9eda36..53edb470 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/GamePenaltyAppealResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/GamePenaltyAppealResponse.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenaltyAppeal.Dto; /// /// 申诉输出参数(含审核审计字段,供后台只读展示)。 /// -public class GamePenaltyAppealResponse : IBasePageResponse +public class GamePenaltyAppealResponse : IBasePageResponse { /// /// Id @@ -13,7 +13,7 @@ public class GamePenaltyAppealResponse : IBasePageResponse - /// 关联处罚 Id(TenantGamePenaltyEntity.Id)。 + /// 关联处罚 Id(GamePenaltyEntity.Id)。 /// public long PenaltyId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/PageTenantGamePenaltyAppealEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/PageGamePenaltyAppealEntityRequest.cs similarity index 85% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/PageTenantGamePenaltyAppealEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/PageGamePenaltyAppealEntityRequest.cs index 57c4ce0a..36350ef5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/PageTenantGamePenaltyAppealEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/PageGamePenaltyAppealEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenaltyAppeal.Dto; /// /// 申诉分页查询输入参数。 /// -public class PageTenantGamePenaltyAppealEntityRequest : BasePageRequest +public class PageGamePenaltyAppealEntityRequest : BasePageRequest { /// /// 关联处罚 Id(可选过滤)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/ReviewTenantGamePenaltyAppealEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/ReviewGamePenaltyAppealEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/ReviewTenantGamePenaltyAppealEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/ReviewGamePenaltyAppealEntityRequest.cs index ebe0a212..1639e008 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/ReviewTenantGamePenaltyAppealEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/ReviewGamePenaltyAppealEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.PlayerCenter.GamePenaltyAppeal.Dto; /// /// 申诉审核输入参数。Approve=true 通过(同步撤销关联处罚);Approve=false 驳回。 /// -public class ReviewTenantGamePenaltyAppealEntityRequest +public class ReviewGamePenaltyAppealEntityRequest { /// /// 申诉 Id。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/UpdateTenantGamePenaltyAppealEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/UpdateGamePenaltyAppealEntityRequest.cs similarity index 75% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/UpdateTenantGamePenaltyAppealEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/UpdateGamePenaltyAppealEntityRequest.cs index b0695917..78074f3a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/UpdateTenantGamePenaltyAppealEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/Dto/UpdateGamePenaltyAppealEntityRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.PlayerCenter.GamePenaltyAppeal.Dto; /// /// 申诉更新输入参数。申诉为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。 /// -public class UpdateTenantGamePenaltyAppealEntityRequest : BaseUpdateRequest +public class UpdateGamePenaltyAppealEntityRequest : BaseUpdateRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/GamePenaltyAppealService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/GamePenaltyAppealService.cs index 556d8b47..32ad2c21 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/GamePenaltyAppealService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GamePenaltyAppeal/GamePenaltyAppealService.cs @@ -6,21 +6,21 @@ namespace GameFrameX.Application.PlayerCenter.GamePenaltyAppeal; /// -/// 申诉事实源管理服务。路由前缀 /api/tenantGamePenaltyAppealEntity。 +/// 申诉事实源管理服务。路由前缀 /api/gamePenaltyAppealEntity。 /// AddAsync:校验关联处罚生效中 + 同一处罚不存在待审申诉;服务端强制 Status=Pending。 /// ReviewAsync:通过→同步撤销关联处罚(写 RevokeAsync* + SourceAppealId 审计链);驳回→写 Rejected。同一申诉不可重复 ReviewAsync。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GamePenaltyAppealService - : GenericCrudService + : GenericCrudService { private readonly CurrentUserContext _currentUserContext; - private readonly SqlSugarRepository _penaltyRepository; + private readonly SqlSugarRepository _penaltyRepository; - public GamePenaltyAppealService(SqlSugarRepository repository, - SqlSugarRepository penaltyRepository, + public GamePenaltyAppealService(SqlSugarRepository repository, + SqlSugarRepository penaltyRepository, CurrentUserContext currentUserContext) : base(repository) { @@ -31,7 +31,7 @@ public GamePenaltyAppealService(SqlSugarRepository /// 提交申诉:校验处罚生效中、同一处罚无待审申诉;Status 服务端强制为 Pending。 /// - public override async Task AddAsync(AddTenantGamePenaltyAppealEntityRequest input) + public override async Task AddAsync(AddGamePenaltyAppealEntityRequest input) { var penalty = await _penaltyRepository.GetFirstAsync(p => p.Id == input.PenaltyId); if (penalty == null) @@ -57,7 +57,7 @@ public override async Task AddAsync(AddTenantGamePena throw BusinessError.Oh("申诉理由不能为空"); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Status = AppealStatusEnum.Pending; await Repository.InsertWithDiffLogAsync(entity); return entity.Adapt(); @@ -66,7 +66,7 @@ public override async Task AddAsync(AddTenantGamePena /// /// 分页查询:按 PenaltyId / Status 过滤。 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGamePenaltyAppealEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGamePenaltyAppealEntityRequest input) { return Repository.AsQueryable() @@ -81,7 +81,7 @@ protected override ISugarQueryable BuildPageQuery(Pag /// [HttpPost("review")] [ApiDescriptionSettings(Name = "Review")] - public async Task ReviewAsync(ReviewTenantGamePenaltyAppealEntityRequest input) + public async Task ReviewAsync(ReviewGamePenaltyAppealEntityRequest input) { var appeal = await Repository.GetFirstAsync(a => a.Id == input.Id); if (appeal == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/AddTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/AddGameRoleEntityRequest.cs similarity index 65% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/AddTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/AddGameRoleEntityRequest.cs index cfa1ee57..df17aa4c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/AddTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/AddGameRoleEntityRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.PlayerCenter.GameRole.Dto; /// /// 游戏角色增加输入参数 /// -public class AddTenantGameRoleEntityRequest : GameRoleBaseRequest +public class AddGameRoleEntityRequest : GameRoleBaseRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/DeleteTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/DeleteGameRoleEntityRequest.cs similarity index 72% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/DeleteTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/DeleteGameRoleEntityRequest.cs index 34226913..46411bd8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/DeleteTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/DeleteGameRoleEntityRequest.cs @@ -5,6 +5,6 @@ namespace GameFrameX.Application.PlayerCenter.GameRole.Dto; /// /// 游戏角色删除输入参数 /// -public class DeleteTenantGameRoleEntityRequest : BaseIdRequest +public class DeleteGameRoleEntityRequest : BaseIdRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/PageTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/PageGameRoleEntityRequest.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/PageTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/PageGameRoleEntityRequest.cs index 90676b33..98850589 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/PageTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/PageGameRoleEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.PlayerCenter.GameRole.Dto; /// /// 游戏角色分页查询输入参数 /// -public class PageTenantGameRoleEntityRequest : BaseAreaPageRequest +public class PageGameRoleEntityRequest : BaseAreaPageRequest { /// /// 用户ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/UpdateTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/UpdateGameRoleEntityRequest.cs similarity index 87% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/UpdateTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/UpdateGameRoleEntityRequest.cs index f38679a1..a5ac57eb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/UpdateTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/Dto/UpdateGameRoleEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.PlayerCenter.GameRole.Dto; /// /// 游戏角色更新输入参数 /// -public class UpdateTenantGameRoleEntityRequest : GameRoleBaseRequest, ICrudUpdateRequest +public class UpdateGameRoleEntityRequest : GameRoleBaseRequest, ICrudUpdateRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/GameRoleService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/GameRoleService.cs index 0c1c8660..a96bebb6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/GameRoleService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameRole/GameRoleService.cs @@ -11,11 +11,11 @@ namespace GameFrameX.Application.PlayerCenter.GameRole; /// 游戏角色服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameRoleService : GenericCrudSelectService +public class GameRoleService : GenericCrudSelectService { private readonly HttpClient _httpClient; - public GameRoleService(SqlSugarRepository repository, HttpClient httpClient) : base(repository) + public GameRoleService(SqlSugarRepository repository, HttpClient httpClient) : base(repository) { _httpClient = httpClient; } @@ -23,7 +23,7 @@ public GameRoleService(SqlSugarRepository /// 构建分页查询条件 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameRoleEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameRoleEntityRequest input) { return Repository.AsQueryable() .WhereIF(input.Id > 0, u => u.Id == input.Id) @@ -49,7 +49,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenantGa /// [HttpPost(CrudActionRoutes.Page)] [ApiDescriptionSettings(Name = "Page")] - public override async Task> PageAsync(PageTenantGameRoleEntityRequest input) + public override async Task> PageAsync(PageGameRoleEntityRequest input) { var query = BuildPageQuery(input); query = ApplyOrdering(query, input); @@ -69,7 +69,7 @@ public override async Task> PageAsync(PageTe /// [HttpPost(CrudActionRoutes.Update)] [ApiDescriptionSettings(Name = "Update")] - public override async Task UpdateAsync(UpdateTenantGameRoleEntityRequest input) + public override async Task UpdateAsync(UpdateGameRoleEntityRequest input) { if (string.IsNullOrEmpty(input.RoleId)) { @@ -82,7 +82,7 @@ public override async Task UpdateAsync(UpdateTenantGameRoleEntityRequest input) throw BusinessError.Oh(CommonErrorCode.RecordNotFound); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Id = long.Parse(input.RoleId); await Repository.AsUpdateable(entity).IgnoreColumns(true).ExecuteCommandWithOptLockAsync(true); } @@ -94,10 +94,10 @@ public override async Task UpdateAsync(UpdateTenantGameRoleEntityRequest input) /// [HttpPost] [ApiDescriptionSettings(Name = "UpdateToSandBox")] - public async Task UpdateToSandBoxAsync(UpdateTenantGameRoleEntityRequest input) + public async Task UpdateToSandBoxAsync(UpdateGameRoleEntityRequest input) { var gameRoleEntity = await Repository.GetFirstAsync(u => u.Id == long.Parse(input.RoleId)); - var gameAreaEntity = await Repository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).SingleAsync(m => m.Id == gameRoleEntity.AreaId); + var gameAreaEntity = await Repository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).SingleAsync(m => m.Id == gameRoleEntity.AreaId); if (gameAreaEntity == null) { throw new Exception("区服信息不存在"); @@ -152,10 +152,10 @@ public sealed class PlayerSetSandBoxResponse /// [HttpPost] [ApiDescriptionSettings(Name = "UpdateToUnSandBox")] - public async Task UpdateToUnSandBoxAsync(UpdateTenantGameRoleEntityRequest input) + public async Task UpdateToUnSandBoxAsync(UpdateGameRoleEntityRequest input) { var gameRoleEntity = await Repository.GetFirstAsync(u => u.Id == long.Parse(input.RoleId)); - var gameAreaEntity = await Repository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).SingleAsync(m => m.Id == gameRoleEntity.AreaId); + var gameAreaEntity = await Repository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).SingleAsync(m => m.Id == gameRoleEntity.AreaId); if (gameAreaEntity == null) { throw new Exception("区服信息不存在"); @@ -187,10 +187,10 @@ public async Task UpdateToUnSandBoxAsync(UpdateTenantGameRoleEntityRequest input /// [HttpPost] [ApiDescriptionSettings(Name = "Sync")] - public async Task SyncAsync(UpdateTenantGameRoleEntityRequest input) + public async Task SyncAsync(UpdateGameRoleEntityRequest input) { var gameRoleEntity = await Repository.GetFirstAsync(u => u.Id == long.Parse(input.RoleId)); - var gameAreaEntity = await Repository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).SingleAsync(m => m.Id == gameRoleEntity.AreaId); + var gameAreaEntity = await Repository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).SingleAsync(m => m.Id == gameRoleEntity.AreaId); if (gameAreaEntity == null) { throw new Exception("区服信息不存在"); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/AddTenantGameUserEntityByMailRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/AddGameUserEntityByMailRequest.cs similarity index 90% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/AddTenantGameUserEntityByMailRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/AddGameUserEntityByMailRequest.cs index dbce7d00..ad0b5e76 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/AddTenantGameUserEntityByMailRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/AddGameUserEntityByMailRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GameUser.Dto; /// /// 根据邮箱添加账号 /// -public class AddTenantGameUserEntityByMailRequest : GameUserBaseRequest +public class AddGameUserEntityByMailRequest : GameUserBaseRequest { /// /// 账号 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/DeleteTenantGameUserEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/DeleteGameUserEntityRequest.cs similarity index 67% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/DeleteTenantGameUserEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/DeleteGameUserEntityRequest.cs index 243af695..32208b30 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/DeleteTenantGameUserEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/DeleteGameUserEntityRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.PlayerCenter.GameUser.Dto; /// /// 游戏账号删除输入参数 /// -public class DeleteTenantGameUserEntityRequest : BaseIdRequest +public class DeleteGameUserEntityRequest : BaseIdRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/PageTenantGameUserEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/PageGameUserEntityRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/PageTenantGameUserEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/PageGameUserEntityRequest.cs index 344a9bd5..8190f3d4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/PageTenantGameUserEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/PageGameUserEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GameUser.Dto; /// /// 游戏账号分页查询输入参数 /// -public class PageTenantGameUserEntityRequest : BasePageRequest +public class PageGameUserEntityRequest : BasePageRequest { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/QueryByIdTenantGameUserEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/QueryByIdGameUserEntityRequest.cs similarity index 60% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/QueryByIdTenantGameUserEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/QueryByIdGameUserEntityRequest.cs index a367ca27..bf29ad20 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/QueryByIdTenantGameUserEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/QueryByIdGameUserEntityRequest.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Application.PlayerCenter.GameUser.Dto; /// /// 游戏账号主键查询输入参数 /// -public class QueryByIdTenantGameUserEntityRequest : DeleteTenantGameUserEntityRequest +public class QueryByIdGameUserEntityRequest : DeleteGameUserEntityRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/UpdateTenantGameUserEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/UpdateGameUserEntityRequest.cs similarity index 84% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/UpdateTenantGameUserEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/UpdateGameUserEntityRequest.cs index 133486a7..07f53975 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/UpdateTenantGameUserEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/Dto/UpdateGameUserEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.PlayerCenter.GameUser.Dto; /// /// 游戏账号更新输入参数 /// -public class UpdateTenantGameUserEntityRequest : BaseUpdateRequest +public class UpdateGameUserEntityRequest : BaseUpdateRequest { public virtual string? UserName { get; set; } public virtual string? Password { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs index a3029fec..081a8195 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs @@ -10,20 +10,20 @@ namespace GameFrameX.Application.PlayerCenter.GameUser; /// 游戏账号服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 111)] -public class GameUserService : GenericCrudSelectService +public class GameUserService : GenericCrudSelectService { private readonly GameUserPasswordService _tenantGameUserPasswordService; - public GameUserService(SqlSugarRepository repository, - GameUserPasswordService tenantGameUserPasswordService) : base(repository) + public GameUserService(SqlSugarRepository repository, + GameUserPasswordService gameUserPasswordService) : base(repository) { - _tenantGameUserPasswordService = tenantGameUserPasswordService; + _tenantGameUserPasswordService = gameUserPasswordService; } /// /// 构建分页查询条件 /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameUserEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameUserEntityRequest input) { return Repository.AsQueryable() .WhereIF(input.Id > 0, u => u.Id == input.Id) @@ -40,7 +40,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenantGa /// [HttpPost] [ApiDescriptionSettings(Name = "addByMail")] - public async Task AddByMailAsync(AddTenantGameUserEntityByMailRequest input) + public async Task AddByMailAsync(AddGameUserEntityByMailRequest input) { //判断邮箱是否已经存在 var entity = await Repository.GetFirstAsync(x => x.Email == input.Email); @@ -49,7 +49,7 @@ public async Task AddByMailAsync(AddTenantGameUserEntityByMail throw new Exception("该邮箱已经被使用"); } - entity = input.Adapt(); + entity = input.Adapt(); entity.EmailPassword = _tenantGameUserPasswordService.Hash(input.EmailPassword); entity.UserName = input.Email; entity.Password = _tenantGameUserPasswordService.Hash(input.Password); @@ -65,7 +65,7 @@ public async Task AddByMailAsync(AddTenantGameUserEntityByMail /// [HttpPost] [ApiDescriptionSettings(Name = "Ban")] - public async Task BanAsync(DeleteTenantGameUserEntityRequest input) + public async Task BanAsync(DeleteGameUserEntityRequest input) { var entity = await Repository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(CommonErrorCode.RecordNotFound); entity.Status = GameUserStatus.Banned; @@ -79,7 +79,7 @@ public async Task BanAsync(DeleteTenantGameUserEntityRequest input) /// [HttpPost] [ApiDescriptionSettings(Name = "Unseal")] - public async Task UnsealAsync(DeleteTenantGameUserEntityRequest input) + public async Task UnsealAsync(DeleteGameUserEntityRequest input) { var entity = await Repository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(CommonErrorCode.RecordNotFound); entity.Status = GameUserStatus.Active; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppAssetPackageSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppAssetPackageSeedData.cs index e08e70b6..c186f141 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppAssetPackageSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppAssetPackageSeedData.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.Resource; +using GameFrameX.Entity.Business.Game.Resource; using GameFrameX.Core.SqlSugar; namespace GameFrameX.Application.SeedData.Client; @@ -6,15 +6,15 @@ namespace GameFrameX.Application.SeedData.Client; /// /// 客户端资源包 表种子数据 /// -public class GameAppAssetPackageSeedData : ISqlSugarEntitySeedData +public class GameAppAssetPackageSeedData : ISqlSugarEntitySeedData { /// /// 种子数据 /// /// - public IEnumerable HasData() + public IEnumerable HasData() { - var records = new List + var records = new List { new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppDeviceGroupSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppDeviceGroupSeedData.cs index 6f138771..f73c2655 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppDeviceGroupSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppDeviceGroupSeedData.cs @@ -1,16 +1,16 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Device; +using GameFrameX.Entity.Business.Device; namespace GameFrameX.Application.SeedData.Client; /// 主库默认设备分组。 -public sealed class GameAppDeviceGroupSeedData : ISqlSugarEntitySeedData +public sealed class GameAppDeviceGroupSeedData : ISqlSugarEntitySeedData { - public IEnumerable HasData() + public IEnumerable HasData() { return new[] { - new TenantGameAppDeviceGroupEntity + new GameAppDeviceGroupEntity { Id = 31950207082437, Name = "default", Description = "默认缺省分组", IsEnabled = true, CreatedTime = 1745836800, CreatedId = 1300000000101, CreatedName = "超级管理员", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppReleaseVersionSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppReleaseVersionSeedData.cs index f7cc55b2..c9c81f3a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppReleaseVersionSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppReleaseVersionSeedData.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Core.SqlSugar; namespace GameFrameX.Application.SeedData.Client; @@ -6,15 +6,15 @@ namespace GameFrameX.Application.SeedData.Client; /// /// 客户端程序版本配置表 表种子数据 /// -public class GameAppReleaseVersionSeedData : ISqlSugarEntitySeedData +public class GameAppReleaseVersionSeedData : ISqlSugarEntitySeedData { /// /// 种子数据 /// /// - public IEnumerable HasData() + public IEnumerable HasData() { - var records = new List + var records = new List { new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigKeySeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigKeySeedData.cs index e28c4e23..02a96479 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigKeySeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigKeySeedData.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; using GameFrameX.Core.SqlSugar; namespace GameFrameX.Application.SeedData.Client; @@ -6,14 +6,14 @@ namespace GameFrameX.Application.SeedData.Client; /// /// 客户端远程配置内容键定义表 种子数据 /// -public class GameAppRemoteConfigKeySeedData : ISqlSugarEntitySeedData +public class GameAppRemoteConfigKeySeedData : ISqlSugarEntitySeedData { /// /// 种子数据 /// - public IEnumerable HasData() + public IEnumerable HasData() { - var records = new List + var records = new List { new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigModeSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigModeSeedData.cs index c71370bd..f5fe512c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigModeSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigModeSeedData.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; using GameFrameX.Core.SqlSugar; namespace GameFrameX.Application.SeedData.Client; @@ -6,14 +6,14 @@ namespace GameFrameX.Application.SeedData.Client; /// /// 客户端远程配置模式定义表 种子数据 /// -public class GameAppRemoteConfigModeSeedData : ISqlSugarEntitySeedData +public class GameAppRemoteConfigModeSeedData : ISqlSugarEntitySeedData { /// /// 种子数据 /// - public IEnumerable HasData() + public IEnumerable HasData() { - var records = new List + var records = new List { new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigSeedData.cs index e3d626ad..b963429e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppRemoteConfigSeedData.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; using GameFrameX.Core.SqlSugar; namespace GameFrameX.Application.SeedData.Client; @@ -6,15 +6,15 @@ namespace GameFrameX.Application.SeedData.Client; /// /// 客户端远程配置表 表种子数据 /// -public class GameAppRemoteConfigSeedData : ISqlSugarEntitySeedData +public class GameAppRemoteConfigSeedData : ISqlSugarEntitySeedData { /// /// 种子数据 /// /// - public IEnumerable HasData() + public IEnumerable HasData() { - var records = new List + var records = new List { new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppServerConfigSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppServerConfigSeedData.cs index f8bd5a44..ac970837 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppServerConfigSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppServerConfigSeedData.cs @@ -1,20 +1,20 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.ServerConfig; +using GameFrameX.Entity.Business.Game.ServerConfig; namespace GameFrameX.Application.SeedData.Client; /// /// 游戏运营配置表 表种子数据(AppId=null 出厂基线行;登录下发时被应用行按 Key 覆盖)。 /// 数据构建逻辑在 GameServerConfigBaselineSeed(Core 嵌入资源单一事实源); -/// 自动推导的租户库连接 EnableInitSeed=false 时本渠道不生效,由 DefaultTenantDatabaseSeeder 走同一工厂补种 +/// 自动推导的租户库连接 EnableInitSeed=false 时本渠道不生效,由 DefaultDatabaseSeeder 走同一工厂补种 /// -public class GameAppServerConfigSeedData : ISqlSugarEntitySeedData +public class GameAppServerConfigSeedData : ISqlSugarEntitySeedData { /// /// 出厂基线行(原厂 10 键 + 原厂 md5,行 Id 固定基数跨环境稳定) /// - public IEnumerable HasData() + public IEnumerable HasData() { return GameServerConfigBaselineSeed.BuildRows(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppVersionDefinitionSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppVersionDefinitionSeedData.cs index 428d508a..21339717 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppVersionDefinitionSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Client/GameAppVersionDefinitionSeedData.cs @@ -1,14 +1,14 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Application.SeedData.Client; /// 主库默认版本定义。 -public sealed class GameAppVersionDefinitionSeedData : ISqlSugarEntitySeedData +public sealed class GameAppVersionDefinitionSeedData : ISqlSugarEntitySeedData { - public IEnumerable HasData() + public IEnumerable HasData() { - return new[] { "default", "1.0.0" }.Select((name, index) => new TenantGameAppVersionDefinitionEntity + return new[] { "default", "1.0.0" }.Select((name, index) => new GameAppVersionDefinitionEntity { Id = 31950207182437 + index, Name = name, Description = index == 0 ? "默认缺省版本" : "初始版本", IsEnabled = true, CreatedTime = 1745836800, CreatedId = 1300000000101, CreatedName = "超级管理员", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Game/GameRedeemCodeChannelSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Game/GameRedeemCodeChannelSeedData.cs index f9085971..d388def5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Game/GameRedeemCodeChannelSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/Game/GameRedeemCodeChannelSeedData.cs @@ -1,20 +1,20 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Application.SeedData.Game; /// /// 游戏兑换码渠道 表种子数据 /// -public class GameRedeemCodeChannelSeedData : ISqlSugarEntitySeedData +public class GameRedeemCodeChannelSeedData : ISqlSugarEntitySeedData { /// /// 种子数据 /// /// - public IEnumerable HasData() + public IEnumerable HasData() { - var records = new List + var records = new List { new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/BusinessChannelSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/BusinessChannelSeedData.cs index a80f7715..a59b69b0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/BusinessChannelSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/BusinessChannelSeedData.cs @@ -1,20 +1,20 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant; +using GameFrameX.Entity.Business; namespace GameFrameX.Application.SeedData.System; /// 主库业务默认渠道,编码与系统渠道字典分开。 -public sealed class BusinessChannelSeedData : ISqlSugarEntitySeedData +public sealed class BusinessChannelSeedData : ISqlSugarEntitySeedData { - public IEnumerable HasData() + public IEnumerable HasData() { return new[] { - new TenantChannelDefinitionEntity + new ChannelDefinitionEntity { Id = 31950206982437, Code = "business-default", Name = "默认业务渠道", - Scope = ChannelScopeEnum.Tenant, PlatformCode = "all", ChannelType = ChannelTypeEnum.Custom, + Scope = ChannelScopeEnum.Business, PlatformCode = "all", ChannelType = ChannelTypeEnum.Custom, IsDefault = true, IsEnabled = true, Description = "新装默认业务渠道", CreatedTime = 1745836800, CreatedId = 1300000000101, CreatedName = "超级管理员", }, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs index de45aa37..83accdac 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs @@ -16,7 +16,7 @@ public class ChannelDefinitionSeedData : ISqlSugarEntitySeedData public IEnumerable HasData() { - // 字段顺序约定:Code / Name / Description / Scope(1=System) / TenantId(0=系统) / PlatformCode / ChannelType(1=Official,2=Store,3=Ad,4=Custom) / IsSystemLocked / CreatedTime / UpdateTime / CreatedId / CreatedName / IsDeleted / IsDefault / Id + // 字段顺序约定:Code / Name / Description / Scope(1=System) / Id(0=系统) / PlatformCode / ChannelType(1=Official,2=Store,3=Ad,4=Custom) / IsSystemLocked / CreatedTime / UpdateTime / CreatedId / CreatedName / IsDeleted / IsDefault / Id // 分组(每段之间空行):缺省 / 官方 / 商店-iOS / 商店-Android 海外 / 商店-Android 国内厂商 / 商店-Android 国内第三方 / 商店-鸿蒙 / 商店-PC 桌面 / 商店-主机 / 商店-游戏聚合 / 商店-小游戏平台 / 广告-国内 / 广告-海外 / 广告-游戏广告网络 var records = new List { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalDictionaryDataSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalDictionaryDataSeedData.cs index 084f8b5f..8246578a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalDictionaryDataSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalDictionaryDataSeedData.cs @@ -60,8 +60,8 @@ public IEnumerable HasData() new GlobalDictionaryDataEntity { Id = 1300000000501, DictionaryTypeId = 1300000000105, Value = "EntityBaseId【基础实体Id】", Code = "EntityBaseId", OrderNo = 1, Remark = "【基础实体Id】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, new GlobalDictionaryDataEntity { Id = 1300000000502, DictionaryTypeId = 1300000000105, Value = "EntityBase【基础实体】", Code = "EntityBase", OrderNo = 1, Remark = "【基础实体】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, - new GlobalDictionaryDataEntity { Id = 1300000000503, DictionaryTypeId = 1300000000105, Value = "EntityTenantId【租户实体Id】", Code = "EntityTenantId", OrderNo = 1, Remark = "【租户实体Id】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, - new GlobalDictionaryDataEntity { Id = 1300000000504, DictionaryTypeId = 1300000000105, Value = "EntityTenant【租户实体】", Code = "EntityTenant", OrderNo = 1, Remark = "【租户实体】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, + new GlobalDictionaryDataEntity { Id = 1300000000503, DictionaryTypeId = 1300000000105, Value = "EntityId【租户实体Id】", Code = "EntityId", OrderNo = 1, Remark = "【租户实体Id】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, + new GlobalDictionaryDataEntity { Id = 1300000000504, DictionaryTypeId = 1300000000105, Value = "Entity【租户实体】", Code = "Entity", OrderNo = 1, Remark = "【租户实体】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, new GlobalDictionaryDataEntity { Id = 1300000000505, DictionaryTypeId = 1300000000105, Value = "EntityBaseData【业务实体】", Code = "EntityBaseData", OrderNo = 1, Remark = "【业务实体】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, new GlobalDictionaryDataEntity { Id = 1300000000506, DictionaryTypeId = 1300000000105, Value = "无基类", Code = "", OrderNo = 1, Remark = "【无基类】", IsEnabled = false, CreatedTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(), }, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs index 0da2a26f..e617f3df 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs @@ -64,7 +64,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -93,7 +93,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -122,7 +122,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -151,7 +151,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -180,23 +180,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantDevice"), - Key = "route:tenantDevice", - Pid = StableSeedId.Menu("route:tenantDeviceManagement"), + Id = StableSeedId.Menu("route:device"), + Key = "route:device", + Pid = StableSeedId.Menu("route:deviceManagement"), Type = MenuTypeEnum.Menu, - Name = "tenantDevice", + Name = "device", Path = "/clientDelivery/device/deviceList", AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/device/device/index", Redirect = null, Permission = null, Title = "设备定义", - TitleCode = "message.menu.tenantDevice", + TitleCode = "message.menu.device", Icon = "fa-solid fa-phone", OutLink = null, IsIframe = false, @@ -209,23 +209,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantDeviceGroup"), - Key = "route:tenantDeviceGroup", - Pid = StableSeedId.Menu("route:tenantDeviceManagement"), + Id = StableSeedId.Menu("route:deviceGroup"), + Key = "route:deviceGroup", + Pid = StableSeedId.Menu("route:deviceManagement"), Type = MenuTypeEnum.Menu, - Name = "tenantDeviceGroup", + Name = "deviceGroup", Path = "/clientDelivery/device/deviceGroup", AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/device/group/index", Redirect = null, Permission = null, Title = "设备分组", - TitleCode = "message.menu.tenantDeviceGroup", + TitleCode = "message.menu.deviceGroup", Icon = "fa-solid fa-folder-open", OutLink = null, IsIframe = false, @@ -238,7 +238,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -267,23 +267,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantChannelDefinition"), - Key = "route:tenantChannelDefinition", + Id = StableSeedId.Menu("route:channelDefinition"), + Key = "route:channelDefinition", Pid = StableSeedId.Menu("route:gameAppResource"), Type = MenuTypeEnum.Menu, - Name = "tenantChannelDefinition", - Path = "/clientDelivery/tenantChannelDefinition", + Name = "channelDefinition", + Path = "/clientDelivery/channelDefinition", AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantChannelDefinition/index", + Component = "/clientDelivery/channelDefinition/index", Redirect = null, Permission = null, Title = "渠道定义", - TitleCode = "message.menu.tenantChannelDefinition", + TitleCode = "message.menu.channelDefinition", Icon = "fa-solid fa-tags", OutLink = null, IsIframe = false, @@ -296,7 +296,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -325,7 +325,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -354,7 +354,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -383,7 +383,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -411,7 +411,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -439,7 +439,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -467,7 +467,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -495,7 +495,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -523,7 +523,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -551,7 +551,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -579,7 +579,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -607,7 +607,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -635,7 +635,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -663,7 +663,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -691,7 +691,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -719,7 +719,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -747,7 +747,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -775,7 +775,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -803,7 +803,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -831,7 +831,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -859,7 +859,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -887,7 +887,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -915,7 +915,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -943,7 +943,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -971,7 +971,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -999,7 +999,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1027,7 +1027,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1055,7 +1055,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1083,7 +1083,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1111,7 +1111,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1139,7 +1139,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1167,7 +1167,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1195,7 +1195,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1223,7 +1223,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1251,7 +1251,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1279,7 +1279,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1307,7 +1307,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1335,7 +1335,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1363,14 +1363,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("tenantDevice:page"), - Key = "tenantDevice:page", - Pid = StableSeedId.Menu("route:tenantDevice"), + Id = StableSeedId.Menu("device:page"), + Key = "device:page", + Pid = StableSeedId.Menu("route:device"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1391,14 +1391,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("tenantDevice:detail"), - Key = "tenantDevice:detail", - Pid = StableSeedId.Menu("route:tenantDevice"), + Id = StableSeedId.Menu("device:detail"), + Key = "device:detail", + Pid = StableSeedId.Menu("route:device"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1419,14 +1419,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("tenantDevice:select"), - Key = "tenantDevice:select", - Pid = StableSeedId.Menu("route:tenantDevice"), + Id = StableSeedId.Menu("device:select"), + Key = "device:select", + Pid = StableSeedId.Menu("route:device"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1447,14 +1447,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("tenantDevice:add"), - Key = "tenantDevice:add", - Pid = StableSeedId.Menu("route:tenantDevice"), + Id = StableSeedId.Menu("device:add"), + Key = "device:add", + Pid = StableSeedId.Menu("route:device"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1475,14 +1475,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("tenantDevice:update"), - Key = "tenantDevice:update", - Pid = StableSeedId.Menu("route:tenantDevice"), + Id = StableSeedId.Menu("device:update"), + Key = "device:update", + Pid = StableSeedId.Menu("route:device"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1503,14 +1503,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("tenantDevice:delete"), - Key = "tenantDevice:delete", - Pid = StableSeedId.Menu("route:tenantDevice"), + Id = StableSeedId.Menu("device:delete"), + Key = "device:delete", + Pid = StableSeedId.Menu("route:device"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1531,14 +1531,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("deviceGroup:page"), Key = "deviceGroup:page", - Pid = StableSeedId.Menu("route:tenantDeviceGroup"), + Pid = StableSeedId.Menu("route:deviceGroup"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1559,14 +1559,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("deviceGroup:detail"), Key = "deviceGroup:detail", - Pid = StableSeedId.Menu("route:tenantDeviceGroup"), + Pid = StableSeedId.Menu("route:deviceGroup"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1587,14 +1587,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("deviceGroup:add"), Key = "deviceGroup:add", - Pid = StableSeedId.Menu("route:tenantDeviceGroup"), + Pid = StableSeedId.Menu("route:deviceGroup"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1615,14 +1615,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("deviceGroup:update"), Key = "deviceGroup:update", - Pid = StableSeedId.Menu("route:tenantDeviceGroup"), + Pid = StableSeedId.Menu("route:deviceGroup"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1643,14 +1643,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("deviceGroup:delete"), Key = "deviceGroup:delete", - Pid = StableSeedId.Menu("route:tenantDeviceGroup"), + Pid = StableSeedId.Menu("route:deviceGroup"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1671,7 +1671,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1699,7 +1699,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1727,7 +1727,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1755,7 +1755,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1783,7 +1783,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1811,7 +1811,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1839,7 +1839,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1867,7 +1867,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1895,7 +1895,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1923,7 +1923,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1951,7 +1951,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1786107600, UpdateTime = 1786107600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1979,7 +1979,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2007,7 +2007,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2035,7 +2035,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2063,7 +2063,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2092,7 +2092,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2120,7 +2120,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2148,7 +2148,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2176,7 +2176,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2204,7 +2204,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2232,7 +2232,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2260,7 +2260,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2288,7 +2288,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2316,7 +2316,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2345,7 +2345,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2373,7 +2373,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2401,7 +2401,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2429,7 +2429,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2457,7 +2457,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2485,7 +2485,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2513,7 +2513,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2541,7 +2541,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2570,7 +2570,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2599,7 +2599,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2628,23 +2628,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantDeviceManagement"), - Key = "route:tenantDeviceManagement", + Id = StableSeedId.Menu("route:deviceManagement"), + Key = "route:deviceManagement", Pid = StableSeedId.Menu("route:clientDelivery"), Type = MenuTypeEnum.Dir, - Name = "tenantDeviceManagement", + Name = "deviceManagement", Path = "/clientDelivery/device", AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, Title = "设备管理", - TitleCode = "message.menu.tenantDeviceManagement", + TitleCode = "message.menu.deviceManagement", Icon = "fa-solid fa-mobile-screen-button", OutLink = null, IsIframe = false, @@ -2657,14 +2657,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("channelDefinition:page"), Key = "channelDefinition:page", - Pid = StableSeedId.Menu("route:tenantChannelDefinition"), + Pid = StableSeedId.Menu("route:channelDefinition"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -2685,14 +2685,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("channelDefinition:detail"), Key = "channelDefinition:detail", - Pid = StableSeedId.Menu("route:tenantChannelDefinition"), + Pid = StableSeedId.Menu("route:channelDefinition"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -2713,14 +2713,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("channelDefinition:add"), Key = "channelDefinition:add", - Pid = StableSeedId.Menu("route:tenantChannelDefinition"), + Pid = StableSeedId.Menu("route:channelDefinition"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -2741,14 +2741,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("channelDefinition:delete"), Key = "channelDefinition:delete", - Pid = StableSeedId.Menu("route:tenantChannelDefinition"), + Pid = StableSeedId.Menu("route:channelDefinition"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -2769,14 +2769,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("channelDefinition:update"), Key = "channelDefinition:update", - Pid = StableSeedId.Menu("route:tenantChannelDefinition"), + Pid = StableSeedId.Menu("route:channelDefinition"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -2797,7 +2797,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2826,7 +2826,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2855,7 +2855,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2883,7 +2883,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2911,7 +2911,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2941,7 +2941,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2969,7 +2969,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2997,7 +2997,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3025,23 +3025,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), - Key = "route:tenantAdvertisementCallbackConfigEntity", + Id = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), + Key = "route:advertisementCallbackConfigEntity", Pid = StableSeedId.Menu("route:appIntegrationConfig"), Type = MenuTypeEnum.Menu, - Name = "tenantAdvertisementCallbackConfigEntity", - Path = "/clientDelivery/tenantAdvertisementCallbackConfigEntity", + Name = "advertisementCallbackConfigEntity", + Path = "/clientDelivery/advertisementCallbackConfigEntity", AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantAdvertisementCallbackConfigEntity/index", + Component = "/clientDelivery/advertisementCallbackConfigEntity/index", Redirect = null, Permission = null, Title = "广告回调配置", - TitleCode = "message.menu.tenantAdvertisementCallbackConfigEntity", + TitleCode = "message.menu.advertisementCallbackConfigEntity", Icon = "fa-solid fa-bullhorn", OutLink = null, IsIframe = false, @@ -3054,25 +3054,25 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { // MENU-P2-03 欠账清理:广告奖励账本页前端先行(C114/GFX-110),本行补齐菜单挂载。 // 账本类事实数据页,与 权益发货账本 同款 IsHide 隐藏页先例(侧边栏不露出,URL 直达/深链使用)。 - Id = StableSeedId.Menu("route:tenantGameAdvertisementRewardEntity"), - Key = "route:tenantGameAdvertisementRewardEntity", + Id = StableSeedId.Menu("route:gameAdvertisementRewardEntity"), + Key = "route:gameAdvertisementRewardEntity", Pid = StableSeedId.Menu("route:appIntegrationConfig"), Type = MenuTypeEnum.Menu, - Name = "tenantGameAdvertisementRewardEntity", - Path = "/clientDelivery/tenantGameAdvertisementRewardEntity", + Name = "gameAdvertisementRewardEntity", + Path = "/clientDelivery/gameAdvertisementRewardEntity", AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantGameAdvertisementRewardEntity/index", + Component = "/clientDelivery/gameAdvertisementRewardEntity/index", Redirect = null, Permission = null, Title = "广告奖励账本", - TitleCode = "message.menu.tenantGameAdvertisementRewardEntity", + TitleCode = "message.menu.gameAdvertisementRewardEntity", Icon = "fa-solid fa-rectangle-list", OutLink = null, IsIframe = false, @@ -3085,14 +3085,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("gameAdvertisementReward:page"), Key = "gameAdvertisementReward:page", - Pid = StableSeedId.Menu("route:tenantGameAdvertisementRewardEntity"), + Pid = StableSeedId.Menu("route:gameAdvertisementRewardEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3113,14 +3113,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("gameAdvertisementReward:detail"), Key = "gameAdvertisementReward:detail", - Pid = StableSeedId.Menu("route:tenantGameAdvertisementRewardEntity"), + Pid = StableSeedId.Menu("route:gameAdvertisementRewardEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3141,14 +3141,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("gameAdvertisementReward:export"), Key = "gameAdvertisementReward:export", - Pid = StableSeedId.Menu("route:tenantGameAdvertisementRewardEntity"), + Pid = StableSeedId.Menu("route:gameAdvertisementRewardEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3169,14 +3169,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("advertisementCallbackConfig:page"), Key = "advertisementCallbackConfig:page", - Pid = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), + Pid = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3197,14 +3197,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("advertisementCallbackConfig:add"), Key = "advertisementCallbackConfig:add", - Pid = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), + Pid = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3225,14 +3225,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("advertisementCallbackConfig:update"), Key = "advertisementCallbackConfig:update", - Pid = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), + Pid = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3253,14 +3253,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("advertisementCallbackConfig:delete"), Key = "advertisementCallbackConfig:delete", - Pid = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), + Pid = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3281,14 +3281,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("advertisementCallbackConfig:detail"), Key = "advertisementCallbackConfig:detail", - Pid = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), + Pid = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3309,14 +3309,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("advertisementCallbackConfig:providers"), Key = "advertisementCallbackConfig:providers", - Pid = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), + Pid = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3337,14 +3337,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("advertisementCallbackConfig:schema"), Key = "advertisementCallbackConfig:schema", - Pid = StableSeedId.Menu("route:tenantAdvertisementCallbackConfigEntity"), + Pid = StableSeedId.Menu("route:advertisementCallbackConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3365,7 +3365,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, // 「Client API 配置」组:本组各页即四类凭证分类法的管理面(应用身份 AppSecret / 传输签名 HMAC+OpenAccess / @@ -3398,23 +3398,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantClientApiPolicyEntity"), - Key = "route:tenantClientApiPolicyEntity", + Id = StableSeedId.Menu("route:clientApiPolicyEntity"), + Key = "route:clientApiPolicyEntity", Pid = StableSeedId.Menu("route:clientApiConfig"), Type = MenuTypeEnum.Menu, - Name = "tenantClientApiPolicyEntity", - Path = "/clientDelivery/tenantClientApiPolicyEntity", + Name = "clientApiPolicyEntity", + Path = "/clientDelivery/clientApiPolicyEntity", AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantClientApiPolicyEntity/index", + Component = "/clientDelivery/clientApiPolicyEntity/index", Redirect = null, Permission = null, Title = "Client API 策略", - TitleCode = "message.menu.tenantClientApiPolicyEntity", + TitleCode = "message.menu.clientApiPolicyEntity", Icon = "fa-solid fa-sliders", OutLink = null, IsIframe = false, @@ -3427,14 +3427,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("clientApiPolicy:page"), Key = "clientApiPolicy:page", - Pid = StableSeedId.Menu("route:tenantClientApiPolicyEntity"), + Pid = StableSeedId.Menu("route:clientApiPolicyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3456,14 +3456,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("clientApiPolicy:add"), Key = "clientApiPolicy:add", - Pid = StableSeedId.Menu("route:tenantClientApiPolicyEntity"), + Pid = StableSeedId.Menu("route:clientApiPolicyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3485,14 +3485,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("clientApiPolicy:update"), Key = "clientApiPolicy:update", - Pid = StableSeedId.Menu("route:tenantClientApiPolicyEntity"), + Pid = StableSeedId.Menu("route:clientApiPolicyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3514,14 +3514,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("clientApiPolicy:rotate"), Key = "clientApiPolicy:rotate", - Pid = StableSeedId.Menu("route:tenantClientApiPolicyEntity"), + Pid = StableSeedId.Menu("route:clientApiPolicyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3543,14 +3543,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("clientApiPolicy:delete"), Key = "clientApiPolicy:delete", - Pid = StableSeedId.Menu("route:tenantClientApiPolicyEntity"), + Pid = StableSeedId.Menu("route:clientApiPolicyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3572,23 +3572,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantGameLoginTicketKeyEntity"), - Key = "route:tenantGameLoginTicketKeyEntity", + Id = StableSeedId.Menu("route:gameLoginTicketKeyEntity"), + Key = "route:gameLoginTicketKeyEntity", Pid = StableSeedId.Menu("route:clientApiConfig"), Type = MenuTypeEnum.Menu, - Name = "tenantGameLoginTicketKeyEntity", - Path = "/clientDelivery/tenantGameLoginTicketKeyEntity", + Name = "gameLoginTicketKeyEntity", + Path = "/clientDelivery/gameLoginTicketKeyEntity", AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantGameLoginTicketKeyEntity/index", + Component = "/clientDelivery/gameLoginTicketKeyEntity/index", Redirect = null, Permission = null, Title = "登录票据密钥", - TitleCode = "message.menu.tenantGameLoginTicketKeyEntity", + TitleCode = "message.menu.gameLoginTicketKeyEntity", Icon = "fa-solid fa-key", OutLink = null, IsIframe = false, @@ -3601,14 +3601,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("gameLoginTicketKey:page"), Key = "gameLoginTicketKey:page", - Pid = StableSeedId.Menu("route:tenantGameLoginTicketKeyEntity"), + Pid = StableSeedId.Menu("route:gameLoginTicketKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3629,14 +3629,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("gameLoginTicketKey:update"), Key = "gameLoginTicketKey:update", - Pid = StableSeedId.Menu("route:tenantGameLoginTicketKeyEntity"), + Pid = StableSeedId.Menu("route:gameLoginTicketKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3657,23 +3657,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantAppSignatureKeyEntity"), - Key = "route:tenantAppSignatureKeyEntity", + Id = StableSeedId.Menu("route:appSignatureKeyEntity"), + Key = "route:appSignatureKeyEntity", Pid = StableSeedId.Menu("route:clientApiConfig"), Type = MenuTypeEnum.Menu, - Name = "tenantAppSignatureKeyEntity", - Path = "/clientDelivery/tenantAppSignatureKeyEntity", + Name = "appSignatureKeyEntity", + Path = "/clientDelivery/appSignatureKeyEntity", AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantAppSignatureKeyEntity/index", + Component = "/clientDelivery/appSignatureKeyEntity/index", Redirect = null, Permission = null, Title = "传输签名密钥", - TitleCode = "message.menu.tenantAppSignatureKeyEntity", + TitleCode = "message.menu.appSignatureKeyEntity", Icon = "fa-solid fa-file-signature", OutLink = null, IsIframe = false, @@ -3686,14 +3686,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("appSignatureKey:page"), Key = "appSignatureKey:page", - Pid = StableSeedId.Menu("route:tenantAppSignatureKeyEntity"), + Pid = StableSeedId.Menu("route:appSignatureKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3714,14 +3714,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("appSignatureKey:add"), Key = "appSignatureKey:add", - Pid = StableSeedId.Menu("route:tenantAppSignatureKeyEntity"), + Pid = StableSeedId.Menu("route:appSignatureKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3742,7 +3742,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3751,7 +3751,7 @@ private static IEnumerable AppCenterMenus() // 密钥环禁删是既定安全语义(历史 key 是在途请求验签依据),DeleteAsync 端点服务端亦拒删。 Id = StableSeedId.Menu("appSignatureKey:update"), Key = "appSignatureKey:update", - Pid = StableSeedId.Menu("route:tenantAppSignatureKeyEntity"), + Pid = StableSeedId.Menu("route:appSignatureKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3772,23 +3772,23 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantSessionKeyEntity"), - Key = "route:tenantSessionKeyEntity", + Id = StableSeedId.Menu("route:sessionKeyEntity"), + Key = "route:sessionKeyEntity", Pid = StableSeedId.Menu("route:clientApiConfig"), Type = MenuTypeEnum.Menu, - Name = "tenantSessionKeyEntity", - Path = "/clientDelivery/tenantSessionKeyEntity", + Name = "sessionKeyEntity", + Path = "/clientDelivery/sessionKeyEntity", AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantSessionKeyEntity/index", + Component = "/clientDelivery/sessionKeyEntity/index", Redirect = null, Permission = null, Title = "会话密钥", - TitleCode = "message.menu.tenantSessionKeyEntity", + TitleCode = "message.menu.sessionKeyEntity", Icon = "fa-solid fa-lock", OutLink = null, IsIframe = false, @@ -3801,14 +3801,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("sessionKey:page"), Key = "sessionKey:page", - Pid = StableSeedId.Menu("route:tenantSessionKeyEntity"), + Pid = StableSeedId.Menu("route:sessionKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3829,14 +3829,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("sessionKey:add"), Key = "sessionKey:add", - Pid = StableSeedId.Menu("route:tenantSessionKeyEntity"), + Pid = StableSeedId.Menu("route:sessionKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3857,7 +3857,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3865,7 +3865,7 @@ private static IEnumerable AppCenterMenus() // 同 appSignatureKey:update 口径:轮换/续租/启停共用 update;delete 不种(服务端拒删)。 Id = StableSeedId.Menu("sessionKey:update"), Key = "sessionKey:update", - Pid = StableSeedId.Menu("route:tenantSessionKeyEntity"), + Pid = StableSeedId.Menu("route:sessionKeyEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3886,7 +3886,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3914,7 +3914,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3942,14 +3942,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("channelDefinition:available"), Key = "channelDefinition:available", - Pid = StableSeedId.Menu("route:tenantChannelDefinition"), + Pid = StableSeedId.Menu("route:channelDefinition"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3970,14 +3970,14 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("channelDefinition:export"), Key = "channelDefinition:export", - Pid = StableSeedId.Menu("route:tenantChannelDefinition"), + Pid = StableSeedId.Menu("route:channelDefinition"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -3998,7 +3998,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -4026,7 +4026,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -4054,7 +4054,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs index 5c68c802..87fbe43b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs @@ -43,7 +43,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -71,7 +71,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -99,7 +99,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -127,7 +127,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -155,7 +155,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -183,7 +183,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs index 22ab1057..1cd8d886 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs @@ -48,7 +48,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -77,7 +77,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -106,7 +106,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -135,7 +135,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -164,7 +164,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -193,7 +193,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -222,7 +222,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -251,7 +251,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -279,7 +279,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -307,7 +307,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -335,7 +335,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -363,7 +363,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -391,7 +391,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -419,7 +419,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -447,7 +447,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -475,7 +475,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -503,7 +503,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -531,7 +531,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -559,7 +559,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -587,7 +587,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -615,7 +615,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -643,7 +643,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -671,7 +671,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -699,7 +699,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -727,7 +727,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -755,7 +755,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -783,7 +783,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -811,7 +811,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -839,7 +839,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -867,7 +867,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -895,7 +895,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -923,7 +923,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -951,7 +951,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -979,7 +979,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1007,7 +1007,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1035,7 +1035,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1063,7 +1063,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1091,7 +1091,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1119,7 +1119,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1147,7 +1147,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1175,7 +1175,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1203,7 +1203,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1231,7 +1231,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1259,7 +1259,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs index 1e45a643..f8baa343 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs @@ -42,7 +42,7 @@ private static IEnumerable DashboardMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -71,7 +71,7 @@ private static IEnumerable DashboardMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -99,7 +99,7 @@ private static IEnumerable DashboardMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs index 29334b02..ddb2fd8f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs @@ -47,7 +47,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1706793684, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -76,7 +76,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -104,7 +104,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -132,7 +132,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -161,7 +161,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1785168000, UpdateTime = 1785168000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -189,7 +189,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1785168000, UpdateTime = 1785168000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -217,7 +217,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1785168000, UpdateTime = 1785168000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -246,7 +246,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -274,7 +274,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -302,7 +302,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -331,7 +331,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -359,7 +359,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -387,7 +387,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -416,7 +416,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = true, + AllowAdminWhenSuperAdminOnly = true, IsDeleted = false, }, new() @@ -445,7 +445,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = true, + AllowAdminWhenSuperAdminOnly = true, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs index 6483d651..bc78675e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs @@ -45,7 +45,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -73,7 +73,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -101,7 +101,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -129,7 +129,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -157,7 +157,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -185,7 +185,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -213,7 +213,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -241,7 +241,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -269,7 +269,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -297,7 +297,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -325,7 +325,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -353,7 +353,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -381,7 +381,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -409,7 +409,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -437,7 +437,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -465,7 +465,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -493,7 +493,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -522,7 +522,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -551,7 +551,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -579,7 +579,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs index 577769cf..df524583 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs @@ -53,7 +53,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -81,7 +81,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -109,7 +109,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -137,7 +137,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -165,7 +165,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -193,7 +193,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -222,7 +222,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -250,7 +250,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -278,7 +278,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -306,7 +306,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, // ---- 三个既有运营域页面的 dispatchOnline 按钮(C343 增量,集中本文件)---- @@ -335,7 +335,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -363,7 +363,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -391,7 +391,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -420,7 +420,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -449,7 +449,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -478,7 +478,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -506,12 +506,12 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - // 高危:人工发放入口(vault:C4 六类来源之 Admin 人工;仅租户管理员可见可执行)。 + // 高危:人工发放入口(vault:C4 六类来源之 Admin 人工;仅管理员角色可见可执行)。 Id = StableSeedId.Menu("onlineWalletLedger:grant"), Key = "onlineWalletLedger:grant", Pid = StableSeedId.Menu("route:onlineWalletLedger"), @@ -535,12 +535,12 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - // 高危:人工撤销入口(按交易 Id 撤销已生效变更;仅租户管理员可见可执行)。 + // 高危:人工撤销入口(按交易 Id 撤销已生效变更;仅管理员角色可见可执行)。 Id = StableSeedId.Menu("onlineWalletLedger:revoke"), Key = "onlineWalletLedger:revoke", Pid = StableSeedId.Menu("route:onlineWalletLedger"), @@ -564,7 +564,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -592,7 +592,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -620,7 +620,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, // ---- C344 控制台三页面(在线总览 / 玩家时间线 / 统一审计检索)---- @@ -651,7 +651,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -680,7 +680,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -709,7 +709,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -739,9 +739,9 @@ private static IEnumerable OnlineMenus() Remark = null, CreatedTime = 1789603200, UpdateTime = 1789603200, - // 高危命令台:与 onlinePlayerTimeline:execute(OnlineControlledCommandService.ExecuteAsync)同口径,仅租户管理员。 + // 高危命令台:与 onlinePlayerTimeline:execute(OnlineControlledCommandService.ExecuteAsync)同口径,仅管理员角色。 SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -769,7 +769,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -797,7 +797,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -825,9 +825,9 @@ private static IEnumerable OnlineMenus() Remark = null, CreatedTime = 1789257600, UpdateTime = 1789257600, - // 高危:仅租户管理员可见可执行(与资产人工发放/撤销按钮口径一致);既有处罚/资产操作经各自页面端点直调,不经本按钮。 + // 高危:仅管理员角色可见可执行(与资产人工发放/撤销按钮口径一致);既有处罚/资产操作经各自页面端点直调,不经本按钮。 SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -855,7 +855,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs index 485da4d0..73ae0bea 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs @@ -48,7 +48,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -77,7 +77,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -106,7 +106,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -134,7 +134,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -162,7 +162,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -190,7 +190,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs index 930562e9..f7b356c2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs @@ -44,7 +44,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -73,7 +73,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -101,7 +101,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -129,7 +129,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -157,7 +157,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -186,7 +186,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs index a6ee6406..c6add916 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs @@ -33,7 +33,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -55,7 +55,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -77,7 +77,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -99,7 +99,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -121,7 +121,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -143,7 +143,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs index d439848c..36e993e4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs @@ -45,7 +45,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1706793244, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -73,7 +73,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1706793302, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -101,7 +101,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1706793277, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -129,7 +129,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1706793325, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -157,7 +157,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1706793350, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -185,7 +185,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -213,7 +213,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -241,7 +241,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -269,7 +269,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -297,7 +297,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -325,7 +325,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -353,7 +353,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -381,7 +381,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -409,7 +409,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -437,7 +437,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -465,7 +465,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -494,7 +494,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1706793124, UpdateTime = 1706793160, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -523,7 +523,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -552,7 +552,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -580,7 +580,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -609,7 +609,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs index c90f31fe..5b24b78d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs @@ -49,7 +49,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -78,7 +78,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -107,7 +107,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -136,7 +136,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -165,7 +165,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -194,7 +194,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -223,7 +223,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -252,7 +252,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -280,7 +280,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -308,7 +308,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -336,7 +336,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -364,7 +364,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -392,7 +392,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -420,7 +420,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -448,7 +448,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -476,7 +476,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -504,7 +504,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -532,7 +532,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -560,7 +560,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -588,7 +588,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -616,7 +616,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -644,7 +644,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -672,7 +672,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -700,7 +700,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -728,7 +728,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -756,7 +756,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -784,7 +784,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -812,7 +812,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -840,7 +840,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -868,7 +868,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -897,7 +897,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -925,7 +925,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -953,7 +953,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -981,7 +981,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1009,7 +1009,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1037,7 +1037,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1066,7 +1066,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1095,7 +1095,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1124,7 +1124,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs index 33cf759a..40effba3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs @@ -47,7 +47,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -76,7 +76,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1706087997, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -105,7 +105,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -134,7 +134,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -162,7 +162,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1706087997, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -190,7 +190,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1706087997, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -218,7 +218,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -246,7 +246,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -274,13 +274,13 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { // C1: 邮箱新增用户按钮权限。原先缺失该 Button 种子,/api/gameUser/addByMail 无显式绑定 → 租户 403。 - // 父菜单 route:gameUserEntity 已含 TenantAdmin,按钮经 ShouldSyncToRole 自动授予租户管理员(与 :add 一致)。 + // 父菜单 route:gameUserEntity 已含 Admin,按钮经 ShouldSyncToRole 自动授予管理员角色(与 :add 一致)。 Id = StableSeedId.Menu("gameUserEntity:addByMail"), Key = "gameUserEntity:addByMail", Pid = StableSeedId.Menu("route:gameUserEntity"), @@ -304,7 +304,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -332,7 +332,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -360,7 +360,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -388,7 +388,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -416,7 +416,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -444,7 +444,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -472,7 +472,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -502,7 +502,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -530,7 +530,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -558,7 +558,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -586,7 +586,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -614,7 +614,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -642,7 +642,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -670,7 +670,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -698,7 +698,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -726,7 +726,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs index b22cc1f3..c83ee9ca 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs @@ -44,7 +44,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1706791008, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -72,7 +72,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1706791008, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -100,7 +100,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1706791008, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -128,7 +128,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1706791008, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -156,7 +156,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1706791008, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -184,7 +184,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -212,7 +212,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -240,7 +240,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -268,7 +268,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -296,7 +296,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -324,7 +324,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -352,7 +352,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -380,7 +380,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -408,7 +408,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -436,7 +436,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -465,7 +465,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1706791008, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -494,7 +494,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -523,7 +523,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -551,7 +551,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs index 9b976ccf..06eb0827 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs @@ -63,7 +63,7 @@ private static GlobalMenuEntity Menu(string key, string parentKey, string name, CreatedTime = RewardTemplateSeedTime, UpdateTime = RewardTemplateSeedTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }; } @@ -95,7 +95,7 @@ private static GlobalMenuEntity Button(string key, string parentKey, string perm CreatedTime = RewardTemplateSeedTime, UpdateTime = RewardTemplateSeedTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs index 9c847226..4ce06185 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs @@ -48,7 +48,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -77,7 +77,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -106,7 +106,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -135,7 +135,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -164,23 +164,23 @@ private static IEnumerable SystemMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - Id = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), - Key = "route:tenantObjectStorageConfigEntity", + Id = StableSeedId.Menu("route:objectStorageConfigEntity"), + Key = "route:objectStorageConfigEntity", Pid = StableSeedId.Menu("route:systemIntegrationConfig"), Type = MenuTypeEnum.Menu, - Name = "tenantObjectStorageConfigEntity", - Path = "/system/tenantObjectStorageConfigEntity", + Name = "objectStorageConfigEntity", + Path = "/system/objectStorageConfigEntity", AppScope = MenuAppScopeEnum.Console, - Component = "/system/tenantObjectStorageConfigEntity/index", + Component = "/system/objectStorageConfigEntity/index", Redirect = null, Permission = null, Title = "对象存储配置", - TitleCode = "message.menu.tenantObjectStorageConfigEntity", + TitleCode = "message.menu.objectStorageConfigEntity", Icon = "fa-solid fa-cloud-arrow-up", OutLink = null, IsIframe = false, @@ -193,7 +193,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -206,7 +206,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.PageAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.PageAsync)), Title = "查询", TitleCode = null, Icon = null, @@ -221,7 +221,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -234,7 +234,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.UpdateUserAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.UpdateUserAsync)), Title = "编辑", TitleCode = null, Icon = null, @@ -249,7 +249,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -262,7 +262,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.GetOwnRoleListAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.GetOwnRoleListAsync)), Title = "读取用户角色", TitleCode = null, Icon = null, @@ -277,7 +277,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -290,7 +290,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.AddUserAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.AddUserAsync)), Title = "增加", TitleCode = null, Icon = null, @@ -305,7 +305,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -318,7 +318,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.DeleteUserAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.DeleteUserAsync)), Title = "删除", TitleCode = null, Icon = null, @@ -333,7 +333,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -346,7 +346,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = "tenantUser:detail", + Permission = "user:detail", Title = "详情", TitleCode = null, Icon = null, @@ -361,7 +361,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -374,7 +374,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.GrantRoleAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.GrantRoleAsync)), Title = "授权角色", TitleCode = null, Icon = null, @@ -389,7 +389,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -402,7 +402,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.ResetPwdAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.ResetPwdAsync)), Title = "重置密码", TitleCode = null, Icon = null, @@ -417,7 +417,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -430,7 +430,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.SetStatusAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.SetStatusAsync)), Title = "设置状态", TitleCode = null, Icon = null, @@ -445,7 +445,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -458,7 +458,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.GetListAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.GetListAsync)), Title = "查询", TitleCode = null, Icon = null, @@ -473,7 +473,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -486,7 +486,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.PageAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.PageAsync)), Title = "查询", TitleCode = null, Icon = null, @@ -501,7 +501,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -514,7 +514,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.UpdateRoleAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.UpdateRoleAsync)), Title = "编辑", TitleCode = null, Icon = null, @@ -529,7 +529,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -542,7 +542,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.AddRoleAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.AddRoleAsync)), Title = "增加", TitleCode = null, Icon = null, @@ -557,7 +557,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -570,7 +570,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.DeleteRoleAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.DeleteRoleAsync)), Title = "删除", TitleCode = null, Icon = null, @@ -585,7 +585,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -598,7 +598,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.GrantMenuAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.GrantMenuAsync)), Title = "授权菜单", TitleCode = null, Icon = null, @@ -613,7 +613,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -626,7 +626,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.GetOwnMenuListAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.GetOwnMenuListAsync)), Title = "角色菜单列表", TitleCode = null, Icon = null, @@ -641,7 +641,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -654,7 +654,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantRoleService.SetStatusAsync)), + Permission = MenuSeedRouteName.Of(nameof(RoleService.SetStatusAsync)), Title = "设置状态", TitleCode = null, Icon = null, @@ -669,7 +669,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -682,7 +682,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.ChangePwdAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.ChangePwdAsync)), Title = "修改密码", TitleCode = null, Icon = null, @@ -697,7 +697,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -710,7 +710,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantUserService.GetBaseInfoAsync)), + Permission = MenuSeedRouteName.Of(nameof(UserService.GetBaseInfoAsync)), Title = "基本信息", TitleCode = null, Icon = null, @@ -725,7 +725,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -738,7 +738,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantFileService.UploadSignatureAsync)), + Permission = MenuSeedRouteName.Of(nameof(FileService.UploadSignatureAsync)), Title = "电子签名", TitleCode = null, Icon = null, @@ -753,7 +753,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -766,7 +766,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantFileService.UploadAvatarAsync)), + Permission = MenuSeedRouteName.Of(nameof(FileService.UploadAvatarAsync)), Title = "上传头像", TitleCode = null, Icon = null, @@ -781,14 +781,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:page"), Key = "objectStorageConfig:page", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -809,14 +809,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:add"), Key = "objectStorageConfig:add", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -837,14 +837,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:update"), Key = "objectStorageConfig:update", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -865,14 +865,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:delete"), Key = "objectStorageConfig:delete", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -893,14 +893,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:detail"), Key = "objectStorageConfig:detail", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -921,14 +921,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:providers"), Key = "objectStorageConfig:providers", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -949,14 +949,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:schema"), Key = "objectStorageConfig:schema", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -977,14 +977,14 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { Id = StableSeedId.Menu("objectStorageConfig:testConnection"), Key = "objectStorageConfig:testConnection", - Pid = StableSeedId.Menu("route:tenantObjectStorageConfigEntity"), + Pid = StableSeedId.Menu("route:objectStorageConfigEntity"), Type = MenuTypeEnum.Button, Name = null, Path = null, @@ -1005,7 +1005,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1034,7 +1034,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1047,7 +1047,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantFileService.PageAsync)), + Permission = MenuSeedRouteName.Of(nameof(FileService.PageAsync)), Title = "查询", TitleCode = null, Icon = null, @@ -1062,7 +1062,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1075,7 +1075,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantFileService.UploadFileAsync)), + Permission = MenuSeedRouteName.Of(nameof(FileService.UploadFileAsync)), Title = "上传", TitleCode = null, Icon = null, @@ -1090,7 +1090,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1103,7 +1103,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantFileService.DownloadFileAsync)), + Permission = MenuSeedRouteName.Of(nameof(FileService.DownloadFileAsync)), Title = "下载", TitleCode = null, Icon = null, @@ -1118,7 +1118,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1131,7 +1131,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantFileService.DeleteFileAsync)), + Permission = MenuSeedRouteName.Of(nameof(FileService.DeleteFileAsync)), Title = "删除", TitleCode = null, Icon = null, @@ -1146,7 +1146,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1159,7 +1159,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = MenuSeedRouteName.Of(nameof(TenantFileService.UpdateFileAsync)), + Permission = MenuSeedRouteName.Of(nameof(FileService.UpdateFileAsync)), Title = "编辑", TitleCode = null, Icon = null, @@ -1174,7 +1174,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1203,7 +1203,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1232,7 +1232,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1261,7 +1261,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1290,7 +1290,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1318,7 +1318,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1346,7 +1346,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1374,7 +1374,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1402,7 +1402,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1430,7 +1430,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1458,7 +1458,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1486,7 +1486,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1514,7 +1514,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1542,7 +1542,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1570,7 +1570,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1602,7 +1602,7 @@ private static IEnumerable SystemMenus() // 2026-10-20 修正:父级原挂租户侧 route:system(租户系统管理组),SuperAdminOnly 过滤后 // 租户树与超管树均不可达(超管树不含 route:system 组)——改挂 route:globalConfig 全局配置组。 SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1630,7 +1630,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1658,7 +1658,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1686,7 +1686,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1714,7 +1714,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1742,7 +1742,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs index 7e21c4c7..3a949b09 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs @@ -52,7 +52,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -80,7 +80,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -108,7 +108,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -136,7 +136,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -166,7 +166,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = 1783612800, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -194,7 +194,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -222,7 +222,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -250,7 +250,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -278,7 +278,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -306,7 +306,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -334,7 +334,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -363,7 +363,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -391,7 +391,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -419,7 +419,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -447,7 +447,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -476,7 +476,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -504,7 +504,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -532,7 +532,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -560,7 +560,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -588,12 +588,12 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - // C302/GFX-715 域聚合页(与处罚管理共用 tenantGamePenaltyEntity 端点与权限码,无自有按钮); + // C302/GFX-715 域聚合页(与处罚管理共用 gamePenaltyEntity 端点与权限码,无自有按钮); // 访问该页端点要求同时持有处罚管理按钮授权。 Id = StableSeedId.Menu("route:penaltyEnforcement"), Key = "route:penaltyEnforcement", @@ -619,7 +619,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs index 15ac0b4d..4d53ed73 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs @@ -43,7 +43,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -71,7 +71,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -99,7 +99,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -127,7 +127,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -155,7 +155,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -183,7 +183,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -211,7 +211,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -239,7 +239,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -267,7 +267,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -296,7 +296,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -325,7 +325,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -353,7 +353,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/AddTenantGameAreaEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/AddGameAreaEntityRequest.cs similarity index 84% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/AddTenantGameAreaEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/AddGameAreaEntityRequest.cs index e92a5a25..975b78f5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/AddTenantGameAreaEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/AddGameAreaEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameArea.Dto; /// /// 游戏区服增加输入参数 /// -public class AddTenantGameAreaEntityRequest : GameAreaBaseRequest +public class AddGameAreaEntityRequest : GameAreaBaseRequest { /// /// 是否启用 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/GameAreaResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/GameAreaResponse.cs index 3e98ead9..6b9ebe54 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/GameAreaResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/GameAreaResponse.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.ServerCenter.GameArea.Dto; /// /// 游戏区服输出参数 /// -public class GameAreaResponse : IBasePageResponse +public class GameAreaResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/PageTenantGameAreaEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/PageGameAreaEntityRequest.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/PageTenantGameAreaEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/PageGameAreaEntityRequest.cs index b35ec32b..72b97559 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/PageTenantGameAreaEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/PageGameAreaEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Application.ServerCenter.GameArea.Dto; /// /// 游戏区服分页查询输入参数 /// -public class PageTenantGameAreaEntityRequest : BasePageRequest +public class PageGameAreaEntityRequest : BasePageRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/UpdateTenantGameAreaEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/UpdateGameAreaEntityRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/UpdateTenantGameAreaEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/UpdateGameAreaEntityRequest.cs index 3588a635..722b18c6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/UpdateTenantGameAreaEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/Dto/UpdateGameAreaEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameArea.Dto; /// /// 游戏区服更新输入参数 /// -public class UpdateTenantGameAreaEntityRequest : GameAreaBaseRequest +public class UpdateGameAreaEntityRequest : GameAreaBaseRequest { /// /// 是否启用 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/GameAreaService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/GameAreaService.cs index ccacd7c8..10f4d46f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/GameAreaService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameArea/GameAreaService.cs @@ -11,9 +11,9 @@ namespace GameFrameX.Application.ServerCenter.GameArea; /// 游戏区服服务 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] -public class GameAreaService : GenericCrudSelectService +public class GameAreaService : GenericCrudSelectService { - private readonly SqlSugarRepository _classifyRepository; + private readonly SqlSugarRepository _classifyRepository; private readonly HttpClient _httpClient; /// @@ -22,7 +22,7 @@ public class GameAreaService : GenericCrudSelectService /// /// - public GameAreaService(SqlSugarRepository repository, SqlSugarRepository classifyRepository, HttpClient httpClient) : base(repository) + public GameAreaService(SqlSugarRepository repository, SqlSugarRepository classifyRepository, HttpClient httpClient) : base(repository) { _classifyRepository = classifyRepository; _httpClient = httpClient; @@ -31,7 +31,7 @@ public GameAreaService(SqlSugarRepository /// 构建分页查询条件(含外键关联) /// - protected override ISugarQueryable BuildPageQuery(PageTenantGameAreaEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameAreaEntityRequest input) { // 区服启用标记 C301 起归一基类 IsEnabled,会被全局 ISafeEnabledFilter 隐藏禁用行; // 管理列表必须能看到禁用区服(否则无法重新启用,参照 GameAppPackageService 的 C67 FixPattern), @@ -59,7 +59,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenantGa IsDefault = u.IsDefault, IsRecommend = u.IsRecommend, ClassifyId = u.ClassifyId, - ClassifyIdName = SqlFunc.Subqueryable().Where(classifyid => classifyid.Id == u.ClassifyId).Select(classifyid => classifyid.Name), + ClassifyIdName = SqlFunc.Subqueryable().Where(classifyid => classifyid.Id == u.ClassifyId).Select(classifyid => classifyid.Name), IsEnabled = u.IsEnabled, ServerStatus = u.ServerStatus, MergedIntoServerId = u.MergedIntoServerId, @@ -100,7 +100,7 @@ protected override ISugarQueryable BuildPageQuery(PageTenantGa /// 按 Id 取区服(含禁用行)。启用标记在基类 IsEnabled(C301 归一)后受全局 ISafeEnabledFilter 过滤, /// 管理/转发操作必须触达禁用区服,故按 FixPattern 绕过全部过滤器并手动补软删条件。 /// - private async Task GetAreaForManagementAsync(long id) + private async Task GetAreaForManagementAsync(long id) { return await Repository.AsQueryable() .Filter(null, true) @@ -122,7 +122,7 @@ public override async Task GetAsync([FromQuery] BaseIdRequest /// /// 新增前归一化区服接口前缀。 /// - protected override Task OnAddingAsync(AddTenantGameAreaEntityRequest input) + protected override Task OnAddingAsync(AddGameAreaEntityRequest input) { NormalizeEndpointPrefixes(input); return Task.CompletedTask; @@ -131,7 +131,7 @@ protected override Task OnAddingAsync(AddTenantGameAreaEntityRequest input) /// /// 更新前归一化接口前缀并验证区服存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameAreaEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameAreaEntityRequest input) { NormalizeEndpointPrefixes(input); var existing = await GetAreaForManagementAsync(input.Id); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/AddTenantGameAreaClassifyEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/AddGameAreaClassifyEntityRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/AddTenantGameAreaClassifyEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/AddGameAreaClassifyEntityRequest.cs index b2534995..68abebe1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/AddTenantGameAreaClassifyEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/AddGameAreaClassifyEntityRequest.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.ServerCenter.GameAreaClassify.Dto; // AddAsync 必须继承 BaseAddRequest(空基类),不应携带主键/版本号。 // 此前继承 GameAreaClassifyBaseRequest(其又继承 BaseUpdateRequest),会把 [Required] Id/Version 带入 AddAsync 校验, // 导致新增报 {"Version":["版本号不能为空"]}。业务字段在此直接声明(与 GameAreaClassifyBaseRequest 镜像),与 AddGameAppRequest 约定一致。 -public class AddTenantGameAreaClassifyEntityRequest : BaseAddRequest +public class AddGameAreaClassifyEntityRequest : BaseAddRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/GameAreaClassifyResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/GameAreaClassifyResponse.cs index a251c0eb..1139f9e6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/GameAreaClassifyResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/GameAreaClassifyResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameAreaClassify.Dto; /// /// 游戏大区分类输出参数 /// -public class GameAreaClassifyResponse : IBasePageResponse +public class GameAreaClassifyResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/PageTenantGameAreaClassifyEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/PageGameAreaClassifyEntityRequest.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/PageTenantGameAreaClassifyEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/PageGameAreaClassifyEntityRequest.cs index b50713de..39d7c90c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/PageTenantGameAreaClassifyEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/PageGameAreaClassifyEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameAreaClassify.Dto; /// /// 游戏大区分类分页查询输入参数 /// -public class PageTenantGameAreaClassifyEntityRequest : BasePageRequest +public class PageGameAreaClassifyEntityRequest : BasePageRequest { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/UpdateTenantGameAreaClassifyEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/UpdateGameAreaClassifyEntityRequest.cs similarity index 71% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/UpdateTenantGameAreaClassifyEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/UpdateGameAreaClassifyEntityRequest.cs index 3f6c587b..4cd5ed48 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/UpdateTenantGameAreaClassifyEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/Dto/UpdateGameAreaClassifyEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameAreaClassify.Dto; /// /// 游戏大区分类更新输入参数 /// -public class UpdateTenantGameAreaClassifyEntityRequest : GameAreaClassifyBaseRequest +public class UpdateGameAreaClassifyEntityRequest : GameAreaClassifyBaseRequest { // Id 和所有公共字段已从 GameAreaClassifyBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/GameAreaClassifyService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/GameAreaClassifyService.cs index 4d846801..9b80fe0e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/GameAreaClassifyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaClassify/GameAreaClassifyService.cs @@ -8,18 +8,18 @@ namespace GameFrameX.Application.ServerCenter.GameAreaClassify; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameAreaClassifyService - : GenericCrudSelectService + : GenericCrudSelectService { public GameAreaClassifyService( - SqlSugarRepository repository) + SqlSugarRepository repository) : base(repository) { } - protected override ISugarQueryable BuildPageQuery(PageTenantGameAreaClassifyEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameAreaClassifyEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) @@ -30,7 +30,7 @@ protected override ISugarQueryable BuildPageQuery(Page /// 更新前验证记录存在。 /// DockerPassword 已不在 Output 回显(C228 敏感字段剔除),编辑弹窗回传空值时保留 DB 原值,避免误清空。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameAreaClassifyEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameAreaClassifyEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeClient.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeClient.cs index 7556279d..0bf832c3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeClient.cs @@ -12,7 +12,7 @@ public sealed class GameAreaMergeClient public int ExecutionTimeoutSeconds { get; } public GameAreaMergeClient(HttpClient httpClient, IOnlineServerEndpointResolver endpointResolver, - SqlSugarRepository repository, OnlineScopeContextFactory scopeFactory) + SqlSugarRepository repository, OnlineScopeContextFactory scopeFactory) { ExecutionTimeoutSeconds = httpClient.Timeout == Timeout.InfiniteTimeSpan ? DefaultExecutionTimeoutSeconds diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeService.cs index 57911301..f5b09965 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaMerge/GameAreaMergeService.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using System.Globalization; using System.Threading; using GameFrameX.Application.ServerCenter.GameAreaMerge.Dto; @@ -15,13 +15,13 @@ public class GameAreaMergeService : IAdminApiController private static readonly SemaphoreSlim PlanGate = new(1, 1); // ponytail: 300 秒宽限是固定值,当前上限为 300 秒;若执行链路需要更长缓冲,升级时应改为配置项并同步状态机与验收契约。 private const int ExecutionReclaimGraceSeconds = 300; - private readonly SqlSugarRepository _repository; - private readonly SqlSugarRepository _areaRepository; + private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _areaRepository; private readonly GameAreaMergeClient _client; private readonly CurrentUserContext _currentUser; - public GameAreaMergeService(SqlSugarRepository repository, - SqlSugarRepository areaRepository, GameAreaMergeClient client, CurrentUserContext currentUser) + public GameAreaMergeService(SqlSugarRepository repository, + SqlSugarRepository areaRepository, GameAreaMergeClient client, CurrentUserContext currentUser) { _repository = repository; _areaRepository = areaRepository; @@ -64,8 +64,8 @@ public async Task CancelAsync(CancelGameAreaMergePlan RequireOperator(); RequireReason(input.Reason); var cancelledTime = Now(); - var cancelled = await _repository.Context.Updateable() - .SetColumns(plan => new TenantGameAreaMergePlanEntity + var cancelled = await _repository.Context.Updateable() + .SetColumns(plan => new GameAreaMergePlanEntity { Status = GameAreaMergePlanStatus.Cancelled, CancelledByOperatorId = _currentUser.UserId, @@ -117,7 +117,7 @@ public async Task AddAsync(CreateGameAreaMergePlanReq { throw BusinessError.Oh(AreaMergeErrorCode.SourceReserved); } - var entity = new TenantGameAreaMergePlanEntity + var entity = new GameAreaMergePlanEntity { TargetServerId = input.TargetServerId, SourceServerIds = string.Join(",", input.SourceServerIds.OrderBy(identifier => identifier)), @@ -243,8 +243,8 @@ public async Task ExecuteAsync(ExecuteGameAreaMergePl var executionStartedTime = Now(); var reclaimCutoff = executionStartedTime - _client.ExecutionTimeoutSeconds - ExecutionReclaimGraceSeconds; entity.ExecutionStartedTime = executionStartedTime; - var claimed = await _repository.Context.Updateable() - .SetColumns(plan => new TenantGameAreaMergePlanEntity + var claimed = await _repository.Context.Updateable() + .SetColumns(plan => new GameAreaMergePlanEntity { Status = GameAreaMergePlanStatus.Executing, BackupIdentifier = entity.BackupIdentifier, @@ -278,7 +278,7 @@ public async Task ExecuteAsync(ExecuteGameAreaMergePl await _repository.Context.Ado.BeginTranAsync(); try { - await _repository.Context.Updateable().SetColumns(area => new TenantGameAreaEntity + await _repository.Context.Updateable().SetColumns(area => new GameAreaEntity { ServerStatus = GameServerStatus.Merged, MergedIntoServerId = entity.TargetServerId, @@ -301,18 +301,18 @@ public async Task ExecuteAsync(ExecuteGameAreaMergePl return ToResponse(entity); } - private async Task FindAsync(long identifier) + private async Task FindAsync(long identifier) { return await _repository.GetFirstAsync(plan => plan.Id == identifier) ?? throw BusinessError.Oh(AreaMergeErrorCode.PlanNotFound); } - private Task PersistAsync(TenantGameAreaMergePlanEntity entity) + private Task PersistAsync(GameAreaMergePlanEntity entity) { return _repository.Context.Updateable(entity).ExecuteCommandAsync(); } - private async Task FailAsync(TenantGameAreaMergePlanEntity entity) + private async Task FailAsync(GameAreaMergePlanEntity entity) { entity.Status = GameAreaMergePlanStatus.Failed; entity.FailedTime = Now(); @@ -339,7 +339,7 @@ private static void RequireReason(string reason) private static long Now() => DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - private bool IsExecutionReclaimable(TenantGameAreaMergePlanEntity entity) + private bool IsExecutionReclaimable(GameAreaMergePlanEntity entity) { if (entity.Status != GameAreaMergePlanStatus.Executing || !entity.ExecutionStartedTime.HasValue) { @@ -350,7 +350,7 @@ private bool IsExecutionReclaimable(TenantGameAreaMergePlanEntity entity) return entity.ExecutionStartedTime.Value <= reclaimCutoff; } - private GameAreaMergePlanResponse ToResponse(TenantGameAreaMergePlanEntity entity) + private GameAreaMergePlanResponse ToResponse(GameAreaMergePlanEntity entity) { var response = entity.Adapt(); response.Cancellable = entity.ExecutionStartedTime == null @@ -362,9 +362,9 @@ private GameAreaMergePlanResponse ToResponse(TenantGameAreaMergePlanEntity entit return response; } - private static long[] Sources(TenantGameAreaMergePlanEntity entity) => entity.SourceServerIds.Split(',').Select(value => long.Parse(value, CultureInfo.InvariantCulture)).ToArray(); + private static long[] Sources(GameAreaMergePlanEntity entity) => entity.SourceServerIds.Split(',').Select(value => long.Parse(value, CultureInfo.InvariantCulture)).ToArray(); - private static void EnsureState(TenantGameAreaMergePlanEntity entity, params GameAreaMergePlanStatus[] allowed) + private static void EnsureState(GameAreaMergePlanEntity entity, params GameAreaMergePlanStatus[] allowed) { if (!allowed.Contains(entity.Status)) { @@ -372,7 +372,7 @@ private static void EnsureState(TenantGameAreaMergePlanEntity entity, params Gam } } - private static void ValidateReport(TenantGameAreaMergePlanEntity entity, GameAreaMergeReportResponse report, bool requirePlan) + private static void ValidateReport(GameAreaMergePlanEntity entity, GameAreaMergeReportResponse report, bool requirePlan) { if (string.IsNullOrWhiteSpace(report.PlanId) || report.TargetServerId != entity.TargetServerId || report.SourceServerIds == null || !report.SourceServerIds.OrderBy(identifier => identifier).SequenceEqual(Sources(entity)) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaProvision/GameAreaProvisionService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaProvision/GameAreaProvisionService.cs index fd105c8a..34db8b5b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaProvision/GameAreaProvisionService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameAreaProvision/GameAreaProvisionService.cs @@ -13,12 +13,12 @@ public sealed class GameAreaProvisionService : IAdminApiController { // 单宿主内串行编排;跨宿主以主键唯一、稳定容器名称、ServerId 注册幂等和行版本兜底。 private static readonly SemaphoreSlim ExecutionGate = new(1, 1); - private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _repository; private readonly GameAreaService _areaService; private readonly OnlineScopeContextFactory _scopeFactory; private readonly IOnlineServerClient _onlineClient; - public GameAreaProvisionService(SqlSugarRepository repository, + public GameAreaProvisionService(SqlSugarRepository repository, GameAreaService areaService, OnlineScopeContextFactory scopeFactory, IOnlineServerClient onlineClient) { _repository = repository; @@ -44,7 +44,7 @@ public async Task PreviewAsync([FromQuery] Bas ValidateIdentifier(input); var template = await FindAsync(input.Id) ?? throw BusinessError.Oh(AreaProvisionErrorCode.TemplateNotFound); var clone = CloneConfiguration(template); - var fields = typeof(TenantGameAreaEntity).GetProperties() + var fields = typeof(GameAreaEntity).GetProperties() .Where(property => ClonedFieldNames.Contains(property.Name)) .ToDictionary(property => property.Name, property => Convert.ToString(property.GetValue(clone), CultureInfo.InvariantCulture)); fields[nameof(GameAreaProvisionCreateRequest.ServerParameters)] = template.ServerParams; @@ -217,7 +217,7 @@ public async Task StatusAsync([FromQuery] BaseI return BuildStatus(area, string.IsNullOrWhiteSpace(area.ServerContainerId) ? null : await QueryCalendarAsync(area)); } - private async Task QueryCalendarAsync(TenantGameAreaEntity area) + private async Task QueryCalendarAsync(GameAreaEntity area) { try { @@ -238,17 +238,17 @@ private async Task QueryCalendarAsync(TenantG } } - private Task FindAsync(long identifier) + private Task FindAsync(long identifier) { return _repository.AsQueryable().Filter(null, true).Where(area => area.IsDeleted == false).FirstAsync(area => area.Id == identifier); } - private async Task RequireAreaAsync(long identifier) + private async Task RequireAreaAsync(long identifier) { return await FindAsync(identifier) ?? throw BusinessError.Oh(AreaProvisionErrorCode.ServerNotFound); } - private static GameAreaProvisionStatusResponse BuildStatus(TenantGameAreaEntity area, GameAreaProvisionCalendarResponse? calendar = null) + private static GameAreaProvisionStatusResponse BuildStatus(GameAreaEntity area, GameAreaProvisionCalendarResponse? calendar = null) { return new GameAreaProvisionStatusResponse { @@ -287,7 +287,7 @@ private static bool IsAddress(string value, params string[] schemes) return Uri.TryCreate(value, UriKind.Absolute, out var address) && schemes.Contains(address.Scheme) && !string.IsNullOrEmpty(address.Host); } - private static bool MatchesRequest(TenantGameAreaEntity area, GameAreaProvisionCreateRequest input) + private static bool MatchesRequest(GameAreaEntity area, GameAreaProvisionCreateRequest input) { return area.Name == input.Name.Trim() && area.HttpManageUrl == input.HttpManageUrl.Trim().TrimEnd('/') && area.TcpSocketUrl == input.TcpSocketUrl.Trim() && area.WebSocketUrl == input.WebSocketUrl.Trim() @@ -337,9 +337,9 @@ private static Dictionary ParseServerParameters(string parameter "ClientDispatchApiPrefix", "FulfillmentApiPrefix", "GmApiPrefix", "ControlApiPrefix", "OnlineAdminApiPrefix", }; - private static TenantGameAreaEntity CloneConfiguration(TenantGameAreaEntity template) + private static GameAreaEntity CloneConfiguration(GameAreaEntity template) { - return new TenantGameAreaEntity + return new GameAreaEntity { Description = template.Description, ClassifyId = template.ClassifyId, Capacity = template.Capacity, ServerParams = template.ServerParams, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/AddTenantGameDockerTagEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/AddGameDockerTagEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/AddTenantGameDockerTagEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/AddGameDockerTagEntityRequest.cs index bbaf65bf..2229b423 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/AddTenantGameDockerTagEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/AddGameDockerTagEntityRequest.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.ServerCenter.GameDockerTag.Dto; // AddAsync 必须继承 BaseAddRequest(空基类),不应携带主键/版本号。 // 此前继承 GameDockerTagBaseRequest(其又继承 BaseUpdateRequest),会把 [Required] Id/Version 带入 AddAsync 校验, // 导致新增报 {"Version":["版本号不能为空"]}。业务字段在此直接声明,与 AddGameAppRequest 约定一致。 -public class AddTenantGameDockerTagEntityRequest : BaseAddRequest +public class AddGameDockerTagEntityRequest : BaseAddRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/GameDockerTagResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/GameDockerTagResponse.cs index 6c7028bf..e760997b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/GameDockerTagResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/GameDockerTagResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameDockerTag.Dto; /// /// 游戏大区分类输出参数 /// -public class GameDockerTagResponse : IBasePageResponse +public class GameDockerTagResponse : IBasePageResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/PageTenantGameDockerTagEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/PageGameDockerTagEntityRequest.cs similarity index 78% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/PageTenantGameDockerTagEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/PageGameDockerTagEntityRequest.cs index 8b2f66e9..82b5fb41 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/PageTenantGameDockerTagEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/PageGameDockerTagEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameDockerTag.Dto; /// /// 游戏大区分类分页查询输入参数 /// -public class PageTenantGameDockerTagEntityRequest : BasePageRequest +public class PageGameDockerTagEntityRequest : BasePageRequest { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/UpdateTenantGameDockerTagEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/UpdateGameDockerTagEntityRequest.cs similarity index 72% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/UpdateTenantGameDockerTagEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/UpdateGameDockerTagEntityRequest.cs index 5b3cf5c2..0a819be4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/UpdateTenantGameDockerTagEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/Dto/UpdateGameDockerTagEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.ServerCenter.GameDockerTag.Dto; /// /// 游戏Docker标签更新输入参数 /// -public class UpdateTenantGameDockerTagEntityRequest : GameDockerTagBaseRequest +public class UpdateGameDockerTagEntityRequest : GameDockerTagBaseRequest { // Id 和所有公共字段已从 GameDockerTagBaseRequest 继承 } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/GameDockerTagService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/GameDockerTagService.cs index e26df8d5..4becbe75 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/GameDockerTagService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameDockerTag/GameDockerTagService.cs @@ -8,12 +8,12 @@ namespace GameFrameX.Application.ServerCenter.GameDockerTag; /// [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] public class GameDockerTagService - : GenericCrudSelectService + : GenericCrudSelectService { - public GameDockerTagService(SqlSugarRepository repository) + public GameDockerTagService(SqlSugarRepository repository) : base(repository) { } @@ -21,7 +21,7 @@ public GameDockerTagService(SqlSugarRepository /// 更新前验证记录存在。 /// - protected override async Task OnUpdatingAsync(UpdateTenantGameDockerTagEntityRequest input) + protected override async Task OnUpdatingAsync(UpdateGameDockerTagEntityRequest input) { var existing = await Repository.GetFirstAsync(u => u.Id == input.Id); if (existing == null) @@ -31,7 +31,7 @@ protected override async Task OnUpdatingAsync(UpdateTenantGameDockerTagEntityReq } - protected override ISugarQueryable BuildPageQuery(PageTenantGameDockerTagEntityRequest input) + protected override ISugarQueryable BuildPageQuery(PageGameDockerTagEntityRequest input) { return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameServerEndpointUrlBuilder.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameServerEndpointUrlBuilder.cs index 4c299ecd..8a20c40e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameServerEndpointUrlBuilder.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/GameServerEndpointUrlBuilder.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.ServerCenter; /// 所有 Admin / Client API 调游戏服 HTTP 的代码必须经此构造器,显式声明 能力类型,不得散落硬编码 /game/api。 /// 规则: /// -/// 作为根地址,必须非空且为合法 http/https 绝对 URI,否则抛 。 +/// 作为根地址,必须非空且为合法 http/https 绝对 URI,否则抛 。 /// 按 kind 选择区服对应前缀;对应前缀为空时直接抛 ,拒绝拼出根地址调用(空表示该区服未开放对应能力;C150 §3.2:空表示 Admin 不构造 GM/控制 URL)。 /// OnlineAdmin 前缀(默认 online/admin)空时同上抛异常拒绝构造(C339 / vault:C2 S1.7:空表示该区服未开放 Online 管理)。 /// 前缀去除首尾 /,action 去除开头 /,拼接为 {root}/{prefix}/{action}。 @@ -24,13 +24,13 @@ public static class GameServerEndpointUrlBuilder /// /// 按 kind 构造区服游戏服 HTTP 调用 URL。 /// - /// 目标区服,提供 根地址与各能力前缀。 + /// 目标区服,提供 根地址与各能力前缀。 /// 接口能力类型;决定使用哪个前缀字段。 /// Server HTTP action 名(snake_case,如 req_player_send_item)。 /// 形如 {root}/{prefix}/{action} 的绝对 URL。 /// 为 null。 /// 根地址缺失/非法,或对应能力前缀为空。 - public static string Build(TenantGameAreaEntity area, GameServerEndpointKindEnum kind, string action) + public static string Build(GameAreaEntity area, GameServerEndpointKindEnum kind, string action) { if (area == null) { @@ -63,7 +63,7 @@ public static string Build(TenantGameAreaEntity area, GameServerEndpointKindEnum /// /// 解析 kind 对应前缀;任一能力前缀为空即抛 ,拒绝构造调用 URL。 /// - private static string ResolvePrefix(TenantGameAreaEntity area, GameServerEndpointKindEnum kind) + private static string ResolvePrefix(GameAreaEntity area, GameServerEndpointKindEnum kind) { switch (kind) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/IMailCampaignServerClient.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/IMailCampaignServerClient.cs index 2dac9417..f7b1c910 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/IMailCampaignServerClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/IMailCampaignServerClient.cs @@ -14,24 +14,24 @@ public interface IMailCampaignServerClient /// /// 发布 Campaign(写入不可变快照,返回 CampaignId + Version)。 /// - /// 目标区服 TenantGameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 - Task PublishAsync(TenantGameAreaEntity area, PublishMailCampaignRequest request); + /// 目标区服 GameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 + Task PublishAsync(GameAreaEntity area, PublishMailCampaignRequest request); /// /// 预览 / 校验 Campaign(不落库,返回预估命中玩家数)。 /// - /// 目标区服 TenantGameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 - Task PreviewAsync(TenantGameAreaEntity area, PreviewMailCampaignRequest request); + /// 目标区服 GameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 + Task PreviewAsync(GameAreaEntity area, PreviewMailCampaignRequest request); /// /// 撤回 Campaign(撤回不可逆 B3)。 /// - /// 目标区服 TenantGameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 - Task RevokeAsync(TenantGameAreaEntity area, RevokeMailCampaignRequest request); + /// 目标区服 GameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 + Task RevokeAsync(GameAreaEntity area, RevokeMailCampaignRequest request); /// /// 查询 Campaign 发布状态。 /// - /// 目标区服 TenantGameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 - Task QueryAsync(TenantGameAreaEntity area, QueryMailCampaignRequest request); + /// 目标区服 GameAreaEntity,提供 HttpManageUrl 根地址与 FulfillmentApiPrefix 能力前缀。 + Task QueryAsync(GameAreaEntity area, QueryMailCampaignRequest request); } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/MailCampaignServerClient.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/MailCampaignServerClient.cs index 23c36f05..6dfa2b0a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/MailCampaignServerClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Mail/MailCampaignServerClient.cs @@ -44,30 +44,30 @@ public MailCampaignServerClient(HttpClient httpClient) } /// - public async Task PublishAsync(TenantGameAreaEntity area, PublishMailCampaignRequest request) + public async Task PublishAsync(GameAreaEntity area, PublishMailCampaignRequest request) { return await PostAsync(area, PublishAction, request); } /// - public async Task PreviewAsync(TenantGameAreaEntity area, PreviewMailCampaignRequest request) + public async Task PreviewAsync(GameAreaEntity area, PreviewMailCampaignRequest request) { return await PostAsync(area, PreviewAction, request); } /// - public async Task RevokeAsync(TenantGameAreaEntity area, RevokeMailCampaignRequest request) + public async Task RevokeAsync(GameAreaEntity area, RevokeMailCampaignRequest request) { return await PostAsync(area, RevokeAction, request); } /// - public async Task QueryAsync(TenantGameAreaEntity area, QueryMailCampaignRequest request) + public async Task QueryAsync(GameAreaEntity area, QueryMailCampaignRequest request) { return await PostAsync(area, QueryAction, request); } - private async Task PostAsync(TenantGameAreaEntity area, string action, TRequest request) + private async Task PostAsync(GameAreaEntity area, string action, TRequest request) where TResponse : class { var url = GameServerEndpointUrlBuilder.Build(area, GameServerEndpointKindEnum.Fulfillment, action); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/IOnlineServerEndpointResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/IOnlineServerEndpointResolver.cs index 11080f5e..b0232c8d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/IOnlineServerEndpointResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/IOnlineServerEndpointResolver.cs @@ -17,5 +17,5 @@ public interface IOnlineServerEndpointResolver /// Online 管理 action 名。 /// 绝对 URL。 /// 根地址缺失/非法,或 Online 管理前缀为空(同 Gm/Control 守卫:空表示该区服未开放 Online 管理)。 - string Resolve(TenantGameAreaEntity area, string action); + string Resolve(GameAreaEntity area, string action); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineScopeContextFactory.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineScopeContextFactory.cs index 17aaa44f..8c64695e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineScopeContextFactory.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineScopeContextFactory.cs @@ -6,9 +6,9 @@ namespace GameFrameX.Application.ServerCenter.Online; public sealed class OnlineScopeContextFactory { // S3/C401 断链修复点 - private readonly SqlSugarRepository _gameAreaRepository; + private readonly SqlSugarRepository _gameAreaRepository; - public OnlineScopeContextFactory(SqlSugarRepository gameAreaRepository) + public OnlineScopeContextFactory(SqlSugarRepository gameAreaRepository) { _gameAreaRepository = gameAreaRepository; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs index 2523d469..87823668 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs @@ -11,11 +11,11 @@ public sealed class OnlineServerClient : IOnlineServerClient { private readonly HttpClient _httpClient; private readonly IOnlineServerEndpointResolver _endpointResolver; - private readonly SqlSugarRepository _gameAreaRepository; + private readonly SqlSugarRepository _gameAreaRepository; public OnlineServerClient(HttpClient httpClient, IOnlineServerEndpointResolver endpointResolver, - SqlSugarRepository gameAreaRepository) + SqlSugarRepository gameAreaRepository) { _httpClient = httpClient; _endpointResolver = endpointResolver; @@ -104,7 +104,7 @@ private static TResponse Unwrap(string content, string url) where TRe { foreach (var property in payload.EnumerateObject()) { - if (string.Equals(property.Name, "TenantId", StringComparison.OrdinalIgnoreCase) + if (string.Equals(property.Name, "Id", StringComparison.OrdinalIgnoreCase) || string.Equals(property.Name, "AppId", StringComparison.OrdinalIgnoreCase) || string.Equals(property.Name, "ServerId", StringComparison.OrdinalIgnoreCase)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerEndpointResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerEndpointResolver.cs index 590861d6..1baa673c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerEndpointResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerEndpointResolver.cs @@ -4,14 +4,14 @@ namespace GameFrameX.Application.ServerCenter.Online; /// /// 默认实现(来源 change C339 / vault:C2 S1.7)。 -/// 内部经 +/// 内部经 /// 按 能力构造:root 校验、前缀空值拒绝(同 Gm/Control 守卫)、 /// 斜杠归一化均复用既有构造器规则,不另起第二套拼接逻辑。 /// public sealed class OnlineServerEndpointResolver : IOnlineServerEndpointResolver { /// - public string Resolve(TenantGameAreaEntity area, string action) + public string Resolve(GameAreaEntity area, string action) { return GameServerEndpointUrlBuilder.Build(area, GameServerEndpointKindEnum.OnlineAdmin, action); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/Dto/GameAnnouncementResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/Dto/GameAnnouncementResponse.cs index 436885be..d9506b1b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/Dto/GameAnnouncementResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/Dto/GameAnnouncementResponse.cs @@ -1,11 +1,11 @@ using GameFrameX.Core.BaseInputOutput; -using GameFrameX.Entity.Tenant.Game.Announcement; +using GameFrameX.Entity.Business.Game.Announcement; namespace GameFrameX.Client.Api.GameAnnouncement.Dto; /// /// 游戏公告输出参数 /// -public class GameAnnouncementResponse : TenantGameAnnouncementEntity, IBasePageResponse +public class GameAnnouncementResponse : GameAnnouncementEntity, IBasePageResponse { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/GameAnnouncementController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/GameAnnouncementController.cs index 34a04a00..ffd7eaae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/GameAnnouncementController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAnnouncement/GameAnnouncementController.cs @@ -1,6 +1,6 @@ using GameFrameX.Client.Api.GameAnnouncement.Dto; using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.Announcement; +using GameFrameX.Entity.Business.Game.Announcement; namespace GameFrameX.Client.Api.GameAnnouncement; @@ -8,7 +8,7 @@ namespace GameFrameX.Client.Api.GameAnnouncement; /// 公告控制器 /// /// -/// 类名自 TenantGameAnnouncementEntityServiceController 清理而来(GFX-708);调用方(游戏客户端)依赖既有路径, +/// 类名自 GameAnnouncementEntityServiceController 清理而来(GFX-708);调用方(游戏客户端)依赖既有路径, /// 显式 [Route] 锁定旧 token 路由解析结果 api/GameAnnouncementService/[action],确保路由零变化。 /// 不继承 BaseController<T>:其类级 token 路由 [controller] 会随类名解析为 api/GameAnnouncement 叠加出别名端点; /// 本类直接继承 Controller 并自持仓储,路由仅显式声明一条。 @@ -17,13 +17,13 @@ namespace GameFrameX.Client.Api.GameAnnouncement; [ApiController] public class GameAnnouncementController : Controller { - private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _repository; /// /// /// /// - public GameAnnouncementController(SqlSugarRepository repository) + public GameAnnouncementController(SqlSugarRepository repository) { _repository = repository; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAppVersion/GameAppVersionController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAppVersion/GameAppVersionController.cs index 55102141..b4877ed1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAppVersion/GameAppVersionController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAppVersion/GameAppVersionController.cs @@ -1,5 +1,5 @@ using GameFrameX.Client.Api.Services.PackageVersion; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Client.Api.GameAppVersion.Dto; using GameFrameX.Client.Api.Services; using GameFrameX.Core.Middleware; @@ -11,16 +11,16 @@ namespace GameFrameX.Client.Api.GameAppVersion; /// /// 程序版本控制器 /// -public class GameAppVersionController : BaseController +public class GameAppVersionController : BaseController { - private readonly IFallbackMatcher _matcher; + private readonly IFallbackMatcher _matcher; /// /// /// /// /// - public GameAppVersionController(SqlSugarRepository service, IFallbackMatcher matcher) : base(service) + public GameAppVersionController(SqlSugarRepository service, IFallbackMatcher matcher) : base(service) { _matcher = matcher; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameArea/GameAreaController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameArea/GameAreaController.cs index dc11674a..734a8ac2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameArea/GameAreaController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameArea/GameAreaController.cs @@ -1,5 +1,5 @@ using GameFrameX.Client.Api.GameArea.Dto; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Service; namespace GameFrameX.Client.Api.GameArea; @@ -7,15 +7,15 @@ namespace GameFrameX.Client.Api.GameArea; /// /// 程序版本控制器 /// -public class GameAreaController : BaseController +public class GameAreaController : BaseController { - private readonly IClientApiTenantOptionsProvider _optionsProvider; + private readonly IClientApiOptionsProvider _optionsProvider; /// /// /// /// - public GameAreaController(SqlSugarRepository service, IClientApiTenantOptionsProvider optionsProvider) : base(service) + public GameAreaController(SqlSugarRepository service, IClientApiOptionsProvider optionsProvider) : base(service) { _optionsProvider = optionsProvider; } @@ -28,7 +28,7 @@ public GameAreaController(SqlSugarRepository service, ICli [ProducesResponseType(200, Type = typeof(List))] public async Task>> GetAreaList([FromBody] GameAreaGetAreaListRequest gameAreaGetAreaListRequest) { - var catList = await PRepository.AsSugarClient().Queryable().ToListAsync(); + var catList = await PRepository.AsSugarClient().Queryable().ToListAsync(); var gameAreaCatEntityList = new List(catList.Count); var gameAreaEntities = await PRepository.GetListAsync(area => area.ServerStatus != GameFrameX.Entity.Enum.GameServerStatus.Merged); var areaPolicy = await _optionsProvider.GetAreaPolicyAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAssetPackageVersion/GameAssetPackageVersionController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAssetPackageVersion/GameAssetPackageVersionController.cs index 4ee63e38..a1da4c25 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAssetPackageVersion/GameAssetPackageVersionController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameAssetPackageVersion/GameAssetPackageVersionController.cs @@ -1,6 +1,6 @@ using GameFrameX.Client.Api.Services.PackageVersion; -using GameFrameX.Entity.Tenant.Game.Release; -using GameFrameX.Entity.Tenant.Device; +using GameFrameX.Entity.Business.Game.Release; +using GameFrameX.Entity.Business.Device; using GameFrameX.Client.Api.GameAssetPackageVersion.Dto; using GameFrameX.Client.Api.Services; using GameFrameX.Core.Middleware; @@ -12,10 +12,10 @@ namespace GameFrameX.Client.Api.GameAssetPackageVersion; /// /// 资源包版本控制器 /// -public class GameAssetPackageVersionController : BaseController +public class GameAssetPackageVersionController : BaseController { - private readonly Repository _deviceUniqueIdentifier; - private readonly IFallbackMatcher _matcher; + private readonly Repository _deviceUniqueIdentifier; + private readonly IFallbackMatcher _matcher; /// /// @@ -23,7 +23,7 @@ public class GameAssetPackageVersionController : BaseController /// /// - public GameAssetPackageVersionController(SqlSugarRepository service, Repository deviceUniqueIdentifier, IFallbackMatcher matcher) : base(service) + public GameAssetPackageVersionController(SqlSugarRepository service, Repository deviceUniqueIdentifier, IFallbackMatcher matcher) : base(service) { _deviceUniqueIdentifier = deviceUniqueIdentifier; _matcher = matcher; @@ -82,13 +82,13 @@ public async Task> RegisterDevice([Fr return HttpJsonResultData.Success(new DeviceRegisterResponse { DeviceId = hasExist.Id, }); } - var tenantDeviceUniqueIdentifier = new TenantGameAppDeviceEntity + var deviceUniqueIdentifier = new GameAppDeviceEntity { Name = "", Description = "", DeviceUniqueIdentifier = request.DeviceUniqueIdentifier, }; - await _deviceUniqueIdentifier.InsertAsync(tenantDeviceUniqueIdentifier); - return HttpJsonResultData.Success(new DeviceRegisterResponse { DeviceId = tenantDeviceUniqueIdentifier.Id, }); + await _deviceUniqueIdentifier.InsertAsync(deviceUniqueIdentifier); + return HttpJsonResultData.Success(new DeviceRegisterResponse { DeviceId = deviceUniqueIdentifier.Id, }); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRedeemCode/GameRedeemCodeController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRedeemCode/GameRedeemCodeController.cs index e329cad6..e648159e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRedeemCode/GameRedeemCodeController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRedeemCode/GameRedeemCodeController.cs @@ -9,13 +9,13 @@ namespace GameFrameX.Client.Api.GameRedeemCode; /// /// 兑换码控制器 /// -public class GameRedeemCodeController : BaseController +public class GameRedeemCodeController : BaseController { - private readonly Repository _recordService; - private readonly Repository _channelRepository; - private readonly Repository _channelRoleUsageRepository; + private readonly Repository _recordService; + private readonly Repository _channelRepository; + private readonly Repository _channelRoleUsageRepository; private readonly HttpClient _httpClientFactory; - private readonly Repository _areaRepository; + private readonly Repository _areaRepository; /// /// @@ -26,11 +26,11 @@ public class GameRedeemCodeController : BaseController /// public GameRedeemCodeController( - SqlSugarRepository service, - Repository recordService, - Repository channelRepository, - Repository channelRoleUsageRepository, - Repository areaService, + SqlSugarRepository service, + Repository recordService, + Repository channelRepository, + Repository channelRoleUsageRepository, + Repository areaService, HttpClient httpClientFactory) : base(service) { _recordService = recordService; @@ -70,7 +70,7 @@ public async Task> Consume([FromBod return GameApiResult.Error(RedeemCodeErrorCode.RedeemCodeExpired, "兑换码已过期"); } - TenantGameAreaEntity gameAreaEntity; + GameAreaEntity gameAreaEntity; // 如果兑换码没有指定区服,则使用默认区服 if (gameRedeemCodeEntity.AreaId <= 0) { @@ -133,7 +133,7 @@ public async Task> Consume([FromBod // 更新兑换码信息 gameRedeemCodeEntity.UsedCount++; // 更新兑换码使用记录 - var gameRedeemCodeUseRecord = new TenantGameRedeemCodeUseRecordEntity + var gameRedeemCodeUseRecord = new GameRedeemCodeUseRecordEntity { AreaId = gameAreaEntity.Id, PlayerId = input.RoleId, @@ -159,7 +159,7 @@ public async Task> Consume([FromBod /// 解析兑换码归属渠道/分组并预检组级角色次数。客户端不传 ChannelId,服务端从兑换码反推。 /// 无 ChannelId / 渠道未配置限制时返回 Neutral;渠道不存在返回 Rejected;次数达上限返回 LimitReached。 /// - private async Task ResolveChannelRoleUsageAsync(TenantGameRedeemCodeEntity code, long roleId) + private async Task ResolveChannelRoleUsageAsync(GameRedeemCodeEntity code, long roleId) { if (!code.ChannelId.HasValue || code.ChannelId.Value <= 0) { @@ -194,7 +194,7 @@ private async Task ResolveChannelRoleUsageAsync(TenantG /// 事务边界:与使用记录插入、兑换码 UsedCount 递增同处发奖成功路径;累计写失败不回滚已发奖励,由日志显性化(与既有使用记录写失败同款风险)。 /// 并发兜底:累计表 ux_redeem_channel_role_usage 唯一约束保证 (ChannelId, RoleId) 只有一行;递增走条件更新 WHERE UsedCount < limit 避免超计数。 /// - private async Task AccumulateChannelRoleUsageAsync(ChannelRoleUsageContext context, TenantGameRedeemCodeEntity code, long roleId) + private async Task AccumulateChannelRoleUsageAsync(ChannelRoleUsageContext context, GameRedeemCodeEntity code, long roleId) { if (!context.ShouldAccumulate) { @@ -207,7 +207,7 @@ private async Task AccumulateChannelRoleUsageAsync(ChannelRoleUsageContext conte // 预检时该角色尚无累计行;唯一约束兜底并发插入,竞争失败方回落到条件递增。 try { - await _channelRoleUsageRepository.InsertAsync(new TenantGameRedeemCodeChannelRoleUsageEntity + await _channelRoleUsageRepository.InsertAsync(new GameRedeemCodeChannelRoleUsageEntity { ChannelId = context.ChannelId, RoleId = roleId, @@ -226,7 +226,7 @@ await _channelRoleUsageRepository.InsertAsync(new TenantGameRedeemCodeChannelRol // 条件递增:仅当当前累计未达上限时 +1,避免并发竞争导致超计数 var limit = context.RoleUsageLimit; await _channelRoleUsageRepository.AsUpdateable() - .SetColumns(u => new TenantGameRedeemCodeChannelRoleUsageEntity + .SetColumns(u => new GameRedeemCodeChannelRoleUsageEntity { UsedCount = u.UsedCount + 1, LastCode = code.Code, @@ -248,7 +248,7 @@ private struct ChannelRoleUsageContext public int RoleUsageLimit { get; private set; } - public TenantGameRedeemCodeChannelRoleUsageEntity? Existing { get; private set; } + public GameRedeemCodeChannelRoleUsageEntity? Existing { get; private set; } public static ChannelRoleUsageContext Neutral() { @@ -265,7 +265,7 @@ public static ChannelRoleUsageContext AsLimitReached() return new ChannelRoleUsageContext { LimitReached = true, }; } - public static ChannelRoleUsageContext Tracked(TenantGameRedeemCodeChannelEntity channel, TenantGameRedeemCodeChannelRoleUsageEntity? existing) + public static ChannelRoleUsageContext Tracked(GameRedeemCodeChannelEntity channel, GameRedeemCodeChannelRoleUsageEntity? existing) { return new ChannelRoleUsageContext { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/AddTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/AddGameRoleEntityRequest.cs similarity index 83% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/AddTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/AddGameRoleEntityRequest.cs index caeea6ea..b353d386 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/AddTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/AddGameRoleEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Client.Api.GameRole.Dto; /// /// 游戏角色增加输入参数 /// -public class AddTenantGameRoleEntityRequest : GameRoleBaseRequest +public class AddGameRoleEntityRequest : GameRoleBaseRequest { /// /// 英雄发型配置id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/DeleteTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/DeleteGameRoleEntityRequest.cs similarity index 70% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/DeleteTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/DeleteGameRoleEntityRequest.cs index 4a5e11f0..e0d802ae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/DeleteTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/DeleteGameRoleEntityRequest.cs @@ -5,6 +5,6 @@ namespace GameFrameX.Client.Api.GameRole.Dto; /// /// 游戏角色删除输入参数 /// -public class DeleteTenantGameRoleEntityRequest : BaseIdRequest +public class DeleteGameRoleEntityRequest : BaseIdRequest { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetByIdTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetByIdGameRoleEntityRequest.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetByIdTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetByIdGameRoleEntityRequest.cs index 5e3662b2..ec6445ca 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetByIdTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetByIdGameRoleEntityRequest.cs @@ -9,7 +9,7 @@ namespace GameFrameX.Client.Api.GameRole.Dto; /// /// 游戏角色查询输入参数 /// -public sealed class GetByIdTenantGameRoleEntityRequest +public sealed class GetByIdGameRoleEntityRequest { /// /// 角色ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetGameRoleEntityRequest.cs similarity index 85% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetGameRoleEntityRequest.cs index bdeb1f6a..5fb6f269 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetGameRoleEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Client.Api.GameRole.Dto; /// /// 游戏角色分页查询输入参数 /// -public sealed class GetTenantGameRoleEntityRequest +public sealed class GetGameRoleEntityRequest { /// /// 用户ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetListTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetListGameRoleEntityRequest.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetListTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetListGameRoleEntityRequest.cs index beb5dbb3..33c51f19 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetListTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GetListGameRoleEntityRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Client.Api.GameRole.Dto; /// /// 游戏角色分页查询输入参数 /// -public sealed class GetListTenantGameRoleEntityRequest +public sealed class GetListGameRoleEntityRequest { /// /// 用户ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/UpdateTenantGameRoleEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/UpdateGameRoleEntityRequest.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/UpdateTenantGameRoleEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/UpdateGameRoleEntityRequest.cs index 84ecb179..dce4e914 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/UpdateTenantGameRoleEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/UpdateGameRoleEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Client.Api.GameRole.Dto; /// /// 游戏角色更新输入参数 /// -public class UpdateTenantGameRoleEntityRequest : GameRoleBaseRequest +public class UpdateGameRoleEntityRequest : GameRoleBaseRequest { /// /// 主键Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs index e083d0a5..c1dc3469 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs @@ -16,12 +16,12 @@ namespace GameFrameX.Client.Api.GameRole; /// /// 程序版本控制器 /// -public class GameRoleController : BaseController +public class GameRoleController : BaseController { private readonly HttpClient _httpClientFactory; private readonly ClientApiTokenIssuer _clientApiTokenIssuer; private readonly GameLoginTicketIssuer _gameLoginTicketIssuer; - private readonly Repository _areaService; + private readonly Repository _areaService; private readonly IGamePenaltyEnforcementService _tenantGamePenaltyEnforcementService; /// @@ -31,19 +31,19 @@ public class GameRoleController : BaseController /// /// /// - /// + /// public GameRoleController(HttpClient httpClientFactory, - SqlSugarRepository service, - Repository areaService, + SqlSugarRepository service, + Repository areaService, ClientApiTokenIssuer clientApiTokenIssuer, GameLoginTicketIssuer gameLoginTicketIssuer, - IGamePenaltyEnforcementService tenantGamePenaltyEnforcementService) : base(service) + IGamePenaltyEnforcementService gamePenaltyEnforcementService) : base(service) { _httpClientFactory = httpClientFactory; _clientApiTokenIssuer = clientApiTokenIssuer; _gameLoginTicketIssuer = gameLoginTicketIssuer; _areaService = areaService; - _tenantGamePenaltyEnforcementService = tenantGamePenaltyEnforcementService; + _tenantGamePenaltyEnforcementService = gamePenaltyEnforcementService; } /// @@ -101,15 +101,15 @@ public async Task> ChangePlayerName /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> Add([FromBody] AddTenantGameRoleEntityRequest input) + public async Task> Add([FromBody] AddGameRoleEntityRequest input) { - var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == input.UserId).FirstAsync(); + var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == input.UserId).FirstAsync(); if (user == null) { return GameApiResult.Error(AccountErrorCode.AccountExists, "账号不存在"); } - var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); + var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); if (gameAreaEntity == null) { return GameApiResult.Error(AreaErrorCode.AreaNotFound, "区服不存在"); @@ -141,7 +141,7 @@ public async Task> Add([FromBody] AddTenant var respPlayerCreate = content.ToHttpJsonResult(); if (respPlayerCreate.IsSuccess) { - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Id = respPlayerCreate.Data.PlayerInfo.Id; entity.Level = (int)respPlayerCreate.Data.PlayerInfo.Level; entity.CreatedTime = TimerHelper.UnixTimeSeconds(); @@ -165,7 +165,7 @@ public async Task> Add([FromBody] AddTenant /// /// [HttpPost] - public async Task> Delete([FromBody] DeleteTenantGameRoleEntityRequest input) + public async Task> Delete([FromBody] DeleteGameRoleEntityRequest input) { var entity = await PRepository.GetFirstAsync(u => u.Id == input.Id); if (entity == null) @@ -185,9 +185,9 @@ public async Task> Delete([FromBody /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> Update([FromBody] UpdateTenantGameRoleEntityRequest input) + public async Task> Update([FromBody] UpdateGameRoleEntityRequest input) { - var entity = input.Adapt(); + var entity = input.Adapt(); var res = await PRepository.AsUpdateable(entity).IgnoreColumns(true).ExecuteCommandWithOptLockAsync(true); var result = entity.Adapt(); return HttpJsonResultData.Success(result); @@ -201,7 +201,7 @@ public async Task> Update([FromBody] Update /// [HttpPost] [ProducesResponseType(200, Type = typeof(List))] - public async Task>> GetList([FromBody] GetListTenantGameRoleEntityRequest input) + public async Task>> GetList([FromBody] GetListGameRoleEntityRequest input) { var gameRoleEntities = await PRepository.GetListAsync(a => a.UserId == input.UserId); var result = new List(gameRoleEntities.Count); @@ -233,7 +233,7 @@ public async Task> Login([FromBody] return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "授权无效"); } - var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == tokenValidation.UserId).FirstAsync(); + var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == tokenValidation.UserId).FirstAsync(); if (user == null) { _gameLoginTicketIssuer.AuditRejected(tokenValidation.UserId, input.PlayerId, input.AreaId, "account_not_found"); @@ -261,7 +261,7 @@ public async Task> Login([FromBody] } //区服状态判断 - var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); + var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); if (gameAreaEntity == null) { _gameLoginTicketIssuer.AuditRejected(user.Id, input.PlayerId, input.AreaId, "area_not_found"); @@ -318,7 +318,7 @@ public async Task> Login([FromBody] return HttpJsonResultData.Success(output); } - private async Task TryRefreshPlayerInfo(TenantGameRoleEntity entity, TenantGameAreaEntity gameAreaEntity) + private async Task TryRefreshPlayerInfo(GameRoleEntity entity, GameAreaEntity gameAreaEntity) { var areaAddress = GameServerEndpointUrlBuilder.Build(gameAreaEntity, GameServerEndpointKindEnum.ClientDispatch, "req_player_get_info"); var request = new PlayerGetInfoRequest @@ -367,12 +367,12 @@ private static bool HasForbiddenContextField(GamePlayerLoginRequest input) } return input.ExtraFields.Keys.Any(k => - string.Equals(k, "tenantId", StringComparison.OrdinalIgnoreCase) || + string.Equals(k, "id", StringComparison.OrdinalIgnoreCase) || string.Equals(k, "appId", StringComparison.OrdinalIgnoreCase) || string.Equals(k, "userId", StringComparison.OrdinalIgnoreCase)); } - private static string BuildRouteTarget(TenantGameAreaEntity area) + private static string BuildRouteTarget(GameAreaEntity area) { if (area.WebSocketUrl.IsNotNullOrEmpty()) { @@ -406,7 +406,7 @@ private static string TryGetHost(string value) /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> Get([FromBody] GetTenantGameRoleEntityRequest input) + public async Task> Get([FromBody] GetGameRoleEntityRequest input) { var entity = await PRepository.GetSingleAsync(a => a.UserId == input.UserId && a.AreaId == input.AreaId); var result = entity.Adapt(); @@ -420,7 +420,7 @@ public async Task> Get([FromBody] GetTenant /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> GetById([FromBody] GetByIdTenantGameRoleEntityRequest input) + public async Task> GetById([FromBody] GetByIdGameRoleEntityRequest input) { if (long.TryParse(input.Id, out var id)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/GetTenantGameUserEntityResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/GetGameUserEntityResponse.cs similarity index 97% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/GetTenantGameUserEntityResponse.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/GetGameUserEntityResponse.cs index 2233eb76..97cc8ad5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/GetTenantGameUserEntityResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/GetGameUserEntityResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Client.Api.GameUser.Dto; /// /// 游戏账号增加输入参数 /// -public sealed class GetTenantGameUserEntityResponse : EntityBaseId +public sealed class GetGameUserEntityResponse : EntityBaseId { /// /// 昵称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/LoginTenantGameUserEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/LoginGameUserEntityRequest.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/LoginTenantGameUserEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/LoginGameUserEntityRequest.cs index 29bc670f..9cbe65ba 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/LoginTenantGameUserEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/LoginGameUserEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Client.Api.GameUser.Dto; /// /// 游戏账号登录输入参数 /// -public class LoginTenantGameUserEntityRequest +public class LoginGameUserEntityRequest { /// /// 账号 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/QueryByIdTenantGameUserEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/QueryByIdGameUserEntityRequest.cs similarity index 84% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/QueryByIdTenantGameUserEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/QueryByIdGameUserEntityRequest.cs index 66c483c0..39273304 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/QueryByIdTenantGameUserEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/QueryByIdGameUserEntityRequest.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Client.Api.GameUser.Dto; /// /// 游戏账号主键查询输入参数 /// -public class QueryByIdTenantGameUserEntityRequest : BaseIdRequest +public class QueryByIdGameUserEntityRequest : BaseIdRequest { /// /// Client API 访问凭证 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/UpdateTenantGameUserEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/UpdateGameUserEntityRequest.cs similarity index 80% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/UpdateTenantGameUserEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/UpdateGameUserEntityRequest.cs index cb7142a6..317202fb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/UpdateTenantGameUserEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/Dto/UpdateGameUserEntityRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Client.Api.GameUser.Dto; /// /// 游戏账号更新输入参数 /// -public class UpdateTenantGameUserEntityRequest : GameUserBaseRequest +public class UpdateGameUserEntityRequest : GameUserBaseRequest { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs index 2c3ceb8e..937f62c7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs @@ -11,7 +11,7 @@ namespace GameFrameX.Client.Api.GameUser; -// TenantGameUserEntity 的绑定字段(WeChatId/QqId/Email/EmailPassword/FacebookId/AppleId/GoogleId/TwitterId/DiscordId/DeviceId)声明为非空 string +// GameUserEntity 的绑定字段(WeChatId/QqId/Email/EmailPassword/FacebookId/AppleId/GoogleId/TwitterId/DiscordId/DeviceId)声明为非空 string // (带 = null! 初始化器的 ORM 实体),但底层 DB 列允许 NULL;解绑/清除路径需赋值 null 以写回 NULL(既有 ORM 语义), // 这些赋值触发 CS8625。集中抑制以避免 12 处分散的 #pragma 包裹。 #pragma warning disable CS8625 // 实体绑定字段声明非空但 DB 列允许 NULL,解绑时赋 null 写回 NULL 是 ORM 语义 @@ -19,11 +19,11 @@ namespace GameFrameX.Client.Api.GameUser; /// /// 程序版本控制器 /// -public class GameUserController : BaseController +public class GameUserController : BaseController { private readonly ClientApiTokenIssuer _clientApiTokenIssuer; private readonly ClientApiSessionKeyIssuer _clientApiSessionKeyIssuer; - private readonly Repository _gameUserEmailService; + private readonly Repository _gameUserEmailService; private readonly IGamePenaltyEnforcementService _tenantGamePenaltyEnforcementService; private readonly GameUserPasswordService _tenantGameUserPasswordService; @@ -36,22 +36,22 @@ public class GameUserController : BaseController /// /// 登录期 per-session 会话密钥签发服务(C7) /// - /// - /// 玩家账号密码哈希服务(PBKDF2,C198 / GFX-627) + /// + /// 玩家账号密码哈希服务(PBKDF2,C198 / GFX-627) /*/// */ - public GameUserController(SqlSugarRepository service, ClientApiTokenIssuer clientApiTokenIssuer, + public GameUserController(SqlSugarRepository service, ClientApiTokenIssuer clientApiTokenIssuer, ClientApiSessionKeyIssuer clientApiSessionKeyIssuer, - Repository gameUserEmailService, - IGamePenaltyEnforcementService tenantGamePenaltyEnforcementService, - GameUserPasswordService tenantGameUserPasswordService + Repository gameUserEmailService, + IGamePenaltyEnforcementService gamePenaltyEnforcementService, + GameUserPasswordService gameUserPasswordService /*, GoogleOAuth2Service googleOAuth2Service*/ ) : base(service) { _clientApiTokenIssuer = clientApiTokenIssuer; _clientApiSessionKeyIssuer = clientApiSessionKeyIssuer; _gameUserEmailService = gameUserEmailService; - _tenantGamePenaltyEnforcementService = tenantGamePenaltyEnforcementService; - _tenantGameUserPasswordService = tenantGameUserPasswordService; + _tenantGamePenaltyEnforcementService = gamePenaltyEnforcementService; + _tenantGameUserPasswordService = gameUserPasswordService; /*_googleOAuth2Service = googleOAuth2Service;*/ } @@ -63,13 +63,13 @@ GameUserPasswordService tenantGameUserPasswordService /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> WeChatLogin([FromBody] LoginWeChatRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> WeChatLogin([FromBody] LoginWeChatRequest input) { var entity = await PRepository.GetFirstAsync(m => m.WeChatId == input.WeChatId); if (entity == null) { - entity = input.Adapt(); + entity = input.Adapt(); entity.Name = input.WeChatName ?? ""; entity.UserName = input.WeChatName ?? string.Empty; entity.Status = GameUserStatus.Active; @@ -79,22 +79,22 @@ public async Task> WeChatLog var insertAsync = await PRepository.InsertAsync(entity); if (insertAsync == false) { - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } } if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } var output = await CreateLoginOutputAsync(entity, "WeChat"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } @@ -104,21 +104,21 @@ public async Task> WeChatLog /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> BindWeChat([FromBody] BindWeChatGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> BindWeChat([FromBody] BindWeChatGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查账号是否已被其他用户绑定 var gameUserEntity = await PRepository.GetFirstAsync(u => u.WeChatId == input.WeChatId && u.Id != input.UserId); if (gameUserEntity != null) { - return GameApiResult.Error(AccountErrorCode.AccountWeChatIdByOtherUser, "该WeChat账号已被其他用户绑定"); + return GameApiResult.Error(AccountErrorCode.AccountWeChatIdByOtherUser, "该WeChat账号已被其他用户绑定"); } // 更新用户的账号信息 @@ -127,14 +127,14 @@ public async Task> BindWeCha if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } /// @@ -143,20 +143,20 @@ public async Task> BindWeCha /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> UnbindWeChatGameUser([FromBody] UnbindWeChatGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> UnbindWeChatGameUser([FromBody] UnbindWeChatGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.WeChatId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindWeChat, "用户未绑定WeChat账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindWeChat, "用户未绑定WeChat账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) @@ -164,7 +164,7 @@ public async Task> UnbindWeC { if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } } @@ -174,14 +174,14 @@ public async Task> UnbindWeC if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } #endregion @@ -195,13 +195,13 @@ public async Task> UnbindWeC /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> QQLogin([FromBody] LoginQQRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> QQLogin([FromBody] LoginQQRequest input) { var entity = await PRepository.GetFirstAsync(m => m.QqId == input.QQId); if (entity == null) { - entity = input.Adapt(); + entity = input.Adapt(); entity.Name = input.QQName ?? ""; entity.UserName = input.QQName ?? string.Empty; entity.Status = GameUserStatus.Active; @@ -211,22 +211,22 @@ public async Task> QQLogin([ var insertAsync = await PRepository.InsertAsync(entity); if (insertAsync == false) { - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } } if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } var output = await CreateLoginOutputAsync(entity, "QQ"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } @@ -236,21 +236,21 @@ public async Task> QQLogin([ /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> BindQQ([FromBody] BindQQGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> BindQQ([FromBody] BindQQGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查账号是否已被其他用户绑定 var gameUserEntity = await PRepository.GetFirstAsync(u => u.QqId == input.QQId && u.Id != input.UserId); if (gameUserEntity != null) { - return GameApiResult.Error(AccountErrorCode.AccountQQIdByOtherUser, "该WeChat账号已被其他用户绑定"); + return GameApiResult.Error(AccountErrorCode.AccountQQIdByOtherUser, "该WeChat账号已被其他用户绑定"); } // 更新用户的账号信息 @@ -259,14 +259,14 @@ public async Task> BindQQ([F if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } @@ -276,20 +276,20 @@ public async Task> BindQQ([F /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> UnbindQQGameUser([FromBody] UnbindQQGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> UnbindQQGameUser([FromBody] UnbindQQGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.QqId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindQQ, "用户未绑定QQ账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindQQ, "用户未绑定QQ账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) @@ -297,7 +297,7 @@ public async Task> UnbindQQG { if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } } @@ -307,14 +307,14 @@ public async Task> UnbindQQG if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } #endregion @@ -328,13 +328,13 @@ public async Task> UnbindQQG /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> FacebookLogin([FromBody] LoginFacebookRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> FacebookLogin([FromBody] LoginFacebookRequest input) { var entity = await PRepository.GetFirstAsync(m => m.FacebookId == input.FacebookId); if (entity == null) { - entity = input.Adapt(); + entity = input.Adapt(); entity.Name = input.FacebookName ?? ""; entity.UserName = input.FacebookName ?? string.Empty; entity.Status = GameUserStatus.Active; @@ -344,22 +344,22 @@ public async Task> FacebookL var insertAsync = await PRepository.InsertAsync(entity); if (insertAsync == false) { - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } } if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } var output = await CreateLoginOutputAsync(entity, "Facebook"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } @@ -369,21 +369,21 @@ public async Task> FacebookL /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> BindFacebook([FromBody] BindFacebookGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> BindFacebook([FromBody] BindFacebookGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查账号是否已被其他用户绑定 var gameUserEntity = await PRepository.GetFirstAsync(u => u.FacebookId == input.FacebookId && u.Id != input.UserId); if (gameUserEntity != null) { - return GameApiResult.Error(AccountErrorCode.AccountFacebookIdByOtherUser, "该FaceBook账号已被其他用户绑定"); + return GameApiResult.Error(AccountErrorCode.AccountFacebookIdByOtherUser, "该FaceBook账号已被其他用户绑定"); } // 更新用户的账号信息 @@ -392,14 +392,14 @@ public async Task> BindFaceb if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } @@ -409,20 +409,20 @@ public async Task> BindFaceb /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> UnbindFacebookGameUser([FromBody] UnbindFacebookGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> UnbindFacebookGameUser([FromBody] UnbindFacebookGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查用户是否已绑定Facebook账号 if (string.IsNullOrEmpty(entity.FacebookId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindFacebook, "用户未绑定FaceBook账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindFacebook, "用户未绑定FaceBook账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) @@ -430,7 +430,7 @@ public async Task> UnbindFac { if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } } @@ -440,14 +440,14 @@ public async Task> UnbindFac if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } #endregion @@ -494,23 +494,23 @@ public async Task> EmailReset([From /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> EmailRegister([FromBody] GameUserEmailRegisterEntityRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> EmailRegister([FromBody] GameUserEmailRegisterEntityRequest input) { var isAny = await PRepository.IsAnyAsync(m => m.Email == input.UserName); if (isAny) { - return GameApiResult.Error(AccountErrorCode.AccountEmailExists, "账号已存在"); + return GameApiResult.Error(AccountErrorCode.AccountEmailExists, "账号已存在"); } var gameUserEmailEntity = await _gameUserEmailService.GetFirstAsync(u => u.Email == input.UserName && u.Code == input.Code && u.ExpirationTime > TimerHelper.UnixTimeSeconds()); if (gameUserEmailEntity == null) { - return GameApiResult.Error(AccountErrorCode.EmailCodeNotFoundOrExpired, "验证码错误或已过期,请重新获取验证码。"); + return GameApiResult.Error(AccountErrorCode.EmailCodeNotFoundOrExpired, "验证码错误或已过期,请重新获取验证码。"); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Name = input.UserName ?? string.Empty; entity.Email = input.UserName ?? string.Empty; entity.Status = GameUserStatus.Active; @@ -520,10 +520,10 @@ public async Task> EmailRegi if (insertAsync) { var output = await CreateLoginOutputAsync(entity, "Email"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } /// @@ -532,34 +532,34 @@ public async Task> EmailRegi /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> EmailLogin([FromBody] LoginTenantGameUserEntityRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> EmailLogin([FromBody] LoginGameUserEntityRequest input) { var entity = await PRepository.GetFirstAsync(m => m.Email == input.UserName); if (entity == null) { // 账号不存在:执行一次假 Verify 抵御账号枚举(耗时与密码错误路径一致),统一返回账号或密码错误,不泄露账号是否存在 _tenantGameUserPasswordService.Verify(input.Password, GameUserPasswordService.EnumerationDecoyHash); - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordByEmailError, "账号或密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordByEmailError, "账号或密码错误"); } if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordByEmailError, "账号或密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordByEmailError, "账号或密码错误"); } if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } var output = await CreateLoginOutputAsync(entity, "Email"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } @@ -569,28 +569,28 @@ public async Task> EmailLogi /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> BindEmail([FromBody] BindEmailGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> BindEmail([FromBody] BindEmailGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查邮箱账号是否已被其他用户绑定 var existingGoogleUser = await PRepository.GetFirstAsync(u => u.Email == input.Email && u.Id != input.UserId); if (existingGoogleUser != null) { - return GameApiResult.Error(AccountErrorCode.AccountEmailByOtherUser, "该邮箱账号已被其他用户绑定"); + return GameApiResult.Error(AccountErrorCode.AccountEmailByOtherUser, "该邮箱账号已被其他用户绑定"); } // 验证邮箱验证码 var gameUserEmailEntity = await _gameUserEmailService.GetFirstAsync(u => u.Email == input.Email && u.Code == input.Code && u.ExpirationTime > TimerHelper.UnixTimeSeconds()); if (gameUserEmailEntity == null) { - return GameApiResult.Error(AccountErrorCode.EmailCodeNotFoundOrExpired, "验证码错误或已过期,请重新获取验证码。"); + return GameApiResult.Error(AccountErrorCode.EmailCodeNotFoundOrExpired, "验证码错误或已过期,请重新获取验证码。"); } // 更新用户的邮箱账号信息 @@ -600,14 +600,14 @@ public async Task> BindEmail if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } @@ -617,20 +617,20 @@ public async Task> BindEmail /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> UnbindEmailGameUser([FromBody] UnbindEmailGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> UnbindEmailGameUser([FromBody] UnbindEmailGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查用户是否已绑定邮箱账号 if (string.IsNullOrEmpty(entity.Email)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindEmail, "用户未绑定邮箱账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindEmail, "用户未绑定邮箱账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) @@ -638,7 +638,7 @@ public async Task> UnbindEma { if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } } @@ -649,14 +649,14 @@ public async Task> UnbindEma if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } #endregion @@ -667,16 +667,16 @@ public async Task> UnbindEma /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> Register([FromBody] GameUserGuestRegisterEntityRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> Register([FromBody] GameUserGuestRegisterEntityRequest input) { var isAny = await PRepository.IsAnyAsync(m => m.UserName == input.UserName); if (isAny) { - return GameApiResult.Error(AccountErrorCode.AccountExists, "账号已存在"); + return GameApiResult.Error(AccountErrorCode.AccountExists, "账号已存在"); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Name = input.UserName; entity.Status = GameUserStatus.Active; entity.Password = _tenantGameUserPasswordService.Hash(input.Password); @@ -685,10 +685,10 @@ public async Task> Register( if (insertAsync) { var output = await CreateLoginOutputAsync(entity, "Guest"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } /// @@ -697,34 +697,34 @@ public async Task> Register( /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> Login([FromBody] LoginTenantGameUserEntityRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> Login([FromBody] LoginGameUserEntityRequest input) { var entity = await PRepository.GetFirstAsync(m => m.UserName == input.UserName); if (entity == null) { // 账号不存在:执行一次假 Verify 抵御账号枚举(耗时与密码错误路径一致),统一返回账号或密码错误,不泄露账号是否存在 _tenantGameUserPasswordService.Verify(input.Password, GameUserPasswordService.EnumerationDecoyHash); - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "账号或密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "账号或密码错误"); } if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "账号或密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "账号或密码错误"); } if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } var output = await CreateLoginOutputAsync(entity, "Guest"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } /// @@ -735,14 +735,14 @@ public async Task> Login([Fr /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> DeviceLogin([FromBody] LoginDeviceRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> DeviceLogin([FromBody] LoginDeviceRequest input) { var entity = await PRepository.GetFirstAsync(m => m.DeviceId == input.DeviceId); var isNewRegister = false; if (entity == null) { - entity = new TenantGameUserEntity + entity = new GameUserEntity { UserName = "device:" + input.DeviceId, Name = "device:" + input.DeviceId, @@ -755,7 +755,7 @@ public async Task> DeviceLog // 不受影响,如需严格唯一,升级点在 entity 加唯一索引 + 此处捕获重复键后重查 if (!await PRepository.InsertAsync(entity)) { - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } isNewRegister = true; } @@ -763,18 +763,18 @@ public async Task> DeviceLog { if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } } var deviceLoginOutput = await CreateLoginOutputAsync(entity, "Device"); deviceLoginOutput.IsNewRegister = isNewRegister; - return HttpJsonResultData.Success(deviceLoginOutput); + return HttpJsonResultData.Success(deviceLoginOutput); } /*/// @@ -783,11 +783,11 @@ public async Task> DeviceLog /// /// [HttpPost] - public async Task> UpdateAsync([FromBody] UpdateTenantGameUserEntityRequest input) + public async Task> UpdateAsync([FromBody] UpdateGameUserEntityRequest input) { - var entity = input.Adapt(); + var entity = input.Adapt(); var res = await PRepository.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); - return HttpJsonResultData.Success(JsonHelper.Serialize(entity)); + return HttpJsonResultData.Success(JsonHelper.Serialize(entity)); }*/ /// @@ -796,23 +796,23 @@ public async Task> UpdateAsy /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> Get([FromBody] QueryByIdTenantGameUserEntityRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> Get([FromBody] QueryByIdGameUserEntityRequest input) { var tokenValidation = await _clientApiTokenIssuer.ValidateAsync(input.AccessToken); if (!tokenValidation.IsValid || tokenValidation.UserId != input.Id) { - return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "授权无效"); + return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "授权无效"); } var entity = await PRepository.GetFirstAsync(u => u.Id == input.Id); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "账号不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "账号不存在"); } var output = CreateAccountOutput(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } #region Apple @@ -823,21 +823,21 @@ public async Task> Get([From /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> BindAppleGameUser([FromBody] BindAppleGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> BindAppleGameUser([FromBody] BindAppleGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查谷歌账号是否已被其他用户绑定 var existingGoogleUser = await PRepository.GetFirstAsync(u => u.AppleId == input.AppleId && u.Id != input.UserId); if (existingGoogleUser != null) { - return GameApiResult.Error(AccountErrorCode.AccountAppleIdByOtherUser, "该Apple账号已被其他用户绑定"); + return GameApiResult.Error(AccountErrorCode.AccountAppleIdByOtherUser, "该Apple账号已被其他用户绑定"); } // 更新用户的谷歌账号信息 @@ -847,14 +847,14 @@ public async Task> BindApple if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } @@ -864,13 +864,13 @@ public async Task> BindApple /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> AppleLogin([FromBody] AppleLoginRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> AppleLogin([FromBody] AppleLoginRequest input) { var entity = await PRepository.GetFirstAsync(m => m.AppleId == input.AppleId); if (entity == null) { - entity = input.Adapt(); + entity = input.Adapt(); entity.Name = input.AppleName ?? ""; entity.UserName = input.AppleName ?? string.Empty; entity.Status = GameUserStatus.Active; @@ -880,22 +880,22 @@ public async Task> AppleLogi var insertAsync = await PRepository.InsertAsync(entity); if (insertAsync == false) { - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } } if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } var output = await CreateLoginOutputAsync(entity, "Apple"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } /// @@ -904,20 +904,20 @@ public async Task> AppleLogi /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> UnbindAppleGameUser([FromBody] UnbindAppleGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> UnbindAppleGameUser([FromBody] UnbindAppleGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查用户是否已绑定谷歌账号 if (string.IsNullOrEmpty(entity.GoogleId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindGoogleId, "用户未绑定Apple账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindGoogleId, "用户未绑定Apple账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) @@ -925,7 +925,7 @@ public async Task> UnbindApp { if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } } @@ -936,14 +936,14 @@ public async Task> UnbindApp if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } #endregion @@ -956,21 +956,21 @@ public async Task> UnbindApp /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> BindGoogleGameUser([FromBody] BindGoogleGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> BindGoogleGameUser([FromBody] BindGoogleGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查谷歌账号是否已被其他用户绑定 var existingGoogleUser = await PRepository.GetFirstAsync(u => u.GoogleId == input.GoogleId && u.Id != input.UserId); if (existingGoogleUser != null) { - return GameApiResult.Error(AccountErrorCode.AccountGoogleIdByOtherUser, "该谷歌账号已被其他用户绑定"); + return GameApiResult.Error(AccountErrorCode.AccountGoogleIdByOtherUser, "该谷歌账号已被其他用户绑定"); } // 更新用户的谷歌账号信息 @@ -980,14 +980,14 @@ public async Task> BindGoogl if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } /// @@ -996,13 +996,13 @@ public async Task> BindGoogl /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> GoogleLogin([FromBody] LoginGoogleRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> GoogleLogin([FromBody] LoginGoogleRequest input) { var entity = await PRepository.GetFirstAsync(m => m.GoogleId == input.GoogleId); if (entity == null) { - entity = input.Adapt(); + entity = input.Adapt(); entity.Name = input.GoogleName ?? ""; entity.UserName = input.GoogleName ?? string.Empty; entity.Status = GameUserStatus.Active; @@ -1012,22 +1012,22 @@ public async Task> GoogleLog var insertAsync = await PRepository.InsertAsync(entity); if (insertAsync == false) { - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } } if (entity.Status == GameUserStatus.Deleted) { - return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); + return GameApiResult.Error(AccountErrorCode.AccountDeleting, "账号处于注销状态"); } if (entity.Status != GameUserStatus.Active) { - return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); + return GameApiResult.Error(AccountErrorCode.AccountDisabled, "账号已被禁用"); } var output = await CreateLoginOutputAsync(entity, "Google"); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } /// @@ -1036,20 +1036,20 @@ public async Task> GoogleLog /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> UnbindGoogleGameUser([FromBody] UnbindGoogleGameUserRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> UnbindGoogleGameUser([FromBody] UnbindGoogleGameUserRequest input) { // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.UserId); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } // 检查用户是否已绑定谷歌账号 if (string.IsNullOrEmpty(entity.GoogleId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindGoogleId, "用户未绑定谷歌账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindGoogleId, "用户未绑定谷歌账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) @@ -1057,7 +1057,7 @@ public async Task> UnbindGoo { if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) { - return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); + return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } } @@ -1068,14 +1068,14 @@ public async Task> UnbindGoo if (executeCommandAsync > 0) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } #endregion @@ -1086,20 +1086,20 @@ public async Task> UnbindGoo /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(GetTenantGameUserEntityResponse))] - public async Task> Unbind([FromBody] GameUserUnbindRequest input) + [ProducesResponseType(200, Type = typeof(GetGameUserEntityResponse))] + public async Task> Unbind([FromBody] GameUserUnbindRequest input) { var tokenValidation = await _clientApiTokenIssuer.ValidateAsync(input.AccessToken); if (!tokenValidation.IsValid || tokenValidation.UserId != input.Id) { - return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "授权无效"); + return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "授权无效"); } // 检查用户是否存在 var entity = await PRepository.GetFirstAsync(u => u.Id == input.Id); if (entity == null) { - return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); + return GameApiResult.Error(AccountErrorCode.AccountNotFound, "用户不存在"); } switch (input.Type) @@ -1108,7 +1108,7 @@ public async Task> Unbind([F // 检查用户是否已绑定谷歌账号 if (string.IsNullOrEmpty(entity.GoogleId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindGoogleId, "用户未绑定谷歌账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindGoogleId, "用户未绑定谷歌账号"); } // 清除账号信息 @@ -1118,7 +1118,7 @@ public async Task> Unbind([F // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.AppleId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindAppleId, "用户未绑定Apple账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindAppleId, "用户未绑定Apple账号"); } // 清除账号信息 @@ -1128,7 +1128,7 @@ public async Task> Unbind([F // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.FacebookId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindFacebookId, "用户未绑定Facebook账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindFacebookId, "用户未绑定Facebook账号"); } // 清除账号信息 @@ -1138,7 +1138,7 @@ public async Task> Unbind([F // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.TwitterId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindTwitterId, "用户未绑定Twitter账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindTwitterId, "用户未绑定Twitter账号"); } // 清除账号信息 @@ -1148,7 +1148,7 @@ public async Task> Unbind([F // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.DiscordId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindDiscordId, "用户未绑定Discord账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindDiscordId, "用户未绑定Discord账号"); } // 清除账号信息 @@ -1158,7 +1158,7 @@ public async Task> Unbind([F // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.WeChatId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindWeChat, "用户未绑定WeChat账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindWeChat, "用户未绑定WeChat账号"); } // 清除账号信息 @@ -1168,31 +1168,31 @@ public async Task> Unbind([F // 检查用户是否已绑定账号 if (string.IsNullOrEmpty(entity.QqId)) { - return GameApiResult.Error(AccountErrorCode.AccountNoBindQQ, "用户未绑定QQ账号"); + return GameApiResult.Error(AccountErrorCode.AccountNoBindQQ, "用户未绑定QQ账号"); } // 清除账号信息 entity.QqId = null; break; default: - return GameApiResult.Error(AccountErrorCode.AccountUnBindNotFound, "解绑类型不存在"); + return GameApiResult.Error(AccountErrorCode.AccountUnBindNotFound, "解绑类型不存在"); } var executeCommandAsync = await PRepository.Context.UpdateWithOptimisticLockAsync(entity) > 0; if (executeCommandAsync) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return HttpJsonResultData.ServerError(); + return HttpJsonResultData.ServerError(); } - private static bool IsGuest(TenantGameUserEntity entity) + private static bool IsGuest(GameUserEntity entity) { return entity.WeChatId.IsNullOrEmptyOrWhiteSpace() && @@ -1205,7 +1205,7 @@ private static bool IsGuest(TenantGameUserEntity entity) entity.DiscordId.IsNullOrEmptyOrWhiteSpace(); } - private static void EnsureUserStringDefaults(TenantGameUserEntity entity) + private static void EnsureUserStringDefaults(GameUserEntity entity) { entity.Name ??= string.Empty; entity.UserName ??= string.Empty; @@ -1224,7 +1224,7 @@ private static void EnsureUserStringDefaults(TenantGameUserEntity entity) entity.DeviceId ??= string.Empty; } - private async Task CreateLoginOutputAsync(TenantGameUserEntity entity, string provider) + private async Task CreateLoginOutputAsync(GameUserEntity entity, string provider) { // 处罚事实源登录阻断漏斗:账号级封禁/限制登录命中即拦截 Token 签发 var blocking = await _tenantGamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, entity.Id.ToString()); @@ -1246,9 +1246,9 @@ private async Task CreateLoginOutputAsync(Tenan return output; } - private GetTenantGameUserEntityResponse CreateAccountOutput(TenantGameUserEntity entity) + private GetGameUserEntityResponse CreateAccountOutput(GameUserEntity entity) { - var output = entity.Adapt(); + var output = entity.Adapt(); output.CreatedTime = entity.CreatedTime; output.IsGuest = IsGuest(entity); output.Status = entity.Status.ToString(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserArchive/GameUserArchiveController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserArchive/GameUserArchiveController.cs index fe8fcdc3..785617fd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserArchive/GameUserArchiveController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserArchive/GameUserArchiveController.cs @@ -13,13 +13,13 @@ namespace GameFrameX.Client.Api.GameUserArchive; /// public class GameUserArchiveController : BaseController { - private readonly Repository _archiveRepository; + private readonly Repository _archiveRepository; /// /// /// /// 存档仓储 - public GameUserArchiveController(Repository archiveRepository) + public GameUserArchiveController(Repository archiveRepository) { _archiveRepository = archiveRepository; } @@ -162,7 +162,7 @@ public async Task> Upload([Fro var newSyncTime = Math.Max(DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), (entity?.SyncTime ?? 0) + 1); if (entity == null) { - entity = new TenantGameUserArchiveEntity { UserId = request.UserId, }; + entity = new GameUserArchiveEntity { UserId = request.UserId, }; ApplyUploadState(entity, request, branches, newSyncTime); await _archiveRepository.InsertAsync(entity); } @@ -289,7 +289,7 @@ public async Task> GetO /// 上传落库统一出口:透传 JSON、user 摘要列(GetOtherProgress/排行展示免解析)、 /// 冗余摘要组与换端字段。user 表非空 = 提交(与分表三态无关,恒为全量摘要)。 /// - private static void ApplyUploadState(TenantGameUserArchiveEntity entity, GameUserArchiveUploadRequest request, + private static void ApplyUploadState(GameUserArchiveEntity entity, GameUserArchiveUploadRequest request, Dictionary> branches, long newSyncTime) { entity.BranchesJson = JsonSerializer.Serialize(branches); @@ -348,7 +348,7 @@ private static bool InSyncList(List syncList, string branchName) return false; } - private static Dictionary> DeserializeBranches(TenantGameUserArchiveEntity entity) + private static Dictionary> DeserializeBranches(GameUserArchiveEntity entity) { if (entity == null || string.IsNullOrEmpty(entity.BranchesJson)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserEmail/GameUserEmailController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserEmail/GameUserEmailController.cs index c1474254..6a4044ff 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserEmail/GameUserEmailController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserEmail/GameUserEmailController.cs @@ -8,10 +8,10 @@ namespace GameFrameX.Client.Api.GameUserEmail; /// /// 用户邮件验证码控制器 /// -public class GameUserEmailController : BaseController +public class GameUserEmailController : BaseController { - private readonly Repository _gameUserEmailService; - private readonly ITenantEmailSender _emailSender; + private readonly Repository _gameUserEmailService; + private readonly IEmailSender _emailSender; /// /// 邮件发送频率限制记录(邮箱 → 最后发送时间) @@ -32,7 +32,7 @@ public class GameUserEmailController : BaseController /// /// /// - public GameUserEmailController(SqlSugarRepository service, Repository gameUserEmailService, ITenantEmailSender emailSender) : base(service) + public GameUserEmailController(SqlSugarRepository service, Repository gameUserEmailService, IEmailSender emailSender) : base(service) { _gameUserEmailService = gameUserEmailService; _emailSender = emailSender; @@ -52,7 +52,7 @@ public async Task> SendRegister(Gam return rateLimitError; } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.UserName = input.Email; entity.Code = Random.Shared.Next(100000, 1000000).ToString(); entity.ExpirationTime = TimerHelper.UnixTimeSeconds() + 5 * 60; //设置过期时间为5分钟后 @@ -73,7 +73,7 @@ public async Task> SendRegister(Gam { "verification_code", entity.Code }, }; var subject = input.Language.Contains("zh") ? "欢迎注册" : "Welcome to Register"; - var result = await _emailSender.SendTemplateAsync(TenantEmailPurpose.PlayerRegisterCode, input.Email, Convert.ToUInt64(entity.TemplateId), subject, templateData); + var result = await _emailSender.SendTemplateAsync(EmailPurpose.PlayerRegisterCode, input.Email, Convert.ToUInt64(entity.TemplateId), subject, templateData); if (result) { @@ -128,7 +128,7 @@ public async Task> SendReset(GameUs return HttpJsonResultData.Success(); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.UserName = input.Email; entity.Code = Random.Shared.Next(100000, 1000000).ToString(); entity.ExpirationTime = TimerHelper.UnixTimeSeconds() + 5 * 60; //设置过期时间为5分钟后 @@ -149,7 +149,7 @@ public async Task> SendReset(GameUs { "verification_code", entity.Code }, }; var subject = input.Language.Contains("zh") ? "找回密码" : "Password Recovery"; - var result = await _emailSender.SendTemplateAsync(TenantEmailPurpose.PlayerPasswordReset, input.Email, Convert.ToUInt64(entity.TemplateId), subject, templateData); + var result = await _emailSender.SendTemplateAsync(EmailPurpose.PlayerPasswordReset, input.Email, Convert.ToUInt64(entity.TemplateId), subject, templateData); if (result) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserMisc/GameUserMiscController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserMisc/GameUserMiscController.cs index 5b09041d..d59fc4e2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserMisc/GameUserMiscController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserMisc/GameUserMiscController.cs @@ -10,16 +10,16 @@ namespace GameFrameX.Client.Api.GameUserMisc; /// public class GameUserMiscController : BaseController { - private readonly Repository _logoutRepository; - private readonly Repository _archiveRepository; + private readonly Repository _logoutRepository; + private readonly Repository _archiveRepository; /// /// /// /// 登出记录仓储 /// 存档仓储(机器人从真实玩家档抽样) - public GameUserMiscController(Repository logoutRepository, - Repository archiveRepository) + public GameUserMiscController(Repository logoutRepository, + Repository archiveRepository) { _logoutRepository = logoutRepository; _archiveRepository = archiveRepository; @@ -34,12 +34,12 @@ public GameUserMiscController(Repository logou public async Task> MarkLogout([FromBody] MarkLogoutRequest request) { // 仅删号成功后上报(在线统计用);响应 rcode 客户端不消费,落库即成功 - await _logoutRepository.InsertAsync(new TenantGameUserLogoutRecordEntity + await _logoutRepository.InsertAsync(new GameUserLogoutRecordEntity { UserId = request.UserId, ClientVersion = request.Version, LogoutTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), - Name = nameof(TenantGameUserLogoutRecordEntity), + Name = nameof(GameUserLogoutRecordEntity), }); return HttpJsonResultData.Success(new MarkLogoutResponse { Rcode = 0, }); } @@ -88,7 +88,7 @@ public async Task> RandomRobots([FromBo /// /// Fisher-Yates 洗牌(机器人候选随机化) /// - private static void Shuffle(List list) + private static void Shuffle(List list) { for (var i = list.Count - 1; i > 0; i--) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserPay/GameUserPayController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserPay/GameUserPayController.cs index 506e7872..497cd9d4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserPay/GameUserPayController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserPay/GameUserPayController.cs @@ -1,9 +1,9 @@ using GameFrameX.Client.Api.Services.PayVerification; using System.Globalization; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; using GameFrameX.Client.Api.GameUserPay.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Service; using GameFrameX.Entity.Enum; @@ -21,8 +21,8 @@ public class GameUserPayController : BaseController /// private static long _orderSeq; - private readonly Repository _payOrderRepository; - private readonly IClientApiTenantOptionsProvider _optionsProvider; + private readonly Repository _payOrderRepository; + private readonly IClientApiOptionsProvider _optionsProvider; private readonly IPayReceiptVerifier _payReceiptVerifier; /// @@ -31,8 +31,8 @@ public class GameUserPayController : BaseController /// 支付订单仓储 /// 租户配置 Provider(沙箱充值发货开关,C378 起读策略合并表) /// 支付收据验真器 - public GameUserPayController(Repository payOrderRepository, - IClientApiTenantOptionsProvider optionsProvider, + public GameUserPayController(Repository payOrderRepository, + IClientApiOptionsProvider optionsProvider, IPayReceiptVerifier payReceiptVerifier) { _payOrderRepository = payOrderRepository; @@ -52,7 +52,7 @@ public GameUserPayController(Repository payOrderRepositor public async Task> Create([FromBody] GameUserPayCreateRequest request) { var enableSandbox = await IsSandboxRechargeEnabledAsync(); - var entity = new TenantGameOrderEntity + var entity = new GameOrderEntity { AccountId = request.UserId.ToString(CultureInfo.InvariantCulture), RoleId = request.UserId.ToString(CultureInfo.InvariantCulture), @@ -161,7 +161,7 @@ public async Task> Verify([FromBod [HttpPost] public async Task> Query([FromBody] GameUserPayQueryRequest request) { - TenantGameOrderEntity? order = null; + GameOrderEntity? order = null; var accountId = request.UserId.ToString(CultureInfo.InvariantCulture); if (!string.IsNullOrEmpty(request.OrderId)) { @@ -201,7 +201,7 @@ public async Task> Report([FromBody] GameUserPayRepor if (order == null) { LogHelper.Warning($"GameUserPay.Report 订单不存在,按流水记账 - OrderId:{request.OrderId}, UserId:{request.UserId}"); - order = new TenantGameOrderEntity + order = new GameOrderEntity { AccountId = request.UserId.ToString(CultureInfo.InvariantCulture), RoleId = request.UserId.ToString(CultureInfo.InvariantCulture), @@ -243,7 +243,7 @@ private async Task IsSandboxRechargeEnabledAsync() /// /// Report 侧流水字段回填(RealMoney/Currency/Level/StrScene) /// - private static void ApplyReport(TenantGameOrderEntity order, GameUserPayReportRequest request) + private static void ApplyReport(GameOrderEntity order, GameUserPayReportRequest request) { order.RealMoney = request.RealMoney; order.Currency = request.Currency; @@ -266,7 +266,7 @@ private static uint ToOrderAmount(long? amount) return amount.Value > uint.MaxValue ? uint.MaxValue : (uint)amount.Value; } - private static string GetProductId(TenantGameOrderEntity order) + private static string GetProductId(GameOrderEntity order) { if (!string.IsNullOrWhiteSpace(order.ProductId)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRace/GameUserRaceController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRace/GameUserRaceController.cs index 990fb7f7..b7529515 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRace/GameUserRaceController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRace/GameUserRaceController.cs @@ -10,13 +10,13 @@ namespace GameFrameX.Client.Api.GameUserRace; /// public class GameUserRaceController : BaseController { - private readonly Repository _archiveRepository; + private readonly Repository _archiveRepository; /// /// /// /// 存档仓储(机器人从真实玩家档抽样) - public GameUserRaceController(Repository archiveRepository) + public GameUserRaceController(Repository archiveRepository) { _archiveRepository = archiveRepository; } @@ -36,7 +36,7 @@ public async Task> Entry([FromBody // ponytail: 真实档候选全量取回内存随机(同 RandomRobots);玩家量上来后改 SQL 随机抽样或机器人池配置 var candidates = await _archiveRepository.GetListAsync(x => x.NickName != string.Empty && x.Icon != string.Empty); Shuffle(candidates); - var pool = new Queue(candidates.Where(x => !exclude.Contains(x.UserId))); + var pool = new Queue(candidates.Where(x => !exclude.Contains(x.UserId))); var round = Math.Max(request.Round ?? 1, 1); var seq = 1; var stamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); @@ -150,7 +150,7 @@ private static long ResolveDifficultyBase(string groupType) /// /// Fisher-Yates 洗牌(机器人候选随机化) /// - private static void Shuffle(List list) + private static void Shuffle(List list) { for (var i = list.Count - 1; i > 0; i--) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRank/GameUserRankController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRank/GameUserRankController.cs index b19aa60f..f3db041a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRank/GameUserRankController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserRank/GameUserRankController.cs @@ -27,16 +27,16 @@ public class GameUserRankController : BaseController /// private static long _groupSeq; - private readonly Repository _rankRepository; - private readonly Repository _archiveRepository; + private readonly Repository _rankRepository; + private readonly Repository _archiveRepository; /// /// /// /// 排行榜条目仓储 /// 存档仓储(机器人从真实玩家档抽样) - public GameUserRankController(Repository rankRepository, - Repository archiveRepository) + public GameUserRankController(Repository rankRepository, + Repository archiveRepository) { _rankRepository = rankRepository; _archiveRepository = archiveRepository; @@ -63,7 +63,7 @@ public async Task> JoinRank([FromBo var own = entries.FirstOrDefault(x => x.GroupId == groupId && x.UserId == request.UserId); if (own == null) { - own = new TenantGameRankEntryEntity + own = new GameRankEntryEntity { RankType = request.RankType, GroupId = groupId, @@ -153,7 +153,7 @@ public async Task> HeartBeat([ /// /// 机器人补位到榜单固定规模(真实玩家档抽样 + 合成凑满,插入同表保证三视图一致) /// - private async Task PadRobotsAsync(GameUserRankJoinRequest request, string groupId, List rows) + private async Task PadRobotsAsync(GameUserRankJoinRequest request, string groupId, List rows) { if (rows.Count >= BoardSize) { @@ -164,11 +164,11 @@ private async Task PadRobotsAsync(GameUserRankJoinRequest request, string groupI // ponytail: 真实档候选全量取回内存随机(同 RandomRobots);玩家量上来后改 SQL 随机抽样或机器人池配置 var candidates = await _archiveRepository.GetListAsync(x => x.NickName != string.Empty && x.Icon != string.Empty); Shuffle(candidates); - var pool = new Queue( + var pool = new Queue( candidates.Where(x => !memberIds.Contains(x.UserId) && x.UserId != request.UserId)); var seq = 1; var stamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); - var robots = new List(); + var robots = new List(); while (rows.Count + robots.Count < BoardSize) { long userId; @@ -197,7 +197,7 @@ private async Task PadRobotsAsync(GameUserRankJoinRequest request, string groupI } // ponytail: 机器人分数围绕玩家 token 散布(伪随机 0.1x~1.9x);旧服机器人难度曲线黑盒 - robots.Add(new TenantGameRankEntryEntity + robots.Add(new GameRankEntryEntity { RankType = request.RankType, GroupId = groupId, @@ -252,7 +252,7 @@ private async Task UpdateBoardScoreAsync(int rankType, long userId, long s /// /// 组内按 Score 降序(同分按 UserId 升序稳定排序)就地重算名次 /// - private static List RecomputeRanks(List rows) + private static List RecomputeRanks(List rows) { var ordered = rows.OrderByDescending(x => x.Score).ThenBy(x => x.UserId).ToList(); for (var i = 0; i < ordered.Count; i++) @@ -263,7 +263,7 @@ private static List RecomputeRanks(List ToRankInfos(List ordered) + private static List ToRankInfos(List ordered) { var result = new List(); foreach (var row in ordered) @@ -291,7 +291,7 @@ private static string CreateGroupId() /// /// Fisher-Yates 洗牌(机器人候选随机化) /// - private static void Shuffle(List list) + private static void Shuffle(List list) { for (var i = list.Count - 1; i > 0; i--) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserReward/GameUserRewardController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserReward/GameUserRewardController.cs index 7377751a..5265ef80 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserReward/GameUserRewardController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserReward/GameUserRewardController.cs @@ -10,13 +10,13 @@ namespace GameFrameX.Client.Api.GameUserReward; /// public class GameUserRewardController : BaseController { - private readonly Repository _rewardRepository; + private readonly Repository _rewardRepository; /// /// /// /// 奖励记录仓储 - public GameUserRewardController(Repository rewardRepository) + public GameUserRewardController(Repository rewardRepository) { _rewardRepository = rewardRepository; } @@ -58,7 +58,7 @@ public async Task> ReceiveRewards([Fr { // 无记录(check_exist=0 问卷/mail 允许创建;check_exist=1 的 op_cp 记录自建模型下也无预建路径, // 统一创建 + rcode 0——客户端发奖用本地任务配置,不受服务端 content 影响) - entity = new TenantGameUserRewardEntity + entity = new GameUserRewardEntity { UserId = request.UserId, RewardKey = request.Key, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameServerConfigProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameServerConfigProvider.cs index b50808eb..54405266 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameServerConfigProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameServerConfigProvider.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.ServerConfig; +using GameFrameX.Entity.Business.Game.ServerConfig; namespace GameFrameX.Client.Api.GameUserSession; @@ -10,7 +10,7 @@ public static class GameServerConfigProvider /// /// 加载生效配置行(键 → 内容版本号与配置 JSON 原文)。 /// - public static async Task> LoadEffectiveAsync(Repository repository) + public static async Task> LoadEffectiveAsync(Repository repository) { var rows = await repository.GetListAsync(u => u.Enabled); var effective = new Dictionary(StringComparer.Ordinal); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameUserSessionController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameUserSessionController.cs index f2a741c2..5421c120 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameUserSessionController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUserSession/GameUserSessionController.cs @@ -4,7 +4,7 @@ using GameFrameX.Client.Api.Services; using GameFrameX.Core.Service; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game.ServerConfig; +using GameFrameX.Entity.Business.Game.ServerConfig; namespace GameFrameX.Client.Api.GameUserSession; @@ -29,10 +29,10 @@ public class GameUserSessionController : BaseController /// private static long _sessionSeq; - private readonly Repository _archiveRepository; - private readonly Repository _userRepository; - private readonly Repository _orderRepository; - private readonly Repository _serverConfigRepository; + private readonly Repository _archiveRepository; + private readonly Repository _userRepository; + private readonly Repository _orderRepository; + private readonly Repository _serverConfigRepository; /// /// @@ -41,10 +41,10 @@ public class GameUserSessionController : BaseController /// 玩家账号仓储(注销判定) /// 支付订单仓储(累计充值汇总) /// 游戏运营配置主库仓储 - public GameUserSessionController(Repository archiveRepository, - Repository userRepository, - Repository orderRepository, - Repository serverConfigRepository) + public GameUserSessionController(Repository archiveRepository, + Repository userRepository, + Repository orderRepository, + Repository serverConfigRepository) { _archiveRepository = archiveRepository; _userRepository = userRepository; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyNotifyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyNotifyRequest.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyNotifyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyNotifyRequest.cs index cfffafe6..83c3e76c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyNotifyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyNotifyRequest.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Client.Api.GameWebShop.Dto; /// /// 购买一个商品 /// -public sealed class TenantGameWebShopEntityBuyNotifyRequest +public sealed class GameWebShopEntityBuyNotifyRequest { [JsonPropertyName("pid")] [FromQuery(Name = "pid")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyRequest.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyRequest.cs index b96252f2..21c31d74 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Client.Api.GameWebShop.Dto; /// /// 购买一个商品 /// -public sealed class TenantGameWebShopEntityBuyRequest +public sealed class GameWebShopEntityBuyRequest { /// /// 商品id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyResponse.cs similarity index 85% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyResponse.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyResponse.cs index ab09e6b1..a8b149af 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Client.Api.GameWebShop.Dto; /// /// 游戏角色输出参数 /// -public sealed class TenantGameWebShopEntityBuyResponse +public sealed class GameWebShopEntityBuyResponse { /// /// 商品名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/GameWebShopController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/GameWebShopController.cs index b5dc053b..e3fe23d8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/GameWebShopController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameWebShop/GameWebShopController.cs @@ -20,14 +20,14 @@ namespace GameFrameX.Client.Api.GameWebShop; /// /// 网页商城 /// -public class GameWebShopController : BaseController +public class GameWebShopController : BaseController { private readonly HttpClient _httpClientFactory; - private readonly Repository _roleService; - private readonly Repository _areaService; - private readonly Repository _webShopOrderService; - private readonly Repository _gameOrderEntity; + private readonly Repository _roleService; + private readonly Repository _areaService; + private readonly Repository _webShopOrderService; + private readonly Repository _gameOrderEntity; private readonly Repository _systemConfigService; /// @@ -52,11 +52,11 @@ public class GameWebShopController : BaseController /// public GameWebShopController( HttpClient httpClientFactory, - SqlSugarRepository service, - Repository roleService, - Repository areaService, - Repository webShopOrderService, - Repository gameOrderEntity, + SqlSugarRepository service, + Repository roleService, + Repository areaService, + Repository webShopOrderService, + Repository gameOrderEntity, Repository systemConfigService) : base(service) { _httpClientFactory = httpClientFactory; @@ -85,20 +85,20 @@ public async Task>> Get() /// /// [HttpPost] - [ProducesResponseType(200, Type = typeof(TenantGameWebShopEntityBuyResponse))] - public async Task> Buy([FromBody] TenantGameWebShopEntityBuyRequest input) + [ProducesResponseType(200, Type = typeof(GameWebShopEntityBuyResponse))] + public async Task> Buy([FromBody] GameWebShopEntityBuyRequest input) { var role = await _roleService.GetByIdAsync(input.RoleId); //角色不存在 if (role == null) { - return GameApiResult.Error(GameRoleErrorCode.RoleNotFound, "角色不存在"); + return GameApiResult.Error(GameRoleErrorCode.RoleNotFound, "角色不存在"); } //区服不一致 if (role.AreaId != input.AreaId) { - return GameApiResult.Error(AreaErrorCode.AreaNotFound, "区服不一致"); + return GameApiResult.Error(AreaErrorCode.AreaNotFound, "区服不一致"); } var gameAreaEntity = await _areaService.AsQueryable().Filter(null, true).Where(u => u.IsDeleted == false).FirstAsync(u => u.Id == input.AreaId); @@ -107,20 +107,20 @@ public async Task> Buy([F || gameAreaEntity.ServerStatus == GameServerStatus.Offline || gameAreaEntity.ServerStatus == GameServerStatus.Maintenance) { - return GameApiResult.Error(AreaErrorCode.AreaCannotBuy, "当前状态不能购买"); + return GameApiResult.Error(AreaErrorCode.AreaCannotBuy, "当前状态不能购买"); } //查询商品 var shop = await PRepository.GetAsync(g => g.Id == input.Id && g.IsUp); if (shop == null) { - return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "商品不存在"); + return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "商品不存在"); } //判断支付方式 if (input.Type == "") { - return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "支付方式不正确"); + return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "支付方式不正确"); } var param = new Dictionary(); @@ -132,7 +132,7 @@ public async Task> Buy([F var systemConfig = await _systemConfigService.GetAsync(g => g.Code == "web_shop_params"); if (systemConfig == null) { - return GameApiResult.Error(AreaErrorCode.AreaCannotBuy, "订单服务器参数错误"); + return GameApiResult.Error(AreaErrorCode.AreaCannotBuy, "订单服务器参数错误"); } try @@ -140,7 +140,7 @@ public async Task> Buy([F var systemConfigParams = JsonHelper.Deserialize(systemConfig.Value); if (!decimal.TryParse(shop.RealPrice, out var realPrice)) { - return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "商品价格不正确"); + return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "商品价格不正确"); } // out_trade_no 用 Foundation 雪花 ID 作全局幂等键(替代时间戳+随机数,回调按其查重防重放) @@ -153,7 +153,7 @@ public async Task> Buy([F var notifyUrl = PublicCallbackNotifyUrlBuilder.Build(systemConfigParams.NotifyUrl, WebShopNotifyCallbackRoute, PaymentOptionSettingProvider.GetCurrentPackageId(HttpContext)); if (notifyUrl == null) { - return GameApiResult.Error(AreaErrorCode.AreaCannotBuy, "支付回调地址配置无效,无法构造完整支付回调路由"); + return GameApiResult.Error(AreaErrorCode.AreaCannotBuy, "支付回调地址配置无效,无法构造完整支付回调路由"); } postParams["notify_url"] = notifyUrl; @@ -167,7 +167,7 @@ public async Task> Buy([F // 预创建 Unpaid 订单落参数快照,回调只信此单;预创建失败则不向网关提交 if (!await InsertPreCreatedOrderAsync(input, role, shop, outTradeNo, realPrice)) { - return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "预创建订单失败"); + return GameApiResult.Error(OrderErrorCode.WebShopNotFound, "预创建订单失败"); } // 发送POST请求 @@ -180,20 +180,20 @@ public async Task> Buy([F var match = regex.Match(responseContent); if (match.Success) { - var output = new TenantGameWebShopEntityBuyResponse(); + var output = new GameWebShopEntityBuyResponse(); output.Html = "https://zlpay.zilancreative.com" + match.Groups[1].Value; output.OrderId = postParams["out_trade_no"]; - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } - return GameApiResult.Error(OrderErrorCode.WebShopNotFound, responseContent); + return GameApiResult.Error(OrderErrorCode.WebShopNotFound, responseContent); } - return GameApiResult.Error(OrderErrorCode.WebShopNotFound, JsonHelper.Serialize(response)); + return GameApiResult.Error(OrderErrorCode.WebShopNotFound, JsonHelper.Serialize(response)); } catch (Exception e) { - return GameApiResult.Error(OrderErrorCode.WebShopNotFound, JsonHelper.Serialize(e)); + return GameApiResult.Error(OrderErrorCode.WebShopNotFound, JsonHelper.Serialize(e)); } } @@ -208,7 +208,7 @@ public async Task> Buy([F /// [PublicCallbackEndpoint("webshop", "payment")] [HttpGet("{packageId:long?}")] - public async Task> NotifyWebShop([FromQuery] TenantGameWebShopEntityBuyNotifyRequest data) + public async Task> NotifyWebShop([FromQuery] GameWebShopEntityBuyNotifyRequest data) { if (data.TradeStatus != "TRADE_SUCCESS") { @@ -275,7 +275,7 @@ public async Task> NotifyWebShop([F var newList = new List(); foreach (var propertyItem in snapshotItems) { - var gameGoodsEntity = await PRepository.AsSugarClient().Queryable().SingleAsync(m => m.Id == propertyItem.Id); + var gameGoodsEntity = await PRepository.AsSugarClient().Queryable().SingleAsync(m => m.Id == propertyItem.Id); if (gameGoodsEntity != null) { propertyItem.Id = gameGoodsEntity.ConfigId; @@ -283,7 +283,7 @@ public async Task> NotifyWebShop([F } } - var entity = new TenantGameWebShopOrderEntity + var entity = new GameWebShopOrderEntity { RoleId = roleId, AreaId = areaId, @@ -446,7 +446,7 @@ private static bool FixedTimeEqualsIgnoreCase(string expectedSign, string? recei /// 雪花 ID 幂等键。 /// 实付金额(元,已 TryParse 校验)。 /// 预创建是否成功。 - private async Task InsertPreCreatedOrderAsync(TenantGameWebShopEntityBuyRequest input, TenantGameRoleEntity role, TenantGameWebShopEntity shop, string outTradeNo, decimal realPrice) + private async Task InsertPreCreatedOrderAsync(GameWebShopEntityBuyRequest input, GameRoleEntity role, GameWebShopEntity shop, string outTradeNo, decimal realPrice) { var snapshot = new PlayerCreateOrderResponse { @@ -456,7 +456,7 @@ private async Task InsertPreCreatedOrderAsync(TenantGameWebShopEntityBuyRe IsNeedPay = true, RewardsItem = JsonHelper.Deserialize>(shop.ItemJson) ?? new List(), }; - var order = new TenantGameOrderEntity + var order = new GameOrderEntity { Sku = input.Id, AreaId = input.AreaId, @@ -481,7 +481,7 @@ private async Task InsertPreCreatedOrderAsync(TenantGameWebShopEntityBuyRe /// /// 网关回传参数。 /// 参与 MD5 签名的业务参数字典。 - private static Dictionary BuildNotifySignParameters(TenantGameWebShopEntityBuyNotifyRequest data) + private static Dictionary BuildNotifySignParameters(GameWebShopEntityBuyNotifyRequest data) { return new Dictionary { @@ -506,7 +506,7 @@ private static Dictionary BuildNotifySignParameters(TenantGameWe /// 失败原因。 private async Task InsertFailedWebShopOrderAsync(string outTradeNo, long roleId, long areaId, long gameShopId, string reason) { - await _webShopOrderService.InsertAsync(new TenantGameWebShopOrderEntity + await _webShopOrderService.InsertAsync(new GameWebShopOrderEntity { RoleId = roleId, AreaId = areaId, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GlobalUsing.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GlobalUsing.cs index 3acdd2b0..c8899b2f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GlobalUsing.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GlobalUsing.cs @@ -7,9 +7,9 @@ global using GameFrameX.Core.SqlSugar; global using Mapster; global using Microsoft.AspNetCore.Mvc; -global using GameFrameX.Entity.Tenant.Game; +global using GameFrameX.Entity.Business.Game; global using GameFrameX.Entity.System; -global using GameFrameX.Entity.Tenant; +global using GameFrameX.Entity.Business; global using GameFrameX.Entity; global using GameFrameX.Core.Enum; global using GameFrameX.Foundation.Http.Extension; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/AdvertisementRewardLedgerIdempotencyStore.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/AdvertisementRewardLedgerIdempotencyStore.cs index 0b04c260..cc3465ec 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/AdvertisementRewardLedgerIdempotencyStore.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/AdvertisementRewardLedgerIdempotencyStore.cs @@ -1,5 +1,5 @@ using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Idempotency; using SqlSugar; @@ -31,19 +31,19 @@ public sealed class AdvertisementRewardLedgerIdempotencyStore : IIdempotencyStor /// public const string RequestDigest = "ad-reward-key-replay"; - private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _repository; /// /// 占位模板:携带回调 payload 侧字段(Provider / TransactionId / AdUnit / 奖励项 / 沙盒标记),角色侧字段由服务在 Execute 分支补写。 /// - private readonly TenantGameAdvertisementRewardEntity _ledgerTemplate; + private readonly GameAdvertisementRewardEntity _ledgerTemplate; /// /// 初始化存储。 /// /// 账本仓储(租户路由)。 /// 占位模板(payload 字段已就绪,IdempotencyKey 以占位记录为准覆盖)。 - public AdvertisementRewardLedgerIdempotencyStore(SqlSugarRepository repository, TenantGameAdvertisementRewardEntity ledgerTemplate) + public AdvertisementRewardLedgerIdempotencyStore(SqlSugarRepository repository, GameAdvertisementRewardEntity ledgerTemplate) { _repository = repository; _ledgerTemplate = ledgerTemplate; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs index de06a829..3cb2780b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs @@ -4,29 +4,29 @@ using GameFrameX.Advertisement.Pangle; using GameFrameX.Client.Api.Integrations.Advertisement.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Service; namespace GameFrameX.Client.Api.Integrations.Advertisement; /// /// 广告服务器回调。 -/// 广告网络回调不携带 X-Api-Key,必须先由公开回调 URL 路由参数建立租户上下文,再通过 读取该租户的验签材料。 +/// 广告网络回调不携带 X-Api-Key,必须先由公开回调 URL 路由参数建立租户上下文,再通过 读取该租户的验签材料。 /// 无法解析租户或租户未配置验签材料时安全拒绝,禁止逐租户扫描或回落到进程级 key。 /// TopOn / AdMob / UnityAds 的验签 + 幂等账本 + 发奖链路由 统一处理(C114 / GFX-110);Pangle 验签由 处理(仅验签,不进发奖链路)。 /// -public class GameAdWebHookController : BaseController +public class GameAdWebHookController : BaseController { - private readonly IClientApiTenantOptionsProvider _optionsProvider; - private readonly Repository _roleRepository; + private readonly IClientApiOptionsProvider _optionsProvider; + private readonly Repository _roleRepository; private readonly GameAdvertisementRewardService _advertisementRewardService; private readonly IAdvertisementCallbackFactory _advertisementCallbackFactory; /// /// - public GameAdWebHookController(SqlSugarRepository service, - Repository roleRepository, - IClientApiTenantOptionsProvider optionsProvider, + public GameAdWebHookController(SqlSugarRepository service, + Repository roleRepository, + IClientApiOptionsProvider optionsProvider, GameAdvertisementRewardService advertisementRewardService, IAdvertisementCallbackFactory advertisementCallbackFactory) : base(service) { @@ -41,7 +41,7 @@ public GameAdWebHookController(SqlSugarRepository验签 + 幂等账本 + 发奖由 处理;本端点仅保留 C59 公开回调路由与 HTTP 形状。 /// [PublicCallbackEndpoint("topon", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] public async Task TopOnNotify() { var result = await _advertisementRewardService.ReceiveTopOnAsync(); @@ -54,7 +54,7 @@ public async Task TopOnNotify() /// 租户身份只来自公开回调 URL 路由上下文;验签走 (仅验签,不进发奖链路),签名通过后才允许查询广告发放记录。 /// [PublicCallbackEndpoint("pangle", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] public async Task PangleGlobalNotify([FromQuery] AdvertisementPangleGlobalGameEntityRequest input) { var advertisementOptions = await _optionsProvider.GetAdvertisementCallbackOptionsAsync(); @@ -83,10 +83,10 @@ public async Task PangleGlobalNotify([FromQuery] AdvertisementPangle /// /// Google AdMob奖励视频广告回调通知。 /// 验签 + 幂等账本 + 发奖由 处理。 - /// 发放成功后保留对 的写入(C75/C91 应用作用域事实,范围外不动)。 + /// 发放成功后保留对 的写入(C75/C91 应用作用域事实,范围外不动)。 /// [PublicCallbackEndpoint("admob", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] public async Task AdMobNotify([FromQuery] AdMobCallbackRequest input) { var result = await _advertisementRewardService.ReceiveAdMobAsync(); @@ -107,7 +107,7 @@ public async Task AdMobNotify([FromQuery] AdMobCallbackRequest input /// 验签 + 幂等账本 + 发奖由 处理(C114 新增端点)。 /// [PublicCallbackEndpoint("unityads", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] public async Task UnityAdsNotify([FromQuery] AdvertisementUnityAdsCallbackRequest input) { var result = await _advertisementRewardService.ReceiveUnityAdsAsync(); @@ -116,7 +116,7 @@ public async Task UnityAdsNotify([FromQuery] AdvertisementUnityAdsCa } /// - /// 发放成功后写入 角色广告事实(C75/C91 应用作用域,保留不改)。 + /// 发放成功后写入 角色广告事实(C75/C91 应用作用域,保留不改)。 /// private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest input) { @@ -143,7 +143,7 @@ private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest inp return; } - var gameRoleAdvertisementEntity = new TenantGameRoleAdvertisementEntity + var gameRoleAdvertisementEntity = new GameRoleAdvertisementEntity { TransId = input.TransactionId, UserId = userId, @@ -156,7 +156,7 @@ private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest inp } catch (Exception ex) { - LogHelper.Error($"AdMob TenantGameRoleAdvertisementEntity 写入异常: {ex.Message}", ex); + LogHelper.Error($"AdMob GameRoleAdvertisementEntity 写入异常: {ex.Message}", ex); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdvertisementRewardService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdvertisementRewardService.cs index 68ea369c..6c5a714e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdvertisementRewardService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdvertisementRewardService.cs @@ -1,6 +1,6 @@ using GameFrameX.Advertisement.Abstract; using GameFrameX.Application.ServerCenter; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Entity.Enum; using GameFrameX.Foundation.Idempotency; @@ -27,18 +27,18 @@ public sealed class GameAdvertisementRewardService /// private const int CodeGeneral = 0; - private readonly IClientApiTenantOptionsProvider _optionsProvider; - private readonly Repository _rewardRepository; - private readonly Repository _areaRepository; + private readonly IClientApiOptionsProvider _optionsProvider; + private readonly Repository _rewardRepository; + private readonly Repository _areaRepository; private readonly HttpClient _httpClient; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IAdvertisementCallbackFactory _advertisementCallbackFactory; /// /// - public GameAdvertisementRewardService(IClientApiTenantOptionsProvider optionsProvider, - Repository rewardRepository, - Repository areaRepository, + public GameAdvertisementRewardService(IClientApiOptionsProvider optionsProvider, + Repository rewardRepository, + Repository areaRepository, HttpClient httpClient, IHttpContextAccessor httpContextAccessor, IAdvertisementCallbackFactory advertisementCallbackFactory) @@ -93,7 +93,7 @@ private Task ReceiveAsync(string providerCanon /// 三 Provider 同构处理流程(fail closed,顺序严格按 change.md §3;幂等判定统一走 Foundation 接口)。 /// private async Task ReceiveAsyncCore(string providerCanonical, - Func verify, + Func verify, Func> resolveRole) { // 1. 取配置 @@ -134,7 +134,7 @@ private async Task ReceiveAsyncCore(string pro } // 4. 幂等判定(Foundation 协调器 + 账本表即 Store):占位 → 执行 → 完成落定 / 失败落定 - var normalizedProvider = ClientApiTenantOptionsProvider.NormalizeAdvertisementProvider(providerCanonical); + var normalizedProvider = ClientApiOptionsProvider.NormalizeAdvertisementProvider(providerCanonical); var idempotencyKey = "adreward:" + normalizedProvider + ":" + payload.TransactionId; var ledgerTemplate = BuildLedger(providerCanonical, idempotencyKey, payload, null, TimerHelper.UnixTimeSeconds()); var store = new AdvertisementRewardLedgerIdempotencyStore(_rewardRepository, ledgerTemplate); @@ -252,13 +252,13 @@ await _rewardRepository.AsUpdateable() .ExecuteCommandAsync(); } - private static TenantGameAdvertisementRewardEntity BuildLedger(string providerCanonical, + private static GameAdvertisementRewardEntity BuildLedger(string providerCanonical, string idempotencyKey, VerifiedPayload payload, RoleResolution? resolution, long createdTime) { - return new TenantGameAdvertisementRewardEntity + return new GameAdvertisementRewardEntity { Provider = providerCanonical, TransactionId = payload.TransactionId, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/AddTenantGameOrderEntityResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/AddGameOrderEntityResponse.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/AddTenantGameOrderEntityResponse.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/AddGameOrderEntityResponse.cs index 2ae3666f..330714ad 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/AddTenantGameOrderEntityResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/AddGameOrderEntityResponse.cs @@ -9,7 +9,7 @@ namespace GameFrameX.Client.Api.Integrations.Payment.Dto; /// /// 商品订单增加输出参数 /// -public class AddTenantGameOrderEntityResponse : EntityBaseId +public class AddGameOrderEntityResponse : EntityBaseId { /// /// 角色ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/CreateTenantGameOrderEntityRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/CreateGameOrderEntityRequest.cs similarity index 97% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/CreateTenantGameOrderEntityRequest.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/CreateGameOrderEntityRequest.cs index 446f8f6b..594f6804 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/CreateTenantGameOrderEntityRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/Dto/CreateGameOrderEntityRequest.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Client.Api.Integrations.Payment.Dto; /// /// 客户端商品订单创建输入参数 /// -public class CreateTenantGameOrderEntityRequest : BaseAddRequest +public class CreateGameOrderEntityRequest : BaseAddRequest { /// /// 账号ID diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs index 228edf73..2d22dc21 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs @@ -100,7 +100,7 @@ public async Task> NotifyApple() if (applePaymentOptionSetting == null || applePayNotificationPayload == null || string.IsNullOrWhiteSpace(transactionPayloadJson)) { - LogHelper.Error("Apple支付配置未找到或 JWS 签名验证失败。请检查 tenantId/appId/env 对应的后台支付配置"); + LogHelper.Error("Apple支付配置未找到或 JWS 签名验证失败。请检查 id/appId/env 对应的后台支付配置"); Response.StatusCode = 400; return HttpJsonResultData.ValidationError(); } @@ -299,9 +299,9 @@ private AppStoreServerApiClient GetAppStoreServerApiClientSandbox(ApplePaymentOp return new AppStoreServerApiClient(privateKey, keyId, issuerId, bundleId, ApplePayEnvironment.Sandbox, _httpClient); } - private async Task FindAppleOrderAsync(JWSTransactionDecodedPayload transactionInfo) + private async Task FindAppleOrderAsync(JWSTransactionDecodedPayload transactionInfo) { - TenantGameOrderEntity? gameOrderEntity = null; + GameOrderEntity? gameOrderEntity = null; if (!string.IsNullOrWhiteSpace(transactionInfo.TransactionId)) { gameOrderEntity = await PRepository.GetSingleAsync(m => m.AppleTransactionId == transactionInfo.TransactionId); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.cs index 5f2dbb20..30b8991c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.cs @@ -5,7 +5,7 @@ using GameFrameX.Client.Api.GameWebShop.Dto; using GameFrameX.Client.Api.Integrations.Payment.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Service; using GameFrameX.Entity.Enum; using GameFrameX.Payment.Abstract; @@ -17,10 +17,10 @@ namespace GameFrameX.Client.Api.Integrations.Payment; /// /// 游戏订单控制器 /// -public partial class GameOrderController : BaseController +public partial class GameOrderController : BaseController { - private readonly IClientApiTenantOptionsProvider _optionsProvider; - private readonly Repository _gameRoleService; + private readonly IClientApiOptionsProvider _optionsProvider; + private readonly Repository _gameRoleService; private readonly HttpClient _httpClient; private readonly GameOrderShipService _shipService; private readonly IPaymentChannelFactory _paymentChannelFactory; @@ -37,9 +37,9 @@ public partial class GameOrderController : BaseController /// /// /// - public GameOrderController(SqlSugarRepository service, - IClientApiTenantOptionsProvider optionsProvider, - Repository gameRoleService, + public GameOrderController(SqlSugarRepository service, + IClientApiOptionsProvider optionsProvider, + Repository gameRoleService, HttpClient httpClient, GameOrderShipService shipService, IPaymentChannelFactory paymentChannelFactory, @@ -62,19 +62,19 @@ IGooglePlayPurchaseService googlePlayPurchaseService /// /// [HttpPost] - [ProducesResponseType(typeof(HttpJsonResultData), 200)] - public async Task> Create([FromBody] CreateTenantGameOrderEntityRequest input) + [ProducesResponseType(typeof(HttpJsonResultData), 200)] + public async Task> Create([FromBody] CreateGameOrderEntityRequest input) { - var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); + var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); if (gameAreaEntity == null) { - return GameApiResult.Error(AreaErrorCode.AreaNotFound, "区服不存在"); + return GameApiResult.Error(AreaErrorCode.AreaNotFound, "区服不存在"); } - var gameRoleEntity = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == input.RoleId).FirstAsync(); + var gameRoleEntity = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == input.RoleId).FirstAsync(); if (gameRoleEntity == null) { - return GameApiResult.Error(GameRoleErrorCode.RoleNotFound, "角色不存在"); + return GameApiResult.Error(GameRoleErrorCode.RoleNotFound, "角色不存在"); } // 调用游戏服务器验证商品ID相关 @@ -84,23 +84,23 @@ public async Task> Create([ if (resultData.IsSuccess == false) { - return HttpJsonResultData.Error(resultData.Code, resultData.Message); + return HttpJsonResultData.Error(resultData.Code, resultData.Message); } // 判断是否需要支付 if (resultData.Data.IsNeedPay == false) { // 不需要支付,直接返回 - var addTenantGameOrderEntityOutput = new AddTenantGameOrderEntityResponse + var addGameOrderEntityOutput = new AddGameOrderEntityResponse { RoleId = input.RoleId, Sku = input.Sku, IsNeedPay = false, }; - return HttpJsonResultData.Success(addTenantGameOrderEntityOutput); + return HttpJsonResultData.Success(addGameOrderEntityOutput); } - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Id = SnowFlakeIdHelper.Instance.NextId(); entity.PayChannel = input.PayChannel; @@ -117,14 +117,14 @@ public async Task> Create([ // 检查是否支持该支付渠道 if (!_paymentChannelFactory.IsSupported(input.PayChannel)) { - return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, "不支持的支付渠道"); + return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, "不支持的支付渠道"); } // 获取支付渠道处理器 var paymentHandler = _paymentChannelFactory.GetHandler(input.PayChannel); if (paymentHandler == null) { - return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, "支付渠道处理器未找到"); + return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, "支付渠道处理器未找到"); } // 获取支付配置 @@ -136,11 +136,11 @@ public async Task> Create([ catch (InvalidOperationException exception) { // S3/C401 断链修复点:把回调路由不完整的拒单原因返回给客户端。 - return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, exception.Message); + return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, exception.Message); } if (optionSetting == null) { - return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, "支付渠道配置未找到"); + return GameApiResult.Error(PaymentErrorCode.PayChannelNotSupported, "支付渠道配置未找到"); } var entityBase = new GameOrderBase @@ -158,7 +158,7 @@ public async Task> Create([ var paymentResult = await paymentHandler.CreateOrderAsync(entityBase, input, gameRoleEntity, _httpClient, optionSetting); if (!paymentResult.IsSuccess) { - return HttpJsonResultData.Fail(paymentResult.ErrorMessage); + return HttpJsonResultData.Fail(paymentResult.ErrorMessage); } var orderEntity = paymentResult.OrderEntity; @@ -167,7 +167,7 @@ public async Task> Create([ var updatedEntity = await PRepository.InsertReturnEntityAsync(entity); // 注意:累充(AllRecharge)不在下单时递增,改为在发货确认支付成功后递增(见 GameOrderShipService.ShipAsync),避免下单刷 VIP 等级 // 创建输出对象 - var output = updatedEntity.Adapt(); + var output = updatedEntity.Adapt(); // 如果支付结果包含额外信息,则合并 if (paymentResult.Output != null) @@ -200,7 +200,7 @@ public async Task> Create([ } } - return HttpJsonResultData.Success(output); + return HttpJsonResultData.Success(output); } /// @@ -210,7 +210,7 @@ public async Task> Create([ /// 是否是充值发货 /// 是否是沙盒充值 /// - private async Task> SendOutGoods(TenantGameOrderEntity gameOrderEntity, bool isRecharge = false, bool isSandBox = false) + private async Task> SendOutGoods(GameOrderEntity gameOrderEntity, bool isRecharge = false, bool isSandBox = false) { return await _shipService.ShipAsync(gameOrderEntity.Id, isRecharge, isSandBox); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs index f9241f1f..0747360e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs @@ -1,9 +1,9 @@ using GameFrameX.Client.Api.Services.PublicCallback; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using System.Text.Json; using GameFrameX.Application.ClientDelivery.GamePaymentConfig; using GameFrameX.Client.Api.Services; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Payment.Abstract; using GameFrameX.Payment.AliPay; using GameFrameX.Payment.Wechat; @@ -42,9 +42,9 @@ public class PaymentOptionSettingProvider : IPaymentOptionSettingProvider /// /// 支付配置提供器实现 /// - public PaymentOptionSettingProvider(ISqlSugarClient tenantDbProvider, IHttpContextAccessor httpContextAccessor) + public PaymentOptionSettingProvider(ISqlSugarClient dbProvider, IHttpContextAccessor httpContextAccessor) { - _tenantDbProvider = tenantDbProvider; + _tenantDbProvider = dbProvider; _httpContextAccessor = httpContextAccessor; } @@ -117,14 +117,14 @@ public IEnumerable GetOptionSettings(string channelName) where T : class, /// 渠道名称(已小写规范化)。 /// 当前上下文分包标识。 /// 候选支付配置列表。 - private List GetPaymentConfigs(string channelName, long? packageId) + private List GetPaymentConfigs(string channelName, long? packageId) { var context = _httpContextAccessor.HttpContext; var db = _tenantDbProvider; var environments = GetRequestedEnvironments(context); var hasPackageId = packageId.HasValue; var packageIdValue = packageId.GetValueOrDefault(); - var query = db.Queryable() + var query = db.Queryable() .Where(u => u.PayChannel == channelName && u.IsEnabled == true && (u.PackageIdNormalized == 0 || (hasPackageId && u.PackageIdNormalized == packageIdValue))); @@ -137,7 +137,7 @@ private List GetPaymentConfigs(string channelName return query.ToList() .GroupBy(u => u.IsSandbox) .Select(group => GamePaymentConfigService.PickBestConfig(group, packageId)) - .OfType() + .OfType() .OrderBy(u => u.IsSandbox) .ToList(); } @@ -163,7 +163,7 @@ private List GetPaymentConfigs(string channelName /// /// 按公开回调路由规范化支付渠道的回调通知地址(C401,GFX-1213):站点根地址自动补全路由段 - /// (含当前分包段),旧「回调/{tenantId}/{appId}/{packageId}」三段地址自动去段重建; + /// (含当前分包段),旧「回调/{id}/{appId}/{packageId}」三段地址自动去段重建; /// 无法识别的地址置空并由支付处理器按「通知地址未配置」拒绝下单,避免网关回调打在无法命中的地址上 /// 导致已付款订单不发货。其余渠道地址原样透传。 /// @@ -223,7 +223,7 @@ private static IPaymentOptionSetting NormalizeCallbackNotifyUrl(string channelNa var packageId = GetCurrentPackageId(context); if (packageId.HasValue) { - var package = db.Queryable() + var package = db.Queryable() .First(u => u.Id == packageId.Value && u.IsEnabled == true); return PackageMatchesScope(package) ? packageId : null; } @@ -234,12 +234,12 @@ private static IPaymentOptionSetting NormalizeCallbackNotifyUrl(string channelNa return null; } - var namedPackage = db.Queryable() + var namedPackage = db.Queryable() .First(u => u.PackageName == packageName.Trim() && u.IsEnabled == true); return PackageMatchesScope(namedPackage) ? namedPackage.Id : null; } - public static bool PackageMatchesScope(TenantGameAppPackageEntity? package) + public static bool PackageMatchesScope(GameAppPackageEntity? package) { return package != null && package.IsEnabled == true; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Middleware/PublicCallbackTenantResolutionMiddleware.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Middleware/PublicCallbackResolutionMiddleware.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Middleware/PublicCallbackTenantResolutionMiddleware.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Middleware/PublicCallbackResolutionMiddleware.cs index 8ce7dcb4..e9b17767 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Middleware/PublicCallbackTenantResolutionMiddleware.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Middleware/PublicCallbackResolutionMiddleware.cs @@ -7,11 +7,11 @@ namespace GameFrameX.Client.Api.Middleware; /// 公开 provider 回调路由解析中间件。 /// 该中间件只处理白名单回调入口;provider 签名或 JWT 仍由具体回调 action 使用主库配置校验。 /// -public sealed class PublicCallbackTenantResolutionMiddleware +public sealed class PublicCallbackResolutionMiddleware { private readonly RequestDelegate _next; - public PublicCallbackTenantResolutionMiddleware(RequestDelegate next) + public PublicCallbackResolutionMiddleware(RequestDelegate next) { _next = next; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs index c0b7e928..f7cccff1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs @@ -4,15 +4,15 @@ using GameFrameX.Client.Api.Services.RemoteConfig; using GameFrameX.Client.Api.Services.PublicCallback; using GameFrameX.Client.Api.Services.PayVerification; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Application.PlayerCenter.GamePenalty; using GameFrameX.Application.PlayerCenter.GameUser; using GameFrameX.Application.CommerceCenter.GameOrder; using GameFrameX.Client.Api.Filter; using GameFrameX.Client.Api.Middleware; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Client.Api.Services.Email; using GameFrameX.Client.Api.Integrations.Payment; using GameFrameX.Client.Api.GameAppVersion.Dto; @@ -22,7 +22,7 @@ using GameFrameX.Core.Bootstrap; using GameFrameX.Core.Cache; using GameFrameX.Core.Service.Cache; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Foundation.Extensions; using GameFrameX.Foundation.Options; using Serilog; @@ -111,18 +111,18 @@ private static async Task Main(string[] args) builder.Services.AddSingleton(); // 包名解析服务 builder.Services.AddSingleton(); // 公开 provider 回调 URL -> 租户/应用上下文解析 // Client API 请求期租户配置 Provider:依赖 IHttpContextAccessor + ISqlSugarClient,按请求作用域读取租户库配置 - builder.Services.AddScoped(); - // 广告奖励发放账本服务(C114 / GFX-110):依赖 Repository + IClientApiTenantOptionsProvider + HttpClient + IHttpContextAccessor + builder.Services.AddScoped(); + // 广告奖励发放账本服务(C114 / GFX-110):依赖 Repository + IClientApiOptionsProvider + HttpClient + IHttpContextAccessor builder.Services.AddAdvertisementCallbacks(); builder.Services.AddScoped(); builder.Services.AddScoped(); // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 租户仓储,随请求作用域解析) builder.Services.AddScoped(); // 邮件分域:租户业务邮件(玩家注册 / 找回密码);平台系统邮件(SystemMessageService 等)走 ISystemEmailSender - builder.Services.AddScoped(); + builder.Services.AddScoped(); builder.Services.AddSingleton(); - // Token / Ticket 签发服务依赖 IClientApiTenantOptionsProvider(Scoped),必须随之降为 Scoped + // Token / Ticket 签发服务依赖 IClientApiOptionsProvider(Scoped),必须随之降为 Scoped builder.Services.AddScoped(); // C7 登录会话密钥签发:依赖 Scoped 租户仓储(SqlSugarRepository<>),随请求作用域 builder.Services.AddScoped(); @@ -134,9 +134,9 @@ private static async Task Main(string[] args) builder.Services.AddScoped(); // 注册 Fallback 匹配器 - builder.Services.AddScoped, AppVersionFallbackMatcher>(); - builder.Services.AddScoped, RemoteConfigFallbackMatcher>(); - builder.Services.AddScoped, AssetPackageVersionFallbackMatcher>(); + builder.Services.AddScoped, AppVersionFallbackMatcher>(); + builder.Services.AddScoped, RemoteConfigFallbackMatcher>(); + builder.Services.AddScoped, AssetPackageVersionFallbackMatcher>(); builder.Services.AddSerilog(); builder.Services.AddHostHealthChecks(); @@ -177,7 +177,7 @@ private static async Task Main(string[] args) app.UseRouting(); // 公开 provider 回调路由解析中间件 - app.UseMiddleware(); + app.UseMiddleware(); // 协议版本中间件(C5 server-envelope-middleware):X-Proto-Ver 缺头拒绝,未知版本 AuditOnly 只告警不拦截 app.UseMiddleware(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Properties/AssemblyInfo.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Properties/AssemblyInfo.cs index bee4d318..a5a6ff94 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Properties/AssemblyInfo.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ using System.Runtime.CompilerServices; -// 暴露 internal 配置解析辅助方法(如 ClientApiTenantOptionsProvider.ParseAdMobKeys)给单测程序集 +// 暴露 internal 配置解析辅助方法(如 ClientApiOptionsProvider.ParseAdMobKeys)给单测程序集 [assembly: InternalsVisibleTo("GameFrameX.Core.Tests")] \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/RemoteConfig/GameRemoteConfigController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/RemoteConfig/GameRemoteConfigController.cs index 27f37b1c..7d5c568d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/RemoteConfig/GameRemoteConfigController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/RemoteConfig/GameRemoteConfigController.cs @@ -1,5 +1,5 @@ using GameFrameX.Client.Api.Services.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; using GameFrameX.Client.Api.RemoteConfig.Dto; using GameFrameX.Client.Api.Services; using GameFrameX.Core.Middleware; @@ -10,7 +10,7 @@ namespace GameFrameX.Client.Api.RemoteConfig; /// /// 远程配置控制器 /// -public class GameRemoteConfigController : BaseController +public class GameRemoteConfigController : BaseController { private readonly RemoteConfigDeliveryService _deliveryService; @@ -19,7 +19,7 @@ public class GameRemoteConfigController : BaseController /// /// 客户端远程配置投放解析服务 - public GameRemoteConfigController(SqlSugarRepository service, RemoteConfigDeliveryService deliveryService) : base(service) + public GameRemoteConfigController(SqlSugarRepository service, RemoteConfigDeliveryService deliveryService) : base(service) { _deliveryService = deliveryService; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiSessionKeyIssuer.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiSessionKeyIssuer.cs index 4d7a624d..2bee40f9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiSessionKeyIssuer.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiSessionKeyIssuer.cs @@ -1,23 +1,23 @@ using GameFrameX.Application.ClientDelivery.Security.SessionKey; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Client.Api.Services.Auth; /// /// 登录期会话密钥签发服务。 -/// 每次登录生成一把 Kid 会话密钥写入会话密钥环(,AES-256-GCM 信封对称密钥), +/// 每次登录生成一把 Kid 会话密钥写入会话密钥环(,AES-256-GCM 信封对称密钥), /// NotBefore=now、Expire 与 AccessToken 到期时间对齐,随登录响应一次性回显 Kid/Secret。 /// Kid 使用随机标识;Secret 复用管理面 的安全随机源。 /// public sealed class ClientApiSessionKeyIssuer { - private readonly SqlSugarRepository _repository; + private readonly SqlSugarRepository _repository; /// /// /// /// 会话密钥仓储(主库)。 - public ClientApiSessionKeyIssuer(SqlSugarRepository repository) + public ClientApiSessionKeyIssuer(SqlSugarRepository repository) { _repository = repository; } @@ -37,10 +37,10 @@ await _repository.AsDeleteable() .ExecuteCommandAsync(); var plainSecret = SessionKeyService.GenerateSecret(); - var entity = new TenantSessionKeyEntity + var entity = new SessionKeyEntity { Kid = Guid.NewGuid().ToString("N"), - Secret = GameFrameX.Core.Service.Tenant.TenantSecretCrypto.Encrypt(plainSecret) ?? string.Empty, + Secret = GameFrameX.Core.Service.Business.SecretCrypto.Encrypt(plainSecret) ?? string.Empty, NotBeforeTime = now, ExpireTime = expireAtUnixSeconds, IsEnabled = true, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiTokenIssuer.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiTokenIssuer.cs index b9337266..790e4237 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiTokenIssuer.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Auth/ClientApiTokenIssuer.cs @@ -1,7 +1,7 @@ using System.Security.Claims; using System.Security.Cryptography; using System.Text; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using Microsoft.IdentityModel.JsonWebTokens; using Microsoft.IdentityModel.Tokens; @@ -9,7 +9,7 @@ namespace GameFrameX.Client.Api.Services.Auth; /// /// Client API 账号访问令牌签发服务。 -/// 签名密钥与有效期从主库 读取;未配置密钥时抛出异常。 +/// 签名密钥与有效期从主库 读取;未配置密钥时抛出异常。 /// public sealed class ClientApiTokenIssuer { @@ -18,12 +18,12 @@ public sealed class ClientApiTokenIssuer public const string ClientApiAccessTokenUse = "client_api_access"; public const string ClientApiTokenAudience = "client-api"; - private readonly IClientApiTenantOptionsProvider _optionsProvider; + private readonly IClientApiOptionsProvider _optionsProvider; private readonly JsonWebTokenHandler _handler = new(); /// /// - public ClientApiTokenIssuer(IClientApiTenantOptionsProvider optionsProvider) + public ClientApiTokenIssuer(IClientApiOptionsProvider optionsProvider) { _optionsProvider = optionsProvider; } @@ -31,7 +31,7 @@ public ClientApiTokenIssuer(IClientApiTenantOptionsProvider optionsProvider) /// /// 为登录后的游戏账号签发 Client API 访问令牌。 /// - public async Task IssueAsync(TenantGameUserEntity user, string provider) + public async Task IssueAsync(GameUserEntity user, string provider) { var policy = await _optionsProvider.GetTokenPolicyAsync(); var signingKey = policy.SigningKey diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantAreaPolicyOptions.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/AreaPolicyOptions.cs similarity index 68% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantAreaPolicyOptions.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/AreaPolicyOptions.cs index a571d9eb..b2448488 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantAreaPolicyOptions.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/AreaPolicyOptions.cs @@ -1,9 +1,9 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// 租户区服信息输出策略。 /// -public sealed class TenantAreaPolicyOptions +public sealed class AreaPolicyOptions { /// /// 是否在区服列表中返回 HttpManageUrl 运维地址。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs index 5a6021ba..38a6840f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs @@ -1,52 +1,52 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using SqlSugar; using System.Text.Json; using GameFrameX.Advertisement.Abstract; using GameFrameX.Client.Api.Middleware; using GameFrameX.Client.Api.Services.Email; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// 从唯一主库读取 Client API 请求期业务配置。 /// 所有策略节共享启用且 Id 最大的配置行,并在请求内缓存。 /// -public sealed class ClientApiTenantOptionsProvider : IClientApiTenantOptionsProvider +public sealed class ClientApiOptionsProvider : IClientApiOptionsProvider { private readonly ISqlSugarClient _tenantDbProvider; private readonly IHttpContextAccessor _httpContextAccessor; - private TenantClientApiPolicyEntity? _effectivePolicyRow; + private ClientApiPolicyEntity? _effectivePolicyRow; private bool _effectivePolicyRowFetched; - public ClientApiTenantOptionsProvider(ISqlSugarClient database, IHttpContextAccessor httpContextAccessor) + public ClientApiOptionsProvider(ISqlSugarClient database, IHttpContextAccessor httpContextAccessor) { _tenantDbProvider = database; _httpContextAccessor = httpContextAccessor; } /// -#pragma warning disable CS8603 // 接口 IClientApiTenantOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake - public async Task GetEmailOptionsAsync() +#pragma warning disable CS8603 // 接口 IClientApiOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake + public async Task GetEmailOptionsAsync() { var db = _tenantDbProvider; - var entity = await TenantEmailConfigSelector.SelectAsync(db, 0); + var entity = await EmailConfigSelector.SelectAsync(db, 0); return entity == null ? null - : new TenantEmailOptions + : new EmailOptions { FromEmailAddress = entity.FromEmailAddress, // C372(GFX-838):凭证读取边界解密(C371 起库内密文;无前缀明文直通) - FromEmailSecretId = TenantSecretCrypto.DecryptCached(entity.FromEmailSecretId) ?? string.Empty, - FromEmailSecretKey = TenantSecretCrypto.DecryptCached(entity.FromEmailSecretKey) ?? string.Empty, + FromEmailSecretId = SecretCrypto.DecryptCached(entity.FromEmailSecretId) ?? string.Empty, + FromEmailSecretKey = SecretCrypto.DecryptCached(entity.FromEmailSecretKey) ?? string.Empty, }; } #pragma warning restore CS8603 /// -#pragma warning disable CS8603 // 接口 IClientApiTenantOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake - public async Task GetAdvertisementCallbackOptionsAsync() +#pragma warning disable CS8603 // 接口 IClientApiOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake + public async Task GetAdvertisementCallbackOptionsAsync() { var entity = await PickAdvertisementCallbackConfigAsync(); if (entity == null) @@ -67,7 +67,7 @@ public async Task GetAdvertisementCallbackOp var signingSecret = GetConfigValue(configValues, "signingSecret"); var verificationKeys = GetConfigValue(configValues, "verificationKeys"); - return new TenantAdvertisementCallbackOptions + return new AdvertisementCallbackOptions { Provider = entity.Provider, CallbackUrl = GetConfigValue(configValues, "callbackUrl", entity.CallbackUrl), @@ -82,11 +82,11 @@ public async Task GetAdvertisementCallbackOp } #pragma warning restore CS8603 - private async Task PickAdvertisementCallbackConfigAsync() + private async Task PickAdvertisementCallbackConfigAsync() { var db = _tenantDbProvider; var provider = ResolvePublicCallbackProvider(_httpContextAccessor.HttpContext); - var query = db.Queryable() + var query = db.Queryable() .Where(c => c.IsEnabled == true); var candidates = await query.ToListAsync(); if (!string.IsNullOrWhiteSpace(provider)) @@ -102,13 +102,13 @@ public async Task GetAdvertisementCallbackOp } /// - public async Task GetTokenPolicyAsync() + public async Task GetTokenPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); - return new TenantClientApiTokenPolicyOptions + return new ClientApiTokenPolicyOptions { // C372(GFX-838):令牌签名密钥读取边界解密(C371 起库内密文;无前缀明文直通) - SigningKey = string.IsNullOrWhiteSpace(entity?.SigningKey) ? null : TenantSecretCrypto.DecryptCached(entity.SigningKey), + SigningKey = string.IsNullOrWhiteSpace(entity?.SigningKey) ? null : SecretCrypto.DecryptCached(entity.SigningKey), LifetimeMinutes = entity == null ? ClientApiPlatformDefaults.ClientApiTokenLifetimeMinutesDefault : ClientApiPlatformDefaults.ClampTokenLifetimeMinutes(entity.LifetimeMinutes), @@ -116,11 +116,11 @@ public async Task GetTokenPolicyAsync() } /// - public async Task GetGameLoginTicketPolicyAsync() + public async Task GetGameLoginTicketPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); var now = TimerHelper.UnixTimeSeconds(); - return new TenantGameLoginTicketPolicyOptions + return new GameLoginTicketPolicyOptions { TicketExpireTime = ClientApiPlatformDefaults.NormalizeGameLoginTicketExpireTime(entity?.TicketExpireTime ?? 0, now), EnableKeyAutoCreate = entity?.EnableKeyAutoCreate ?? ClientApiPlatformDefaults.GameLoginTicketKeyAutoCreateDefault, @@ -128,30 +128,30 @@ public async Task GetGameLoginTicketPolicyAs } /// - public async Task GetOrderPolicyAsync() + public async Task GetOrderPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); - return new TenantOrderPolicyOptions + return new OrderPolicyOptions { EnableSandBoxRecharge = entity?.EnableSandBoxRecharge ?? false, }; } /// - public async Task GetAreaPolicyAsync() + public async Task GetAreaPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); - return new TenantAreaPolicyOptions + return new AreaPolicyOptions { EnableReturnHttpManager = entity?.EnableReturnHttpManager ?? false, }; } - private async Task GetEffectivePolicyRowAsync() + private async Task GetEffectivePolicyRowAsync() { if (!_effectivePolicyRowFetched) { - _effectivePolicyRow = await _tenantDbProvider.Queryable() + _effectivePolicyRow = await _tenantDbProvider.Queryable() .Where(c => c.IsEnabled == true) .OrderByDescending(c => c.Id) .FirstAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantClientApiTokenPolicyOptions.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiTokenPolicyOptions.cs similarity index 78% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantClientApiTokenPolicyOptions.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiTokenPolicyOptions.cs index 372ed021..5b041a68 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantClientApiTokenPolicyOptions.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiTokenPolicyOptions.cs @@ -1,9 +1,9 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// 租户 Client API 访问令牌策略。SigningKey 为 null 表示该租户尚未配置签名密钥。 /// -public sealed class TenantClientApiTokenPolicyOptions +public sealed class ClientApiTokenPolicyOptions { /// /// 访问令牌 HMAC 签名密钥;null 表示未配置。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantEmailOptions.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/EmailOptions.cs similarity index 84% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantEmailOptions.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/EmailOptions.cs index e05bcc2b..18def32c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantEmailOptions.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/EmailOptions.cs @@ -1,9 +1,9 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// 租户业务邮件配置快照。null 引用表示该作用域未配置邮件凭据,调用方必须返回明确错误,不得 fallback 到系统邮件。 /// -public sealed class TenantEmailOptions +public sealed class EmailOptions { /// /// 发件人邮箱地址。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantGameLoginTicketPolicyOptions.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/GameLoginTicketPolicyOptions.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantGameLoginTicketPolicyOptions.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/GameLoginTicketPolicyOptions.cs index 06c44c22..436ac60c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantGameLoginTicketPolicyOptions.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/GameLoginTicketPolicyOptions.cs @@ -1,9 +1,9 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// 租户 Game 登录票据策略(非 key 部分)。 /// -public sealed class TenantGameLoginTicketPolicyOptions +public sealed class GameLoginTicketPolicyOptions { /// /// 票据固定到期时间(Unix 秒);0 表示永不过期,非 0 值已按平台默认值和 30 天上限归一化。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/IClientApiTenantOptionsProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/IClientApiOptionsProvider.cs similarity index 66% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/IClientApiTenantOptionsProvider.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/IClientApiOptionsProvider.cs index 162efc54..8cd560f3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/IClientApiTenantOptionsProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/IClientApiOptionsProvider.cs @@ -1,39 +1,39 @@ using GameFrameX.Advertisement.Abstract; -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// Client API 主库请求期业务配置 Provider。 /// -public interface IClientApiTenantOptionsProvider +public interface IClientApiOptionsProvider { /// /// 读取租户业务邮件配置;未配置返回 null,调用方必须返回明确错误,不得 fallback 到系统邮件。 /// - Task GetEmailOptionsAsync(); + Task GetEmailOptionsAsync(); /// /// 读取租户广告回调验签配置;未配置返回 null。 /// - Task GetAdvertisementCallbackOptionsAsync(); + Task GetAdvertisementCallbackOptionsAsync(); /// /// 读取 Client API 访问令牌策略;有效期已受平台默认与上限钳制,SigningKey 未配置时为 null。 /// - Task GetTokenPolicyAsync(); + Task GetTokenPolicyAsync(); /// /// 读取 Game 登录票据策略(非 key 部分);有效期已受平台范围钳制,未配置时返回平台默认值。 /// - Task GetGameLoginTicketPolicyAsync(); + Task GetGameLoginTicketPolicyAsync(); /// /// 读取订单 / 支付测试策略;未配置返回默认(关闭沙箱充值发货)。 /// - Task GetOrderPolicyAsync(); + Task GetOrderPolicyAsync(); /// /// 读取区服信息输出策略;未配置返回默认(不返回 HttpManageUrl)。 /// - Task GetAreaPolicyAsync(); + Task GetAreaPolicyAsync(); } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/MissingContextException.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/MissingContextException.cs new file mode 100644 index 00000000..794d25c6 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/MissingContextException.cs @@ -0,0 +1,13 @@ +namespace GameFrameX.Client.Api.Services.ClientApiOptions; + +/// +/// 缺少租户上下文时抛出,禁止回落主库或进程级业务参数。 +/// +public sealed class MissingContextException : InvalidOperationException +{ + /// + /// + public MissingContextException(string message) : base(message) + { + } +} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantOrderPolicyOptions.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/OrderPolicyOptions.cs similarity index 66% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantOrderPolicyOptions.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/OrderPolicyOptions.cs index 0eadfc89..092233c6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/TenantOrderPolicyOptions.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/OrderPolicyOptions.cs @@ -1,9 +1,9 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// 租户订单 / 支付测试策略。 /// -public sealed class TenantOrderPolicyOptions +public sealed class OrderPolicyOptions { /// /// 是否启用沙箱环境充值直接发货。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiPlatformDefaults.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiPlatformDefaults.cs index ea877ecf..bdf57d82 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiPlatformDefaults.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiPlatformDefaults.cs @@ -1,4 +1,4 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// Client API 平台默认策略常量(SuperAdmin 视角的非秘密默认值与安全上限)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/MissingTenantContextException.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/MissingTenantContextException.cs deleted file mode 100644 index e9644312..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/MissingTenantContextException.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; - -/// -/// 缺少租户上下文时抛出,禁止回落主库或进程级业务参数。 -/// -public sealed class MissingTenantContextException : InvalidOperationException -{ - /// - /// - public MissingTenantContextException(string message) : base(message) - { - } -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailConfigSelector.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailConfigSelector.cs similarity index 80% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailConfigSelector.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailConfigSelector.cs index 0d90f34c..ca0c5ffe 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailConfigSelector.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailConfigSelector.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; using SqlSugar; namespace GameFrameX.Client.Api.Services.Email; @@ -7,9 +7,9 @@ namespace GameFrameX.Client.Api.Services.Email; /// 从主库选择业务邮件配置,用途精确匹配优先于默认用途。 /// 同用途按优先级、更新时间及 Id 降序选择,不跨邮件域回退。 /// -public static class TenantEmailConfigSelector +public static class EmailConfigSelector { - public static async Task SelectAsync( + public static async Task SelectAsync( ISqlSugarClient database, int purpose, CancellationToken cancellationToken = default) @@ -18,7 +18,7 @@ public static class TenantEmailConfigSelector var purposes = purpose > 0 ? new[] { purpose, 0 } : new[] { 0 }; foreach (var candidate in purposes) { - var entity = await database.Queryable() + var entity = await database.Queryable() .Where(c => c.IsEnabled == true && c.Purpose == candidate) .OrderByDescending(c => c.Priority) .OrderByDescending(c => c.UpdateTime) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailOptionsSnapshot.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailOptionsSnapshot.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailOptionsSnapshot.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailOptionsSnapshot.cs index bbcad624..de1ae6f5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailOptionsSnapshot.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailOptionsSnapshot.cs @@ -2,9 +2,9 @@ namespace GameFrameX.Client.Api.Services.Email; /// /// 租户业务邮件配置快照(运行期只读视图)。 -/// 封装 的关键字段;调用方按需读取,禁止修改。 +/// 封装 的关键字段;调用方按需读取,禁止修改。 /// -public sealed class TenantEmailOptionsSnapshot +public sealed class EmailOptionsSnapshot { /// /// 配置 ID。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailPurpose.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailPurpose.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailPurpose.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailPurpose.cs index 8e21def6..3418c012 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailPurpose.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailPurpose.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Client.Api.Services.Email; /// 租户业务邮件用途。 /// 面向玩家 / 租户品牌发信;必须依赖当前租户上下文,缺配置时返回明确失败,不允许改用系统邮件。 /// -public enum TenantEmailPurpose +public enum EmailPurpose { /// /// 通配租户业务邮件配置(Purpose=0)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailSender.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailSender.cs similarity index 76% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailSender.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailSender.cs index 1ceab4f9..fca8c0ff 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/TenantEmailSender.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/EmailSender.cs @@ -1,4 +1,4 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using SqlSugar; using GameFrameX.Core.Service.Message; using GameFrameX.Email.Abstract; @@ -9,17 +9,17 @@ namespace GameFrameX.Client.Api.Services.Email; /// /// 从主库读取业务邮件配置并发送,未配置或凭据不完整时禁止回退系统邮件。 /// -public sealed class TenantEmailSender : ITenantEmailSender +public sealed class EmailSender : IEmailSender { private readonly ISqlSugarClient _database; - public TenantEmailSender(ISqlSugarClient database) + public EmailSender(ISqlSugarClient database) { _database = database; } /// - public async Task SendTemplateAsync(TenantEmailPurpose purpose, string receiverEmail, ulong templateId, string subject, IDictionary templateData) + public async Task SendTemplateAsync(EmailPurpose purpose, string receiverEmail, ulong templateId, string subject, IDictionary templateData) { var snapshot = await GetSnapshotAsync(purpose); if (snapshot == null) @@ -54,14 +54,14 @@ public async Task SendTemplateAsync(TenantEmailPurpose purpose, string rec /// public async Task GetFromEmailAddressAsync() { - var snapshot = await GetSnapshotAsync(TenantEmailPurpose.Default); + var snapshot = await GetSnapshotAsync(EmailPurpose.Default); return snapshot?.FromEmailAddress; } /// - public async Task GetSnapshotAsync(TenantEmailPurpose purpose) + public async Task GetSnapshotAsync(EmailPurpose purpose) { - var entity = await TenantEmailConfigSelector.SelectAsync(_database, (int)purpose); + var entity = await EmailConfigSelector.SelectAsync(_database, (int)purpose); if (entity == null) { return null; @@ -69,8 +69,8 @@ public async Task SendTemplateAsync(TenantEmailPurpose purpose, string rec // C372(GFX-838):邮件凭据读取边界解密(C371 起库内密文;无前缀明文直通兼容存量行; // 进程级密文缓存兜底,避免每次发送 PBKDF2 派生)。实体为本次查询的请求本地实例,改写无副作用。 - entity.FromEmailSecretId = TenantSecretCrypto.DecryptCached(entity.FromEmailSecretId) ?? string.Empty; - entity.FromEmailSecretKey = TenantSecretCrypto.DecryptCached(entity.FromEmailSecretKey) ?? string.Empty; + entity.FromEmailSecretId = SecretCrypto.DecryptCached(entity.FromEmailSecretId) ?? string.Empty; + entity.FromEmailSecretKey = SecretCrypto.DecryptCached(entity.FromEmailSecretKey) ?? string.Empty; if (string.IsNullOrWhiteSpace(entity.FromEmailAddress) || string.IsNullOrWhiteSpace(entity.FromEmailSecretId) || @@ -79,7 +79,7 @@ public async Task SendTemplateAsync(TenantEmailPurpose purpose, string rec return null; } - return new TenantEmailOptionsSnapshot + return new EmailOptionsSnapshot { Id = entity.Id, Purpose = entity.Purpose, @@ -94,7 +94,7 @@ public async Task SendTemplateAsync(TenantEmailPurpose purpose, string rec }; } - private static string ApplySubjectPrefix(TenantEmailOptionsSnapshot snapshot, string subject) + private static string ApplySubjectPrefix(EmailOptionsSnapshot snapshot, string subject) { if (string.IsNullOrWhiteSpace(snapshot.DefaultSubjectPrefix)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/ITenantEmailSender.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/IEmailSender.cs similarity index 65% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/ITenantEmailSender.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/IEmailSender.cs index 87ea15df..ba22c9ab 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/ITenantEmailSender.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/Email/IEmailSender.cs @@ -4,10 +4,10 @@ namespace GameFrameX.Client.Api.Services.Email; /// /// 业务邮件发送服务。 -/// 从主库 TenantEmailConfigEntity 按用途与优先级读取;缺配置时返回 false,禁止 fallback 到 。 -/// 调用方必须显式传入 ,禁止无用途的 SendAsync()。 +/// 从主库 EmailConfigEntity 按用途与优先级读取;缺配置时返回 false,禁止 fallback 到 。 +/// 调用方必须显式传入 ,禁止无用途的 SendAsync()。 /// -public interface ITenantEmailSender +public interface IEmailSender { /// /// 按业务邮件用途发送模板邮件。 @@ -18,7 +18,7 @@ public interface ITenantEmailSender /// 邮件主题。 /// 模板变量。 /// 发送成功返回 true;缺配置 / 发送失败返回 false,不抛业务异常。 - Task SendTemplateAsync(TenantEmailPurpose purpose, string receiverEmail, ulong templateId, string subject, IDictionary templateData); + Task SendTemplateAsync(EmailPurpose purpose, string receiverEmail, ulong templateId, string subject, IDictionary templateData); /// /// 获取主库配置的发件人地址;未配置返回 null。 @@ -29,5 +29,5 @@ public interface ITenantEmailSender /// 获取主库配置(按 Purpose 优先选择);未配置返回 null。 /// /// 业务邮件用途。传 0 视为通配,匹配 Purpose=0 的配置。 - Task GetSnapshotAsync(TenantEmailPurpose purpose); + Task GetSnapshotAsync(EmailPurpose purpose); } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketIssuer.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketIssuer.cs index 1c701b0b..2620fed3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketIssuer.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketIssuer.cs @@ -1,5 +1,5 @@ using System.Security.Claims; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using Microsoft.IdentityModel.JsonWebTokens; using Microsoft.IdentityModel.Tokens; @@ -12,12 +12,12 @@ namespace GameFrameX.Client.Api.Services.GameLoginTicket; public sealed class GameLoginTicketIssuer { private readonly IGameLoginTicketKeyResolver _keyResolver; - private readonly IClientApiTenantOptionsProvider _optionsProvider; + private readonly IClientApiOptionsProvider _optionsProvider; private readonly JsonWebTokenHandler _handler = new() { SetDefaultTimesOnTokenCreation = false, }; /// /// - public GameLoginTicketIssuer(IGameLoginTicketKeyResolver keyResolver, IClientApiTenantOptionsProvider optionsProvider) + public GameLoginTicketIssuer(IGameLoginTicketKeyResolver keyResolver, IClientApiOptionsProvider optionsProvider) { _keyResolver = keyResolver; _optionsProvider = optionsProvider; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs index b7bf6896..344c15d1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs @@ -1,23 +1,23 @@ using SqlSugar; using System.Security.Cryptography; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; namespace GameFrameX.Client.Api.Services.GameLoginTicket; /// /// 数据库驱动的 Game 登录票据签名 Key 解析服务。 -/// 生产签名唯一路径为主库 RSA();首次签发自动建 key 的开关由运行票据策略 控制。 +/// 生产签名唯一路径为主库 RSA();首次签发自动建 key 的开关由运行票据策略 控制。 /// 签名 key 默认永不过期(ExpireTime = null);手动轮换时可指定到期日,到期后被查询自然排除。不再自动预生成轮换。 /// HMAC fallback 随 C13 删除(P1 决策),不再保留兼容分支。 /// public sealed class GameLoginTicketKeyResolver : IGameLoginTicketKeyResolver { private readonly ISqlSugarClient _tenantDbProvider; - private readonly IClientApiTenantOptionsProvider _optionsProvider; + private readonly IClientApiOptionsProvider _optionsProvider; - public GameLoginTicketKeyResolver(ISqlSugarClient tenantDbProvider, IClientApiTenantOptionsProvider optionsProvider) + public GameLoginTicketKeyResolver(ISqlSugarClient dbProvider, IClientApiOptionsProvider optionsProvider) { - _tenantDbProvider = tenantDbProvider; + _tenantDbProvider = dbProvider; _optionsProvider = optionsProvider; } @@ -44,7 +44,7 @@ public async Task ResolveSigningKeyAsync() // C372(GFX-838):签发读取边界解密(C371 起库内为密文;无前缀明文直通兼容存量行; // 进程级密文缓存兜底,避免每次签发 PBKDF2 派生) - var privateKeyPem = GameFrameX.Core.Service.Tenant.TenantSecretCrypto.DecryptCached(keys[0].PrivateKeyPem); + var privateKeyPem = GameFrameX.Core.Service.Business.SecretCrypto.DecryptCached(keys[0].PrivateKeyPem); return GameLoginTicketSigningKey.CreateRsa(keys[0].Kid, privateKeyPem, keys[0].PublicKeyPem); } @@ -63,10 +63,10 @@ public async Task> GetPublicKeysAs /// /// 查询生效中全部 key:启用、算法匹配、已生效、未过期(ExpireTime 为 null 视为永不过期),按创建时间倒序(最新在前)。 /// - private async Task> GetActiveKeyEntitiesAsync(long now) + private async Task> GetActiveKeyEntitiesAsync(long now) { var db = _tenantDbProvider; - return await db.Queryable() + return await db.Queryable() .Where(x => x.IsEnabled != false && x.Algorithm == GameLoginTicketSigningKey.AlgorithmRs256 && (x.NotBeforeTime == null || x.NotBeforeTime <= now) && @@ -84,11 +84,11 @@ private async Task CreateRsaKeyEntityAsync(long now) var db = _tenantDbProvider; using (var rsa = RSA.Create(2048)) { - var entity = new TenantGameLoginTicketKeyEntity + var entity = new GameLoginTicketKeyEntity { Kid = Guid.NewGuid().ToString("N"), Algorithm = GameLoginTicketSigningKey.AlgorithmRs256, - PrivateKeyPem = GameFrameX.Core.Service.Tenant.TenantSecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem()) ?? string.Empty, + PrivateKeyPem = GameFrameX.Core.Service.Business.SecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem()) ?? string.Empty, PublicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(), NotBeforeTime = now, ExpireTime = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AppVersionFallbackMatcher.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AppVersionFallbackMatcher.cs index 1e2bed2f..dc73ace0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AppVersionFallbackMatcher.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AppVersionFallbackMatcher.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Client.Api.GameAppVersion.Dto; using System.Linq.Expressions; @@ -9,16 +9,16 @@ namespace GameFrameX.Client.Api.Services.PackageVersion; /// 应用版本 Fallback 匹配器实现 /// /// -/// 针对 TenantGameAppReleaseVersionEntity 实体的 Fallback 匹配实现。 -/// 注意:TenantGameAppReleaseVersionEntity 使用 OldVersion 字段存储应用版本。 +/// 针对 GameAppReleaseVersionEntity 实体的 Fallback 匹配实现。 +/// 注意:GameAppReleaseVersionEntity 使用 OldVersion 字段存储应用版本。 /// -public class AppVersionFallbackMatcher : GameAppPackageFallbackMatcher +public class AppVersionFallbackMatcher : GameAppPackageFallbackMatcher { /// /// 初始化匹配器 /// public AppVersionFallbackMatcher( - Repository repository, + Repository repository, GameAppPackageResolver resolver) : base(repository, resolver) { @@ -27,7 +27,7 @@ public AppVersionFallbackMatcher( /// /// 构建完全匹配所有参数的查询条件 /// - protected override Expression> BuildExactPredicates(GameAppVersionRequest request) + protected override Expression> BuildExactPredicates(GameAppVersionRequest request) { return m => m.Platform == request.Platform && m.Package == request.PackageName && @@ -39,7 +39,7 @@ protected override Expression> Bui /// /// 构建使用默认语言的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultLanguage(GameAppVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultLanguage(GameAppVersionRequest request) { return m => m.Platform == request.Platform && m.Package == request.PackageName && @@ -51,7 +51,7 @@ protected override Expression> Bui /// /// 构建使用默认渠道的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultChannel(GameAppVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultChannel(GameAppVersionRequest request) { return m => m.Platform == request.Platform && m.Package == request.PackageName && @@ -63,7 +63,7 @@ protected override Expression> Bui /// /// 构建使用默认版本的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultVersion(GameAppVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultVersion(GameAppVersionRequest request) { return m => m.Platform == request.Platform && m.Package == request.PackageName && @@ -75,7 +75,7 @@ protected override Expression> Bui /// /// 构建使用默认包名的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultPackage(GameAppVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultPackage(GameAppVersionRequest request) { return m => m.Platform == request.Platform && m.Package == GameDimensionConst.PackageNameDefault && @@ -87,7 +87,7 @@ protected override Expression> Bui /// /// 构建使用默认平台的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultPlatform(GameAppVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultPlatform(GameAppVersionRequest request) { return m => m.Platform == GameDimensionConst.PlatformDefault && m.Package == GameDimensionConst.PackageNameDefault && diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AssetPackageVersionFallbackMatcher.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AssetPackageVersionFallbackMatcher.cs index eb77e09f..5ca8ec6d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AssetPackageVersionFallbackMatcher.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/AssetPackageVersionFallbackMatcher.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Client.Api.GameAssetPackageVersion.Dto; using System.Linq.Expressions; @@ -9,15 +9,15 @@ namespace GameFrameX.Client.Api.Services.PackageVersion; /// 资源包版本 Fallback 匹配器实现 /// /// -/// 针对 TenantGameAppAssetPackageVersionEntity 实体的 Fallback 匹配实现,复用基类的 2 轮(原始包名 + 母包包名)与 6 级 Fallback 序列, +/// 针对 GameAppAssetPackageVersionEntity 实体的 Fallback 匹配实现,复用基类的 2 轮(原始包名 + 母包包名)与 6 级 Fallback 序列, /// -public class AssetPackageVersionFallbackMatcher : GameAppPackageFallbackMatcher +public class AssetPackageVersionFallbackMatcher : GameAppPackageFallbackMatcher { /// /// 初始化匹配器 /// public AssetPackageVersionFallbackMatcher( - Repository repository, + Repository repository, GameAppPackageResolver resolver) : base(repository, resolver) { @@ -26,7 +26,7 @@ public AssetPackageVersionFallbackMatcher( /// /// 构建完全匹配所有参数的查询条件 /// - protected override Expression> BuildExactPredicates(AssetPackageVersionRequest request) + protected override Expression> BuildExactPredicates(AssetPackageVersionRequest request) { return m => m.AssetPackageName == request.AssetPackageName && m.Platform == request.Platform && @@ -39,7 +39,7 @@ protected override Expression /// /// 构建使用默认语言的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultLanguage(AssetPackageVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultLanguage(AssetPackageVersionRequest request) { return m => m.AssetPackageName == request.AssetPackageName && m.Platform == request.Platform && @@ -52,7 +52,7 @@ protected override Expression /// /// 构建使用默认渠道的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultChannel(AssetPackageVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultChannel(AssetPackageVersionRequest request) { return m => m.AssetPackageName == request.AssetPackageName && m.Platform == request.Platform && @@ -65,7 +65,7 @@ protected override Expression /// /// 构建使用默认版本的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultVersion(AssetPackageVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultVersion(AssetPackageVersionRequest request) { return m => m.AssetPackageName == request.AssetPackageName && m.Platform == request.Platform && @@ -78,7 +78,7 @@ protected override Expression /// /// 构建使用默认包名的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultPackage(AssetPackageVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultPackage(AssetPackageVersionRequest request) { return m => m.AssetPackageName == request.AssetPackageName && m.Platform == request.Platform && @@ -91,7 +91,7 @@ protected override Expression /// /// 构建使用默认平台的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultPlatform(AssetPackageVersionRequest request) + protected override Expression> BuildPredicatesWithDefaultPlatform(AssetPackageVersionRequest request) { return m => m.AssetPackageName == request.AssetPackageName && m.Platform == GameDimensionConst.PlatformDefault && diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs index fdc215a1..71c07020 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using System.Collections.Concurrent; using GameFrameX.Entity.Enum; using SqlSugar; @@ -9,7 +9,7 @@ namespace GameFrameX.Client.Api.Services.PackageVersion; /// 包名解析服务:将子包包名解析为母包包名,供客户端 Fallback 匹配器与远程配置投放做第 2 轮母包回退。 /// /// -/// 运行时继承语义(与 对齐): +/// 运行时继承语义(与 对齐): /// /// :子包允许母包回退,参与子包名→母包名映射。 /// :子包自洽配置,不回退母包(Resolve 返回子包原名)。 @@ -23,9 +23,9 @@ public class GameAppPackageResolver private PackageCache? _cache; private readonly ISqlSugarClient _tenantDbProvider; - public GameAppPackageResolver(ISqlSugarClient tenantDbProvider) + public GameAppPackageResolver(ISqlSugarClient dbProvider) { - _tenantDbProvider = tenantDbProvider; + _tenantDbProvider = dbProvider; } /// @@ -77,7 +77,7 @@ private PackageCache RefreshCacheIfChanged() private static PackageCache RefreshCache(ISqlSugarClient db, PackageCacheSignal signal) { // 仅"继承"模式的启用子包才允许母包回退;Override/DisableAsync 与禁用子包不进入映射。 - var children = db.Queryable() + var children = db.Queryable() .Where(p => p.IsEnabled == true && p.IsDeleted == false) .Where(p => p.ParentPackageId != null) .Where(p => p.PlatformInheritanceMode == InheritanceModeEnum.Inherit) @@ -85,11 +85,11 @@ private static PackageCache RefreshCache(ISqlSugarClient db, PackageCacheSignal var masterIds = children.Select(p => p.ParentPackageId!.Value).Distinct().ToList(); var masters = masterIds.Count > 0 - ? db.Queryable() + ? db.Queryable() .Where(p => p.IsEnabled == true && p.IsDeleted == false) .In(masterIds) .ToList() - : new List(); + : new List(); var cache = new ConcurrentDictionary(); foreach (var pkg in children) @@ -110,7 +110,7 @@ private static PackageCache RefreshCache(ISqlSugarClient db, PackageCacheSignal /// private static PackageCacheSignal GetSignal(ISqlSugarClient db) { - var participantQuery = db.Queryable() + var participantQuery = db.Queryable() .Where(p => p.IsEnabled == true && p.IsDeleted == false) .Where(p => p.ParentPackageId != null || p.PackageKind == PackageKindEnum.Master); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/GamePayReceiptVerifier.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/GamePayReceiptVerifier.cs index 2be996d9..a2fea2ee 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/GamePayReceiptVerifier.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/GamePayReceiptVerifier.cs @@ -38,7 +38,7 @@ public GamePayReceiptVerifier(IPaymentChannelFactory paymentChannelFactory, IHtt /// 待验真订单 /// 验真请求 /// 验真结果三态 - public async Task VerifyAsync(TenantGameOrderEntity order, GameUserPayVerifyRequest request) + public async Task VerifyAsync(GameOrderEntity order, GameUserPayVerifyRequest request) { var channelName = MapChannelName(order.PayChannel); if (channelName.Length == 0) @@ -229,7 +229,7 @@ private static string FirstNonEmpty(string first, string second, string third) return third ?? string.Empty; } - private static string GetAccountId(TenantGameOrderEntity order) + private static string GetAccountId(GameOrderEntity order) { if (!string.IsNullOrWhiteSpace(order.AccountId)) { @@ -239,7 +239,7 @@ private static string GetAccountId(TenantGameOrderEntity order) return order.RoleId; } - private static string GetProductId(TenantGameOrderEntity order) + private static string GetProductId(GameOrderEntity order) { if (!string.IsNullOrWhiteSpace(order.ProductId)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/IPayReceiptVerifier.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/IPayReceiptVerifier.cs index 89f49d97..8f7c243c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/IPayReceiptVerifier.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PayVerification/IPayReceiptVerifier.cs @@ -15,5 +15,5 @@ public interface IPayReceiptVerifier /// 待验真订单(未到账状态) /// 验真请求(含渠道凭证) /// 验真结果三态(成功 / pending 可疑 / 拒绝) - Task VerifyAsync(TenantGameOrderEntity order, GameUserPayVerifyRequest request); + Task VerifyAsync(GameOrderEntity order, GameUserPayVerifyRequest request); } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs index 4eaa7ce2..f6da4671 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Client.Api.Services.PublicCallback; /// /// 公开回调通知地址构造器。 /// 管理员配置可能是:站点根地址(含反向代理前缀)、完整的新回调路由地址、或路由升级前遗留的 -/// 旧「回调/{tenantId}/{appId}/{packageId}」三段地址。本构造器统一规范化为能命中当前公开回调端点 +/// 旧「回调/{id}/{appId}/{packageId}」三段地址。本构造器统一规范化为能命中当前公开回调端点 /// ({packageId} 可选路由模板)的完整地址:路由段之后遗留的纯数字尾段(至多 3 段)一律剥除后 /// 按当前上下文重建,分包段以当前下单上下文的分包标识为准(无则生成不带分包段的主库地址)。 /// 无法识别的路径返回 null,由调用方在下单前拒绝,避免网关回调打在无法命中的地址上导致已付款订单不发货。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackRouteResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackRouteResolver.cs index 16c0fcde..27b8b178 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackRouteResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackRouteResolver.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using SqlSugar; namespace GameFrameX.Client.Api.Services.PublicCallback; @@ -58,7 +58,7 @@ public PublicCallbackRouteResolveResponse Resolve(HttpContext context) private bool PackageMatches(long packageId) { - return _db.Queryable() + return _db.Queryable() .Any(package => package.Id == packageId && package.IsEnabled == true); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigDeliveryService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigDeliveryService.cs index ab3f6c4f..83928fb8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigDeliveryService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigDeliveryService.cs @@ -1,6 +1,6 @@ using GameFrameX.Client.Api.Services.PackageVersion; using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; namespace GameFrameX.Client.Api.Services.RemoteConfig; @@ -9,7 +9,7 @@ namespace GameFrameX.Client.Api.Services.RemoteConfig; /// public sealed class RemoteConfigDeliveryService { - private readonly Repository _repository; + private readonly Repository _repository; private readonly GameAppPackageResolver _resolver; /// @@ -18,7 +18,7 @@ public sealed class RemoteConfigDeliveryService /// 远程配置仓储。 /// 母包解析器。 public RemoteConfigDeliveryService( - Repository repository, + Repository repository, GameAppPackageResolver resolver) { _repository = repository; @@ -30,7 +30,7 @@ public RemoteConfigDeliveryService( /// /// 远程配置投放请求。 /// 命中的远程配置记录;未命中时返回 null。 - public async Task MatchAsync(RemoteConfigDeliveryRequest request) + public async Task MatchAsync(RemoteConfigDeliveryRequest request) { var packageNames = BuildPackageCandidates(request.PackageName); var candidates = await _repository.AsQueryable() @@ -57,7 +57,7 @@ private string[] BuildPackageCandidates(string packageName) return values.Distinct(StringComparer.Ordinal).ToArray(); } - private static int CalculateScore(TenantGameAppRemoteConfigEntity item, RemoteConfigDeliveryRequest request, string[] packageNames) + private static int CalculateScore(GameAppRemoteConfigEntity item, RemoteConfigDeliveryRequest request, string[] packageNames) { var score = 0; if (item.Platform == request.Platform) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigFallbackMatcher.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigFallbackMatcher.cs index 3a805d94..90c47543 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigFallbackMatcher.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigFallbackMatcher.cs @@ -1,6 +1,6 @@ using GameFrameX.Client.Api.Services.PackageVersion; using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; using GameFrameX.Client.Api.RemoteConfig.Dto; using System.Linq.Expressions; @@ -10,16 +10,16 @@ namespace GameFrameX.Client.Api.Services.RemoteConfig; /// 远程配置 Fallback 匹配器实现 /// /// -/// 针对 TenantGameAppRemoteConfigEntity 实体的 Fallback 匹配实现。 -/// 注意:TenantGameAppRemoteConfigEntity 使用 AppVersion 字段存储应用版本(不是 OldVersion)。 +/// 针对 GameAppRemoteConfigEntity 实体的 Fallback 匹配实现。 +/// 注意:GameAppRemoteConfigEntity 使用 AppVersion 字段存储应用版本(不是 OldVersion)。 /// -public class RemoteConfigFallbackMatcher : GameAppPackageFallbackMatcher +public class RemoteConfigFallbackMatcher : GameAppPackageFallbackMatcher { /// /// 初始化匹配器 /// public RemoteConfigFallbackMatcher( - Repository repository, + Repository repository, GameAppPackageResolver resolver) : base(repository, resolver) { @@ -28,7 +28,7 @@ public RemoteConfigFallbackMatcher( /// /// 构建完全匹配所有参数的查询条件 /// - protected override Expression> BuildExactPredicates(RemoteConfigRequest request) + protected override Expression> BuildExactPredicates(RemoteConfigRequest request) { return m => m.Platform == request.Platform && m.Package == request.PackageName && @@ -40,7 +40,7 @@ protected override Expression> Build /// /// 构建使用默认语言的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultLanguage(RemoteConfigRequest request) + protected override Expression> BuildPredicatesWithDefaultLanguage(RemoteConfigRequest request) { return m => m.Platform == request.Platform && m.Package == request.PackageName && @@ -52,7 +52,7 @@ protected override Expression> Build /// /// 构建使用默认渠道(或请求渠道)的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultChannel(RemoteConfigRequest request) + protected override Expression> BuildPredicatesWithDefaultChannel(RemoteConfigRequest request) { // 注意:原始逻辑是 (m.Channel == GameDimensionConst.ChannelNameDefault || m.Channel == r.Channel) // 这意味着既匹配默认渠道,也匹配请求渠道 @@ -66,7 +66,7 @@ protected override Expression> Build /// /// 构建使用默认版本的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultVersion(RemoteConfigRequest request) + protected override Expression> BuildPredicatesWithDefaultVersion(RemoteConfigRequest request) { return m => m.Platform == request.Platform && m.Package == request.PackageName && @@ -78,7 +78,7 @@ protected override Expression> Build /// /// 构建使用默认包名的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultPackage(RemoteConfigRequest request) + protected override Expression> BuildPredicatesWithDefaultPackage(RemoteConfigRequest request) { return m => m.Platform == request.Platform && m.Package == GameDimensionConst.PackageNameDefault && @@ -90,7 +90,7 @@ protected override Expression> Build /// /// 构建使用默认平台的查询条件 /// - protected override Expression> BuildPredicatesWithDefaultPlatform(RemoteConfigRequest request) + protected override Expression> BuildPredicatesWithDefaultPlatform(RemoteConfigRequest request) { return m => m.Platform == GameDimensionConst.PlatformDefault && m.Package == GameDimensionConst.PackageNameDefault && diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigRolloutMatcher.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigRolloutMatcher.cs index 37a24723..b55eda58 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigRolloutMatcher.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigRolloutMatcher.cs @@ -1,5 +1,5 @@ using GameFrameX.Application.ClientDelivery.Rollout; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; namespace GameFrameX.Client.Api.Services.RemoteConfig; @@ -16,7 +16,7 @@ public static class RemoteConfigRolloutMatcher /// 候选远程配置记录。 /// 客户端稳定设备标识。 /// 命中返回 true,否则返回 false。 - public static bool IsMatch(TenantGameAppRemoteConfigEntity record, string? deviceId) + public static bool IsMatch(GameAppRemoteConfigEntity record, string? deviceId) { if (record.IsEnabled == false) { @@ -36,7 +36,7 @@ public static bool IsMatch(TenantGameAppRemoteConfigEntity record, string? devic /// 候选记录和作用域精确度。 /// 客户端稳定设备标识。 /// 命中的最高优先级记录;没有命中时返回 null。 - public static TenantGameAppRemoteConfigEntity? SelectWinner( + public static GameAppRemoteConfigEntity? SelectWinner( IEnumerable candidates, string? deviceId) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigScoredCandidate.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigScoredCandidate.cs index ca445da4..e465bcec 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigScoredCandidate.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/RemoteConfig/RemoteConfigScoredCandidate.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; namespace GameFrameX.Client.Api.Services.RemoteConfig; @@ -7,4 +7,4 @@ namespace GameFrameX.Client.Api.Services.RemoteConfig; /// /// 候选远程配置记录。 /// 作用域精确度分数。 -public sealed record RemoteConfigScoredCandidate(TenantGameAppRemoteConfigEntity Record, int Score); \ No newline at end of file +public sealed record RemoteConfigScoredCandidate(GameAppRemoteConfigEntity Record, int Score); \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/DatabaseOwnership.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/DatabaseOwnership.cs index c5876969..7923b526 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/DatabaseOwnership.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/DatabaseOwnership.cs @@ -3,6 +3,6 @@ namespace GameFrameX.Core.SqlSugar; public enum DatabaseOwnership { System, - Tenant, + Business, Global, } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/LauncherOptions.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/LauncherOptions.cs index 69d7d455..306a5ad3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/LauncherOptions.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/LauncherOptions.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Core.SqlSugar; /// /// Client / Game / Hub 三 host 共享的进程启动选项。 /// 本类只承载必须在数据库 Provider 初始化之前可用的进程级启动参数:数据库类型、数据库连接字符串、日志管道开关。 -/// 所有请求期业务配置(邮件、广告回调、沙箱、区域输出、Client API token、Game 登录票据策略等)已迁移到租户库,通过 IClientApiTenantOptionsProvider 按租户 / 应用读取,禁止回流到本类。 +/// 所有请求期业务配置(邮件、广告回调、沙箱、区域输出、Client API token、Game 登录票据策略等)已迁移到租户库,通过 IClientApiOptionsProvider 按租户 / 应用读取,禁止回流到本类。 /// public sealed class LauncherOptions { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs index 6f27fc9c..32b912ce 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs @@ -11,7 +11,7 @@ public static class SqlSugarEntityBoundary new Dictionary { [DatabaseOwnership.System] = "system_", - [DatabaseOwnership.Tenant] = "tenant_", + [DatabaseOwnership.Business] = "tenant_", [DatabaseOwnership.Global] = "global_", }; @@ -25,9 +25,9 @@ public static bool IsPlatformTable(Type entityType) return GetOwnership(entityType) == DatabaseOwnership.System; } - public static bool IsTenantTable(Type entityType) + public static bool IsBusinessTable(Type entityType) { - return GetOwnership(entityType) == DatabaseOwnership.Tenant; + return GetOwnership(entityType) == DatabaseOwnership.Business; } public static bool IsMainDatabaseTable(Type entityType) @@ -36,16 +36,16 @@ public static bool IsMainDatabaseTable(Type entityType) return true; } - public static bool RequiresTenantContext(Type entityType) + public static bool RequiresContext(Type entityType) { return false; } /// /// 实体归属完全由三类边界 Attribute 决定:(global_)、 - /// (system_)、(tenant_)。 - /// 外部 [Tenant] 视同 Tenant。未标注任一边界 Attribute 的受管持久化实体将抛出 。 - /// C156 起:日志不再使用独立日志库,平台日志归入 system_log_*(system_ 归属),租户日志归入 tenant_log_*(tenant_ 归属)。 + /// (system_)、(tenant_)。 + /// 外部 [Business] 视同 Business。未标注任一边界 Attribute 的受管持久化实体将抛出 。 + /// C156 起:日志不再使用独立日志库,平台日志归入 system_log_*(system_ 归属),租户日志归入 log_*(tenant_ 归属)。 /// public static DatabaseOwnership GetOwnership(Type entityType) { @@ -61,9 +61,9 @@ public static DatabaseOwnership GetOwnership(Type entityType) return DatabaseOwnership.System; } - if (entityType.IsDefined(typeof(TenantTableAttribute), false) || IsExternalSpecificTable(entityType)) + if (entityType.IsDefined(typeof(BusinessTableAttribute), false) || IsExternalSpecificTable(entityType)) { - return DatabaseOwnership.Tenant; + return DatabaseOwnership.Business; } throw new InvalidOperationException($"Entity {entityType.FullName} is not assigned to system_, tenant_, or global_ ownership."); @@ -90,7 +90,7 @@ public static bool IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership datab || tableName.StartsWith(Prefixes[DatabaseOwnership.Global], StringComparison.Ordinal), DatabaseOwnership.Global => tableName.StartsWith(Prefixes[DatabaseOwnership.System], StringComparison.Ordinal) || tableName.StartsWith(Prefixes[DatabaseOwnership.Global], StringComparison.Ordinal), - DatabaseOwnership.Tenant => tableName.StartsWith(Prefixes[DatabaseOwnership.Tenant], StringComparison.Ordinal), + DatabaseOwnership.Business => tableName.StartsWith(Prefixes[DatabaseOwnership.Business], StringComparison.Ordinal), _ => false, }; } @@ -99,7 +99,7 @@ public static bool HasBoundaryConflict(Type entityType) { var markerCount = 0; markerCount += entityType.IsDefined(typeof(PlatformTableAttribute), false) ? 1 : 0; - markerCount += entityType.IsDefined(typeof(TenantTableAttribute), false) ? 1 : 0; + markerCount += entityType.IsDefined(typeof(BusinessTableAttribute), false) ? 1 : 0; markerCount += entityType.IsDefined(typeof(GlobalTableAttribute), false) ? 1 : 0; return markerCount > 1; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs index bb092343..2588a9bb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs @@ -23,17 +23,17 @@ public void ChannelDefinition_IsCanonicalEntityName() Assert.Equal(ChannelScopeEnum.System, channel.Scope); Assert.Equal(ChannelTypeEnum.Official, channel.ChannelType); - var tenantChannel = new TenantChannelDefinitionEntity + var channel = new ChannelDefinitionEntity { - Code = "tenant-official", - Name = "Tenant Official", - Scope = ChannelScopeEnum.Tenant, + Code = "official", + Name = "Business Official", + Scope = ChannelScopeEnum.Business, ChannelType = ChannelTypeEnum.Custom, PlatformCode = "all", }; - Assert.Equal("tenant-official", tenantChannel.Code); - Assert.Equal(ChannelScopeEnum.Tenant, tenantChannel.Scope); + Assert.Equal("official", channel.Code); + Assert.Equal(ChannelScopeEnum.Business, channel.Scope); } [Fact] @@ -43,6 +43,6 @@ public void ChannelDefinition_ManagementServices_AreSplitByScope() Assert.NotNull(assembly.GetType("GameFrameX.Application.ClientDelivery.ChannelDefinition.GlobalChannelDefinitionService")); Assert.NotNull(assembly.GetType("GameFrameX.Application.ClientDelivery.ChannelDefinition.ChannelDefinitionService")); - Assert.Null(assembly.GetType("GameFrameX.Application.ClientDelivery.ChannelDefinition.TenantChannelDefinitionService")); + Assert.Null(assembly.GetType("GameFrameX.Application.ClientDelivery.ChannelDefinition.ChannelDefinitionService")); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/TenantGameAppOpenAccessEntityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppOpenAccessEntityTests.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/TenantGameAppOpenAccessEntityTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppOpenAccessEntityTests.cs index 9c94afa4..aaa33faf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/TenantGameAppOpenAccessEntityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppOpenAccessEntityTests.cs @@ -3,51 +3,51 @@ using GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess; using GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess.Dto; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Core.Tests.AppManagement; /// -/// 应用开放访问凭证(TenantGameAppOpenAccessEntity)纯单元测试。 +/// 应用开放访问凭证(GameAppOpenAccessEntity)纯单元测试。 /// 覆盖实体默认值、DTO 校验、Service 静态方法(GenerateAccessKey/Secret、EnsureValidScopes、NormalizeScopesJson)、 /// Output 脱敏与 SecretResult 契约。DB 逻辑(PageAsync/AddAsync/UpdateAsync 查库校验)由 .menu-test 浏览器验收覆盖。 /// -public class TenantGameAppOpenAccessEntityTests +public class GameAppOpenAccessEntityTests { [Fact] public void TenantGameAppOpenAccessEntity_Default_IsEnabledTrue() { - var entity = new TenantGameAppOpenAccessEntity(); + var entity = new GameAppOpenAccessEntity(); Assert.True(entity.IsEnabled); } [Fact] public void TenantGameAppOpenAccessEntity_DerivesPhysicalTableNameFromClassName() { - var physical = SqlSugarEntityBoundary.GetPhysicalTableName(typeof(TenantGameAppOpenAccessEntity), nameof(TenantGameAppOpenAccessEntity)); + var physical = SqlSugarEntityBoundary.GetPhysicalTableName(typeof(GameAppOpenAccessEntity), nameof(GameAppOpenAccessEntity)); - Assert.Equal("tenant_game_app_open_access_entity", physical); + Assert.Equal("game_app_open_access_entity", physical); } [Fact] public void AddTenantGameAppOpenAccessInput_Requires_AllMandatoryFields() { - var input = new AddTenantGameAppOpenAccessRequest(); + var input = new AddGameAppOpenAccessRequest(); var results = new List(); var isValid = Validator.TryValidateObject(input, new ValidationContext(input), results, true); Assert.False(isValid); - Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddTenantGameAppOpenAccessRequest.BindUserId))); - Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddTenantGameAppOpenAccessRequest.Scenario))); - Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddTenantGameAppOpenAccessRequest.Purpose))); - Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddTenantGameAppOpenAccessRequest.SubjectName))); - Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddTenantGameAppOpenAccessRequest.ScopesJson))); + Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddGameAppOpenAccessRequest.BindUserId))); + Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddGameAppOpenAccessRequest.Scenario))); + Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddGameAppOpenAccessRequest.Purpose))); + Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddGameAppOpenAccessRequest.SubjectName))); + Assert.Contains(results, r => r.MemberNames.Contains(nameof(AddGameAppOpenAccessRequest.ScopesJson))); } [Fact] public void AddTenantGameAppOpenAccessInput_AcceptsValidInput() { - var input = new AddTenantGameAppOpenAccessRequest + var input = new AddGameAppOpenAccessRequest { BindUserId = 200, Scenario = "ci", @@ -64,7 +64,7 @@ public void AddTenantGameAppOpenAccessInput_AcceptsValidInput() [Fact] public void AddTenantGameAppOpenAccessInput_AcceptsWithoutApplication() { - var input = new AddTenantGameAppOpenAccessRequest + var input = new AddGameAppOpenAccessRequest { BindUserId = 1, Scenario = "ci", @@ -81,13 +81,13 @@ public void AddTenantGameAppOpenAccessInput_AcceptsWithoutApplication() [Fact] public void UpdateTenantGameAppOpenAccessInput_RequiresUserAndScopes() { - var input = new UpdateTenantGameAppOpenAccessRequest(); + var input = new UpdateGameAppOpenAccessRequest(); var results = new List(); var isValid = Validator.TryValidateObject(input, new ValidationContext(input), results, true); Assert.False(isValid); - Assert.Contains(results, r => r.MemberNames.Contains(nameof(UpdateTenantGameAppOpenAccessRequest.BindUserId))); - Assert.Contains(results, r => r.MemberNames.Contains(nameof(UpdateTenantGameAppOpenAccessRequest.ScopesJson))); + Assert.Contains(results, r => r.MemberNames.Contains(nameof(UpdateGameAppOpenAccessRequest.BindUserId))); + Assert.Contains(results, r => r.MemberNames.Contains(nameof(UpdateGameAppOpenAccessRequest.ScopesJson))); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppPackageTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppPackageTests.cs index 636f0b29..5f41ecd5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppPackageTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppPackageTests.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using System.ComponentModel.DataAnnotations; using GameFrameX.Application.ClientDelivery.GameAppPackage.Dto; using GameFrameX.Application.ClientDelivery.GameAppPackage; @@ -15,7 +15,7 @@ public class GameAppPackageTests [Fact] public void GameAppPackage_Defaults_AreEnabledAndNotDefault() { - var package = new TenantGameAppPackageEntity(); + var package = new GameAppPackageEntity(); Assert.True(package.IsEnabled); Assert.False(package.IsDefault); @@ -38,7 +38,7 @@ public void GameAppPackageService_ExposesStandardSelectApi() [Fact] public void GameAppPackage_CapturesDistributionIdentity() { - var package = new TenantGameAppPackageEntity + var package = new GameAppPackageEntity { Name = "iOS Global", PackageName = "com.demo.game", @@ -94,7 +94,7 @@ public void AddGameAppPackageInput_RequiresChannelIdEvenWhenChannelCodeProvided( public void ChannelEnums_UseStableMigrationValues() { Assert.Equal(1, (int)ChannelScopeEnum.System); - Assert.Equal(2, (int)ChannelScopeEnum.Tenant); + Assert.Equal(2, (int)ChannelScopeEnum.Business); Assert.Equal(1, (int)ChannelTypeEnum.Official); Assert.Equal(2, (int)ChannelTypeEnum.Store); Assert.Equal(3, (int)ChannelTypeEnum.Ad); @@ -115,7 +115,7 @@ public void PackageInheritanceEnums_UseStableMigrationValues() [Fact] public void GameAppPackage_CapturesParentPackageInheritance() { - var package = new TenantGameAppPackageEntity + var package = new GameAppPackageEntity { ParentPackageId = 123, PackageKind = PackageKindEnum.Derived, @@ -159,8 +159,8 @@ public void EnsurePackageKindConsistency_NormalOrMasterWithoutParent_Accepts() public void NormalizePackageKind_WithParent_ForcesDerived() { // 指定母包即视为子包,Master/Normal 自动纠正为 Derived。 - var masterDeclared = new TenantGameAppPackageEntity { ParentPackageId = 9201, PackageKind = PackageKindEnum.Master, }; - var normalDeclared = new TenantGameAppPackageEntity { ParentPackageId = 9201, PackageKind = PackageKindEnum.Normal, }; + var masterDeclared = new GameAppPackageEntity { ParentPackageId = 9201, PackageKind = PackageKindEnum.Master, }; + var normalDeclared = new GameAppPackageEntity { ParentPackageId = 9201, PackageKind = PackageKindEnum.Normal, }; GameAppPackageService.NormalizePackageKind(masterDeclared); GameAppPackageService.NormalizePackageKind(normalDeclared); @@ -172,8 +172,8 @@ public void NormalizePackageKind_WithParent_ForcesDerived() [Fact] public void NormalizePackageKind_WithoutParent_PreservesDeclaredKind() { - var master = new TenantGameAppPackageEntity { ParentPackageId = null, PackageKind = PackageKindEnum.Master, }; - var normal = new TenantGameAppPackageEntity { ParentPackageId = null, PackageKind = PackageKindEnum.Normal, }; + var master = new GameAppPackageEntity { ParentPackageId = null, PackageKind = PackageKindEnum.Master, }; + var normal = new GameAppPackageEntity { ParentPackageId = null, PackageKind = PackageKindEnum.Normal, }; GameAppPackageService.NormalizePackageKind(master); GameAppPackageService.NormalizePackageKind(normal); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabaseOpenAccessServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabaseOpenAccessServiceTests.cs index 8a4c99ca..e1b448f9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabaseOpenAccessServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabaseOpenAccessServiceTests.cs @@ -2,8 +2,8 @@ using GameFrameX.Application.Platform.OpenAccess.GameAppOpenAccess; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Core.Tests.AppManagement; @@ -26,17 +26,17 @@ public async Task CredentialLifecycle_RequiresRealUserAndKeepsRevocationFinal() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameAppOpenAccessEntity), typeof(TenantUserEntity)); - var user = new TenantUserEntity { Id = 100 }; - foreach (var property in typeof(TenantUserEntity).GetProperties().Where(x => x.PropertyType == typeof(string) && x.CanWrite)) + database.InitBusinessTables(typeof(GameAppOpenAccessEntity), typeof(UserEntity)); + var user = new UserEntity { Id = 100 }; + foreach (var property in typeof(UserEntity).GetProperties().Where(x => x.PropertyType == typeof(string) && x.CanWrite)) { property.SetValue(user, "test"); } database.MainDb.Insertable(user).ExecuteCommand(); - var repository = new SqlSugarRepository { Context = database.MainDb }; + var repository = new SqlSugarRepository { Context = database.MainDb }; var service = new GameAppOpenAccessService(repository, - new SqlSugarRepository { Context = database.MainDb }); + new SqlSugarRepository { Context = database.MainDb }); await Assert.ThrowsAnyAsync(() => service.AddAsync(new() { BindUserId = 404, Scenario = "build", Purpose = "test", SubjectName = "builder", ScopesJson = "[\"package-report\"]", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabasePackageServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabasePackageServiceTests.cs index 90e817c0..7035746e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabasePackageServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/MainDatabasePackageServiceTests.cs @@ -6,7 +6,7 @@ using GameFrameX.Entity.Enum; using GameFrameX.Entity.Global; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Core.Tests.AppManagement; @@ -20,8 +20,8 @@ public async Task Create_DefaultAndInheritance_UseMainDatabaseRules() var service = CreateService(database); var first = await service.AddAsync(Input("first", isDefault: true)); var second = await service.AddAsync(Input("second", isDefault: true)); - Assert.False((await database.MainDb.Queryable().InSingleAsync(first.Id)).IsDefault); - Assert.True((await database.MainDb.Queryable().InSingleAsync(second.Id)).IsDefault); + Assert.False((await database.MainDb.Queryable().InSingleAsync(first.Id)).IsDefault); + Assert.True((await database.MainDb.Queryable().InSingleAsync(second.Id)).IsDefault); var childInput = Input("child"); childInput.ParentPackageId = first.Id; var child = await service.AddAsync(childInput); @@ -61,8 +61,8 @@ private static AddGameAppPackageRequest Input(string name, bool isDefault = fals private static GameAppPackageService CreateService(ClientApiTestDb database) { - database.InitTenantTables(typeof(TenantGameAppPackageEntity), typeof(GlobalPlatformEntity), - typeof(GlobalChannelDefinitionEntity), typeof(TenantChannelDefinitionEntity)); + database.InitBusinessTables(typeof(GameAppPackageEntity), typeof(GlobalPlatformEntity), + typeof(GlobalChannelDefinitionEntity), typeof(ChannelDefinitionEntity)); database.MainDb.Insertable(new GlobalPlatformEntity { Id = 1, Name = "android", Description = "Android", IsEnabled = true, IsDeleted = false, @@ -73,9 +73,9 @@ private static GameAppPackageService CreateService(ClientApiTestDb database) IsEnabled = true, IsDeleted = false, }).ExecuteCommand(); return new GameAppPackageService( - new SqlSugarRepository { Context = database.MainDb }, + new SqlSugarRepository { Context = database.MainDb }, new SqlSugarRepository { Context = database.MainDb }, new SqlSugarRepository { Context = database.MainDb }, - new SqlSugarRepository { Context = database.MainDb }); + new SqlSugarRepository { Context = database.MainDb }); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/AssetPackageScopeValidatorTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/AssetPackageScopeValidatorTests.cs index 171924e1..dc93c261 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/AssetPackageScopeValidatorTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/AssetPackageScopeValidatorTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Application.ClientDelivery.AppScope; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.Resource; +using GameFrameX.Entity.Business.Game.Resource; using SqlSugar; namespace GameFrameX.Core.Tests.AppScope; @@ -23,7 +23,7 @@ public AssetPackageScopeValidatorTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppAssetPackageEntity)); + _db.CodeFirst.InitTables(typeof(GameAppAssetPackageEntity)); } /// @@ -66,9 +66,9 @@ public async Task MissingAssetPackageName_Throws(string? assetPackageName) AssetPackageScopeValidator.ValidateAsync(assetPackageName, Query()).GetAwaiter().GetResult()); } - private ISugarQueryable Query() + private ISugarQueryable Query() { - return _db.Queryable(); + return _db.Queryable(); } private async Task SeedAsync() @@ -79,9 +79,9 @@ private async Task SeedAsync() await _db.Insertable(BuildAssetPackage(2, 200, "patch", now)).ExecuteCommandAsync(); } - private static TenantGameAppAssetPackageEntity BuildAssetPackage(long id, long gameAppId, string name, long now) + private static GameAppAssetPackageEntity BuildAssetPackage(long id, long gameAppId, string name, long now) { - return new TenantGameAppAssetPackageEntity + return new GameAppAssetPackageEntity { Id = id, Name = name, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/PackageScopeValidatorTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/PackageScopeValidatorTests.cs index 8e488601..258c356d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/PackageScopeValidatorTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppScope/PackageScopeValidatorTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Application.ClientDelivery.AppScope; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using SqlSugar; namespace GameFrameX.Core.Tests.AppScope; @@ -33,7 +33,7 @@ public PackageScopeValidatorTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity)); + _db.CodeFirst.InitTables(typeof(GameAppPackageEntity)); } /// @@ -104,9 +104,9 @@ public async Task SpecificPackage_NotExisting_Throws() - private ISugarQueryable Query() + private ISugarQueryable Query() { - return _db.Queryable(); + return _db.Queryable(); } private async Task SeedAsync() @@ -118,9 +118,9 @@ private async Task SeedAsync() await _db.Insertable(BuildPackage(3, 200, "com.app.c", true, now)).ExecuteCommandAsync(); } - private static TenantGameAppPackageEntity BuildPackage(long id, long gameAppId, string packageName, bool isEnabled, long now) + private static GameAppPackageEntity BuildPackage(long id, long gameAppId, string packageName, bool isEnabled, long now) { - return new TenantGameAppPackageEntity + return new GameAppPackageEntity { Id = id, PackageName = packageName, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminActionStyleContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminActionStyleContractTests.cs index bbb4f02d..92792aa9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminActionStyleContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminActionStyleContractTests.cs @@ -57,7 +57,7 @@ public sealed class AdminActionStyleContractTests "SystemOpenAccessService", "AdvertisementCallbackConfigService", "ChannelDefinitionService", - "TenantFileService", + "FileService", "GameAppOpenAccessService", "GameAreaService", "GameMailService", @@ -69,8 +69,8 @@ public sealed class AdminActionStyleContractTests "GameUserService", "GameWebShopOrderService", "ObjectStorageConfigService", - "TenantRoleService", - "TenantUserService", + "RoleService", + "UserService", }; // ============ S2 绝对路径模板:TypeName.MethodName 粒度 ============ @@ -202,13 +202,13 @@ public sealed class AdminActionStyleContractTests { "GameFrameX.Application/ClientDelivery/GameAppVersionDefinition/GameAppVersionDefinitionService.cs", 2 }, { "GameFrameX.Application/ClientDelivery/GameAppRemoteConfig/GameAppRemoteConfigService.cs", 5 }, { "GameFrameX.Application/ClientDelivery/GameAppServerConfig/GameAppServerConfigService.cs", 3 }, - { "GameFrameX.Core/Service/Role/TenantRoleService.cs", 1 }, - { "GameFrameX.Core/Service/File/TenantFileService.cs", 7 }, + { "GameFrameX.Core/Service/Role/RoleService.cs", 1 }, + { "GameFrameX.Core/Service/File/FileService.cs", 7 }, { "GameFrameX.Core/Service/Config/SystemConfigService.cs", 1 }, { "GameFrameX.Core/Service/PlatformCaptcha/PlatformCaptchaConfigProvider.cs", 18 }, { "GameFrameX.Core/Service/PlatformCaptcha/PlatformCaptchaConfigService.cs", 2 }, { "GameFrameX.Core/Service/Auth/SystemAuthService.cs", 5 }, - { "GameFrameX.Core/Service/User/TenantUserService.cs", 1 }, + { "GameFrameX.Core/Service/User/UserService.cs", 1 }, { "GameFrameX.Core/Service/PlatformLogging/PlatformLoggingConfigProvider.cs", 9 }, { "GameFrameX.Core/Service/PlatformLogging/PlatformLoggingConfigService.cs", 2 }, { "GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigProvider.cs", 6 }, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt index 2c10e660..afe73300 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt @@ -211,7 +211,7 @@ GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseR GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/delete|POST GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/detail|GET GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/page|POST -GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/tenantGameAreaEntityAreaIdDropdown|GET +GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/gameAreaEntityAreaIdDropdown|GET GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/update|POST GameFrameX.Application.CommerceCenter.GameWebShop.GameWebShopService|api/gameWebShop/add|POST GameFrameX.Application.CommerceCenter.GameWebShop.GameWebShopService|api/gameWebShop/delete|POST @@ -497,15 +497,15 @@ GameFrameX.Core.Service.Config.SystemConfigService|api/systemConfig/groupList|GE GameFrameX.Core.Service.Config.SystemConfigService|api/systemConfig/list|GET GameFrameX.Core.Service.Config.SystemConfigService|api/systemConfig/page|POST GameFrameX.Core.Service.Config.SystemConfigService|api/systemConfig/update|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/delete|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/downloadFile|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/page|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/update|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/uploadAvatar|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/uploadFileFromBase64|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/uploadFiles|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/uploadFile|POST -GameFrameX.Core.Service.File.TenantFileService|api/tenantFile/uploadSignature|POST +GameFrameX.Core.Service.File.FileService|api/file/delete|POST +GameFrameX.Core.Service.File.FileService|api/file/downloadFile|POST +GameFrameX.Core.Service.File.FileService|api/file/page|POST +GameFrameX.Core.Service.File.FileService|api/file/update|POST +GameFrameX.Core.Service.File.FileService|api/file/uploadAvatar|POST +GameFrameX.Core.Service.File.FileService|api/file/uploadFileFromBase64|POST +GameFrameX.Core.Service.File.FileService|api/file/uploadFiles|POST +GameFrameX.Core.Service.File.FileService|api/file/uploadFile|POST +GameFrameX.Core.Service.File.FileService|api/file/uploadSignature|POST GameFrameX.Core.Service.Menu.GlobalMenuService|api/globalMenu/add|POST GameFrameX.Core.Service.Menu.GlobalMenuService|api/globalMenu/delete|POST GameFrameX.Core.Service.Menu.GlobalMenuService|api/globalMenu/endpointPermissionMapAsync|GET @@ -529,22 +529,22 @@ GameFrameX.Core.Service.PlatformPasswordPolicy.PlatformPasswordPolicyConfigServi GameFrameX.Core.Service.PlatformPasswordPolicy.PlatformPasswordPolicyConfigService|api/platformPasswordPolicyConfig/update|POST GameFrameX.Core.Service.PlatformRateLimit.PlatformRateLimitConfigService|api/platformRateLimitConfig/detail|POST GameFrameX.Core.Service.PlatformRateLimit.PlatformRateLimitConfigService|api/platformRateLimitConfig/update|POST -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/add|POST -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/delete|POST -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/grantMenu|POST -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/list|GET -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/ownMenuList|GET -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/page|POST -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/setStatus|POST -GameFrameX.Core.Service.Role.TenantRoleService|api/tenantRole/update|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/add|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/baseInfo|GET -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/baseInfo|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/changePwd|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/delete|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/grantRole|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/ownRoleList/{userId}|GET -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/page|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/resetPwd|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/setStatus|POST -GameFrameX.Core.Service.User.TenantUserService|api/tenantUser/update|POST +GameFrameX.Core.Service.Role.RoleService|api/role/add|POST +GameFrameX.Core.Service.Role.RoleService|api/role/delete|POST +GameFrameX.Core.Service.Role.RoleService|api/role/grantMenu|POST +GameFrameX.Core.Service.Role.RoleService|api/role/list|GET +GameFrameX.Core.Service.Role.RoleService|api/role/ownMenuList|GET +GameFrameX.Core.Service.Role.RoleService|api/role/page|POST +GameFrameX.Core.Service.Role.RoleService|api/role/setStatus|POST +GameFrameX.Core.Service.Role.RoleService|api/role/update|POST +GameFrameX.Core.Service.User.UserService|api/user/add|POST +GameFrameX.Core.Service.User.UserService|api/user/baseInfo|GET +GameFrameX.Core.Service.User.UserService|api/user/baseInfo|POST +GameFrameX.Core.Service.User.UserService|api/user/changePwd|POST +GameFrameX.Core.Service.User.UserService|api/user/delete|POST +GameFrameX.Core.Service.User.UserService|api/user/grantRole|POST +GameFrameX.Core.Service.User.UserService|api/user/ownRoleList/{userId}|GET +GameFrameX.Core.Service.User.UserService|api/user/page|POST +GameFrameX.Core.Service.User.UserService|api/user/resetPwd|POST +GameFrameX.Core.Service.User.UserService|api/user/setStatus|POST +GameFrameX.Core.Service.User.UserService|api/user/update|POST diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs index 59fa45f2..65ea7fe4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs @@ -16,7 +16,7 @@ namespace GameFrameX.Core.Tests.Architecture; // 单 Request DTO(类型名以 Request/Input 结尾;泛型取泛型定义名,如 DataExportRequest) // 违规形状 —— 参数 ≥ 2(散参数 / body+query 混合绑定); // 入参为 object/dynamic/ExpandoObject/IDynamicMetaObjectProvider(动态参数零容忍); -// 入参为 *Entity(Entity 直传:TenantId/IsDeleted 等系统字段进入请求契约构成越权攻击面,C228 入参侧对偶) +// 入参为 *Entity(Entity 直传:Id/IsDeleted 等系统字段进入请求契约构成越权攻击面,C228 入参侧对偶) // 扫描范围:三程序集(Application.Platform / Application.Platform / Core.Service)全部 concrete IAdminApiController 实现, // 方法枚举含继承链(覆盖 GenericCrudService<,,,,> 泛型族基类 action 的实例化入参), // 过滤 [NonAction] / IsSpecialName / object 声明;违规按声明类名归因(泛型取泛型定义名)。 @@ -30,11 +30,11 @@ public sealed class AdminEndpointParameterShapeContractTests // 裸 List 入参(批量删除参数配置;整改须收敛 BatchDeleteConfigRequest 并同步前端) "SystemConfigService.BatchDeleteConfigAsync", // 文件 + query 元数据混合绑定(文件上传特例;整改需配套前端 multipart 适配) - "TenantFileService.UploadFileAsync", + "FileService.UploadFileAsync", // 3 散参(message/title/isHtml,平台系统邮件发送) "SystemMessageService.SendEmailAsync", - // Entity 直传入参(TenantUserEntity,与 GFX-770 已整改的 TenantWechatUser 同性质越权攻击面) - "TenantUserService.UpdateBaseInfoAsync", + // Entity 直传入参(UserEntity,与 GFX-770 已整改的 WechatUser 同性质越权攻击面) + "UserService.UpdateBaseInfoAsync", }; [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointReturnContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointReturnContractTests.cs index 0b231811..aba2a570 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointReturnContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointReturnContractTests.cs @@ -44,7 +44,7 @@ public sealed class AdminEndpointReturnContractTests "GameFrameX.Application.Platform.Email.Dto.SystemEmailProviderResponse.Password", "GameFrameX.Application.Platform.Email.Dto.SystemEmailProviderResponse.SecretId", "GameFrameX.Application.Platform.Email.Dto.SystemEmailProviderResponse.SecretKey", - // TenantClientApiConfigMaskHelper / 动态脱敏输出 ******(各 Config Service) + // ClientApiConfigMaskHelper / 动态脱敏输出 ******(各 Config Service) "GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto.AdvertisementCallbackConfigResponse.SigningSecret", "GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto.AdvertisementCallbackConfigResponse.VerificationKeys", "GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto.ClientApiPolicyResponse.SigningKey", @@ -62,10 +62,10 @@ public sealed class AdminEndpointReturnContractTests "GameFrameX.Core.Service.User.Dto.ResetPwdResponse.NewPassword", "GameFrameX.Application.Platform.OpenAccess.Dto.SecretCreateResponse.Secret", // Client host(C227 批次 2 之前暂豁免):游戏用户令牌 / Google OAuth 交换令牌为端点业务载荷本身 - "GameFrameX.Client.Api.GameUser.Dto.GetTenantGameUserEntityResponse.AccessToken", + "GameFrameX.Client.Api.GameUser.Dto.GetGameUserEntityResponse.AccessToken", "GameFrameX.Client.Api.GameUser.Dto.GoogleAuthExchangeResponse.AccessToken", // C237 后缀统一后 Client host Response 进入本扫描集:登录类响应一次性回显的会话密钥(AES-256-GCM 信封对称密钥,仅登录非空,其余响应恒 null) - "GameFrameX.Client.Api.GameUser.Dto.GetTenantGameUserEntityResponse.SessionKeySecret", + "GameFrameX.Client.Api.GameUser.Dto.GetGameUserEntityResponse.SessionKeySecret", // C290 后缀统一(Result→Response)进入本扫描集:登录期 per-session 会话密钥签发响应,Secret 仅签发一次性回显(ClientApiSessionKeyIssuer) "GameFrameX.Client.Api.Services.Auth.ClientApiSessionKeyIssueResponse.Secret", // 密码策略配置:正则/文案/开关名命中 password,值为策略配置而非密码(PlatformPasswordPolicyService) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ConnectionStringLogGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ConnectionStringLogGuardTests.cs index 6f605ef6..53517c81 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ConnectionStringLogGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ConnectionStringLogGuardTests.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Core.Tests.Architecture; // C317(GFX-726):连接串日志泄漏守护。 -// change:gfx-doc/dev/tenant/changes/C317-gfx-726-tenant-db-isolation-hardening/change.md +// change:gfx-doc/dev/changes/C317-gfx-726-db-isolation-hardening/change.md // SqlSugarClientConfig 曾把含密码的主库连接配置 JsonSerializer.Serialize 后 Console.WriteLine 进日志, // 本守护防止同类回潮:SqlSugarClientConfig.cs 不得出现任何控制台打印与连接配置序列化。 public sealed class ConnectionStringLogGuardTests diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/TenantCredentialWritePathGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/CredentialWritePathGuardTests.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/TenantCredentialWritePathGuardTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/CredentialWritePathGuardTests.cs index c95a1a77..9beaf020 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/TenantCredentialWritePathGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/CredentialWritePathGuardTests.cs @@ -1,10 +1,10 @@ namespace GameFrameX.Core.Tests.Architecture; -// C371(GFX-838)T7:保留租户凭证写入路径源码级守护(10 条规则,9 个源文件)——每个落库写入点必须出现 TenantSecretCrypto.Encrypt +// C371(GFX-838)T7:保留租户凭证写入路径源码级守护(10 条规则,9 个源文件)——每个落库写入点必须出现 SecretCrypto.Encrypt // (密钥环类)或 *ConfigCrypto.EncryptConfigJson(JSON 字段级类)收口调用。 -// change:gfx-doc/dev/game-business/changes/C371-tenant-credential-encryption-application/change.md +// change:gfx-doc/dev/game-business/changes/C371-credential-encryption-application/change.md // 新增凭证实体 / 新增写入方法时若绕过收口,本测试失败,防止明文落库回潮。 -public sealed class TenantCredentialWritePathGuardTests +public sealed class CredentialWritePathGuardTests { /// /// 源文件相对路径 → 必须包含的收口标记(出现次数下限 = 写入点数)。 @@ -12,17 +12,17 @@ public sealed class TenantCredentialWritePathGuardTests private static readonly (string File, string Marker, int MinOccurrences)[] GuardedWritePaths = { // 密钥环 / 凭证列直加密(Application.Platform) - ("GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/AppSignatureKeyService.cs", "TenantSecretCrypto.Encrypt", 2), - ("GameFrameX.Application/ClientDelivery/Security/SessionKey/SessionKeyService.cs", "TenantSecretCrypto.Encrypt", 2), - ("GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/GameLoginTicketKeyService.cs", "TenantSecretCrypto.Encrypt", 1), - ("GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs", "TenantSecretCrypto.Encrypt", 2), - ("GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/GameAppOpenAccessService.cs", "TenantSecretCrypto.Encrypt", 2), - ("GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs", "TenantSecretCrypto.Encrypt", 4), + ("GameFrameX.Application/ClientDelivery/Security/AppSignatureKey/AppSignatureKeyService.cs", "SecretCrypto.Encrypt", 2), + ("GameFrameX.Application/ClientDelivery/Security/SessionKey/SessionKeyService.cs", "SecretCrypto.Encrypt", 2), + ("GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/GameLoginTicketKeyService.cs", "SecretCrypto.Encrypt", 1), + ("GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs", "SecretCrypto.Encrypt", 2), + ("GameFrameX.Application/Platform/OpenAccess/GameAppOpenAccess/GameAppOpenAccessService.cs", "SecretCrypto.Encrypt", 2), + ("GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs", "SecretCrypto.Encrypt", 4), ("GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs", "AdvertisementCallbackConfigCrypto.EncryptConfigJson", 2), ("GameFrameX.Application/ClientDelivery/GamePaymentConfig/GamePaymentConfigService.cs", "PaymentConfigCrypto.EncryptConfigJson", 2), // 运行时签发路径(Client.Api) - ("GameFrameX.Client.Api/Services/Auth/ClientApiSessionKeyIssuer.cs", "TenantSecretCrypto.Encrypt", 1), - ("GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs", "TenantSecretCrypto.Encrypt", 1), + ("GameFrameX.Client.Api/Services/Auth/ClientApiSessionKeyIssuer.cs", "SecretCrypto.Encrypt", 1), + ("GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs", "SecretCrypto.Encrypt", 1), }; [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/DockerfileCsprojContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/DockerfileCsprojContractTests.cs index 3ae3b0de..2c693115 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/DockerfileCsprojContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/DockerfileCsprojContractTests.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Core.Tests.Architecture; // 清单必须与对应 host 的 ProjectReference 传递闭包完全一致,否则: // - 清单缺项(新增项目未同步)→ dotnet restore 找不到引用目标,构建失败; // - 清单多项(项目已删除/合并未同步)→ COPY 不存在的文件,构建直接报错。 -// 2026-08-22 曾因 Application 重组(Application.Client/Tenant/Core.Enum 归位删除、Advertisement 引入) +// 2026-08-22 曾因 Application 重组(Application.Client/Business/Core.Enum 归位删除、Advertisement 引入) // 三清单集体漂移,下一次 main push 构建必挂,由本测试族防止回潮。 public sealed class DockerfileCsprojContractTests { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/FileNameTypeNameAlignmentTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/FileNameTypeNameAlignmentTests.cs index fa460cfe..fb2e2969 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/FileNameTypeNameAlignmentTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/FileNameTypeNameAlignmentTests.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Core.Tests.Architecture; // C285(GFX-694):文件名 = 主类型名守护测试。全仓 .cs 文件的主(首个)类型名必须等于文件基名。 -// 背景:Application.Platform 服务类统一加 Tenant 前缀重构后文件未同步 git mv(C210 等),2026-08-22 命名审查盘点 36 处不一致,本测试防回潮。 +// 背景:Application.Platform 服务类统一加 Business 前缀重构后文件未同步 git mv(C210 等),2026-08-22 命名审查盘点 36 处不一致,本测试防回潮。 // 豁免三类既有约定(豁免规则本身即规范,无静态例外清单,双向断言:新增违规失败): // E1 partial 分片 TypeName.Suffix.cs——文件声明同名 partial 类型(如 GlobalMenuSeedData.*.cs、GameOrderController.*.cs、GooglePlayApiManager.UploadSku.cs); // E2 泛型 OfT 后缀——文件名 TypeNameOfT.cs 声明泛型 TypeName(IBaseRequestOfT / IConfigurableOptionsOfT / BaseControllerOfT 3 处); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationBaseline.baseline.txt b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationBaseline.baseline.txt index ed82023a..581e1706 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationBaseline.baseline.txt +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationBaseline.baseline.txt @@ -9,7 +9,7 @@ # (第三方契约例外已由 GFX-698(C292)登记)+ Payment.Abstract IOrderParamsGet*(支付 SDK 抽象接口)+ ServerParams # (游戏区服参数,wire 字段联动)+ 散点(TemplateParamJson/CheckMenuParam/RequestParam/LogFieldSerialization) # -> 待 Param 清理批次(外部契约面逐项评估改名成本)。 -# -> 2026-09-17 广告域命名批次已执行:账本实体/管理面 Service+DTO/表列已全拼 Advertisement(tenant_game_advertisement_reward_entity),剩余为第三方 wire 镜像与枚举值专项。 +# -> 2026-09-17 广告域命名批次已执行:账本实体/管理面 Service+DTO/表列已全拼 Advertisement(game_advertisement_reward_entity),剩余为第三方 wire 镜像与枚举值专项。 # - Msg:LogMsg/PasswordStrengthValidationMsg 散点 -> 散点批次。 # - Btn:已清零(GFX-711(C307)路由层 + GlobalMenuService 方法 3 个与 MenuTypeEnum.Btn 枚举成员随 Org 批次清理),无条目。 # - Img:CaptchaResponse.Img(验证码图片字段,Admin wire 联动评估)-> 散点批次。 @@ -48,7 +48,7 @@ GameFrameX.Client.Api|GameFrameX.Client.Api.GameUserArchive.Dto.GameUserArchiveU GameFrameX.Client.Api|GameFrameX.Client.Api.GameUserSession.Dto.GameUserSessionLoginRequest|Property|AdGroup # Ad GameFrameX.Client.Api|GameFrameX.Client.Api.GameUserSession.Dto.GameUserSessionLoginRequest|Property|AdGroupId # Ad GameFrameX.Client.Api|GameFrameX.Client.Api.GameUserSession.Dto.GameUserSessionLoginRequest|Property|AdId # Ad -GameFrameX.Client.Api|GameFrameX.Client.Api.GameWebShop.Dto.TenantGameWebShopEntityBuyNotifyRequest|Property|Param # Param +GameFrameX.Client.Api|GameFrameX.Client.Api.GameWebShop.Dto.GameWebShopEntityBuyNotifyRequest|Property|Param # Param GameFrameX.Client.Api|GameFrameX.Client.Api.Integrations.Advertisement.Dto.AdMobCallbackRequest|Property|AdNetwork # Ad GameFrameX.Client.Api|GameFrameX.Client.Api.Integrations.Advertisement.Dto.AdMobCallbackRequest|Property|AdUnit # Ad GameFrameX.Client.Api|GameFrameX.Client.Api.Integrations.Advertisement.GameAdWebHookController+PlayerSendAdvertisementItemRequest|Property|AdPackageId # Ad @@ -66,7 +66,7 @@ GameFrameX.Core|GameFrameX.Core.Service.PlatformPasswordPolicy.PlatformPasswordP GameFrameX.Core|GameFrameX.Core.Service.PlatformPasswordPolicy.PlatformPasswordPolicySettings|Property|PasswordStrengthValidationMsg # Msg GameFrameX.Entity|GameFrameX.Entity.Enum.ChannelTypeEnum|Field|Ad # Ad GameFrameX.Entity|GameFrameX.Entity.Log.LogOperationFields|Property|RequestParam # Param -GameFrameX.Entity|GameFrameX.Entity.Tenant.Game.TenantGameAreaEntity|Property|ServerParams # Params +GameFrameX.Entity|GameFrameX.Entity.Business.Game.GameAreaEntity|Property|ServerParams # Params GameFrameX.Payment.Abstract|GameFrameX.Payment.Abstract.IOrderParamsGetList|Type|IOrderParamsGetList # Params GameFrameX.Payment.Abstract|GameFrameX.Payment.Abstract.IOrderParamsGet|Type|IOrderParamsGet # Params GameFrameX.Payment.Xsolla|GameFrameX.Payment.Xsolla.Models.OrderParamsGetList|Type|OrderParamsGetList # Params diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationGuardTests.cs index 0a6cb780..eb219a64 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/NamingAbbreviationGuardTests.cs @@ -108,7 +108,7 @@ public void Tokenizer_DetectsDemoProhibitedAndSparesLegitimateNames() // 完整词不误伤。 Assert.Empty(FindProhibitedWords("Dictionary")); - Assert.Empty(FindProhibitedWords("TenantAdvertisementCallbackConfigEntity")); + Assert.Empty(FindProhibitedWords("AdvertisementCallbackConfigEntity")); Assert.Empty(FindProhibitedWords("ButtonPermissionList")); // 通用技术缩写白名单放行。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineErrorCodeContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineErrorCodeContractTests.cs index b697a5db..30d92819 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineErrorCodeContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineErrorCodeContractTests.cs @@ -96,7 +96,7 @@ public MirrorMemberRow(string member, int value) new VaultMemberRow("SessionInvalid", 32100003), // 段 322 ← 协议段 3xxx new VaultMemberRow("ScopeDenied", 32200001), - new VaultMemberRow("CrossTenantDenied", 32200002), + new VaultMemberRow("CrossDenied", 32200002), new VaultMemberRow("CrossAppDenied", 32200003), new VaultMemberRow("ServerScopeDenied", 32200004), new VaultMemberRow("ScopeMissing", 32200005), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineOverviewIsolationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineOverviewIsolationTests.cs index 34ee4e4e..b90a33f7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineOverviewIsolationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineOverviewIsolationTests.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Core.Tests.Architecture; // C344 / GFX-760(vault:C9 S8.1/S8.2)Online 控制台四条红线守护: // ① X6 口径:Online/Console 全域源码 + OnlineOverviewQueryService 依赖闭包零引用管理员连接链路 -// (OnlineUserHub / TenantOnlineUserService / TenantOnlineUserEntity / GameHomeOnlineCounter)—— +// (OnlineUserHub / OnlineUserService / OnlineUserEntity / GameHomeOnlineCounter)—— // 玩家在线数据唯一来源是 Online 玩家侧查询 API,总览不得并入管理员浏览器连接,也不得复用 // 首页驾驶舱 24h 在线时序(GameHomeOnlineCounter,C321 产物,口径不同源); // ② 受控命令枚举严格四值(CancelTicket / EndAbnormalMatch / SuspendResumePlayer / MatchIsolation)—— @@ -23,7 +23,7 @@ public sealed class OnlineOverviewIsolationTests /// X6 红线:管理员连接链路标识(总览玩家口径不得混入的四个类型名)。 private static readonly string[] AdministratorConnectionTokens = { - "OnlineUserHub", "TenantOnlineUserService", "TenantOnlineUserEntity", "GameHomeOnlineCounter", + "OnlineUserHub", "OnlineUserService", "OnlineUserEntity", "GameHomeOnlineCounter", }; /// 既有受控命令 token(复用矩阵:Console 域出现任意一个即构成平行实现)。 @@ -55,7 +55,7 @@ public void ConsoleSources_HaveNoAdministratorConnectionReferences() AdministratorConnectionTokens); Assert.True(offenders.Count == 0, "Online/Console 源码出现管理员连接链路引用(X6:玩家在线数据唯一来源是 Online 玩家侧查询 API," + - "总览不得计入 OnlineUserHub/TenantOnlineUserService 管理员连接,也不得复用 GameHomeOnlineCounter 驾驶舱口径)。违规点:" + + "总览不得计入 OnlineUserHub/OnlineUserService 管理员连接,也不得复用 GameHomeOnlineCounter 驾驶舱口径)。违规点:" + Environment.NewLine + string.Join(Environment.NewLine, offenders)); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineSocialCommandWhitelistTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineSocialCommandWhitelistTests.cs index d2cf880e..2167697f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineSocialCommandWhitelistTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/OnlineSocialCommandWhitelistTests.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Core.Tests.Architecture; // Online 社交治理(change C350 / GFX-754 / vault:C7)三条红线守护: // ① 处罚联动命令枚举严格三值(Kick / Ban / Mute,X3 红线)——新增命令必须回 vault 评审并同步本测试; -// ② Online/Social 源码零直写——事实源(TenantGamePenaltyEntity)只经 GamePenaltyService.AddAsync 写入, +// ② Online/Social 源码零直写——事实源(GamePenaltyEntity)只经 GamePenaltyService.AddAsync 写入, // Social 域自身只读(只读 Repository 允许;任何写入 API 调用或 ISqlSugarClient 依赖直接失败); // ③ Online 显式命令调用点唯一——kick_player / revoke_token / mute_player 三个 action 常量与 // OnlineLinkCommandAckData 联动命令响应类型只允许出现在 OnlinePenaltyLinkCommandService(处置流与处罚页同步均经其公共入口)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/RuntimeCredentialReadPathGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/RuntimeCredentialReadPathGuardTests.cs index 0f49f4a2..c8eecc77 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/RuntimeCredentialReadPathGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/RuntimeCredentialReadPathGuardTests.cs @@ -16,16 +16,16 @@ private static readonly (string File, string Marker, int MinOccurrences)[] Guard // Client.Api 六链路 ("GameFrameX.Core/Middleware/SignatureKeyResolver.cs", "RuntimeKeyMaterialCache.Decrypt", 2), ("GameFrameX.Core/Middleware/SessionKeyResolver.cs", "RuntimeKeyMaterialCache.Decrypt", 1), - ("GameFrameX.Core/Middleware/RuntimeKeyMaterialCache.cs", "TenantSecretCrypto.Decrypt(storedSecret)", 1), - ("GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs", "TenantSecretCrypto.DecryptCached", 1), - ("GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs", "TenantSecretCrypto.DecryptCached", 3), - ("GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs", "AdvertisementCallbackConfigCrypto.DecryptConfigJson", 1), - ("GameFrameX.Client.Api/Services/Email/TenantEmailSender.cs", "TenantSecretCrypto.DecryptCached", 2), + ("GameFrameX.Core/Middleware/RuntimeKeyMaterialCache.cs", "SecretCrypto.Decrypt(storedSecret)", 1), + ("GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs", "SecretCrypto.DecryptCached", 1), + ("GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs", "SecretCrypto.DecryptCached", 3), + ("GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs", "AdvertisementCallbackConfigCrypto.DecryptConfigJson", 1), + ("GameFrameX.Client.Api/Services/Email/EmailSender.cs", "SecretCrypto.DecryptCached", 2), ("GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs", "PaymentConfigCrypto.DecryptConfigJson", 1), // Hub.Api 链路 - ("GameFrameX.Hub.Api/Middleware/TenantGameAppOpenAccessAuthMiddleware.cs", "TenantSecretCrypto.DecryptCached", 1), + ("GameFrameX.Hub.Api/Middleware/GameAppOpenAccessAuthMiddleware.cs", "SecretCrypto.DecryptCached", 1), // C370 已收口的主库域读取(防回退) - ("GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs", "TenantSecretCrypto.Decrypt", 1), + ("GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs", "SecretCrypto.Decrypt", 1), }; /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/TenantSecretCryptoGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/SecretCryptoGuardTests.cs similarity index 64% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/TenantSecretCryptoGuardTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/SecretCryptoGuardTests.cs index c2b6f37d..a920b90a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/TenantSecretCryptoGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/SecretCryptoGuardTests.cs @@ -1,21 +1,21 @@ namespace GameFrameX.Core.Tests.Architecture; // C370(GFX-829):业务凭证静态加密写入 / 读取路径守护。 -// change:gfx-doc/dev/system-management/changes/C370-tenant-secret-crypto-foundation/change.md -// 三表写入路径必须经 TenantSecretCrypto / TenantObjectStorageConfigCrypto 收口(写入加密), +// change:gfx-doc/dev/system-management/changes/C370-secret-crypto-foundation/change.md +// 三表写入路径必须经 SecretCrypto / ObjectStorageConfigCrypto 收口(写入加密), // 读取点必须走解密收口(发信构建 / 缓存加载 / Adapter 上下文构建)。 -public sealed class TenantSecretCryptoGuardTests +public sealed class SecretCryptoGuardTests { private static readonly string RepositoryRoot = GetRepositoryRoot(); [Theory] - [InlineData("GameFrameX.Application/Platform/Email/SystemEmailProviderService.cs", "TenantSecretCrypto.Encrypt")] - [InlineData("GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs", "TenantSecretCrypto.Encrypt")] - [InlineData("GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs", "TenantSecretCrypto.Decrypt")] - [InlineData("GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs", "TenantObjectStorageConfigCrypto.EncryptConfigJson")] - [InlineData("GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs", "TenantObjectStorageConfigCrypto.DecryptConfigJson")] - [InlineData("GameFrameX.Application/Platform/Email/SystemEmailDispatcher.cs", "TenantSecretCrypto.Decrypt")] - [InlineData("GameFrameX.Core/Service/File/TenantFileService.cs", "TenantObjectStorageConfigCrypto.DecryptConfigJson")] + [InlineData("GameFrameX.Application/Platform/Email/SystemEmailProviderService.cs", "SecretCrypto.Encrypt")] + [InlineData("GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs", "SecretCrypto.Encrypt")] + [InlineData("GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs", "SecretCrypto.Decrypt")] + [InlineData("GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs", "ObjectStorageConfigCrypto.EncryptConfigJson")] + [InlineData("GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs", "ObjectStorageConfigCrypto.DecryptConfigJson")] + [InlineData("GameFrameX.Application/Platform/Email/SystemEmailDispatcher.cs", "SecretCrypto.Decrypt")] + [InlineData("GameFrameX.Core/Service/File/FileService.cs", "ObjectStorageConfigCrypto.DecryptConfigJson")] public void CredentialPath_MustRouteThroughSecretCrypto(string relativePath, string requiredCall) { var source = File.ReadAllText(Path.Combine(RepositoryRoot, relativePath)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractNamingGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractNamingGuardTests.cs index 9a132610..cf04d036 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractNamingGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractNamingGuardTests.cs @@ -46,7 +46,7 @@ public sealed class ThirdPartyContractNamingGuardTests { "Payment/GameFrameX.Payment.Xsolla/Order/OrderManager.cs", "Payment/GameFrameX.Payment.Xsolla/Reports/Transactions/Search.cs", - "GameFrameX.Client.Api/GameWebShop/Dto/TenantGameWebShopEntityBuyNotifyRequest.cs", + "GameFrameX.Client.Api/GameWebShop/Dto/GameWebShopEntityBuyNotifyRequest.cs", "GameFrameX.Client.Api/Integrations/Payment/Dto/XsollaWebHookOrderPaidRequest.cs", "GameFrameX.Client.Api/Integrations/Payment/Dto/XsollaWebHookRequest.cs", "GameFrameX.Client.Api/Integrations/Payment/Dto/XsollaWebHookUserValidationRequest.cs", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractWireRoundTripTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractWireRoundTripTests.cs index 219f0b93..9c83b065 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractWireRoundTripTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThirdPartyContractWireRoundTripTests.cs @@ -174,7 +174,7 @@ public void UnityAds_QueryBindingNames_AreLockedToCallbackContract() public void WebShop_zlpay_QueryBindingNames_AreLockedToNotifyContract() { // zlpay(易支付口径)notify 回传为 GET query 绑定,参数名与验签字典 key(BuildNotifySignParameters)一一对应 - AssertQueryBindingLocked(new Dictionary + AssertQueryBindingLocked(new Dictionary { { "Pid", "pid" }, { "TradeNo", "trade_no" }, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThreeHostApiRoutingContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThreeHostApiRoutingContractTests.cs index 9b772360..61c0b486 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThreeHostApiRoutingContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/ThreeHostApiRoutingContractTests.cs @@ -61,7 +61,7 @@ public void ClientHub_BaseControllers_DeclareTokenRouteTemplate() [Fact] public void Client_GameAnnouncementController_RenamesClassButLocksLegacyRoute() { - // C300(GFX-708):类名自 TenantGameAnnouncementEntityServiceController 清理而来;调用方(游戏客户端) + // C300(GFX-708):类名自 GameAnnouncementEntityServiceController 清理而来;调用方(游戏客户端) // 依赖既有路径,显式 [Route] 锁定旧 token 解析结果。MVC 路由模板收集与 GetCustomAttributes(inherit: true) // 同源,此处断言 controller 级路由唯一且等于旧值,防止基类 token 路由叠加出 api/GameAnnouncement 别名端点。 var routes = typeof(GameAnnouncementController) @@ -76,7 +76,7 @@ public void Client_GameAnnouncementController_RenamesClassButLocksLegacyRoute() [Fact] public void Hub_MachineChannels_UseOpenAccessAuthentication() { - // C405:Hub 仅保留机器通道,两个控制器均由 TenantGameAppOpenAccessAuthMiddleware 使用 HMAC 鉴权;JWT 不应进入信任域。 + // C405:Hub 仅保留机器通道,两个控制器均由 GameAppOpenAccessAuthMiddleware 使用 HMAC 鉴权;JWT 不应进入信任域。 Assert.False(typeof(Service.BaseController).IsDefined(typeof(AuthorizeAttribute), true)); Assert.True(typeof(FeatureSwitchSyncController).IsDefined(typeof(AllowAnonymousAttribute), false)); Assert.True(typeof(PackageBuildReportController).IsDefined(typeof(AllowAnonymousAttribute), false)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointCatalogSyncTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointCatalogSyncTests.cs index acf9ed3f..f6a7076f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointCatalogSyncTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointCatalogSyncTests.cs @@ -33,8 +33,8 @@ public void StartupSync_DoesNotRewriteTenantRoleMenuGrants() var sourceFile = FindSourceFile(nameof(ApiEndpointCatalogSync)); var source = File.ReadAllText(sourceFile.FullName); - Assert.DoesNotContain("TenantRoleMenuEntity", source, StringComparison.Ordinal); - Assert.DoesNotContain("SyncTenantDefaultRoleMenusAsync", source, StringComparison.Ordinal); + Assert.DoesNotContain("RoleMenuEntity", source, StringComparison.Ordinal); + Assert.DoesNotContain("SyncDefaultRoleMenusAsync", source, StringComparison.Ordinal); Assert.DoesNotContain("BuildRoleMenus", source, StringComparison.Ordinal); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointIdentityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointIdentityTests.cs index bd072989..998331c7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointIdentityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointIdentityTests.cs @@ -27,7 +27,7 @@ public void NormalizeRoutePath_CanonicalizesToLowerWithApiPrefix(string raw, str [Theory] [InlineData("systemUser:page", "api/systemuser/page")] - [InlineData("tenantRole:list", "api/tenantrole/list")] + [InlineData("role:list", "api/role/list")] [InlineData("SYSTEMUSER:PAGE", "api/systemuser/page")] public void RouteNameToRoutePath_ColonBecomesSlashAndLowercased(string routeName, string expected) { @@ -46,7 +46,7 @@ public void RouteNameToRoutePath_NullOrWhitespace_ReturnsEmpty(string? routeName [Theory] [InlineData("/api/systemUser/page", "api/systemuser/page")] [InlineData(null, "")] - [InlineData("/api/tenantRole/list", "api/tenantrole/list")] + [InlineData("/api/role/list", "api/role/list")] public void FromRequestPath_EqualsNormalize(string? requestPath, string expected) { Assert.Equal(expected, ApiEndpointIdentity.FromRequestPath(requestPath)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/RoleAuthorizationCacheTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/RoleAuthorizationCacheTests.cs index c4f52563..2fe354ca 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/RoleAuthorizationCacheTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/RoleAuthorizationCacheTests.cs @@ -25,16 +25,16 @@ public sealed class RoleAuthorizationCacheTests : IDisposable { private readonly ClientApiTestDb _database = new(); private readonly SystemCacheService _cache = new(new MemoryCacheService(), Options.Create(new CacheOptions())); - private readonly TenantRoleMenuService _roleMenus; - private readonly TenantUserRoleService _userRoles; - private readonly TenantRoleService _roles; + private readonly RoleMenuService _roleMenus; + private readonly UserRoleService _userRoles; + private readonly RoleService _roles; private readonly ServiceProvider _services; private readonly GlobalMenuService _menus; public RoleAuthorizationCacheTests() { MenuSeedCatalogTestData.LoadSampleMenus(); - _database.InitTenantTables(typeof(GlobalMenuEntity), typeof(TenantRoleEntity), typeof(TenantRoleMenuEntity), typeof(TenantUserRoleEntity)); + _database.InitBusinessTables(typeof(GlobalMenuEntity), typeof(RoleEntity), typeof(RoleMenuEntity), typeof(UserRoleEntity)); _database.MainDb.Insertable(new[] { new GlobalMenuEntity { Id = 101, Key = "cache-test:first", Title = "First", Type = MenuTypeEnum.Button, IsEnabled = true, IsDeleted = false }, @@ -42,26 +42,26 @@ public RoleAuthorizationCacheTests() }).ExecuteCommand(); _database.MainDb.Insertable(new[] { - new TenantRoleEntity { Id = 11, Name = "First role", IsEnabled = true, IsDeleted = false }, - new TenantRoleEntity { Id = 12, Name = "Second role", IsEnabled = true, IsDeleted = false }, + new RoleEntity { Id = 11, Name = "First role", IsEnabled = true, IsDeleted = false }, + new RoleEntity { Id = 12, Name = "Second role", IsEnabled = true, IsDeleted = false }, }).ExecuteCommand(); _database.MainDb.Insertable(new[] { - new TenantRoleMenuEntity { Id = 21, RoleId = 11, MenuId = 101 }, - new TenantRoleMenuEntity { Id = 22, RoleId = 12, MenuId = 102 }, + new RoleMenuEntity { Id = 21, RoleId = 11, MenuId = 101 }, + new RoleMenuEntity { Id = 22, RoleId = 12, MenuId = 102 }, }).ExecuteCommand(); - _database.MainDb.Insertable(new TenantUserRoleEntity { Id = 31, UserId = 1, RoleId = 11 }).ExecuteCommand(); + _database.MainDb.Insertable(new UserRoleEntity { Id = 31, UserId = 1, RoleId = 11 }).ExecuteCommand(); var transaction = new SqlSugarTransactionRunner(_database.MainDb); var menuRepository = new SqlSugarRepository { Context = _database.MainDb }; - _roleMenus = new TenantRoleMenuService(new SqlSugarRepository { Context = _database.MainDb }, menuRepository, _cache, transaction); - _userRoles = new TenantUserRoleService(new SqlSugarRepository { Context = _database.MainDb }, _cache, transaction); + _roleMenus = new RoleMenuService(new SqlSugarRepository { Context = _database.MainDb }, menuRepository, _cache, transaction); + _userRoles = new UserRoleService(new SqlSugarRepository { Context = _database.MainDb }, _cache, transaction); var context = new CurrentUserContext(new HttpContextAccessor { HttpContext = new DefaultHttpContext { User = new ClaimsPrincipal(new ClaimsIdentity(new[] { new Claim(ClaimConst.UserId, "1") }, "test")) }, }); _services = new ServiceCollection().AddSingleton(_roleMenus).AddSingleton(_userRoles).AddSingleton(_cache).BuildServiceProvider(); _menus = new GlobalMenuService(context, menuRepository, _cache, _services, _database.MainDb); - _roles = new TenantRoleService(context, new SqlSugarRepository { Context = _database.MainDb }, _roleMenus, _userRoles, _services); + _roles = new RoleService(context, new SqlSugarRepository { Context = _database.MainDb }, _roleMenus, _userRoles, _services); } [Fact] @@ -118,11 +118,11 @@ await _roleMenus.GrantRoleMenuAsync(new RoleMenuRequest { Id = 11, MenuIdList = seedMenus.Select(menu => menu.Id).ToList(), }); - var granted = await _database.MainDb.Queryable() + var granted = await _database.MainDb.Queryable() .Where(relation => relation.RoleId == 11) .Select(relation => relation.MenuId).ToListAsync(); var protectedIdentifiers = MenuSeedCatalog.SuperAdminOnlySubtreeMenuIds; - var readableIdentifiers = MenuSeedCatalog.TenantReadableSuperAdminOnlyMenuIds; + var readableIdentifiers = MenuSeedCatalog.AdminReadableSuperAdminOnlyMenuIds; Assert.NotEmpty(protectedIdentifiers); Assert.All(protectedIdentifiers.Except(readableIdentifiers), identifier => Assert.DoesNotContain(identifier, granted)); Assert.All(readableIdentifiers, identifier => Assert.Contains(identifier, granted)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantCredentialWritePathCryptoTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs similarity index 56% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantCredentialWritePathCryptoTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs index 434b718d..46bc0d01 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantCredentialWritePathCryptoTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs @@ -5,36 +5,36 @@ using GameFrameX.Application.ClientDelivery.Security.AppSignatureKey; using GameFrameX.Application.ClientDelivery.Security.AppSignatureKey.Dto; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.ClientApiConfig; +using GameFrameX.Entity.Business.Game; using Microsoft.Extensions.Logging.Abstractions; -namespace GameFrameX.Core.Tests.Tenant; +namespace GameFrameX.Core.Tests.Business; // C371(GFX-838)T6:凭证写入路径「确定最终明文之后、落库之前加密」两条代表链路。 -// change:gfx-doc/dev/game-business/changes/C371-tenant-credential-encryption-application/change.md +// change:gfx-doc/dev/game-business/changes/C371-credential-encryption-application/change.md // 密钥环(SignatureKey):Add/Rotate 响应一次性回显明文,库内密文且可解密还原; // JSON 凭证(Advertisement):Add 后汇总列密文 + ConfigJson 敏感字段密文、非敏感字段明文,Update 掩码保留。 // 其余实体(SessionKey / TicketKey / Policy / OpenAccess / Payment)与上述同型插入, -// 由 TenantCredentialWritePathGuardTests 源码级守护覆盖。 -public sealed class TenantCredentialWritePathCryptoTests : IDisposable +// 由 CredentialWritePathGuardTests 源码级守护覆盖。 +public sealed class CredentialWritePathCryptoTests : IDisposable { private readonly ClientApiTestDb _db = new(); private readonly string? _originalKey; - public TenantCredentialWritePathCryptoTests() + public CredentialWritePathCryptoTests() { - _originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - _db.InitTenantTables(typeof(TenantAppSignatureKeyEntity), typeof(TenantAdvertisementCallbackConfigEntity)); + _originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + _db.InitBusinessTables(typeof(AppSignatureKeyEntity), typeof(AdvertisementCallbackConfigEntity)); } public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); _db.Dispose(); } @@ -42,17 +42,17 @@ public void Dispose() public async Task SignatureKey_AddAndRotate_RevealPlaintextOnce_StoreCipherOnly() { var service = new AppSignatureKeyService( - new Repository(_db.MainDb)); + new Repository(_db.MainDb)); var added = await service.AddAsync(new AppSignatureKeyAddRequest { Remark = "unit-add", }); - var storedAdded = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, storedAdded.Secret, StringComparison.Ordinal); - Assert.Equal(added.Secret, TenantSecretCrypto.Decrypt(storedAdded.Secret)); + var storedAdded = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); + Assert.StartsWith(SecretCrypto.EncryptedPrefix, storedAdded.Secret, StringComparison.Ordinal); + Assert.Equal(added.Secret, SecretCrypto.Decrypt(storedAdded.Secret)); var rotated = await service.RotateAsync(new AppSignatureKeyRotateRequest { }); - var storedRotated = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == rotated.Id); - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, storedRotated.Secret, StringComparison.Ordinal); - Assert.Equal(rotated.Secret, TenantSecretCrypto.Decrypt(storedRotated.Secret)); + var storedRotated = _db.Db.Queryable().Filter(null, true).First(u => u.Id == rotated.Id); + Assert.StartsWith(SecretCrypto.EncryptedPrefix, storedRotated.Secret, StringComparison.Ordinal); + Assert.Equal(rotated.Secret, SecretCrypto.Decrypt(storedRotated.Secret)); Assert.NotEqual(storedAdded.Secret, storedRotated.Secret); } @@ -61,11 +61,11 @@ public async Task SignatureKey_AddAndRotate_RevealPlaintextOnce_StoreCipherOnly( public async Task AdvertisementConfig_AddEncryptsColumnsAndSensitiveJsonFields_MaskUpdatePreserves() { var service = new AdvertisementCallbackConfigService( - new Repository(_db.MainDb), + new Repository(_db.MainDb), new AdvertisementCallbackConfigSchemaProvider()); var configJson = "{\"callbackUrl\":\"https://cb.example.com/hook\",\"signingSecret\":\"ad-plain-secret\"}"; - var added = await service.AddAsync(new AddTenantAdvertisementCallbackConfigRequest + var added = await service.AddAsync(new AddAdvertisementCallbackConfigRequest { Provider = "Pangle", @@ -74,20 +74,20 @@ public async Task AdvertisementConfig_AddEncryptsColumnsAndSensitiveJsonFields_M ConfigJson = configJson, }); - var stored = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, stored.SigningSecret, StringComparison.Ordinal); - Assert.Equal("ad-plain-secret", TenantSecretCrypto.Decrypt(stored.SigningSecret)); + var stored = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); + Assert.StartsWith(SecretCrypto.EncryptedPrefix, stored.SigningSecret, StringComparison.Ordinal); + Assert.Equal("ad-plain-secret", SecretCrypto.Decrypt(stored.SigningSecret)); // 字段级:callbackUrl 明文可读,signingSecret 密文可还原 var json = JsonNode.Parse(stored.ConfigJson)!.AsObject(); Assert.Equal("https://cb.example.com/hook", (string?)json["callbackUrl"]); - Assert.Equal("ad-plain-secret", TenantSecretCrypto.Decrypt((string?)json["signingSecret"])); + Assert.Equal("ad-plain-secret", SecretCrypto.Decrypt((string?)json["signingSecret"])); // 回传 ******:NormalizeConfigJson 用库内密文回填掩码字段,EncryptConfigJson 幂等保留原密文。 // 汇总列在掩码更新时重定基到 JSON 携带的密文(列与 JSON 各自独立加盐,本就不是同一密文串)—— // 断言语义保留:仍是密文、解出同一明文、且与 JSON 字段密文一致。 var cipherJsonBefore = stored.ConfigJson; - await service.UpdateAsync(new UpdateTenantAdvertisementCallbackConfigRequest + await service.UpdateAsync(new UpdateAdvertisementCallbackConfigRequest { Id = added.Id, @@ -98,10 +98,10 @@ await service.UpdateAsync(new UpdateTenantAdvertisementCallbackConfigRequest ConfigJson = "{\"callbackUrl\":\"https://cb.example.com/hook\",\"signingSecret\":\"******\"}", RowVersion = stored.RowVersion, }); - stored = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); + stored = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); Assert.Equal(cipherJsonBefore, stored.ConfigJson); - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, stored.SigningSecret, StringComparison.Ordinal); - Assert.Equal("ad-plain-secret", TenantSecretCrypto.Decrypt(stored.SigningSecret)); + Assert.StartsWith(SecretCrypto.EncryptedPrefix, stored.SigningSecret, StringComparison.Ordinal); + Assert.Equal("ad-plain-secret", SecretCrypto.Decrypt(stored.SigningSecret)); Assert.Equal((string?)JsonNode.Parse(stored.ConfigJson)!["signingSecret"], stored.SigningSecret); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantObjectStorageConfigCryptoTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ObjectStorageConfigCryptoTests.cs similarity index 55% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantObjectStorageConfigCryptoTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ObjectStorageConfigCryptoTests.cs index 598e4162..3a9651a4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantObjectStorageConfigCryptoTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ObjectStorageConfigCryptoTests.cs @@ -1,34 +1,34 @@ using System.Text.Json.Nodes; -using GameFrameX.Core.Service.Tenant; -using GameFrameX.Core.Service.Tenant.ObjectStorage; +using GameFrameX.Core.Service.Business; +using GameFrameX.Core.Service.Business.ObjectStorage; -namespace GameFrameX.Core.Tests.Tenant; +namespace GameFrameX.Core.Tests.Business; -// C370(GFX-829):对象存储 ConfigJson schema 驱动字段级加解密收口 TenantObjectStorageConfigCrypto 的行为契约。 -// change:gfx-doc/dev/system-management/changes/C370-tenant-secret-crypto-foundation/change.md +// C370(GFX-829):对象存储 ConfigJson schema 驱动字段级加解密收口 ObjectStorageConfigCrypto 的行为契约。 +// change:gfx-doc/dev/system-management/changes/C370-secret-crypto-foundation/change.md // 用真实 aliyun schema(AccessKeySecret 唯一敏感字段,Endpoint/BucketName/AccessKeyId 明文)验证: // 字段级选择性加密、往返还原、幂等、降级直存、fail-closed、畸形 JSON 直通、无敏感字段 Provider 直通、随机密文各自可解。 -public sealed class TenantObjectStorageConfigCryptoTests : IDisposable +public sealed class ObjectStorageConfigCryptoTests : IDisposable { private const string PlainJson = "{\"Endpoint\":\"oss-cn-hangzhou.aliyuncs.com\",\"BucketName\":\"game-bucket\",\"AccessKeyId\":\"LTAI5tExample\",\"AccessKeySecret\":\"AKSecretExample2026\",\"PublicBaseUrl\":\"https://cdn.example.com\"}"; private readonly string? _originalSecretKey; - public TenantObjectStorageConfigCryptoTests() + public ObjectStorageConfigCryptoTests() { - _originalSecretKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + _originalSecretKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); } public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalSecretKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalSecretKey); } [Fact] public void EncryptConfigJson_EncryptsOnlySensitiveFields() { - var encryptedJson = TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); + var encryptedJson = ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); var node = JsonNode.Parse(encryptedJson)!.AsObject(); Assert.Equal("oss-cn-hangzhou.aliyuncs.com", (string?)node["Endpoint"]); @@ -36,16 +36,16 @@ public void EncryptConfigJson_EncryptsOnlySensitiveFields() Assert.Equal("LTAI5tExample", (string?)node["AccessKeyId"]); Assert.Equal("https://cdn.example.com", (string?)node["PublicBaseUrl"]); var secret = (string?)node["AccessKeySecret"]; - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, secret, StringComparison.Ordinal); + Assert.StartsWith(SecretCrypto.EncryptedPrefix, secret, StringComparison.Ordinal); Assert.DoesNotContain("AKSecretExample", secret); } [Fact] public void DecryptConfigJson_RestoresOriginalJson() { - var encryptedJson = TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); + var encryptedJson = ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); - var decryptedJson = TenantObjectStorageConfigCrypto.DecryptConfigJson("aliyun", encryptedJson); + var decryptedJson = ObjectStorageConfigCrypto.DecryptConfigJson("aliyun", encryptedJson); var node = JsonNode.Parse(decryptedJson)!.AsObject(); Assert.Equal("oss-cn-hangzhou.aliyuncs.com", (string?)node["Endpoint"]); @@ -58,36 +58,36 @@ public void DecryptConfigJson_RestoresOriginalJson() [Fact] public void EncryptConfigJson_IsIdempotentForAlreadyEncryptedJson() { - var encryptedJson = TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); + var encryptedJson = ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); // 敏感字段已是密文 → 幂等跳过,整串 JSON 逐字节不变(重写场景不换密文) - Assert.Equal(encryptedJson, TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", encryptedJson)); + Assert.Equal(encryptedJson, ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", encryptedJson)); } [Fact] public void EncryptConfigJson_WithoutKey_ReturnsPlaintextDegradedMode() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, null); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, null); - Assert.Equal(PlainJson, TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson)); + Assert.Equal(PlainJson, ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson)); } [Fact] public void DecryptConfigJson_EncryptedWithoutKey_ThrowsFailClosed() { - var encryptedJson = TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, null); + var encryptedJson = ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, null); - var exception = Assert.Throws(() => TenantObjectStorageConfigCrypto.DecryptConfigJson("aliyun", encryptedJson)); - Assert.Contains(TenantSecretCrypto.KeyEnvironmentVariable, exception.Message); + var exception = Assert.Throws(() => ObjectStorageConfigCrypto.DecryptConfigJson("aliyun", encryptedJson)); + Assert.Contains(SecretCrypto.KeyEnvironmentVariable, exception.Message); } [Fact] public void Transform_MalformedJson_PassesThrough() { // 与 ObjectStorageConfigNormalizer.ParseObject 同款容错:畸形 JSON 不在收口职责内,原样返回交上层校验 - Assert.Equal("not-a-json", TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", "not-a-json")); - Assert.Equal("not-a-json", TenantObjectStorageConfigCrypto.DecryptConfigJson("aliyun", "not-a-json")); + Assert.Equal("not-a-json", ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", "not-a-json")); + Assert.Equal("not-a-json", ObjectStorageConfigCrypto.DecryptConfigJson("aliyun", "not-a-json")); } [Fact] @@ -95,21 +95,21 @@ public void Transform_LocalProviderWithoutSensitiveFields_PassesThrough() { // local provider 无 Sensitive 字段:ConfigJson 原样直通(含正常 JSON) var localJson = "{\"RootPath\":\"/data/upload\"}"; - Assert.Equal(localJson, TenantObjectStorageConfigCrypto.EncryptConfigJson("local", localJson)); - Assert.Equal(localJson, TenantObjectStorageConfigCrypto.DecryptConfigJson("local", localJson)); + Assert.Equal(localJson, ObjectStorageConfigCrypto.EncryptConfigJson("local", localJson)); + Assert.Equal(localJson, ObjectStorageConfigCrypto.DecryptConfigJson("local", localJson)); } [Fact] public void DecryptConfigJson_EachRandomCipherText_DecryptsCorrectly() { // 每次加密随机 Salt + Nonce 产生不同密文,解密缓存按密文原文为 key——新密文必须重新解密且结果正确 - var first = TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); - var second = TenantObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); + var first = ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); + var second = ObjectStorageConfigCrypto.EncryptConfigJson("aliyun", PlainJson); Assert.NotEqual(first, second); foreach (var cipher in new[] { first, second, }) { - var node = JsonNode.Parse(TenantObjectStorageConfigCrypto.DecryptConfigJson("aliyun", cipher))!.AsObject(); + var node = JsonNode.Parse(ObjectStorageConfigCrypto.DecryptConfigJson("aliyun", cipher))!.AsObject(); Assert.Equal("AKSecretExample2026", (string?)node["AccessKeySecret"]); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantReadActionClassifierTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ReadActionClassifierTests.cs similarity index 72% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantReadActionClassifierTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ReadActionClassifierTests.cs index 2e455500..56241c0d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantReadActionClassifierTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ReadActionClassifierTests.cs @@ -1,12 +1,12 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; -namespace GameFrameX.Core.Tests.Tenant; +namespace GameFrameX.Core.Tests.Business; /// -/// 固化 只读前缀集合与判定规则。 +/// 固化 只读前缀集合与判定规则。 /// 扩充只读前缀时必须同步更新本测试,避免「未禁止即放行」的隐性写操作漏判。 /// -public class TenantReadActionClassifierTests +public class ReadActionClassifierTests { [Theory] [InlineData("Get", true)] @@ -25,9 +25,9 @@ public class TenantReadActionClassifierTests [InlineData("Count", true)] [InlineData("Exist", true)] [InlineData("Add", false)] - [InlineData("AddTenant", false)] + [InlineData("Add", false)] + [InlineData("Update", false)] [InlineData("Update", false)] - [InlineData("UpdateTenant", false)] [InlineData("Delete", false)] [InlineData("Remove", false)] [InlineData("CreateOrder", false)] @@ -40,15 +40,15 @@ public class TenantReadActionClassifierTests [InlineData(null, false)] public void IsReadAction_MatchesReadOnlyPrefixes(string? actionName, bool expected) { - Assert.Equal(expected, TenantReadActionClassifier.IsReadAction(actionName)); + Assert.Equal(expected, ReadActionClassifier.IsReadAction(actionName)); } [Fact] public void IsReadAction_IsCaseInsensitive() { - Assert.True(TenantReadActionClassifier.IsReadAction("page")); - Assert.True(TenantReadActionClassifier.IsReadAction("GETUSER")); - Assert.False(TenantReadActionClassifier.IsReadAction("DELETE")); + Assert.True(ReadActionClassifier.IsReadAction("page")); + Assert.True(ReadActionClassifier.IsReadAction("GETUSER")); + Assert.False(ReadActionClassifier.IsReadAction("DELETE")); } [Fact] @@ -61,6 +61,6 @@ public void ReadPrefixes_AreLocked() "Info", "Detail", "Tree", "Select", "Option", "Options", "Check", "Verify", "Export", "Count", "Exist", }; - Assert.Equal(expected, TenantReadActionClassifier.ReadPrefixes); + Assert.Equal(expected, ReadActionClassifier.ReadPrefixes); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/SecretCryptoTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/SecretCryptoTests.cs new file mode 100644 index 00000000..5bda4b02 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/SecretCryptoTests.cs @@ -0,0 +1,144 @@ +using GameFrameX.Core.Service.Business; + +namespace GameFrameX.Core.Tests.Business; + +// C370(GFX-829):业务凭证静态加密收口 SecretCrypto 的行为契约。 +// change:gfx-doc/dev/system-management/changes/C370-secret-crypto-foundation/change.md +// 覆盖:往返还原、enc:sec:v1: 前缀、明文兼容直通、幂等加密、空值透传、 +// 未配置密钥的降级直存、密文 + 缺密钥 / 错误密钥 / 篡改密文的失败语义、 +// 与连接串域 enc:v1: 密文互不认领(双向)。 +// 测试程序集已 DisableTestParallelization,环境变量在本类内集中设置与还原。 +public sealed class SecretCryptoTests : IDisposable +{ + private const string PlainSecret = "AKIDexample-secret-key-2026"; + + private readonly string? _originalSecretKey; + + public SecretCryptoTests() + { + _originalSecretKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + } + + public void Dispose() + { + Restore(SecretCrypto.KeyEnvironmentVariable, _originalSecretKey); + } + + [Fact] + public void EncryptThenDecrypt_RestoresOriginalSecret() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + + var encrypted = SecretCrypto.Encrypt(PlainSecret); + + Assert.StartsWith(SecretCrypto.EncryptedPrefix, encrypted, StringComparison.Ordinal); + Assert.NotEqual(PlainSecret, encrypted); + Assert.DoesNotContain("example-secret-key", encrypted); + Assert.Equal(PlainSecret, SecretCrypto.Decrypt(encrypted)); + } + + [Fact] + public void Encrypt_EachCallProducesDifferentCipherText() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + + // AesHelper 每次随机 Salt + Nonce,同明文两次密文必须不同(防彩虹对照) + Assert.NotEqual(SecretCrypto.Encrypt(PlainSecret), SecretCrypto.Encrypt(PlainSecret)); + } + + [Fact] + public void Decrypt_PlaintextWithoutPrefix_PassesThrough() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + + Assert.Equal(PlainSecret, SecretCrypto.Decrypt(PlainSecret)); + } + + [Fact] + public void Encrypt_IsIdempotentForAlreadyEncryptedValue() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + var encrypted = SecretCrypto.Encrypt(PlainSecret); + + Assert.Equal(encrypted, SecretCrypto.Encrypt(encrypted)); + } + + [Fact] + public void EncryptDecrypt_NullAndEmpty_PassThrough() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + + Assert.Null(SecretCrypto.Encrypt(null)); + Assert.Null(SecretCrypto.Decrypt(null)); + Assert.Equal(string.Empty, SecretCrypto.Encrypt(string.Empty)); + Assert.Equal(string.Empty, SecretCrypto.Decrypt(string.Empty)); + } + + [Fact] + public void Encrypt_WithoutKey_ReturnsPlaintextDegradedMode() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, null); + + Assert.Equal(PlainSecret, SecretCrypto.Encrypt(PlainSecret)); + } + + [Fact] + public void Decrypt_EncryptedWithoutKey_ThrowsWithKeyHint() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + var encrypted = SecretCrypto.Encrypt(PlainSecret); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, null); + + var exception = Assert.Throws(() => SecretCrypto.Decrypt(encrypted)); + Assert.Contains(SecretCrypto.KeyEnvironmentVariable, exception.Message); + } + + [Fact] + public void Decrypt_WithWrongKey_ThrowsWithoutLeakingCipherText() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + var encrypted = SecretCrypto.Encrypt(PlainSecret); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "another-secret-key"); + + var exception = Assert.Throws(() => SecretCrypto.Decrypt(encrypted)); + Assert.DoesNotContain(encrypted[SecretCrypto.EncryptedPrefix.Length..], exception.Message); + Assert.DoesNotContain("example-secret-key", exception.Message); + } + + [Fact] + public void Decrypt_TamperedCipherText_Throws() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + var encrypted = SecretCrypto.Encrypt(PlainSecret); + // 翻转密文尾部一个字符,模拟存储值被篡改(AES-GCM 认证标签校验必须失败) + var tampered = encrypted[..^1] + (encrypted[^1] == 'A' ? 'B' : 'A'); + + Assert.Throws(() => SecretCrypto.Decrypt(tampered)); + } + + [Fact] + public void IsEncrypted_ClassifiesStoredValueForm() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + + Assert.False(SecretCrypto.IsEncrypted(PlainSecret)); + Assert.True(SecretCrypto.IsEncrypted(SecretCrypto.Encrypt(PlainSecret))); + Assert.False(SecretCrypto.IsEncrypted(null)); + } + + [Fact] + public void Decrypt_ConnectionCipherText_PassesThroughWithoutClaiming() + { + // 两域前缀互斥(enc:sec:v1: vs enc:v1:):连接串密文对凭证收口是「无前缀值」,直通不认领、不误抛解密失败 + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + const string connectionCipher = "enc:v1:legacy-connection-cipher"; + + Assert.False(SecretCrypto.IsEncrypted(connectionCipher)); + Assert.Equal(connectionCipher, SecretCrypto.Decrypt(connectionCipher)); + } + + private static void Restore(string variable, string? value) + { + Environment.SetEnvironmentVariable(variable, value); + } +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/MainDatabaseGovernanceServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/MainDatabaseGovernanceServiceTests.cs index 7ac188e2..6a6a9f6b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/MainDatabaseGovernanceServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/MainDatabaseGovernanceServiceTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; namespace GameFrameX.Core.Tests.C116; @@ -17,9 +17,9 @@ public async Task PenaltyAndAppeal_KeepStateTransitionsWithoutApplication() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGamePenaltyEntity), typeof(TenantGamePenaltyAppealEntity)); - var penalties = new SqlSugarRepository { Context = database.MainDb }; - var appeals = new SqlSugarRepository { Context = database.MainDb }; + database.InitBusinessTables(typeof(GamePenaltyEntity), typeof(GamePenaltyAppealEntity)); + var penalties = new SqlSugarRepository { Context = database.MainDb }; + var appeals = new SqlSugarRepository { Context = database.MainDb }; var user = new CurrentUserContext(new HttpContextAccessor()); var penaltyService = new GamePenaltyService(penalties, user, null!); var appealService = new GamePenaltyAppealService(appeals, penalties, user); @@ -39,10 +39,10 @@ public async Task Report_RequiresConfirmationBeforeLinkingPenalty() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGamePenaltyEntity), typeof(TenantGameReportEntity)); - var reports = new SqlSugarRepository { Context = database.MainDb }; + database.InitBusinessTables(typeof(GamePenaltyEntity), typeof(GameReportEntity)); + var reports = new SqlSugarRepository { Context = database.MainDb }; var service = new GameReportService(reports, - new SqlSugarRepository { Context = database.MainDb }, + new SqlSugarRepository { Context = database.MainDb }, new CurrentUserContext(new HttpContextAccessor())); var report = await service.AddAsync(new() { ReporterId = 1, TargetId = "account-1", EvidenceJson = "{}" }); Assert.Equal(ReportStatusEnum.Pending, report.Status); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs index 1b278785..131b3f5c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Application.PlayerCenter.GameUser; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -26,7 +26,7 @@ public async Task GameUser_Register_ReturnsPascalCaseAccessTokenAndPersistsActiv var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.UserName == "guest-c108"); + var saved = await db.Db.Queryable().FirstAsync(u => u.UserName == "guest-c108"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.False(string.IsNullOrWhiteSpace(data.GetProperty("AccessToken").GetString())); Assert.Equal("Guest", data.GetProperty("Provider").GetString()); @@ -60,7 +60,7 @@ public async Task GameUser_Login_RejectsWrongPassword() var controller = CreateController(db); db.AttachContext(controller); - var result = await controller.Login(new LoginTenantGameUserEntityRequest + var result = await controller.Login(new LoginGameUserEntityRequest { UserName = "guest-c108", Password = "wrong-password", @@ -82,7 +82,7 @@ public async Task GameUser_Get_RejectsAccessTokenFromAnotherUser() var controller = CreateController(db, issuer); db.AttachContext(controller); - var result = await controller.Get(new QueryByIdTenantGameUserEntityRequest + var result = await controller.Get(new QueryByIdGameUserEntityRequest { Id = 1002, AccessToken = token.Token, @@ -110,7 +110,7 @@ public async Task GameUser_LogOff_WithValidTokenMarksAccountDeleting() }); var root = ClientApiResultReader.Read(result); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == user.Id); + var saved = await db.Db.Queryable().FirstAsync(u => u.Id == user.Id); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(GameUserStatus.Deleted, saved.Status); Assert.NotNull(saved.DeletedTime); @@ -171,7 +171,7 @@ public async Task GameUser_EmailLogin_AcceptsCorrectPassword_RejectsWrongAndMiss db.AttachContext(controller); // 正确密码 -> 登录成功(Argon2id 常量时间比对通过) - var ok = await controller.EmailLogin(new LoginTenantGameUserEntityRequest + var ok = await controller.EmailLogin(new LoginGameUserEntityRequest { UserName = "player@example.test", Password = "right-password", @@ -179,7 +179,7 @@ public async Task GameUser_EmailLogin_AcceptsCorrectPassword_RejectsWrongAndMiss Assert.Equal(0, ClientApiResultReader.Code(ClientApiResultReader.Read(ok))); // 错误密码 -> 账号或密码错误 - var bad = await controller.EmailLogin(new LoginTenantGameUserEntityRequest + var bad = await controller.EmailLogin(new LoginGameUserEntityRequest { UserName = "player@example.test", Password = "wrong-password", @@ -187,7 +187,7 @@ public async Task GameUser_EmailLogin_AcceptsCorrectPassword_RejectsWrongAndMiss Assert.Equal("账号或密码错误", ClientApiResultReader.Message(ClientApiResultReader.Read(bad))); // 账号不存在 -> 统一返回账号或密码错误(执行假 Verify 抵御账号枚举,不泄露账号是否存在) - var none = await controller.EmailLogin(new LoginTenantGameUserEntityRequest + var none = await controller.EmailLogin(new LoginGameUserEntityRequest { UserName = "nobody@example.test", Password = "anything", @@ -197,12 +197,12 @@ public async Task GameUser_EmailLogin_AcceptsCorrectPassword_RejectsWrongAndMiss private static GameUserController CreateController(ClientApiTestDb db, ClientApiTokenIssuer? issuer = null) { - db.InitTenantTables(typeof(TenantGameUserEntity), typeof(TenantGameUserEmailEntity), typeof(TenantSessionKeyEntity)); + db.InitBusinessTables(typeof(GameUserEntity), typeof(GameUserEmailEntity), typeof(SessionKeyEntity)); return new GameUserController( - db.Repository(), + db.Repository(), issuer ?? CreateTokenIssuer(), - new ClientApiSessionKeyIssuer(db.Repository()), - db.Repository(), + new ClientApiSessionKeyIssuer(db.Repository()), + db.Repository(), new FakeGamePenaltyEnforcementService(), new GameUserPasswordService()); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs index ffb89162..e529301a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs @@ -15,12 +15,12 @@ using GameFrameX.Client.Api.GameAssetPackageVersion.Dto; using GameFrameX.Client.Api.RemoteConfig.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Entity.Tenant.Device; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Announcement; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Device; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Announcement; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Core.Tests.ClientApi; @@ -31,10 +31,10 @@ public async Task GameAppVersion_GetInfo_UsesMainDatabaseAndReturnsPascalCasePay { using var db = new ClientApiTestDb(); db.SeedAppVersion(1, "com.gameframex.c108"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var matcher = new AppVersionFallbackMatcher(db.Repository(), resolver); - var controller = new GameAppVersionController(db.Repository(), matcher); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var resolver = new GameAppPackageResolver(db.DbProvider); + var matcher = new AppVersionFallbackMatcher(db.Repository(), resolver); + var controller = new GameAppVersionController(db.Repository(), matcher); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetInfo(new GameAppVersionRequest { @@ -58,13 +58,13 @@ public async Task GameAssetPackageVersion_GetInfo_BuildsPascalCaseAssetPathWitho { using var db = new ClientApiTestDb(); db.SeedAssetPackageVersion(1, "com.gameframex.c108"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); + var resolver = new GameAppPackageResolver(db.DbProvider); + var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); var controller = new GameAssetPackageVersionController( - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), matcher); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetInfo(new AssetPackageVersionRequest { @@ -80,7 +80,7 @@ public async Task GameAssetPackageVersion_GetInfo_BuildsPascalCaseAssetPathWitho var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); // GFX-706:GetInfo 纯只读——设备注册副作用已拆至 RegisterDevice,携带标识调用也不写设备表 - var deviceCount = await db.TenantDb.Queryable().CountAsync(); + var deviceCount = await db.Db.Queryable().CountAsync(); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(0, deviceCount); Assert.Equal("2026.07.18", data.GetProperty("Version").GetString()); @@ -92,13 +92,13 @@ public async Task GameAssetPackageVersion_RegisterDevice_IdempotentByIdentifier( { using var db = new ClientApiTestDb(); db.SeedAssetPackageVersion(1, "com.gameframex.c108"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); + var resolver = new GameAppPackageResolver(db.DbProvider); + var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); var controller = new GameAssetPackageVersionController( - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), matcher); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var first = await controller.RegisterDevice(new DeviceRegisterRequest { @@ -111,7 +111,7 @@ public async Task GameAssetPackageVersion_RegisterDevice_IdempotentByIdentifier( var firstRoot = ClientApiResultReader.Read(first); var secondRoot = ClientApiResultReader.Read(second); - var deviceCount = await db.TenantDb.Queryable().CountAsync(); + var deviceCount = await db.Db.Queryable().CountAsync(); Assert.Equal(0, ClientApiResultReader.Code(firstRoot)); Assert.Equal(0, ClientApiResultReader.Code(secondRoot)); // 幂等:两次注册仅落一行,DeviceId 一致 @@ -126,12 +126,12 @@ public async Task GameAssetPackageVersion_RegisterDevice_IdempotentByIdentifier( public async Task GameRemoteConfig_GetInfo_ReturnsMainDatabaseContentAndPascalCasePayload() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppPackageEntity)); db.SeedRemoteConfig(1, "com.gameframex.c108", "{\"feature\":\"on\"}"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var delivery = new RemoteConfigDeliveryService(db.Repository(), resolver); - var controller = new GameRemoteConfigController(db.Repository(), delivery); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var resolver = new GameAppPackageResolver(db.DbProvider); + var delivery = new RemoteConfigDeliveryService(db.Repository(), resolver); + var controller = new GameRemoteConfigController(db.Repository(), delivery); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetInfo(new RemoteConfigRequest { @@ -158,8 +158,8 @@ public async Task GameArea_GetAreaList_FiltersDisabledAreaAndSuppressesManagerUr db.SeedAreaClassify(10); db.SeedArea(100, 10); db.SeedArea(101, 10, false); - var controller = new GameAreaController(db.Repository(), FakeOptionsProvider.WithAreaPolicy(false)); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var controller = new GameAreaController(db.Repository(), FakeOptionsProvider.WithAreaPolicy(false)); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetAreaList(new GameAreaGetAreaListRequest()); @@ -178,8 +178,8 @@ public async Task Announcement_ListByAreaId_FallsBackToDefaultLanguageAndSkipsIn db.SeedAnnouncement(1, 100, "default", "Area default"); db.SeedAnnouncement(2, 100, "fr-FR", "Inactive localized", false); db.SeedAnnouncement(3, null, "default", "Global default"); - var controller = new GameAnnouncementController(db.Repository()); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var controller = new GameAnnouncementController(db.Repository()); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.ListByAreaId(new GameAnnouncementListRequest { Id = 100, Language = "fr-FR", }); @@ -197,14 +197,14 @@ public async Task GameLoginTicketKey_PublicKeys_ReturnsPublicKeysWithoutPrivateM var resolver = new StaticGameLoginTicketKeyResolver(); var controller = new GameLoginTicketKeyController(resolver); using var db = new ClientApiTestDb(10, 20); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.PublicKeys(); var root = ClientApiResultReader.Read(result); var key = ClientApiResultReader.Data(root)[0]; Assert.Equal(0, ClientApiResultReader.Code(root)); - Assert.Equal("tenant-10-app-20-test", key.GetProperty("Kid").GetString()); + Assert.Equal("10-app-20-test", key.GetProperty("Kid").GetString()); Assert.Equal("public-key", key.GetProperty("PublicKeyPem").GetString()); Assert.False(key.TryGetProperty("PrivateKeyPem", out _)); } @@ -215,14 +215,14 @@ public async Task GameLoginTicketKey_PublicKeys_WithoutRequestScope_ReturnsKeys( var resolver = new StaticGameLoginTicketKeyResolver(); var controller = new GameLoginTicketKeyController(resolver); using var db = new ClientApiTestDb(10, 20); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.PublicKeys(); var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); var key = ClientApiResultReader.Data(root)[0]; - Assert.False(key.TryGetProperty("TenantId", out _)); + Assert.False(key.TryGetProperty("Id", out _)); Assert.False(key.TryGetProperty("AppId", out _)); } @@ -230,18 +230,18 @@ public async Task GameLoginTicketKey_PublicKeys_WithoutRequestScope_ReturnsKeys( public async Task GameLoginTicketKeyResolver_PublicKeys_DoesNotAutoCreateSigningKey() { using var db = new ClientApiTestDb(10, 20); - db.InitTenantTables(typeof(TenantGameLoginTicketKeyEntity)); - var resolver = new GameLoginTicketKeyResolver(db.TenantDbProvider, FakeOptionsProvider.WithTicketPolicy(DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60)); + db.InitBusinessTables(typeof(GameLoginTicketKeyEntity)); + var resolver = new GameLoginTicketKeyResolver(db.DbProvider, FakeOptionsProvider.WithTicketPolicy(DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60)); var publicKeys = await resolver.GetPublicKeysAsync(); Assert.Empty(publicKeys); - Assert.Equal(0, await db.TenantDb.Queryable().CountAsync()); + Assert.Equal(0, await db.Db.Queryable().CountAsync()); var signingKey = await resolver.ResolveSigningKeyAsync(); Assert.False(string.IsNullOrWhiteSpace(signingKey.Kid)); - Assert.Equal(1, await db.TenantDb.Queryable().CountAsync()); + Assert.Equal(1, await db.Db.Queryable().CountAsync()); Assert.Single(await resolver.GetPublicKeysAsync()); } @@ -257,7 +257,7 @@ public Task> GetPublicKeysAsync() IReadOnlyCollection keys = new[] { new GameLoginTicketPublicKey( - "tenant-10-app-20-test", + "10-app-20-test", GameLoginTicketSigningKey.AlgorithmRs256, "public-key", DateTimeOffset.UtcNow.AddMinutes(-5).ToUnixTimeSeconds(), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverage.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverage.cs index 1c88f56b..69929d40 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverage.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverage.cs @@ -5,7 +5,7 @@ internal sealed record ClientApiEndpointCoverage( string HttpMethod, string Route, string Group, - bool RequiresTenant, + bool Requires, bool RequiresApp, bool RequiresAccessToken, bool IsPublicCallback, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs index dc03bd54..4bee0f30 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs @@ -6,10 +6,10 @@ internal static class ClientApiEndpointCoverageMatrix { private static readonly ClientApiEndpointCoverage[] Endpoints = { - Endpoint("GameAdWebHook.TopOnNotify", "GET", "api/GameAdWebHook/TopOnNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid TopOn callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), - Endpoint("GameAdWebHook.PangleGlobalNotify", "GET", "api/GameAdWebHook/PangleGlobalNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid Pangle callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-app"), - Endpoint("GameAdWebHook.AdMobNotify", "GET", "api/GameAdWebHook/AdMobNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid AdMob callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-tenant"), - Endpoint("GameAdWebHook.UnityAdsNotify", "GET", "api/GameAdWebHook/UnityAdsNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid UnityAds callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback"), + Endpoint("GameAdWebHook.TopOnNotify", "GET", "api/GameAdWebHook/TopOnNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid TopOn callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), + Endpoint("GameAdWebHook.PangleGlobalNotify", "GET", "api/GameAdWebHook/PangleGlobalNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid Pangle callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-app"), + Endpoint("GameAdWebHook.AdMobNotify", "GET", "api/GameAdWebHook/AdMobNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid AdMob callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-tenant"), + Endpoint("GameAdWebHook.UnityAdsNotify", "GET", "api/GameAdWebHook/UnityAdsNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid UnityAds callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback"), Endpoint("GameAnnouncement.List", "GET", "api/GameAnnouncementService/List", "announcement", true, true, false, false, "lists enabled announcements by language", "missing-tenant", "disabled-record-hidden"), Endpoint("GameAnnouncement.ListByAreaId", "POST", "api/GameAnnouncementService/ListByAreaId", "announcement", true, true, false, false, "lists enabled area announcements", "missing-tenant", "area-not-found"), @@ -72,9 +72,9 @@ internal static class ClientApiEndpointCoverageMatrix Endpoint("GameUserArchive.Download", "POST", "api/GameUserArchive/Download", "archive", true, true, false, false, "downloads owned archive snapshot", "archive-not-found"), Endpoint("GameUserArchive.GetOtherProgress", "POST", "api/GameUserArchive/GetOtherProgress", "archive", true, true, false, false, "returns other players progress summary", "progress-not-found"), - Endpoint("GameUserEmail.SendRegister", "POST", "api/GameUserEmail/SendRegister", "email-code", true, true, false, false, "sends register code through tenant email", "missing-app", "rate-limited", "daily-limit", "tenant-email-missing"), + Endpoint("GameUserEmail.SendRegister", "POST", "api/GameUserEmail/SendRegister", "email-code", true, true, false, false, "sends register code through tenant email", "missing-app", "rate-limited", "daily-limit", "email-missing"), Endpoint("GameUserEmail.VerifyCode", "POST", "api/GameUserEmail/VerifyCode", "email-code", true, true, false, false, "verifies active code", "code-not-found", "code-expired"), - Endpoint("GameUserEmail.SendReset", "POST", "api/GameUserEmail/SendReset", "email-code", true, true, false, false, "sends reset code for existing account", "missing-app", "account-not-found", "rate-limited", "tenant-email-missing"), + Endpoint("GameUserEmail.SendReset", "POST", "api/GameUserEmail/SendReset", "email-code", true, true, false, false, "sends reset code for existing account", "missing-app", "account-not-found", "rate-limited", "email-missing"), Endpoint("GameUserMisc.MarkLogout", "POST", "api/GameUserMisc/MarkLogout", "misc", true, true, false, false, "marks user logout state", "account-not-found"), Endpoint("GameUserMisc.RandomRobots", "POST", "api/GameUserMisc/RandomRobots", "misc", true, true, false, false, "returns random robot users excluding caller", "empty-robot-pool"), @@ -109,7 +109,7 @@ private static ClientApiEndpointCoverage Endpoint( string httpMethod, string route, string group, - bool requiresTenant, + bool requires, bool requiresApp, bool requiresAccessToken, bool isPublicCallback, @@ -121,7 +121,7 @@ private static ClientApiEndpointCoverage Endpoint( httpMethod, route, group, - requiresTenant, + requires, requiresApp, requiresAccessToken, isPublicCallback, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs index 1d7236a0..b7374e53 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs @@ -54,9 +54,9 @@ public void PublicCallbackEndpoints_DeclareOptionalPackageBoundary() foreach (var endpoint in callbacks) { Assert.Contains("invalid-route", endpoint.FailureCases); - Assert.DoesNotContain("{tenantId:long}", endpoint.Route); + Assert.DoesNotContain("{id:long}", endpoint.Route); Assert.DoesNotContain("{appId:long}", endpoint.Route); - Assert.False(endpoint.RequiresTenant); + Assert.False(endpoint.Requires); Assert.False(endpoint.RequiresApp); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs index 7a25c534..d9cc3624 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs @@ -3,8 +3,8 @@ using GameFrameX.Client.Api.GameFeatureSwitch.Dto; using GameFrameX.Client.Api.Services.PackageVersion; using GameFrameX.Core.Const; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.FeatureSwitch; namespace GameFrameX.Core.Tests.ClientApi; @@ -32,7 +32,7 @@ private static FeatureSwitchRequest Request(string? version = null, string? devi }; } - private static TenantGameAppFeatureSwitchEntity Row( + private static GameAppFeatureSwitchEntity Row( long id, string switchKey, string valueJson = "{}", @@ -42,7 +42,7 @@ private static TenantGameAppFeatureSwitchEntity Row( int rolloutPercent = 100, string? deviceWhitelistJson = null) { - return new TenantGameAppFeatureSwitchEntity + return new GameAppFeatureSwitchEntity { Id = id, SwitchKey = switchKey, @@ -63,8 +63,8 @@ private static TenantGameAppFeatureSwitchEntity Row( private static GameFeatureSwitchController CreateController(ClientApiTestDb db) { - var resolver = new FeatureSwitchDeliveryResolver(db.Repository()); - var packageResolver = new GameAppPackageResolver(db.TenantDbProvider); + var resolver = new FeatureSwitchDeliveryResolver(db.Repository()); + var packageResolver = new GameAppPackageResolver(db.DbProvider); return new GameFeatureSwitchController(resolver, packageResolver); } @@ -75,7 +75,7 @@ private static GameFeatureSwitchController CreateController(ClientApiTestDb db) public async Task GetInfo_FirstPull_ReturnsFullSwitchesWithVersion() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); db.SeedFeatureSwitch(Row(1, "activity.summer", "{\"enabled\":true}", audience: FeatureSwitchAudienceValues.Client)); db.SeedFeatureSwitch(Row(2, "login.banner", "{\"v\":1}", audience: FeatureSwitchAudienceValues.Both)); var controller = CreateController(db); @@ -106,7 +106,7 @@ public async Task GetInfo_FirstPull_ReturnsFullSwitchesWithVersion() public async Task GetInfo_SameVersion_ReturnsUnchangedWithEmptySwitches() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); db.SeedFeatureSwitch(Row(1, "login.banner", "{\"v\":1}")); var controller = CreateController(db); db.AttachContext(controller); @@ -128,7 +128,7 @@ public async Task GetInfo_SameVersion_ReturnsUnchangedWithEmptySwitches() public async Task GetInfo_AfterConfigChange_VersionChangesAndReturnsFullList() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); var row = db.SeedFeatureSwitch(Row(1, "login.banner", "{\"v\":1}")); var controller = CreateController(db); db.AttachContext(controller); @@ -137,7 +137,7 @@ public async Task GetInfo_AfterConfigChange_VersionChangesAndReturnsFullList() var oldVersion = first.GetProperty("Version").GetString(); row.ValueJson = "{\"v\":2}"; - db.TenantDb.Updateable(row).ExecuteCommand(); + db.Db.Updateable(row).ExecuteCommand(); var second = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.GetInfo(Request(version: oldVersion)))); @@ -155,7 +155,7 @@ public async Task GetInfo_AfterConfigChange_VersionChangesAndReturnsFullList() public async Task GetInfo_OutOfTimeWindow_NotDelivered() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); var now = DateTimeOffset.UtcNow; db.SeedFeatureSwitch(Row(1, "activity.ended", endTime: now.AddSeconds(-10).ToUnixTimeSeconds())); db.SeedFeatureSwitch(Row(2, "activity.future", startTime: now.AddSeconds(3600).ToUnixTimeSeconds())); @@ -180,7 +180,7 @@ public async Task GetInfo_OutOfTimeWindow_NotDelivered() public async Task GetInfo_AudienceServerRow_NotDeliveredOnClientChannel() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); db.SeedFeatureSwitch(Row(1, "economy.drop_rate", "{\"rate\":2}", audience: FeatureSwitchAudienceValues.Server)); db.SeedFeatureSwitch(Row(2, "login.banner", "{\"v\":1}", audience: FeatureSwitchAudienceValues.Both)); var controller = CreateController(db); @@ -200,7 +200,7 @@ public async Task GetInfo_AudienceServerRow_NotDeliveredOnClientChannel() public async Task GetInfo_RolloutZero_HiddenUnlessWhitelisted() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); db.SeedFeatureSwitch(Row(1, "activity.gray", "{\"v\":1}", rolloutPercent: 0)); db.SeedFeatureSwitch(Row(2, "activity.whitelist", "{\"v\":2}", rolloutPercent: 0, deviceWhitelistJson: "[\"Device-Alpha\"]")); var controller = CreateController(db); @@ -220,7 +220,7 @@ public async Task GetInfo_RolloutZero_HiddenUnlessWhitelisted() public async Task GetInfo_MissingDeviceId_OnlyFullRolloutRowsDelivered() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); db.SeedFeatureSwitch(Row(1, "activity.full", "{\"v\":1}", rolloutPercent: 100)); db.SeedFeatureSwitch(Row(2, "activity.partial", "{\"v\":2}", rolloutPercent: 50)); var controller = CreateController(db); @@ -240,9 +240,9 @@ public async Task GetInfo_MissingDeviceId_OnlyFullRolloutRowsDelivered() public async Task GetInfo_WithoutTenantContext_ReadsMainDatabase() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); var controller = CreateController(db); - db.AttachContext(controller, includeTenant: false); + db.AttachContext(controller, include: false); db.SeedFeatureSwitch(Row(1, "activity.main")); var result = ClientApiResultReader.Read(await controller.GetInfo(Request())); @@ -257,7 +257,7 @@ public async Task GetInfo_WithoutTenantContext_ReadsMainDatabase() public async Task GetInfo_WithoutApplicationContext_ReadsMainDatabase() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity), typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppFeatureSwitchEntity), typeof(GameAppPackageEntity)); var controller = CreateController(db); db.AttachContext(controller, includeApp: false); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs index 2952eae4..decbd77e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Application.PlayerCenter.GameUser; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -31,7 +31,7 @@ public async Task GameUser_DeviceLogin_FirstLoginCreatesAccountWithIsNewRegister var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.DeviceId == "device-c320-a1"); + var saved = await db.Db.Queryable().FirstAsync(u => u.DeviceId == "device-c320-a1"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.True(data.GetProperty("IsNewRegister").GetBoolean()); Assert.Equal("Device", data.GetProperty("Provider").GetString()); @@ -62,7 +62,7 @@ public async Task GameUser_DeviceLogin_SecondLoginFindsAccountWithoutReRegister( var secondRoot = ClientApiResultReader.Read(second); var firstData = ClientApiResultReader.Data(firstRoot); var secondData = ClientApiResultReader.Data(secondRoot); - var count = await db.TenantDb.Queryable().CountAsync(u => u.DeviceId == "device-c320-a2"); + var count = await db.Db.Queryable().CountAsync(u => u.DeviceId == "device-c320-a2"); Assert.Equal(0, ClientApiResultReader.Code(secondRoot)); // 二次登录找号复用既有账号:IsNewRegister=false 且不重复建号 Assert.True(firstData.GetProperty("IsNewRegister").GetBoolean()); @@ -128,12 +128,12 @@ public async Task GameUser_DeviceLogin_RejectsDeletedAndDisabledAccount() private static GameUserController CreateController(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameUserEntity), typeof(TenantGameUserEmailEntity), typeof(TenantSessionKeyEntity)); + db.InitBusinessTables(typeof(GameUserEntity), typeof(GameUserEmailEntity), typeof(SessionKeyEntity)); return new GameUserController( - db.Repository(), + db.Repository(), CreateTokenIssuer(), - new ClientApiSessionKeyIssuer(db.Repository()), - db.Repository(), + new ClientApiSessionKeyIssuer(db.Repository()), + db.Repository(), new FakeGamePenaltyEnforcementService(), new GameUserPasswordService()); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTenantOptionsProviderTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOptionsProviderTests.cs similarity index 67% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTenantOptionsProviderTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOptionsProviderTests.cs index 27c2d298..201067f7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTenantOptionsProviderTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOptionsProviderTests.cs @@ -1,8 +1,8 @@ -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; namespace GameFrameX.Core.Tests.ClientApi; -public class ClientApiTenantOptionsProviderTests +public class ClientApiOptionsProviderTests { [Theory] [InlineData("", 0)] @@ -12,7 +12,7 @@ public class ClientApiTenantOptionsProviderTests [InlineData("k1=, =base64b", 0)] public void ParseAdMobKeys_HandlesFormats(string raw, int expectedCount) { - var keys = ClientApiTenantOptionsProvider.ParseAdMobKeys(raw); + var keys = ClientApiOptionsProvider.ParseAdMobKeys(raw); Assert.Equal(expectedCount, keys.Count); } @@ -20,7 +20,7 @@ public void ParseAdMobKeys_HandlesFormats(string raw, int expectedCount) [Fact] public void ParseAdMobKeys_PreservesKeyIdAndValue() { - var keys = ClientApiTenantOptionsProvider.ParseAdMobKeys("123=abc==,456=xyz"); + var keys = ClientApiOptionsProvider.ParseAdMobKeys("123=abc==,456=xyz"); Assert.Equal("abc==", keys["123"]); Assert.Equal("xyz", keys["456"]); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs index 82bbbcbc..8df584ba 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Application.CommerceCenter.GameOrder; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.Abstract; using GameFrameX.Payment.Abstract.Interface; using GameFrameX.Payment.Abstract.Models; @@ -25,7 +25,7 @@ public async Task GameOrder_Create_PersistsTrustedOrderWhenPaymentChannelSucceed var controller = CreateController(db, factory); db.AttachContext(controller); - var result = await controller.Create(new CreateTenantGameOrderEntityRequest + var result = await controller.Create(new CreateGameOrderEntityRequest { RoleId = 3001, AreaId = 2001, @@ -39,7 +39,7 @@ public async Task GameOrder_Create_PersistsTrustedOrderWhenPaymentChannelSucceed var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.RoleId == "3001"); + var saved = await db.Db.Queryable().FirstAsync(u => u.RoleId == "3001"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal("provider-order-1", data.GetProperty("OrderId").GetString()); Assert.Equal(OrderStatusEnum.Unpaid, saved.Status); @@ -53,7 +53,7 @@ public async Task GameOrder_Create_ValidatesAreaWithoutLegacyAppContext() var controller = CreateController(db, new TestPaymentChannelFactory(new TestPaymentChannelHandler("testpay"))); db.AttachContext(controller, includeApp: false); - var result = await controller.Create(new CreateTenantGameOrderEntityRequest + var result = await controller.Create(new CreateGameOrderEntityRequest { RoleId = 3001, AreaId = 2001, @@ -80,7 +80,7 @@ public async Task GameOrder_Create_RejectsUnsupportedPayChannel() var controller = CreateController(db, new TestPaymentChannelFactory()); db.AttachContext(controller); - var result = await controller.Create(new CreateTenantGameOrderEntityRequest + var result = await controller.Create(new CreateGameOrderEntityRequest { RoleId = 3001, AreaId = 2001, @@ -93,7 +93,7 @@ public async Task GameOrder_Create_RejectsUnsupportedPayChannel() }); var root = ClientApiResultReader.Read(result); - var orderCount = await db.TenantDb.Queryable().CountAsync(); + var orderCount = await db.Db.Queryable().CountAsync(); Assert.Equal((int)PaymentErrorCode.PayChannelNotSupported, ClientApiResultReader.Code(root)); Assert.Equal("不支持的支付渠道", ClientApiResultReader.Message(root)); Assert.Equal(0, orderCount); @@ -101,13 +101,13 @@ public async Task GameOrder_Create_RejectsUnsupportedPayChannel() private static GameOrderController CreateController(ClientApiTestDb db, IPaymentChannelFactory factory) { - db.InitTenantTables(typeof(TenantGameAreaEntity), typeof(TenantGameRoleEntity), typeof(TenantGameOrderEntity)); + db.InitBusinessTables(typeof(GameAreaEntity), typeof(GameRoleEntity), typeof(GameOrderEntity)); return new GameOrderController( - db.Repository(), + db.Repository(), FakeOptionsProvider.WithAreaPolicy(false), - db.Repository(), + db.Repository(), new HttpClient(ClientApiRecordingHttpHandler.WithGameServerDefaults(), false), - new GameOrderShipService(db.TenantDb, new ClientApiTestHttpClientFactory(ClientApiRecordingHttpHandler.WithGameServerDefaults())), + new GameOrderShipService(db.Db, new ClientApiTestHttpClientFactory(ClientApiRecordingHttpHandler.WithGameServerDefaults())), factory, new TestGooglePubSubPushAuthenticator(), new TestGooglePlayPurchaseService()); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs index 5fe0454a..0737623e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Client.Api.Services; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Json; using GameFrameX.Payment.Abstract; using GameFrameX.Payment.AliPay; @@ -39,8 +39,8 @@ public async Task GameOrder_NotifyAliPay_ValidSignatureShipsOrderOnce() var result = await controller.NotifyAliPay(); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -62,7 +62,7 @@ public async Task GameOrder_NotifyAliPay_RejectsInvalidSignature() var result = await controller.NotifyAliPay(); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal((int)AuthErrorCode.SignatureVerifyFailed, ClientApiResultReader.Code(root)); Assert.Equal("签名验证失败", ClientApiResultReader.Message(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); @@ -88,7 +88,7 @@ public async Task GameOrder_NotifyXsolla_ValidSignatureShipsOrderOnce() var result = await controller.NotifyXsolla(); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal("9007001", order.ProviderTransactionId); @@ -141,7 +141,7 @@ public async Task GameOrder_NotifyGoogle_ValidAuthenticatedPushShipsOrderOnce() var result = await controller.NotifyGoogle(); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal("google-provider-order-1", order.ProviderTransactionId); @@ -201,7 +201,7 @@ public async Task GameOrder_NotifyApple_ValidJwsShipsOrderOnce() var result = await controller.NotifyApple(); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal("apple-transaction-1", order.AppleTransactionId); @@ -228,14 +228,14 @@ private static GameOrderController CreateController( IGooglePubSubPushAuthenticator? authenticator = null, IGooglePlayPurchaseService? googlePurchaseService = null) { - db.InitTenantTables(typeof(TenantGameAreaEntity), typeof(TenantGameRoleEntity), typeof(TenantGameOrderEntity), typeof(TenantGameOrderFulfillmentEntity)); + db.InitBusinessTables(typeof(GameAreaEntity), typeof(GameRoleEntity), typeof(GameOrderEntity), typeof(GameOrderFulfillmentEntity)); #pragma warning disable CS8625 // 测试桩:默认未配置 Google 购买验证服务,模拟 null 结果 return new GameOrderController( - db.Repository(), + db.Repository(), FakeOptionsProvider.WithAreaPolicy(false), - db.Repository(), + db.Repository(), new HttpClient(handler, false), - new GameOrderShipService(db.TenantDb, new ClientApiTestHttpClientFactory(handler)), + new GameOrderShipService(db.Db, new ClientApiTestHttpClientFactory(handler)), factory, authenticator ?? new TestGooglePubSubPushAuthenticator(false), googlePurchaseService ?? new TestGooglePlayPurchaseService(null)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs index e422bed9..4b655e0a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.PlayerCenter.GamePenalty; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -16,10 +16,10 @@ public sealed class ClientApiPenaltyEnforcementTests public async Task Ban_ActiveUnexpired_ReturnsPenalty() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGamePenaltyEntity)); + db.InitBusinessTables(typeof(GamePenaltyEntity)); SeedPenalty(db, 1, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null, db.AppId); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); var hit = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, "user-1001"); Assert.NotNull(hit); @@ -30,10 +30,10 @@ public async Task Ban_ActiveUnexpired_ReturnsPenalty() public async Task RestrictLogin_Active_BlocksLogin() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGamePenaltyEntity)); + db.InitBusinessTables(typeof(GamePenaltyEntity)); SeedPenalty(db, 2, PenaltyActionTypeEnum.RestrictLogin, PenaltyStatusEnum.Active, null, db.AppId); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); var hit = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, "user-1001"); Assert.NotNull(hit); @@ -43,10 +43,10 @@ public async Task RestrictLogin_Active_BlocksLogin() public async Task Mute_Active_NeverBlocksLogin() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGamePenaltyEntity)); + db.InitBusinessTables(typeof(GamePenaltyEntity)); SeedPenalty(db, 3, PenaltyActionTypeEnum.Mute, PenaltyStatusEnum.Active, null, db.AppId); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); var hit = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, "user-1001"); Assert.Null(hit); @@ -56,10 +56,10 @@ public async Task Mute_Active_NeverBlocksLogin() public async Task Ban_Revoked_NeverBlocksLogin() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGamePenaltyEntity)); + db.InitBusinessTables(typeof(GamePenaltyEntity)); SeedPenalty(db, 4, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Revoked, null, db.AppId); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); var hit = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, "user-1001"); Assert.Null(hit); @@ -69,10 +69,10 @@ public async Task Ban_Revoked_NeverBlocksLogin() public async Task Ban_Expired_NeverBlocksLogin() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGamePenaltyEntity)); + db.InitBusinessTables(typeof(GamePenaltyEntity)); SeedPenalty(db, 5, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, DateTimeOffset.UtcNow.AddMinutes(-1), db.AppId); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); var hit = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, "user-1001"); Assert.Null(hit); @@ -82,10 +82,10 @@ public async Task Ban_Expired_NeverBlocksLogin() public async Task Ban_MainDatabaseDefault_BlocksAccount() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGamePenaltyEntity)); + db.InitBusinessTables(typeof(GamePenaltyEntity)); SeedPenalty(db, 6, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null, 0); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); var hit = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, "user-1001"); Assert.NotNull(hit); @@ -95,10 +95,10 @@ public async Task Ban_MainDatabaseDefault_BlocksAccount() public async Task Ban_AreaScoped_OnlyMatchesSameArea() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGamePenaltyEntity)); + db.InitBusinessTables(typeof(GamePenaltyEntity)); SeedPenalty(db, 7, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null, db.AppId, 2001); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); // 同区服命中 var hitSame = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Role, "role-3001", 2001); @@ -118,7 +118,7 @@ private static void SeedPenalty( long appId, long? areaId = null) { - var entity = new TenantGamePenaltyEntity + var entity = new GamePenaltyEntity { Id = id, AreaId = areaId, @@ -130,6 +130,6 @@ private static void SeedPenalty( ExpireTime = expiresAt?.ToUnixTimeSeconds(), OperatorId = 1, }; - db.TenantDb.Insertable(entity).ExecuteCommand(); + db.Db.Insertable(entity).ExecuteCommand(); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPolicyScopeResolutionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPolicyScopeResolutionTests.cs index 29a977fa..1d752157 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPolicyScopeResolutionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPolicyScopeResolutionTests.cs @@ -1,5 +1,5 @@ -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Client.Api.Services.ClientApiOptions; +using GameFrameX.Entity.Business.ClientApiConfig; using Microsoft.AspNetCore.Http; namespace GameFrameX.Core.Tests.ClientApi; @@ -10,7 +10,7 @@ public sealed class ClientApiPolicyScopeResolutionTests : IDisposable public ClientApiPolicyScopeResolutionTests() { - _database.InitTenantTables(typeof(TenantClientApiPolicyEntity)); + _database.InitBusinessTables(typeof(ClientApiPolicyEntity)); } [Fact] @@ -19,11 +19,11 @@ public async Task AllSections_UseLatestEnabledRowWithoutRequestContext() var expireTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 3600; _database.MainDb.Insertable(new[] { - new TenantClientApiPolicyEntity { Id = 1, SigningKey = "old-key", IsEnabled = true, }, - new TenantClientApiPolicyEntity { Id = 2, SigningKey = "current-key", LifetimeMinutes = 60, + new ClientApiPolicyEntity { Id = 1, SigningKey = "old-key", IsEnabled = true, }, + new ClientApiPolicyEntity { Id = 2, SigningKey = "current-key", LifetimeMinutes = 60, TicketExpireTime = expireTime, EnableKeyAutoCreate = true, EnableSandBoxRecharge = true, EnableReturnHttpManager = true, IsEnabled = true, }, - new TenantClientApiPolicyEntity { Id = 3, SigningKey = "disabled-key", IsEnabled = false, }, + new ClientApiPolicyEntity { Id = 3, SigningKey = "disabled-key", IsEnabled = false, }, }).ExecuteCommand(); var provider = CreateProvider(); @@ -36,7 +36,7 @@ public async Task AllSections_UseLatestEnabledRowWithoutRequestContext() [Fact] public async Task DisabledRows_AreNotConsumed() { - _database.MainDb.Insertable(new TenantClientApiPolicyEntity + _database.MainDb.Insertable(new ClientApiPolicyEntity { Id = 1, SigningKey = "disabled", IsEnabled = false, EnableSandBoxRecharge = true, }).ExecuteCommand(); @@ -60,13 +60,13 @@ public async Task NoRows_ReturnsPlatformDefaults() [Fact] public async Task AllSections_ShareOneRequestSnapshot() { - _database.MainDb.Insertable(new TenantClientApiPolicyEntity + _database.MainDb.Insertable(new ClientApiPolicyEntity { Id = 1, SigningKey = "cached-key", IsEnabled = true, }).ExecuteCommand(); var provider = CreateProvider(); Assert.Equal("cached-key", (await provider.GetTokenPolicyAsync()).SigningKey); - _database.MainDb.Insertable(new TenantClientApiPolicyEntity + _database.MainDb.Insertable(new ClientApiPolicyEntity { Id = 2, SigningKey = "new-key", IsEnabled = true, EnableSandBoxRecharge = true, }).ExecuteCommand(); @@ -76,9 +76,9 @@ public async Task AllSections_ShareOneRequestSnapshot() Assert.True((await CreateProvider().GetOrderPolicyAsync()).EnableSandBoxRecharge); } - private ClientApiTenantOptionsProvider CreateProvider() + private ClientApiOptionsProvider CreateProvider() { - return new ClientApiTenantOptionsProvider(_database.MainDb, new HttpContextAccessor()); + return new ClientApiOptionsProvider(_database.MainDb, new HttpContextAccessor()); } public void Dispose() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs index f6b40982..6acd6275 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Client.Api.GameRedeemCode; using GameFrameX.Client.Api.GameRedeemCode.Dto; using GameFrameX.Client.Api.GameWebShop.Dto; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Json; namespace GameFrameX.Core.Tests.ClientApi; @@ -30,8 +30,8 @@ public async Task GameRedeemCode_Consume_AppliesRewardsAndWritesUseRecord() }); var root = ClientApiResultReader.Read(result); - var usedRecordCount = await db.TenantDb.Queryable().CountAsync(); - var code = await db.TenantDb.Queryable().FirstAsync(u => u.Code == "C108-REDEEM"); + var usedRecordCount = await db.Db.Queryable().CountAsync(); + var code = await db.Db.Queryable().FirstAsync(u => u.Code == "C108-REDEEM"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(1, usedRecordCount); Assert.Equal(1, code.UsedCount); @@ -88,8 +88,8 @@ public async Task GameRedeemCode_Consume_RejectsAlreadyUsedCode() { new PropertyItemResponse { Id = 11, ItemId = 11, Count = 2, }, })); - db.InitTenantTables(typeof(TenantGameRedeemCodeUseRecordEntity)); - await db.TenantDb.Insertable(new TenantGameRedeemCodeUseRecordEntity + db.InitBusinessTables(typeof(GameRedeemCodeUseRecordEntity)); + await db.Db.Insertable(new GameRedeemCodeUseRecordEntity { Id = 9001, AreaId = 2001, @@ -154,7 +154,7 @@ public async Task GameRedeemCode_Consume_AllowsWithoutChannelLimit() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usageCount = await db.TenantDb.Queryable().CountAsync(); + var usageCount = await db.Db.Queryable().CountAsync(); Assert.Equal(0, usageCount); } @@ -182,7 +182,7 @@ public async Task GameRedeemCode_Consume_AllowsWhenChannelRoleUsageLimitZero() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usageCount = await db.TenantDb.Queryable().CountAsync(); + var usageCount = await db.Db.Queryable().CountAsync(); Assert.Equal(0, usageCount); } @@ -203,8 +203,8 @@ public async Task GameRedeemCode_Consume_RejectsWhenChannelRoleLimitReached() { new PropertyItemResponse { Id = 12, ItemId = 12, Count = 1, }, }), channelId: 5001); - db.InitTenantTables(typeof(TenantGameRedeemCodeChannelRoleUsageEntity)); - await db.TenantDb.Insertable(new TenantGameRedeemCodeChannelRoleUsageEntity + db.InitBusinessTables(typeof(GameRedeemCodeChannelRoleUsageEntity)); + await db.Db.Insertable(new GameRedeemCodeChannelRoleUsageEntity { Id = 9001, ChannelId = 5001, @@ -253,7 +253,7 @@ public async Task GameRedeemCode_Consume_AccumulatesChannelRoleUsageOnSuccess() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usage = await db.TenantDb.Queryable() + var usage = await db.Db.Queryable() .Where(u => u.ChannelId == 5001 && u.RoleId == 3001).FirstAsync(); Assert.NotNull(usage); Assert.Equal(1, usage.UsedCount); @@ -277,8 +277,8 @@ public async Task GameRedeemCode_Consume_IncrementsExistingChannelRoleUsage() { new PropertyItemResponse { Id = 12, ItemId = 12, Count = 1, }, }), channelId: 5001); - db.InitTenantTables(typeof(TenantGameRedeemCodeChannelRoleUsageEntity)); - await db.TenantDb.Insertable(new TenantGameRedeemCodeChannelRoleUsageEntity + db.InitBusinessTables(typeof(GameRedeemCodeChannelRoleUsageEntity)); + await db.Db.Insertable(new GameRedeemCodeChannelRoleUsageEntity { Id = 9001, ChannelId = 5001, @@ -299,7 +299,7 @@ await db.TenantDb.Insertable(new TenantGameRedeemCodeChannelRoleUsageEntity var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usage = await db.TenantDb.Queryable() + var usage = await db.Db.Queryable() .Where(u => u.ChannelId == 5001 && u.RoleId == 3001).FirstAsync(); Assert.Equal(2, usage.UsedCount); Assert.Equal("C108-INC-B", usage.LastCode); @@ -340,9 +340,9 @@ public async Task GameRedeemCode_Consume_DifferentChannelsDoNotShareQuota() Assert.Equal(0, ClientApiResultReader.Code(ClientApiResultReader.Read(first))); Assert.Equal(0, ClientApiResultReader.Code(ClientApiResultReader.Read(second))); - var countA = await db.TenantDb.Queryable() + var countA = await db.Db.Queryable() .Where(u => u.ChannelId == 5001 && u.RoleId == 3001).CountAsync(); - var countB = await db.TenantDb.Queryable() + var countB = await db.Db.Queryable() .Where(u => u.ChannelId == 5002 && u.RoleId == 3001).CountAsync(); Assert.Equal(1, countA); Assert.Equal(1, countB); @@ -414,18 +414,18 @@ public async Task GameRedeemCode_Consume_RejectsWhenChannelMissing() private static GameRedeemCodeController CreateController(ClientApiTestDb db, ClientApiRecordingHttpHandler? handler = null) { - db.InitTenantTables( - typeof(TenantGameRedeemCodeEntity), - typeof(TenantGameRedeemCodeUseRecordEntity), - typeof(TenantGameRedeemCodeChannelEntity), - typeof(TenantGameRedeemCodeChannelRoleUsageEntity), - typeof(TenantGameAreaEntity)); + db.InitBusinessTables( + typeof(GameRedeemCodeEntity), + typeof(GameRedeemCodeUseRecordEntity), + typeof(GameRedeemCodeChannelEntity), + typeof(GameRedeemCodeChannelRoleUsageEntity), + typeof(GameAreaEntity)); return new GameRedeemCodeController( - db.Repository(), - db.Repository(), - db.Repository(), - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), new HttpClient(handler ?? ClientApiRecordingHttpHandler.WithGameServerDefaults(), false)); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRiskPolicyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRiskPolicyTests.cs index 1c2443c6..b5d2821d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRiskPolicyTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRiskPolicyTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Core.Middleware; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; namespace GameFrameX.Core.Tests.ClientApi; @@ -11,7 +11,7 @@ public void Resolve_NoEnabledPolicy_FailsClosed() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantClientApiPolicyEntity)); + database.InitBusinessTables(typeof(ClientApiPolicyEntity)); var resolver = new GameAppRiskEnforcementModeResolver(database.MainDb); Assert.Equal(RiskEnforcementModeEnum.FailClosed, resolver.Resolve()); } @@ -22,12 +22,12 @@ public void Resolve_UsesLatestEnabledPolicy_WithoutRequestScope() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantClientApiPolicyEntity)); + database.InitBusinessTables(typeof(ClientApiPolicyEntity)); database.MainDb.Insertable(new[] { - new TenantClientApiPolicyEntity { Id = 1, IsEnabled = true, RiskPolicy = "FailOpen", }, - new TenantClientApiPolicyEntity { Id = 2, IsEnabled = true, SignatureRequired = true, RiskPolicy = "invalid", }, - new TenantClientApiPolicyEntity { Id = 3, IsEnabled = false, RiskPolicy = "FailOpen", }, + new ClientApiPolicyEntity { Id = 1, IsEnabled = true, RiskPolicy = "FailOpen", }, + new ClientApiPolicyEntity { Id = 2, IsEnabled = true, SignatureRequired = true, RiskPolicy = "invalid", }, + new ClientApiPolicyEntity { Id = 3, IsEnabled = false, RiskPolicy = "FailOpen", }, }).ExecuteCommand(); var resolver = new GameAppRiskEnforcementModeResolver(database.MainDb); Assert.Equal(RiskEnforcementModeEnum.FailClosed, resolver.Resolve()); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs index 127dd113..d7f357a7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs @@ -5,7 +5,7 @@ using System.Text.Json; using GameFrameX.Client.Api.GameRole.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.ClientApi; @@ -23,7 +23,7 @@ public async Task GameRole_Add_CreatesRoleWithoutAppContext() var controller = CreateController(db, handler); db.AttachContext(controller, includeApp: false); - var result = await controller.Add(new AddTenantGameRoleEntityRequest + var result = await controller.Add(new AddGameRoleEntityRequest { UserId = 1001, AreaId = 2001, @@ -33,7 +33,7 @@ public async Task GameRole_Add_CreatesRoleWithoutAppContext() }); var root = ClientApiResultReader.Read(result); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var saved = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(1001, saved.UserId); Assert.Equal(1, handler.Count("/game/api/req_player_create")); @@ -46,7 +46,7 @@ public async Task GameRole_Add_RejectsMissingAccountWithoutAppContext() var controller = CreateController(db); db.AttachContext(controller, includeApp: false); - var result = await controller.Add(new AddTenantGameRoleEntityRequest { UserId = 1001, AreaId = 2001, Name = "Hero", }); + var result = await controller.Add(new AddGameRoleEntityRequest { UserId = 1001, AreaId = 2001, Name = "Hero", }); var root = ClientApiResultReader.Read(result); Assert.Equal((int)AccountErrorCode.AccountExists, ClientApiResultReader.Code(root)); @@ -67,7 +67,7 @@ public async Task GameRole_ChangePlayerName_UpdatesNameAfterGameServerAccepts() var result = await controller.ChangePlayerName(new GamePlayerChangeNameRequest { PlayerId = 3001, AreaId = 2001, Name = "New", }); var root = ClientApiResultReader.Read(result); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var saved = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal("New", saved.Name); } @@ -95,7 +95,7 @@ public async Task GameRole_GetList_ReturnsOnlyRequestedUserRoles() var controller = CreateController(db); db.AttachContext(controller); - var result = await controller.GetList(new GetListTenantGameRoleEntityRequest { UserId = 1001, }); + var result = await controller.GetList(new GetListGameRoleEntityRequest { UserId = 1001, }); var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); @@ -114,8 +114,8 @@ public async Task GameRole_GetAndGetById_ReturnRoleDetails() var controller = CreateController(db); db.AttachContext(controller); - var get = await controller.Get(new GetTenantGameRoleEntityRequest { UserId = 1001, AreaId = 2001, }); - var getById = await controller.GetById(new GetByIdTenantGameRoleEntityRequest { Id = "3001", }); + var get = await controller.Get(new GetGameRoleEntityRequest { UserId = 1001, AreaId = 2001, }); + var getById = await controller.GetById(new GetByIdGameRoleEntityRequest { Id = "3001", }); Assert.Equal("Mine", ClientApiResultReader.Data(ClientApiResultReader.Read(get)).GetProperty("Name").GetString()); Assert.Equal("Area-2001", ClientApiResultReader.Data(ClientApiResultReader.Read(getById)).GetProperty("ServerName").GetString()); @@ -128,7 +128,7 @@ public async Task GameRole_GetById_RejectsInvalidId() var controller = CreateController(db); db.AttachContext(controller); - var result = await controller.GetById(new GetByIdTenantGameRoleEntityRequest { Id = "not-a-role-id", }); + var result = await controller.GetById(new GetByIdGameRoleEntityRequest { Id = "not-a-role-id", }); var root = ClientApiResultReader.Read(result); Assert.Equal((int)GameRoleErrorCode.RoleNotFound, ClientApiResultReader.Code(root)); @@ -143,10 +143,10 @@ public async Task GameRole_Delete_FakeDeletesExistingRole() var controller = CreateController(db); db.AttachContext(controller); - var result = await controller.Delete(new DeleteTenantGameRoleEntityRequest { Id = 3001, }); + var result = await controller.Delete(new DeleteGameRoleEntityRequest { Id = 3001, }); var root = ClientApiResultReader.Read(result); - var saved = await db.TenantDb.Queryable().Filter(null, true).FirstAsync(u => u.Id == 3001); + var saved = await db.Db.Queryable().Filter(null, true).FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.True(saved.IsDeleted); } @@ -160,7 +160,7 @@ public async Task GameRole_Login_IssuesGameTicketForOwnedRole() db.SeedArea(2001, 10); db.SeedRole(3001, 1001, 2001); var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); - var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); + var accessToken = await issuer.IssueAsync(await db.Db.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); var controller = CreateController(db, ClientApiRecordingHttpHandler.WithGameServerDefaults(), issuer); db.AttachContext(controller); @@ -192,7 +192,7 @@ public async Task GameRole_Login_RejectsBodyContextOverrideFields() AccessToken = "token", ExtraFields = new Dictionary { - ["tenantId"] = JsonDocument.Parse("10").RootElement.Clone(), + ["id"] = JsonDocument.Parse("10").RootElement.Clone(), }, }); @@ -207,11 +207,11 @@ public async Task GameRole_Update_PropagatesOptimisticLockConflict() using var db = new ClientApiTestDb(); var role = db.SeedRole(3001, 1001, 2001, name: "Old"); role.RowVersion = 7; - await db.TenantDb.Updateable(role).ExecuteCommandAsync(); + await db.Db.Updateable(role).ExecuteCommandAsync(); var controller = CreateController(db); db.AttachContext(controller); - await Assert.ThrowsAsync(() => controller.Update(new UpdateTenantGameRoleEntityRequest + await Assert.ThrowsAsync(() => controller.Update(new UpdateGameRoleEntityRequest { Id = 3001, UserId = 1001, @@ -227,11 +227,11 @@ private static GameRoleController CreateController( GameLoginTicketIssuer? ticketIssuer = null, FakeGamePenaltyEnforcementService? penaltyEnforcement = null) { - db.InitTenantTables(typeof(TenantGameRoleEntity), typeof(TenantGameAreaEntity), typeof(TenantGameUserEntity)); + db.InitBusinessTables(typeof(GameRoleEntity), typeof(GameAreaEntity), typeof(GameUserEntity)); return new GameRoleController( new HttpClient(handler ?? ClientApiRecordingHttpHandler.WithGameServerDefaults(), false), - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), issuer ?? new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)), ticketIssuer ?? new GameLoginTicketIssuer(TestGameLoginTicketKeyResolver.Create(), FakeOptionsProvider.WithTicketPolicy(DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60)), penaltyEnforcement ?? new FakeGamePenaltyEnforcementService()); @@ -251,7 +251,7 @@ public static TestGameLoginTicketKeyResolver Create() using var rsa = RSA.Create(2048); var privateKeyPem = rsa.ExportPkcs8PrivateKeyPem(); var publicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(); - return new TestGameLoginTicketKeyResolver(GameLoginTicketSigningKey.CreateRsa("tenant-10-app-20-role-test", privateKeyPem, publicKeyPem)); + return new TestGameLoginTicketKeyResolver(GameLoginTicketSigningKey.CreateRsa("10-app-20-role-test", privateKeyPem, publicKeyPem)); } public Task ResolveSigningKeyAsync() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs index e932e2ed..6d8b6d94 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Client.Api.Services.Auth; using System.Text.RegularExpressions; using GameFrameX.Client.Api.Services; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -17,8 +17,8 @@ public sealed class ClientApiSessionKeyIssuerTests public async Task Issue_PersistsKeyWithLeaseAlignedToExpire() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantSessionKeyEntity)); - var issuer = new ClientApiSessionKeyIssuer(db.Repository()); + db.InitBusinessTables(typeof(SessionKeyEntity)); + var issuer = new ClientApiSessionKeyIssuer(db.Repository()); var before = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); var expireAt = before + 3600; @@ -29,7 +29,7 @@ public async Task Issue_PersistsKeyWithLeaseAlignedToExpire() Assert.Matches("^[0-9a-f]{64}$", result.Secret); Assert.Equal(expireAt, result.ExpireTime); - var saved = await db.TenantDb.Queryable().FirstAsync(e => e.Kid == result.Kid); + var saved = await db.Db.Queryable().FirstAsync(e => e.Kid == result.Kid); Assert.NotNull(saved); Assert.Equal(result.Secret, saved.Secret); Assert.Equal(expireAt, saved.ExpireTime); @@ -43,27 +43,27 @@ public async Task Issue_PersistsKeyWithLeaseAlignedToExpire() public async Task Issue_DeletesExpiredKeysFromMainDatabase_KeepsLiveKeys() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantSessionKeyEntity)); + db.InitBusinessTables(typeof(SessionKeyEntity)); var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - db.TenantDb.Insertable(new[] + db.Db.Insertable(new[] { Seed(db.AppId, "sess-app-1-expired", now - 10), Seed(db.AppId, "sess-app-1-live", now + 3600), Seed(db.AppId + 1, "sess-app-2-expired", now - 10), }).ExecuteCommand(); - var issuer = new ClientApiSessionKeyIssuer(db.Repository()); + var issuer = new ClientApiSessionKeyIssuer(db.Repository()); await issuer.IssueAsync(now + 120); - var kids = await db.TenantDb.Queryable().Select(e => e.Kid).ToListAsync(); + var kids = await db.Db.Queryable().Select(e => e.Kid).ToListAsync(); Assert.DoesNotContain("sess-app-1-expired", kids); Assert.Contains("sess-app-1-live", kids); Assert.DoesNotContain("sess-app-2-expired", kids); } - private static TenantSessionKeyEntity Seed(long appId, string kid, long expireTime) + private static SessionKeyEntity Seed(long appId, string kid, long expireTime) { - return new TenantSessionKeyEntity + return new SessionKeyEntity { Kid = kid, Secret = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs index 6ae8b12b..d296fb3f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs @@ -7,13 +7,13 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Base; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Device; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Announcement; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Device; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Announcement; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Foundation.Json; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; @@ -28,29 +28,29 @@ internal sealed class ClientApiTestDb : IDisposable { private readonly List _dbPaths = new(); - public ClientApiTestDb(long tenantId = 1080001, long appId = 1081001) + public ClientApiTestDb(long id = 1080001, long appId = 1081001) { - TenantId = tenantId; + Id = id; AppId = appId; MainDb = CreateScope("main"); - TenantDbPath = CreateDatabasePath("tenant"); + DbPath = CreateDatabasePath("tenant"); - TenantDbProvider = MainDb; - TenantDb = TenantDbProvider; + DbProvider = MainDb; + Db = DbProvider; } - public long TenantId { get; } + public long Id { get; } public long AppId { get; } public SqlSugarScope MainDb { get; } - public ISqlSugarClient TenantDb { get; } + public ISqlSugarClient Db { get; } - public string TenantDbPath { get; } + public string DbPath { get; } - public ISqlSugarClient TenantDbProvider { get; } + public ISqlSugarClient DbProvider { get; } public Repository Repository() where T : EntityBase, new() @@ -58,23 +58,23 @@ public ClientApiTestDb(long tenantId = 1080001, long appId = 1081001) return new Repository(MainDb); } - public ClientApiTestDb InitTenantTables(params Type[] tableTypes) + public ClientApiTestDb InitBusinessTables(params Type[] tableTypes) { - TenantDb.CodeFirst.InitTables(tableTypes); + Db.CodeFirst.InitTables(tableTypes); return this; } - public DefaultHttpContext CreateHttpContext(bool includeTenant = true, bool includeApp = true) + public DefaultHttpContext CreateHttpContext(bool include = true, bool includeApp = true) { - return CreateHttpContext(includeTenant, includeApp, null); + return CreateHttpContext(include, includeApp, null); } - public DefaultHttpContext CreateHttpContext(bool includeTenant, bool includeApp, long? packageId) + public DefaultHttpContext CreateHttpContext(bool include, bool includeApp, long? packageId) { var context = new DefaultHttpContext(); - if (includeTenant) + if (include) { - context.Items["TenantId"] = TenantId; + context.Items["Id"] = Id; } if (packageId.HasValue) @@ -85,15 +85,15 @@ public DefaultHttpContext CreateHttpContext(bool includeTenant, bool includeApp, return context; } - public void AttachContext(Controller controller, bool includeTenant = true, bool includeApp = true) + public void AttachContext(Controller controller, bool include = true, bool includeApp = true) { - controller.ControllerContext = new ControllerContext { HttpContext = CreateHttpContext(includeTenant, includeApp), }; + controller.ControllerContext = new ControllerContext { HttpContext = CreateHttpContext(include, includeApp), }; } - public TenantGameAppPackageEntity SeedPackage(long packageId, string packageName) + public GameAppPackageEntity SeedPackage(long packageId, string packageName) { - InitTenantTables(typeof(TenantGameAppPackageEntity)); - var entity = WithSelect(new TenantGameAppPackageEntity + InitBusinessTables(typeof(GameAppPackageEntity)); + var entity = WithSelect(new GameAppPackageEntity { Id = packageId, Name = "C108 Test Package", @@ -105,14 +105,14 @@ public TenantGameAppPackageEntity SeedPackage(long packageId, string packageName IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameAreaClassifyEntity SeedAreaClassify(long classifyId) + public GameAreaClassifyEntity SeedAreaClassify(long classifyId) { - InitTenantTables(typeof(TenantGameAreaClassifyEntity)); - var entity = WithSelect(new TenantGameAreaClassifyEntity + InitBusinessTables(typeof(GameAreaClassifyEntity)); + var entity = WithSelect(new GameAreaClassifyEntity { Id = classifyId, Name = "Asia", @@ -127,14 +127,14 @@ public TenantGameAreaClassifyEntity SeedAreaClassify(long classifyId) IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameAreaEntity SeedArea(long areaId, long classifyId, bool isEnabled = true, GameServerStatus status = GameServerStatus.Online) + public GameAreaEntity SeedArea(long areaId, long classifyId, bool isEnabled = true, GameServerStatus status = GameServerStatus.Online) { - InitTenantTables(typeof(TenantGameAreaEntity)); - var entity = WithSelect(new TenantGameAreaEntity + InitBusinessTables(typeof(GameAreaEntity)); + var entity = WithSelect(new GameAreaEntity { Id = areaId, Name = $"Area-{areaId}", @@ -161,22 +161,22 @@ public TenantGameAreaEntity SeedArea(long areaId, long classifyId, bool isEnable AppVersion = "1.0.0", }); entity.IsEnabled = isEnabled; - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameAppFeatureSwitchEntity SeedFeatureSwitch(TenantGameAppFeatureSwitchEntity entity) + public GameAppFeatureSwitchEntity SeedFeatureSwitch(GameAppFeatureSwitchEntity entity) { - InitTenantTables(typeof(TenantGameAppFeatureSwitchEntity)); + InitBusinessTables(typeof(GameAppFeatureSwitchEntity)); WithBasic(entity); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameAppRemoteConfigEntity SeedRemoteConfig(long id, string packageName, string content) + public GameAppRemoteConfigEntity SeedRemoteConfig(long id, string packageName, string content) { - InitTenantTables(typeof(TenantGameAppRemoteConfigEntity)); - var entity = WithBasic(new TenantGameAppRemoteConfigEntity + InitBusinessTables(typeof(GameAppRemoteConfigEntity)); + var entity = WithBasic(new GameAppRemoteConfigEntity { Id = id, Platform = "ios", @@ -192,14 +192,14 @@ public TenantGameAppRemoteConfigEntity SeedRemoteConfig(long id, string packageN RolloutPercent = 100, Description = "C108 global info", }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameAppReleaseVersionEntity SeedAppVersion(long id, string packageName) + public GameAppReleaseVersionEntity SeedAppVersion(long id, string packageName) { - InitTenantTables(typeof(TenantGameAppReleaseVersionEntity)); - var entity = WithBasic(new TenantGameAppReleaseVersionEntity + InitBusinessTables(typeof(GameAppReleaseVersionEntity)); + var entity = WithBasic(new GameAppReleaseVersionEntity { Id = id, Platform = "ios", @@ -214,14 +214,14 @@ public TenantGameAppReleaseVersionEntity SeedAppVersion(long id, string packageN Announcement = "Upgrade now", Description = "C108 app version", }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameAppAssetPackageVersionEntity SeedAssetPackageVersion(long id, string packageName) + public GameAppAssetPackageVersionEntity SeedAssetPackageVersion(long id, string packageName) { - InitTenantTables(typeof(TenantGameAppAssetPackageVersionEntity), typeof(TenantGameAppDeviceEntity)); - var entity = WithBasic(new TenantGameAppAssetPackageVersionEntity + InitBusinessTables(typeof(GameAppAssetPackageVersionEntity), typeof(GameAppDeviceEntity)); + var entity = WithBasic(new GameAppAssetPackageVersionEntity { Id = id, Platform = "ios", @@ -234,14 +234,14 @@ public TenantGameAppAssetPackageVersionEntity SeedAssetPackageVersion(long id, s ResourceVersion = "2026.07.18", Description = "C108 asset package", }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameAnnouncementEntity SeedAnnouncement(long id, long? areaId, string language, string title, bool isActive = true) + public GameAnnouncementEntity SeedAnnouncement(long id, long? areaId, string language, string title, bool isActive = true) { - InitTenantTables(typeof(TenantGameAnnouncementEntity)); - var entity = WithBasic(new TenantGameAnnouncementEntity + InitBusinessTables(typeof(GameAnnouncementEntity)); + var entity = WithBasic(new GameAnnouncementEntity { Id = id, AreaId = areaId, @@ -255,11 +255,11 @@ public TenantGameAnnouncementEntity SeedAnnouncement(long id, long? areaId, stri IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameUserEntity SeedUser( + public GameUserEntity SeedUser( long userId, string userName, string password = "password", @@ -267,8 +267,8 @@ public TenantGameUserEntity SeedUser( string email = "", string deviceId = "") { - InitTenantTables(typeof(TenantGameUserEntity)); - var entity = WithSelect(new TenantGameUserEntity + InitBusinessTables(typeof(GameUserEntity)); + var entity = WithSelect(new GameUserEntity { Id = userId, Name = userName, @@ -290,14 +290,14 @@ public TenantGameUserEntity SeedUser( IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameRoleEntity SeedRole(long roleId, long userId, long areaId, long appId = 0, string name = "Role", bool isSandbox = false) + public GameRoleEntity SeedRole(long roleId, long userId, long areaId, long appId = 0, string name = "Role", bool isSandbox = false) { - InitTenantTables(typeof(TenantGameRoleEntity)); - var entity = WithSelect(new TenantGameRoleEntity + InitBusinessTables(typeof(GameRoleEntity)); + var entity = WithSelect(new GameRoleEntity { Id = roleId, UserId = userId, @@ -316,14 +316,14 @@ public TenantGameRoleEntity SeedRole(long roleId, long userId, long areaId, long AllRecharge = 0, OnlineTime = 0, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameGoodsEntity SeedGoods(long goodsId, long classifyId = 1, int configId = 10001, bool isEnabled = true) + public GameGoodsEntity SeedGoods(long goodsId, long classifyId = 1, int configId = 10001, bool isEnabled = true) { - InitTenantTables(typeof(TenantGameGoodsEntity)); - var entity = WithSelect(new TenantGameGoodsEntity + InitBusinessTables(typeof(GameGoodsEntity)); + var entity = WithSelect(new GameGoodsEntity { Id = goodsId, Name = $"Goods-{goodsId}", @@ -334,14 +334,14 @@ public TenantGameGoodsEntity SeedGoods(long goodsId, long classifyId = 1, int co IsEnabled = isEnabled, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameWebShopEntity SeedWebShop(long shopId, string realPrice, string itemJson, bool isUp = true, int weight = 10) + public GameWebShopEntity SeedWebShop(long shopId, string realPrice, string itemJson, bool isUp = true, int weight = 10) { - InitTenantTables(typeof(TenantGameWebShopEntity)); - var entity = WithSelect(new TenantGameWebShopEntity + InitBusinessTables(typeof(GameWebShopEntity)); + var entity = WithSelect(new GameWebShopEntity { Id = shopId, Name = $"Shop-{shopId}", @@ -355,14 +355,14 @@ public TenantGameWebShopEntity SeedWebShop(long shopId, string realPrice, string Sales = 0, Weight = weight, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameOrderEntity SeedOrder(long orderId, long roleId, long areaId, string payChannel = "google", OrderStatusEnum status = OrderStatusEnum.Unpaid, decimal amount = 100m, long sku = 1, string? providerTransactionId = null, string? orderProviderId = null, bool isSandbox = false) + public GameOrderEntity SeedOrder(long orderId, long roleId, long areaId, string payChannel = "google", OrderStatusEnum status = OrderStatusEnum.Unpaid, decimal amount = 100m, long sku = 1, string? providerTransactionId = null, string? orderProviderId = null, bool isSandbox = false) { - InitTenantTables(typeof(TenantGameOrderEntity)); - var entity = WithBasic(new TenantGameOrderEntity + InitBusinessTables(typeof(GameOrderEntity)); + var entity = WithBasic(new GameOrderEntity { Id = orderId, Status = status, @@ -395,14 +395,14 @@ public TenantGameOrderEntity SeedOrder(long orderId, long roleId, long areaId, s AppleVerifiedTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), ProviderTransactionId = providerTransactionId ?? string.Empty, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameRedeemCodeEntity SeedRedeemCode(long codeId, string code, long areaId, string contents, bool isActive = true, int usageLimit = 1, int usedCount = 0, DateTime? startTime = null, DateTime? endTime = null, long? channelId = null) + public GameRedeemCodeEntity SeedRedeemCode(long codeId, string code, long areaId, string contents, bool isActive = true, int usageLimit = 1, int usedCount = 0, DateTime? startTime = null, DateTime? endTime = null, long? channelId = null) { - InitTenantTables(typeof(TenantGameRedeemCodeEntity)); - var entity = WithBasic(new TenantGameRedeemCodeEntity + InitBusinessTables(typeof(GameRedeemCodeEntity)); + var entity = WithBasic(new GameRedeemCodeEntity { Id = codeId, AreaId = areaId, @@ -416,27 +416,27 @@ public TenantGameRedeemCodeEntity SeedRedeemCode(long codeId, string code, long EndTime = endTime != null ? new DateTimeOffset(endTime.Value).ToUnixTimeSeconds() : DateTimeOffset.Now.AddHours(1).ToUnixTimeSeconds(), Contents = contents, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameRedeemCodeChannelEntity SeedChannel(long channelId, string name, int roleUsageLimit = 0) + public GameRedeemCodeChannelEntity SeedChannel(long channelId, string name, int roleUsageLimit = 0) { - InitTenantTables(typeof(TenantGameRedeemCodeChannelEntity)); - var entity = WithSelect(new TenantGameRedeemCodeChannelEntity + InitBusinessTables(typeof(GameRedeemCodeChannelEntity)); + var entity = WithSelect(new GameRedeemCodeChannelEntity { Id = channelId, Name = name, RoleUsageLimit = roleUsageLimit, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameWebShopOrderEntity SeedWebShopOrder(long orderId, long roleId, long areaId, long shopId, string reason = "", bool orderStatus = false) + public GameWebShopOrderEntity SeedWebShopOrder(long orderId, long roleId, long areaId, long shopId, string reason = "", bool orderStatus = false) { - InitTenantTables(typeof(TenantGameWebShopOrderEntity)); - var entity = WithSelect(new TenantGameWebShopOrderEntity + InitBusinessTables(typeof(GameWebShopOrderEntity)); + var entity = WithSelect(new GameWebShopOrderEntity { Id = orderId, GameShopId = shopId, @@ -446,7 +446,7 @@ public TenantGameWebShopOrderEntity SeedWebShopOrder(long orderId, long roleId, OrderStatus = orderStatus, OrderId = $"webshop-{orderId}", }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } @@ -468,10 +468,10 @@ public SystemConfigEntity SeedSystemConfig(string code, string value, string nam return entity; } - public TenantGameUserEmailEntity SeedEmailCode(long id, string email, string code, bool expired = false) + public GameUserEmailEntity SeedEmailCode(long id, string email, string code, bool expired = false) { - InitTenantTables(typeof(TenantGameUserEmailEntity)); - var entity = WithBasic(new TenantGameUserEmailEntity + InitBusinessTables(typeof(GameUserEmailEntity)); + var entity = WithBasic(new GameUserEmailEntity { Id = id, Email = email, @@ -483,7 +483,7 @@ public TenantGameUserEmailEntity SeedEmailCode(long id, string email, string cod IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + Db.Insertable(entity).ExecuteCommand(); return entity; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs index f02573a3..e70e4769 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs @@ -4,10 +4,10 @@ using System.Text.Json; using GameFrameX.Client.Api.GameRole.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.IdentityModel.JsonWebTokens; namespace GameFrameX.Core.Tests.ClientApi; @@ -19,7 +19,7 @@ public async Task AccessToken_ValidatesUserSubject() { var provider = FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60); var issuer = new ClientApiTokenIssuer(provider); - var user = new TenantGameUserEntity + var user = new GameUserEntity { Id = 1001, Status = GameUserStatus.Active, @@ -60,7 +60,7 @@ public async Task GameLoginTicket_ContainsRequiredClaims() Assert.Equal(ClientApiPlatformDefaults.GameLoginTicketAudience, jwt.Audiences.Single()); Assert.Equal(keyResolver.Kid, jwt.Kid); Assert.Equal(keyResolver.Kid, ticket.Kid); - Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "tenantId"); + Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "id"); Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "appId"); Assert.Equal("30", jwt.Claims.Single(c => c.Type == "userId").Value); Assert.Equal("40", jwt.Claims.Single(c => c.Type == "playerId").Value); @@ -150,7 +150,7 @@ public void GamePlayerLoginInput_CapturesForbiddenContextFields() + "\"AreaId\":50," + "\"AccessToken\":\"token\"," + "\"UserId\":30," - + "\"tenantId\":10," + + "\"id\":10," + "\"appId\":20" + "}"; @@ -158,7 +158,7 @@ public void GamePlayerLoginInput_CapturesForbiddenContextFields() Assert.NotNull(input); Assert.Contains(input!.ExtraFields.Keys, key => string.Equals(key, "UserId", StringComparison.OrdinalIgnoreCase)); - Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "tenantId", StringComparison.OrdinalIgnoreCase)); + Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "id", StringComparison.OrdinalIgnoreCase)); Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "appId", StringComparison.OrdinalIgnoreCase)); } @@ -178,7 +178,7 @@ public static TestGameLoginTicketKeyResolver Create() { using (var rsa = RSA.Create(2048)) { - var kid = "tenant-10-app-20-test"; + var kid = "10-app-20-test"; var privateKeyPem = rsa.ExportPkcs8PrivateKeyPem(); var publicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(); return new TestGameLoginTicketKeyResolver(GameLoginTicketSigningKey.CreateRsa(kid, privateKeyPem, publicKeyPem), kid); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiUserEmailEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiUserEmailEndpointTests.cs index 30afa69d..c1e91730 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiUserEmailEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiUserEmailEndpointTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Client.Api.GameUserEmail; using GameFrameX.Client.Api.GameUserEmail.Dto; using GameFrameX.Client.Api.Services.Email; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -12,7 +12,7 @@ public async Task SendRegister_UsesMainDatabaseWithoutLegacyContext_AndEnforcesI { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameUserEmailEntity), typeof(TenantGameUserEntity)); + database.InitBusinessTables(typeof(GameUserEmailEntity), typeof(GameUserEntity)); var sender = new RecordingEmailSender(); var controller = CreateController(database, sender); var request = new GameUserMailRegisterEntityRequest @@ -24,10 +24,10 @@ public async Task SendRegister_UsesMainDatabaseWithoutLegacyContext_AndEnforcesI Assert.Equal(0, ClientApiResultReader.Code(first)); Assert.NotEqual(0, ClientApiResultReader.Code(second)); Assert.Equal(1, sender.SendCount); - var record = await database.MainDb.Queryable().SingleAsync(); + var record = await database.MainDb.Queryable().SingleAsync(); Assert.Equal(request.Email, record.UserName); Assert.Equal(6, record.Code.Length); - Assert.Equal(TenantEmailPurpose.PlayerRegisterCode, sender.Purpose); + Assert.Equal(EmailPurpose.PlayerRegisterCode, sender.Purpose); } } @@ -36,7 +36,7 @@ public async Task SendReset_UnknownAccountReturnsSuccessWithoutSending() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameUserEmailEntity), typeof(TenantGameUserEntity)); + database.InitBusinessTables(typeof(GameUserEmailEntity), typeof(GameUserEntity)); var sender = new RecordingEmailSender(); var controller = CreateController(database, sender); var result = ClientApiResultReader.Read(await controller.SendReset(new GameUserMailResetEntityRequest @@ -45,24 +45,24 @@ public async Task SendReset_UnknownAccountReturnsSuccessWithoutSending() })); Assert.Equal(0, ClientApiResultReader.Code(result)); Assert.Equal(0, sender.SendCount); - Assert.Equal(0, await database.MainDb.Queryable().CountAsync()); + Assert.Equal(0, await database.MainDb.Queryable().CountAsync()); } } private static GameUserEmailController CreateController(ClientApiTestDb database, RecordingEmailSender sender) { - var controller = new GameUserEmailController(database.Repository(), - database.Repository(), sender); - database.AttachContext(controller, includeTenant: false, includeApp: false); + var controller = new GameUserEmailController(database.Repository(), + database.Repository(), sender); + database.AttachContext(controller, include: false, includeApp: false); return controller; } - private sealed class RecordingEmailSender : ITenantEmailSender + private sealed class RecordingEmailSender : IEmailSender { public int SendCount { get; private set; } - public TenantEmailPurpose Purpose { get; private set; } + public EmailPurpose Purpose { get; private set; } - public Task SendTemplateAsync(TenantEmailPurpose purpose, string receiverEmail, ulong templateId, + public Task SendTemplateAsync(EmailPurpose purpose, string receiverEmail, ulong templateId, string subject, IDictionary templateData) { SendCount++; @@ -71,7 +71,7 @@ public Task SendTemplateAsync(TenantEmailPurpose purpose, string receiverE } public Task GetFromEmailAddressAsync() => Task.FromResult(null); - public Task GetSnapshotAsync(TenantEmailPurpose purpose) => - Task.FromResult(null); + public Task GetSnapshotAsync(EmailPurpose purpose) => + Task.FromResult(null); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs index 84ff0b58..a0f5b246 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs @@ -13,7 +13,7 @@ using GameFrameX.Client.Api.Services; using GameFrameX.Client.Api.Services.PayVerification; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.Abstract; using GameFrameX.Payment.Google.Option; using GameFrameX.Payment.Wechat; @@ -54,8 +54,8 @@ public async Task GameOrder_NotifyWeChatPay_ValidSignatureShipsOrderOnce() var contentResult = Assert.IsType(result); Assert.Equal(200, contentResult.StatusCode); Assert.Contains("\"code\":\"SUCCESS\"", contentResult.Content); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7101); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7101); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(TestTransactionId, order.ProviderTransactionId); Assert.Equal(650, role.AllRecharge); @@ -80,7 +80,7 @@ public async Task GameOrder_NotifyWeChatPay_RejectsInvalidSignature() var contentResult = Assert.IsType(result); Assert.Equal(500, contentResult.StatusCode); Assert.Contains("\"code\":\"FAIL\"", contentResult.Content); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7101); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7101); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); } @@ -100,7 +100,7 @@ public async Task GameOrder_NotifyWeChatPay_RejectsMismatchedAmount() var contentResult = Assert.IsType(result); Assert.Equal(500, contentResult.StatusCode); Assert.Contains("\"code\":\"FAIL\"", contentResult.Content); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7101); + var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7101); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); } @@ -123,7 +123,7 @@ public async Task GameOrder_NotifyWeChatPay_RepeatedNotificationShipsOnce() // 微信重试通知:两次均 200 SUCCESS(避免继续重试),但发货与累充恰一次(ShipAsync 幂等 + 状态前置守卫) Assert.Contains("\"code\":\"SUCCESS\"", Assert.IsType(first).Content); Assert.Contains("\"code\":\"SUCCESS\"", Assert.IsType(second).Content); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(650, role.AllRecharge); Assert.Equal(1, handler.Count("/game/api/req_player_send_item")); } @@ -133,14 +133,14 @@ private static GameOrderController CreateController( ClientApiRecordingHttpHandler handler, WechatPayOptionSetting setting) { - db.InitTenantTables(typeof(TenantGameAreaEntity), typeof(TenantGameRoleEntity), typeof(TenantGameOrderEntity), typeof(TenantGameOrderFulfillmentEntity)); + db.InitBusinessTables(typeof(GameAreaEntity), typeof(GameRoleEntity), typeof(GameOrderEntity), typeof(GameOrderFulfillmentEntity)); #pragma warning disable CS8625 // 测试桩:微信回调链路不使用 Google 验证服务,传 null 与其它渠道回调用例一致 return new GameOrderController( - db.Repository(), + db.Repository(), FakeOptionsProvider.WithAreaPolicy(false), - db.Repository(), + db.Repository(), new HttpClient(handler, false), - new GameOrderShipService(db.TenantDb, new ClientApiTestHttpClientFactory(handler)), + new GameOrderShipService(db.Db, new ClientApiTestHttpClientFactory(handler)), new WechatCallbackPaymentFactory(setting), new TestGooglePubSubPushAuthenticator(false), new TestGooglePlayPurchaseService(null)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs index 3a94152b..3fca514c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs @@ -6,7 +6,7 @@ using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using Microsoft.AspNetCore.Mvc; @@ -46,7 +46,7 @@ public async Task GameWebShop_Buy_BuildsCallbackUrlFromSiteRootWithPackageSegmen var controller = CreateController(db, handler); controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(true, true, 7001), }; - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -74,7 +74,7 @@ public async Task GameWebShop_Buy_NormalizesLegacyThreeSegmentCallbackUrl() var controller = CreateController(db, handler); controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(true, true, 7001), }; - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -103,7 +103,7 @@ public async Task GameWebShop_Buy_RejectsUnmappableCallbackUrl() var controller = CreateController(db, handler); db.AttachContext(controller); - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -115,7 +115,7 @@ public async Task GameWebShop_Buy_RejectsUnmappableCallbackUrl() // 无法映射到回调路由的地址在下单前拒绝:不提交网关、不预创建订单 Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(root)); Assert.DoesNotContain("/submit.php", handler.RequestPaths); - Assert.Equal(0, await db.MainDb.Queryable().CountAsync()); + Assert.Equal(0, await db.MainDb.Queryable().CountAsync()); } [Fact] @@ -130,7 +130,7 @@ public async Task GameWebShop_Buy_DoesNotRequireLegacyTenantOrAppContext() var controller = CreateController(db); db.AttachContext(controller, includeApp: false); - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -155,7 +155,7 @@ public async Task GameWebShop_Buy_PersistsOrderWithSingleKeyCallbackRoute() var controller = CreateController(db, handler); db.AttachContext(controller); - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -165,7 +165,7 @@ public async Task GameWebShop_Buy_PersistsOrderWithSingleKeyCallbackRoute() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - Assert.Equal(1, await db.MainDb.Queryable().CountAsync()); + Assert.Equal(1, await db.MainDb.Queryable().CountAsync()); Assert.Contains(handler.RequestBodies, requestBody => requestBody.Contains("NotifyWebShop", StringComparison.Ordinal)); } @@ -187,8 +187,8 @@ public async Task GameWebShop_NotifyWebShop_CreatesShippedOrderAndSendsMail() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -215,9 +215,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsForgedSign() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret", "forged-sign")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.TenantDb.Queryable().ToListAsync(); + var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.Db.Queryable().ToListAsync(); // 验签缺省强制:伪造签名一律拒绝且不发货(不再有 log 灰度放行) Assert.Equal((int)AuthErrorCode.SignatureVerifyFailed, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); @@ -247,8 +247,8 @@ public async Task GameWebShop_NotifyWebShop_ShipsFromOrderSnapshotWhenShopChange var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -276,9 +276,9 @@ public async Task GameWebShop_NotifyWebShop_MailFailureKeepsOrderRetryableThenSu var outTradeNo = await SeedUnpaidOrderAsync(db); var failed = ClientApiResultReader.Read(await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret"))); - var orderAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var roleAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedRows = await db.TenantDb.Queryable().ToListAsync(); + var orderAfterFailure = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterFailure = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var failedRows = await db.Db.Queryable().ToListAsync(); // 发货失败:订单不能停在已完成,保留 NotShipped 可重试状态,累充不增加 Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(failed)); Assert.Equal(OrderStatusEnum.NotShipped, orderAfterFailure.Status); @@ -289,8 +289,8 @@ public async Task GameWebShop_NotifyWebShop_MailFailureKeepsOrderRetryableThenSu handler.SetJson("/game/api/post_mail", HttpJsonResultData.Success(JsonHelper.Serialize(new GameWebShpBuySendMailResponse { ErrorCode = 0, })).ToString()); var retried = ClientApiResultReader.Read(await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret"))); - var orderAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var roleAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var orderAfterRetry = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterRetry = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(retried)); Assert.Equal(OrderStatusEnum.Shipped, orderAfterRetry.Status); Assert.Equal(650, roleAfterRetry.AllRecharge); @@ -316,8 +316,8 @@ public async Task GameWebShop_NotifyWebShop_ReplaySameOutTradeNo_ShipsOnlyOnce() var first = ClientApiResultReader.Read(await controller.NotifyWebShop(request)); var second = ClientApiResultReader.Read(await controller.NotifyWebShop(request)); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(first)); Assert.Equal(0, ClientApiResultReader.Code(second)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); @@ -345,8 +345,8 @@ public async Task GameWebShop_NotifyWebShop_TerminalStatusOrder_DoesNotShip(Orde var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(status, order.Status); Assert.Equal(0, role.AllRecharge); @@ -371,9 +371,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsAmountMismatch() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 1.00m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.TenantDb.Queryable().ToListAsync(); + var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.Db.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyAmountMismatch, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); Assert.Equal(0, role.AllRecharge); @@ -399,9 +399,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsUnknownOrder() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest("999999999999999999", 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var orderCount = await db.TenantDb.Queryable().CountAsync(u => u.OrderId == "999999999999999999"); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.TenantDb.Queryable().ToListAsync(); + var orderCount = await db.Db.Queryable().CountAsync(u => u.OrderId == "999999999999999999"); + var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.Db.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyOrderNotFound, ClientApiResultReader.Code(root)); Assert.Equal(0, orderCount); Assert.Equal(0, role.AllRecharge); @@ -416,7 +416,7 @@ public async Task GameWebShop_NotifyWebShop_ValidatesConfigurationWithoutLegacyA var controller = CreateController(db); db.AttachContext(controller, includeApp: false); - var result = await controller.NotifyWebShop(new TenantGameWebShopEntityBuyNotifyRequest { OutTradeNo = "unknown-order", TradeStatus = "TRADE_SUCCESS", }); + var result = await controller.NotifyWebShop(new GameWebShopEntityBuyNotifyRequest { OutTradeNo = "unknown-order", TradeStatus = "TRADE_SUCCESS", }); var root = ClientApiResultReader.Read(result); Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(root)); @@ -427,7 +427,7 @@ public async Task GameWebShop_NotifyWebShop_ValidatesConfigurationWithoutLegacyA private static async Task SeedUnpaidOrderAsync(ClientApiTestDb db, OrderStatusEnum status = OrderStatusEnum.Unpaid) { const string orderId = "800000000000001"; - await db.MainDb.Insertable(new TenantGameOrderEntity + await db.MainDb.Insertable(new GameOrderEntity { Id = 800000000000001, OrderId = orderId, @@ -459,13 +459,13 @@ await db.MainDb.Insertable(new TenantGameOrderEntity /// /// 按易支付 MD5 口径构造带正确签名的回调请求,模拟 zlpay notify 合法回传;overrideSign 用于伪造签名场景。 /// - private static TenantGameWebShopEntityBuyNotifyRequest BuildSignedNotifyRequest( + private static GameWebShopEntityBuyNotifyRequest BuildSignedNotifyRequest( string outTradeNo, decimal money, string signKey, string? overrideSign = null) { - var request = new TenantGameWebShopEntityBuyNotifyRequest + var request = new GameWebShopEntityBuyNotifyRequest { Pid = 1001, TradeNo = "provider-" + outTradeNo, @@ -484,7 +484,7 @@ private static TenantGameWebShopEntityBuyNotifyRequest BuildSignedNotifyRequest( /// /// 与 NotifyWebShop 验签侧同口径重建回传业务参数字典(money 用 invariant 无尾零格式,排除 sign/sign_type)。 /// - private static Dictionary BuildNotifySignParameters(TenantGameWebShopEntityBuyNotifyRequest request) + private static Dictionary BuildNotifySignParameters(GameWebShopEntityBuyNotifyRequest request) { return new Dictionary { @@ -501,21 +501,21 @@ private static Dictionary BuildNotifySignParameters(TenantGameWe private static GameWebShopController CreateController(ClientApiTestDb db, ClientApiRecordingHttpHandler? handler = null) { - db.InitTenantTables( - typeof(TenantGameWebShopEntity), - typeof(TenantGameRoleEntity), - typeof(TenantGameAreaEntity), - typeof(TenantGameWebShopOrderEntity), - typeof(TenantGameOrderEntity), - typeof(TenantGameGoodsEntity), + db.InitBusinessTables( + typeof(GameWebShopEntity), + typeof(GameRoleEntity), + typeof(GameAreaEntity), + typeof(GameWebShopOrderEntity), + typeof(GameOrderEntity), + typeof(GameGoodsEntity), typeof(SystemConfigEntity)); return new GameWebShopController( new HttpClient(handler ?? ClientApiRecordingHttpHandler.WithGameServerDefaults(), false), - db.Repository(), - db.Repository(), - db.Repository(), - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), db.Repository()); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs index d35c492d..01c3bb16 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs @@ -4,7 +4,7 @@ using System.Text.Json; using GameFrameX.Core.Middleware; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; @@ -72,7 +72,7 @@ private static CryptoEnvelopeOptions CreateOptions(bool enabled) }; } - private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, string path = E1Path, string? query = "?op=BLLogin&userid=10086", string? cryptoHeader = "1", long? appId = TestAppId, long? tenantId = null) + private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, string path = E1Path, string? query = "?op=BLLogin&userid=10086", string? cryptoHeader = "1", long? appId = TestAppId, long? id = null) { var context = new DefaultHttpContext(); context.Response.Body = new MemoryStream(); @@ -94,9 +94,9 @@ private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, str context.Request.Headers["GameFrameX-App-Id"] = appId.Value.ToString(); } - if (tenantId.HasValue) + if (id.HasValue) { - context.Items["TenantId"] = tenantId.Value; + context.Items["Id"] = id.Value; } return context; @@ -591,7 +591,7 @@ await InvokeAsync(context, CreateOptions(true), () => [Fact] public async Task LegacyTenantContext_DoesNotBypassDecryption() { - var context = CreateEnvelopeContext("{}", tenantId: 999); + var context = CreateEnvelopeContext("{}", id: 999); var nextCalled = false; await InvokeAsync(context, CreateOptions(true), () => { @@ -669,9 +669,9 @@ public void Judge_LeaseAndEnableSemantics() Assert.Equal(SessionKeyLookupResult.Expired, SessionKeyResolver.Judge(Key(0, now, true), now)); return; - static TenantSessionKeyEntity Key(long? notBefore, long? expire, bool enabled) + static SessionKeyEntity Key(long? notBefore, long? expire, bool enabled) { - return new TenantSessionKeyEntity { NotBeforeTime = notBefore, ExpireTime = expire, IsEnabled = enabled, }; + return new SessionKeyEntity { NotBeforeTime = notBefore, ExpireTime = expire, IsEnabled = enabled, }; } } @@ -689,12 +689,12 @@ private static string ReplaceFirstCtByte(string envelopeJson) /// private sealed class FakeSessionKeyResolver : ISessionKeyResolver { - private readonly List _keys = new(); + private readonly List _keys = new(); public void AddKey(long appId, string kid, string secret, bool enabled, long? notBefore, long? expire) { _keys.RemoveAll(x => x.Kid == kid); - _keys.Add(new TenantSessionKeyEntity + _keys.Add(new SessionKeyEntity { Kid = kid, Secret = secret, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/TenantEmailSenderTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/EmailSenderTests.cs similarity index 60% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/TenantEmailSenderTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/EmailSenderTests.cs index c4cf83d6..cb548b40 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/TenantEmailSenderTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/EmailSenderTests.cs @@ -1,18 +1,18 @@ using GameFrameX.Client.Api.Services.Email; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; namespace GameFrameX.Core.Tests.ClientApi; -public class TenantEmailSenderTests +public class EmailSenderTests { [Fact] public async Task SendTemplate_ReturnsFalseWhenUnconfigured_NoSystemFallback() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantEmailConfigEntity)); - var sender = new TenantEmailSender(database.MainDb); - var result = await sender.SendTemplateAsync(TenantEmailPurpose.PlayerRegisterCode, + database.InitBusinessTables(typeof(EmailConfigEntity)); + var sender = new EmailSender(database.MainDb); + var result = await sender.SendTemplateAsync(EmailPurpose.PlayerRegisterCode, "player@example.test", 145225, "Subject", new Dictionary()); Assert.False(result); } @@ -23,8 +23,8 @@ public async Task GetFromEmailAddress_ReturnsNullWhenUnconfigured() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantEmailConfigEntity)); - var sender = new TenantEmailSender(database.MainDb); + database.InitBusinessTables(typeof(EmailConfigEntity)); + var sender = new EmailSender(database.MainDb); Assert.Null(await sender.GetFromEmailAddressAsync()); } } @@ -34,17 +34,17 @@ public async Task GetSnapshot_ReadsMainDatabaseWithoutRequestContext_RequiresCom { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantEmailConfigEntity)); - database.MainDb.Insertable(new TenantEmailConfigEntity + database.InitBusinessTables(typeof(EmailConfigEntity)); + database.MainDb.Insertable(new EmailConfigEntity { Id = 1, IsEnabled = true, FromEmailAddress = "sender@example.test", FromEmailSecretId = "secret-id", FromEmailSecretKey = "secret-key", }).ExecuteCommand(); - var sender = new TenantEmailSender(database.MainDb); + var sender = new EmailSender(database.MainDb); Assert.Equal("sender@example.test", await sender.GetFromEmailAddressAsync()); - database.MainDb.Updateable() + database.MainDb.Updateable() .SetColumns(row => row.FromEmailSecretKey == "").Where(row => row.Id == 1).ExecuteCommand(); - Assert.Null(await sender.GetSnapshotAsync(TenantEmailPurpose.Default)); + Assert.Null(await sender.GetSnapshotAsync(EmailPurpose.Default)); } } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeGamePenaltyEnforcementService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeGamePenaltyEnforcementService.cs index 1687275f..6ca668ff 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeGamePenaltyEnforcementService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeGamePenaltyEnforcementService.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.PlayerCenter.GamePenalty; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -10,16 +10,16 @@ namespace GameFrameX.Core.Tests.ClientApi; /// internal sealed class FakeGamePenaltyEnforcementService : IGamePenaltyEnforcementService { - private readonly TenantGamePenaltyEntity _blocking = null!; + private readonly GamePenaltyEntity _blocking = null!; - public FakeGamePenaltyEnforcementService(TenantGamePenaltyEntity? blocking = null) + public FakeGamePenaltyEnforcementService(GamePenaltyEntity? blocking = null) { #pragma warning disable CS8601 // 测试替身:blocking 显式允许 null("无阻断"语义),与 _blocking = null! 初始化器配合 _blocking = blocking; #pragma warning restore CS8601 } - public Task GetLoginBlockingPenaltyAsync( + public Task GetLoginBlockingPenaltyAsync( PenaltyTargetTypeEnum targetType, string targetId, long? areaId = null) { return Task.FromResult(_blocking); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeOptionsProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeOptionsProvider.cs index c6134a1d..8f355a59 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeOptionsProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/FakeOptionsProvider.cs @@ -1,46 +1,46 @@ using GameFrameX.Advertisement.Abstract; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; namespace GameFrameX.Core.Tests.ClientApi; /// -/// 测试用 桩,按预设策略返回配置,供 Issuer / 邮件等单测使用。 +/// 测试用 桩,按预设策略返回配置,供 Issuer / 邮件等单测使用。 /// -internal sealed class FakeOptionsProvider : IClientApiTenantOptionsProvider +internal sealed class FakeOptionsProvider : IClientApiOptionsProvider { - private TenantEmailOptions _emailOptions = null!; - private TenantAdvertisementCallbackOptions _adOptions = new(); - private TenantClientApiTokenPolicyOptions _tokenPolicy = null!; - private TenantGameLoginTicketPolicyOptions _ticketPolicy = new() { TicketExpireTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60, }; - private TenantOrderPolicyOptions _orderPolicy = new(); - private TenantAreaPolicyOptions _areaPolicy = new(); + private EmailOptions _emailOptions = null!; + private AdvertisementCallbackOptions _adOptions = new(); + private ClientApiTokenPolicyOptions _tokenPolicy = null!; + private GameLoginTicketPolicyOptions _ticketPolicy = new() { TicketExpireTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60, }; + private OrderPolicyOptions _orderPolicy = new(); + private AreaPolicyOptions _areaPolicy = new(); - public Task GetEmailOptionsAsync() + public Task GetEmailOptionsAsync() { return Task.FromResult(_emailOptions); } - public Task GetAdvertisementCallbackOptionsAsync() + public Task GetAdvertisementCallbackOptionsAsync() { return Task.FromResult(_adOptions); } - public Task GetTokenPolicyAsync() + public Task GetTokenPolicyAsync() { return Task.FromResult(_tokenPolicy); } - public Task GetGameLoginTicketPolicyAsync() + public Task GetGameLoginTicketPolicyAsync() { return Task.FromResult(_ticketPolicy); } - public Task GetOrderPolicyAsync() + public Task GetOrderPolicyAsync() { return Task.FromResult(_orderPolicy); } - public Task GetAreaPolicyAsync() + public Task GetAreaPolicyAsync() { return Task.FromResult(_areaPolicy); } @@ -49,7 +49,7 @@ public static FakeOptionsProvider WithTokenPolicy(string signingKey, int lifetim { return new FakeOptionsProvider { - _tokenPolicy = new TenantClientApiTokenPolicyOptions { SigningKey = signingKey, LifetimeMinutes = lifetimeMinutes, }, + _tokenPolicy = new ClientApiTokenPolicyOptions { SigningKey = signingKey, LifetimeMinutes = lifetimeMinutes, }, }; } @@ -57,7 +57,7 @@ public static FakeOptionsProvider WithoutTokenPolicy() { return new FakeOptionsProvider { - _tokenPolicy = new TenantClientApiTokenPolicyOptions { SigningKey = null, LifetimeMinutes = 60, }, + _tokenPolicy = new ClientApiTokenPolicyOptions { SigningKey = null, LifetimeMinutes = 60, }, }; } @@ -66,8 +66,8 @@ public static FakeOptionsProvider WithTicketPolicy(long ticketExpireTime) { return new FakeOptionsProvider { - _tokenPolicy = new TenantClientApiTokenPolicyOptions { SigningKey = "unit-test-signing-key", LifetimeMinutes = 60, }, - _ticketPolicy = new TenantGameLoginTicketPolicyOptions { TicketExpireTime = ticketExpireTime, EnableKeyAutoCreate = true, }, + _tokenPolicy = new ClientApiTokenPolicyOptions { SigningKey = "unit-test-signing-key", LifetimeMinutes = 60, }, + _ticketPolicy = new GameLoginTicketPolicyOptions { TicketExpireTime = ticketExpireTime, EnableKeyAutoCreate = true, }, }; } @@ -75,7 +75,7 @@ public static FakeOptionsProvider WithEmailOptions(string fromAddress) { return new FakeOptionsProvider { - _emailOptions = new TenantEmailOptions + _emailOptions = new EmailOptions { FromEmailAddress = fromAddress, FromEmailSecretId = "secret-id", @@ -95,8 +95,8 @@ public static FakeOptionsProvider WithAreaPolicy(bool enableReturnHttpManager) { return new FakeOptionsProvider { - _tokenPolicy = new TenantClientApiTokenPolicyOptions { SigningKey = "unit-test-signing-key", LifetimeMinutes = 60, }, - _areaPolicy = new TenantAreaPolicyOptions { EnableReturnHttpManager = enableReturnHttpManager, }, + _tokenPolicy = new ClientApiTokenPolicyOptions { SigningKey = "unit-test-signing-key", LifetimeMinutes = 60, }, + _areaPolicy = new AreaPolicyOptions { EnableReturnHttpManager = enableReturnHttpManager, }, }; } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs index bcb45bd5..11302438 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs @@ -6,10 +6,10 @@ using GameFrameX.Advertisement.TopOn; using GameFrameX.Advertisement.UnityAds; using GameFrameX.Client.Api.Integrations.Advertisement; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using Microsoft.AspNetCore.Http; @@ -45,7 +45,7 @@ public async Task TopOn_ValidSignature_DispatchesOnce_And_WritesSuccessLedger() Assert.Equal(AdvertisementRewardStatusEnum.Success, result.Status); Assert.Equal("adreward:topon:TX-1001", result.IdempotencyKey); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.TenantDb.Queryable().ToListAsync(); + var rows = await db.Db.Queryable().ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Success, rows[0].Status); } @@ -67,7 +67,7 @@ public async Task TopOn_InvalidSignature_FailsClosed_NoLedger_NoDispatch() Assert.False(result.IsValid); Assert.Equal(601, result.Code); Assert.Equal(0, handler.Count(DispatchPath)); - var rows = await db.TenantDb.Queryable().ToListAsync(); + var rows = await db.Db.Queryable().ToListAsync(); Assert.Empty(rows); } @@ -88,7 +88,7 @@ public async Task TopOn_Replay_IsIdempotent_NoSecondDispatch() Assert.True(second.IsValid); Assert.Equal(AdvertisementRewardStatusEnum.Success, second.Status); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.TenantDb.Queryable().ToListAsync(); + var rows = await db.Db.Queryable().ToListAsync(); Assert.Single(rows); } @@ -142,7 +142,7 @@ public async Task AdMob_ValidSignature_Dispatches_And_WritesSuccessLedger() Assert.Equal(AdvertisementRewardStatusEnum.Success, result.Status); Assert.Equal("adreward:admob:AD-5005", result.IdempotencyKey); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.TenantDb.Queryable().ToListAsync(); + var rows = await db.Db.Queryable().ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Success, rows[0].Status); } @@ -168,7 +168,7 @@ public async Task AdMob_InvalidSignature_FailsClosed_NoLedger() Assert.False(result.IsValid); Assert.Equal(601, result.Code); Assert.Equal(0, handler.Count(DispatchPath)); - var rows = await db.TenantDb.Queryable().ToListAsync(); + var rows = await db.Db.Queryable().ToListAsync(); Assert.Empty(rows); } @@ -193,7 +193,7 @@ public async Task UnityAds_ValidSignature_Dispatches_And_WritesSuccessLedger() Assert.Equal(AdvertisementRewardStatusEnum.Success, result.Status); Assert.Equal("adreward:unityads:OID-7007", result.IdempotencyKey); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.TenantDb.Queryable().ToListAsync(); + var rows = await db.Db.Queryable().ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Success, rows[0].Status); } @@ -218,7 +218,7 @@ public async Task UnityAds_InvalidSignature_FailsClosed_NoLedger() Assert.False(result.IsValid); Assert.Equal(601, result.Code); Assert.Equal(0, handler.Count(DispatchPath)); - var rows = await db.TenantDb.Queryable().ToListAsync(); + var rows = await db.Db.Queryable().ToListAsync(); Assert.Empty(rows); } @@ -236,7 +236,7 @@ public async Task TopOn_DispatchFailure_MarksFailed_Then_Retry_MarksSuccess_Reus Assert.False(first.IsValid); Assert.Equal(AdvertisementRewardStatusEnum.Failed, first.Status); Assert.NotNull(first.Message); - var rowsAfterFirst = await db.TenantDb.Queryable().ToListAsync(); + var rowsAfterFirst = await db.Db.Queryable().ToListAsync(); Assert.Single(rowsAfterFirst); Assert.Equal(AdvertisementRewardStatusEnum.Failed, rowsAfterFirst[0].Status); var firstLedgerId = rowsAfterFirst[0].Id; @@ -246,7 +246,7 @@ public async Task TopOn_DispatchFailure_MarksFailed_Then_Retry_MarksSuccess_Reus var second = await CreateService(db, option, handler, query).ReceiveTopOnAsync(); Assert.True(second.IsValid); Assert.Equal(AdvertisementRewardStatusEnum.Success, second.Status); - var rowsAfterSecond = await db.TenantDb.Queryable().ToListAsync(); + var rowsAfterSecond = await db.Db.Queryable().ToListAsync(); Assert.Single(rowsAfterSecond); Assert.Equal(firstLedgerId, rowsAfterSecond[0].Id); Assert.Equal(AdvertisementRewardStatusEnum.Success, rowsAfterSecond[0].Status); @@ -256,7 +256,7 @@ public async Task TopOn_DispatchFailure_MarksFailed_Then_Retry_MarksSuccess_Reus private static ClientApiTestDb CreateDb() { var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAdvertisementRewardEntity), typeof(TenantGameRoleEntity), typeof(TenantGameAreaEntity)); + db.InitBusinessTables(typeof(GameAdvertisementRewardEntity), typeof(GameRoleEntity), typeof(GameAreaEntity)); db.SeedAreaClassify(ClassifyId); db.SeedArea(AreaId, ClassifyId); db.SeedRole(RoleId, UserId, AreaId, db.AppId); @@ -268,7 +268,7 @@ private static GameAdvertisementRewardService CreateService(ClientApiTestDb db, return CreateService(db, BuildAdvertisementOptions("TopOn", option), handler, query); } - private static GameAdvertisementRewardService CreateService(ClientApiTestDb db, TenantAdvertisementCallbackOptions advertisementOptions, ClientApiRecordingHttpHandler handler, Dictionary query) + private static GameAdvertisementRewardService CreateService(ClientApiTestDb db, AdvertisementCallbackOptions advertisementOptions, ClientApiRecordingHttpHandler handler, Dictionary query) { var httpContext = db.CreateHttpContext(); #pragma warning disable CS8620 // 测试输入 Dictionary 与 QueryString.Create 期望的 string? 仅可空性差异,运行时等价 @@ -276,7 +276,7 @@ private static GameAdvertisementRewardService CreateService(ClientApiTestDb db, #pragma warning restore CS8620 var accessor = new HttpContextAccessor { HttpContext = httpContext, }; var optionsProvider = new FakeAdvertisementOptionsProvider(advertisementOptions); - var roleRepository = db.Repository(); + var roleRepository = db.Repository(); var factory = new AdvertisementCallbackFactory(new IAdvertisementCallbackHandler[] { new TopOnAdvertisementCallbackHandler(roleRepository), @@ -285,16 +285,16 @@ private static GameAdvertisementRewardService CreateService(ClientApiTestDb db, }); return new GameAdvertisementRewardService( optionsProvider, - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), new HttpClient(handler, false), accessor, factory); } - private static TenantAdvertisementCallbackOptions BuildAdvertisementOptions(string provider, IAdvertisementCallbackOptionSetting option, IReadOnlyDictionary? adMobKeys = null) + private static AdvertisementCallbackOptions BuildAdvertisementOptions(string provider, IAdvertisementCallbackOptionSetting option, IReadOnlyDictionary? adMobKeys = null) { - return new TenantAdvertisementCallbackOptions + return new AdvertisementCallbackOptions { Provider = provider, ConfigJson = JsonHelper.Serialize(option), @@ -383,49 +383,49 @@ private static string SignUnityAds(string secret, string sid, string oid) } /// - /// 仅广告回调配置可注入的 桩。 + /// 仅广告回调配置可注入的 桩。 /// - private sealed class FakeAdvertisementOptionsProvider : IClientApiTenantOptionsProvider + private sealed class FakeAdvertisementOptionsProvider : IClientApiOptionsProvider { - private readonly TenantAdvertisementCallbackOptions _adOptions; + private readonly AdvertisementCallbackOptions _adOptions; - public FakeAdvertisementOptionsProvider(TenantAdvertisementCallbackOptions advertisementOptions) + public FakeAdvertisementOptionsProvider(AdvertisementCallbackOptions advertisementOptions) { _adOptions = advertisementOptions; } - public Task GetEmailOptionsAsync() + public Task GetEmailOptionsAsync() { #pragma warning disable CS8625 // 测试桩:本场景只测广告回调,邮件策略返回 null 表示未配置 - return Task.FromResult(null); + return Task.FromResult(null); #pragma warning restore CS8625 } - public Task GetAdvertisementCallbackOptionsAsync() + public Task GetAdvertisementCallbackOptionsAsync() { return Task.FromResult(_adOptions); } - public Task GetTokenPolicyAsync() + public Task GetTokenPolicyAsync() { #pragma warning disable CS8625 // 测试桩:本场景只测广告回调,Token 策略返回 null 表示未配置 - return Task.FromResult(null); + return Task.FromResult(null); #pragma warning restore CS8625 } - public Task GetGameLoginTicketPolicyAsync() + public Task GetGameLoginTicketPolicyAsync() { - return Task.FromResult(new TenantGameLoginTicketPolicyOptions()); + return Task.FromResult(new GameLoginTicketPolicyOptions()); } - public Task GetOrderPolicyAsync() + public Task GetOrderPolicyAsync() { - return Task.FromResult(new TenantOrderPolicyOptions()); + return Task.FromResult(new OrderPolicyOptions()); } - public Task GetAreaPolicyAsync() + public Task GetAreaPolicyAsync() { - return Task.FromResult(new TenantAreaPolicyOptions()); + return Task.FromResult(new AreaPolicyOptions()); } } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs index e55dd3d0..1c704533 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using SqlSugar; namespace GameFrameX.Core.Tests.ClientApi; @@ -129,17 +129,17 @@ public void CacheRefresh_ParentReassign_SwitchesMaster() Assert.Equal("com.test.master.b", fixture.Resolver.Resolve("com.test.child")); } - private ResolverFixture BuildFixture(long tenantId) + private ResolverFixture BuildFixture(long id) { var mainConfig = CreateConfig("main"); - var tenantConfig = CreateConfig(tenantId.ToString()); + var config = CreateConfig(id.ToString()); var scope = new SqlSugarScope(mainConfig); var provider = scope; - var tenantDb = provider; - tenantDb.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity)); + var db = provider; + db.CodeFirst.InitTables(typeof(GameAppPackageEntity)); - return new ResolverFixture(scope, provider, tenantDb, tenantId); + return new ResolverFixture(scope, provider, db, id); } private ConnectionConfig CreateConfig(string configId) @@ -175,11 +175,11 @@ private sealed class ResolverFixture private readonly ISqlSugarClient _tenantDb; private readonly long _tenantId; - public ResolverFixture(SqlSugarScope scope, ISqlSugarClient provider, ISqlSugarClient tenantDb, long tenantId) + public ResolverFixture(SqlSugarScope scope, ISqlSugarClient provider, ISqlSugarClient db, long id) { _scope = scope; - _tenantDb = tenantDb; - _tenantId = tenantId; + _tenantDb = db; + _tenantId = id; Resolver = new GameAppPackageResolver(provider); } @@ -199,7 +199,7 @@ public void SeedChild(long id, string packageName, long parentPackageId, Inherit public void UpdatePackage(long id, string? packageName = null, long? parentPackageId = null, InheritanceModeEnum? mode = null, long updateTime = 0) { - var existing = _tenantDb.Queryable().First(p => p.Id == id); + var existing = _tenantDb.Queryable().First(p => p.Id == id); if (existing == null) { return; @@ -224,9 +224,9 @@ public void UpdatePackage(long id, string? packageName = null, long? parentPacka _tenantDb.Updateable(existing).ExecuteCommand(); } - private TenantGameAppPackageEntity BuildEntity(long id, string packageName, long? parentPackageId, PackageKindEnum kind, InheritanceModeEnum mode, bool isEnabled, long updateTime) + private GameAppPackageEntity BuildEntity(long id, string packageName, long? parentPackageId, PackageKindEnum kind, InheritanceModeEnum mode, bool isEnabled, long updateTime) { - return new TenantGameAppPackageEntity + return new GameAppPackageEntity { Id = id, Name = $"pkg-{id}", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameLoginTicketSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameLoginTicketSingleMainTests.cs index 3606d8db..45efe064 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameLoginTicketSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameLoginTicketSingleMainTests.cs @@ -1,8 +1,8 @@ using System.Security.Cryptography; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Client.Api.Services.GameLoginTicket; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Core.Service.Business; using Microsoft.IdentityModel.JsonWebTokens; using Microsoft.IdentityModel.Tokens; @@ -10,16 +10,16 @@ namespace GameFrameX.Core.Tests.ClientApi; public sealed class GameLoginTicketSingleMainTests : IDisposable { - private readonly string? _originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); + private readonly string? _originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); public GameLoginTicketSingleMainTests() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "ticket-single-main-test-secret"); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "ticket-single-main-test-secret"); } public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); } [Fact] @@ -27,7 +27,7 @@ public async Task IssuedTicket_VerifiesWithPublishedMainDatabasePublicKey() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameLoginTicketKeyEntity)); + database.InitBusinessTables(typeof(GameLoginTicketKeyEntity)); var options = FakeOptionsProvider.WithTicketPolicy(DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 120); var resolver = new GameLoginTicketKeyResolver(database.MainDb, options); var issuer = new GameLoginTicketIssuer(resolver, options); @@ -35,7 +35,7 @@ public async Task IssuedTicket_VerifiesWithPublishedMainDatabasePublicKey() var publishedKey = Assert.Single(await resolver.GetPublicKeysAsync()); Assert.Equal(ticket.Kid, publishedKey.Kid); Assert.True(Guid.TryParseExact(ticket.Kid, "N", out _)); - var storedKey = await database.MainDb.Queryable().FirstAsync(); + var storedKey = await database.MainDb.Queryable().FirstAsync(); Assert.DoesNotContain("PRIVATE KEY", storedKey.PrivateKeyPem); using (var rsa = RSA.Create()) { @@ -58,15 +58,15 @@ public async Task SigningAndPublishing_ShareLeaseAndAlgorithmFilters_AndPreserve using (var database = new ClientApiTestDb()) using (var rsa = RSA.Create(2048)) { - database.InitTenantTables(typeof(TenantGameLoginTicketKeyEntity)); + database.InitBusinessTables(typeof(GameLoginTicketKeyEntity)); var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); var entities = new[] { - new TenantGameLoginTicketKeyEntity { Id = 1, Kid = "tenant-10-app-20-existing", IsEnabled = true }, - new TenantGameLoginTicketKeyEntity { Id = 2, Kid = "disabled", IsEnabled = false }, - new TenantGameLoginTicketKeyEntity { Id = 3, Kid = "expired", IsEnabled = true, ExpireTime = now - 1 }, - new TenantGameLoginTicketKeyEntity { Id = 4, Kid = "future", IsEnabled = true, NotBeforeTime = now + 300 }, - new TenantGameLoginTicketKeyEntity { Id = 5, Kid = "wrong-algorithm", IsEnabled = true }, + new GameLoginTicketKeyEntity { Id = 1, Kid = "10-app-20-existing", IsEnabled = true }, + new GameLoginTicketKeyEntity { Id = 2, Kid = "disabled", IsEnabled = false }, + new GameLoginTicketKeyEntity { Id = 3, Kid = "expired", IsEnabled = true, ExpireTime = now - 1 }, + new GameLoginTicketKeyEntity { Id = 4, Kid = "future", IsEnabled = true, NotBeforeTime = now + 300 }, + new GameLoginTicketKeyEntity { Id = 5, Kid = "wrong-algorithm", IsEnabled = true }, }; foreach (var entity in entities) { @@ -79,7 +79,7 @@ public async Task SigningAndPublishing_ShareLeaseAndAlgorithmFilters_AndPreserve var resolver = new GameLoginTicketKeyResolver(database.MainDb, FakeOptionsProvider.WithTicketPolicy(now + 60)); var signing = await resolver.ResolveSigningKeyAsync(); var published = Assert.Single(await resolver.GetPublicKeysAsync()); - Assert.Equal("tenant-10-app-20-existing", signing.Kid); + Assert.Equal("10-app-20-existing", signing.Kid); Assert.Equal(signing.Kid, published.Kid); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyResolverQueryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyResolverQueryTests.cs index cf0d2cda..5109a11d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyResolverQueryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyResolverQueryTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.Middleware; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -10,17 +10,17 @@ public async Task Lookup_OnlyLoadsRequestedKey_AndNeverDecryptsInactiveRows() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantSessionKeyEntity), typeof(TenantAppSignatureKeyEntity)); + database.InitBusinessTables(typeof(SessionKeyEntity), typeof(AppSignatureKeyEntity)); database.MainDb.Insertable(new[] { - new TenantSessionKeyEntity { Id = 1, Kid = "active", Secret = "active-secret", IsEnabled = true }, - new TenantSessionKeyEntity { Id = 2, Kid = "unrelated", Secret = "enc:sec:v1:invalid", IsEnabled = false }, + new SessionKeyEntity { Id = 1, Kid = "active", Secret = "active-secret", IsEnabled = true }, + new SessionKeyEntity { Id = 2, Kid = "unrelated", Secret = "enc:sec:v1:invalid", IsEnabled = false }, }).ExecuteCommand(); database.MainDb.Insertable(new[] { - new TenantAppSignatureKeyEntity { Id = 1, Kid = "active", Secret = "active-secret", IsEnabled = true }, - new TenantAppSignatureKeyEntity { Id = 2, Kid = "disabled", Secret = "enc:sec:v1:invalid", IsEnabled = false }, - new TenantAppSignatureKeyEntity { Id = 3, Kid = "expired", Secret = "enc:sec:v1:invalid", IsEnabled = true, ExpireTime = 1 }, + new AppSignatureKeyEntity { Id = 1, Kid = "active", Secret = "active-secret", IsEnabled = true }, + new AppSignatureKeyEntity { Id = 2, Kid = "disabled", Secret = "enc:sec:v1:invalid", IsEnabled = false }, + new AppSignatureKeyEntity { Id = 3, Kid = "expired", Secret = "enc:sec:v1:invalid", IsEnabled = true, ExpireTime = 1 }, }).ExecuteCommand(); var statements = new List(); database.MainDb.Aop.OnLogExecuting = (sql, parameters) => statements.Add(sql); @@ -31,9 +31,9 @@ public async Task Lookup_OnlyLoadsRequestedKey_AndNeverDecryptsInactiveRows() Assert.All(statements, sql => Assert.Contains("WHERE", sql, StringComparison.OrdinalIgnoreCase)); Assert.Equal(SignatureKeyLookupResult.Disabled, (await signature.ResolveAsync("disabled")).Result); Assert.Equal("active", Assert.Single(await signature.GetActiveKeysAsync()).Kid); - database.MainDb.Updateable().SetColumns(key => key.Secret == "changed-secret").Where(key => key.Id == 1).ExecuteCommand(); + database.MainDb.Updateable().SetColumns(key => key.Secret == "changed-secret").Where(key => key.Id == 1).ExecuteCommand(); Assert.Equal("changed-secret", (await signature.ResolveAsync("active")).Secret); - database.MainDb.Deleteable().Where(key => key.Id == 1).ExecuteCommand(); + database.MainDb.Deleteable().Where(key => key.Id == 1).ExecuteCommand(); Assert.Equal(SessionKeyLookupResult.NotFound, (await session.ResolveAsync("active")).Result); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyRingSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyRingSingleMainTests.cs index 8f7e845a..6bb2130f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyRingSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/KeyRingSingleMainTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.Middleware; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -10,19 +10,19 @@ public async Task SignatureRotation_SeesNewKeyAndDisablement_WithoutRequestScope { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantAppSignatureKeyEntity)); - database.MainDb.Insertable(new TenantAppSignatureKeyEntity + database.InitBusinessTables(typeof(AppSignatureKeyEntity)); + database.MainDb.Insertable(new AppSignatureKeyEntity { Id = 1, Kid = "old", Secret = "old-secret", IsEnabled = true, CreatedTime = 1, UpdateTime = 0, }).ExecuteCommand(); var resolver = new SignatureKeyResolver(database.MainDb); Assert.Equal("old-secret", (await resolver.ResolveAsync("old")).Secret); - database.MainDb.Insertable(new TenantAppSignatureKeyEntity + database.MainDb.Insertable(new AppSignatureKeyEntity { Id = 2, Kid = "new", Secret = "new-secret", IsEnabled = true, CreatedTime = 2, UpdateTime = 0, }).ExecuteCommand(); Assert.Equal(new[] { "new", "old" }, (await resolver.GetActiveKeysAsync()).Select(key => key.Kid)); - database.MainDb.Updateable() + database.MainDb.Updateable() .SetColumns(key => key.IsEnabled == false).SetColumns(key => key.UpdateTime == 3) .Where(key => key.Id == 1).ExecuteCommand(); Assert.Equal(SignatureKeyLookupResult.Disabled, (await resolver.ResolveAsync("old")).Result); @@ -36,19 +36,19 @@ public async Task SessionRotation_SeesNewKeyAndLeaseChanges_WithoutRequestScope( { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantSessionKeyEntity)); - database.MainDb.Insertable(new TenantSessionKeyEntity + database.InitBusinessTables(typeof(SessionKeyEntity)); + database.MainDb.Insertable(new SessionKeyEntity { Id = 1, Kid = "old", Secret = "old-secret", IsEnabled = true, CreatedTime = 1, UpdateTime = 0, }).ExecuteCommand(); var resolver = new SessionKeyResolver(database.MainDb); Assert.Equal("old-secret", (await resolver.ResolveAsync("old")).Secret); - database.MainDb.Insertable(new TenantSessionKeyEntity + database.MainDb.Insertable(new SessionKeyEntity { Id = 2, Kid = "new", Secret = "new-secret", IsEnabled = true, CreatedTime = 2, UpdateTime = 0, }).ExecuteCommand(); Assert.Equal("new-secret", (await resolver.ResolveAsync("new")).Secret); - database.MainDb.Updateable() + database.MainDb.Updateable() .SetColumns(key => key.ExpireTime == 1).SetColumns(key => key.UpdateTime == 3) .Where(key => key.Id == 1).ExecuteCommand(); Assert.Equal(SessionKeyLookupResult.Expired, (await resolver.ResolveAsync("old")).Result); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/MainDatabaseAdvertisementLedgerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/MainDatabaseAdvertisementLedgerTests.cs index 3a4c0cb0..5a644ebd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/MainDatabaseAdvertisementLedgerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/MainDatabaseAdvertisementLedgerTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Application.ClientDelivery.AdvertisementReward; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ClientApi; @@ -11,14 +11,14 @@ public async Task LedgerPageAndExport_KeepBusinessFiltersAndRejectDirectWrites() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameAdvertisementRewardEntity)); - database.MainDb.Insertable(new TenantGameAdvertisementRewardEntity + database.InitBusinessTables(typeof(GameAdvertisementRewardEntity)); + database.MainDb.Insertable(new GameAdvertisementRewardEntity { Id = 100, Provider = "TopOn", TransactionId = "transaction-100", RoleId = "role-100", IdempotencyKey = "adreward:topon:transaction-100", AreaId = 10, }).ExecuteCommand(); var service = new GameAdvertisementRewardService( - new SqlSugarRepository { Context = database.MainDb }); + new SqlSugarRepository { Context = database.MainDb }); Assert.Equal(100, Assert.Single((await service.PageAsync(new() { Provider = "TopOn", AreaId = 10 })).Items).Id); Assert.Empty(await service.ExportAsync(new() { Provider = "UnityAds" })); Assert.Single(await service.ExportAsync(new() { TransactionId = "transaction-100" })); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PaymentOptionSettingSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PaymentOptionSettingSingleMainTests.cs index 902ccdb1..f5e15c90 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PaymentOptionSettingSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PaymentOptionSettingSingleMainTests.cs @@ -1,6 +1,6 @@ using System.Reflection; using GameFrameX.Client.Api.Integrations.Payment; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.Apple.Option; using Microsoft.AspNetCore.Http; @@ -13,7 +13,7 @@ public sealed class PaymentOptionSettingSingleMainTests : IDisposable public PaymentOptionSettingSingleMainTests() { _ = Assembly.Load("GameFrameX.Payment.Apple"); - _database.InitTenantTables(typeof(TenantGamePaymentConfigEntity)); + _database.InitBusinessTables(typeof(GamePaymentConfigEntity)); } [Fact] @@ -58,7 +58,7 @@ public void ValidPackage_OverridesDefaultAndDisabledPackageFallsBack() public void DisabledConfiguration_IsNeverReturned() { Seed(1, false, 0, "disabled"); - _database.MainDb.Updateable().SetColumns(row => row.IsEnabled == false).Where(row => row.Id == 1).ExecuteCommand(); + _database.MainDb.Updateable().SetColumns(row => row.IsEnabled == false).Where(row => row.Id == 1).ExecuteCommand(); Assert.Empty(Provider(null).GetOptionSettings("apple")); } @@ -69,7 +69,7 @@ private PaymentOptionSettingProvider Provider(HttpContext? context) private void Seed(long id, bool sandbox, long packageId, string secret) { - _database.MainDb.Insertable(new TenantGamePaymentConfigEntity + _database.MainDb.Insertable(new GamePaymentConfigEntity { Id = id, PayChannel = "apple", IsSandbox = sandbox, PackageIdNormalized = packageId, ConfigJson = "{\"ApplePaymentSharedSecret\":\"" + secret + "\"}", IsEnabled = true, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackRoutingTests.cs similarity index 87% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackRoutingTests.cs index fce81e2f..c0f28a94 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackRoutingTests.cs @@ -1,19 +1,19 @@ using System.Text.Json; using GameFrameX.Client.Api.Integrations.Payment; using GameFrameX.Client.Api.Middleware; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Client.Api.Services.PublicCallback; using GameFrameX.Core.Middleware; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.ClientApiConfig; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Payment.AliPay; using Microsoft.AspNetCore.Http; using SqlSugar; namespace GameFrameX.Core.Tests.ClientApi; -public sealed class PublicCallbackTenantRoutingTests +public sealed class PublicCallbackRoutingTests { [Fact] public async Task Middleware_WithPackageRouteParameter_EstablishesCallbackContextBeforeNext() @@ -25,10 +25,10 @@ public async Task Middleware_WithPackageRouteParameter_EstablishesCallbackContex SetPublicCallbackEndpoint(context, "alipay", "payment"); context.Request.RouteValues["packageId"] = packageId; var nextCalled = false; - var middleware = new PublicCallbackTenantResolutionMiddleware(current => + var middleware = new PublicCallbackResolutionMiddleware(current => { nextCalled = true; - Assert.False(current.Items.ContainsKey("TenantId")); + Assert.False(current.Items.ContainsKey("Id")); Assert.False(current.Items.ContainsKey("AppId")); Assert.IsType(current.Items[PublicCallbackRouteContext.ItemKey]); Assert.Equal(packageId, current.Items[PaymentOptionSettingProvider.PackageIdKey]); @@ -47,14 +47,14 @@ public async Task Middleware_WithoutPackageRouteParameter_EstablishesCallbackCon { var context = new DefaultHttpContext(); SetPublicCallbackEndpoint(context, "alipay", "payment"); - var middleware = new PublicCallbackTenantResolutionMiddleware(current => + var middleware = new PublicCallbackResolutionMiddleware(current => { Assert.IsType(current.Items[PublicCallbackRouteContext.ItemKey]); return Task.CompletedTask; }); await middleware.InvokeAsync(context, new PublicCallbackRouteResolver(fixture.MainDb)); Assert.Equal(200, context.Response.StatusCode); - Assert.False(context.Items.ContainsKey("TenantId")); + Assert.False(context.Items.ContainsKey("Id")); } } @@ -65,7 +65,7 @@ public void PaymentProvider_BareQueryScopeDoesNotChangeMainConfiguration() { InsertAliPayConfig(fixture.MainDb, false); var context = new DefaultHttpContext(); - context.Request.QueryString = new QueryString("?tenantId=999&appId=888&env=prod"); + context.Request.QueryString = new QueryString("?id=999&appId=888&env=prod"); context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("alipay", "payment", null); var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); var setting = Assert.Single(provider.GetOptionSettings("alipay")); @@ -143,13 +143,13 @@ public async Task AdvertisementOptionsProvider_PicksPangleConfigFromPublicCallba { fixture.MainDb.Insertable(new[] { - new TenantAdvertisementCallbackConfigEntity + new AdvertisementCallbackConfigEntity { Id = 1900000004201, Provider = "TopOn", ConfigJson = JsonSerializer.Serialize(new { callbackUrl = "https://client.example.com/topon", signingSecret = "topon-secret" }), IsEnabled = true, }, - new TenantAdvertisementCallbackConfigEntity + new AdvertisementCallbackConfigEntity { Id = 1900000004202, Provider = "Pangle", ConfigJson = JsonSerializer.Serialize(new { callbackUrl = "https://client.example.com/pangle", signingSecret = "pangle-secret" }), @@ -157,9 +157,9 @@ public async Task AdvertisementOptionsProvider_PicksPangleConfigFromPublicCallba }, }).ExecuteCommand(); var context = new DefaultHttpContext(); - context.Items["TenantId"] = 999L; + context.Items["Id"] = 999L; context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("pangle", "ad", null); - var provider = new ClientApiTenantOptionsProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); + var provider = new ClientApiOptionsProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); var options = await provider.GetAdvertisementCallbackOptionsAsync(); Assert.NotNull(options); Assert.Equal("Pangle", options.Provider); @@ -169,10 +169,10 @@ public async Task AdvertisementOptionsProvider_PicksPangleConfigFromPublicCallba private static ClientApiTestDb CreateFixture(long? packageId = null) { - var fixture = new ClientApiTestDb().InitTenantTables(typeof(TenantGameAppPackageEntity), typeof(TenantGamePaymentConfigEntity), typeof(TenantAdvertisementCallbackConfigEntity)); + var fixture = new ClientApiTestDb().InitBusinessTables(typeof(GameAppPackageEntity), typeof(GamePaymentConfigEntity), typeof(AdvertisementCallbackConfigEntity)); if (packageId.HasValue) { - fixture.MainDb.Insertable(new TenantGameAppPackageEntity + fixture.MainDb.Insertable(new GameAppPackageEntity { Id = packageId.Value, Name = "主库测试分包", PackageName = "com.gameframex.callback", PlatformCode = "ios", PlatformName = "iOS", ChannelCode = "default", ChannelName = "Default", IsEnabled = true, @@ -189,7 +189,7 @@ private static void SetPublicCallbackEndpoint(DefaultHttpContext context, string private static void InsertAliPayConfig(ISqlSugarClient database, bool isSandbox, string notifyUrl = "https://client.example.com/api/GameOrder/NotifyAliPay") { - database.Insertable(new TenantGamePaymentConfigEntity + database.Insertable(new GamePaymentConfigEntity { Id = 1900000004201, PackageIdNormalized = 0, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs index 2c38691c..7432d869 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Client.Api.Middleware; using GameFrameX.Client.Api.Services.PublicCallback; using GameFrameX.Core.Middleware; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.AliPay; using GameFrameX.Payment.Wechat; using Microsoft.AspNetCore.Http; @@ -18,14 +18,14 @@ public sealed class PublicCallbackSingleMainTests public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string channel) { // 出站下单通知地址经 PaymentOptionSettingProvider 真实构造:站点根地址自动补全新回调路由段 - //(旧 tenantId/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 + //(旧 id/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGamePaymentConfigEntity)); + database.InitBusinessTables(typeof(GamePaymentConfigEntity)); var configJson = channel == "alipay" ? JsonSerializer.Serialize(new AliPayOptionSetting { AliPayNotifyUrl = "https://example.test", }) : JsonSerializer.Serialize(new WechatPayOptionSetting { WechatPayNotifyUrl = "https://example.test", }); - database.TenantDb.Insertable(new TenantGamePaymentConfigEntity + database.Db.Insertable(new GamePaymentConfigEntity { Id = 1900000005101, PackageIdNormalized = 0, @@ -36,8 +36,8 @@ public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string ch }).ExecuteCommand(); var context = new DefaultHttpContext(); - context.Request.QueryString = new QueryString("?tenantId=123&appId=456"); - var provider = new PaymentOptionSettingProvider(database.TenantDbProvider, new HttpContextAccessor { HttpContext = context }); + context.Request.QueryString = new QueryString("?id=123&appId=456"); + var provider = new PaymentOptionSettingProvider(database.DbProvider, new HttpContextAccessor { HttpContext = context }); var expectedRoute = channel == "alipay" ? "api/GameOrder/NotifyAliPay" : "api/GameOrder/NotifyWeChatPay"; var notifyUrl = channel == "alipay" @@ -55,10 +55,10 @@ public async Task IncomingCallback_OldRouteSegments_DoNotCreateScopeContext() var context = new DefaultHttpContext(); context.SetEndpoint(new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(new PublicCallbackEndpointAttribute("pangle", "ad")), "callback")); - context.Request.RouteValues["tenantId"] = 999; + context.Request.RouteValues["id"] = 999; context.Request.RouteValues["appId"] = 888; var invoked = false; - var middleware = new PublicCallbackTenantResolutionMiddleware(request => + var middleware = new PublicCallbackResolutionMiddleware(request => { invoked = true; Assert.Single(request.Items); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RemoteConfigRolloutMatcherTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RemoteConfigRolloutMatcherTests.cs index 68c16985..7d000287 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RemoteConfigRolloutMatcherTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RemoteConfigRolloutMatcherTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Client.Api.Services.RemoteConfig; using GameFrameX.Client.Api.Services; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; namespace GameFrameX.Core.Tests.ClientApi; @@ -68,12 +68,12 @@ public void SelectWinner_SamePriorityAndScore_UsesLatestEnabledRecord() Assert.Same(latest, winner); } - private static TenantGameAppRemoteConfigEntity CreateRecord( + private static GameAppRemoteConfigEntity CreateRecord( long id = 1, int priority = 0, int rolloutPercent = 100) { - return new TenantGameAppRemoteConfigEntity + return new GameAppRemoteConfigEntity { Id = id, Priority = priority, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs index 4c837ee2..0a76b844 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs @@ -2,12 +2,12 @@ using System.Security.Cryptography; using GameFrameX.Advertisement.Abstract; using GameFrameX.Client.Api.Integrations.Payment; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Client.Api.Services.GameLoginTicket; using GameFrameX.Core.Middleware; -using GameFrameX.Core.Service.Tenant; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Core.Service.Business; +using GameFrameX.Entity.Business.ClientApiConfig; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.AliPay; using Microsoft.AspNetCore.Http; @@ -17,7 +17,7 @@ namespace GameFrameX.Core.Tests.ClientApi; // Client.Api 六链路全部还原明文可用;密文存在而密钥缺失 fail-closed。 // change:gfx-doc/dev/client-api/changes/C372-runtime-credential-decrypt-closure/change.md // 链路清单(T1 notes.md):签名密钥环 / 会话密钥环 / 票据 RSA 私钥 / 选项 Provider(邮件·广告·令牌策略)/ 支付配置。 -// Hub 链路(开放访问中间件)在 GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs。 +// Hub 链路(开放访问中间件)在 GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs。 public sealed class RuntimeCredentialDecryptClosureTests : IDisposable { private readonly ClientApiTestDb _db = new(); @@ -25,8 +25,8 @@ public sealed class RuntimeCredentialDecryptClosureTests : IDisposable public RuntimeCredentialDecryptClosureTests() { - _originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + _originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); // 支付渠道注册表反射扫描已加载程序集——显式加载渠道程序集,保证 alipay 渠道 schema 可解析 _ = Assembly.Load("GameFrameX.Payment.AliPay"); @@ -34,24 +34,24 @@ public RuntimeCredentialDecryptClosureTests() public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); _db.Dispose(); } [Fact] public async Task SignatureKeyResolver_MixedRows_ResolvesPlaintextForBoth() { - _db.InitTenantTables(typeof(TenantAppSignatureKeyEntity)); - _db.TenantDb.Insertable(new TenantAppSignatureKeyEntity + _db.InitBusinessTables(typeof(AppSignatureKeyEntity)); + _db.Db.Insertable(new AppSignatureKeyEntity { Id = 7101, Kid = "kid-plain", Secret = "sig-plain", IsEnabled = true, }).ExecuteCommand(); - _db.TenantDb.Insertable(new TenantAppSignatureKeyEntity + _db.Db.Insertable(new AppSignatureKeyEntity { - Id = 7102, Kid = "kid-cipher", Secret = TenantSecretCrypto.Encrypt("sig-cipher")!, IsEnabled = true, + Id = 7102, Kid = "kid-cipher", Secret = SecretCrypto.Encrypt("sig-cipher")!, IsEnabled = true, }).ExecuteCommand(); - var resolver = new SignatureKeyResolver(_db.TenantDbProvider); + var resolver = new SignatureKeyResolver(_db.DbProvider); var plainLookup = await resolver.ResolveAsync("kid-plain"); var cipherLookup = await resolver.ResolveAsync("kid-cipher"); @@ -66,17 +66,17 @@ public async Task SignatureKeyResolver_MixedRows_ResolvesPlaintextForBoth() [Fact] public async Task SessionKeyResolver_MixedRows_ResolvesPlaintextForBoth() { - _db.InitTenantTables(typeof(TenantSessionKeyEntity)); - _db.TenantDb.Insertable(new TenantSessionKeyEntity + _db.InitBusinessTables(typeof(SessionKeyEntity)); + _db.Db.Insertable(new SessionKeyEntity { Id = 7201, Kid = "kid-plain", Secret = "session-plain", IsEnabled = true, }).ExecuteCommand(); - _db.TenantDb.Insertable(new TenantSessionKeyEntity + _db.Db.Insertable(new SessionKeyEntity { - Id = 7202, Kid = "kid-cipher", Secret = TenantSecretCrypto.Encrypt("session-cipher")!, IsEnabled = true, + Id = 7202, Kid = "kid-cipher", Secret = SecretCrypto.Encrypt("session-cipher")!, IsEnabled = true, }).ExecuteCommand(); - var resolver = new SessionKeyResolver(_db.TenantDbProvider); + var resolver = new SessionKeyResolver(_db.DbProvider); var plainLookup = await resolver.ResolveAsync("kid-plain"); var cipherLookup = await resolver.ResolveAsync("kid-cipher"); @@ -88,21 +88,21 @@ public async Task SessionKeyResolver_MixedRows_ResolvesPlaintextForBoth() [Fact] public async Task LoginTicketKeyResolver_EncryptedPrivateKey_ResolvesUsableRsaKey() { - _db.InitTenantTables(typeof(TenantGameLoginTicketKeyEntity)); + _db.InitBusinessTables(typeof(GameLoginTicketKeyEntity)); using (var rsa = RSA.Create(2048)) { - _db.TenantDb.Insertable(new TenantGameLoginTicketKeyEntity + _db.Db.Insertable(new GameLoginTicketKeyEntity { Id = 7301, Kid = "kid-ticket", Algorithm = GameLoginTicketSigningKey.AlgorithmRs256, - PrivateKeyPem = TenantSecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem())!, + PrivateKeyPem = SecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem())!, PublicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(), IsEnabled = true, }).ExecuteCommand(); } // 存在生效 key 时 optionsProvider(自动建 key 开关)不被触达,传 null 即可 - var resolver = new GameLoginTicketKeyResolver(_db.TenantDbProvider, null!); + var resolver = new GameLoginTicketKeyResolver(_db.DbProvider, null!); var signingKey = await resolver.ResolveSigningKeyAsync(); @@ -113,13 +113,13 @@ public async Task LoginTicketKeyResolver_EncryptedPrivateKey_ResolvesUsableRsaKe [Fact] public async Task OptionsProvider_TokenPolicy_SigningKeyDecrypts() { - _db.InitTenantTables(typeof(TenantClientApiPolicyEntity)); - _db.TenantDb.Insertable(new TenantClientApiPolicyEntity + _db.InitBusinessTables(typeof(ClientApiPolicyEntity)); + _db.Db.Insertable(new ClientApiPolicyEntity { - Id = 7401, SigningKey = TenantSecretCrypto.Encrypt("policy-signing-key")!, IsEnabled = true, + Id = 7401, SigningKey = SecretCrypto.Encrypt("policy-signing-key")!, IsEnabled = true, }).ExecuteCommand(); - var provider = new ClientApiTenantOptionsProvider(_db.TenantDbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); + var provider = new ClientApiOptionsProvider(_db.DbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); var policy = await provider.GetTokenPolicyAsync(); @@ -129,17 +129,17 @@ public async Task OptionsProvider_TokenPolicy_SigningKeyDecrypts() [Fact] public async Task OptionsProvider_Advertisement_JsonSensitiveFieldDecrypts() { - _db.InitTenantTables(typeof(TenantAdvertisementCallbackConfigEntity)); + _db.InitBusinessTables(typeof(AdvertisementCallbackConfigEntity)); var configJson = AdvertisementCallbackConfigCrypto.EncryptConfigJson("Pangle", "{\"callbackUrl\":\"https://cb.example.com/hook\",\"signingSecret\":\"ad-json-secret\"}"); - _db.TenantDb.Insertable(new TenantAdvertisementCallbackConfigEntity + _db.Db.Insertable(new AdvertisementCallbackConfigEntity { Id = 7501, Provider = "Pangle", - SigningSecret = TenantSecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, + SigningSecret = SecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, ConfigJson = configJson, IsEnabled = true, }).ExecuteCommand(); - var provider = new ClientApiTenantOptionsProvider(_db.TenantDbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); + var provider = new ClientApiOptionsProvider(_db.DbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); var options = await provider.GetAdvertisementCallbackOptionsAsync(); @@ -153,16 +153,16 @@ public async Task OptionsProvider_Advertisement_JsonSensitiveFieldDecrypts() [Fact] public async Task OptionsProvider_Advertisement_MissingRequiredSecretKey_Throws() { - _db.InitTenantTables(typeof(TenantAdvertisementCallbackConfigEntity)); + _db.InitBusinessTables(typeof(AdvertisementCallbackConfigEntity)); // ConfigJson 是验签材料唯一来源:Pangle 缺 signingSecret 直接 fail-closed,不再回落汇总列 - _db.TenantDb.Insertable(new TenantAdvertisementCallbackConfigEntity + _db.Db.Insertable(new AdvertisementCallbackConfigEntity { Id = 7511, Provider = "Pangle", - SigningSecret = TenantSecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, + SigningSecret = SecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, ConfigJson = "{\"callbackUrl\":\"https://cb.example.com/hook\"}", IsEnabled = true, }).ExecuteCommand(); - var provider = new ClientApiTenantOptionsProvider(_db.TenantDbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); + var provider = new ClientApiOptionsProvider(_db.DbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); var ex = await Assert.ThrowsAsync(() => provider.GetAdvertisementCallbackOptionsAsync()); Assert.Contains("signingSecret", ex.Message, StringComparison.Ordinal); @@ -171,15 +171,15 @@ public async Task OptionsProvider_Advertisement_MissingRequiredSecretKey_Throws( [Fact] public async Task OptionsProvider_Advertisement_AdMobRequiresVerificationKeys() { - _db.InitTenantTables(typeof(TenantAdvertisementCallbackConfigEntity)); + _db.InitBusinessTables(typeof(AdvertisementCallbackConfigEntity)); // AdMob 行必填 verificationKeys;signingSecret 缺失不影响(AdMob 用 verificationKeys 验签) - _db.TenantDb.Insertable(new TenantAdvertisementCallbackConfigEntity + _db.Db.Insertable(new AdvertisementCallbackConfigEntity { Id = 7512, Provider = "GoogleAdMob", ConfigJson = "{\"callbackUrl\":\"https://cb.example.com/admob\",\"verificationKeys\":\"k1=base64key\"}", IsEnabled = true, }).ExecuteCommand(); - var provider = new ClientApiTenantOptionsProvider(_db.TenantDbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); + var provider = new ClientApiOptionsProvider(_db.DbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); var options = await provider.GetAdvertisementCallbackOptionsAsync(); @@ -191,16 +191,16 @@ public async Task OptionsProvider_Advertisement_AdMobRequiresVerificationKeys() [Fact] public async Task OptionsProvider_Email_SecretIdKeyDecrypts() { - _db.InitTenantTables(typeof(TenantEmailConfigEntity)); - _db.TenantDb.Insertable(new TenantEmailConfigEntity + _db.InitBusinessTables(typeof(EmailConfigEntity)); + _db.Db.Insertable(new EmailConfigEntity { Id = 7601, FromEmailAddress = "noreply@example.com", - FromEmailSecretId = TenantSecretCrypto.Encrypt("email-plain-id")!, - FromEmailSecretKey = TenantSecretCrypto.Encrypt("email-plain-key")!, + FromEmailSecretId = SecretCrypto.Encrypt("email-plain-id")!, + FromEmailSecretKey = SecretCrypto.Encrypt("email-plain-key")!, IsEnabled = true, }).ExecuteCommand(); - var provider = new ClientApiTenantOptionsProvider(_db.TenantDbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); + var provider = new ClientApiOptionsProvider(_db.DbProvider, new HttpContextAccessor { HttpContext = _db.CreateHttpContext(), }); var options = await provider.GetEmailOptionsAsync(); @@ -213,17 +213,17 @@ public void PaymentProvider_Sqlite_MainDatabaseQuery_ReturnsDecryptedOption() { // 回归锁定:作用域 Where 的 Nullable.HasValue 闭包曾使 SqlSugar 生成非法 SQL // (SQLite 报 near "IS"、PG 报 near "NOT"),已提为表达式树外局部布尔修复 - _db.InitTenantTables(typeof(TenantGamePaymentConfigEntity)); + _db.InitBusinessTables(typeof(GamePaymentConfigEntity)); var configJson = PaymentConfigCrypto.EncryptConfigJson("alipay", "{\"AliPayAppId\":\"2021001\",\"AliPayMerchantPrivateKey\":\"plain-merchant-key\",\"AliPayGatewayUrl\":\"https://openapi.alipay.com/gateway.do\"}"); - _db.TenantDb.Insertable(new TenantGamePaymentConfigEntity + _db.Db.Insertable(new GamePaymentConfigEntity { Id = 7701, PayChannel = "alipay", ConfigJson = configJson, IsEnabled = true, }).ExecuteCommand(); - var context = _db.CreateHttpContext(includeTenant: false, includeApp: false); + var context = _db.CreateHttpContext(include: false, includeApp: false); context.Items[GameFrameX.Core.Middleware.PublicCallbackRouteContext.ItemKey] = true; - var provider = new PaymentOptionSettingProvider(_db.TenantDbProvider, new HttpContextAccessor { HttpContext = context, }); + var provider = new PaymentOptionSettingProvider(_db.DbProvider, new HttpContextAccessor { HttpContext = context, }); var setting = provider.GetOptionSetting("alipay"); @@ -234,25 +234,25 @@ public void PaymentProvider_Sqlite_MainDatabaseQuery_ReturnsDecryptedOption() [Fact] public void TenantSecretCrypto_FailClosed_CiphertextWithoutKey_ThrowsWithEnvVarHint() { - var cipher = TenantSecretCrypto.Encrypt("fail-closed-secret")!; - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, null); + var cipher = SecretCrypto.Encrypt("fail-closed-secret")!; + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, null); - var exception = Assert.Throws(() => TenantSecretCrypto.Decrypt(cipher)); - Assert.Contains(TenantSecretCrypto.KeyEnvironmentVariable, exception.Message, StringComparison.Ordinal); + var exception = Assert.Throws(() => SecretCrypto.Decrypt(cipher)); + Assert.Contains(SecretCrypto.KeyEnvironmentVariable, exception.Message, StringComparison.Ordinal); Assert.DoesNotContain(cipher, exception.Message, StringComparison.Ordinal); // DecryptCached 同语义:fail-closed 抛出不落缓存,重复调用同样抛 - Assert.Throws(() => TenantSecretCrypto.DecryptCached(cipher)); - Assert.Throws(() => TenantSecretCrypto.DecryptCached(cipher)); + Assert.Throws(() => SecretCrypto.DecryptCached(cipher)); + Assert.Throws(() => SecretCrypto.DecryptCached(cipher)); } [Fact] public void TenantSecretCrypto_DecryptCached_PlaintextPassthrough_AndStableResult() { - var cipher = TenantSecretCrypto.Encrypt("cached-secret")!; + var cipher = SecretCrypto.Encrypt("cached-secret")!; - Assert.Equal("plain-value", TenantSecretCrypto.DecryptCached("plain-value")); - Assert.Equal("cached-secret", TenantSecretCrypto.DecryptCached(cipher)); - Assert.Equal("cached-secret", TenantSecretCrypto.DecryptCached(cipher)); + Assert.Equal("plain-value", SecretCrypto.DecryptCached("plain-value")); + Assert.Equal("cached-secret", SecretCrypto.DecryptCached(cipher)); + Assert.Equal("cached-secret", SecretCrypto.DecryptCached(cipher)); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/SignatureValidationMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/SignatureValidationMiddlewareTests.cs index 0ef38b17..732c1e0a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/SignatureValidationMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/SignatureValidationMiddlewareTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Core.Enum; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; @@ -689,9 +689,9 @@ public void Judge_LeaseAndEnableSemantics() Assert.Equal(SignatureKeyLookupResult.Expired, SignatureKeyResolver.Judge(Key(0, now, true), now)); // now == Expire 即到期 return; - static TenantAppSignatureKeyEntity Key(long? notBefore, long? expire, bool enabled) + static AppSignatureKeyEntity Key(long? notBefore, long? expire, bool enabled) { - return new TenantAppSignatureKeyEntity { NotBeforeTime = notBefore, ExpireTime = expire, IsEnabled = enabled, }; + return new AppSignatureKeyEntity { NotBeforeTime = notBefore, ExpireTime = expire, IsEnabled = enabled, }; } } @@ -709,12 +709,12 @@ private static string SignV1(string secret, string method, string path, string q /// private sealed class FakeSignatureKeyResolver : ISignatureKeyResolver { - private readonly List _keys = new(); + private readonly List _keys = new(); public void AddKey(long appId, string kid, string secret, bool enabled, long? notBefore, long? expire) { _keys.RemoveAll(x => x.Kid == kid); - _keys.Add(new TenantAppSignatureKeyEntity + _keys.Add(new AppSignatureKeyEntity { Kid = kid, Secret = secret, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/EmailProviderSelectorTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/EmailProviderSelectorTests.cs index 4a9e23e1..32d4a252 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/EmailProviderSelectorTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/EmailProviderSelectorTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Application.Platform.Email; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; using GameFrameX.Entity.System; using GameFrameX.Client.Api.Services.Email; using SqlSugar; @@ -20,7 +20,7 @@ public EmailProviderSelectorTests() InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, }); - _db.CodeFirst.InitTables(); + _db.CodeFirst.InitTables(); } [Fact] @@ -64,12 +64,12 @@ public async Task SystemSelector_ReturnsNullWhenNoEnabledProviderExists() [Fact] public async Task TenantSelector_ExactPurposeBeatsDefaultPriority() { - await InsertTenantAsync(1, 100, 0, 0, 999, 40, true); - await InsertTenantAsync(2, 100, 0, 7, 1, 5, true); - await InsertTenantAsync(3, 100, 200, 0, 999, 20, true); - await InsertTenantAsync(4, 100, 200, 7, 1, 10, true); + await InsertAsync(1, 100, 0, 0, 999, 40, true); + await InsertAsync(2, 100, 0, 7, 1, 5, true); + await InsertAsync(3, 100, 200, 0, 999, 20, true); + await InsertAsync(4, 100, 200, 7, 1, 10, true); - var selected = await TenantEmailConfigSelector.SelectAsync(_db, 7); + var selected = await EmailConfigSelector.SelectAsync(_db, 7); Assert.NotNull(selected); Assert.Equal(4, selected.Id); @@ -78,12 +78,12 @@ public async Task TenantSelector_ExactPurposeBeatsDefaultPriority() [Fact] public async Task TenantSelector_UsesPriorityUpdateTimeAndIdTieBreakAndIgnoresDisabled() { - await InsertTenantAsync(1, 100, 200, 7, 300, 30, false); - await InsertTenantAsync(2, 100, 200, 7, 100, 10, true); - await InsertTenantAsync(3, 100, 200, 7, 200, 20, true); - await InsertTenantAsync(4, 100, 200, 7, 200, 20, true); + await InsertAsync(1, 100, 200, 7, 300, 30, false); + await InsertAsync(2, 100, 200, 7, 100, 10, true); + await InsertAsync(3, 100, 200, 7, 200, 20, true); + await InsertAsync(4, 100, 200, 7, 200, 20, true); - var selected = await TenantEmailConfigSelector.SelectAsync(_db, 7); + var selected = await EmailConfigSelector.SelectAsync(_db, 7); Assert.NotNull(selected); Assert.Equal(4, selected.Id); @@ -92,8 +92,8 @@ public async Task TenantSelector_UsesPriorityUpdateTimeAndIdTieBreakAndIgnoresDi [Fact] public async Task TenantSelector_DefaultPurposeFallbackWorksWithoutRequestContext() { - await InsertTenantAsync(1, 100, 200, 0, 100, 10, true); - var selected = await TenantEmailConfigSelector.SelectAsync(_db, 7); + await InsertAsync(1, 100, 200, 0, 100, 10, true); + var selected = await EmailConfigSelector.SelectAsync(_db, 7); Assert.Equal(1, selected?.Id); } @@ -101,10 +101,10 @@ public async Task TenantSelector_DefaultPurposeFallbackWorksWithoutRequestContex [Fact] public async Task TenantSelector_ReturnsNullWhenNoEnabledProvider() { - await InsertTenantAsync(1, 999, 200, 7, 100, 10, false); - await InsertTenantAsync(2, 100, 200, 7, 100, 10, false); + await InsertAsync(1, 999, 200, 7, 100, 10, false); + await InsertAsync(2, 100, 200, 7, 100, 10, false); - var selected = await TenantEmailConfigSelector.SelectAsync(_db, 7); + var selected = await EmailConfigSelector.SelectAsync(_db, 7); Assert.Null(selected); } @@ -137,9 +137,9 @@ await _db.Insertable(new SystemEmailProviderEntity }).ExecuteCommandAsync(); } - private async Task InsertTenantAsync(long id, long tenantId, long appId, int purpose, int priority, long updateTime, bool enabled) + private async Task InsertAsync(long id, long id, long appId, int purpose, int priority, long updateTime, bool enabled) { - await _db.Insertable(new TenantEmailConfigEntity + await _db.Insertable(new EmailConfigEntity { Id = id, CreatedId = 1, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/AdminEnumVisibilityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/AdminEnumVisibilityTests.cs index f3465f1a..8ce3375d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/AdminEnumVisibilityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/AdminEnumVisibilityTests.cs @@ -68,7 +68,7 @@ private static List GetLegacyWhitelistPublicEnums() "GameFrameX.Core.Enum.Errors.RoleMenuErrorCode", "GameFrameX.Core.Enum.Errors.DictionaryErrorCode", "GameFrameX.Core.Enum.Errors.PlatformConfigErrorCode", - "GameFrameX.Core.Enum.Errors.TenantErrorCode", + "GameFrameX.Core.Enum.Errors.ErrorCode", "GameFrameX.Core.Enum.Errors.OrganizationErrorCode", "GameFrameX.Core.Enum.Errors.PositionErrorCode", "GameFrameX.Core.Enum.Errors.FileErrorCode", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs index 6d36a99f..021b0a00 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Client.Api.Integrations.Advertisement; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Idempotency; using GameFrameX.Foundation.Utility; @@ -22,28 +22,28 @@ public sealed class BusinessTableIdempotencyStoreTests : IDisposable [Fact] public async Task AntiCheatStore_RepeatedOccupation_ExactlyOneSucceeds() { - _db.InitTenantTables(typeof(TenantGameAntiCheatEventEntity)); + _db.InitBusinessTables(typeof(GameAntiCheatEventEntity)); // 顺序重复占位:仅首次成功(并发恰一由 ux_anticheat_idempotency 唯一索引在库层仲裁, // SQLite 测试库为单连接不支持多线程并发,真并发验证依赖 PG 环境) var results = new List(); for (var i = 0; i < 8; i++) { - var store = new AntiCheatEventIdempotencyStore(_db.Repository(), BuildAntiCheatTemplate("anticheat-key-concurrent")); + var store = new AntiCheatEventIdempotencyStore(_db.Repository(), BuildAntiCheatTemplate("anticheat-key-concurrent")); results.Add(await store.TryBeginProcessingAsync(BuildRecord(AntiCheatEventIdempotencyStore.IdempotencyScope, "anticheat-key-concurrent"))); } Assert.Single(results, succeeded => succeeded); - var rows = await _db.TenantDb.Queryable().Where(u => u.IdempotencyKey == "anticheat-key-concurrent").ToListAsync(); + var rows = await _db.Db.Queryable().Where(u => u.IdempotencyKey == "anticheat-key-concurrent").ToListAsync(); Assert.Single(rows); } [Fact] public async Task AntiCheatStore_ExistingEvent_ReplaysAsCompleted() { - _db.InitTenantTables(typeof(TenantGameAntiCheatEventEntity)); + _db.InitBusinessTables(typeof(GameAntiCheatEventEntity)); - var store = new AntiCheatEventIdempotencyStore(_db.Repository(), BuildAntiCheatTemplate("anticheat-key-replay")); + var store = new AntiCheatEventIdempotencyStore(_db.Repository(), BuildAntiCheatTemplate("anticheat-key-replay")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(AntiCheatEventIdempotencyStore.IdempotencyScope, "anticheat-key-replay"))); var record = await store.TryGetRecordAsync(new IdempotencyRecordIdentifier(AntiCheatEventIdempotencyStore.IdempotencyScope, "anticheat-key-replay")); @@ -57,9 +57,9 @@ public async Task AntiCheatStore_ExistingEvent_ReplaysAsCompleted() [Fact] public async Task AntiCheatStore_FailAsync_RemovesOccupationRow() { - _db.InitTenantTables(typeof(TenantGameAntiCheatEventEntity)); + _db.InitBusinessTables(typeof(GameAntiCheatEventEntity)); - var store = new AntiCheatEventIdempotencyStore(_db.Repository(), BuildAntiCheatTemplate("anticheat-key-fail")); + var store = new AntiCheatEventIdempotencyStore(_db.Repository(), BuildAntiCheatTemplate("anticheat-key-fail")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(AntiCheatEventIdempotencyStore.IdempotencyScope, "anticheat-key-fail"))); await store.FailAsync(new IdempotencyFailureRequest(new IdempotencyRecordIdentifier(AntiCheatEventIdempotencyStore.IdempotencyScope, "anticheat-key-fail"), 0)); @@ -70,9 +70,9 @@ public async Task AntiCheatStore_FailAsync_RemovesOccupationRow() [Fact] public async Task AdvertisementRewardStore_ClaimsPendingRow_AndBlocksReOccupation() { - _db.InitTenantTables(typeof(TenantGameAdvertisementRewardEntity)); + _db.InitBusinessTables(typeof(GameAdvertisementRewardEntity)); - var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-claim")); + var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-claim")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, "adreward-key-claim"))); // Pending 占用中:占位失败 → 协调器判 Busy / 等待 @@ -85,16 +85,16 @@ public async Task AdvertisementRewardStore_ClaimsPendingRow_AndBlocksReOccupatio [Fact] public async Task AdvertisementRewardStore_FailedRow_AllowsLegalReOccupation() { - _db.InitTenantTables(typeof(TenantGameAdvertisementRewardEntity)); + _db.InitBusinessTables(typeof(GameAdvertisementRewardEntity)); - var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-retry")); + var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-retry")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, "adreward-key-retry"))); await store.FailAsync(new IdempotencyFailureRequest(new IdempotencyRecordIdentifier(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, "adreward-key-retry"), 0)); // 法定覆盖:存量 Failed 重试复用同一行(翻回 Pending) Assert.True(await store.TryBeginProcessingAsync(BuildRecord(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, "adreward-key-retry"))); - var rows = await _db.TenantDb.Queryable().Where(u => u.IdempotencyKey == "adreward-key-retry").ToListAsync(); + var rows = await _db.Db.Queryable().Where(u => u.IdempotencyKey == "adreward-key-retry").ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Pending, rows[0].Status); } @@ -102,10 +102,10 @@ public async Task AdvertisementRewardStore_FailedRow_AllowsLegalReOccupation() [Fact] public async Task AdvertisementRewardStore_CompleteSettlesSuccess_AndReplaysAsCompleted() { - _db.InitTenantTables(typeof(TenantGameAdvertisementRewardEntity)); + _db.InitBusinessTables(typeof(GameAdvertisementRewardEntity)); var identifier = new IdempotencyRecordIdentifier(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, "adreward-key-complete"); - var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-complete")); + var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-complete")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(identifier.IdempotencyScope, identifier.IdempotencyKey))); await store.CompleteAsync(new IdempotencyCompletionRequest(identifier, ReadOnlyMemory.Empty, 0)); @@ -119,9 +119,9 @@ public async Task AdvertisementRewardStore_CompleteSettlesSuccess_AndReplaysAsCo [Fact] public async Task AdvertisementRewardStore_SettleWithoutRecord_Throws() { - _db.InitTenantTables(typeof(TenantGameAdvertisementRewardEntity)); + _db.InitBusinessTables(typeof(GameAdvertisementRewardEntity)); - var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-missing")); + var store = new AdvertisementRewardLedgerIdempotencyStore(_db.Repository(), BuildAdvertisementRewardTemplate("adreward-key-missing")); await Assert.ThrowsAsync( () => store.CompleteAsync(new IdempotencyCompletionRequest(new IdempotencyRecordIdentifier(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, "adreward-key-missing"), ReadOnlyMemory.Empty, 0))); } @@ -129,9 +129,9 @@ await Assert.ThrowsAsync( [Fact] public async Task FulfillmentStore_ClaimsPendingRow_FailedReOccupation_AndVoidedMapsCompleted() { - _db.InitTenantTables(typeof(TenantGameOrderFulfillmentEntity)); + _db.InitBusinessTables(typeof(GameOrderFulfillmentEntity)); - var store = new FulfillmentLedgerIdempotencyStore(_db.TenantDb, BuildFulfillmentTemplate("fulfillment-key-claim")); + var store = new FulfillmentLedgerIdempotencyStore(_db.Db, BuildFulfillmentTemplate("fulfillment-key-claim")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(FulfillmentLedgerIdempotencyStore.OrderShipIdempotencyScope, "fulfillment-key-claim"))); // Pending 占用中:占位失败(协调器等待后回忙碌) @@ -141,7 +141,7 @@ public async Task FulfillmentStore_ClaimsPendingRow_FailedReOccupation_AndVoided var identifier = new IdempotencyRecordIdentifier(FulfillmentLedgerIdempotencyStore.OrderShipIdempotencyScope, "fulfillment-key-claim"); await store.FailAsync(new IdempotencyFailureRequest(identifier, 0)); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(identifier.IdempotencyScope, identifier.IdempotencyKey))); - var rows = await _db.TenantDb.Queryable().Where(u => u.IdempotencyKey == "fulfillment-key-claim").ToListAsync(); + var rows = await _db.Db.Queryable().Where(u => u.IdempotencyKey == "fulfillment-key-claim").ToListAsync(); Assert.Single(rows); Assert.Equal(FulfillmentStatusEnum.Pending, rows[0].Status); @@ -155,13 +155,13 @@ public async Task FulfillmentStore_ClaimsPendingRow_FailedReOccupation_AndVoided [Fact] public async Task FulfillmentStore_VoidedTerminal_MapsCompleted_AndBlocksReOccupation() { - _db.InitTenantTables(typeof(TenantGameOrderFulfillmentEntity)); + _db.InitBusinessTables(typeof(GameOrderFulfillmentEntity)); - var store = new FulfillmentLedgerIdempotencyStore(_db.TenantDb, BuildFulfillmentTemplate("fulfillment-key-voided")); + var store = new FulfillmentLedgerIdempotencyStore(_db.Db, BuildFulfillmentTemplate("fulfillment-key-voided")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(FulfillmentLedgerIdempotencyStore.OrderRefundIdempotencyScope, "fulfillment-key-voided"))); // 作废为业务终态:服务侧落 Voided 后 Complete 做存在性校验(不抛错) - await _db.TenantDb.Updateable() + await _db.Db.Updateable() .SetColumns(u => u.Status == FulfillmentStatusEnum.Voided) .Where(u => u.IdempotencyKey == "fulfillment-key-voided") .ExecuteCommandAsync(); @@ -178,9 +178,9 @@ private static IdempotencyRecord BuildRecord(string scope, string key) return new IdempotencyRecord(scope, key, "digest-" + key, IdempotencyStatus.Processing, null, now, now + 86_400_000L, null); } - private static TenantGameAntiCheatEventEntity BuildAntiCheatTemplate(string idempotencyKey) + private static GameAntiCheatEventEntity BuildAntiCheatTemplate(string idempotencyKey) { - return new TenantGameAntiCheatEventEntity + return new GameAntiCheatEventEntity { Provider = AntiCheatProviderEnum.Custom, ProviderName = "test", @@ -199,9 +199,9 @@ private static TenantGameAntiCheatEventEntity BuildAntiCheatTemplate(string idem }; } - private static TenantGameAdvertisementRewardEntity BuildAdvertisementRewardTemplate(string idempotencyKey) + private static GameAdvertisementRewardEntity BuildAdvertisementRewardTemplate(string idempotencyKey) { - return new TenantGameAdvertisementRewardEntity + return new GameAdvertisementRewardEntity { Provider = "TopOn", TransactionId = "tx-" + idempotencyKey, @@ -221,10 +221,10 @@ private static TenantGameAdvertisementRewardEntity BuildAdvertisementRewardTempl }; } - private static TenantGameOrderFulfillmentEntity BuildFulfillmentTemplate(string idempotencyKey) + private static GameOrderFulfillmentEntity BuildFulfillmentTemplate(string idempotencyKey) { var now = TimerHelper.UnixTimeSeconds(); - return new TenantGameOrderFulfillmentEntity + return new GameOrderFulfillmentEntity { OrderId = 9001, PayChannel = "google", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveOtherProgressTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveOtherProgressTests.cs index 91fc2ac1..a310bdfd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveOtherProgressTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveOtherProgressTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Client.Api.GameUserArchive.Models; using GameFrameX.Client.Api.GameUserArchive; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Client.Api.GameUserArchive.Dto; using GameFrameX.Core.SqlSugar; using GameFrameX.Client.Api.Services; @@ -69,9 +69,9 @@ public async Task OtherProgress_ReturnsRcodeOne_WhenNoArchive() private static GameUserArchiveController CreateController(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameUserArchiveEntity)); - var tenantDbProvider = db.MainDb; - var repository = new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameUserArchiveEntity)); + var dbProvider = db.MainDb; + var repository = new Repository(db.MainDb); return new GameUserArchiveController(repository); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveRoundTripTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveRoundTripTests.cs index d93f11fa..28652e96 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveRoundTripTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserArchiveRoundTripTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Client.Api.GameUserArchive; using System.Text.Json; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Client.Api.GameUserArchive.Dto; using GameFrameX.Client.Api.Services; using GameFrameX.Core.SqlSugar; @@ -176,9 +176,9 @@ public async Task Upload_SyncListNull_DoesNotThrow() private static GameUserArchiveController CreateController(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameUserArchiveEntity)); - var tenantDbProvider = db.MainDb; - var repository = new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameUserArchiveEntity)); + var dbProvider = db.MainDb; + var repository = new Repository(db.MainDb); return new GameUserArchiveController(repository); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs index 2db2ac8b..b8f27c2c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Client.Api.GameUserArchive; using GameFrameX.Client.Api.GameUserMisc; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Client.Api.GameUserArchive.Dto; using GameFrameX.Client.Api.GameUserMisc.Dto; using GameFrameX.Core.SqlSugar; @@ -26,7 +26,7 @@ public async Task MarkLogout_PersistsRecord() var data = ClientApiResultReader.Data(ClientApiResultReader.Read(result)); Assert.Equal(0, data.GetProperty("Rcode").GetInt64()); - var records = db.TenantDb.Queryable().Where(x => x.UserId == 4001).ToList(); + var records = db.Db.Queryable().Where(x => x.UserId == 4001).ToList(); Assert.Single(records); Assert.Equal("1.0.0", records[0].ClientVersion); Assert.True(records[0].LogoutTime > 0); @@ -36,7 +36,7 @@ public async Task MarkLogout_PersistsRecord() public async Task RandomRobots_FillsRequestedCount_AndRespectsExclusions() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameUserArchiveEntity)); + db.InitBusinessTables(typeof(GameUserArchiveEntity)); var archiveController = CreateArchiveController(db); // 真实档 2 个(4101/4102),exclude 4101 → 请 3 个:真实 1 + 合成 2 凑满 await archiveController.Upload(MakeUpload(4101, "real_one")); @@ -67,18 +67,18 @@ public async Task RandomRobots_FillsRequestedCount_AndRespectsExclusions() private static GameUserMiscController CreateController(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameUserLogoutRecordEntity)); - db.InitTenantTables(typeof(TenantGameUserArchiveEntity)); - var tenantDbProvider = db.MainDb; - var logoutRepository = new Repository(db.MainDb); - var archiveRepository = new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameUserLogoutRecordEntity)); + db.InitBusinessTables(typeof(GameUserArchiveEntity)); + var dbProvider = db.MainDb; + var logoutRepository = new Repository(db.MainDb); + var archiveRepository = new Repository(db.MainDb); return new GameUserMiscController(logoutRepository, archiveRepository); } private static GameUserArchiveController CreateArchiveController(ClientApiTestDb db) { - var tenantDbProvider = db.MainDb; - var archiveRepository = new Repository(db.MainDb); + var dbProvider = db.MainDb; + var archiveRepository = new Repository(db.MainDb); return new GameUserArchiveController(archiveRepository); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs index 6f2dc2a5..c84fe4f2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs @@ -4,11 +4,11 @@ using System.Text.Json; using GameFrameX.Core.Enum; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.ClientApiConfig; +using GameFrameX.Entity.Business.Game; using GameFrameX.Client.Api.GameUserPay.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; using Microsoft.AspNetCore.Http; @@ -38,7 +38,7 @@ public async Task Create_RealPay_PersistsUnpaidOrder_NeedPayTrue() Assert.Equal("sku.gold", data.GetProperty("Sku").GetString()); Assert.Equal(990, data.GetProperty("Amount").GetInt64()); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == orderId); + var row = db.Db.Queryable().Single(x => x.OrderId == orderId); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Equal("7001", row.AccountId); Assert.Equal("sku.gold", row.ProductId); @@ -65,7 +65,7 @@ public async Task Create_SandboxPolicy_IssuesShippedOrder_NeedPayFalse_ClosedLoo var orderId = data.GetProperty("OrderId").GetString() ?? string.Empty; // 沙箱直发闭环:落库即 Shipped,免支付免验真,Query 直接 Paid - var row = db.TenantDb.Queryable().Single(x => x.OrderId == orderId); + var row = db.Db.Queryable().Single(x => x.OrderId == orderId); Assert.Equal(OrderStatusEnum.Shipped, row.Status); var query = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.Query( @@ -94,7 +94,7 @@ public async Task Create_MainPolicyChange_ControlsSandboxRecharge() Assert.True(first.GetProperty("IsNeedPay").GetBoolean()); // 更新策略后重建请求级 provider,验证开启沙箱直发。 - var appRow = db.TenantDb.Queryable().Single(); + var appRow = db.Db.Queryable().Single(); appRow.EnableSandBoxRecharge = true; await policyRepository.UpdateAsync(appRow); var secondController = CreateController(db, new FakePayReceiptVerifier(), true); @@ -136,7 +136,7 @@ public async Task Verify_Success_MarksShipped_FillsProviderTransactionId() Assert.Equal("sku.gold", data.GetProperty("ProductId").GetString()); Assert.Equal(1, verifier.CallCount); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_seed_v1"); + var row = db.Db.Queryable().Single(x => x.OrderId == "pay_seed_v1"); Assert.Equal(OrderStatusEnum.Shipped, row.Status); Assert.Equal("txn_apple_1", row.ProviderTransactionId); Assert.Equal("{\"status\":0}", row.ReceiptJson); @@ -180,7 +180,7 @@ public async Task Verify_Pending_ReturnsRcode7_StatusUnchanged() new GameUserPayVerifyRequest { UserId = 7103, OrderId = "pay_seed_v3", PayChannel = 7, PurchaseToken = "tok", }))); Assert.Equal(7, data.GetProperty("Rcode").GetInt64()); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_seed_v3"); + var row = db.Db.Queryable().Single(x => x.OrderId == "pay_seed_v3"); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Null(row.ProviderTransactionId); } @@ -219,7 +219,7 @@ public async Task Verify_Rejected_ReturnsExplicitEnvelopeError_DoesNotCredit() Assert.NotEqual(0, ClientApiResultReader.Code(root)); Assert.Equal(1, verifier.CallCount); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_seed_v4"); + var row = db.Db.Queryable().Single(x => x.OrderId == "pay_seed_v4"); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); } } @@ -248,7 +248,7 @@ public async Task Verify_TransactionIdBoundToOtherOrder_RejectsWithoutDoubleShip Assert.Equal((int)PaymentErrorCode.PayChannelNotSupported, ClientApiResultReader.Code(root)); Assert.Equal(0, verifier.CallCount); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_dup_b"); + var row = db.Db.Queryable().Single(x => x.OrderId == "pay_dup_b"); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Null(row.ProviderTransactionId); } @@ -347,7 +347,7 @@ public async Task Report_RecordsIntoExistingOrder_DoesNotAdvanceStatus() // 契约:Report 响应 data 为 null Assert.Equal(JsonValueKind.Null, ClientApiResultReader.Data(root).ValueKind); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_r1"); + var row = db.Db.Queryable().Single(x => x.OrderId == "pay_r1"); Assert.Equal(990, row.RealMoney); Assert.Equal("USD", row.Currency); Assert.Equal(12, row.Level); @@ -355,7 +355,7 @@ public async Task Report_RecordsIntoExistingOrder_DoesNotAdvanceStatus() // 纯记账:订单状态与渠道字段不被推进 Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Equal("100", row.PayChannel); - Assert.Equal(1, db.TenantDb.Queryable().Count(x => x.OrderId == "pay_r1")); + Assert.Equal(1, db.Db.Queryable().Count(x => x.OrderId == "pay_r1")); } } @@ -370,7 +370,7 @@ public async Task Report_UnknownOrder_ToleratedAndRecorded() MakeReport(7302, "pay_unknown", 199))); Assert.Equal(0, ClientApiResultReader.Code(root)); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_unknown"); + var row = db.Db.Queryable().Single(x => x.OrderId == "pay_unknown"); Assert.Equal("7302", row.AccountId); Assert.Equal("sku.gem", row.ProductId); Assert.Equal(199, row.RealMoney); @@ -392,8 +392,8 @@ public async Task Report_IdempotentOverwrite_SameOrderIdSingleRow() await controller.Report(MakeReport(7303, "pay_r2", 990)); await controller.Report(MakeReport(7303, "pay_r2", 880)); - Assert.Equal(1, db.TenantDb.Queryable().Count(x => x.OrderId == "pay_r2")); - var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_r2"); + Assert.Equal(1, db.Db.Queryable().Count(x => x.OrderId == "pay_r2")); + var row = db.Db.Queryable().Single(x => x.OrderId == "pay_r2"); Assert.Equal(880, row.RealMoney); } } @@ -411,7 +411,7 @@ public void Controller_HasExplicitRouteAndHttpPostVerbs() private static GameUserPayController CreateController(ClientApiTestDb db, FakePayReceiptVerifier verifier, bool withAppContext = false) { - db.InitTenantTables(typeof(TenantGameOrderEntity), typeof(TenantClientApiPolicyEntity)); + db.InitBusinessTables(typeof(GameOrderEntity), typeof(ClientApiPolicyEntity)); var controller = new GameUserPayController(CreatePayRepository(db), CreateOptionsProvider(db, withAppContext), verifier); if (withAppContext) { @@ -423,27 +423,27 @@ private static GameUserPayController CreateController(ClientApiTestDb db, FakePa } /// - /// 真 Provider(C378 起沙箱判定经 IClientApiTenantOptionsProvider 读策略合并表,不再直连仓储) + /// 真 Provider(C378 起沙箱判定经 IClientApiOptionsProvider 读策略合并表,不再直连仓储) /// - private static IClientApiTenantOptionsProvider CreateOptionsProvider(ClientApiTestDb db, bool withAppContext) + private static IClientApiOptionsProvider CreateOptionsProvider(ClientApiTestDb db, bool withAppContext) { - var tenantDbProvider = db.MainDb; + var dbProvider = db.MainDb; var accessor = new HttpContextAccessor { HttpContext = db.CreateHttpContext(true, withAppContext), }; - return new ClientApiTenantOptionsProvider(tenantDbProvider, accessor); + return new ClientApiOptionsProvider(dbProvider, accessor); } - private static Repository CreatePayRepository(ClientApiTestDb db) + private static Repository CreatePayRepository(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameOrderEntity)); - var tenantDbProvider = db.MainDb; - return new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameOrderEntity)); + var dbProvider = db.MainDb; + return new Repository(db.MainDb); } - private static Repository CreatePolicyRepository(ClientApiTestDb db) + private static Repository CreatePolicyRepository(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantClientApiPolicyEntity)); - var tenantDbProvider = db.MainDb; - return new Repository(db.MainDb); + db.InitBusinessTables(typeof(ClientApiPolicyEntity)); + var dbProvider = db.MainDb; + return new Repository(db.MainDb); } private static GameUserPayCreateRequest MakeCreate(long userId, string sku, int payChannel = 100) @@ -477,10 +477,10 @@ private static GameUserPayReportRequest MakeReport(long userId, string orderId, }; } - private static TenantGameOrderEntity MakeOrder(long userId, string orderId, string sku = "sku.gold", + private static GameOrderEntity MakeOrder(long userId, string orderId, string sku = "sku.gold", int status = (int)OrderStatusEnum.Unpaid, long? amount = 990, int payChannel = 100, long id = 0) { - return new TenantGameOrderEntity + return new GameOrderEntity { Id = id, AccountId = userId.ToString(), @@ -501,9 +501,9 @@ private static TenantGameOrderEntity MakeOrder(long userId, string orderId, stri }; } - private static TenantClientApiPolicyEntity MakePolicy(long appId, bool enableSandbox) + private static ClientApiPolicyEntity MakePolicy(long appId, bool enableSandbox) { - return new TenantClientApiPolicyEntity + return new ClientApiPolicyEntity { EnableSandBoxRecharge = enableSandbox, IsEnabled = true, @@ -519,7 +519,7 @@ private sealed class FakePayReceiptVerifier : IPayReceiptVerifier public GamePayVerifyResponse Result { get; set; } = GamePayVerifyResponse.Pending("默认 pending"); - public Task VerifyAsync(TenantGameOrderEntity order, GameUserPayVerifyRequest request) + public Task VerifyAsync(GameOrderEntity order, GameUserPayVerifyRequest request) { CallCount++; return Task.FromResult(Result); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRaceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRaceTests.cs index 335264c9..7bb0bf66 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRaceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRaceTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Client.Api.GameUserRace.Dto; using GameFrameX.Client.Api.Services; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Mvc; namespace GameFrameX.Core.Tests.GameApi; @@ -144,9 +144,9 @@ public async Task Entry_RespectsExclusions_AndSamplesRealArchives() { using (var db = new ClientApiTestDb()) { - db.InitTenantTables(typeof(TenantGameUserArchiveEntity)); - var tenantDbProvider = db.MainDb; - var archiveRepository = new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameUserArchiveEntity)); + var dbProvider = db.MainDb; + var archiveRepository = new Repository(db.MainDb); var archiveController = new GameUserArchiveController(archiveRepository); await archiveController.Upload(MakeUpload(9101, "real_a", "icon_a")); await archiveController.Upload(MakeUpload(9102, "real_b", "icon_b")); @@ -182,9 +182,9 @@ public void Controllers_HaveExplicitRouteAndHttpPostVerbs() private static GameUserRaceController CreateController(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameUserArchiveEntity)); - var tenantDbProvider = db.MainDb; - var archiveRepository = new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameUserArchiveEntity)); + var dbProvider = db.MainDb; + var archiveRepository = new Repository(db.MainDb); return new GameUserRaceController(archiveRepository); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs index e49a28eb..48bbb8ad 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs @@ -2,7 +2,7 @@ using System.Reflection; using System.Text.Json; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Client.Api.GameUserRank.Dto; using GameFrameX.Client.Api.Services; using GameFrameX.Core.SqlSugar; @@ -58,7 +58,7 @@ public async Task Get_EnrollsPlayerIntoNewGroup_PadsRobotsToBoardSize() Assert.Equal("badge5001", own.GetProperty("Badge").GetString()); Assert.Equal(100, own.GetProperty("Score").GetInt64()); - var rows = db.TenantDb.Queryable().Where(x => x.GroupId == groupId).ToList(); + var rows = db.Db.Queryable().Where(x => x.GroupId == groupId).ToList(); Assert.Equal(GameUserRankController.BoardSize, rows.Count); var ownEntity = rows.Single(x => x.UserId == 5001); Assert.Equal(1, ownEntity.RankType); @@ -81,14 +81,14 @@ public async Task Get_SameTokenSharesGroup_DifferentTokenOpensNewGroup() Assert.Equal(first.GetProperty("GroupId").GetString(), second.GetProperty("GroupId").GetString()); // 同组第二人后不再补机器人(已到榜单规模) var sharedGroupId = first.GetProperty("GroupId").GetString(); - var sharedRows = db.TenantDb.Queryable().Where(x => x.GroupId == sharedGroupId).ToList(); + var sharedRows = db.Db.Queryable().Where(x => x.GroupId == sharedGroupId).ToList(); Assert.Equal(GameUserRankController.BoardSize + 1, sharedRows.Count); // token 变化(活动代币增长)= 新一轮次令牌 → 开新组 var third = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.JoinRank(MakeJoin(5003, 200)))); var newGroupId = third.GetProperty("GroupId").GetString(); Assert.NotEqual(sharedGroupId, newGroupId); - var ownEntity = db.TenantDb.Queryable().Single(x => x.UserId == 5003); + var ownEntity = db.Db.Queryable().Single(x => x.UserId == 5003); Assert.Equal(200, ownEntity.RoundToken); Assert.Equal(200, ownEntity.Score); } @@ -111,7 +111,7 @@ public async Task Get_FullGroup_OpensNewGroup() var groupId = data.GetProperty("GroupId").GetString(); Assert.NotEqual("g_seed", groupId); // 新组 = 本人 + 机器人凑满榜单规模 - var rows = db.TenantDb.Queryable().Where(x => x.GroupId == groupId).ToList(); + var rows = db.Db.Queryable().Where(x => x.GroupId == groupId).ToList(); Assert.Equal(GameUserRankController.BoardSize, rows.Count); Assert.Contains(rows, x => x.UserId == 5201); } @@ -141,7 +141,7 @@ public async Task Query_ReturnsWholeGroup_WithRecomputedRanks() Assert.Equal(3, ranks[2].GetProperty("Rank").GetInt64()); // 分数变化后重算(心跳推进 7001 反超) - var row7001 = db.TenantDb.Queryable().Single(x => x.UserId == 7001); + var row7001 = db.Db.Queryable().Single(x => x.UserId == 7001); row7001.Score = 999; await repository.UpdateAsync(row7001); var replay = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.Query( @@ -183,10 +183,10 @@ public async Task HeartBeat_UpdatesFourBoardScores_MissingBoardRankZero() Assert.Equal(0, data.GetProperty("MultiRank").GetInt64()); Assert.Equal(0, data.GetProperty("Weekly2Rank").GetInt64()); - var bakeout = db.TenantDb.Queryable().Single(x => x.UserId == 8001 && x.RankType == 1); + var bakeout = db.Db.Queryable().Single(x => x.UserId == 8001 && x.RankType == 1); Assert.Equal(120, bakeout.Score); Assert.Equal(2, bakeout.Rank); - var weekly1 = db.TenantDb.Queryable().Single(x => x.UserId == 8001 && x.RankType == 3); + var weekly1 = db.Db.Queryable().Single(x => x.UserId == 8001 && x.RankType == 3); Assert.Equal(5, weekly1.Score); } } @@ -206,18 +206,18 @@ private static GameUserRankController CreateController(ClientApiTestDb db) return new GameUserRankController(CreateRankRepository(db), CreateArchiveRepository(db)); } - private static Repository CreateRankRepository(ClientApiTestDb db) + private static Repository CreateRankRepository(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameRankEntryEntity)); - var tenantDbProvider = db.MainDb; - return new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameRankEntryEntity)); + var dbProvider = db.MainDb; + return new Repository(db.MainDb); } - private static Repository CreateArchiveRepository(ClientApiTestDb db) + private static Repository CreateArchiveRepository(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameUserArchiveEntity)); - var tenantDbProvider = db.MainDb; - return new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameUserArchiveEntity)); + var dbProvider = db.MainDb; + return new Repository(db.MainDb); } private static GameUserRankJoinRequest MakeJoin(long userId, long token, int rankType = 1, string configKey = "bakeout", long configId = 101) @@ -237,9 +237,9 @@ private static GameUserRankJoinRequest MakeJoin(long userId, long token, int ran }; } - private static TenantGameRankEntryEntity MakeEntity(int rankType, string groupId, string configKey, long configId, long userId, long score) + private static GameRankEntryEntity MakeEntity(int rankType, string groupId, string configKey, long configId, long userId, long score) { - return new TenantGameRankEntryEntity + return new GameRankEntryEntity { RankType = rankType, GroupId = groupId, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRewardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRewardTests.cs index 858bee69..8d93d717 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRewardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRewardTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Client.Api.GameUserReward; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Client.Api.GameUserReward.Dto; using GameFrameX.Core.SqlSugar; using GameFrameX.Client.Api.Services; @@ -64,9 +64,9 @@ public async Task Receive_DifferentTokenAfterReceived_ReturnsOne() private static GameUserRewardController CreateController(ClientApiTestDb db) { - db.InitTenantTables(typeof(TenantGameUserRewardEntity)); - var tenantDbProvider = db.MainDb; - var repository = new Repository(db.MainDb); + db.InitBusinessTables(typeof(GameUserRewardEntity)); + var dbProvider = db.MainDb; + var repository = new Repository(db.MainDb); return new GameUserRewardController(repository); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs index e75be78f..c46704de 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs @@ -5,8 +5,8 @@ using GameFrameX.Core.Enum; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.ServerConfig; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.ServerConfig; using GameFrameX.Client.Api.GameUserSession.Dto; using GameFrameX.Client.Api.Services; using GameFrameX.Entity.Enum; @@ -17,7 +17,7 @@ namespace GameFrameX.Core.Tests.GameApi; /// /// C13 T2:登录控制面契约(正常/首启无档/换端顶号/累计充值/注销 rcode=2/版本纯函数/路由守护) /// 契约来源:C13 change.md §1 28 字段四态去向 + C280 config 差异下发(C315 数据源切租户库 -/// tenant_game_app_server_config 表,含基线/应用行合并与 Enabled 过滤语义)+ P0-2 存档行会话列。 +/// game_app_server_config 表,含基线/应用行合并与 Enabled 过滤语义)+ P0-2 存档行会话列。 /// public sealed class GameUserSessionTests { @@ -26,7 +26,7 @@ public async Task Login_WithArchive_EchoesSyncFields_WritesSessionColumns() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeArchive(8001, "uuid-a", "iPhone13", 123456)); var controller = CreateController(db); @@ -37,7 +37,7 @@ public async Task Login_WithArchive_EchoesSyncFields_WritesSessionColumns() Assert.Equal("uuid-a", data.GetProperty("InstallationId").GetString()); Assert.Equal("iPhone13", data.GetProperty("UpdateDeviceModel").GetString()); // P0-2:会话列成对写回存档行(SessionId == 下发 Session) - var row = db.TenantDb.Queryable().Single(x => x.UserId == 8001); + var row = db.Db.Queryable().Single(x => x.UserId == 8001); Assert.Equal(data.GetProperty("Session").GetInt64(), row.SessionId); Assert.Equal("SM-G991B", row.SessionDeviceModel); // 常量回显与请求回显 @@ -63,7 +63,7 @@ public async Task Login_FirstLogin_NoArchive_DoesNotCreateRow() Assert.Equal(string.Empty, data.GetProperty("UpdateDeviceModel").GetString()); Assert.True(data.GetProperty("Session").GetInt64() > 0); // 存档行由 C8 存档链路负责建行,登录不代建 - Assert.Equal(0, db.TenantDb.Queryable().Count(x => x.UserId == 8002)); + Assert.Equal(0, db.Db.Queryable().Count(x => x.UserId == 8002)); } } @@ -72,7 +72,7 @@ public async Task Login_SecondDevice_SessionOverwritten() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeArchive(8003)); var controller = CreateController(db); @@ -81,7 +81,7 @@ public async Task Login_SecondDevice_SessionOverwritten() Assert.NotEqual(first.GetProperty("Session").GetInt64(), second.GetProperty("Session").GetInt64()); // ponytail: 单副本起步——后登录覆盖(顶号),不保留历史会话 - var row = db.TenantDb.Queryable().Single(x => x.UserId == 8003); + var row = db.Db.Queryable().Single(x => x.UserId == 8003); Assert.Equal(second.GetProperty("Session").GetInt64(), row.SessionId); Assert.Equal("device-B", row.SessionDeviceModel); } @@ -92,7 +92,7 @@ public async Task Login_TotalPay_SumsShippedOrdersOnly() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeOrder(8004, "pay_t1", (int)OrderStatusEnum.Shipped, 660)); await repository.InsertAsync(MakeOrder(8004, "pay_t2", (int)OrderStatusEnum.Unpaid, 990)); await repository.InsertAsync(MakeOrder(8005, "pay_t3", (int)OrderStatusEnum.Shipped, 500)); @@ -109,7 +109,7 @@ public async Task Login_DeletedUser_ReturnsRcode2_WithLogoutTime() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeUser(8006, GameUserStatus.Deleted, 888)); var controller = CreateController(db); @@ -137,7 +137,7 @@ public async Task Login_UnknownConfigKeys_NotEchoed_ServesDbRows() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeServerConfig(319200000000101, "frame", "[1,2,3]", Md5Frame)); await repository.InsertAsync(MakeServerConfig(319200000000102, "badge", "[4,5]", Md5Badge)); var controller = CreateController(db); @@ -165,7 +165,7 @@ public async Task Login_MatchingMd5_ServesMd5Only() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeServerConfig(319200000000101, "frame", "[1,2,3]", Md5Frame)); await repository.InsertAsync(MakeServerConfig(319200000000102, "badge", "[4,5]", Md5Badge)); var controller = CreateController(db); @@ -191,7 +191,7 @@ public async Task Login_NoConfigEntries_ServesAllEnabledRows() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeServerConfig(319200000000101, "frame", "[1,2,3]", Md5Frame)); await repository.InsertAsync(MakeServerConfig(319200000000102, "badge", "[4,5]", Md5Badge)); await repository.InsertAsync(MakeServerConfig(319200000000103, "notify", "{}", Md5Badge, enabled: false)); @@ -214,7 +214,7 @@ public async Task GameServerConfigProvider_SelectsLatestEnabledRowPerKey() { using (var db = new ClientApiTestDb()) { - var repository = CreateRepository(db); + var repository = CreateRepository(db); await repository.InsertAsync(MakeServerConfig(319200000000101, "frame", "[1,2,3]", Md5Frame)); await repository.InsertAsync(MakeServerConfig(319200000000102, "badge", "[4,5]", Md5Badge)); await repository.InsertAsync(MakeServerConfig(319200000000103, "notify", "{}", Md5Badge, enabled: false)); @@ -255,16 +255,16 @@ public void Controller_HasExplicitRouteAndHttpPostVerbs() private static GameUserSessionController CreateController(ClientApiTestDb db) { return new GameUserSessionController( - CreateRepository(db), - CreateRepository(db), - CreateRepository(db), - CreateRepository(db)); + CreateRepository(db), + CreateRepository(db), + CreateRepository(db), + CreateRepository(db)); } private static Repository CreateRepository(ClientApiTestDb db) where T : GameFrameX.Foundation.Orm.Entity.EntityBase, new() { - db.InitTenantTables(typeof(T)); - var tenantDbProvider = db.MainDb; + db.InitBusinessTables(typeof(T)); + var dbProvider = db.MainDb; return new Repository(db.MainDb); } @@ -288,9 +288,9 @@ private static GameUserSessionLoginRequest MakeLogin(long userId, string deviceM private const string Md5Badge = "0f1e2d3c4b5a69788796a5b4c3d2e1f0"; private const string Md5FrameApp = "1a2b3c4d5e6f708192a3b4c5d6e7f809"; - private static TenantGameAppServerConfigEntity MakeServerConfig(long id, string key, string config, string md5, bool enabled = true) + private static GameAppServerConfigEntity MakeServerConfig(long id, string key, string config, string md5, bool enabled = true) { - return new TenantGameAppServerConfigEntity + return new GameAppServerConfigEntity { Id = id, Key = key, @@ -300,9 +300,9 @@ private static TenantGameAppServerConfigEntity MakeServerConfig(long id, string }; } - private static TenantGameUserArchiveEntity MakeArchive(long userId, string installationId = "uuid-a", string deviceModel = "iPhone13", long syncTime = 123456) + private static GameUserArchiveEntity MakeArchive(long userId, string installationId = "uuid-a", string deviceModel = "iPhone13", long syncTime = 123456) { - return new TenantGameUserArchiveEntity + return new GameUserArchiveEntity { Name = "archive-" + userId, UserId = userId, @@ -314,9 +314,9 @@ private static TenantGameUserArchiveEntity MakeArchive(long userId, string insta }; } - private static TenantGameUserEntity MakeUser(long id, GameUserStatus status, long deletedTime) + private static GameUserEntity MakeUser(long id, GameUserStatus status, long deletedTime) { - return new TenantGameUserEntity + return new GameUserEntity { Id = id, Name = "user-" + id, @@ -339,9 +339,9 @@ private static TenantGameUserEntity MakeUser(long id, GameUserStatus status, lon }; } - private static TenantGameOrderEntity MakeOrder(long userId, string orderId, int status, long amount) + private static GameOrderEntity MakeOrder(long userId, string orderId, int status, long amount) { - return new TenantGameOrderEntity + return new GameOrderEntity { AccountId = userId.ToString(), RoleId = userId.ToString(), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/TenantGameAppDevice/TenantGameAppDeviceContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameAppDevice/GameAppDeviceContractTests.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/TenantGameAppDevice/TenantGameAppDeviceContractTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameAppDevice/GameAppDeviceContractTests.cs index dddc85f8..5171c864 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/TenantGameAppDevice/TenantGameAppDeviceContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameAppDevice/GameAppDeviceContractTests.cs @@ -4,23 +4,23 @@ using GameFrameX.Application.ClientDelivery.Device.GameAppDevice.Dto; using GameFrameX.Application.ClientDelivery.Device.DeviceGroup; using GameFrameX.Application.ClientDelivery.Device.DeviceGroup.Dto; -using GameFrameX.Entity.Tenant.Device; +using GameFrameX.Entity.Business.Device; using Mapster; -namespace GameFrameX.Core.Tests.TenantGameAppDevice; +namespace GameFrameX.Core.Tests.GameAppDevice; -public sealed class TenantGameAppDeviceContractTests +public sealed class GameAppDeviceContractTests { [Fact] public void AddInput_MapsDeviceUniqueIdentifier() { - var input = new AddTenantGameAppDeviceRequest + var input = new AddGameAppDeviceRequest { Name = "test-device", DeviceUniqueIdentifier = "machine-code-001", }; - var entity = input.Adapt(); + var entity = input.Adapt(); Assert.Equal("machine-code-001", entity.DeviceUniqueIdentifier); @@ -29,13 +29,13 @@ public void AddInput_MapsDeviceUniqueIdentifier() Assert.False(isValid); Assert.Contains(results, r => r.ErrorMessage == "机器码不能为空" && - r.MemberNames.Contains(nameof(AddTenantGameAppDeviceRequest.DeviceUniqueIdentifier))); + r.MemberNames.Contains(nameof(AddGameAppDeviceRequest.DeviceUniqueIdentifier))); } [Fact] public void AddInput_ValidWithoutApplication() { - var input = new AddTenantGameAppDeviceRequest + var input = new AddGameAppDeviceRequest { Name = "test-device", DeviceUniqueIdentifier = "machine-code-001", @@ -44,13 +44,13 @@ public void AddInput_ValidWithoutApplication() var isValid = Validate(input, out var results); Assert.True(isValid); - Assert.Null(typeof(AddTenantGameAppDeviceRequest).GetProperty("AppId")); + Assert.Null(typeof(AddGameAppDeviceRequest).GetProperty("AppId")); } [Fact] public void AddDeviceGroupInput_ValidWithoutApplication() { - var input = new AddTenantDeviceGroupRequest + var input = new AddDeviceGroupRequest { Name = "group-1", }; @@ -58,13 +58,13 @@ public void AddDeviceGroupInput_ValidWithoutApplication() var isValid = Validate(input, out var results); Assert.True(isValid); - Assert.Null(typeof(AddTenantDeviceGroupRequest).GetProperty("AppId")); + Assert.Null(typeof(AddDeviceGroupRequest).GetProperty("AppId")); } [Fact] public void UpdateInput_RowVersionZeroPassesValidation() { - var input = new UpdateTenantGameAppDeviceRequest + var input = new UpdateGameAppDeviceRequest { Id = 1, Name = "test-device", @@ -81,7 +81,7 @@ public void UpdateInput_RowVersionZeroPassesValidation() [Fact] public void UpdateInput_HasNoApplicationField() { - Assert.Null(typeof(UpdateTenantGameAppDeviceRequest).GetProperty("AppId")); + Assert.Null(typeof(UpdateGameAppDeviceRequest).GetProperty("AppId")); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/TenantGameAppDevice/TenantGameAppDeviceScopeIsolationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameAppDevice/GameAppDeviceScopeIsolationTests.cs similarity index 76% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/TenantGameAppDevice/TenantGameAppDeviceScopeIsolationTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameAppDevice/GameAppDeviceScopeIsolationTests.cs index f0736d03..432d4973 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/TenantGameAppDevice/TenantGameAppDeviceScopeIsolationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameAppDevice/GameAppDeviceScopeIsolationTests.cs @@ -5,21 +5,21 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; using GameFrameX.Foundation.Orm.Entity; -using GameFrameX.Entity.Tenant.Device; +using GameFrameX.Entity.Business.Device; using SqlSugar; using GameFrameX.Core.Extension; -namespace GameFrameX.Core.Tests.TenantGameAppDevice; +namespace GameFrameX.Core.Tests.GameAppDevice; /// /// 主库设备与分组行为测试。 /// -public sealed class TenantGameAppDeviceScopeIsolationTests : IDisposable +public sealed class GameAppDeviceScopeIsolationTests : IDisposable { - private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"tenant_device_scope_{Guid.NewGuid():N}.db"); + private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"device_scope_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _db; - public TenantGameAppDeviceScopeIsolationTests() + public GameAppDeviceScopeIsolationTests() { var config = new ConnectionConfig { @@ -31,9 +31,9 @@ public TenantGameAppDeviceScopeIsolationTests() _db.Aop.DataExecuting = (oldValue, entityInfo) => SqlSugarAopHelper.HandleBaseAudit(oldValue, entityInfo); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAppDeviceEntity), - typeof(TenantGameAppDeviceGroupEntity), - typeof(TenantGameAppDeviceGroupRelationEntity)); + typeof(GameAppDeviceEntity), + typeof(GameAppDeviceGroupEntity), + typeof(GameAppDeviceGroupRelationEntity)); } [Fact] @@ -41,9 +41,9 @@ public async Task AddGroup_RejectsMissingDevice() { await SeedAsync(); var service = new DeviceGroupService( - Repository()); + Repository()); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantDeviceGroupRequest + await Assert.ThrowsAsync(() => service.AddAsync(new AddDeviceGroupRequest { Name = "group-app100", @@ -56,16 +56,16 @@ public async Task AddGroup_AcceptsExistingDevices() { await SeedAsync(); var service = new DeviceGroupService( - Repository()); + Repository()); - var group = await service.AddAsync(new AddTenantDeviceGroupRequest + var group = await service.AddAsync(new AddDeviceGroupRequest { Name = "group-app100", DeviceIds = new List { DeviceA1, DeviceB1, }, }); - var relations = await _db.Queryable() + var relations = await _db.Queryable() .Where(r => r.DeviceGroupId == group.Id) .ToListAsync(); Assert.Equal(2, relations.Count); @@ -78,7 +78,7 @@ public async Task DevicePage_ReturnsMainDatabaseDevices() { await SeedAsync(); var service = new GameAppDeviceService( - Repository()); + Repository()); var page = await service.PageAsync(new GameAppDeviceRequest()); @@ -91,9 +91,9 @@ public async Task DeviceAdd_RejectsDuplicateIdentifier() { await SeedAsync(); var service = new GameAppDeviceService( - Repository()); + Repository()); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantGameAppDeviceRequest + await Assert.ThrowsAsync(() => service.AddAsync(new AddGameAppDeviceRequest { Name = "dup", @@ -106,15 +106,15 @@ public async Task DeviceAdd_AcceptsUniqueIdentifier() { await SeedAsync(); var service = new GameAppDeviceService( - Repository()); + Repository()); - var device = await service.AddAsync(new AddTenantGameAppDeviceRequest + var device = await service.AddAsync(new AddGameAppDeviceRequest { Name = "unique-device", DeviceUniqueIdentifier = "uid-new", }); - Assert.True(await _db.Queryable() + Assert.True(await _db.Queryable() .AnyAsync(u => u.Id == device.Id && u.DeviceUniqueIdentifier == "uid-new")); } @@ -131,7 +131,7 @@ private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameAppDeviceEntity + await _db.Insertable(new GameAppDeviceEntity { Id = DeviceA1, @@ -141,7 +141,7 @@ await _db.Insertable(new TenantGameAppDeviceEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppDeviceEntity + await _db.Insertable(new GameAppDeviceEntity { Id = DeviceA2, @@ -151,7 +151,7 @@ await _db.Insertable(new TenantGameAppDeviceEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppDeviceEntity + await _db.Insertable(new GameAppDeviceEntity { Id = DeviceB1, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BackendDuplicationDtoContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BackendDuplicationDtoContractTests.cs index 5d34ad52..8cb10607 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BackendDuplicationDtoContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BackendDuplicationDtoContractTests.cs @@ -99,13 +99,13 @@ public void ReleaseVersion_UpdateKeepsExistingFieldSetWithoutAuditNames() [Fact] public void GameBusinessDtos_ShareEditFieldsAndKeepUpdateContract() { - AssertContainsExactly(MailTemplateSharedFields.Concat(new[] { "Id", })); - AssertContainsExactly(MailTemplateSharedFields.Concat(UpdateContractFields)); - AssertUpdateContract(); + AssertContainsExactly(MailTemplateSharedFields.Concat(new[] { "Id", })); + AssertContainsExactly(MailTemplateSharedFields.Concat(UpdateContractFields)); + AssertUpdateContract(); - AssertContainsExactly(AnnouncementSharedFields); - AssertContainsExactly(AnnouncementSharedFields.Concat(UpdateContractFields)); - AssertUpdateContract(); + AssertContainsExactly(AnnouncementSharedFields); + AssertContainsExactly(AnnouncementSharedFields.Concat(UpdateContractFields)); + AssertUpdateContract(); } [Fact] @@ -113,8 +113,8 @@ public void SharedDtoFields_AreDeclaredOnceInTheirCommonBase() { AssertDeclaredOn(RemoteConfigEditFields); AssertDeclaredOn(ReleaseVersionEditFields); - AssertDeclaredOn(MailTemplateSharedFields); - AssertDeclaredOn(AnnouncementSharedFields); + AssertDeclaredOn(MailTemplateSharedFields); + AssertDeclaredOn(AnnouncementSharedFields); } private static readonly string[] UpdateContractFields = { "Id", "RowVersion", }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BusinessPageSearchKeyRemovalGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BusinessPageSearchKeyRemovalGuardTests.cs index 7fb8f3fb..d44223d2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BusinessPageSearchKeyRemovalGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/BusinessPageSearchKeyRemovalGuardTests.cs @@ -71,7 +71,7 @@ public void ServicesWithoutSelectAsyncKeep_FileContainsNoInputSearchKey() public void RoleAndUserPageRequests_HaveNoSearchKeyShadowing() { // 回归 BasePageRequest.SearchKey 基类字段后,分页 DTO 本地不得再出现任何 SearchKey 声明(含 new 遮蔽)。 - var source = ReadSource("PageTenantGameRoleEntityRequest") + "\n" + ReadSource("PageTenantGameUserEntityRequest"); + var source = ReadSource("PageGameRoleEntityRequest") + "\n" + ReadSource("PageGameUserEntityRequest"); Assert.DoesNotContain("SearchKey", source, StringComparison.Ordinal); } @@ -79,7 +79,7 @@ public void RoleAndUserPageRequests_HaveNoSearchKeyShadowing() public void TimeJob_KeepsExplicitNameCondition() { // TimeJob 原本没有 SearchKey 条件(前端关键词框是死 UI):删除关键词框的同时补 Name 明确条件 + DTO 属性。 - var requestSource = ReadSource("PageTenantGameTimeJobEntityRequest"); + var requestSource = ReadSource("PageGameTimeJobEntityRequest"); Assert.Contains("public string Name", requestSource, StringComparison.Ordinal); Assert.DoesNotContain("SearchKey", requestSource, StringComparison.Ordinal); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs index 82d9ac83..9c96a11f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Core.Const; using GameFrameX.Core.Extension; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.FeatureSwitch; using SqlSugar; namespace GameFrameX.Core.Tests.GameBusiness; @@ -15,7 +15,7 @@ namespace GameFrameX.Core.Tests.GameBusiness; /// public sealed class FeatureSwitchDeliveryResolverTests : IDisposable { - private const long TenantId = 1001; + private const long Id = 1001; private const long App100 = 100; private const long App200 = 200; @@ -34,7 +34,7 @@ public FeatureSwitchDeliveryResolverTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppFeatureSwitchEntity)); + _db.CodeFirst.InitTables(typeof(GameAppFeatureSwitchEntity)); } /// @@ -43,10 +43,10 @@ public FeatureSwitchDeliveryResolverTests() [Fact] public void Resolve_NewerRowWinsRegardlessOfLegacyApplication() { - var tenantDefault = Row("login.banner", id: 1, appId: null, valueJson: "{\"v\":\"tenant\"}"); + var default = Row("login.banner", id: 1, appId: null, valueJson: "{\"v\":\"tenant\"}"); var appRow = Row("login.banner", id: 2, appId: App100, valueJson: "{\"v\":\"app\"}"); - var result = FeatureSwitchDeliveryResolver.Resolve(new[] { tenantDefault, appRow, }, Query()); + var result = FeatureSwitchDeliveryResolver.Resolve(new[] { default, appRow, }, Query()); var item = Assert.Single(result.Switches); Assert.Equal("{\"v\":\"app\"}", item.ValueJson); @@ -396,10 +396,10 @@ public void DeviceRollout_IsStableNormalizedAndRecordSpecific() private FeatureSwitchDeliveryResolver CreateResolver() { - return new FeatureSwitchDeliveryResolver(new SqlSugarRepository { Context = _db, }); + return new FeatureSwitchDeliveryResolver(new SqlSugarRepository { Context = _db, }); } - private async Task InsertAsync(TenantGameAppFeatureSwitchEntity row) + private async Task InsertAsync(GameAppFeatureSwitchEntity row) { row.CreatedTime = ToUnixSeconds(NowUtc); row.IsDeleted = false; @@ -433,7 +433,7 @@ private static FeatureSwitchDeliveryQuery Query( }; } - private static TenantGameAppFeatureSwitchEntity Row( + private static GameAppFeatureSwitchEntity Row( string switchKey, long id, long? appId = App100, @@ -450,7 +450,7 @@ private static TenantGameAppFeatureSwitchEntity Row( string? deviceWhitelistJson = null, bool? isEnabled = true) { - return new TenantGameAppFeatureSwitchEntity + return new GameAppFeatureSwitchEntity { Id = id, SwitchKey = switchKey, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppFeatureSwitchServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppFeatureSwitchServiceTests.cs index 3ffddb8e..ddde0d2c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppFeatureSwitchServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppFeatureSwitchServiceTests.cs @@ -3,8 +3,8 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.Extension; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.FeatureSwitch; using SqlSugar; namespace GameFrameX.Core.Tests.GameBusiness; @@ -33,8 +33,8 @@ public GameAppFeatureSwitchServiceTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppFeatureSwitchEntity)); - _db.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity)); + _db.CodeFirst.InitTables(typeof(GameAppFeatureSwitchEntity)); + _db.CodeFirst.InitTables(typeof(GameAppPackageEntity)); } /// @@ -47,7 +47,7 @@ public async Task PhysicalTableName_CarriesTenantPrefix() await service.AddAsync(NewRequest("switch.table")); var tableNames = await _db.Ado.SqlQueryAsync("SELECT name FROM sqlite_master WHERE type = 'table'"); - Assert.Contains("tenant_game_app_feature_switch_entity", tableNames); + Assert.Contains("game_app_feature_switch_entity", tableNames); } /// @@ -126,9 +126,9 @@ public async Task Add_RejectsDuplicateInMainDatabase() var service = CreateService(); await InsertAsync("switch.layered", App100); - var tenantDefault = NewRequest("switch.layered"); + var default = NewRequest("switch.layered"); - await Assert.ThrowsAsync(() => service.AddAsync(tenantDefault)); + await Assert.ThrowsAsync(() => service.AddAsync(default)); } /// @@ -204,7 +204,7 @@ public async Task Add_RejectsInvalidJson_AndKeepsJsonVerbatim() request.ValueJson = "{ \"a\" : 1 }"; var row = await service.AddAsync(request); - var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); + var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); Assert.Equal("{ \"a\" : 1 }", stored.ValueJson); } @@ -270,7 +270,7 @@ await service.UpdateAsync(new UpdateGameAppFeatureSwitchRequest ValueJson = "{\"v\":2}", }); - var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); + var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); Assert.Equal("{\"v\":2}", stored.ValueJson); } @@ -293,7 +293,7 @@ await service.UpdateAsync(new UpdateGameAppFeatureSwitchRequest ValueJson = "{\"v\":2}", }); - var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); + var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); Assert.Equal("改名后", stored.DisplayName); } @@ -336,8 +336,8 @@ public async Task Page_QueriesMainDatabaseAndAppliesBusinessFilter() private GameAppFeatureSwitchService CreateService() { return new GameAppFeatureSwitchService( - new SqlSugarRepository { Context = _db, }, - new SqlSugarRepository { Context = _db, }); + new SqlSugarRepository { Context = _db, }, + new SqlSugarRepository { Context = _db, }); } private static AddGameAppFeatureSwitchRequest NewRequest(string switchKey) @@ -358,7 +358,7 @@ private static AddGameAppFeatureSwitchRequest NewRequest(string switchKey) private async Task InsertAsync(string switchKey, long? appId) { - await _db.Insertable(new TenantGameAppFeatureSwitchEntity + await _db.Insertable(new GameAppFeatureSwitchEntity { Id = _nextSeedId++, SwitchKey = switchKey, @@ -378,7 +378,7 @@ await _db.Insertable(new TenantGameAppFeatureSwitchEntity private async Task InsertPackageAsync(long gameAppId, string packageName) { - await _db.Insertable(new TenantGameAppPackageEntity + await _db.Insertable(new GameAppPackageEntity { Id = _nextSeedId++, Name = packageName, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppServerConfigServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppServerConfigServiceTests.cs index 2390a117..2dc3f2f5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppServerConfigServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppServerConfigServiceTests.cs @@ -6,7 +6,7 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.Extension; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.ServerConfig; +using GameFrameX.Entity.Business.Game.ServerConfig; using SqlSugar; namespace GameFrameX.Core.Tests.GameBusiness; @@ -31,7 +31,7 @@ public GameAppServerConfigServiceTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppServerConfigEntity)); + _db.CodeFirst.InitTables(typeof(GameAppServerConfigEntity)); } /// @@ -50,7 +50,7 @@ public async Task Add_ComputesMd5FromNormalizedConfig_IgnoresClientInput() }); Assert.Equal(Md5Of("{\"list\":[1,2]}"), row.Md5); - var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); + var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); Assert.Equal("{\"list\":[1,2]}", stored.Config); // 归一化原文落库 Assert.Equal(Md5Of(stored.Config), stored.Md5); } @@ -119,7 +119,7 @@ await service.UpdateAsync(new UpdateGameAppServerConfigRequest Enabled = true, }); - var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); + var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); Assert.NotEqual(row.Md5, stored.Md5); Assert.Equal(Md5Of(stored.Config), stored.Md5); } @@ -146,7 +146,7 @@ await service.UpdateAsync(new UpdateGameAppServerConfigRequest Enabled = true, }); - var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); + var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); Assert.Equal(row.Md5, stored.Md5); } @@ -173,7 +173,7 @@ await service.UpdateAsync(new UpdateGameAppServerConfigRequest Enabled = false, }); - var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); + var stored = await _db.Queryable().FirstAsync(u => u.Id == row.Id); Assert.False(stored.Enabled); } @@ -191,14 +191,14 @@ public async Task Page_WithoutLegacyContext_ReturnsMainDatabaseRows() private GameAppServerConfigService CreateService() { - return new GameAppServerConfigService(new SqlSugarRepository { Context = _db, }); + return new GameAppServerConfigService(new SqlSugarRepository { Context = _db, }); } private long _nextSeedId = 900000; private async Task InsertAsync(string key, string config) { - await _db.Insertable(new TenantGameAppServerConfigEntity + await _db.Insertable(new GameAppServerConfigEntity { Id = _nextSeedId++, Key = key, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/TenantGameCommodityEntityContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameCommodityEntityContractTests.cs similarity index 83% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/TenantGameCommodityEntityContractTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameCommodityEntityContractTests.cs index 29c986f4..d0d67153 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/TenantGameCommodityEntityContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameCommodityEntityContractTests.cs @@ -10,7 +10,7 @@ namespace GameFrameX.Core.Tests.GameBusiness; /// (BaseSelectPageResponse.Id 按 Id 契约序列化为 string,回填后提交 string;curl 等客户端可能 /// 提交数字)。任一字段类型错位都会让整个 body 反序列化失败、input 静默为 null → 500 NRE。 /// -public class TenantGameCommodityEntityContractTests +public class GameCommodityEntityContractTests { private static JsonSerializerOptions CreateOptions() { @@ -22,10 +22,10 @@ public void AddRequest_FrontendShapedStringPayload_Deserializes() { const string payload = "{\"appId\":\"1300000000001\",\"status\":\"OnSale\",\"categoryId\":\"7451234567890123\",\"cost\":false,\"number\":\"5\"}"; - var request = JsonSerializer.Deserialize(payload, CreateOptions()); + var request = JsonSerializer.Deserialize(payload, CreateOptions()); Assert.NotNull(request); - Assert.Null(typeof(AddTenantGameCommodityEntityRequest).GetProperty("AppId")); + Assert.Null(typeof(AddGameCommodityEntityRequest).GetProperty("AppId")); Assert.Equal("OnSale", request.Status); Assert.Equal(7451234567890123, request.CategoryId); Assert.Equal(5, request.Number); @@ -36,7 +36,7 @@ public void AddRequest_NumericCategoryIdPayload_Deserializes() { const string payload = "{\"appId\":1300000000001,\"status\":\"OnSale\",\"categoryId\":7451234567890123,\"cost\":true,\"number\":5}"; - var request = JsonSerializer.Deserialize(payload, CreateOptions()); + var request = JsonSerializer.Deserialize(payload, CreateOptions()); Assert.NotNull(request); Assert.Equal(7451234567890123, request.CategoryId); @@ -47,7 +47,7 @@ public void AddRequest_NumericCategoryIdPayload_Deserializes() public void AddRequest_DoesNotCarryIdProperty() { // AddRequest 不携带主键(新增语义;Id 由后端雪花分配),对齐 catalogue AddRequest 既定模式 - Assert.Null(typeof(AddTenantGameCommodityEntityRequest).GetProperty("Id")); + Assert.Null(typeof(AddGameCommodityEntityRequest).GetProperty("Id")); } [Fact] @@ -55,7 +55,7 @@ public void PageRequest_TextSearchNumberFilter_Deserializes() { const string payload = "{\"page\":1,\"pageSize\":20,\"appId\":\"1300000000001\",\"number\":\"5\",\"categoryId\":\"7451234567890123\"}"; - var request = JsonSerializer.Deserialize(payload, CreateOptions()); + var request = JsonSerializer.Deserialize(payload, CreateOptions()); Assert.NotNull(request); Assert.Equal(5, request.Number); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseAreaServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseAreaServiceTests.cs index 62b3a65c..e8899375 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseAreaServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseAreaServiceTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Application.ServerCenter.GameAreaClassify.Dto; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.GameBusiness; @@ -17,11 +17,11 @@ public async Task DisabledArea_RemainsVisibleForManagementWithoutApplication() { database.SeedAreaClassify(100); var area = database.SeedArea(101, 100, isEnabled: false); - database.MainDb.QueryFilter.AddTableFilter(x => x.IsEnabled == true); - var service = new GameAreaService(new SqlSugarRepository + database.MainDb.QueryFilter.AddTableFilter(x => x.IsEnabled == true); + var service = new GameAreaService(new SqlSugarRepository { Context = database.MainDb, - }, new SqlSugarRepository { Context = database.MainDb }, client); + }, new SqlSugarRepository { Context = database.MainDb }, client); var row = Assert.Single((await service.PageAsync(new() { IsEnabled = false })).Items); Assert.Equal(area.Id, row.Id); Assert.Equal("Asia", row.ClassifyIdName); @@ -36,16 +36,16 @@ public async Task Classification_UpdateWithEmptyPassword_PreservesStoredSecret() using (var database = new ClientApiTestDb()) { var existing = database.SeedAreaClassify(100); - var service = new GameAreaClassifyService(new SqlSugarRepository + var service = new GameAreaClassifyService(new SqlSugarRepository { Context = database.MainDb, }); - await service.UpdateAsync(new UpdateTenantGameAreaClassifyEntityRequest + await service.UpdateAsync(new UpdateGameAreaClassifyEntityRequest { Id = existing.Id, RowVersion = existing.RowVersion, Name = "updated", Description = "updated", DockerPassword = "", }); - var updated = await database.MainDb.Queryable().InSingleAsync(existing.Id); + var updated = await database.MainDb.Queryable().InSingleAsync(existing.Id); Assert.Equal("updated", updated.Name); Assert.Equal(existing.DockerPassword, updated.DockerPassword); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseContentServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseContentServiceTests.cs index ce6b2b1d..3066c7ce 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseContentServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseContentServiceTests.cs @@ -5,8 +5,8 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Announcement; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Announcement; namespace GameFrameX.Core.Tests.GameBusiness; @@ -17,26 +17,26 @@ public async Task Announcement_CreateNormalizeAndFilter_WithoutApplicationContex { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameAnnouncementEntity)); - var service = new GameAnnouncementService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameAnnouncementEntity)); + var service = new GameAnnouncementService(new SqlSugarRepository { Context = database.MainDb, }, null!); - var created = await service.AddAsync(new AddTenantGameAnnouncementEntityRequest + var created = await service.AddAsync(new AddGameAnnouncementEntityRequest { Title = "notice", Content = "content", Language = " ", TitleLocalizationKey = " title.key ", ContentLocalizationKey = " content.key ", }); - var entity = await database.Repository().GetByIdAsync(created.Id); + var entity = await database.Repository().GetByIdAsync(created.Id); Assert.Equal("default", entity.Language); Assert.Equal("title.key", entity.TitleLocalizationKey); Assert.Equal("content.key", entity.ContentLocalizationKey); - Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageTenantGameAnnouncementEntityRequest + Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageGameAnnouncementEntityRequest { Language = "default", Title = "notice", })).Items).Id); - Assert.Empty((await service.PageAsync(new PageTenantGameAnnouncementEntityRequest { Language = "en" })).Items); - await Assert.ThrowsAsync(() => service.UpdateAsync(new UpdateTenantGameAnnouncementEntityRequest + Assert.Empty((await service.PageAsync(new PageGameAnnouncementEntityRequest { Language = "en" })).Items); + await Assert.ThrowsAsync(() => service.UpdateAsync(new UpdateGameAnnouncementEntityRequest { Id = created.Id + 1, Title = "missing", Content = "content", })); @@ -48,21 +48,21 @@ public async Task MailTemplateCategory_CreateFilterAndMissingUpdateGuard_Without { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameMailTemplateCategoryEntity)); - var service = new GameMailTemplateCategoryService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameMailTemplateCategoryEntity)); + var service = new GameMailTemplateCategoryService(new SqlSugarRepository { Context = database.MainDb, }); - var created = await service.AddAsync(new AddTenantGameMailTemplateCategoryEntityRequest + var created = await service.AddAsync(new AddGameMailTemplateCategoryEntityRequest { Name = "operations", Description = "mail", Icon = "mail", IsEnabled = true, }); - Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageTenantGameMailTemplateCategoryEntityRequest + Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageGameMailTemplateCategoryEntityRequest { Name = "operations", IsEnabled = true, })).Items).Id); - Assert.Empty((await service.PageAsync(new PageTenantGameMailTemplateCategoryEntityRequest { Name = "missing" })).Items); - await Assert.ThrowsAsync(() => service.UpdateAsync(new UpdateTenantGameMailTemplateCategoryEntityRequest + Assert.Empty((await service.PageAsync(new PageGameMailTemplateCategoryEntityRequest { Name = "missing" })).Items); + await Assert.ThrowsAsync(() => service.UpdateAsync(new UpdateGameMailTemplateCategoryEntityRequest { Id = created.Id + 1, Name = "missing", Description = "mail", Icon = "mail", })); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseGoodsServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseGoodsServiceTests.cs index fa196fa7..53d6bdc6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseGoodsServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseGoodsServiceTests.cs @@ -7,7 +7,7 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.GameBusiness; @@ -19,14 +19,14 @@ public async Task Goods_CreatePageSelectAndDuplicateGuard_WorkWithoutApplication { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameGoodsEntity), typeof(TenantGameGoodsCatalogueEntity)); - var repository = new SqlSugarRepository { Context = database.MainDb }; + database.InitBusinessTables(typeof(GameGoodsEntity), typeof(GameGoodsCatalogueEntity)); + var repository = new SqlSugarRepository { Context = database.MainDb }; var service = new GameGoodsService(repository); - var created = await service.AddAsync(new AddTenantGameGoodsEntityRequest + var created = await service.AddAsync(new AddGameGoodsEntityRequest { ConfigId = 1501, ClassifyId = 1, Name = "reward", Description = "reward description", }); - Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageTenantGameGoodsEntityRequest + Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageGameGoodsEntityRequest { ConfigId = 1501, })).Items).Id); @@ -34,7 +34,7 @@ public async Task Goods_CreatePageSelectAndDuplicateGuard_WorkWithoutApplication { SearchKey = "reward", })).Id); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantGameGoodsEntityRequest + await Assert.ThrowsAsync(() => service.AddAsync(new AddGameGoodsEntityRequest { ConfigId = 1501, ClassifyId = 1, Name = "duplicate", Description = "duplicate", })); @@ -46,17 +46,17 @@ public async Task Catalogue_CreateAndNameUniqueness_WorkWithoutApplicationContex { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameGoodsCatalogueEntity)); - var service = new GameGoodsCatalogueService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameGoodsCatalogueEntity)); + var service = new GameGoodsCatalogueService(new SqlSugarRepository { Context = database.MainDb, }); - var created = await service.AddAsync(new AddTenantGameGoodsCatalogueEntityRequest + var created = await service.AddAsync(new AddGameGoodsCatalogueEntityRequest { Name = "items", Description = "items description", }); - Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageTenantGameGoodsCatalogueEntityRequest())).Items).Id); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantGameGoodsCatalogueEntityRequest + Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageGameGoodsCatalogueEntityRequest())).Items).Id); + await Assert.ThrowsAsync(() => service.AddAsync(new AddGameGoodsCatalogueEntityRequest { Name = "items", Description = "duplicate", })); @@ -68,20 +68,20 @@ public async Task Commodity_CreateAndFilter_WorkWithoutApplicationContext() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameCommodityEntity)); - var service = new GameCommodityService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameCommodityEntity)); + var service = new GameCommodityService(new SqlSugarRepository { Context = database.MainDb, }); - var created = await service.AddAsync(new AddTenantGameCommodityEntityRequest + var created = await service.AddAsync(new AddGameCommodityEntityRequest { Status = "available", CategoryId = 1, Number = 5, }); - Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageTenantGameCommodityEntityRequest + Assert.Equal(created.Id, Assert.Single((await service.PageAsync(new PageGameCommodityEntityRequest { CategoryId = 1, Status = "available", })).Items).Id); - Assert.Empty((await service.PageAsync(new PageTenantGameCommodityEntityRequest { CategoryId = 2 })).Items); + Assert.Empty((await service.PageAsync(new PageGameCommodityEntityRequest { CategoryId = 2 })).Items); } } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabasePlayerServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabasePlayerServiceTests.cs index 4d8c744f..e442a3bc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabasePlayerServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabasePlayerServiceTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.GameBusiness; @@ -17,15 +17,15 @@ public async Task AccountWithoutRole_CanBeListedBannedAndUnsealed() using (var database = new ClientApiTestDb()) { var user = database.SeedUser(100, userName: "player"); - var service = new GameUserService(new SqlSugarRepository + var service = new GameUserService(new SqlSugarRepository { Context = database.MainDb, }, new GameUserPasswordService()); Assert.Equal(user.Id, Assert.Single((await service.PageAsync(new() { UserName = "player" })).Items).Id); await service.BanAsync(new() { Id = user.Id }); - Assert.Equal(GameUserStatus.Banned, (await database.MainDb.Queryable().InSingleAsync(user.Id)).Status); + Assert.Equal(GameUserStatus.Banned, (await database.MainDb.Queryable().InSingleAsync(user.Id)).Status); await service.UnsealAsync(new() { Id = user.Id }); - Assert.Equal(GameUserStatus.Active, (await database.MainDb.Queryable().InSingleAsync(user.Id)).Status); + Assert.Equal(GameUserStatus.Active, (await database.MainDb.Queryable().InSingleAsync(user.Id)).Status); await Assert.ThrowsAsync(() => service.BanAsync(new() { Id = 999 })); } } @@ -38,18 +38,18 @@ public async Task RolePage_FiltersAreaAndUpdatePreservesConcurrencyCheck() { var role = database.SeedRole(201, 100, 10, name: "one"); database.SeedRole(202, 100, 11, name: "two"); - var service = new GameRoleService(new SqlSugarRepository + var service = new GameRoleService(new SqlSugarRepository { Context = database.MainDb, }, client); var row = Assert.Single((await service.PageAsync(new() { AreaId = 10 })).Items); Assert.Equal(role.Id.ToString(), row.RoleId); - var update = new UpdateTenantGameRoleEntityRequest + var update = new UpdateGameRoleEntityRequest { RoleId = row.RoleId, Name = "changed", UserId = 100, AreaId = 10, RowVersion = row.RowVersion, }; await service.UpdateAsync(update); - Assert.Equal("changed", (await database.MainDb.Queryable().InSingleAsync(role.Id)).Name); + Assert.Equal("changed", (await database.MainDb.Queryable().InSingleAsync(role.Id)).Name); await Assert.ThrowsAnyAsync(() => service.UpdateAsync(update)); await Assert.ThrowsAsync(() => service.UpdateAsync(new() { RoleId = "999" })); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRedeemCodeServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRedeemCodeServiceTests.cs index eb1c6c74..0b902234 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRedeemCodeServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRedeemCodeServiceTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.GameBusiness; @@ -14,12 +14,12 @@ public async Task Channel_CreateAndFilter_PreserveUsageLimitWithoutApplication() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameRedeemCodeChannelEntity)); - var service = new GameRedeemCodeChannelService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameRedeemCodeChannelEntity)); + var service = new GameRedeemCodeChannelService(new SqlSugarRepository { Context = database.MainDb, }); - var created = await service.AddAsync(new AddTenantGameRedeemCodeChannelEntityRequest + var created = await service.AddAsync(new AddGameRedeemCodeChannelEntityRequest { Name = "launch", Description = "launch", RoleUsageLimit = 2, }); @@ -27,11 +27,11 @@ public async Task Channel_CreateAndFilter_PreserveUsageLimitWithoutApplication() Assert.Equal(created.Id, row.Id); Assert.Equal(2, row.RoleUsageLimit); Assert.Empty((await service.PageAsync(new() { Name = "missing" })).Items); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantGameRedeemCodeChannelEntityRequest + await Assert.ThrowsAsync(() => service.AddAsync(new AddGameRedeemCodeChannelEntityRequest { Name = "invalid", Description = "invalid", RoleUsageLimit = -1, })); - await Assert.ThrowsAsync(() => service.UpdateAsync(new UpdateTenantGameRedeemCodeChannelEntityRequest + await Assert.ThrowsAsync(() => service.UpdateAsync(new UpdateGameRedeemCodeChannelEntityRequest { Id = created.Id + 1, Name = "missing", Description = "missing", })); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRewardServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRewardServiceTests.cs index f341e453..ab84f96c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRewardServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseRewardServiceTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.GameBusiness; @@ -16,18 +16,18 @@ public async Task CreateSelectAndCopySnapshot_PreserveRewardValidationWithoutApp { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameRewardTemplateEntity), typeof(TenantGameRewardTemplateGroupEntity)); - var groups = new SqlSugarRepository { Context = database.MainDb }; + database.InitBusinessTables(typeof(GameRewardTemplateEntity), typeof(GameRewardTemplateGroupEntity)); + var groups = new SqlSugarRepository { Context = database.MainDb }; var groupService = new GameRewardTemplateGroupService(groups); - var group = await groupService.AddAsync(new AddTenantGameRewardTemplateGroupEntityRequest + var group = await groupService.AddAsync(new AddGameRewardTemplateGroupEntityRequest { Name = "rewards", Description = "rewards", IsEnabled = true, }); - var service = new GameRewardTemplateService(new SqlSugarRepository + var service = new GameRewardTemplateService(new SqlSugarRepository { Context = database.MainDb, }, groups); - var created = await service.AddAsync(new AddTenantGameRewardTemplateEntityRequest + var created = await service.AddAsync(new AddGameRewardTemplateEntityRequest { Name = "gift", Description = "gift", GroupId = group.Id, RewardItemsJson = "[{\"id\":1,\"itemId\":10,\"count\":2}]", IsEnabled = true, @@ -37,12 +37,12 @@ public async Task CreateSelectAndCopySnapshot_PreserveRewardValidationWithoutApp Assert.Equal(1, snapshot.SnapshotSchemaVersion); Assert.Equal(created.Id, Assert.Single(await service.SelectAsync(new() { SearchKey = "gift" })).Id); Assert.Equal("rewards", Assert.Single((await service.PageAsync(new() { GroupId = group.Id })).Items).GroupName); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantGameRewardTemplateEntityRequest + await Assert.ThrowsAsync(() => service.AddAsync(new AddGameRewardTemplateEntityRequest { Name = "invalid", Description = "invalid", GroupId = group.Id, RewardItemsJson = "[{\"id\":1,\"count\":0}]", })); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantGameRewardTemplateEntityRequest + await Assert.ThrowsAsync(() => service.AddAsync(new AddGameRewardTemplateEntityRequest { Name = "missing", Description = "missing", GroupId = group.Id + 1, RewardItemsJson = snapshot.RewardItemsJson, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseTimeJobServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseTimeJobServiceTests.cs index f8366448..b3ce2125 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseTimeJobServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseTimeJobServiceTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Application.Platform.TimeJob.GameTimeJob.Dto; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.GameBusiness; @@ -13,12 +13,12 @@ public async Task CreateAndFilter_ForceManualSourceWithoutApplication() { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameTimeJobEntity)); - var service = new GameTimeJobService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameTimeJobEntity)); + var service = new GameTimeJobService(new SqlSugarRepository { Context = database.MainDb, }); - var created = await service.AddAsync(new AddTenantGameTimeJobEntityRequest + var created = await service.AddAsync(new AddGameTimeJobEntityRequest { Name = "daily", Description = "daily", Cron = "0 0 1 * * ?", Source = "forged", }); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseWebShopServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseWebShopServiceTests.cs index f1b4a3e8..f93315f3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseWebShopServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/MainDatabaseWebShopServiceTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Application.CommerceCenter.GameWebShop.Dto; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.GameBusiness; @@ -14,12 +14,12 @@ public async Task CreateAndFilter_PreserveCommodityWithoutApplication() using (var database = new ClientApiTestDb()) using (var client = new HttpClient()) { - database.InitTenantTables(typeof(TenantGameWebShopEntity)); - var service = new GameWebShopService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameWebShopEntity)); + var service = new GameWebShopService(new SqlSugarRepository { Context = database.MainDb, }, client); - var created = await service.AddAsync(new AddTenantGameWebShopEntityRequest + var created = await service.AddAsync(new AddGameWebShopEntityRequest { Name = "gift", Description = "gift", Logo = "gift.png", KeyWords = "gift", Price = "12", RealPrice = "10", ItemJson = "[]", IsUp = true, Weight = 3, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/RewardTemplateContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/RewardTemplateContractTests.cs index cf1b393e..799d977c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/RewardTemplateContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/RewardTemplateContractTests.cs @@ -7,7 +7,7 @@ using GameFrameX.Application.NoticeCenter.GameRewardTemplateGroup.Dto; using GameFrameX.Application.SeedData.System; using GameFrameX.Core.Service.Base; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Mvc; namespace GameFrameX.Core.Tests.GameBusiness; @@ -17,8 +17,8 @@ public class RewardTemplateContractTests [Fact] public void RewardTemplateEntities_CarryBusinessFieldsWithoutApplication() { - var groupProps = PropNames(); - var templateProps = PropNames(); + var groupProps = PropNames(); + var templateProps = PropNames(); Assert.DoesNotContain("AppId", groupProps); Assert.DoesNotContain("Code", groupProps); @@ -35,12 +35,12 @@ public void RewardTemplateEntities_CarryBusinessFieldsWithoutApplication() [Fact] public void RewardTemplateInputs_ExposeRewardFieldsWithoutApplication() { - Assert.Null(typeof(AddTenantGameRewardTemplateGroupEntityRequest).GetProperty("AppId")); - Assert.Null(typeof(AddTenantGameRewardTemplateGroupEntityRequest).GetProperty("Code")); - Assert.Null(typeof(AddTenantGameRewardTemplateGroupEntityRequest).GetProperty("Icon")); - Assert.Null(typeof(AddTenantGameRewardTemplateEntityRequest).GetProperty("AppId")); - AssertRequired(nameof(AddTenantGameRewardTemplateEntityRequest.GroupId)); - AssertRequired(nameof(AddTenantGameRewardTemplateEntityRequest.RewardItemsJson)); + Assert.Null(typeof(AddGameRewardTemplateGroupEntityRequest).GetProperty("AppId")); + Assert.Null(typeof(AddGameRewardTemplateGroupEntityRequest).GetProperty("Code")); + Assert.Null(typeof(AddGameRewardTemplateGroupEntityRequest).GetProperty("Icon")); + Assert.Null(typeof(AddGameRewardTemplateEntityRequest).GetProperty("AppId")); + AssertRequired(nameof(AddGameRewardTemplateEntityRequest.GroupId)); + AssertRequired(nameof(AddGameRewardTemplateEntityRequest.RewardItemsJson)); Assert.Null(typeof(GameRewardTemplateSnapshotRequest).GetProperty("AppId")); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderFulfillmentServiceContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderFulfillmentServiceContractTests.cs index 27370658..4d4b8c6f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderFulfillmentServiceContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderFulfillmentServiceContractTests.cs @@ -33,7 +33,7 @@ public void Service_Exposes_Required_Read_And_Management_Actions() [Fact] public void PageInput_Carries_Required_Filter_Fields() { - var props = typeof(PageTenantGameOrderFulfillmentEntityRequest) + var props = typeof(PageGameOrderFulfillmentEntityRequest) .GetProperties() .Select(p => p.Name) .ToHashSet(); @@ -55,7 +55,7 @@ public void PageInput_Carries_Required_Filter_Fields() [Fact] public void PageInput_Status_Is_FulfillmentStatusEnum_Not_OrderStatusEnum() { - var statusProperty = typeof(PageTenantGameOrderFulfillmentEntityRequest).GetProperty("Status"); + var statusProperty = typeof(PageGameOrderFulfillmentEntityRequest).GetProperty("Status"); Assert.NotNull(statusProperty); Assert.Equal(typeof(FulfillmentStatusEnum?), statusProperty!.PropertyType); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderShipServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderShipServiceTests.cs index d515b82a..c8c2b8fb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderShipServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderShipServiceTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Core.Enum; using GameFrameX.Application.CommerceCenter.GameOrder.Dto; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using SqlSugar; @@ -25,7 +25,7 @@ public GameOrderShipServiceTests() InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, }); - _db.CodeFirst.InitTables(); + _db.CodeFirst.InitTables(); _service = new GameOrderShipService(_db, new TestHttpClientFactory(_handler)); } @@ -37,7 +37,7 @@ public async Task ShipAsync_WhenCalledTwice_SendsItemsOnlyOnce() var first = await _service.ShipAsync(orderId, true); var second = await _service.ShipAsync(orderId, true); - var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); + var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); Assert.True(first.IsSuccess); Assert.True(second.IsSuccess); Assert.Equal(OrderStatusEnum.Shipped, order.Status); @@ -61,7 +61,7 @@ public async Task ShipAsync_WhenGameServerFails_RecordsFailedWithReasonAndRecove var failed = await _service.ShipAsync(orderId, true); Assert.False(failed.IsSuccess); - var afterFail = await _db.Queryable().FirstAsync(u => u.Id == orderId); + var afterFail = await _db.Queryable().FirstAsync(u => u.Id == orderId); Assert.Equal(OrderStatusEnum.NotShipped, afterFail.Status); var failedRows = await FulfillmentsAsync(orderId); @@ -72,7 +72,7 @@ public async Task ShipAsync_WhenGameServerFails_RecordsFailedWithReasonAndRecove var recovered = await _service.ShipAsync(orderId, true); Assert.True(recovered.IsSuccess); - var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); + var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); Assert.Equal(OrderStatusEnum.Shipped, order.Status); var finalRows = await FulfillmentsAsync(orderId); @@ -90,7 +90,7 @@ public async Task RefundAsync_WhenOrderIsShipped_DeductsOnlyOnce() var first = await _service.RefundAsync(orderId, "test"); var second = await _service.RefundAsync(orderId, "test"); - var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); + var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); Assert.True(first.IsSuccess); Assert.True(second.IsSuccess); Assert.Equal(OrderStatusEnum.Refunded, order.Status); @@ -111,7 +111,7 @@ public async Task RefundAsync_WhenOrderIsNotDelivered_VoidsWithoutCallingGameSer var result = await _service.RefundAsync(orderId, "test"); - var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); + var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); Assert.True(result.IsSuccess); Assert.Equal(OrderStatusEnum.Voided, order.Status); Assert.Empty(_handler.RequestPaths); @@ -130,7 +130,7 @@ await Task.WhenAll( _service.ShipAsync(orderId, true), _service.RefundAsync(orderId, "concurrent")); - var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); + var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); Assert.True(order.Status is OrderStatusEnum.Voided or OrderStatusEnum.Refunded); Assert.True(_handler.Count("/game/api/req_player_send_item") <= 1); Assert.True(_handler.Count("/game/api/req_player_refund_order") <= 1); @@ -143,7 +143,7 @@ public async Task CompensateAsync_WithOperator_RecordsCompensateWithOperatorId() var result = await _service.CompensateAsync(orderId, "测试补发", 42); - var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); + var order = await _db.Queryable().FirstAsync(u => u.Id == orderId); Assert.True(result.IsSuccess); // 人工补偿不改订单状态 Assert.Equal(OrderStatusEnum.Shipped, order.Status); @@ -184,9 +184,9 @@ public async Task CompensateAsync_WithoutOperator_RejectsAndWritesNothing() Assert.Empty(fulfillments); } - private async Task> FulfillmentsAsync(long orderId) + private async Task> FulfillmentsAsync(long orderId) { - return await _db.Queryable() + return await _db.Queryable() .Where(u => u.OrderId == orderId) .ToListAsync(); } @@ -198,7 +198,7 @@ private async Task SeedOrderAsync(OrderStatusEnum status) var orderId = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + (long)status; var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameAreaEntity + await _db.Insertable(new GameAreaEntity { Id = areaId, CreatedId = 1, @@ -233,7 +233,7 @@ await _db.Insertable(new TenantGameAreaEntity AppVersion = "test", }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRoleEntity + await _db.Insertable(new GameRoleEntity { Id = roleId, CreatedId = 1, @@ -266,7 +266,7 @@ await _db.Insertable(new TenantGameRoleEntity OnlineTime = 0, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameOrderEntity + await _db.Insertable(new GameOrderEntity { Id = orderId, CreatedId = 1, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/MainDatabaseOrderServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/MainDatabaseOrderServiceTests.cs index b05aba22..f3723e5c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/MainDatabaseOrderServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/MainDatabaseOrderServiceTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; namespace GameFrameX.Core.Tests.GameOrder; @@ -17,9 +17,9 @@ public async Task OrderPageAndSummary_UseBusinessFiltersWithoutApplication() using (var database = new ClientApiTestDb()) { var order = database.SeedOrder(101, 201, 10, status: OrderStatusEnum.Shipped, amount: 100, providerTransactionId: "tx-101"); - database.MainDb.Updateable().SetColumns(x => x.AppleTransactionId == "apple-101").Where(x => x.Id == 101).ExecuteCommand(); + database.MainDb.Updateable().SetColumns(x => x.AppleTransactionId == "apple-101").Where(x => x.Id == 101).ExecuteCommand(); database.SeedOrder(102, 202, 11, status: OrderStatusEnum.Unpaid, amount: 50, providerTransactionId: "tx-102"); - var service = new GameOrderService(new SqlSugarRepository + var service = new GameOrderService(new SqlSugarRepository { Context = database.MainDb, }, null!, new CurrentUserContext(new HttpContextAccessor())); @@ -37,16 +37,16 @@ public async Task FulfillmentExport_FiltersMainDatabaseAndRejectsDirectCreation( { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameOrderFulfillmentEntity)); - database.MainDb.Insertable(new TenantGameOrderFulfillmentEntity + database.InitBusinessTables(typeof(GameOrderFulfillmentEntity)); + database.MainDb.Insertable(new GameOrderFulfillmentEntity { Id = 301, OrderId = 101, AreaId = 10, RoleId = "201", IdempotencyKey = "purchase:101", PayChannel = "google", ProviderTransactionId = "tx-101", AccountId = "100", ItemsJson = "[]", Type = FulfillmentTypeEnum.Purchase, Status = FulfillmentStatusEnum.Success, }).ExecuteCommand(); var service = new GameOrderFulfillmentService( - new SqlSugarRepository { Context = database.MainDb }, - new SqlSugarRepository { Context = database.MainDb }, + new SqlSugarRepository { Context = database.MainDb }, + new SqlSugarRepository { Context = database.MainDb }, null!, null!, new CurrentUserContext(new HttpContextAccessor())); Assert.Single(await service.ExportAsync(new() { AreaId = 10 })); Assert.Empty(await service.ExportAsync(new() { AreaId = 11 })); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GlobalUsings.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GlobalUsings.cs index f3757db6..58f8548b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GlobalUsings.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GlobalUsings.cs @@ -1,4 +1,4 @@ global using GameFrameX.Core.Enum.Errors; -global using GameFrameX.Entity.Tenant; +global using GameFrameX.Entity.Business; global using GameFrameX.Foundation.Utility; global using GameFrameX.Client.Api.Integrations.Payment; \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs index 464e9626..242e64f9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs @@ -7,7 +7,7 @@ using GameFrameX.Core.Extension; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Game.FeatureSwitch; +using GameFrameX.Entity.Business.Game.FeatureSwitch; using GameFrameX.Hub.Api.Const; using GameFrameX.Hub.Api.Controllers; using GameFrameX.Hub.Api.Dto.FeatureSwitchSync; @@ -28,11 +28,11 @@ namespace GameFrameX.Core.Tests.HubApi; /// public sealed class FeatureSwitchSyncControllerTests : IDisposable { - private const long TenantId = 2090001; + private const long Id = 2090001; private const long CredentialAppId = 2091001; private readonly string _mainDbPath = Path.Combine(Path.GetTempPath(), $"gfx_hub_switch_main_{Guid.NewGuid():N}.db"); - private readonly string _tenantDbPath = Path.Combine(Path.GetTempPath(), $"gfx_hub_switch_tenant_{Guid.NewGuid():N}.db"); + private readonly string _tenantDbPath = Path.Combine(Path.GetTempPath(), $"gfx_hub_switch_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _mainDb; public FeatureSwitchSyncControllerTests() @@ -46,21 +46,21 @@ public FeatureSwitchSyncControllerTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _mainDb = new SqlSugarScope(config); var provider = _mainDb; - provider.CodeFirst.InitTables(typeof(TenantGameAppFeatureSwitchEntity)); + provider.CodeFirst.InitTables(typeof(GameAppFeatureSwitchEntity)); } - private FeatureSwitchSyncController CreateController(out ISqlSugarClient tenantDb, bool includeContext = true) + private FeatureSwitchSyncController CreateController(out ISqlSugarClient db, bool includeContext = true) { var provider = _mainDb; - var repository = new Repository(_mainDb); - tenantDb = provider; + var repository = new Repository(_mainDb); + db = provider; var controller = new FeatureSwitchSyncController(new FeatureSwitchDeliveryResolver(repository)); var context = new DefaultHttpContext(); controller.ControllerContext = new ControllerContext { HttpContext = context, }; return controller; } - private static TenantGameAppFeatureSwitchEntity Row( + private static GameAppFeatureSwitchEntity Row( long id, string switchKey, string valueJson = "{}", @@ -69,7 +69,7 @@ private static TenantGameAppFeatureSwitchEntity Row( string platform = GameDimensionConst.PlatformDefault, int rolloutPercent = 100) { - return new TenantGameAppFeatureSwitchEntity + return new GameAppFeatureSwitchEntity { Id = id, SwitchKey = switchKey, @@ -93,8 +93,8 @@ private static TenantGameAppFeatureSwitchEntity Row( [Fact] public async Task Sync_FiltersByAudienceFromMainDatabase() { - var controller = CreateController(out var tenantDb); - tenantDb.Insertable(new[] + var controller = CreateController(out var db); + db.Insertable(new[] { Row(1, "economy.drop_rate", "{\"rate\":2}", audience: FeatureSwitchAudienceValues.Server), Row(2, "login.banner", "{\"v\":1}", audience: FeatureSwitchAudienceValues.Both), @@ -120,8 +120,8 @@ public async Task Sync_FiltersByAudienceFromMainDatabase() [Fact] public async Task Sync_WithoutDimensionContext_OnlyDefaultSentinelRowsDelivered() { - var controller = CreateController(out var tenantDb); - tenantDb.Insertable(new[] + var controller = CreateController(out var db); + db.Insertable(new[] { Row(1, "activity.android_only", "{\"v\":1}", platform: "android"), Row(2, "activity.everyone", "{\"v\":2}"), @@ -140,8 +140,8 @@ public async Task Sync_WithoutDimensionContext_OnlyDefaultSentinelRowsDelivered( [Fact] public async Task Sync_ServerChannel_IgnoresDeviceRollout() { - var controller = CreateController(out var tenantDb); - tenantDb.Insertable(new[] + var controller = CreateController(out var db); + db.Insertable(new[] { Row(1, "economy.zero_rollout", "{\"rate\":5}", rolloutPercent: 0), }).ExecuteCommand(); @@ -159,9 +159,9 @@ public async Task Sync_ServerChannel_IgnoresDeviceRollout() [Fact] public async Task Sync_VersionProtocol_FirstPullUnchangedShortCircuitAndChange() { - var controller = CreateController(out var tenantDb); + var controller = CreateController(out var db); var row = Row(1, "economy.drop_rate", "{\"rate\":1}"); - tenantDb.Insertable(row).ExecuteCommand(); + db.Insertable(row).ExecuteCommand(); var firstResult = await controller.Sync(new FeatureSwitchSyncRequest()); var first = ClientApiResultReader.Data(ClientApiResultReader.Read(firstResult)); @@ -177,7 +177,7 @@ public async Task Sync_VersionProtocol_FirstPullUnchangedShortCircuitAndChange() Assert.Equal(0, unchanged.GetProperty("Switches").GetArrayLength()); row.ValueJson = "{\"rate\":9}"; - tenantDb.Updateable(row).ExecuteCommand(); + db.Updateable(row).ExecuteCommand(); var changedResult = await controller.Sync(new FeatureSwitchSyncRequest { Version = version, }); var changed = ClientApiResultReader.Data(ClientApiResultReader.Read(changedResult)); Assert.False(changed.GetProperty("Unchanged").GetBoolean()); @@ -208,8 +208,8 @@ public void OpenAccessScope_FeatureSwitchSyncRouteMatchesOnlyItsScope() { var path = new PathString("/api/FeatureSwitchSync/Sync"); - Assert.True(TenantGameAppOpenAccessAuthMiddleware.IsRouteInScopes(path, "[\"" + OpenAccessScopeConst.FeatureSwitchSync + "\"]")); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.IsRouteInScopes(path, "[\"PackageBuildReport\"]")); + Assert.True(GameAppOpenAccessAuthMiddleware.IsRouteInScopes(path, "[\"" + OpenAccessScopeConst.FeatureSwitchSync + "\"]")); + Assert.False(GameAppOpenAccessAuthMiddleware.IsRouteInScopes(path, "[\"PackageBuildReport\"]")); } /// @@ -219,7 +219,7 @@ public void OpenAccessScope_FeatureSwitchSyncRouteMatchesOnlyItsScope() [Fact] public void OpenAccessSignature_V2CanonicalMessage_VerifiesForFeatureSwitchSync() { - var credential = new GameFrameX.Entity.Tenant.Game.App.TenantGameAppOpenAccessEntity + var credential = new GameFrameX.Entity.Business.Game.App.GameAppOpenAccessEntity { AccessKey = "ak-feature-switch-001", AccessSecret = "GFX-C347-FEATURE-SWITCH-SECRET", @@ -230,8 +230,8 @@ public void OpenAccessSignature_V2CanonicalMessage_VerifiesForFeatureSwitchSync( Encoding.UTF8.GetBytes(credential.AccessSecret), GameFrameX.Core.SignatureAuth.CanonicalRequestBuilder.BuildV2Message("POST", "/api/FeatureSwitchSync/Sync", string.Empty, credential.AccessKey, 1755244800, "n-c347", body)); - Assert.True(TenantGameAppOpenAccessAuthMiddleware.VerifySignature(credential, "POST", "/api/FeatureSwitchSync/Sync", string.Empty, 1755244800, "n-c347", body, provided)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.VerifySignature(credential, "POST", "/api/FeatureSwitchSync/Sync", string.Empty, 1755244800, "n-c347", + Assert.True(GameAppOpenAccessAuthMiddleware.VerifySignature(credential, "POST", "/api/FeatureSwitchSync/Sync", string.Empty, 1755244800, "n-c347", body, provided)); + Assert.False(GameAppOpenAccessAuthMiddleware.VerifySignature(credential, "POST", "/api/FeatureSwitchSync/Sync", string.Empty, 1755244800, "n-c347", Encoding.UTF8.GetBytes("{\"version\":\"tampered\"}"), provided)); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessAuthMiddlewareTests.cs similarity index 68% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessAuthMiddlewareTests.cs index d28b629f..21b6ac72 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessAuthMiddlewareTests.cs @@ -1,16 +1,16 @@ using System.Text; using GameFrameX.Core.SignatureAuth; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Hub.Api.Middleware; namespace GameFrameX.Core.Tests.HubApi; /// -/// TenantGameAppOpenAccessAuthMiddleware 签名段单元测试(C267-C:规范 B → 规范 A 迁移)。 +/// GameAppOpenAccessAuthMiddleware 签名段单元测试(C267-C:规范 B → 规范 A 迁移)。 /// 覆盖:v2 单头解析(合法/旧格式拒绝/坏 Base64)、canonical 消息串验签通过、 /// body 篡改拒(body 入签证据)、按原始乱序 query 拼串签名拒(canonical 强制证据)。 /// -public sealed class TenantGameAppOpenAccessAuthMiddlewareTests +public sealed class GameAppOpenAccessAuthMiddlewareTests { private const string AccessKey = "ak-hub-vector-001"; private const string AccessSecret = "GFX-C267-HUB-OPENACCESS-SECRET"; @@ -18,9 +18,9 @@ public sealed class TenantGameAppOpenAccessAuthMiddlewareTests private const string Nonce = "n-9f3c1b"; private const string Body = "{\"package\":\"pkg-1001\",\"status\":\"ok\"}"; - private static TenantGameAppOpenAccessEntity Credential() + private static GameAppOpenAccessEntity Credential() { - return new TenantGameAppOpenAccessEntity + return new GameAppOpenAccessEntity { AccessKey = AccessKey, AccessSecret = AccessSecret, @@ -41,7 +41,7 @@ public void TryParseSignatureHeader_ValidV2Header_ParsesAllSegments() var signatureBase64 = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", Encoding.UTF8.GetBytes(Body)); var header = "v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";" + Convert.ToBase64String(signatureBase64); - var parsed = TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(header, out var accessKey, out var timestamp, out var nonce, out var provided); + var parsed = GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(header, out var accessKey, out var timestamp, out var nonce, out var provided); Assert.True(parsed); Assert.Equal(AccessKey, accessKey); @@ -55,13 +55,13 @@ public void TryParseSignatureHeader_LegacyOrMalformed_Rejected() { // C267 前的 4 个独立头(accessKey/timestamp/nonce/sign)不再支持:缺 Signature 单头直接解析失败; // 段数不足 / 非 v2 前缀 / 坏 Base64 同样拒绝 - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(null, out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(string.Empty, out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v1;" + AccessKey + ";" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce, out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";not-a-ts;" + Nonce + ";AAAA", out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;;" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";***not-base64***", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(null, out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(string.Empty, out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v1;" + AccessKey + ";" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce, out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";not-a-ts;" + Nonce + ";AAAA", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;;" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";***not-base64***", out _, out _, out _, out _)); } [Fact] @@ -70,7 +70,7 @@ public void VerifySignature_ClientCanonicalMessage_Passes() var body = Encoding.UTF8.GetBytes(Body); var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", body); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); Assert.True(verified); @@ -83,7 +83,7 @@ public void VerifySignature_TamperedBody_Rejected() var body = Encoding.UTF8.GetBytes(Body); var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9", body); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( Credential(), "POST", "/api/PackageBuildReport", "appId=9", Ts, Nonce, Encoding.UTF8.GetBytes("{\"package\":\"pkg-1001\",\"status\":\"tampered\"}"), provided); @@ -100,7 +100,7 @@ public void VerifySignature_RawOrderSignedClient_Rejected() + CanonicalRequestBuilder.BodyHashHex(body); var provided = CanonicalRequestBuilder.HmacSha256(Encoding.UTF8.GetBytes(AccessSecret), rawOrderMessage); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); Assert.False(verified); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs index 646773e6..9de4d563 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs @@ -3,13 +3,13 @@ using GameFrameX.Core.Middleware; using GameFrameX.Core.Option; using GameFrameX.Core.Service.Cache; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SignatureAuth; using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Hub.Api.Middleware; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; @@ -21,32 +21,32 @@ namespace GameFrameX.Core.Tests.HubApi; // C372(GFX-838)T3/T5/T6:Hub.Api 开放访问中间件凭证解密收口——密文凭证(C371 起库内形态) // 经完整 InvokeAsync 管线验签通过;密文存在而密钥缺失 fail-closed 抛错。 // change:gfx-doc/dev/client-api/changes/C372-runtime-credential-decrypt-closure/change.md -public sealed class TenantGameAppOpenAccessDecryptClosureTests : IDisposable +public sealed class GameAppOpenAccessDecryptClosureTests : IDisposable { private readonly ClientApiTestDb _db = new(); private readonly string? _originalKey; - public TenantGameAppOpenAccessDecryptClosureTests() + public GameAppOpenAccessDecryptClosureTests() { - _originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - _db.InitTenantTables(typeof(TenantGameAppOpenAccessEntity), typeof(TenantUserEntity)); + _originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + _db.InitBusinessTables(typeof(GameAppOpenAccessEntity), typeof(UserEntity)); } public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); _db.Dispose(); } [Fact] public async Task EncryptedCredential_SignedRequest_PassesFullPipeline() { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); var httpContext = CreateSignedRequest("hub-open-access-secret"); var nextCalled = false; - var middleware = new TenantGameAppOpenAccessAuthMiddleware(context => + var middleware = new GameAppOpenAccessAuthMiddleware(context => { nextCalled = true; context.Response.StatusCode = StatusCodes.Status200OK; @@ -62,16 +62,16 @@ public async Task EncryptedCredential_SignedRequest_PassesFullPipeline() [Fact] public async Task EncryptedCredential_MissingKey_FailsClosed() { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); var httpContext = CreateSignedRequest("hub-open-access-secret"); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, null); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, null); - var middleware = new TenantGameAppOpenAccessAuthMiddleware(_ => Task.CompletedTask); + var middleware = new GameAppOpenAccessAuthMiddleware(_ => Task.CompletedTask); // 密文存在而密钥缺失:fail-closed 抛 InvalidOperationException(指向环境变量,不回显密文) var exception = await Assert.ThrowsAsync( () => middleware.InvokeAsync(httpContext, CreateCacheService())); - Assert.Contains(TenantSecretCrypto.KeyEnvironmentVariable, exception.Message, StringComparison.Ordinal); + Assert.Contains(SecretCrypto.KeyEnvironmentVariable, exception.Message, StringComparison.Ordinal); } [Theory] @@ -83,8 +83,8 @@ public async Task EncryptedCredential_MissingKey_FailsClosed() [InlineData("tampered", 401)] public async Task MainDatabaseCredential_InvalidStateOrRequest_IsRejected(string scenario, int expectedStatus) { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); - var credential = _db.MainDb.Queryable().First(); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); + var credential = _db.MainDb.Queryable().First(); switch (scenario) { case "disabled": @@ -112,7 +112,7 @@ public async Task MainDatabaseCredential_InvalidStateOrRequest_IsRejected(string } var nextCalled = false; - var middleware = new TenantGameAppOpenAccessAuthMiddleware(_ => + var middleware = new GameAppOpenAccessAuthMiddleware(_ => { nextCalled = true; return Task.CompletedTask; @@ -126,15 +126,15 @@ public async Task MainDatabaseCredential_InvalidStateOrRequest_IsRejected(string [Fact] public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoTenantClaim() { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); var first = CreateSignedRequest("hub-open-access-secret"); var cache = CreateCacheService(); var nextCount = 0; - var middleware = new TenantGameAppOpenAccessAuthMiddleware(context => + var middleware = new GameAppOpenAccessAuthMiddleware(context => { nextCount++; Assert.Equal("7801", context.User.FindFirst(GameFrameX.Core.Const.ClaimConst.UserId)?.Value); - Assert.Null(context.User.FindFirst("TenantId")); + Assert.Null(context.User.FindFirst("Id")); return Task.CompletedTask; }); await middleware.InvokeAsync(first, cache); @@ -148,13 +148,13 @@ public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoTenantC private void SeedCredential(string storedAccessSecret) { - var bindUser = new TenantUserEntity + var bindUser = new UserEntity { Id = 7801, Account = "ci-user", RealName = "CI", Password = "not-a-real-password", }; - TenantUserService.NormalizeNewUser(bindUser); // 补齐 NOT NULL 字符串列默认值 - _db.TenantDb.Insertable(bindUser).ExecuteCommand(); - _db.TenantDb.Insertable(new TenantGameAppOpenAccessEntity + UserService.NormalizeNewUser(bindUser); // 补齐 NOT NULL 字符串列默认值 + _db.Db.Insertable(bindUser).ExecuteCommand(); + _db.Db.Insertable(new GameAppOpenAccessEntity { Id = 7802, BindUserId = 7801, Scenario = "ci", Purpose = "unit-test", SubjectName = "unit-test", @@ -190,7 +190,7 @@ private IServiceProvider CreateRequestServices() { var services = new ServiceCollection(); services.AddSingleton(_db.MainDb); - services.AddSingleton(_db.TenantDbProvider); + services.AddSingleton(_db.DbProvider); services.AddScoped(typeof(Repository<>)); return services.BuildServiceProvider(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/PackageBuildReportSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/PackageBuildReportSingleMainTests.cs index 3e7a6898..684260a6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/PackageBuildReportSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/PackageBuildReportSingleMainTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Hub.Api.Controllers; using GameFrameX.Hub.Api.Dto.PackageBuildReport; using Microsoft.AspNetCore.Http; @@ -36,15 +36,15 @@ public async Task Report_WithoutLegacyScope_UpdatesMainDatabaseVersion(string re var result = ClientApiResultReader.Read(await controller.Report(request)); Assert.Equal(0, ClientApiResultReader.Code(result)); - Assert.Equal(1, database.MainDb.Queryable().Count()); - Assert.Equal(1, database.MainDb.Queryable().Count()); + Assert.Equal(1, database.MainDb.Queryable().Count()); + Assert.Equal(1, database.MainDb.Queryable().Count()); if (reportType == "asset") { - Assert.Equal("new-resource", database.MainDb.Queryable().First().ResourceVersion); + Assert.Equal("new-resource", database.MainDb.Queryable().First().ResourceVersion); } else { - Assert.Equal(request.DownloadUrl, database.MainDb.Queryable().First().DownloadUrl); + Assert.Equal(request.DownloadUrl, database.MainDb.Queryable().First().DownloadUrl); } } } @@ -56,7 +56,7 @@ public async Task Report_MissingOrDisabledPackage_IsRejected(bool seedDisabledPa { using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGameAppPackageEntity), typeof(TenantGameAppAssetPackageVersionEntity), typeof(TenantGameAppReleaseVersionEntity)); + database.InitBusinessTables(typeof(GameAppPackageEntity), typeof(GameAppAssetPackageVersionEntity), typeof(GameAppReleaseVersionEntity)); if (seedDisabledPackage) { var package = database.SeedPackage(1, "com.example.game"); @@ -68,14 +68,14 @@ public async Task Report_MissingOrDisabledPackage_IsRejected(bool seedDisabledPa var result = ClientApiResultReader.Read(await controller.Report(new PackageBuildReportRequest { PackageId = 1, ReportType = "asset" })); Assert.NotEqual(0, ClientApiResultReader.Code(result)); - Assert.Equal(0, database.MainDb.Queryable().Count()); + Assert.Equal(0, database.MainDb.Queryable().Count()); } } private static PackageBuildReportController CreateController(ClientApiTestDb database) { - return new PackageBuildReportController(database.Repository(), - database.Repository(), database.Repository()) + return new PackageBuildReportController(database.Repository(), + database.Repository(), database.Repository()) { ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext() } }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Integration/ClientApiTestHostTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Integration/ClientApiTestHostTests.cs index 6dd046e6..71bda6fb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Integration/ClientApiTestHostTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Integration/ClientApiTestHostTests.cs @@ -22,7 +22,7 @@ public async Task TestHost_AppliesCorsPolicyAndMiddlewareOrder() response.EnsureSuccessStatusCode(); Assert.Equal("*", response.Headers.GetValues("Access-Control-Allow-Origin").Single()); - Assert.Equal(new[] { "TenantResolution", "TenantExpiration", "AppResolution", "Endpoint", }, observedSteps); + Assert.Equal(new[] { "Resolution", "Expiration", "AppResolution", "Endpoint", }, observedSteps); } private static async Task CreateHostAsync(ICollection observedSteps) @@ -50,12 +50,12 @@ private static async Task CreateHostAsync(ICollection observedSte app.UseCors("CorsPolicy"); app.Use(async (context, next) => { - observedSteps.Add("TenantResolution"); + observedSteps.Add("Resolution"); await next(); }); app.Use(async (context, next) => { - observedSteps.Add("TenantExpiration"); + observedSteps.Add("Expiration"); await next(); }); app.Use(async (context, next) => diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/DiffLogCredentialRedactionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/DiffLogCredentialRedactionTests.cs index fecc100b..69b5c835 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/DiffLogCredentialRedactionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/DiffLogCredentialRedactionTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.System; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.Logging; @@ -29,10 +29,10 @@ public async Task CredentialChanges_RedactAllAuditSnapshotsAndBoundParameters() using (var scope = new SqlSugarScope(configuration)) { var database = scope.GetConnectionScope("main"); - database.CodeFirst.InitTables(); + database.CodeFirst.InitTables(); typeof(SqlSugarSetup).GetMethod("SetDbDiffLog", BindingFlags.NonPublic | BindingFlags.Static)! .Invoke(null, new object[] { database, configuration }); - await database.InsertWithDiffLogAsync(new TenantSessionKeyEntity { Id = 91, Kid = "audit-key", Secret = plain, Remark = "audit" }); + await database.InsertWithDiffLogAsync(new SessionKeyEntity { Id = 91, Kid = "audit-key", Secret = plain, Remark = "audit" }); var row = Assert.Single(await database.Queryable().ToListAsync()); var snapshots = string.Join("|", row.BeforeData, row.AfterData, row.Snapshot, row.BusinessData, row.Sql, row.Parameters); Assert.DoesNotContain(plain, snapshots); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPagePostgresTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPagePostgresTests.cs index 835e94a9..b67dfa07 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPagePostgresTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPagePostgresTests.cs @@ -29,9 +29,9 @@ public async Task SortedPageAndExport_IncludeCurrentAndHistoricalLogs(bool super using (var scope = new SqlSugarScope(postgres!.BuildDbConfig("main", false))) { var database = scope.GetConnectionScope("main"); - database.CodeFirst.InitTables(); + database.CodeFirst.InitTables(); database.Insertable(CreateLog(1, 100, "current-admin")).ExecuteCommand(); - database.Insertable(CreateLog(2, 50, "historical-admin")).ExecuteCommand(); + database.Insertable(CreateLog(2, 50, "historical-admin")).ExecuteCommand(); var administrator = new SystemUserEntity { Id = 999, Account = "root-account", AccountType = AccountTypeEnum.SuperAdmin, IsDeleted = true }; foreach (var property in administrator.GetType().GetProperties().Where(property => property.PropertyType == typeof(string) && property.CanWrite && property.GetValue(administrator) == null)) { @@ -43,7 +43,7 @@ public async Task SortedPageAndExport_IncludeCurrentAndHistoricalLogs(bool super rootRow.CreatedId = 999; rootRow.Message = "root-private-record"; database.Insertable(rootRow).ExecuteCommand(); - var loginRow = CreateLog(4, 20, "superadmin"); + var loginRow = CreateLog(4, 20, "superadmin"); loginRow.CreatedId = 0; loginRow.Message = "root-login-private-record"; database.Insertable(loginRow).ExecuteCommand(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPageSearchKeyFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPageSearchKeyFilterTests.cs index af25d612..262e1c59 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPageSearchKeyFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/LogPageSearchKeyFilterTests.cs @@ -38,13 +38,13 @@ public LogPageSearchKeyFilterTests() _db.CodeFirst.InitTables( typeof(GameFrameX.Entity.System.SystemUserEntity), typeof(SystemLogVisitEntity), - typeof(TenantLogVisitEntity), + typeof(LogVisitEntity), typeof(SystemLogOperationEntity), - typeof(TenantLogOperationEntity), + typeof(LogOperationEntity), typeof(SystemLogExceptionEntity), - typeof(TenantLogExceptionEntity), + typeof(LogExceptionEntity), typeof(SystemLogDiffEntity), - typeof(TenantLogDiffEntity)); + typeof(LogDiffEntity)); } public void Dispose() @@ -111,14 +111,14 @@ public async Task VisitLog_SearchKey_TrimsWhitespace() [Fact] public async Task OperationLog_SearchKey_MatchesRequestUrlAndMessage() { - await SeedOperationAsync("GET", "/api/tenantUser/page", "user list", "ok"); - await SeedOperationAsync("POST", "/api/tenantUser/add", "user create", "ok"); + await SeedOperationAsync("GET", "/api/user/page", "user list", "ok"); + await SeedOperationAsync("POST", "/api/user/add", "user create", "ok"); await SeedOperationAsync("GET", "/api/globalDictionary/page", "dict list", "ok"); var service = BuildOperationService(); // 命中 RequestUrl - var byUrl = await service.PageAsync(new PageLogRequest { Page = 1, PageSize = 20, SearchKey = "tenantUser", }); + var byUrl = await service.PageAsync(new PageLogRequest { Page = 1, PageSize = 20, SearchKey = "user", }); Assert.Equal(2, byUrl.Total); // 命中 Message @@ -207,10 +207,10 @@ public async Task EveryAccount_SeesCurrentAndHistoricalLogs_AndClearsBoth(bool s await SeedOperationAsync("POST", "/current", "current operation", "200"); await SeedExceptionAsync("POST", "/current", "current exception"); await SeedDiffAsync("Insert", "current SQL", "before"); - await _db.Insertable(new TenantLogVisitEntity { Id = 100, Account = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); - await _db.Insertable(new TenantLogOperationEntity { Id = 100, Message = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); - await _db.Insertable(new TenantLogExceptionEntity { Id = 100, Message = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); - await _db.Insertable(new TenantLogDiffEntity { Id = 100, DiffType = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); + await _db.Insertable(new LogVisitEntity { Id = 100, Account = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); + await _db.Insertable(new LogOperationEntity { Id = 100, Message = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); + await _db.Insertable(new LogExceptionEntity { Id = 100, Message = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); + await _db.Insertable(new LogDiffEntity { Id = 100, DiffType = "historical", CreatedTime = 1 }).ExecuteCommandAsync(); var context = BuildContext(superAdmin); var visits = new LogVisitService(new() { Context = _db }, new() { Context = _db }, context); var operations = new LogOperationService(new() { Context = _db }, new() { Context = _db }, context); @@ -324,7 +324,7 @@ await _db.Insertable(new[] new SystemLogOperationEntity { Id = 503, Account = "operator", CreatedId = 2001, Message = "{\"Password\":\"" + plain + "\",\"AccessToken\":\"" + plain + "\"}" }, new SystemLogOperationEntity { Id = 504, Account = "renamed-account", CreatedId = 999, Message = "root-id-record" }, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantLogOperationEntity { Id = 601, Account = "renamed-root", CreatedId = 0, Message = "historical-root-login-record" }).ExecuteCommandAsync(); + await _db.Insertable(new LogOperationEntity { Id = 601, Account = "renamed-root", CreatedId = 0, Message = "historical-root-login-record" }).ExecuteCommandAsync(); var service = new LogOperationService(new() { Context = _db }, new() { Context = _db }, BuildContext(false)); var page = await service.PageAsync(new PageLogRequest { Page = 1, PageSize = 20 }); var own = Assert.Single(page.Items); @@ -355,29 +355,29 @@ await _db.Insertable(new[] private LogVisitService BuildVisitService() { var systemRepo = new SqlSugarRepository { Context = _db }; - var tenantRepo = new SqlSugarRepository { Context = _db }; - return new LogVisitService(systemRepo, tenantRepo, BuildContext()); + var repo = new SqlSugarRepository { Context = _db }; + return new LogVisitService(systemRepo, repo, BuildContext()); } private LogOperationService BuildOperationService() { var systemRepo = new SqlSugarRepository { Context = _db }; - var tenantRepo = new SqlSugarRepository { Context = _db }; - return new LogOperationService(systemRepo, tenantRepo, BuildContext()); + var repo = new SqlSugarRepository { Context = _db }; + return new LogOperationService(systemRepo, repo, BuildContext()); } private LogExceptionService BuildExceptionService() { var systemRepo = new SqlSugarRepository { Context = _db }; - var tenantRepo = new SqlSugarRepository { Context = _db }; - return new LogExceptionService(systemRepo, tenantRepo, BuildContext()); + var repo = new SqlSugarRepository { Context = _db }; + return new LogExceptionService(systemRepo, repo, BuildContext()); } private LogDiffService BuildDiffService() { var systemRepo = new SqlSugarRepository { Context = _db }; - var tenantRepo = new SqlSugarRepository { Context = _db }; - return new LogDiffService(systemRepo, tenantRepo, BuildContext()); + var repo = new SqlSugarRepository { Context = _db }; + return new LogDiffService(systemRepo, repo, BuildContext()); } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs index 5d43e272..f52a0ca2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs @@ -14,7 +14,7 @@ using GameFrameX.Core.Service.Cache; using GameFrameX.Core.Service.Config; using GameFrameX.Core.Service.PlatformLogging; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.System; using GameFrameX.Entity; @@ -44,9 +44,9 @@ namespace GameFrameX.Core.Tests.Logging; public sealed class MonitorLoggingPipelineTests : IAsyncLifetime { private const string MainConfigId = "main"; - private const string TenantConfigId = "1001"; + private const string ConfigId = "1001"; private const string SuperAdminIdentity = "superadmin"; - private const string TenantIdentity = "tenant"; + private const string Identity = "tenant"; private const string AnonymousIdentity = "anonymous"; private const string TestSchemaName = "TestScheme"; @@ -65,8 +65,8 @@ public async Task InitializeAsync() { SqlSugarCache.Configure(new FakeCache()); var mainConfig = CreateDbConfig(MainConfigId); - var tenantConfig = CreateDbConfig(TenantConfigId); - _db = new SqlSugarScope(new List { mainConfig, tenantConfig, }); + var config = CreateDbConfig(ConfigId); + _db = new SqlSugarScope(new List { mainConfig, config, }); SqlSugarSetup.InitDatabase(_db, mainConfig, new[] { typeof(SystemLogOperationEntity), @@ -74,13 +74,13 @@ public async Task InitializeAsync() typeof(SystemLogExceptionEntity), typeof(SystemConfigEntity), typeof(SystemUserEntity), - typeof(TenantLogOperationEntity), + typeof(LogOperationEntity), }); - SqlSugarSetup.InitDatabase(_db, tenantConfig, new[] + SqlSugarSetup.InitDatabase(_db, config, new[] { - typeof(TenantLogOperationEntity), - typeof(TenantLogVisitEntity), - typeof(TenantLogExceptionEntity), + typeof(LogOperationEntity), + typeof(LogVisitEntity), + typeof(LogExceptionEntity), }); _db.GetConnectionScope(MainConfigId).Aop.DataExecuting = SqlSugarAopHelper.HandleBaseAudit; await SeedSysOpLogEnabledAsync(); @@ -160,35 +160,35 @@ public async Task Page_WithSuperAdminIdentity_WritesCompleteOperationRowToMainDa } /// - /// 验收 5(C156):租户上下文操作日志路由到租户库 TenantLog*,主库不落任何该调用行。 + /// 验收 5(C156):租户上下文操作日志路由到租户库 Log*,主库不落任何该调用行。 /// [Fact] public async Task Page_WithUserIdentity_WritesOperationRowToMainDatabase() { - var statusCode = await PostAsync("/api/monitorPipeline/page", TenantIdentity, "{\"keyword\":\"tenant-query\"}"); + var statusCode = await PostAsync("/api/monitorPipeline/page", Identity, "{\"keyword\":\"query\"}"); Assert.Equal(HttpStatusCode.OK, statusCode); - var tenantDb = _db.GetConnectionScope(MainConfigId); - var tenantRows = await tenantDb.Queryable() + var db = _db.GetConnectionScope(MainConfigId); + var rows = await db.Queryable() .Where(u => u.RequestUrl.Contains("/api/monitorPipeline/page")) .ToListAsync(); - var row = Assert.Single(tenantRows); - Assert.Null(row.TenantId); - Assert.Equal("tenant-admin", row.Account); + var row = Assert.Single(rows); + Assert.Null(row.Id); + Assert.Equal("admin", row.Account); Assert.Equal("GetPage", row.ActionName); - Assert.Contains("tenant-query", row.RequestParam); + Assert.Contains("query", row.RequestParam); var context = new CurrentUserContext(new HttpContextAccessor { - HttpContext = new DefaultHttpContext { User = BuildTestPrincipal(TenantIdentity) }, + HttpContext = new DefaultHttpContext { User = BuildTestPrincipal(Identity) }, }); - var service = new LogOperationService(new() { Context = tenantDb }, new() { Context = tenantDb }, context); - var page = await service.PageAsync(new PageLogRequest { Page = 1, PageSize = 20, SearchKey = "tenant-admin" }); + var service = new LogOperationService(new() { Context = db }, new() { Context = db }, context); + var page = await service.PageAsync(new PageLogRequest { Page = 1, PageSize = 20, SearchKey = "admin" }); Assert.Equal(row.Id, Assert.Single(page.Items).Id); var mainDb = _db.GetConnectionScope(MainConfigId); Assert.Single(await mainDb.Queryable().Where(u => u.RequestUrl.Contains("/api/monitorPipeline/page")).ToListAsync()); - Assert.Empty(await tenantDb.Queryable().Where(u => u.ActionName == "GetPage").ToListAsync()); + Assert.Empty(await db.Queryable().Where(u => u.ActionName == "GetPage").ToListAsync()); } /// @@ -225,17 +225,17 @@ public async Task FailCall_WritesExceptionRowWithExceptionFilled() [Fact] public async Task UserInfoAndLogout_WriteVisitRowsOnly() { - var userInfoStatus = await PostAsync("/api/monitorPipeline/userInfo", TenantIdentity, "{}"); + var userInfoStatus = await PostAsync("/api/monitorPipeline/userInfo", Identity, "{}"); var logoutStatus = await PostAsync("/api/monitorPipeline/logout", AnonymousIdentity, "{}"); Assert.Equal(HttpStatusCode.OK, userInfoStatus); Assert.Equal(HttpStatusCode.OK, logoutStatus); - var tenantDb = _db.GetConnectionScope(MainConfigId); - var tenantVisitRows = await tenantDb.Queryable().Where(u => u.ActionName == "GetUserInfo").ToListAsync(); - Assert.Single(tenantVisitRows); - Assert.Null(tenantVisitRows[0].TenantId); - Assert.Equal("tenant-admin", tenantVisitRows[0].Account); + var db = _db.GetConnectionScope(MainConfigId); + var visitRows = await db.Queryable().Where(u => u.ActionName == "GetUserInfo").ToListAsync(); + Assert.Single(visitRows); + Assert.Null(visitRows[0].Id); + Assert.Equal("admin", visitRows[0].Account); var mainDb = _db.GetConnectionScope(MainConfigId); var mainVisitRows = await mainDb.Queryable().Where(u => u.ActionName == "Logout").ToListAsync(); @@ -243,7 +243,7 @@ public async Task UserInfoAndLogout_WriteVisitRowsOnly() Assert.True(mainVisitRows[0].LogDateTime > 0, "visit 行 LogDateTime 必须写入"); // visit 不落 operation / exception - Assert.Empty(await tenantDb.Queryable().Where(u => u.RequestUrl.Contains("/api/monitorPipeline/userInfo")).ToListAsync()); + Assert.Empty(await db.Queryable().Where(u => u.RequestUrl.Contains("/api/monitorPipeline/userInfo")).ToListAsync()); Assert.Empty(await mainDb.Queryable().Where(u => u.RequestUrl.Contains("/api/monitorPipeline/logout")).ToListAsync()); } @@ -257,11 +257,11 @@ public async Task SuppressMonitor_DoesNotWriteAnyRow() Assert.Equal(HttpStatusCode.OK, statusCode); var mainDb = _db.GetConnectionScope(MainConfigId); - var tenantDb = _db.GetConnectionScope(MainConfigId); + var db = _db.GetConnectionScope(MainConfigId); Assert.Empty(await mainDb.Queryable().Where(u => u.RequestUrl.Contains("/api/monitorPipeline/suppressed")).ToListAsync()); Assert.Empty(await mainDb.Queryable().Where(u => u.ActionName == "Suppressed").ToListAsync()); Assert.Empty(await mainDb.Queryable().Where(u => u.RequestUrl.Contains("/api/monitorPipeline/suppressed")).ToListAsync()); - Assert.Empty(await tenantDb.Queryable().ToListAsync()); + Assert.Empty(await db.Queryable().ToListAsync()); } /// @@ -343,34 +343,34 @@ public async Task FileLogging_WritesMonitorJsonLinesPerDayAndLevel() [InlineData("systemAuth/setupSuperAdminPassword", "ConfirmPassword")] [InlineData("systemAuth/refreshToken", "accessToken")] [InlineData("swagger/submitUrl", "Password")] - [InlineData("tenantUser/changePwd", "PasswordOld")] - [InlineData("tenantUser/resetPwd", "NewPassword")] - [InlineData("tenantUser/add", "initialPassword")] - [InlineData("tenantUser/update", "Password")] - [InlineData("tenantUser/baseInfo", "Password")] - [InlineData("tenantSessionKeyEntity/add", "Secret")] - [InlineData("tenantSessionKeyEntity/rotate", "Secret")] - [InlineData("tenantAppSignatureKeyEntity/add", "Secret")] - [InlineData("tenantAppSignatureKeyEntity/rotate", "Secret")] - [InlineData("tenantGameLoginTicketKeyEntity/rotate", "PrivateKey")] - [InlineData("tenantGameAppOpenAccess/add", "AccessSecret")] - [InlineData("tenantGameAppOpenAccess/refresh", "AccessSecret")] + [InlineData("user/changePwd", "PasswordOld")] + [InlineData("user/resetPwd", "NewPassword")] + [InlineData("user/add", "initialPassword")] + [InlineData("user/update", "Password")] + [InlineData("user/baseInfo", "Password")] + [InlineData("sessionKeyEntity/add", "Secret")] + [InlineData("sessionKeyEntity/rotate", "Secret")] + [InlineData("appSignatureKeyEntity/add", "Secret")] + [InlineData("appSignatureKeyEntity/rotate", "Secret")] + [InlineData("gameLoginTicketKeyEntity/rotate", "PrivateKey")] + [InlineData("gameAppOpenAccess/add", "AccessSecret")] + [InlineData("gameAppOpenAccess/refresh", "AccessSecret")] [InlineData("systemOpenAccess/add", "AccessSecret")] [InlineData("systemOpenAccess/update", "AccessSecret")] [InlineData("systemOpenAccess/createSecret", "Secret")] - [InlineData("tenantClientApiPolicyEntity/add", "SigningKey")] - [InlineData("tenantClientApiPolicyEntity/update", "SigningKey")] - [InlineData("tenantClientApiPolicyEntity/rotate", "SigningKey")] + [InlineData("clientApiPolicyEntity/add", "SigningKey")] + [InlineData("clientApiPolicyEntity/update", "SigningKey")] + [InlineData("clientApiPolicyEntity/rotate", "SigningKey")] [InlineData("platformJwtConfig/update", "IssuerSigningKey")] [InlineData("systemEmailProvider/add", "Password")] [InlineData("systemEmailProvider/update", "SecretKey")] - [InlineData("tenantAdvertisementCallbackConfigEntity/add", "SigningSecret")] - [InlineData("tenantAdvertisementCallbackConfigEntity/update", "VerificationKeys")] - [InlineData("tenantGameUserEntity/add", "Password")] - [InlineData("tenantGameUserEntity/update", "Password")] - [InlineData("tenantGameUserEntity/addByMail", "EmailPassword")] - [InlineData("tenantGameAreaClassifyEntity/add", "DockerPassword")] - [InlineData("tenantGameAreaClassifyEntity/update", "DockerPassword")] + [InlineData("advertisementCallbackConfigEntity/add", "SigningSecret")] + [InlineData("advertisementCallbackConfigEntity/update", "VerificationKeys")] + [InlineData("gameUserEntity/add", "Password")] + [InlineData("gameUserEntity/update", "Password")] + [InlineData("gameUserEntity/addByMail", "EmailPassword")] + [InlineData("gameAreaClassifyEntity/add", "DockerPassword")] + [InlineData("gameAreaClassifyEntity/update", "DockerPassword")] public async Task CredentialEndpointSnapshot_NeverPersistsRequestOrResponseCredentials(string endpoint, string field) { var plain = "unique-credential-material-12345"; @@ -540,12 +540,12 @@ private static ClaimsPrincipal BuildTestPrincipal(string identity) claims.Add(new Claim(ClaimConst.UserId, "1")); claims.Add(new Claim(ClaimConst.AccountType, ((int)AccountTypeEnum.SuperAdmin).ToString())); } - else if (identity == TenantIdentity) + else if (identity == Identity) { - claims.Add(new Claim(ClaimConst.Account, "tenant-admin")); - claims.Add(new Claim(ClaimConst.RealName, "租户管理员")); + claims.Add(new Claim(ClaimConst.Account, "admin")); + claims.Add(new Claim(ClaimConst.RealName, "管理员角色")); claims.Add(new Claim(ClaimConst.UserId, "2001")); - claims.Add(new Claim("TenantId", TenantConfigId)); + claims.Add(new Claim("Id", ConfigId)); claims.Add(new Claim(ClaimConst.AccountType, ((int)AccountTypeEnum.NormalUser).ToString())); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/SensitiveLogRedactorTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/SensitiveLogRedactorTests.cs index 2d3f2b19..8db5dca3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/SensitiveLogRedactorTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/SensitiveLogRedactorTests.cs @@ -70,7 +70,7 @@ public void HistoricalAuditColumnDescriptor_MasksOldAndNewValues(string descript [Fact] public void EndpointMetadataAndOrdinaryParameters_RemainReadable() { - const string value = "{\"ControllerName\":\"TenantSessionKeyEntity\",\"ActionName\":\"SetupSuperAdminPassword\",\"Keyword\":\"ordinary\"}"; + const string value = "{\"ControllerName\":\"SessionKeyEntity\",\"ActionName\":\"SetupSuperAdminPassword\",\"Keyword\":\"ordinary\"}"; Assert.Equal(value, SensitiveLogRedactor.Redact(value)); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignEntityServiceContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignEntityServiceContractTests.cs index 5ccd70c9..659bbab0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignEntityServiceContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignEntityServiceContractTests.cs @@ -35,7 +35,7 @@ public void Service_Exposes_Required_Crud_And_Campaign_Actions() [Fact] public void PageInput_Carries_Required_Filter_Fields() { - var props = PropNames(); + var props = PropNames(); Assert.DoesNotContain("AppId", props); Assert.Contains("AreaId", props); @@ -49,7 +49,7 @@ public void PageInput_Carries_Required_Filter_Fields() [Fact] public void AddInput_Carries_Server_Contract_Fields() { - var props = PropNames(); + var props = PropNames(); Assert.DoesNotContain("AppId", props); Assert.Contains("AreaId", props); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignServerClientTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignServerClientTests.cs index 93850867..eabddf41 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignServerClientTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignServerClientTests.cs @@ -2,7 +2,7 @@ using System.Text.Json; using GameFrameX.Application.ServerCenter.Mail; using GameFrameX.Entity.Game.Mail; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; @@ -226,9 +226,9 @@ private static MailCampaignServerClient CreateClient(FakeHandler handler) return new MailCampaignServerClient(httpClient); } - private static TenantGameAreaEntity CreateArea(string httpManageUrl = HttpManageUrl, string fulfillmentPrefix = "game/api") + private static GameAreaEntity CreateArea(string httpManageUrl = HttpManageUrl, string fulfillmentPrefix = "game/api") { - return new TenantGameAreaEntity + return new GameAreaEntity { HttpManageUrl = httpManageUrl, FulfillmentApiPrefix = fulfillmentPrefix, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs index 30bb8c2f..0f3f0fce 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Core.Option; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; using SqlSugar; using GameFrameX.Core.Extension; @@ -25,11 +25,11 @@ public ObjectStorageActiveConfigConcurrencyTests() [Fact] public async Task ConcurrentEnableTransitions_WithSerialLock_LeaveExactlyOneEnabled() { - var tenantId = 1300000000001L; - var db = OpenTenantDb(tenantId); + var id = 1300000000001L; + var db = OpenDb(id); // 预置 1 条启用配置 - var seed = DefaultTenantDatabaseSeeder.BuildDefaultObjectStorageConfig(); + var seed = DefaultDatabaseSeeder.BuildDefaultObjectStorageConfig(); db.Insertable(seed).ExecuteCommand(); // 复刻 service 的串行纪律:SemaphoreSlim(1,1) 包裹“停用其它 + 写当前启用”事务 @@ -37,7 +37,7 @@ public async Task ConcurrentEnableTransitions_WithSerialLock_LeaveExactlyOneEnab var tasks = Enumerable.Range(0, 8).Select(i => Task.Run(async () => { var newId = 2000000000000L + i; - var entity = DefaultTenantDatabaseSeeder.BuildDefaultObjectStorageConfig(); + var entity = DefaultDatabaseSeeder.BuildDefaultObjectStorageConfig(); entity.Id = newId; entity.Remark = "concurrent-" + i; @@ -46,8 +46,8 @@ public async Task ConcurrentEnableTransitions_WithSerialLock_LeaveExactlyOneEnab { db.Ado.UseTran(() => { - db.Updateable() - .SetColumns(e => new TenantObjectStorageConfigEntity { IsEnabled = false, }) + db.Updateable() + .SetColumns(e => new ObjectStorageConfigEntity { IsEnabled = false, }) .Where(e => e.IsEnabled == true && e.Id != newId) .ExecuteCommand(); db.Insertable(entity).ExecuteCommand(); @@ -60,52 +60,52 @@ public async Task ConcurrentEnableTransitions_WithSerialLock_LeaveExactlyOneEnab })).ToArray(); await Task.WhenAll(tasks); - var enabledCount = db.Queryable().Count(e => e.IsEnabled == true); + var enabledCount = db.Queryable().Count(e => e.IsEnabled == true); Assert.Equal(1, enabledCount); } [Fact] public void DeactivateOthers_Mechanism_LeavesOnlyCurrentEnabled() { - var tenantId = 1300000000002L; - var db = OpenTenantDb(tenantId); + var id = 1300000000002L; + var db = OpenDb(id); - var first = DefaultTenantDatabaseSeeder.BuildDefaultObjectStorageConfig(); + var first = DefaultDatabaseSeeder.BuildDefaultObjectStorageConfig(); db.Insertable(first).ExecuteCommand(); // 切换:停用其它 + 写当前启用 var newId = 999L; - db.Updateable() - .SetColumns(e => new TenantObjectStorageConfigEntity { IsEnabled = false, }) + db.Updateable() + .SetColumns(e => new ObjectStorageConfigEntity { IsEnabled = false, }) .Where(e => e.IsEnabled == true && e.Id != newId) .ExecuteCommand(); - var fresh = DefaultTenantDatabaseSeeder.BuildDefaultObjectStorageConfig(); + var fresh = DefaultDatabaseSeeder.BuildDefaultObjectStorageConfig(); fresh.Id = newId; db.Insertable(fresh).ExecuteCommand(); - var enabledCount = db.Queryable().Count(e => e.IsEnabled == true); - var firstEnabled = db.Queryable().First(e => e.Id == first.Id).IsEnabled; + var enabledCount = db.Queryable().Count(e => e.IsEnabled == true); + var firstEnabled = db.Queryable().First(e => e.Id == first.Id).IsEnabled; Assert.Equal(1, enabledCount); Assert.False(firstEnabled == true); } - private ISqlSugarClient OpenTenantDb(long tenantId) + private ISqlSugarClient OpenDb(long id) { - var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_active_config_{tenantId}_{Guid.NewGuid():N}.db"); + var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_active_config_{id}_{Guid.NewGuid():N}.db"); _dbPaths.Add(dbPath); - var tenantConfig = new DbConnectionConfig + var config = new DbConnectionConfig { - ConfigId = tenantId.ToString(), + ConfigId = id.ToString(), DbType = DbType.Sqlite, ConnectionString = $"DataSource={dbPath}", DbSettings = new DbSettings { EnableInitDb = true, }, TableSettings = new TableSettings { EnableInitTable = true, EnableIncreTable = false, }, SeedSettings = new SeedSettings { EnableInitSeed = false, EnableIncreSeed = false, }, }; - SqlSugarUnifiedConfig.ConfigureBaseSettings(tenantConfig); - var scope = new SqlSugarScope(tenantConfig); - var db = scope.GetConnectionScope(tenantId.ToString()); - db.CodeFirst.InitTables(typeof(TenantObjectStorageConfigEntity)); + SqlSugarUnifiedConfig.ConfigureBaseSettings(config); + var scope = new SqlSugarScope(config); + var db = scope.GetConnectionScope(id.ToString()); + db.CodeFirst.InitTables(typeof(ObjectStorageConfigEntity)); return db; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigGuardTests.cs index f72833cb..5527d759 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigGuardTests.cs @@ -1,13 +1,13 @@ using GameFrameX.Core.Service.File; -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; namespace GameFrameX.Core.Tests.ObjectStorage; /// -/// TenantFileService.EnsureSingleActiveConfig 守卫单测(P1-1)。 +/// FileService.EnsureSingleActiveConfig 守卫单测(P1-1)。 /// 验证上传 Resolver 在 0/多/单 三种活动配置状态下的分支行为,确保唯一活动配置不变量被违反时抛错而非静默取首条。 /// 注:守卫内部用 历史框架 BusinessError.Oh 抛友好异常,无 历史框架 host 的纯单测下会触发 Friendly -/// 静态初始化异常,因此本测试只断言“抛/不抛”,消息文本正确性由 code review 把关(见 TenantFileService.EnsureSingleActiveConfig)。 +/// 静态初始化异常,因此本测试只断言“抛/不抛”,消息文本正确性由 code review 把关(见 FileService.EnsureSingleActiveConfig)。 /// public class ObjectStorageActiveConfigGuardTests { @@ -15,34 +15,34 @@ public class ObjectStorageActiveConfigGuardTests public void EnsureSingleActiveConfig_Null_Throws() { #pragma warning disable CS8625 // 测试意图:传入 null 列表验证守卫抛异常 - Assert.ThrowsAny(() => TenantFileService.EnsureSingleActiveConfig(null)); + Assert.ThrowsAny(() => FileService.EnsureSingleActiveConfig(null)); #pragma warning restore CS8625 } [Fact] public void EnsureSingleActiveConfig_Empty_Throws() { - Assert.ThrowsAny(() => TenantFileService.EnsureSingleActiveConfig(new List())); + Assert.ThrowsAny(() => FileService.EnsureSingleActiveConfig(new List())); } [Fact] public void EnsureSingleActiveConfig_Multiple_Throws() { - var list = new List + var list = new List { new() { Id = 1, Provider = "local", }, new() { Id = 2, Provider = "aliyun", }, }; - Assert.ThrowsAny(() => TenantFileService.EnsureSingleActiveConfig(list)); + Assert.ThrowsAny(() => FileService.EnsureSingleActiveConfig(list)); } [Fact] public void EnsureSingleActiveConfig_Single_ReturnsIt() { - var single = new TenantObjectStorageConfigEntity { Id = 7, Provider = "local", }; + var single = new ObjectStorageConfigEntity { Id = 7, Provider = "local", }; - var result = TenantFileService.EnsureSingleActiveConfig(new List { single, }); + var result = FileService.EnsureSingleActiveConfig(new List { single, }); Assert.Same(single, result); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetAuditQueryServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetAuditQueryServiceTests.cs index 29c40594..2a9cb007 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetAuditQueryServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetAuditQueryServiceTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Application.ServerCenter.Online; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; // S3/C401 断链修复点 @@ -31,7 +31,7 @@ public OnlineAssetAuditQueryServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -114,7 +114,7 @@ public async Task PageAsync_RejectsNonexistentServer_BeforeAnyOnlineCall() private OnlineAssetAuditQueryService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlineAssetAuditQueryService(onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetGrantCommandServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetGrantCommandServiceTests.cs index bf2064a4..9a9b99ac 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetGrantCommandServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetGrantCommandServiceTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Application.ServerCenter.Online; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; // S3/C401 断链修复点 @@ -33,7 +33,7 @@ public OnlineAssetGrantCommandServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -285,7 +285,7 @@ public async Task GrantAsync_RejectsNonexistentServer_BeforeAnyOnlineCall() private OnlineAssetGrantCommandService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlineAssetGrantCommandService(onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetLedgerQueryServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetLedgerQueryServiceTests.cs index ecda75d0..a4426765 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetLedgerQueryServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetLedgerQueryServiceTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Application.ServerCenter.Online; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; // S3/C401 断链修复点 @@ -32,7 +32,7 @@ public OnlineAssetLedgerQueryServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -140,7 +140,7 @@ public async Task PageAsync_RejectsMissingScope() private OnlineAssetLedgerQueryService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlineAssetLedgerQueryService(onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs index 59ee09e3..5dd20e70 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Core.Tests.Online.Asset; -// C340 / GFX-752 菜单 seed 结构自检(vault:C4 + C324 受众前缀化守护 + 高危按钮 TenantAdmin 独占): +// C340 / GFX-752 菜单 seed 结构自检(vault:C4 + C324 受众前缀化守护 + 高危按钮 Admin 独占): // 在线平台容器 + 三页面 + 五按钮(页面查询 ×3 + grant/revoke ×2 高危)。 // 本测试在 psql 不可用的环境(CI / 本机离线)下提供结构断言兜底;正式仓库以 psql 实测为铁证。 public sealed class OnlineAssetMenuSeedTests @@ -49,7 +49,7 @@ public void OnlineAssetMenus_Pages_UseOnlineOperationsPathsAndMatchLedgerSpec( } [Fact] - public void OnlineAssetMenus_HighRiskButtons_AreTenantAdminOnly() + public void OnlineAssetMenus_HighRiskButtons_AreAdminOnly() { var menus = GlobalMenuSeedData.BuildData(); var grant = Assert.Single(menus, m => m.Key == "onlineWalletLedger:grant"); @@ -60,7 +60,7 @@ public void OnlineAssetMenus_HighRiskButtons_AreTenantAdminOnly() Assert.Equal("onlineAssetGrantCommand:grant", grant.Permission); Assert.Equal("人工发放", grant.Title); Assert.Equal(200, grant.OrderNo); - // 高危:仅 TenantAdmin 可见可执行;OpsManager 排除。 + // 高危:仅 Admin 可见可执行;OpsManager 排除。 Assert.Equal(MenuTypeEnum.Button, revoke.Type); Assert.Equal(StableSeedId.Menu("route:onlineWalletLedger"), revoke.Pid); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs index 8fbfdb02..bc48723b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs @@ -2,7 +2,7 @@ using GameFrameX.Core.Const; using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -10,13 +10,13 @@ namespace GameFrameX.Core.Tests.Online.Asset; // C340 / GFX-752(vault:C4)资产域 Service 单测共享基座:SQLite 专属 ConfigId 隔离 + IOnlineServerClient fake + -// TenantGameApp/Area 作用域种子 + 当前用户上下文构造。各 Service 测试只关心断言本身,不重复构造基座。 +// GameApp/Area 作用域种子 + 当前用户上下文构造。各 Service 测试只关心断言本身,不重复构造基座。 // // C283 命名对齐守护:本文件以「共享基座」单一类型 `OnlineAssetTestSupport` 立名; // IOnlineServerClient fake 与 OnlineCall 记录类都内嵌为私有嵌套类型,避免平级多类型破规。 internal static class OnlineAssetTestSupport { - public const long TenantA = 4001; + public const long A = 4001; public const long App100 = 100; public const long Area1001 = 2001; public const long Area1002 = 2002; @@ -63,18 +63,18 @@ internal sealed record OnlineCall(string Action, object Request, long ServerId); return new SqlSugarRepository { Context = db, }; } - public static CurrentUserContext CreateUserContext(long tenantId = TenantA) + public static CurrentUserContext CreateUserContext(long id = A) { var identity = new global::System.Security.Claims.ClaimsIdentity("TestAuth"); - identity.AddClaim(new global::System.Security.Claims.Claim("TenantId", tenantId.ToString())); + identity.AddClaim(new global::System.Security.Claims.Claim("Id", id.ToString())); var httpContext = new DefaultHttpContext { User = new global::System.Security.Claims.ClaimsPrincipal(identity), }; var accessor = new HttpContextAccessor { HttpContext = httpContext, }; return new CurrentUserContext(accessor); } - public static TenantGameAreaEntity NewArea(long id, long appId, long now) + public static GameAreaEntity NewArea(long id, long appId, long now) { - return new TenantGameAreaEntity + return new GameAreaEntity { Id = id, Name = $"area-{id}", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTransactionQueryServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTransactionQueryServiceTests.cs index 75b7cb69..f0f80f08 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTransactionQueryServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTransactionQueryServiceTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Application.ServerCenter.Online; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; // S3/C401 断链修复点 @@ -32,7 +32,7 @@ public OnlineAssetTransactionQueryServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -125,7 +125,7 @@ public async Task DetailAsync_RejectsNonexistentServer() private OnlineAssetTransactionQueryService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlineAssetTransactionQueryService(onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineAuditSearchServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineAuditSearchServiceTests.cs index bfb9148d..80f63fbf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineAuditSearchServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineAuditSearchServiceTests.cs @@ -7,8 +7,8 @@ using GameFrameX.Entity.Enum; using GameFrameX.Entity.Game.Online; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Online; using SqlSugar; // S3/C401 断链修复点 @@ -44,11 +44,11 @@ public OnlineAuditSearchServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantLogOperationEntity), + typeof(GameAreaEntity), + typeof(LogOperationEntity), typeof(SystemLogOperationEntity), - typeof(TenantGamePenaltyEntity), - typeof(TenantGameOnlineConfigRolloutEntity)); + typeof(GamePenaltyEntity), + typeof(GameOnlineConfigRolloutEntity)); } /// @@ -258,7 +258,7 @@ await _db.Insertable(new SystemLogOperationEntity TraceId = "trace-1", }).ExecuteCommandAsync(); - await _db.Insertable(new TenantLogOperationEntity + await _db.Insertable(new LogOperationEntity { Id = 2, HttpMethod = "POST", @@ -273,7 +273,7 @@ await _db.Insertable(new TenantLogOperationEntity Message = "ok", }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGamePenaltyEntity + await _db.Insertable(new GamePenaltyEntity { AreaId = OnlineAssetTestSupport.Area1001, TargetType = PenaltyTargetTypeEnum.Account, @@ -285,7 +285,7 @@ await _db.Insertable(new TenantGamePenaltyEntity CreatedTime = T2, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameOnlineConfigRolloutEntity + await _db.Insertable(new GameOnlineConfigRolloutEntity { ServerId = OnlineAssetTestSupport.Area1001, ConfigKind = OnlineConfigRolloutKind.RemoteConfig, @@ -303,11 +303,11 @@ await _db.Insertable(new TenantGameOnlineConfigRolloutEntity private OnlineAuditSearchService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlineAuditSearchService( new SqlSugarRepository { Context = _db, }, - OnlineAssetTestSupport.Repository(_db), - OnlineAssetTestSupport.Repository(_db), + OnlineAssetTestSupport.Repository(_db), + OnlineAssetTestSupport.Repository(_db), onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs index 9332c761..269ccf77 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Core.Tests.Online.Console; -// C344 / GFX-760 菜单 seed 结构自检(vault:C9 S8.1 + C324 受众前缀化守护 + 高危按钮 TenantAdmin 独占): +// C344 / GFX-760 菜单 seed 结构自检(vault:C9 S8.1 + C324 受众前缀化守护 + 高危按钮 Admin 独占): // 容器重定向到在线总览首屏 + 控制台三页面 + 四按钮(查询 ×3 + 受控操作 execute 高危)。 // 本测试在 psql 不可用的环境(CI / 本机离线)下提供结构断言兜底;正式仓库以 psql 实测为铁证。 public sealed class OnlineConsoleMenuSeedTests @@ -40,7 +40,7 @@ public void OnlineConsoleMenus_Pages_UseOnlineOperationsPaths( // C403:叶子路径和组件直接使用 gmCenter 前缀。 Assert.Equal(path, page.Path); Assert.Equal(component, page.Component); - // 控制台查询受众:租户管理员 + 运营负责人 + 客服 GM + 数据分析。 + // 控制台查询受众:管理员角色 + 运营负责人 + 客服 GM + 数据分析。 } [Fact] @@ -66,7 +66,7 @@ public void OnlineConsoleMenus_QueryButtons_CarryPermissionMatching_EndpointConv } [Fact] - public void OnlineConsoleMenus_ExecuteButton_IsTenantAdminOnly() + public void OnlineConsoleMenus_ExecuteButton_IsAdminOnly() { var menus = GlobalMenuSeedData.BuildData(); var execute = Assert.Single(menus, m => m.Key == "onlinePlayerTimeline:execute"); @@ -75,6 +75,6 @@ public void OnlineConsoleMenus_ExecuteButton_IsTenantAdminOnly() Assert.Equal(StableSeedId.Menu("route:onlinePlayerTimeline"), execute.Pid); Assert.Equal("onlineControlledCommand:execute", execute.Permission); Assert.Equal("受控操作", execute.Title); - // 高危:仅租户管理员可见可执行(与资产人工发放/撤销按钮口径一致)。 + // 高危:仅管理员角色可见可执行(与资产人工发放/撤销按钮口径一致)。 } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineControlledCommandServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineControlledCommandServiceTests.cs index a23a87f7..6e90f1fd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineControlledCommandServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineControlledCommandServiceTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Core.Tests.Online.Asset; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; // S3/C401 断链修复点 @@ -33,7 +33,7 @@ public OnlineControlledCommandServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -281,7 +281,7 @@ private static OnlineControlledCommandRequest BuildSuspendRequest(ControlledComm private OnlineControlledCommandService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlineControlledCommandService(onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineOverviewQueryServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineOverviewQueryServiceTests.cs index 688597f6..545b9b6a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineOverviewQueryServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineOverviewQueryServiceTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Core.Tests.Online.Asset; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; // S3/C401 断链修复点 @@ -32,7 +32,7 @@ public OnlineOverviewQueryServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -100,7 +100,7 @@ public async Task SnapshotAsync_RejectsNonexistentServer_BeforeAnyOnlineCall() private OnlineOverviewQueryService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlineOverviewQueryService(onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlinePlayerTimelineQueryServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlinePlayerTimelineQueryServiceTests.cs index adcdf46b..7293c6cc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlinePlayerTimelineQueryServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlinePlayerTimelineQueryServiceTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Core.Tests.Online.Asset; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; // S3/C401 断链修复点 @@ -32,7 +32,7 @@ public OnlinePlayerTimelineQueryServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -142,7 +142,7 @@ public async Task QueryAsync_RejectsNonexistentServer_BeforeAnyOnlineCall() private OnlinePlayerTimelineQueryService CreateService(IOnlineServerClient onlineServerClient) { - var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); + var factory = new OnlineScopeContextFactory(OnlineAssetTestSupport.Repository(_db)); return new OnlinePlayerTimelineQueryService(onlineServerClient, factory); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs index ae3b8b08..eeee90ca 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs @@ -10,7 +10,7 @@ using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game.Online; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -23,7 +23,7 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 回滚目标不存在拒绝、下发失败删行重抛(不留半生效审计行)。 public sealed class GameOnlineConfigRolloutServiceTests : IDisposable { - private const long TenantA = 1001; + private const long A = 1001; private const long App100 = 100; private const long Area1001 = 2001; private const long SegmentSynced = 7001; @@ -49,8 +49,8 @@ public GameOnlineConfigRolloutServiceTests() _db.Aop.DataExecuting = (oldValue, entityInfo) => SqlSugarAopHelper.HandleBaseAudit(oldValue, entityInfo); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameOnlineConfigRolloutEntity), - typeof(TenantGameOnlinePlayerSegmentEntity)); + typeof(GameOnlineConfigRolloutEntity), + typeof(GameOnlinePlayerSegmentEntity)); } /// @@ -65,7 +65,7 @@ public async Task PublishAsync_RejectsPercentZeroAndBeyondHundred() await Assert.ThrowsAsync(() => service.PublishAsync(NewPublish(0))); await Assert.ThrowsAsync(() => service.PublishAsync(NewPublish(101))); - Assert.Equal(0, await _db.Queryable().CountAsync()); + Assert.Equal(0, await _db.Queryable().CountAsync()); } /// @@ -86,7 +86,7 @@ public async Task PublishAsync_AcceptsBoundariesOneAndHundred_AndVersionsIncreme Assert.Equal("cv-publish", second.OnlineConfirmVersion); // fake 回执回写 // 旧生效行被替代:v1 → RolledBack,v2 为唯一生效行 - var rows = await _db.Queryable().OrderBy(u => u.ConfigVersion).ToListAsync(); + var rows = await _db.Queryable().OrderBy(u => u.ConfigVersion).ToListAsync(); Assert.Equal(2, rows.Count); Assert.Equal(OnlineConfigRolloutStatus.RolledBack, rows[0].Status); Assert.Equal(OnlineConfigRolloutStatus.Published, rows[1].Status); @@ -147,7 +147,7 @@ public async Task RollbackAsync_CreatesVersionedRowPointingAtTarget() Assert.Equal(OnlineConfigRolloutStatus.Published, rollback.Status); Assert.Equal("cv-rollback", rollback.OnlineConfirmVersion); - var rows = await _db.Queryable().OrderBy(u => u.ConfigVersion).ToListAsync(); + var rows = await _db.Queryable().OrderBy(u => u.ConfigVersion).ToListAsync(); Assert.Equal(3, rows.Count); Assert.All(rows.Take(2), row => Assert.Equal(OnlineConfigRolloutStatus.RolledBack, row.Status)); // v1、v2 均被替代 Assert.Equal(OnlineConfigRolloutStatus.Published, rows[2].Status); // v3 唯一生效 @@ -182,7 +182,7 @@ public async Task PublishAsync_DispatchFailureDeletesRowAndRethrows() await Assert.ThrowsAsync(() => service.PublishAsync(NewPublish(50))); - Assert.Equal(0, await _db.Queryable().CountAsync()); + Assert.Equal(0, await _db.Queryable().CountAsync()); // 失败重试:版本号未被污染,仍从 1 起 _dispatch.FailNextPublish = false; var retry = await service.PublishAsync(NewPublish(50)); @@ -217,18 +217,18 @@ private RollbackConfigRolloutRequest NewRollback(int targetVersion) private GameOnlineConfigRolloutService CreateService() { return new GameOnlineConfigRolloutService( - Repository(), - Repository(), + Repository(), + Repository(), _dispatch, - CreateUserContext(TenantA)); + CreateUserContext(A)); } - private static CurrentUserContext CreateUserContext(long? tenantId) + private static CurrentUserContext CreateUserContext(long? id) { var identity = new ClaimsIdentity("TestAuth"); - if (tenantId.HasValue) + if (id.HasValue) { - identity.AddClaim(new Claim("TenantId", tenantId.Value.ToString())); + identity.AddClaim(new Claim("Id", id.Value.ToString())); } var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; @@ -244,7 +244,7 @@ private static CurrentUserContext CreateUserContext(long? tenantId) private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameOnlinePlayerSegmentEntity + await _db.Insertable(new GameOnlinePlayerSegmentEntity { Id = SegmentSynced, Name = "synced-segment", @@ -252,7 +252,7 @@ await _db.Insertable(new TenantGameOnlinePlayerSegmentEntity CreatedTime = now, IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameOnlinePlayerSegmentEntity + await _db.Insertable(new GameOnlinePlayerSegmentEntity { Id = 7002, Name = "unsynced-segment", @@ -280,12 +280,12 @@ public Task EnsureSourceExistsAsync(LiveOpsSourceKind source, long businessKey) return Task.CompletedTask; // 来源校验行为由 OnlineLiveOpsDispatchServiceTests 覆盖 } - public Task SyncSegmentToOnlineAsync(TenantGameOnlinePlayerSegmentEntity segment, long serverId, string reason) + public Task SyncSegmentToOnlineAsync(GameOnlinePlayerSegmentEntity segment, long serverId, string reason) { throw new NotSupportedException("分群同步行为由 GameOnlinePlayerSegmentServiceTests 覆盖"); } - public Task PublishRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout) + public Task PublishRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout) { PublishCalls += 1; if (FailNextPublish) @@ -301,7 +301,7 @@ public Task PublishRolloutToOnlineAsync(Ten }); } - public Task RollbackRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout) + public Task RollbackRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout) { RollbackCalls += 1; return Task.FromResult(new OnlineConfigRolloutDispatchResponse diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs index 9452d423..75f65426 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs @@ -8,8 +8,8 @@ using GameFrameX.Core.Extension; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Online; using GameFrameX.Foundation.Orm.Entity; using SqlSugar; @@ -21,7 +21,7 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 被灰度版本行引用的分群不可删除。 public sealed class GameOnlinePlayerSegmentServiceTests : IDisposable { - private const long TenantA = 1001; + private const long A = 1001; private const long App100 = 100; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"online_segment_{Guid.NewGuid():N}.db"); @@ -43,8 +43,8 @@ public GameOnlinePlayerSegmentServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameOnlinePlayerSegmentEntity), - typeof(TenantGameOnlineConfigRolloutEntity)); + typeof(GameOnlinePlayerSegmentEntity), + typeof(GameOnlineConfigRolloutEntity)); } /// @@ -59,7 +59,7 @@ public async Task AddAsync_RejectsConditionFieldOutsideWhitelist() var exception = await Assert.ThrowsAsync(() => service.AddAsync(NewAdd("[{\"Field\":\"nickname\",\"Op\":\"eq\",\"Value\":\"bot\"}]"))); Assert.Equal(20000002, exception.Code); - Assert.Equal(0, await _db.Queryable().CountAsync()); + Assert.Equal(0, await _db.Queryable().CountAsync()); } /// @@ -98,7 +98,7 @@ public async Task AddAsync_AcceptsWhitelistedConditions_AndStartsNotSynced() var response = await service.AddAsync(NewAdd( "[{\"Field\":\"activeDays\",\"Op\":\"gte\",\"Value\":\"7\"},{\"Field\":\"retentionDays\",\"Op\":\"lte\",\"Value\":\"30\"},{\"Field\":\"totalPaymentAmount\",\"Op\":\"eq\",\"Value\":\"0\"}]")); - var persisted = await _db.Queryable().FirstAsync(u => u.Id == response.Id); + var persisted = await _db.Queryable().FirstAsync(u => u.Id == response.Id); Assert.NotNull(persisted); Assert.Equal(OnlinePlayerSegmentSyncStatus.NotSynced, persisted.SyncStatus); } @@ -126,7 +126,7 @@ public async Task SyncOnlineAsync_SuccessWritesBackOnlineSegmentId() Assert.Equal(501, result.OnlineSegmentId); Assert.Equal("seg-cv-9", result.ConfirmVersion); - var persisted = await _db.Queryable().FirstAsync(u => u.Id == segment.Id); + var persisted = await _db.Queryable().FirstAsync(u => u.Id == segment.Id); Assert.Equal(OnlinePlayerSegmentSyncStatus.Synced, persisted.SyncStatus); Assert.Equal(501, persisted.LastOnlineSegmentId); Assert.Equal(2001, persisted.LastSyncServerId); @@ -150,7 +150,7 @@ await Assert.ThrowsAsync(() => service.SyncOnlineAsync(new Sy Reason = "unit-test-sync", })); - var persisted = await _db.Queryable().FirstAsync(u => u.Id == segment.Id); + var persisted = await _db.Queryable().FirstAsync(u => u.Id == segment.Id); Assert.Equal(OnlinePlayerSegmentSyncStatus.Failed, persisted.SyncStatus); } @@ -164,7 +164,7 @@ public async Task DeleteAsync_RejectsSegmentReferencedByRollout() var service = CreateService(); var segment = await service.AddAsync(NewAdd(null)); - await _db.Insertable(new TenantGameOnlineConfigRolloutEntity + await _db.Insertable(new GameOnlineConfigRolloutEntity { Id = 6001, ServerId = 2001, @@ -187,9 +187,9 @@ await _db.Insertable(new TenantGameOnlineConfigRolloutEntity Assert.Equal(20000002, exception.Code); } - private AddTenantGameOnlinePlayerSegmentRequest NewAdd(string? conditionsJson) + private AddGameOnlinePlayerSegmentRequest NewAdd(string? conditionsJson) { - return new AddTenantGameOnlinePlayerSegmentRequest + return new AddGameOnlinePlayerSegmentRequest { Name = "unit-segment", Description = null, @@ -200,8 +200,8 @@ private AddTenantGameOnlinePlayerSegmentRequest NewAdd(string? conditionsJson) private GameOnlinePlayerSegmentService CreateService() { return new GameOnlinePlayerSegmentService( - Repository(), - Repository(), + Repository(), + Repository(), _dispatch); } @@ -232,7 +232,7 @@ public Task EnsureSourceExistsAsync(LiveOpsSourceKind source, long businessKey) return Task.CompletedTask; } - public Task SyncSegmentToOnlineAsync(TenantGameOnlinePlayerSegmentEntity segment, long serverId, string reason) + public Task SyncSegmentToOnlineAsync(GameOnlinePlayerSegmentEntity segment, long serverId, string reason) { if (FailNextSync) { @@ -248,12 +248,12 @@ public Task SyncSegmentToOnlineAsync(TenantGame }); } - public Task PublishRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout) + public Task PublishRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout) { throw new NotSupportedException("灰度发布行为由 GameOnlineConfigRolloutServiceTests 覆盖"); } - public Task RollbackRolloutToOnlineAsync(TenantGameOnlineConfigRolloutEntity rollout) + public Task RollbackRolloutToOnlineAsync(GameOnlineConfigRolloutEntity rollout) { throw new NotSupportedException("灰度回滚行为由 GameOnlineConfigRolloutServiceTests 覆盖"); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs index 92ad8d59..b95c5953 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs @@ -10,11 +10,11 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Game.Mail; using GameFrameX.Entity.Game.Online; -using GameFrameX.Entity.Tenant.Device; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Announcement; -using GameFrameX.Entity.Tenant.Game.Online; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Device; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Announcement; +using GameFrameX.Entity.Business.Game.Online; +using GameFrameX.Entity.Business.Game.RemoteConfig; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -28,7 +28,7 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 分群同步通道回执映射。作用域走真实 OnlineScopeContextFactory(含租户归属校验)。 public sealed class OnlineLiveOpsDispatchServiceTests : IDisposable { - private const long TenantA = 1001; + private const long A = 1001; private const long App100 = 100; private const long App200 = 200; private const long Area1001 = 2001; // 归属 App100 @@ -53,12 +53,12 @@ public OnlineLiveOpsDispatchServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantGameAppRemoteConfigEntity), - typeof(TenantGameAppDeviceGroupEntity), - typeof(TenantGameTimeJobEntity), - typeof(TenantGameAnnouncementEntity), - typeof(TenantGameMailCampaignEntity)); + typeof(GameAreaEntity), + typeof(GameAppRemoteConfigEntity), + typeof(GameAppDeviceGroupEntity), + typeof(GameTimeJobEntity), + typeof(GameAnnouncementEntity), + typeof(GameMailCampaignEntity)); } /// @@ -197,7 +197,7 @@ public async Task SyncSegmentToOnlineAsync_MapsDefinitionAndReturnsOnlineSegment var service = CreateService(); _client.RespondWith = action => new OnlineLiveOpsResponse { ConfirmVersion = "seg-cv", SegmentId = 501, }; - var segment = new TenantGameOnlinePlayerSegmentEntity + var segment = new GameOnlinePlayerSegmentEntity { Id = 7001, Name = "七日活跃", @@ -229,20 +229,20 @@ private OnlineLiveOpsDispatchService CreateService() { return new OnlineLiveOpsDispatchService( _client, - new OnlineScopeContextFactory(Repository()), - Repository(), - Repository(), - Repository(), - Repository(), - Repository()); + new OnlineScopeContextFactory(Repository()), + Repository(), + Repository(), + Repository(), + Repository(), + Repository()); } - private static CurrentUserContext CreateUserContext(long? tenantId) + private static CurrentUserContext CreateUserContext(long? id) { var identity = new ClaimsIdentity("TestAuth"); - if (tenantId.HasValue) + if (id.HasValue) { - identity.AddClaim(new Claim("TenantId", tenantId.Value.ToString())); + identity.AddClaim(new Claim("Id", id.Value.ToString())); } var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; @@ -262,14 +262,14 @@ private async Task SeedAsync() await _db.Insertable(NewArea(Area1001, App100, now)).ExecuteCommandAsync(); // 四类配置来源各一行(归属 App100);公告 9005 归属 App200(构造跨应用场景) - await _db.Insertable(FillStrings(new TenantGameAppRemoteConfigEntity { Id = 9001, })).ExecuteCommandAsync(); - await _db.Insertable(FillStrings(new TenantGameAppDeviceGroupEntity { Id = 9002, })).ExecuteCommandAsync(); - await _db.Insertable(FillStrings(new TenantGameTimeJobEntity { Id = 9003, })).ExecuteCommandAsync(); - await _db.Insertable(FillStrings(new TenantGameAnnouncementEntity { Id = 9004, })).ExecuteCommandAsync(); - await _db.Insertable(FillStrings(new TenantGameAnnouncementEntity { Id = 9005, })).ExecuteCommandAsync(); + await _db.Insertable(FillStrings(new GameAppRemoteConfigEntity { Id = 9001, })).ExecuteCommandAsync(); + await _db.Insertable(FillStrings(new GameAppDeviceGroupEntity { Id = 9002, })).ExecuteCommandAsync(); + await _db.Insertable(FillStrings(new GameTimeJobEntity { Id = 9003, })).ExecuteCommandAsync(); + await _db.Insertable(FillStrings(new GameAnnouncementEntity { Id = 9004, })).ExecuteCommandAsync(); + await _db.Insertable(FillStrings(new GameAnnouncementEntity { Id = 9005, })).ExecuteCommandAsync(); // 邮件方案C 场景:9101 Published(Area1001 / v3 / CampaignId 77),9102 Draft - await _db.Insertable(FillStrings(new TenantGameMailCampaignEntity + await _db.Insertable(FillStrings(new GameMailCampaignEntity { Id = 9101, AreaId = Area1001, @@ -280,7 +280,7 @@ await _db.Insertable(FillStrings(new TenantGameMailCampaignEntity CreatedTime = now, IsDeleted = false, })).ExecuteCommandAsync(); - await _db.Insertable(FillStrings(new TenantGameMailCampaignEntity + await _db.Insertable(FillStrings(new GameMailCampaignEntity { Id = 9102, AreaId = Area1001, @@ -291,9 +291,9 @@ await _db.Insertable(FillStrings(new TenantGameMailCampaignEntity })).ExecuteCommandAsync(); } - private static TenantGameAreaEntity NewArea(long id, long gameAppId, long now) + private static GameAreaEntity NewArea(long id, long gameAppId, long now) { - return FillStrings(new TenantGameAreaEntity + return FillStrings(new GameAreaEntity { Id = id, CreatedTime = now, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs index cc43cf7c..19be5365 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs @@ -10,7 +10,7 @@ using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -24,7 +24,7 @@ namespace GameFrameX.Core.Tests.Online.Social; // 单区服失败(Online 业务码 / 传输层)不抛不回滚事实源、非 Active / 纯落账动作 / 全区服无目标拒绝。 public sealed class OnlinePenaltyLinkCommandServiceTests : IDisposable { - private const long TenantA = 3001; + private const long A = 3001; private const long App100 = 100; private const long Area1001 = 2001; private const long Area1002 = 2002; @@ -48,8 +48,8 @@ public OnlinePenaltyLinkCommandServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantGamePenaltyEntity)); + typeof(GameAreaEntity), + typeof(GamePenaltyEntity)); } /// @@ -134,7 +134,7 @@ public async Task ExecuteLinkAsync_ServerBusinessFailure_ReportedPerServerWithou Assert.False(result.TokenRevokedConfirmed); // 事实源保持 Active 原状(不因联动失败被改动)——重试入口不变。 - var penalty = await _db.Queryable().FirstAsync(u => u.Id == penaltyId); + var penalty = await _db.Queryable().FirstAsync(u => u.Id == penaltyId); Assert.Equal(PenaltyStatusEnum.Active, penalty.Status); } @@ -220,11 +220,11 @@ public async Task ExecuteLinkAsync_RejectsGlobalPenaltyWithoutTargetServers() private OnlinePenaltyLinkCommandService CreateService(IOnlineServerClient onlineServerClient) { - var userContext = CreateUserContext(TenantA); - var factory = new OnlineScopeContextFactory(Repository()); + var userContext = CreateUserContext(A); + var factory = new OnlineScopeContextFactory(Repository()); return new OnlinePenaltyLinkCommandService( - Repository(), - Repository(), + Repository(), + Repository(), onlineServerClient, factory); } @@ -242,7 +242,7 @@ private async Task SeedScopeAsync(bool appServers = true) private async Task SeedPenaltyAsync(PenaltyActionTypeEnum actionType, long? areaId, string targetId, PenaltyStatusEnum status = PenaltyStatusEnum.Active) { - var penalty = new TenantGamePenaltyEntity + var penalty = new GamePenaltyEntity { AreaId = areaId, TargetType = PenaltyTargetTypeEnum.Account, @@ -259,9 +259,9 @@ private async Task SeedPenaltyAsync(PenaltyActionTypeEnum actionType, long return penalty.Id; } - private static TenantGameAreaEntity NewArea(long id, long now) + private static GameAreaEntity NewArea(long id, long now) { - return new TenantGameAreaEntity + return new GameAreaEntity { Id = id, Name = $"area-{id}", @@ -291,10 +291,10 @@ private static TenantGameAreaEntity NewArea(long id, long now) return new SqlSugarRepository { Context = _db, }; } - private static CurrentUserContext CreateUserContext(long tenantId) + private static CurrentUserContext CreateUserContext(long id) { var identity = new ClaimsIdentity("TestAuth"); - identity.AddClaim(new Claim("TenantId", tenantId.ToString())); + identity.AddClaim(new Claim("Id", id.ToString())); var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; var accessor = new HttpContextAccessor { HttpContext = httpContext, }; return new CurrentUserContext(accessor); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs index c823e7c6..b9b16ddb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs @@ -10,7 +10,7 @@ using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -24,7 +24,7 @@ namespace GameFrameX.Core.Tests.Online.Social; // 案件回写失败落响应原因不阻断;Mute 缺时长服务端兜底拒绝;Page 过滤透传与游标往返。 public sealed class OnlineReportCaseServiceTests : IDisposable { - private const long TenantA = 4001; + private const long A = 4001; private const long App100 = 100; private const long Area1001 = 2001; private const long OperatorUserId = 77; @@ -48,8 +48,8 @@ public OnlineReportCaseServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantGamePenaltyEntity)); + typeof(GameAreaEntity), + typeof(GamePenaltyEntity)); } /// @@ -73,7 +73,7 @@ public async Task HandleAsync_MuteDecision_WritesPenaltyFactThenLinksThenUpdates }); // 事实源:Mute 处罚一行,审计字段由服务端强制(Active + 当前操作人)。 - var penalty = await _db.Queryable().FirstAsync(u => u.TargetId == "player-9"); + var penalty = await _db.Queryable().FirstAsync(u => u.TargetId == "player-9"); Assert.NotNull(penalty); Assert.Equal(Area1001, penalty.AreaId); Assert.Equal(PenaltyTargetTypeEnum.Account, penalty.TargetType); @@ -118,7 +118,7 @@ public async Task HandleAsync_DismissDecision_WritesNoPenaltyFactAndSkipsNotific Reason = "证据不足", }); - Assert.Equal(0, await _db.Queryable().CountAsync(u => u.TargetId == "player-9")); + Assert.Equal(0, await _db.Queryable().CountAsync(u => u.TargetId == "player-9")); Assert.Equal(new[] { "update_report_case" }, fake.Calls.Select(u => u.Action).ToArray()); Assert.Equal(OnlineReportCaseStatusKind.Rejected, Assert.IsType(fake.Calls[0].Request).Status); @@ -150,7 +150,7 @@ public async Task HandleAsync_LinkFailure_DoesNotRollbackFactAndStillNotifies() }); Assert.NotNull(response.PenaltyId); - Assert.NotNull(await _db.Queryable().FirstAsync(u => u.Id == response.PenaltyId!.Value)); + Assert.NotNull(await _db.Queryable().FirstAsync(u => u.Id == response.PenaltyId!.Value)); Assert.False(response.LinkCommand!.AllSucceeded); Assert.Contains("send_admin_notification", fake.Calls.Select(u => u.Action)); Assert.Contains("update_report_case", fake.Calls.Select(u => u.Action)); @@ -265,15 +265,15 @@ public async Task PageAsync_PassesThroughFiltersAndCursor() private OnlineReportCaseService CreateService(IOnlineServerClient onlineServerClient) { - var userContext = CreateUserContext(TenantA, OperatorUserId); - var factory = new OnlineScopeContextFactory(Repository()); + var userContext = CreateUserContext(A, OperatorUserId); + var factory = new OnlineScopeContextFactory(Repository()); var linkService = new OnlinePenaltyLinkCommandService( - Repository(), - Repository(), + Repository(), + Repository(), onlineServerClient, factory); var penaltyService = new GamePenaltyService( - Repository(), + Repository(), userContext, linkService); return new OnlineReportCaseService(onlineServerClient, factory, penaltyService, linkService); @@ -283,7 +283,7 @@ private async Task SeedScopeAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameAreaEntity + await _db.Insertable(new GameAreaEntity { Id = Area1001, Name = "area-1001", @@ -313,10 +313,10 @@ await _db.Insertable(new TenantGameAreaEntity return new SqlSugarRepository { Context = _db, }; } - private static CurrentUserContext CreateUserContext(long tenantId, long userId) + private static CurrentUserContext CreateUserContext(long id, long userId) { var identity = new ClaimsIdentity("TestAuth"); - identity.AddClaim(new Claim("TenantId", tenantId.ToString())); + identity.AddClaim(new Claim("Id", id.ToString())); identity.AddClaim(new Claim(ClaimConst.UserId, userId.ToString())); var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; var accessor = new HttpContextAccessor { HttpContext = httpContext, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentConfigScopeTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentConfigScopeTests.cs index 41fe81a8..404e00d5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentConfigScopeTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentConfigScopeTests.cs @@ -1,6 +1,6 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Application.ClientDelivery.GamePaymentConfig; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.PayConfig; @@ -28,8 +28,8 @@ public void PickBestConfig_PrefersPackage() { var configs = new[] { - new TenantGamePaymentConfigEntity { Id = 1, PayChannel = "apple", PackageIdNormalized = 0 }, - new TenantGamePaymentConfigEntity { Id = 2, PayChannel = "apple", PackageId = 200, PackageIdNormalized = 200 }, + new GamePaymentConfigEntity { Id = 1, PayChannel = "apple", PackageIdNormalized = 0 }, + new GamePaymentConfigEntity { Id = 2, PayChannel = "apple", PackageId = 200, PackageIdNormalized = 200 }, }; Assert.Equal(2, GamePaymentConfigService.PickBestConfig(configs, 200)?.Id); } @@ -39,8 +39,8 @@ public void PickBestConfig_FallsBackToDefaultAndExcludesOtherPackage() { var configs = new[] { - new TenantGamePaymentConfigEntity { Id = 1, PayChannel = "apple", PackageIdNormalized = 0 }, - new TenantGamePaymentConfigEntity { Id = 2, PayChannel = "apple", PackageId = 300, PackageIdNormalized = 300 }, + new GamePaymentConfigEntity { Id = 1, PayChannel = "apple", PackageIdNormalized = 0 }, + new GamePaymentConfigEntity { Id = 2, PayChannel = "apple", PackageId = 300, PackageIdNormalized = 300 }, }; Assert.Equal(1, GamePaymentConfigService.PickBestConfig(configs, 200)?.Id); } @@ -48,7 +48,7 @@ public void PickBestConfig_FallsBackToDefaultAndExcludesOtherPackage() [Fact] public void PackageMatchesScope_RequiresExistingEnabledPackage() { - var package = new TenantGameAppPackageEntity { IsEnabled = true }; + var package = new GameAppPackageEntity { IsEnabled = true }; Assert.True(PaymentOptionSettingProvider.PackageMatchesScope(package)); Assert.False(PaymentOptionSettingProvider.PackageMatchesScope(null)); package.IsEnabled = false; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs index 10ebcabf..b2ce0905 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs @@ -4,11 +4,11 @@ using GameFrameX.Client.Api.Services; using GameFrameX.Core.Enum; using GameFrameX.Core.Middleware; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.AliPay; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -20,30 +20,30 @@ namespace GameFrameX.Core.Tests.PayConfig; // change:gfx-doc/dev/client-api/changes/C372-runtime-credential-decrypt-closure/change.md // PG 真库回归:作用域 Where 的 Nullable.HasValue 闭包曾使 SqlSugar 生成非法 SQL // (SQLite 报 near "IS"、PG 报 near "NOT",真机冒烟发现 PG 同样失败),已提为局部布尔修复; -// 与 PublicCallbackTenantRoutingTests 同款 PG fixture。SQLite 侧等价回归见 RuntimeCredentialDecryptClosureTests。 +// 与 PublicCallbackRoutingTests 同款 PG fixture。SQLite 侧等价回归见 RuntimeCredentialDecryptClosureTests。 public sealed class PaymentOptionSettingDecryptClosureTests { [PostgreSqlFact] public void GetOptionSetting_SensitiveJsonFieldDecrypts() { - const long tenantId = 1900000004001; + const long id = 1900000004001; const long appId = 1900000004101; - var originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + var originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); _ = Assembly.Load("GameFrameX.Payment.AliPay"); try { - using var fixture = new PostgresPaymentFixture(tenantId, appId); + using var fixture = new PostgresPaymentFixture(id, appId); var configJson = PaymentConfigCrypto.EncryptConfigJson("alipay", "{\"AliPayAppId\":\"2021001\",\"AliPayMerchantPrivateKey\":\"plain-merchant-key\",\"AliPayGatewayUrl\":\"https://openapi.alipay.com/gateway.do\"}"); - fixture.TenantDb.Insertable(new TenantGamePaymentConfigEntity + fixture.Db.Insertable(new GamePaymentConfigEntity { Id = 1900000004201, IsEnabled = true, PayChannel = "alipay", ConfigJson = configJson, }).ExecuteCommand(); var httpContext = new DefaultHttpContext(); httpContext.Items[GameFrameX.Core.Middleware.PublicCallbackRouteContext.ItemKey] = true; - var provider = new PaymentOptionSettingProvider(fixture.TenantDbProvider, new HttpContextAccessor { HttpContext = httpContext, }); + var provider = new PaymentOptionSettingProvider(fixture.DbProvider, new HttpContextAccessor { HttpContext = httpContext, }); var setting = provider.GetOptionSetting("alipay"); @@ -53,19 +53,19 @@ public void GetOptionSetting_SensitiveJsonFieldDecrypts() } finally { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, originalKey); } } /// - /// 独立 PG 测试库 fixture(镜像 PublicCallbackTenantRoutingTests 私有实现,不跨测试类共享状态): + /// 独立 PG 测试库 fixture(镜像 PublicCallbackRoutingTests 私有实现,不跨测试类共享状态): /// 建库 → 主库注册租户行 → 租户库建租户表,Dispose 整库删除。 /// private sealed class PostgresPaymentFixture : IDisposable { private readonly string _databaseName; - public PostgresPaymentFixture(long tenantId, long appId) + public PostgresPaymentFixture(long id, long appId) { _databaseName = ("gfx_c372_pay_" + Guid.NewGuid().ToString("N")).ToLowerInvariant(); ExecuteAdminCommand($"CREATE DATABASE \"{_databaseName}\""); @@ -74,17 +74,17 @@ public PostgresPaymentFixture(long tenantId, long appId) MainDb = new SqlSugarScope(mainConfig); - TenantDbProvider = MainDb; - TenantDb = TenantDbProvider; - TenantDb.CodeFirst.InitTables(typeof(TenantGamePaymentConfigEntity)); + DbProvider = MainDb; + Db = DbProvider; + Db.CodeFirst.InitTables(typeof(GamePaymentConfigEntity)); _ = appId; } public SqlSugarScope MainDb { get; } - public ISqlSugarClient TenantDb { get; } + public ISqlSugarClient Db { get; } - public ISqlSugarClient TenantDbProvider { get; } + public ISqlSugarClient DbProvider { get; } public void Dispose() @@ -119,7 +119,7 @@ private static string BuildConnectionString(string databaseName) } /// - /// 本地 PG(127.0.0.1:5432 postgres/postgres)不可用时跳过,语义同 PublicCallbackTenantRoutingTests.PostgreSqlFactAttribute。 + /// 本地 PG(127.0.0.1:5432 postgres/postgres)不可用时跳过,语义同 PublicCallbackRoutingTests.PostgreSqlFactAttribute。 /// private sealed class PostgreSqlFactAttribute : FactAttribute { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Payment/AppleServerApiVerifyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Payment/AppleServerApiVerifyTests.cs index 2e0a56f1..8fc74f6d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Payment/AppleServerApiVerifyTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Payment/AppleServerApiVerifyTests.cs @@ -4,7 +4,7 @@ using System.Security.Cryptography; using System.Text; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Json; using GameFrameX.Client.Api.GameUserPay.Dto; using GameFrameX.Client.Api.Services; @@ -235,7 +235,7 @@ public async Task Verifier_TransactionIdOnly_RoutesToServerApiPath_AndSucceeds() new StubPaymentChannelFactory(new ApplePaymentHandler(), MakeSetting(material)), new ClientApiTestHttpClientFactory(handler)); - var result = await verifier.VerifyAsync(MakeTenantOrder(), new GameUserPayVerifyRequest + var result = await verifier.VerifyAsync(MakeOrder(), new GameUserPayVerifyRequest { UserId = 7001, OrderId = "pay-271", @@ -280,7 +280,7 @@ public async Task Verifier_FailClosed_MissingCredential_Rejected_WithoutHttpCall var verifier = new GamePayReceiptVerifier(new StubPaymentChannelFactory(new ApplePaymentHandler(), setting), new ClientApiTestHttpClientFactory(handler)); - var result = await verifier.VerifyAsync(MakeTenantOrder(), new GameUserPayVerifyRequest + var result = await verifier.VerifyAsync(MakeOrder(), new GameUserPayVerifyRequest { UserId = 7001, OrderId = "pay-271", @@ -304,7 +304,7 @@ public async Task Verifier_ServerApiV2Disabled_RejectsTransactionIdForm() var setting = MakeSetting(material, useServerApiV2: false); var verifier = new GamePayReceiptVerifier(new StubPaymentChannelFactory(new ApplePaymentHandler(), setting), new ClientApiTestHttpClientFactory(handler)); - var result = await verifier.VerifyAsync(MakeTenantOrder(), new GameUserPayVerifyRequest + var result = await verifier.VerifyAsync(MakeOrder(), new GameUserPayVerifyRequest { UserId = 7001, OrderId = "pay-271", @@ -326,7 +326,7 @@ public async Task Verifier_BothReceiptAndTransactionEmpty_Rejected() var handler = new RecordingServerApiHandler(); var verifier = new GamePayReceiptVerifier(new StubPaymentChannelFactory(new ApplePaymentHandler(), MakeSetting(material)), new ClientApiTestHttpClientFactory(handler)); - var result = await verifier.VerifyAsync(MakeTenantOrder(), new GameUserPayVerifyRequest + var result = await verifier.VerifyAsync(MakeOrder(), new GameUserPayVerifyRequest { UserId = 7001, OrderId = "pay-271", @@ -347,7 +347,7 @@ public async Task Verifier_LegacyForm_StillRequiresTransactionId() var handler = new RecordingServerApiHandler(); var verifier = new GamePayReceiptVerifier(new StubPaymentChannelFactory(new ApplePaymentHandler(), MakeSetting(material)), new ClientApiTestHttpClientFactory(handler)); - var result = await verifier.VerifyAsync(MakeTenantOrder(), new GameUserPayVerifyRequest + var result = await verifier.VerifyAsync(MakeOrder(), new GameUserPayVerifyRequest { UserId = 7001, OrderId = "pay-271", @@ -447,9 +447,9 @@ private static GameOrderBase MakeOrderEntity(bool isSandbox = false) }; } - private static TenantGameOrderEntity MakeTenantOrder() + private static GameOrderEntity MakeOrder() { - return new TenantGameOrderEntity + return new GameOrderEntity { Id = 9001, AccountId = "7001", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/EmailTaskTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/EmailTaskTests.cs index ae5d151e..edf230c1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/EmailTaskTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/EmailTaskTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Core.Tests; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using Microsoft.Extensions.DependencyInjection; @@ -31,7 +31,7 @@ public sealed class EmailTaskTests : IDisposable public EmailTaskTests() { - _database.InitTenantTables(typeof(TenantGameMailEntity), typeof(TenantGameAreaEntity), typeof(TenantGameRoleEntity)); + _database.InitBusinessTables(typeof(GameMailEntity), typeof(GameAreaEntity), typeof(GameRoleEntity)); SeedArea(91); var services = new ServiceCollection(); @@ -59,7 +59,7 @@ public async Task DraftMail_SendsViaFulfillment_AndBecomesSent() var innerTask = await task.ExecuteAsync(CancellationToken.None); await innerTask!; - var mail = _database.MainDb.Queryable().Single(u => u.Id == 601); + var mail = _database.MainDb.Queryable().Single(u => u.Id == 601); Assert.Equal(GameMailStatus.Sent, mail.Status); // MailId 通道键已清除(与旧引擎行为一致)。 Assert.False(_cache.ContainsKey("MailId")); @@ -83,7 +83,7 @@ public async Task SentMail_ReturnsWithoutSending() } Assert.Empty(_httpHandler.Requests); - Assert.Equal(GameMailStatus.Sent, _database.MainDb.Queryable().Single(u => u.Id == 602).Status); + Assert.Equal(GameMailStatus.Sent, _database.MainDb.Queryable().Single(u => u.Id == 602).Status); Assert.False(_cache.ContainsKey("MailId")); } @@ -105,9 +105,9 @@ private EmailTask BuildTask() using (var scope = scopeFactory.CreateScope()) { return new EmailTask(NullLogger.Instance, - scope.ServiceProvider.GetRequiredService>(), - scope.ServiceProvider.GetRequiredService>(), - scope.ServiceProvider.GetRequiredService>(), + scope.ServiceProvider.GetRequiredService>(), + scope.ServiceProvider.GetRequiredService>(), + scope.ServiceProvider.GetRequiredService>(), new HttpClient(_httpHandler), scope.ServiceProvider.GetRequiredService()); } @@ -115,7 +115,7 @@ private EmailTask BuildTask() private void SeedArea(long areaId) { - _database.MainDb.Insertable(new TenantGameAreaEntity + _database.MainDb.Insertable(new GameAreaEntity { Id = areaId, Name = $"EmailTaskArea-{areaId}", @@ -145,7 +145,7 @@ private void SeedArea(long areaId) private void InsertMail(long mailId, GameMailStatus status, bool isAllPost, string playerIdListJson) { - _database.MainDb.Insertable(new TenantGameMailEntity + _database.MainDb.Insertable(new GameMailEntity { Id = mailId, AreaId = 91, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/GameTimeJobDispatchJobTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/GameTimeJobDispatchJobTests.cs index cbaae9fe..56000023 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/GameTimeJobDispatchJobTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/GameTimeJobDispatchJobTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Core.Service.Cache; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; @@ -28,11 +28,11 @@ public sealed class GameTimeJobDispatchJobTests : IDisposable public GameTimeJobDispatchJobTests() { - _database.InitTenantTables(typeof(TenantGameTimeJobEntity)); + _database.InitBusinessTables(typeof(GameTimeJobEntity)); var services = new ServiceCollection(); services.AddSingleton(_database.MainDb); - services.AddScoped(_ => new SqlSugarRepository { Context = _database.MainDb, }); + services.AddScoped(_ => new SqlSugarRepository { Context = _database.MainDb, }); services.AddSingleton(_cache); services.AddSingleton>(Options.Create(new CacheOptions())); services.AddSingleton(); @@ -140,7 +140,7 @@ public async Task DeletedRow_DroppedFromSchedule() await DispatchAsync(); // 删除:行消失后调度移除,时间推进也不执行。 - _database.MainDb.Deleteable().Where(row => row.Id == 9005).ExecuteCommand(); + _database.MainDb.Deleteable().Where(row => row.Id == 9005).ExecuteCommand(); _fakeNow = _fakeNow.AddSeconds(10); await DispatchAsync(); @@ -169,7 +169,7 @@ private Task DispatchAsync() private void InsertRow(long rowId, string cron, bool isOnce, long mailId, string name = "probe") { - _database.MainDb.Insertable(new TenantGameTimeJobEntity + _database.MainDb.Insertable(new GameTimeJobEntity { Id = rowId, Name = name, @@ -185,7 +185,7 @@ private void InsertRow(long rowId, string cron, bool isOnce, long mailId, string private void UpdateRowCron(long rowId, string cron) { - _database.MainDb.Updateable() + _database.MainDb.Updateable() .SetColumns(row => row.Cron == cron) .Where(row => row.Id == rowId) .ExecuteCommand(); @@ -193,7 +193,7 @@ private void UpdateRowCron(long rowId, string cron) private int CountRows() { - return _database.MainDb.Queryable().Count(); + return _database.MainDb.Queryable().Count(); } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/TriggerPersistenceWriteBackTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/TriggerPersistenceWriteBackTests.cs index e0d46771..365ec8c4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/TriggerPersistenceWriteBackTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Platform/Job/TriggerPersistenceWriteBackTests.cs @@ -19,7 +19,7 @@ public sealed class TriggerPersistenceWriteBackTests : IDisposable public TriggerPersistenceWriteBackTests() { - _database.InitTenantTables(typeof(SystemJobDetailEntity), typeof(SystemJobTriggerEntity)); + _database.InitBusinessTables(typeof(SystemJobDetailEntity), typeof(SystemJobTriggerEntity)); var services = new ServiceCollection(); services.AddSingleton(_database.MainDb); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Runtime/ProjectDependencyInjectionSetupTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Runtime/ProjectDependencyInjectionSetupTests.cs index 2dfe65f2..d1e6f851 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Runtime/ProjectDependencyInjectionSetupTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Runtime/ProjectDependencyInjectionSetupTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.Platform.GlobalPlatform; using GameFrameX.Core.Job; using GameFrameX.Application.Platform.Job; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.Service.User; using GameFrameX.Foundation.Localization.Providers; using GameFrameX.Web.Api.DependencyInjection; @@ -22,7 +22,7 @@ public void AddProjectDependencyInjection_RegistersKeyServicesWithExpectedLifeti services.AddProjectDependencyInjection(); AssertDescriptor(services, typeof(GlobalPlatformService), typeof(GlobalPlatformService), ServiceLifetime.Transient); - AssertDescriptor(services, typeof(TenantUserService), typeof(TenantUserService), ServiceLifetime.Transient); + AssertDescriptor(services, typeof(UserService), typeof(UserService), ServiceLifetime.Transient); AssertDescriptor(services, typeof(DynamicJobCompiler), typeof(DynamicJobCompiler), ServiceLifetime.Singleton); AssertDescriptor(services, typeof(IJobClusterServer), typeof(JobClusterServer), ServiceLifetime.Singleton); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeCancellationAndReclaimTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeCancellationAndReclaimTests.cs index 6998e7be..beb0ef34 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeCancellationAndReclaimTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeCancellationAndReclaimTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Core.Enum.Errors; using GameFrameX.Core.Exceptions; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ServerCenter.GameAreaMerge; @@ -45,8 +45,8 @@ public async Task Cancel_AllNeverExecutedStates_Succeeds(GameAreaMergePlanStatus } else if (state == GameAreaMergePlanStatus.Failed) { - await context.Database.Updateable() - .SetColumns(item => new TenantGameAreaMergePlanEntity + await context.Database.Updateable() + .SetColumns(item => new GameAreaMergePlanEntity { Status = GameAreaMergePlanStatus.Failed, FailedTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), @@ -74,8 +74,8 @@ public async Task Cancel_ExecutedOrTerminalStates_IsRejected(GameAreaMergePlanSt using (var context = new GameAreaMergeTestContext()) { var plan = await context.CreateAsync(); - await context.Database.Updateable() - .SetColumns(item => new TenantGameAreaMergePlanEntity + await context.Database.Updateable() + .SetColumns(item => new GameAreaMergePlanEntity { Status = state, ExecutionStartedTime = enteredExecution ? 1 : null, @@ -97,7 +97,7 @@ public async Task Cancel_ReleasesAllParticipatingServersForAnotherPlan() var plan = await context.CreateAsync(); await context.Service.CancelAsync(new() { Id = plan.Id, Reason = "重新选择区服" }); // 测试进程的 SqlSugar fallback generator 在同一 SQLite 连接上会复用 ID;删除已核验的取消行只为释放该测试 ID。 - await context.Database.Deleteable() + await context.Database.Deleteable() .Where(item => item.Id == plan.Id) .ExecuteCommandAsync(); @@ -205,8 +205,8 @@ public async Task VisibilityFields_AreComputedByServer(GameAreaMergePlanStatus s using (var context = new GameAreaMergeTestContext()) { var plan = await context.CreateAsync(); - await context.Database.Updateable() - .SetColumns(item => new TenantGameAreaMergePlanEntity + await context.Database.Updateable() + .SetColumns(item => new GameAreaMergePlanEntity { Status = state, ExecutionStartedTime = state == GameAreaMergePlanStatus.Executing ? DateTimeOffset.UtcNow.ToUnixTimeSeconds() : null, @@ -238,8 +238,8 @@ public async Task VisibilityFields_ExecutingAfterTimeout_IsReclaimable() private static async Task SetExecutionStateAsync(GameAreaMergeTestContext context, long identifier, long executionStartedTime) { - await context.Database.Updateable() - .SetColumns(item => new TenantGameAreaMergePlanEntity + await context.Database.Updateable() + .SetColumns(item => new GameAreaMergePlanEntity { Status = GameAreaMergePlanStatus.Executing, ExecutionStartedTime = executionStartedTime, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeClientTimeoutTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeClientTimeoutTests.cs index 9998820f..d02a911b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeClientTimeoutTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeClientTimeoutTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Application.ServerCenter.Online; using GameFrameX.Core.Service.User; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -27,8 +27,8 @@ public async Task Execute_UsesConfiguredDedicatedHttpClientTimeout(string? confi var services = new ServiceCollection(); services.AddSingleton(configuration); services.AddSingleton(context.Accessor); - services.AddSingleton(context.Repository()); - services.AddSingleton(context.Repository()); + services.AddSingleton(context.Repository()); + services.AddSingleton(context.Repository()); services.AddScoped(); services.AddScoped(); services.AddScoped(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeRehearsalTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeRehearsalTests.cs index a71412a9..d503b4c0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeRehearsalTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeRehearsalTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Client.Api.GameArea.Dto; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ServerCenter.GameAreaMerge; @@ -18,15 +18,15 @@ public async Task Rehearsal_OnlineEnvelopeRoundtrip_RetiresSourcesFromClientButK { var plan = await context.ApproveAsync(); await context.Service.ExecuteAsync(new() { Id = plan.Id, BackupConfirmed = true, BackupIdentifier = "rehearsal-backup" }); - var client = new GameAreaController(context.Repository(), FakeOptionsProvider.WithAreaPolicy(false)); + var client = new GameAreaController(context.Repository(), FakeOptionsProvider.WithAreaPolicy(false)); var result = await client.GetAreaList(new GameAreaGetAreaListRequest()); var areas = ClientApiResultReader.Data(ClientApiResultReader.Read(result))[0].GetProperty("GameAreaList"); var identifiers = areas.EnumerateArray().Select(area => area.GetProperty("Id").GetInt64()).ToArray(); Assert.Contains(101, identifiers); Assert.DoesNotContain(102, identifiers); Assert.DoesNotContain(103, identifiers); - var management = new GameAreaService(context.Repository(), context.Repository(), httpClient); - var page = await management.PageAsync(new PageTenantGameAreaEntityRequest()); + var management = new GameAreaService(context.Repository(), context.Repository(), httpClient); + var page = await management.PageAsync(new PageGameAreaEntityRequest()); foreach (var identifier in new long[] { 102, 103 }) { var source = Assert.Single(page.Items, area => area.Id == identifier); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeServiceTests.cs index 3806b27d..63caa9d1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeServiceTests.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Core.Enum.Errors; using GameFrameX.Core.Exceptions; using GameFrameX.Entity.Enum; @@ -25,7 +25,7 @@ public async Task Workflow_PersistsEveryPhase_AndIgnoresDisconnectedRequest() context.Handler.OnExecute = () => { disconnected.Cancel(); - Assert.Equal(GameAreaMergePlanStatus.Executing, context.Database.Queryable().InSingle(plan.Id).Status); + Assert.Equal(GameAreaMergePlanStatus.Executing, context.Database.Queryable().InSingle(plan.Id).Status); }; plan = await context.Service.ExecuteAsync(new() { Id = plan.Id, BackupConfirmed = true, BackupIdentifier = "backup-001" }); Assert.Equal(GameAreaMergePlanStatus.Completed, plan.Status); @@ -139,7 +139,7 @@ public async Task StateMachine_RejectsDisallowedTransitions(GameAreaMergePlanSta using (var context = new GameAreaMergeTestContext()) { var plan = await context.CreateAsync(); - await context.Database.Updateable().SetColumns(item => item.Status == state).Where(item => item.Id == plan.Id).ExecuteCommandAsync(); + await context.Database.Updateable().SetColumns(item => item.Status == state).Where(item => item.Id == plan.Id).ExecuteCommandAsync(); if (state != GameAreaMergePlanStatus.Draft && state != GameAreaMergePlanStatus.Failed) { await Assert.ThrowsAsync(() => context.Service.DryRunAsync(new() { Id = plan.Id })); @@ -173,10 +173,10 @@ public async Task Create_RejectsInvalidServers(long target, long source) [Fact] public void PlanEntity_UsesMainDatabaseAndExplicitTenantPhysicalOwnership() { - var entityType = typeof(TenantGameAreaMergePlanEntity); + var entityType = typeof(GameAreaMergePlanEntity); Assert.True(GameFrameX.Core.SqlSugar.SqlSugarEntityBoundary.IsMainDatabaseTable(entityType)); - Assert.Equal(GameFrameX.Core.SqlSugar.DatabaseOwnership.Tenant, GameFrameX.Core.SqlSugar.SqlSugarEntityBoundary.GetOwnership(entityType)); - Assert.Equal("tenant_game_area_merge_plan_entity", GameFrameX.Core.SqlSugar.SqlSugarEntityBoundary.GetPhysicalTableName(entityType, entityType.Name)); + Assert.Equal(GameFrameX.Core.SqlSugar.DatabaseOwnership.Business, GameFrameX.Core.SqlSugar.SqlSugarEntityBoundary.GetOwnership(entityType)); + Assert.Equal("game_area_merge_plan_entity", GameFrameX.Core.SqlSugar.SqlSugarEntityBoundary.GetPhysicalTableName(entityType, entityType.Name)); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeTestContext.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeTestContext.cs index d024be09..3f1f8d62 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeTestContext.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaMerge/GameAreaMergeTestContext.cs @@ -7,7 +7,7 @@ using GameFrameX.Core.Const; using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using GameFrameX.Foundation.Orm.Entity; @@ -33,11 +33,11 @@ public GameAreaMergeTestContext() _owner = new SqlSugarScope(new List { configuration }); Database = _owner.GetConnectionScope("game-area-merge-tests"); SqlSugarUnifiedConfig.ConfigureBaseFilters(Database); - Database.CodeFirst.InitTables(typeof(TenantGameAreaMergePlanEntity), typeof(TenantGameAreaEntity), typeof(TenantGameAreaClassifyEntity)); - Database.Insertable(new TenantGameAreaClassifyEntity { Id = 10, Name = "合服测试分类", LocalizationKey = "area", DockerRegister = "", ImageName = "", DockerUserName = "", DockerPassword = "", ContainerNetName = "", ContainerSubnet = "", ContainerGateway = "", IsEnabled = true, IsDeleted = false }).ExecuteCommand(); + Database.CodeFirst.InitTables(typeof(GameAreaMergePlanEntity), typeof(GameAreaEntity), typeof(GameAreaClassifyEntity)); + Database.Insertable(new GameAreaClassifyEntity { Id = 10, Name = "合服测试分类", LocalizationKey = "area", DockerRegister = "", ImageName = "", DockerUserName = "", DockerPassword = "", ContainerNetName = "", ContainerSubnet = "", ContainerGateway = "", IsEnabled = true, IsDeleted = false }).ExecuteCommand(); foreach (var identifier in new long[] { 101, 102, 103, 104 }) { - Database.Insertable(new TenantGameAreaEntity + Database.Insertable(new GameAreaEntity { Id = identifier, Name = $"合服区服{identifier}", ClassifyId = 10, IsDeleted = false, HttpManageUrl = "http://127.0.0.1:22390", TcpSocketUrl = "tcp://localhost", WebSocketUrl = "ws://localhost", @@ -48,9 +48,9 @@ public GameAreaMergeTestContext() } Login(11); _httpClient = new HttpClient(Handler); - var client = new GameAreaMergeClient(_httpClient, new OnlineServerEndpointResolver(), Repository(), - new OnlineScopeContextFactory(Repository())); - Service = new GameAreaMergeService(Repository(), Repository(), client, new CurrentUserContext(Accessor)); + var client = new GameAreaMergeClient(_httpClient, new OnlineServerEndpointResolver(), Repository(), + new OnlineScopeContextFactory(Repository())); + Service = new GameAreaMergeService(Repository(), Repository(), client, new CurrentUserContext(Accessor)); } public SqlSugarRepository Repository() where T : EntityBase, new() => new() { Context = Database }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaProvisionServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaProvisionServiceTests.cs index 42f1bd10..1232c289 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaProvisionServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerCenter/GameAreaProvisionServiceTests.cs @@ -14,7 +14,7 @@ using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Orm.Entity; using SqlSugar; @@ -41,11 +41,11 @@ public GameAreaProvisionServiceTests() _database = _owner.GetConnectionScope("gamearea-provision"); SqlSugarUnifiedConfig.ConfigureBaseFilters(_database); SqlSugarUnifiedConfig.ConfigureClientFilters(_database); - _database.CodeFirst.InitTables(); + _database.CodeFirst.InitTables(); _httpClient = new HttpClient(_handler); - var repository = Repository(); + var repository = Repository(); _service = new GameAreaProvisionService(repository, - new GameAreaService(repository, Repository(), _httpClient), + new GameAreaService(repository, Repository(), _httpClient), new OnlineScopeContextFactory(repository), new OnlineServerClient(_httpClient, new OnlineServerEndpointResolver(), repository)); Seed(); @@ -66,7 +66,7 @@ public async Task Provision_Success_ClonesConfigurationAndEnablesOnlyAfterRegist Assert.True(result.IsEnabled && result.Registered && result.ContainerCreated); Assert.Equal(200, _handler.LastServerId); Assert.Equal("200", _handler.LastContainerName); - var area = await Repository().GetByIdAsync(200); + var area = await Repository().GetByIdAsync(200); Assert.Equal(1000, area.Capacity); Assert.Equal(GameServerStatus.Online, area.ServerStatus); Assert.Equal(_handler.OpenedAt / 1000, area.CreationTime); @@ -80,7 +80,7 @@ public async Task Provision_EnvironmentMapping_PreservesTemplateAndAppliesOperat { await _service.CreateAsync(Request()); await _service.ExecuteAsync(new BaseIdRequest { Id = 200 }); - var area = await Repository().GetByIdAsync(200); + var area = await Repository().GetByIdAsync(200); var parameters = JsonSerializer.Deserialize>(area.ServerParams)!; Assert.Equal("template", parameters["Shared"]); Assert.Equal("new", parameters["Override"]); @@ -100,7 +100,7 @@ public async Task Provision_ContainerFailure_IsExplicitAndRetryDoesNotDuplicateR _handler.ContainerCode = 0; await _service.CreateAsync(Request()); Assert.True((await _service.ExecuteAsync(new BaseIdRequest { Id = 200 })).IsEnabled); - Assert.Equal(2, await _database.Queryable().Filter(null, true).CountAsync()); + Assert.Equal(2, await _database.Queryable().Filter(null, true).CountAsync()); } [Fact] @@ -148,7 +148,7 @@ public async Task Provision_RepeatedCreateAndExecute_AreIdempotent() public async Task Provision_EnabledServerAppearsInRealClientAreaList() { await _service.CreateAsync(Request()); - var controller = new GameAreaController(Repository(), FakeOptionsProvider.WithAreaPolicy(false)); + var controller = new GameAreaController(Repository(), FakeOptionsProvider.WithAreaPolicy(false)); var before = await controller.GetAreaList(new GameAreaGetAreaListRequest()); Assert.DoesNotContain(before.Data.SelectMany(category => category.GameAreaList), area => area.Id == 200); await _service.ExecuteAsync(new BaseIdRequest { Id = 200 }); @@ -161,7 +161,7 @@ public async Task Provision_ExternallyDisabledCompletedServer_CannotBeReenabled( { await _service.CreateAsync(Request()); await _service.ExecuteAsync(new BaseIdRequest { Id = 200 }); - var area = await Repository().GetByIdAsync(200); + var area = await Repository().GetByIdAsync(200); area.IsEnabled = false; await _database.Updateable(area).AS().ExecuteCommandAsync(); Assert.Equal(60600009, (await Assert.ThrowsAsync(() => _service.ExecuteAsync(new BaseIdRequest { Id = 200 }))).Code); @@ -177,7 +177,7 @@ public async Task Provision_InvalidInputAndDeletedRows_AreRejected() request.ServerId = 100; await Assert.ThrowsAsync(() => _service.CreateAsync(request)); await _service.CreateAsync(Request()); - var area = await _database.Queryable().Filter(null, true).FirstAsync(area => area.Id == 200); + var area = await _database.Queryable().Filter(null, true).FirstAsync(area => area.Id == 200); area.IsDeleted = true; await _database.Updateable(area).AS().ExecuteCommandAsync(); Assert.Equal(60600003, (await Assert.ThrowsAsync(() => _service.CreateAsync(Request()))).Code); @@ -216,13 +216,13 @@ private static GameAreaProvisionCreateRequest Request() private void Seed() { - _database.Insertable(new TenantGameAreaClassifyEntity + _database.Insertable(new GameAreaClassifyEntity { Id = 10, Name = "classify", LocalizationKey = "classify", HttpManagerUrl = "http://provision.test/", DockerRegister = "registry", ImageName = "gameframex-server", DockerUserName = "", DockerPassword = "", ContainerNetName = "gameframex", ContainerSubnet = "", ContainerGateway = "", IsEnabled = true, IsDeleted = false, }).ExecuteCommand(); - _database.Insertable(new TenantGameAreaEntity + _database.Insertable(new GameAreaEntity { Id = 100, ClassifyId = 10, Name = "template", Description = "template", HttpManageUrl = "http://template.test", TcpSocketUrl = "tcp://template.test", WebSocketUrl = "ws://template.test", Capacity = 1000, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/GameServerEndpointUrlBuilderTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/GameServerEndpointUrlBuilderTests.cs index b3286c48..72d7cd1e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/GameServerEndpointUrlBuilderTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/GameServerEndpointUrlBuilderTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.ServerCenter; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Tests.ServerManager; @@ -188,8 +188,8 @@ public void Build_ThrowsWhenAreaNull() #pragma warning restore CS8625 } - private static TenantGameAreaEntity NewArea(string root = "http://game.example") + private static GameAreaEntity NewArea(string root = "http://game.example") { - return new TenantGameAreaEntity { HttpManageUrl = root, }; + return new GameAreaEntity { HttpManageUrl = root, }; } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs index e5435449..62a118d0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -19,7 +19,7 @@ namespace GameFrameX.Core.Tests.ServerManager.Online; // S3/C401 断链修复点 public sealed class OnlineScopeContextFactoryTests : IDisposable { - private const long TenantA = 1001; + private const long A = 1001; private const long App100 = 100; private const long App200 = 200; private const long Area1001 = 2001; // 归属 App100 @@ -47,8 +47,8 @@ public OnlineScopeContextFactoryTests() _db = _scopeOwner.GetConnectionScope("online-scope"); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantLogOperationEntity)); + typeof(GameAreaEntity), + typeof(LogOperationEntity)); } [Theory] @@ -56,7 +56,7 @@ public OnlineScopeContextFactoryTests() [InlineData(-1)] public async Task CreateAsync_RejectsMissingServer(long serverId) { - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var exception = await Assert.ThrowsAsync(() => factory.CreateAsync(serverId)); Assert.Equal(32200005, exception.Code); } @@ -64,7 +64,7 @@ public async Task CreateAsync_RejectsMissingServer(long serverId) [Fact] public async Task CreateAsync_RejectsNonexistentServer() { - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var exception = await Assert.ThrowsAsync(() => factory.CreateAsync(9999)); Assert.Equal(32200001, exception.Code); } @@ -73,7 +73,7 @@ public async Task CreateAsync_RejectsNonexistentServer() public async Task CreateAsync_ReturnsExistingServerWithoutUserContext() { await SeedAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var scope = await factory.CreateAsync(Area1001, "unit-test"); Assert.Equal(Area1001, scope.ServerId); Assert.Equal("unit-test", scope.RequestSummary); @@ -81,14 +81,14 @@ public async Task CreateAsync_ReturnsExistingServerWithoutUserContext() /// /// 审计承载断言:拒绝异常(镜像数字码 + 本地化文案 + errors JSON)可完整写入租户操作日志并查回往返 - /// (MonitorLogging 在 action 层自动落库;此处锁定 TenantLogOperationEntity 表对 322 段拒绝留痕的承载能力)。 + /// (MonitorLogging 在 action 层自动落库;此处锁定 LogOperationEntity 表对 322 段拒绝留痕的承载能力)。 /// [Fact] public async Task RejectedScope_IsAuditableInTenantOperationLog() { await SeedAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); // 本地化文案断言依赖请求语言,显式固定 zh-CN(与 ErrorCodeContractTests 的 BusinessException 行为测试同姿势)。 var originalCulture = CultureInfo.CurrentUICulture; @@ -99,7 +99,7 @@ public async Task RejectedScope_IsAuditableInTenantOperationLog() var exception = await Assert.ThrowsAsync(() => factory.CreateAsync(9999)); Assert.Equal(32200001, exception.Code); - var log = new TenantLogOperationEntity + var log = new LogOperationEntity { Message = exception.Message, Exception = exception.ToString(), @@ -109,7 +109,7 @@ public async Task RejectedScope_IsAuditableInTenantOperationLog() }; await _db.Insertable(log).ExecuteCommandAsync(); - var persisted = await _db.Queryable().FirstAsync(u => u.Message == exception.Message); + var persisted = await _db.Queryable().FirstAsync(u => u.Message == exception.Message); Assert.NotNull(persisted); persistedMessage = persisted.Message; } @@ -127,12 +127,12 @@ public async Task ProvisioningScope_AllowsDisabledButRejectsDeleted_OrdinaryScop { await SeedAsync(); SqlSugarUnifiedConfig.ConfigureClientFilters(_db); - await _db.Updateable().SetColumns(area => area.IsEnabled == false) + await _db.Updateable().SetColumns(area => area.IsEnabled == false) .Where(area => area.Id == Area1001).ExecuteCommandAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); await Assert.ThrowsAsync(() => factory.CreateAsync(Area1001)); Assert.Equal(Area1001, (await factory.CreateForProvisioningAsync(Area1001)).ServerId); - var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); + var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); deleted.IsDeleted = true; await _db.Updateable(deleted).AS().ExecuteCommandAsync(); await Assert.ThrowsAsync(() => factory.CreateForProvisioningAsync(Area1001)); @@ -151,9 +151,9 @@ private async Task SeedAsync() await _db.Insertable(NewArea(Area2001, App200, now)).ExecuteCommandAsync(); } - private static TenantGameAreaEntity NewArea(long id, long gameAppId, long now) + private static GameAreaEntity NewArea(long id, long gameAppId, long now) { - return new TenantGameAreaEntity + return new GameAreaEntity { Id = id, Name = $"area-{id}", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs index ce026c62..08698268 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using GameFrameX.Foundation.Orm.Entity; @@ -27,7 +27,7 @@ namespace GameFrameX.Core.Tests.ServerManager.Online; // 作用域构造后区服被删的时序漂移拒绝。 public sealed class OnlineServerClientTests : IDisposable { - private const long TenantA = 1001; + private const long A = 1001; private const long App100 = 100; private const long Area1001 = 2001; @@ -53,7 +53,7 @@ public OnlineServerClientTests() _db = _scopeOwner.GetConnectionScope("online-client"); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -81,7 +81,7 @@ public async Task PostAsync_Respects_CustomOnlineAdminPrefix_FromArea() { await SeedAsync(); - var area = await _db.Queryable().FirstAsync(u => u.Id == Area1001); + var area = await _db.Queryable().FirstAsync(u => u.Id == Area1001); area.OnlineAdminApiPrefix = "online/v2"; await _db.Updateable(area).ExecuteCommandAsync(); @@ -105,10 +105,10 @@ public async Task PostAsync_MergesScopeIntoPayload_OverridingClientScopeFields() var handler = new FakeHandler(SuccessEnvelope(new OnlineDemoData { PlayerId = "p-1", })); var client = CreateClient(handler); - await client.PostAsync("kick_player", new { TenantId = 999L, AppId = 888L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, }, await CreateScopeAsync()); + await client.PostAsync("kick_player", new { Id = 999L, AppId = 888L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, }, await CreateScopeAsync()); var body = handler.LastRequestBodyJson; - Assert.False(body.ContainsKey("TenantId")); + Assert.False(body.ContainsKey("Id")); Assert.False(body.ContainsKey("AppId")); Assert.Equal(Area1001, Convert.ToInt64(body["ServerId"]?.ToString())); Assert.Equal("request-1", body["RequestId"]?.ToString()); @@ -238,7 +238,7 @@ public async Task PostAsync_WhenAreaDeletedAfterScopeCreated_ThrowsServerScopeDe var client = CreateClient(handler); var scope = await CreateScopeAsync(); - await _db.Deleteable().Where(u => u.Id == Area1001).ExecuteCommandAsync(); + await _db.Deleteable().Where(u => u.Id == Area1001).ExecuteCommandAsync(); var exception = await Assert.ThrowsAsync(async () => await client.PostAsync("kick_player", new { Reason = 1, }, scope)); @@ -252,16 +252,16 @@ public async Task PostAsync_WhenAreaDeletedAfterScopeCreated_ThrowsServerScopeDe public async Task ProvisioningClient_ResolvesDisabledOnlyWithProvisioningContext() { await SeedAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var ordinary = await factory.CreateAsync(Area1001); SqlSugarUnifiedConfig.ConfigureClientFilters(_db); - await _db.Updateable().SetColumns(area => area.IsEnabled == false) + await _db.Updateable().SetColumns(area => area.IsEnabled == false) .Where(area => area.Id == Area1001).ExecuteCommandAsync(); var client = CreateClient(new FakeHandler(SuccessEnvelope(new OnlineDemoData { PlayerId = "provision" }))); await Assert.ThrowsAsync(() => client.PostAsync("query_server_calendar", new { }, ordinary)); var scope = await factory.CreateForProvisioningAsync(Area1001); Assert.Equal("provision", (await client.PostAsync("query_server_calendar", new { }, scope)).PlayerId); - var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); + var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); deleted.IsDeleted = true; await _db.Updateable(deleted).AS().ExecuteCommandAsync(); await Assert.ThrowsAsync(() => client.PostAsync("query_server_calendar", new { }, scope)); @@ -276,12 +276,12 @@ private sealed class OnlineDemoData private OnlineServerClient CreateClient(FakeHandler handler) { - return new OnlineServerClient(new HttpClient(handler), new OnlineServerEndpointResolver(), Repository()); + return new OnlineServerClient(new HttpClient(handler), new OnlineServerEndpointResolver(), Repository()); } private async Task CreateScopeAsync() { - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); return await factory.CreateAsync(Area1001, "unit-test"); } @@ -327,7 +327,7 @@ private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameAreaEntity + await _db.Insertable(new GameAreaEntity { Id = Area1001, Name = "area-1001", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryAreaFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryAreaFilterTests.cs index 0b19c581..86a51049 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryAreaFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryAreaFilterTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -24,7 +24,7 @@ public AdvancedQueryAreaFilterTests() InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, }); - _db.CodeFirst.InitTables(typeof(TenantGameAreaEntity)); + _db.CodeFirst.InitTables(typeof(GameAreaEntity)); } [Fact] @@ -54,9 +54,9 @@ public async Task NoAdvancedFilter_ReturnsAll() Assert.Equal(3, all.Count); } - private ISugarQueryable BuildQuery(bool? isDefault = null, bool? isRecommend = null, bool? isEnabled = null, GameLanguage? language = null) + private ISugarQueryable BuildQuery(bool? isDefault = null, bool? isRecommend = null, bool? isEnabled = null, GameLanguage? language = null) { - return _db.Queryable() + return _db.Queryable() .WhereIF(isDefault.HasValue, u => u.IsDefault == isDefault!.Value) .WhereIF(isRecommend.HasValue, u => u.IsRecommend == isRecommend!.Value) .WhereIF(isEnabled.HasValue, u => u.IsEnabled == isEnabled!.Value) @@ -71,11 +71,11 @@ private async Task SeedAsync() await _db.Insertable(BuildArea(3, "a3", true, GameLanguage.Unspecified, now)).ExecuteCommandAsync(); } - private static TenantGameAreaEntity BuildArea(long id, string name, bool isEnable, GameLanguage language, long now) + private static GameAreaEntity BuildArea(long id, string name, bool isEnable, GameLanguage language, long now) { // 与 GameOrderShipServiceTests 一致的种子字段集(裸配置下所有列均 NOT NULL,需全量赋值)。 // 本测试只断言 IsEnabled(C301 归一基类列)/Language 过滤形状,其余列给占位值。 - return new TenantGameAreaEntity + return new GameAreaEntity { Id = id, Name = name, Language = language, CreatedId = 1, CreatedTime = now, CreatedName = "test", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryBannerActiveFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryBannerActiveFilterTests.cs index 1f00c425..02834b7c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryBannerActiveFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryBannerActiveFilterTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.Announcement; +using GameFrameX.Entity.Business.Game.Announcement; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -18,7 +18,7 @@ public AdvancedQueryBannerActiveFilterTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameBannerAnnouncementEntity)); + _db.CodeFirst.InitTables(typeof(GameBannerAnnouncementEntity)); } [Fact] @@ -30,18 +30,18 @@ public async Task IsActiveFilter_ReturnsOnlyActiveBanners() Assert.All(active, b => Assert.True(b.IsActive)); } - private ISugarQueryable BuildQuery(bool? isActive) + private ISugarQueryable BuildQuery(bool? isActive) { - return _db.Queryable() + return _db.Queryable() .WhereIF(isActive.HasValue, u => u.IsActive == isActive!.Value); } private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameBannerAnnouncementEntity { Id = 1, Content = "b1", ContentLocalizationKey = "", IsActive = true, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameBannerAnnouncementEntity { Id = 2, Content = "b2", ContentLocalizationKey = "", IsActive = false, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameBannerAnnouncementEntity { Id = 3, Content = "b3", ContentLocalizationKey = "", IsActive = true, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); + await _db.Insertable(new GameBannerAnnouncementEntity { Id = 1, Content = "b1", ContentLocalizationKey = "", IsActive = true, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); + await _db.Insertable(new GameBannerAnnouncementEntity { Id = 2, Content = "b2", ContentLocalizationKey = "", IsActive = false, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); + await _db.Insertable(new GameBannerAnnouncementEntity { Id = 3, Content = "b3", ContentLocalizationKey = "", IsActive = true, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); } public void Dispose() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryMailFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryMailFilterTests.cs index 643edce2..518a7c22 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryMailFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryMailFilterTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Core.Enum; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -20,7 +20,7 @@ public AdvancedQueryMailFilterTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameMailEntity)); + _db.CodeFirst.InitTables(typeof(GameMailEntity)); } [Fact] @@ -58,9 +58,9 @@ public async Task NoAdvancedFilter_ReturnsAll() Assert.Equal(4, all.Count); } - private ISugarQueryable BuildQuery(bool? isAllPost = null, GameMailStatus? status = null, GameMailType? mailType = null) + private ISugarQueryable BuildQuery(bool? isAllPost = null, GameMailStatus? status = null, GameMailType? mailType = null) { - return _db.Queryable() + return _db.Queryable() .WhereIF(isAllPost.HasValue, u => u.IsAllPost == isAllPost!.Value) .WhereIF(status.HasValue, u => u.Status == status!.Value) .WhereIF(mailType.HasValue, u => u.MailType == mailType!.Value); @@ -75,10 +75,10 @@ private async Task SeedAsync() await _db.Insertable(BuildMail(4, "m4", false, GameMailStatus.Draft, GameMailType.PersonalMail, now)).ExecuteCommandAsync(); } - private static TenantGameMailEntity BuildMail(long id, string title, bool isAllPost, GameMailStatus status, GameMailType mailType, long now) + private static GameMailEntity BuildMail(long id, string title, bool isAllPost, GameMailStatus status, GameMailType mailType, long now) { // 非空字符串列全部给占位值,满足 Sqlite NOT NULL 约束(本测试只断言 IsAllPost/Status/MailType 过滤形状)。 - return new TenantGameMailEntity + return new GameMailEntity { Id = id, Title = title, SubTitle = "", Body = "", PlayerIdListJson = "[]", AttachmentsJson = "[]", IsAllPost = isAllPost, Status = status, MailType = mailType, IsDeleted = false, CreatedTime = now, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryRedeemCodeActiveFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryRedeemCodeActiveFilterTests.cs index e0a04693..7bd40471 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryRedeemCodeActiveFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryRedeemCodeActiveFilterTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -18,7 +18,7 @@ public AdvancedQueryRedeemCodeActiveFilterTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameRedeemCodeEntity)); + _db.CodeFirst.InitTables(typeof(GameRedeemCodeEntity)); } [Fact] @@ -38,9 +38,9 @@ public async Task NoActiveFilter_ReturnsAll() Assert.Equal(3, all.Count); } - private ISugarQueryable BuildQuery(bool? isActive) + private ISugarQueryable BuildQuery(bool? isActive) { - return _db.Queryable() + return _db.Queryable() .WhereIF(isActive.HasValue, u => u.IsActive == isActive!.Value); } @@ -48,9 +48,9 @@ private async Task SeedAsync() { var nowDt = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameRedeemCodeEntity { Id = 1, Code = "C1", IsActive = true, UsageLimit = 10, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeEntity { Id = 2, Code = "C2", IsActive = false, UsageLimit = 10, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeEntity { Id = 3, Code = "C3", IsActive = true, UsageLimit = 10, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); + await _db.Insertable(new GameRedeemCodeEntity { Id = 1, Code = "C1", IsActive = true, UsageLimit = 10, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); + await _db.Insertable(new GameRedeemCodeEntity { Id = 2, Code = "C2", IsActive = false, UsageLimit = 10, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); + await _db.Insertable(new GameRedeemCodeEntity { Id = 3, Code = "C3", IsActive = true, UsageLimit = 10, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); } public void Dispose() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryUserStatusFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryUserStatusFilterTests.cs index b4b20bcf..f0f80574 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryUserStatusFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/AdvancedQueryUserStatusFilterTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Core.Enum; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -25,7 +25,7 @@ public AdvancedQueryUserStatusFilterTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameUserEntity)); + _db.CodeFirst.InitTables(typeof(GameUserEntity)); } [Fact] @@ -45,9 +45,9 @@ public async Task NoStatusFilter_ReturnsAll() Assert.Equal(3, all.Count); } - private ISugarQueryable BuildQuery(GameUserStatus? status) + private ISugarQueryable BuildQuery(GameUserStatus? status) { - return _db.Queryable() + return _db.Queryable() .WhereIF(status.HasValue, u => u.Status == status!.Value); } @@ -59,10 +59,10 @@ private async Task SeedAsync() await _db.Insertable(BuildUser(3, "u3", GameUserStatus.New, now)).ExecuteCommandAsync(); } - private static TenantGameUserEntity BuildUser(long id, string name, GameUserStatus status, long now) + private static GameUserEntity BuildUser(long id, string name, GameUserStatus status, long now) { // 非空字符串列全部给占位值,满足 Sqlite NOT NULL 约束(本测试只断言 Status 过滤形状)。 - return new TenantGameUserEntity + return new GameUserEntity { Id = id, UserName = name, Name = name, Password = "p", Email = name + "@e", EmailPassword = "ep", Phone = "", Avatar = "", GoogleId = "", AppleId = "", FacebookId = "", TwitterId = "", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs index 7f3c60f3..e22aa82b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs @@ -5,8 +5,8 @@ using GameFrameX.Core.Tests.ClientApi; using GameFrameX.Entity.Enum; using GameFrameX.Entity.Global; -using GameFrameX.Entity.Tenant; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business; +using GameFrameX.Entity.Business.Game.App; using Microsoft.AspNetCore.Http; namespace GameFrameX.Core.Tests.SqlSugar; @@ -24,7 +24,7 @@ public sealed class ChannelDefinitionSoftDeleteVisibilityTests : IDisposable public ChannelDefinitionSoftDeleteVisibilityTests() { - _db.InitTenantTables(typeof(TenantChannelDefinitionEntity), typeof(TenantGameAppPackageEntity)); + _db.InitBusinessTables(typeof(ChannelDefinitionEntity), typeof(GameAppPackageEntity)); _db.MainDb.CodeFirst.InitTables(typeof(GlobalChannelDefinitionEntity)); } @@ -78,7 +78,7 @@ public async Task GlobalSoftDeleteFilter_StillHidesSoftDeletedRow() // 锁定过滤器装配真实生效:不绕过过滤器时软删行被 ISafeDeletedFilter 隐藏 // (防止「过滤器未装上导致前两个测试恒绿」假阳性)。 - var rows = await _db.TenantDb.Queryable() + var rows = await _db.Db.Queryable() .Where(u => u.Code.StartsWith("GFX_919")) .ToListAsync(); var codes = rows.Select(u => u.Code).ToList(); @@ -88,13 +88,13 @@ public async Task GlobalSoftDeleteFilter_StillHidesSoftDeletedRow() private void SeedChannel(long id, string code, bool isEnabled, bool isDeleted) { - _db.TenantDb.Insertable(new TenantChannelDefinitionEntity + _db.Db.Insertable(new ChannelDefinitionEntity { Id = id, Code = code, Name = code.ToLowerInvariant(), Description = code.ToLowerInvariant(), - Scope = ChannelScopeEnum.Tenant, + Scope = ChannelScopeEnum.Business, PlatformCode = "all", IsEnabled = isEnabled, IsDeleted = isDeleted, @@ -104,14 +104,14 @@ private void SeedChannel(long id, string code, bool isEnabled, bool isDeleted) private ChannelDefinitionService CreateService() { - // 复刻 Admin host DI 形态:Repository 按实体边界路由——租户表经 TenantDbProvider 走租户库 - // (生产过滤器 + TenantId 填充 AOP 已装配),全局表落主库连接。 + // 复刻 Admin host DI 形态:Repository 按实体边界路由——租户表经 DbProvider 走租户库 + // (生产过滤器 + Id 填充 AOP 已装配),全局表落主库连接。 var currentUserContext = new CurrentUserContext(new HttpContextAccessor()); return new ChannelDefinitionService( - _db.Repository(), + _db.Repository(), _db.Repository(), - _db.Repository(), + _db.Repository(), currentUserContext); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs index dae8a9a3..d2fdff4f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs @@ -4,13 +4,13 @@ using GameFrameX.Core.Service; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; namespace GameFrameX.Core.Tests.SqlSugar; // C378(GFX-838)+ C368/C371 组合:合并表写路径语义。 // change:gfx-doc/dev/game-business/changes/C378-client-api-policy-merge/change.md -// AddAsync 空白 SigningKey → 服务端生成 64-hex;(TenantId, AppId) 作用域唯一; +// AddAsync 空白 SigningKey → 服务端生成 64-hex;(Id, AppId) 作用域唯一; // 票据固定到期时间 30 天上限(C142);UpdateAsync ****** 与空白同义保留原值(C368)。 public sealed class ClientApiPolicyServiceTests : IDisposable { @@ -18,7 +18,7 @@ public sealed class ClientApiPolicyServiceTests : IDisposable public ClientApiPolicyServiceTests() { - _db.InitTenantTables(typeof(TenantClientApiPolicyEntity)); + _db.InitBusinessTables(typeof(ClientApiPolicyEntity)); } public void Dispose() @@ -29,7 +29,7 @@ public void Dispose() private ClientApiPolicyService CreateService() { return new ClientApiPolicyService( - new Repository(_db.MainDb), + new Repository(_db.MainDb), new GameFrameX.Core.Service.User.CurrentUserContext(new Microsoft.AspNetCore.Http.HttpContextAccessor())); } @@ -38,14 +38,14 @@ public async Task AddAsync_BlankSigningKey_Generates64Hex() { var service = CreateService(); - await service.AddAsync(new AddTenantClientApiPolicyRequest + await service.AddAsync(new AddClientApiPolicyRequest { SigningKey = string.Empty, LifetimeMinutes = 60, TicketExpireTime = 0, }); - var row = _db.TenantDb.Queryable().Single(); + var row = _db.Db.Queryable().Single(); Assert.Matches("^[0-9a-f]{64}$", row.SigningKey); } @@ -54,9 +54,9 @@ public async Task AddAsync_DuplicateScope_ThrowsRecordAlreadyExists() { var service = CreateService(); - await service.AddAsync(new AddTenantClientApiPolicyRequest { SigningKey = "k1", }); + await service.AddAsync(new AddClientApiPolicyRequest { SigningKey = "k1", }); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantClientApiPolicyRequest { SigningKey = "k3", })); + await Assert.ThrowsAsync(() => service.AddAsync(new AddClientApiPolicyRequest { SigningKey = "k3", })); } [Fact] @@ -64,7 +64,7 @@ public async Task AddAsync_TicketExpireBeyond30Days_ThrowsValidation() { var service = CreateService(); - await Assert.ThrowsAsync(() => service.AddAsync(new AddTenantClientApiPolicyRequest + await Assert.ThrowsAsync(() => service.AddAsync(new AddClientApiPolicyRequest { SigningKey = "k1", TicketExpireTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 31L * 24 * 60 * 60, @@ -75,9 +75,9 @@ await Assert.ThrowsAsync(() => service.AddAsync(new AddTenant public async Task UpdateAsync_MaskedSigningKey_PreservesStoredValue() { var service = CreateService(); - var created = await service.AddAsync(new AddTenantClientApiPolicyRequest { SigningKey = "original-key", }); + var created = await service.AddAsync(new AddClientApiPolicyRequest { SigningKey = "original-key", }); - await service.UpdateAsync(new UpdateTenantClientApiPolicyRequest + await service.UpdateAsync(new UpdateClientApiPolicyRequest { Id = created.Id, SigningKey = SensitiveFieldMask.MaskValue, @@ -86,7 +86,7 @@ await service.UpdateAsync(new UpdateTenantClientApiPolicyRequest RowVersion = 0, }); - var row = _db.TenantDb.Queryable().Single(); + var row = _db.Db.Queryable().Single(); Assert.Equal("original-key", row.SigningKey); Assert.Equal(90, row.LifetimeMinutes); } @@ -95,10 +95,10 @@ await service.UpdateAsync(new UpdateTenantClientApiPolicyRequest public async Task UpdateAsync_BlankSigningKey_PreservesStoredValue() { var service = CreateService(); - var created = await service.AddAsync(new AddTenantClientApiPolicyRequest { SigningKey = "original-key", }); + var created = await service.AddAsync(new AddClientApiPolicyRequest { SigningKey = "original-key", }); // 空白与掩码同义(C368) - await service.UpdateAsync(new UpdateTenantClientApiPolicyRequest + await service.UpdateAsync(new UpdateClientApiPolicyRequest { Id = created.Id, SigningKey = string.Empty, @@ -107,7 +107,7 @@ await service.UpdateAsync(new UpdateTenantClientApiPolicyRequest RowVersion = 0, }); - var row = _db.TenantDb.Queryable().Single(); + var row = _db.Db.Queryable().Single(); Assert.Equal("original-key", row.SigningKey); Assert.Equal(120, row.LifetimeMinutes); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs index 21903759..e4755cb5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs @@ -36,7 +36,7 @@ public CodeFirstSchemaEvolutionPostgresTests() /// /// global_menu 四个种子元数据列(2026-07 C83 引入)对"缺列存量库"重放:加列成功且老行读到 - /// 与原 EnsureColumn 回填一致的默认值(false/0/false/Tenant),不再依赖手工修补。 + /// 与原 EnsureColumn 回填一致的默认值(false/0/false/Business),不再依赖手工修补。 /// [SkippableFact] public void InitDatabase_OnLegacyGlobalMenuWithoutSeedColumns_AddsColumnsWithDefaults() @@ -54,19 +54,19 @@ public void InitDatabase_OnLegacyGlobalMenuWithoutSeedColumns_AddsColumnsWithDef // 模拟 2026-07 之前的存量库:DROP 三个存活列(老行对应数据随列丢弃) mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN super_admin_only"); - mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN allow_tenant_when_super_admin_only"); + mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN allow_admin_when_super_admin_only"); mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN app_scope"); // 二次初始化 = 生产升级重放:CodeFirst 检出缺列 → ALTER ADD COLUMN NOT NULL DEFAULT(零重写) SqlSugarSetup.InitDatabase(scope, config, new[] { typeof(GlobalMenuEntity), typeof(SystemUserEntity), }); var legacyRow = mainDatabase.Ado.SqlQuery( - "SELECT super_admin_only, allow_tenant_when_super_admin_only, app_scope FROM global_menu_entity WHERE id = @id", + "SELECT super_admin_only, allow_admin_when_super_admin_only, app_scope FROM global_menu_entity WHERE id = @id", new SugarParameter("@id", LegacyMenuId)).Single(); - // 老行读到实体 DefaultValue(与原 EnsureColumn 回填值一致:false/0/false/Tenant=0) + // 老行读到实体 DefaultValue(与原 EnsureColumn 回填值一致:false/0/false/Business=0) Assert.False((bool)legacyRow.super_admin_only); - Assert.False((bool)legacyRow.allow_tenant_when_super_admin_only); + Assert.False((bool)legacyRow.allow_admin_when_super_admin_only); Assert.Equal((int)MenuAppScopeEnum.Console, (int)legacyRow.app_scope); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/DiffLogCompletionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/DiffLogCompletionTests.cs index 0842679d..7dc4a830 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/DiffLogCompletionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/DiffLogCompletionTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Core.Extension; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant; +using GameFrameX.Entity.Business; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -25,7 +25,7 @@ public async Task InsertThenUpdate_WithSlowAudit_CompletesAuditBeforeReusingPost { var database = scope.GetConnectionScope("main"); database.Aop.DataExecuting = SqlSugarAopHelper.HandleBaseAudit; - database.CodeFirst.InitTables(); + database.CodeFirst.InitTables(); typeof(SqlSugarSetup).GetMethod("SetDbDiffLog", BindingFlags.NonPublic | BindingFlags.Static)! .Invoke(null, new object[] { database, config }); // 旧回调是 async void,慢审计尚未完成就返回,下一条 UPDATE 会争用同一个 Npgsql 连接。 @@ -39,14 +39,14 @@ public async Task InsertThenUpdate_WithSlowAudit_CompletesAuditBeforeReusingPost database.Ado.ExecuteCommand("CREATE TRIGGER slow_audit BEFORE INSERT ON system_log_diff_entity FOR EACH ROW EXECUTE FUNCTION slow_audit()"); for (var index = 1; index <= 30; index++) { - var channel = new TenantChannelDefinitionEntity { Id = index, Code = "regression-" + index, Name = "渠道", Description = "regression", PlatformCode = "all", IsEnabled = true }; + var channel = new ChannelDefinitionEntity { Id = index, Code = "regression-" + index, Name = "渠道", Description = "regression", PlatformCode = "all", IsEnabled = true }; await database.InsertWithDiffLogAsync(channel); // 不等待后台队列:业务返回时审计必须已经落库,随后立即复用该连接。 Assert.Equal(index, await database.Queryable().CountAsync()); - await database.Updateable().SetColumns(row => row.Name == "updated").Where(row => row.Id == index).ExecuteCommandAsync(); + await database.Updateable().SetColumns(row => row.Name == "updated").Where(row => row.Id == index).ExecuteCommandAsync(); } - Assert.Equal(30, await database.Queryable().CountAsync(row => row.Name == "updated")); + Assert.Equal(30, await database.Queryable().CountAsync(row => row.Name == "updated")); } } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs index df4c9e44..b4ccc5dd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs @@ -11,13 +11,13 @@ namespace GameFrameX.Core.Tests.SqlSugar; // 这三个测试在阶段 A 预期为 RED(失败),其失败列表即实体命名矩阵与重命名/补 Attribute 的待办清单; // 阶段 B 完成实体重命名、Attribute 补齐、SqlSugarEntityBoundary 中心化映射删除后转 GREEN。 // -// 互斥边界 Attribute 集合为:PlatformTable / TenantTable / GlobalTable。 +// 互斥边界 Attribute 集合为:PlatformTable / BusinessTable / GlobalTable。 // [SystemTable] 来自外部包,属兼容元数据,不参与 Admin 数据边界路由,不计入互斥校验。 public class EntityTableNameAlignmentTests { /// - /// 受管持久化实体必须且只能拥有一个边界 Attribute(PlatformTable/TenantTable/GlobalTable)。 + /// 受管持久化实体必须且只能拥有一个边界 Attribute(PlatformTable/BusinessTable/GlobalTable)。 /// 阶段 A 预期 RED:当前大量实体未补齐边界 Attribute,依赖 SqlSugarEntityBoundary 的实体名 HashSet 判定归属。 /// [Fact] @@ -59,7 +59,7 @@ public void AllEntities_ClassNameUnderlinedEqualsPhysicalTableName() /// /// 实体类名前缀必须与其边界归属的物理前缀一致: - /// System* -> system_、Global* -> global_、Tenant* -> tenant_、Log* -> log_。 + /// System* -> system_、Global* -> global_、Business* -> tenant_、Log* -> log_。 /// 阶段 A 预期 RED:阶段 B 完成实体重命名 + Attribute 补齐后转 GREEN。 /// [Fact] @@ -101,7 +101,7 @@ private static int BoundaryAttributeCount(Type type) count++; } - if (type.IsDefined(typeof(TenantTableAttribute), false)) + if (type.IsDefined(typeof(BusinessTableAttribute), false)) { count++; } @@ -120,7 +120,7 @@ private static string ClassExpectedPrefix(DatabaseOwnership ownership) { DatabaseOwnership.System => "System", DatabaseOwnership.Global => "Global", - DatabaseOwnership.Tenant => "Tenant", + DatabaseOwnership.Business => "Business", _ => string.Empty, }; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionPackageFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionPackageFilterTests.cs index 9427dc5d..360fbe3c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionPackageFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionPackageFilterTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -22,7 +22,7 @@ public GameAppAssetPackageVersionPackageFilterTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppAssetPackageVersionEntity)); + _db.CodeFirst.InitTables(typeof(GameAppAssetPackageVersionEntity)); } @@ -68,16 +68,16 @@ public async Task DifferentPackageKey_NotDetectedAsDuplicate() Assert.False(exists); } - private ISugarQueryable BuildQuery(string? package) + private ISugarQueryable BuildQuery(string? package) { var normalizedPackage = string.IsNullOrWhiteSpace(package) ? string.Empty : package.Trim(); - return _db.Queryable() + return _db.Queryable() .WhereIF(!string.IsNullOrEmpty(normalizedPackage), u => u.Package == normalizedPackage); } private async Task CheckAssetPackageVersionDuplicate(string channel, string platform, string appVersion, string package, string language, string assetPackageName) { - return await _db.Queryable() + return await _db.Queryable() .AnyAsync(u => u.Channel == channel && u.Platform == platform && u.AppVersion == appVersion @@ -95,9 +95,9 @@ private async Task SeedAsync() await _db.Insertable(BuildAssetVersion(4, "default", now)).ExecuteCommandAsync(); } - private static TenantGameAppAssetPackageVersionEntity BuildAssetVersion(long id, string package, long now) + private static GameAppAssetPackageVersionEntity BuildAssetVersion(long id, string package, long now) { - return new TenantGameAppAssetPackageVersionEntity + return new GameAppAssetPackageVersionEntity { Id = id, Channel = "default", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionSelectTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionSelectTests.cs index 7d98b180..ebe279b6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionSelectTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppAssetPackageVersionSelectTests.cs @@ -3,9 +3,9 @@ using GameFrameX.Core.BaseInputOutput; using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.Release; -using GameFrameX.Entity.Tenant.Game.Resource; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.Release; +using GameFrameX.Entity.Business.Game.Resource; using GameFrameX.Foundation.Orm.Entity; using SqlSugar; @@ -29,7 +29,7 @@ public GameAppAssetPackageVersionSelectTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity), typeof(TenantGameAppAssetPackageVersionEntity)); + _db.CodeFirst.InitTables(typeof(GameAppPackageEntity), typeof(GameAppAssetPackageVersionEntity)); } [Fact] @@ -64,10 +64,10 @@ public async Task Select_MissingPackageId_ReturnsEmptyList() private async Task> BuildSelectAsync(long? appPackageId, string? searchKey = null) { var service = new GameAppAssetPackageVersionService( - Repository(), - Repository(), - Repository(), - Repository()); + Repository(), + Repository(), + Repository(), + Repository()); return await service.SelectAsync(new PageGameAppAssetPackageVersionSelectRequest { @@ -85,7 +85,7 @@ private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameAppPackageEntity + await _db.Insertable(new GameAppPackageEntity { Id = 1, Name = "pkg-a", @@ -99,7 +99,7 @@ await _db.Insertable(new TenantGameAppPackageEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppPackageEntity + await _db.Insertable(new GameAppPackageEntity { Id = 2, Name = "pkg-b", @@ -113,7 +113,7 @@ await _db.Insertable(new TenantGameAppPackageEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppPackageEntity + await _db.Insertable(new GameAppPackageEntity { Id = 3, Name = "pkg-c", @@ -127,7 +127,7 @@ await _db.Insertable(new TenantGameAppPackageEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppAssetPackageVersionEntity + await _db.Insertable(new GameAppAssetPackageVersionEntity { Id = 11, Channel = "default", @@ -143,7 +143,7 @@ await _db.Insertable(new TenantGameAppAssetPackageVersionEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppAssetPackageVersionEntity + await _db.Insertable(new GameAppAssetPackageVersionEntity { Id = 12, Channel = "default", @@ -159,7 +159,7 @@ await _db.Insertable(new TenantGameAppAssetPackageVersionEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppAssetPackageVersionEntity + await _db.Insertable(new GameAppAssetPackageVersionEntity { Id = 13, Channel = "default", @@ -175,7 +175,7 @@ await _db.Insertable(new TenantGameAppAssetPackageVersionEntity IsDeleted = false, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameAppAssetPackageVersionEntity + await _db.Insertable(new GameAppAssetPackageVersionEntity { Id = 21, Channel = "default", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppPackageDisabledVisibilityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppPackageDisabledVisibilityTests.cs index c3431b4e..b696e4be 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppPackageDisabledVisibilityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppPackageDisabledVisibilityTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -27,7 +27,7 @@ public GameAppPackageDisabledVisibilityTests() // 复刻生产全局过滤器:软删除 + 启用/禁用(ISafeEnabledFilter 即 BLA-28 根因)。 SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); SqlSugarUnifiedConfig.ConfigureClientFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity)); + _db.CodeFirst.InitTables(typeof(GameAppPackageEntity)); } [Fact] @@ -37,7 +37,7 @@ public async Task GlobalEnabledFilter_HidesDisabledPackage_ReproducesBla28() await SeedAsync(2, false, false, null); // 旧 BuildPageQuery 行为:AsQueryable() 未绕过过滤器 → 禁用记录被 ISafeEnabledFilter 排除。 - var rows = await _db.Queryable().ToListAsync(); + var rows = await _db.Queryable().ToListAsync(); var ids = rows.Select(u => u.Id).OrderBy(u => u).ToList(); Assert.Equal(new List { 1, }, ids); @@ -52,7 +52,7 @@ public async Task FixPattern_FilterNullTrue_ExposesDisabledAndKeepsSoftDelete() await SeedAsync(3, true, true, null); // 修复后 BuildPageQuery 行为:绕过全部过滤器,手动补 IsDeleted==false。 - var rows = await _db.Queryable() + var rows = await _db.Queryable() .Filter(null, true) .Where(u => u.IsDeleted == false) .ToListAsync(); @@ -69,9 +69,9 @@ public async Task FixPattern_MainDatabase_ReturnsAllActivePackages() await SeedAsync(2, false, false, 2); await SeedAsync(3, false, false, null); - long? tenantId = 1; + long? id = 1; // 修复后查询:绕过过滤器 + IsDeleted==false + 租户隔离 WhereIF(精确复刻 ConfigureAdminFilters 谓词)。 - var rows = await _db.Queryable() + var rows = await _db.Queryable() .Filter(null, true) .Where(u => u.IsDeleted == false) .ToListAsync(); @@ -86,12 +86,12 @@ public async Task FixPattern_SetStatusLookup_FindsDisabledPackageById() await SeedAsync(1, false, false, null); // 旧 SetStatusAsync 行为:GetFirstAsync 受 ISafeEnabledFilter 影响,找不到禁用记录(抛“分包不存在”)。 - var blocked = await _db.Queryable().FirstAsync(u => u.Id == 1); + var blocked = await _db.Queryable().FirstAsync(u => u.Id == 1); Assert.Null(blocked); // 修复后 SetStatusAsync 行为:绕过过滤器 + IsDeleted==false,按 Id 命中禁用记录,可继续重新启用。 - long? tenantId = null; - var found = await _db.Queryable() + long? id = null; + var found = await _db.Queryable() .Filter(null, true) .Where(u => u.IsDeleted == false) .FirstAsync(u => u.Id == 1); @@ -101,9 +101,9 @@ public async Task FixPattern_SetStatusLookup_FindsDisabledPackageById() Assert.False(found.IsEnabled); } - private async Task SeedAsync(long id, bool? isEnabled, bool isDeleted, long? tenantId) + private async Task SeedAsync(long id, bool? isEnabled, bool isDeleted, long? id) { - var entity = new TenantGameAppPackageEntity + var entity = new GameAppPackageEntity { Id = id, Name = $"pkg-{id}", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppReleaseVersionPackageFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppReleaseVersionPackageFilterTests.cs index 12f2a4cd..757a2f88 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppReleaseVersionPackageFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameAppReleaseVersionPackageFilterTests.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -22,7 +22,7 @@ public GameAppReleaseVersionPackageFilterTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppReleaseVersionEntity)); + _db.CodeFirst.InitTables(typeof(GameAppReleaseVersionEntity)); } @@ -81,16 +81,16 @@ public async Task UpdateExcludeSelfId_NotDetectedAsDuplicate() Assert.False(exists); } - private ISugarQueryable BuildQuery(string? package) + private ISugarQueryable BuildQuery(string? package) { var normalizedPackage = string.IsNullOrWhiteSpace(package) ? string.Empty : package.Trim(); - return _db.Queryable() + return _db.Queryable() .WhereIF(!string.IsNullOrEmpty(normalizedPackage), u => u.Package == normalizedPackage); } private async Task CheckReleaseVersionDuplicate(string channel, string platform, string oldVersion, string appVersion, string package, string language, long? excludeId) { - var query = _db.Queryable() + var query = _db.Queryable() .Where(u => u.Channel == channel && u.Platform == platform && u.OldVersion == oldVersion @@ -114,9 +114,9 @@ private async Task SeedAsync() await _db.Insertable(BuildVersion(4, "default", now)).ExecuteCommandAsync(); } - private static TenantGameAppReleaseVersionEntity BuildVersion(long id, string package, long now) + private static GameAppReleaseVersionEntity BuildVersion(long id, string package, long now) { - return new TenantGameAppReleaseVersionEntity + return new GameAppReleaseVersionEntity { Id = id, Channel = "default", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRedeemCodeUseRecordChannelTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRedeemCodeUseRecordChannelTests.cs index b6cf3343..74396fb1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRedeemCodeUseRecordChannelTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRedeemCodeUseRecordChannelTests.cs @@ -1,6 +1,6 @@ using GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.Dto; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -26,9 +26,9 @@ public GameRedeemCodeUseRecordChannelTests() _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameRedeemCodeChannelEntity), - typeof(TenantGameRedeemCodeEntity), - typeof(TenantGameRedeemCodeUseRecordEntity)); + typeof(GameRedeemCodeChannelEntity), + typeof(GameRedeemCodeEntity), + typeof(GameRedeemCodeUseRecordEntity)); } /// @@ -100,12 +100,12 @@ private ISugarQueryable BuildQuery(long? channe // 复刻 GameRedeemCodeUseRecordEntityService.BuildPageQuery 的 BLA-32 增量部分(兑换码 + 渠道 join、ChannelId 过滤与投影)。 // 注:区服 LeftJoin 是 BuildPageQuery 既有逻辑(非 BLA-32 范围)且本测试不校验区服列,此处不复刻; // 同时可避免与 GameOrderShipServiceTests(不以 ConfigureBaseSettings 初始化、PascalCase 表名)共享 SqlSugar 静态实体缓存导致的 join 表名漂移。 - return _db.Queryable() + return _db.Queryable() .WhereIF(areaId > 0, u => u.AreaId == areaId) .WhereIF(!string.IsNullOrWhiteSpace(code), u => u.Code == code) .WhereIF(playerId > 0, u => u.PlayerId == playerId) - .LeftJoin((u, c) => u.Code == c.Code && u.AreaId == c.AreaId) - .LeftJoin((u, c, channel) => c.ChannelId == channel.Id) + .LeftJoin((u, c) => u.Code == c.Code && u.AreaId == c.AreaId) + .LeftJoin((u, c, channel) => c.ChannelId == channel.Id) .WhereIF(channelId > 0, (u, c, channel) => c.ChannelId == channelId) .Select((u, c, channel) => new GameRedeemCodeUseRecordResponse { @@ -127,41 +127,41 @@ private async Task SeedAsync() // 注:区服表仅 InitTables 建表,不 seed:area 为 LEFT JOIN,测试不依赖区服列; // 区服实体含多个 NOT NULL 列,seed 会触发约束,故略过。 - await _db.Insertable(new TenantGameRedeemCodeChannelEntity + await _db.Insertable(new GameRedeemCodeChannelEntity { Id = 10, Name = "渠道A", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeChannelEntity + await _db.Insertable(new GameRedeemCodeChannelEntity { Id = 11, Name = "渠道B", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeEntity + await _db.Insertable(new GameRedeemCodeEntity { Id = 100, AreaId = 1, Code = "CODE1", ChannelId = 10, IsActive = true, UsageLimit = 100, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d1", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeEntity + await _db.Insertable(new GameRedeemCodeEntity { Id = 101, AreaId = 1, Code = "CODE2", ChannelId = null, IsActive = true, UsageLimit = 100, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d2", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeEntity + await _db.Insertable(new GameRedeemCodeEntity { Id = 102, AreaId = 2, Code = "CODE3", ChannelId = 11, IsActive = true, UsageLimit = 100, UsedCount = 0, StartTime = nowDt, EndTime = nowDt, Description = "d3", Contents = "[]", IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeUseRecordEntity + await _db.Insertable(new GameRedeemCodeUseRecordEntity { Id = 1, AreaId = 1, Code = "CODE1", PlayerId = 1, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeUseRecordEntity + await _db.Insertable(new GameRedeemCodeUseRecordEntity { Id = 2, AreaId = 1, Code = "CODE2", PlayerId = 2, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeUseRecordEntity + await _db.Insertable(new GameRedeemCodeUseRecordEntity { Id = 3, AreaId = 2, Code = "CODE3", PlayerId = 3, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); - await _db.Insertable(new TenantGameRedeemCodeUseRecordEntity + await _db.Insertable(new GameRedeemCodeUseRecordEntity { Id = 4, AreaId = 1, Code = "CODE1", PlayerId = 4, IsDeleted = false, CreatedTime = now, }).ExecuteCommandAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/TenantGameRoleAdvertisementEntityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs similarity index 65% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/TenantGameRoleAdvertisementEntityTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs index f66746b3..f6a8a4fd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/TenantGameRoleAdvertisementEntityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs @@ -1,17 +1,17 @@ using System.Reflection; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; /// 角色广告索引必须在无作用域列的真实表上成功创建。 -public sealed class TenantGameRoleAdvertisementEntityTests : IDisposable +public sealed class GameRoleAdvertisementEntityTests : IDisposable { private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"role_ad_index_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _db; - public TenantGameRoleAdvertisementEntityTests() + public GameRoleAdvertisementEntityTests() { var config = new ConnectionConfig { @@ -25,20 +25,20 @@ public TenantGameRoleAdvertisementEntityTests() [Fact] public void TenantGameRoleAdvertisement_HasNoTenantScope() { - var tenantId = typeof(TenantGameRoleAdvertisementEntity).GetProperty( - "TenantId", + var id = typeof(GameRoleAdvertisementEntity).GetProperty( + "Id", BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy); - Assert.Null(tenantId); + Assert.Null(id); } [Fact] public void InitTables_AcceptsBusinessIndexesWithoutTenantScope() { - _db.CodeFirst.InitTables(typeof(TenantGameRoleAdvertisementEntity)); + _db.CodeFirst.InitTables(typeof(GameRoleAdvertisementEntity)); - var columns = _db.EntityMaintenance.GetEntityInfo().Columns; - Assert.DoesNotContain(columns, c => c.PropertyName is "TenantId" or "AppId"); + var columns = _db.EntityMaintenance.GetEntityInfo().Columns; + Assert.DoesNotContain(columns, c => c.PropertyName is "Id" or "AppId"); } public void Dispose() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/MainDatabaseVersionDefinitionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/MainDatabaseVersionDefinitionTests.cs index a2d4c448..99d8a995 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/MainDatabaseVersionDefinitionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/MainDatabaseVersionDefinitionTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Core.Tests.SqlSugar; @@ -76,8 +76,8 @@ await service.UpdateAsync(new UpdateGameAppVersionDefinitionRequest private static async Task CreateServiceAsync(ClientApiTestDb database) { - database.InitTenantTables(typeof(TenantGameAppVersionDefinitionEntity)); - var service = new GameAppVersionDefinitionService(new SqlSugarRepository + database.InitBusinessTables(typeof(GameAppVersionDefinitionEntity)); + var service = new GameAppVersionDefinitionService(new SqlSugarRepository { Context = database.MainDb, }); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/OptimisticConcurrencyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/OptimisticConcurrencyTests.cs index b344daf7..93e9a079 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/OptimisticConcurrencyTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/OptimisticConcurrencyTests.cs @@ -4,7 +4,7 @@ using GameFrameX.Core.Service.Base; using GameFrameX.Core.Extension; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; using SqlSugar; using ClientRepository = GameFrameX.Core.SqlSugar.Repository; @@ -27,14 +27,14 @@ public OptimisticConcurrencyTests() }; SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); - _db.CodeFirst.InitTables(typeof(TenantGameGoodsEntity), typeof(OptimisticTestEntity)); + _db.CodeFirst.InitTables(typeof(GameGoodsEntity), typeof(OptimisticTestEntity)); } [Fact] public void VersionColumn_UsesSqlSugarOptimisticLockMetadata() { - var versionColumn = _db.EntityMaintenance.GetEntityInfo().Columns - .Single(column => column.PropertyName == nameof(TenantGameGoodsEntity.RowVersion)); + var versionColumn = _db.EntityMaintenance.GetEntityInfo().Columns + .Single(column => column.PropertyName == nameof(GameGoodsEntity.RowVersion)); Assert.True(versionColumn.IsEnableUpdateVersionValidation); } @@ -78,7 +78,7 @@ public async Task Middleware_WhenVersionConflicts_ReturnsStableHttp409Body() [Fact] public async Task OptimisticUpdate_WhenSnapshotsHaveSameVersion_RejectsSecondWrite() { - var entity = new TenantGameGoodsEntity + var entity = new GameGoodsEntity { Id = 1, Name = "initial", @@ -88,8 +88,8 @@ public async Task OptimisticUpdate_WhenSnapshotsHaveSameVersion_RejectsSecondWri }; await _db.Insertable(entity).ExecuteCommandAsync(); - var firstSnapshot = await _db.Queryable().InSingleAsync(entity.Id); - var secondSnapshot = await _db.Queryable().InSingleAsync(entity.Id); + var firstSnapshot = await _db.Queryable().InSingleAsync(entity.Id); + var secondSnapshot = await _db.Queryable().InSingleAsync(entity.Id); firstSnapshot.Name = "first"; secondSnapshot.Name = "second"; @@ -97,7 +97,7 @@ public async Task OptimisticUpdate_WhenSnapshotsHaveSameVersion_RejectsSecondWri await Assert.ThrowsAsync(() => _db.Updateable(secondSnapshot).ExecuteCommandWithOptLockAsync(true)); - var persisted = await _db.Queryable().InSingleAsync(entity.Id); + var persisted = await _db.Queryable().InSingleAsync(entity.Id); Assert.Equal(1, firstRows); Assert.Equal("first", persisted.Name); Assert.NotEqual(0, persisted.RowVersion); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs index 4cde1cbd..f511adb2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs @@ -55,11 +55,11 @@ public void PhysicalTablePrefix_IsRestrictedByDatabaseOwnership() { Assert.True(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.System, "system_user")); Assert.True(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.System, "global_menu")); - Assert.False(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.System, "tenant_user")); + Assert.False(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.System, "user")); - Assert.True(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.Tenant, "tenant_user")); - Assert.False(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.Tenant, "system_user")); - Assert.False(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.Tenant, "global_menu")); + Assert.True(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.Business, "user")); + Assert.False(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.Business, "system_user")); + Assert.False(SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(DatabaseOwnership.Business, "global_menu")); } [Fact] @@ -95,7 +95,7 @@ private static bool IsThirdPartyContractMirror(Type type) var ns = type.Namespace ?? string.Empty; return ns.StartsWith("GameFrameX.Client.Api.Integrations.", StringComparison.Ordinal) || ns.StartsWith("GameFrameX.Hub.Api.Dto.WebHook", StringComparison.Ordinal) - || type.FullName == "GameFrameX.Client.Api.GameWebShop.Dto.TenantGameWebShopEntityBuyNotifyRequest"; + || type.FullName == "GameFrameX.Client.Api.GameWebShop.Dto.GameWebShopEntityBuyNotifyRequest"; } private static IEnumerable EntityTypes() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs index 035ad04b..e9add7ae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Application.SeedData.System; using GameFrameX.Core.Cache; using GameFrameX.Core.Option; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.System; using GameFrameX.Entity.Global; @@ -116,26 +116,26 @@ public void InitDatabase_EnableIncreSeedTrue_RunsAuthoritativeSeedsOnly() [Fact] public void DefaultTenantSeeder_Upsert_InsertsMissingRowsOnly() { - using (var scope = CreateScope("tenant_2001")) + using (var scope = CreateScope("2001")) { - var tenantConfig = CreateConfig("tenant_2001"); - SqlSugarSetup.InitDatabase(scope, tenantConfig, new[] { typeof(TenantRoleEntity), }); + var config = CreateConfig("2001"); + SqlSugarSetup.InitDatabase(scope, config, new[] { typeof(RoleEntity), }); - var tenantDb = scope.GetConnectionScope("tenant_2001"); - var role = new TenantRoleEntity { Id = 99001, Name = "初始角色", Code = "init_role", }; - DefaultTenantDatabaseSeeder.Upsert(tenantDb, new[] { role, }); + var db = scope.GetConnectionScope("2001"); + var role = new RoleEntity { Id = 99001, Name = "初始角色", Code = "init_role", }; + DefaultDatabaseSeeder.Upsert(db, new[] { role, }); // 模拟用户在管理端改名 - tenantDb.Updateable() + db.Updateable() .SetColumns(u => u.Name == "用户改过") .Where(u => u.Id == 99001) .ExecuteCommand(); // 二次 seed(如默认租户库重复初始化):同名主键行不再覆盖 - var seedAgain = new TenantRoleEntity { Id = 99001, Name = "seed 新值", Code = "init_role", }; - DefaultTenantDatabaseSeeder.Upsert(tenantDb, new[] { seedAgain, }); + var seedAgain = new RoleEntity { Id = 99001, Name = "seed 新值", Code = "init_role", }; + DefaultDatabaseSeeder.Upsert(db, new[] { seedAgain, }); - var name = tenantDb.Queryable().First(u => u.Id == 99001).Name; + var name = db.Queryable().First(u => u.Id == 99001).Name; Assert.Equal("用户改过", name); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs index 0aa61f73..dfa96099 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs @@ -1,7 +1,7 @@ using GameFrameX.Core.Option; using GameFrameX.Application.SeedData.Client; -using GameFrameX.Entity.Tenant.Device; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Device; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Application.SeedData.System; using GameFrameX.Core.Cache; using GameFrameX.Core.Tests.System; @@ -10,11 +10,11 @@ using GameFrameX.Core.Const.MenuSeed; using GameFrameX.Application.Platform.TimeJob.GameTimeJob.Dto; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Entity.Global; using GameFrameX.Entity.System; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; using SqlSugar; namespace GameFrameX.Core.Tests.SqlSugar; @@ -25,23 +25,23 @@ public class SqlSugarDatabaseInitializationTests : IDisposable private static readonly Type[] InitializationTypes = { typeof(SystemUserEntity), - typeof(TenantUserEntity), + typeof(UserEntity), typeof(GlobalMenuEntity), typeof(SystemConfigEntity), typeof(GlobalConfigEntity), typeof(GlobalDictionaryTypeEntity), typeof(GlobalDictionaryDataEntity), typeof(GlobalChannelDefinitionEntity), - typeof(TenantChannelDefinitionEntity), - typeof(TenantGameGoodsEntity), + typeof(ChannelDefinitionEntity), + typeof(GameGoodsEntity), typeof(SystemLogVisitEntity), typeof(SystemLogOperationEntity), typeof(SystemLogVisitArchiveEntity), typeof(SystemLogOperationArchiveEntity), typeof(SystemLogDiffEntity), - typeof(TenantLogVisitEntity), - typeof(TenantLogOperationEntity), - typeof(TenantLogDiffEntity), + typeof(LogVisitEntity), + typeof(LogOperationEntity), + typeof(LogDiffEntity), }; private readonly List _dbPaths = new(); @@ -54,21 +54,21 @@ public void InitDatabase_SeedsBusinessDefaultsOnce_AndKeepsOperatorChanges() { var config = CreateConfig("main"); config.SeedSettings.EnableInitSeed = true; - var types = new[] { typeof(GlobalMenuEntity), typeof(GlobalMenuSeedData), typeof(TenantChannelDefinitionEntity), - typeof(BusinessChannelSeedData), typeof(TenantGameAppDeviceGroupEntity), typeof(GameAppDeviceGroupSeedData), - typeof(TenantGameAppVersionDefinitionEntity), typeof(GameAppVersionDefinitionSeedData) }; + var types = new[] { typeof(GlobalMenuEntity), typeof(GlobalMenuSeedData), typeof(ChannelDefinitionEntity), + typeof(BusinessChannelSeedData), typeof(GameAppDeviceGroupEntity), typeof(GameAppDeviceGroupSeedData), + typeof(GameAppVersionDefinitionEntity), typeof(GameAppVersionDefinitionSeedData) }; SqlSugarSetup.InitDatabase(scope, config, types); var database = scope.GetConnectionScope("main"); - var channel = Assert.Single(database.Queryable().ToList()); + var channel = Assert.Single(database.Queryable().ToList()); Assert.Equal("business-default", channel.Code); Assert.True(channel.IsDefault); Assert.True(channel.IsEnabled); - Assert.Single(database.Queryable().ToList()); - Assert.Equal(new[] { "1.0.0", "default" }, database.Queryable().OrderBy(row => row.Name).Select(row => row.Name).ToArray()); - database.Updateable().SetColumns(row => new TenantChannelDefinitionEntity + Assert.Single(database.Queryable().ToList()); + Assert.Equal(new[] { "1.0.0", "default" }, database.Queryable().OrderBy(row => row.Name).Select(row => row.Name).ToArray()); + database.Updateable().SetColumns(row => new ChannelDefinitionEntity { Name = "运维修改", IsEnabled = false, IsDeleted = true }).Where(row => row.Id == channel.Id).ExecuteCommand(); SqlSugarSetup.InitDatabase(scope, config, types); - var actual = Assert.Single(database.Queryable().Filter(null, true).ToList()); + var actual = Assert.Single(database.Queryable().Filter(null, true).ToList()); Assert.Equal("运维修改", actual.Name); Assert.False(actual.IsEnabled); Assert.True(actual.IsDeleted); @@ -86,14 +86,14 @@ public void InitDatabase_OnlySeedsSuperAdmin_AndPreservesExistingOperationsUsers var userSeeds = typeof(SystemUserSeedData).Assembly.GetTypes().Where(type => !type.IsAbstract && type.GetInterfaces().Any(contract => contract.IsGenericType && contract.GetGenericTypeDefinition() == typeof(ISqlSugarEntitySeedData<>) - && new[] { typeof(TenantUserEntity), typeof(SystemUserEntity) }.Contains(contract.GetGenericArguments()[0]))).ToArray(); - var types = userSeeds.Concat(new[] { typeof(SystemUserEntity), typeof(TenantUserEntity), typeof(GlobalMenuEntity), typeof(GlobalMenuSeedData) }).ToArray(); + && new[] { typeof(UserEntity), typeof(SystemUserEntity) }.Contains(contract.GetGenericArguments()[0]))).ToArray(); + var types = userSeeds.Concat(new[] { typeof(SystemUserEntity), typeof(UserEntity), typeof(GlobalMenuEntity), typeof(GlobalMenuSeedData) }).ToArray(); SqlSugarSetup.InitDatabase(scope, config, types); var database = scope.GetConnectionScope("main"); Assert.Equal("superadmin", Assert.Single(database.Queryable().ToList()).Account); - Assert.Empty(database.Queryable().ToList()); - var existing = new TenantUserEntity { Id = 5001, Account = "existing-operator", Password = "existing-hash" }; - foreach (var property in typeof(TenantUserEntity).GetProperties().Where(property => property.PropertyType == typeof(string) && property.CanWrite)) + Assert.Empty(database.Queryable().ToList()); + var existing = new UserEntity { Id = 5001, Account = "existing-operator", Password = "existing-hash" }; + foreach (var property in typeof(UserEntity).GetProperties().Where(property => property.PropertyType == typeof(string) && property.CanWrite)) { if (property.GetValue(existing) == null) { @@ -103,7 +103,7 @@ public void InitDatabase_OnlySeedsSuperAdmin_AndPreservesExistingOperationsUsers database.Insertable(existing).ExecuteCommand(); SqlSugarSetup.InitDatabase(scope, config, types); - Assert.Equal("existing-hash", Assert.Single(database.Queryable().ToList()).Password); + Assert.Equal("existing-hash", Assert.Single(database.Queryable().ToList()).Password); } } @@ -117,18 +117,18 @@ public void InitDatabase_SeedsLocalStorageOnceAndPreservesExistingConfiguration( { var config = CreateConfig("main"); config.SeedSettings.EnableInitSeed = true; - var types = new[] { typeof(GlobalMenuEntity), typeof(GlobalMenuSeedData), typeof(TenantObjectStorageConfigEntity) }; + var types = new[] { typeof(GlobalMenuEntity), typeof(GlobalMenuSeedData), typeof(ObjectStorageConfigEntity) }; SqlSugarSetup.InitDatabase(scope, config, types); var database = scope.GetConnectionScope("main"); - var initial = database.Queryable().Single(); + var initial = database.Queryable().Single(); Assert.Equal("local", initial.Provider); Assert.True(initial.IsEnabled); - database.Updateable() - .SetColumns(row => new TenantObjectStorageConfigEntity { IsEnabled = enabled, IsDeleted = deleted, Remark = "保留运维配置" }) + database.Updateable() + .SetColumns(row => new ObjectStorageConfigEntity { IsEnabled = enabled, IsDeleted = deleted, Remark = "保留运维配置" }) .Where(row => row.Id == initial.Id).ExecuteCommand(); SqlSugarSetup.InitDatabase(scope, config, types); - var existing = database.Queryable().Filter(null, true).ToList(); + var existing = database.Queryable().Filter(null, true).ToList(); var actual = Assert.Single(existing); Assert.Equal(initial.Id, actual.Id); Assert.Equal(enabled, actual.IsEnabled); @@ -173,17 +173,17 @@ public void InitDatabase_ForMainConfig_CreatesAllManagedTables() Assert.True(TableExists(mainDb, typeof(GlobalDictionaryTypeEntity))); Assert.True(TableExists(mainDb, typeof(GlobalDictionaryDataEntity))); Assert.True(TableExists(mainDb, typeof(GlobalChannelDefinitionEntity))); - Assert.True(TableExists(mainDb, typeof(TenantUserEntity))); - Assert.True(TableExists(mainDb, typeof(TenantChannelDefinitionEntity))); - Assert.True(TableExists(mainDb, typeof(TenantGameGoodsEntity))); + Assert.True(TableExists(mainDb, typeof(UserEntity))); + Assert.True(TableExists(mainDb, typeof(ChannelDefinitionEntity))); + Assert.True(TableExists(mainDb, typeof(GameGoodsEntity))); Assert.True(TableExists(mainDb, typeof(SystemLogVisitEntity))); Assert.True(TableExists(mainDb, typeof(SystemLogOperationEntity))); Assert.True(TableExists(mainDb, typeof(SystemLogVisitArchiveEntity))); Assert.True(TableExists(mainDb, typeof(SystemLogOperationArchiveEntity))); Assert.True(TableExists(mainDb, typeof(SystemLogDiffEntity))); - Assert.True(TableExists(mainDb, typeof(TenantLogVisitEntity))); - Assert.True(TableExists(mainDb, typeof(TenantLogOperationEntity))); - Assert.True(TableExists(mainDb, typeof(TenantLogDiffEntity))); + Assert.True(TableExists(mainDb, typeof(LogVisitEntity))); + Assert.True(TableExists(mainDb, typeof(LogOperationEntity))); + Assert.True(TableExists(mainDb, typeof(LogDiffEntity))); Assert.Equal("system_log_operation_entity", TableName(mainDb, typeof(SystemLogOperationEntity))); Assert.Equal("system_user_entity", TableName(mainDb, typeof(SystemUserEntity))); Assert.Equal("global_menu_entity", TableName(mainDb, typeof(GlobalMenuEntity))); @@ -217,7 +217,7 @@ public void MenuSeedCatalog_LoadFromDb_KeepsRuntimeAutoPermissionMenusAsDbSource var isAffixColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.IsAffix)); var orderNoColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.OrderNo)); var superAdminOnlyColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.SuperAdminOnly)); - var allowTenantColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.AllowTenantWhenSuperAdminOnly)); + var allowColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.AllowAdminWhenSuperAdminOnly)); var isEnabledColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.IsEnabled)); var isDeletedColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.IsDeleted)); var createdIdColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.CreatedId)); @@ -226,7 +226,7 @@ public void MenuSeedCatalog_LoadFromDb_KeepsRuntimeAutoPermissionMenusAsDbSource var updateCountColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.UpdateCount)); var appScopeColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.AppScope)); mainDb.Ado.ExecuteCommand( - $"INSERT INTO {tableName} ({idColumn}, {pidColumn}, {keyColumn}, {titleColumn}, {typeColumn}, {isHideColumn}, {isIframeColumn}, {isKeepAliveColumn}, {isAffixColumn}, {orderNoColumn}, {superAdminOnlyColumn}, {allowTenantColumn}, {isEnabledColumn}, {isDeletedColumn}, {createdIdColumn}, {createdTimeColumn}, {createdNameColumn}, {updateCountColumn}, {appScopeColumn}) " + + $"INSERT INTO {tableName} ({idColumn}, {pidColumn}, {keyColumn}, {titleColumn}, {typeColumn}, {isHideColumn}, {isIframeColumn}, {isKeepAliveColumn}, {isAffixColumn}, {orderNoColumn}, {superAdminOnlyColumn}, {allowColumn}, {isEnabledColumn}, {isDeletedColumn}, {createdIdColumn}, {createdTimeColumn}, {createdNameColumn}, {updateCountColumn}, {appScopeColumn}) " + "VALUES (@legacyId, @pid, @legacyKey, @legacyTitle, @type, @falseValue, @falseValue, @trueValue, @falseValue, @orderNo, @falseValue, @falseValue, @trueValue, @falseValue, @createdId, @createdTime, @createdName, @updateCount, @appScope), " + "(@autoId, @pid, @autoKey, @autoTitle, @type, @trueValue, @falseValue, @trueValue, @falseValue, @orderNo, @falseValue, @falseValue, @trueValue, @falseValue, @createdId, @createdTime, @createdName, @updateCount, @appScope)", new SugarParameter("@legacyId", legacyId), @@ -271,14 +271,14 @@ public void MenuSeedCatalog_LoadFromDb_KeepsRuntimeAutoPermissionMenusAsDbSource [Fact] public void ProjectionDto_InheritingEntity_DoesNotRequirePhysicalOwnership() { - using var scope = CreateScope("tenant_1003"); - var tenantDb = scope.GetConnectionScope("tenant_1003"); + using var scope = CreateScope("1003"); + var db = scope.GetConnectionScope("1003"); - var sql = tenantDb.Queryable() + var sql = db.Queryable() .Select() .ToSql(); - Assert.Contains("tenant_game_time_job_entity", sql.Key, StringComparison.Ordinal); + Assert.Contains("game_time_job_entity", sql.Key, StringComparison.Ordinal); } public void Dispose() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogTenantPrefixTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogPrefixTests.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogTenantPrefixTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogPrefixTests.cs index 541d5b63..430eacde 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogTenantPrefixTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogPrefixTests.cs @@ -2,7 +2,7 @@ using GameFrameX.Core.Extension; using GameFrameX.Core.Option; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.RemoteConfig; using SqlSugar; using Xunit.Abstractions; @@ -14,10 +14,10 @@ namespace GameFrameX.Core.Tests.SqlSugar; /// + RepositoryExtension.InsertWithDiffLogAsync(.AS() + EnableDiffLogEvent,与 BaseService.InnerAddAsync 同链路)。 /// 同时手工建一张无前缀镜像表,模拟生产"旧表残留、写错表不报错"的场景:若 INSERT 落错表可精确定位。 /// -public class SqlSugarDiffLogTenantPrefixTests : IDisposable +public class SqlSugarDiffLogPrefixTests : IDisposable { private const string ConfigId = "10001"; - private const string TenantPhysicalTable = "tenant_game_app_remote_config_entity"; + private const string PhysicalTable = "game_app_remote_config_entity"; private const string LegacyUnprefixedTable = "game_app_client_config_entity"; private static readonly Regex InsertTableNameRegex = new("^INSERT\\s+INTO\\s+[`\"]?([A-Za-z0-9_]+)[`\"]?", RegexOptions.IgnoreCase | RegexOptions.Compiled); @@ -27,7 +27,7 @@ public class SqlSugarDiffLogTenantPrefixTests : IDisposable private readonly ITestOutputHelper _output; private readonly List _dbFiles = new(); - public SqlSugarDiffLogTenantPrefixTests(ITestOutputHelper output) + public SqlSugarDiffLogPrefixTests(ITestOutputHelper output) { _output = output; } @@ -39,13 +39,13 @@ public async Task Insert_PlainAndDiffLog_BothWriteTenantPrefixTable_Sqlite() using (var scope = new SqlSugarScope(new List { config, })) { var db = scope.GetConnectionScope(ConfigId); - db.CodeFirst.InitTables(typeof(TenantGameAppRemoteConfigEntity)); - var entityTableName = db.EntityMaintenance.GetEntityInfo(typeof(TenantGameAppRemoteConfigEntity)).DbTableName; + db.CodeFirst.InitTables(typeof(GameAppRemoteConfigEntity)); + var entityTableName = db.EntityMaintenance.GetEntityInfo(typeof(GameAppRemoteConfigEntity)).DbTableName; var createdTables = db.Ado.SqlQuery("SELECT name FROM sqlite_master WHERE type='table'"); _output.WriteLine($"[DBG] EntityInfo.DbTableName={entityTableName}"); _output.WriteLine($"[DBG] sqlite_master={string.Join(",", createdTables)}"); // 无前缀镜像表(列结构与 tenant_ 表一致):写错表时不报错,靠计数精确定位落表位置 - db.Ado.ExecuteCommand($"CREATE TABLE {LegacyUnprefixedTable} AS SELECT * FROM {TenantPhysicalTable} WHERE false"); + db.Ado.ExecuteCommand($"CREATE TABLE {LegacyUnprefixedTable} AS SELECT * FROM {PhysicalTable} WHERE false"); var observers = AttachObservers(db); @@ -65,14 +65,14 @@ public async Task Insert_PlainAndDiffLog_BothWriteTenantPrefixTable_Sqlite() .ToList(); Assert.Equal(2, insertTableNames.Count); - Assert.All(insertTableNames, name => Assert.Equal(TenantPhysicalTable, name)); + Assert.All(insertTableNames, name => Assert.Equal(PhysicalTable, name)); // DiffLog after-data 查回 SQL(GetDiffTableBySql 的 Context.Queryable())也必须走 tenant_ 前缀表: // 捕获窗口内不允许出现任何指向非 tenant_ 表的 SQL Assert.All(observers.CapturedSqls, sql => { var tables = SelectTableNameRegex.Matches(sql).Select(m => m.Groups[1].Value).ToList(); - Assert.All(tables, name => Assert.Equal(TenantPhysicalTable, name)); + Assert.All(tables, name => Assert.Equal(PhysicalTable, name)); }); // DiffLog 事件中的 SQL 同样带前缀 @@ -80,9 +80,9 @@ public async Task Insert_PlainAndDiffLog_BothWriteTenantPrefixTable_Sqlite() Assert.All(observers.DiffLogSqls, sql => _output.WriteLine("[DiffLogEvent] " + sql)); // 落表位置:tenant_ 表 2 行,无前缀镜像表 0 行 - var tenantRows = db.Ado.SqlQuery($"SELECT COUNT(*) FROM {TenantPhysicalTable} WHERE id IN (990001, 990002)"); + var rows = db.Ado.SqlQuery($"SELECT COUNT(*) FROM {PhysicalTable} WHERE id IN (990001, 990002)"); var legacyRows = db.Ado.SqlQuery($"SELECT COUNT(*) FROM {LegacyUnprefixedTable}"); - Assert.Equal(2, tenantRows.Single()); + Assert.Equal(2, rows.Single()); Assert.Equal(0, legacyRows.Single()); CleanupRows(db); @@ -98,8 +98,8 @@ public async Task Update_EnableDiffLogEvent_UsesTenantPrefixTable_Sqlite() using (var scope = new SqlSugarScope(new List { config, })) { var db = scope.GetConnectionScope(ConfigId); - db.CodeFirst.InitTables(typeof(TenantGameAppRemoteConfigEntity)); - db.Ado.ExecuteCommand($"CREATE TABLE {LegacyUnprefixedTable} AS SELECT * FROM {TenantPhysicalTable} WHERE false"); + db.CodeFirst.InitTables(typeof(GameAppRemoteConfigEntity)); + db.Ado.ExecuteCommand($"CREATE TABLE {LegacyUnprefixedTable} AS SELECT * FROM {PhysicalTable} WHERE false"); var observers = AttachObservers(db); @@ -119,7 +119,7 @@ await db.Updateable(entity) .Where(u => u.StartsWith("UPDATE", StringComparison.OrdinalIgnoreCase)) .Select(u => UpdateTableNameRegex.Match(u).Groups[1].Value) .Single(); - Assert.Equal(TenantPhysicalTable, updateTableName); + Assert.Equal(PhysicalTable, updateTableName); // DiffLog before/after 查询(UpdateableProvider.GetDiffTable 的 Context.Queryable())表名必须带前缀 var diffLogSelectTables = observers.CapturedSqls @@ -127,10 +127,10 @@ await db.Updateable(entity) .SelectMany(u => SelectTableNameRegex.Matches(u).Select(m => m.Groups[1].Value)) .ToList(); Assert.NotEmpty(diffLogSelectTables); - Assert.All(diffLogSelectTables, name => Assert.Equal(TenantPhysicalTable, name)); + Assert.All(diffLogSelectTables, name => Assert.Equal(PhysicalTable, name)); // 更新结果落在 tenant_ 表 - var updated = db.Queryable().Single(u => u.Id == 990003); + var updated = db.Queryable().Single(u => u.Id == 990003); Assert.Equal("difflog-repro-updated", updated.Description); var legacyRows = db.Ado.SqlQuery($"SELECT COUNT(*) FROM {LegacyUnprefixedTable}"); Assert.Equal(0, legacyRows.Single()); @@ -157,8 +157,8 @@ public async Task Insert_InsertWithDiffLogAsync_WritesTenantPrefixTable_Postgres { var db = scope.GetConnectionScope(ConfigId); db.Aop.OnError = ex => { _output.WriteLine("[PG-ERROR] " + ex.Sql); }; - db.CodeFirst.InitTables(typeof(TenantGameAppRemoteConfigEntity)); - db.Ado.ExecuteCommand($"CREATE TABLE {LegacyUnprefixedTable} AS SELECT * FROM {TenantPhysicalTable} WHERE false"); + db.CodeFirst.InitTables(typeof(GameAppRemoteConfigEntity)); + db.Ado.ExecuteCommand($"CREATE TABLE {LegacyUnprefixedTable} AS SELECT * FROM {PhysicalTable} WHERE false"); var observers = AttachObservers(db); @@ -175,11 +175,11 @@ public async Task Insert_InsertWithDiffLogAsync_WritesTenantPrefixTable_Postgres .Select(u => InsertTableNameRegex.Match(u).Groups[1].Value) .ToList(); Assert.Equal(2, insertTableNames.Count); - Assert.All(insertTableNames, name => Assert.Equal(TenantPhysicalTable, name)); + Assert.All(insertTableNames, name => Assert.Equal(PhysicalTable, name)); - var tenantRows = db.Ado.SqlQuery($"SELECT COUNT(*) FROM {TenantPhysicalTable} WHERE id IN (990004, 990005)"); + var rows = db.Ado.SqlQuery($"SELECT COUNT(*) FROM {PhysicalTable} WHERE id IN (990004, 990005)"); var legacyRows = db.Ado.SqlQuery($"SELECT COUNT(*) FROM {LegacyUnprefixedTable}"); - Assert.Equal(2, tenantRows.Single()); + Assert.Equal(2, rows.Single()); Assert.Equal(0, legacyRows.Single()); } @@ -201,9 +201,9 @@ private DbConnectionConfig CreateSqliteConfig() return config; } - private static TenantGameAppRemoteConfigEntity NewEntity(long id, string channel) + private static GameAppRemoteConfigEntity NewEntity(long id, string channel) { - return new TenantGameAppRemoteConfigEntity + return new GameAppRemoteConfigEntity { Id = id, Channel = channel, @@ -250,7 +250,7 @@ private void DumpSql(List capturedSqls, List diffLogSqls) private static void CleanupRows(SqlSugarScopeProvider db) { - db.Ado.ExecuteCommand($"DELETE FROM {TenantPhysicalTable} WHERE id IN (990001, 990002, 990003)"); + db.Ado.ExecuteCommand($"DELETE FROM {PhysicalTable} WHERE id IN (990001, 990002, 990003)"); db.Ado.ExecuteCommand($"DELETE FROM {LegacyUnprefixedTable}"); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarEntityBoundaryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarEntityBoundaryTests.cs index 0b906bfd..2f476dfa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarEntityBoundaryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarEntityBoundaryTests.cs @@ -1,14 +1,14 @@ using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.Release; -using GameFrameX.Entity.Tenant.Game.Resource; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.ClientApiConfig; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.Release; +using GameFrameX.Entity.Business.Game.Resource; using GameFrameX.Entity.Global; using GameFrameX.Entity.System; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Device; +using GameFrameX.Entity.Business.Device; namespace GameFrameX.Core.Tests.SqlSugar; @@ -22,32 +22,32 @@ public void PlatformEntity_IsPlatformDatabase() [Fact] public void TenantGameEntity_IsTenantDatabase() { - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantGameGoodsEntity))); - Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(TenantGameGoodsEntity))); - Assert.Equal("tenant_game_goods_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(TenantGameGoodsEntity), nameof(TenantGameGoodsEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(GameGoodsEntity))); + Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(GameGoodsEntity))); + Assert.Equal("game_goods_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(GameGoodsEntity), nameof(GameGoodsEntity))); } [Fact] public void TenantGameAppDeviceEntity_IsTenantDatabase() { - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantGameAppDeviceEntity))); - Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(TenantGameAppDeviceEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(TenantGameAppDeviceEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(GameAppDeviceEntity))); + Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(GameAppDeviceEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(GameAppDeviceEntity))); } [Fact] public void TenantUser_IsTenantDatabase() { - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantUserEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantUserEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(TenantUserEntity))); - Assert.Equal("tenant_user_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(TenantUserEntity), nameof(TenantUserEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(UserEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(UserEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(UserEntity))); + Assert.Equal("user_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(UserEntity), nameof(UserEntity))); } [Fact] public void TenantGameEntity_IsInitializedInMainDatabase() { - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantGameGoodsEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(GameGoodsEntity))); } [Fact] @@ -55,20 +55,20 @@ public void TenantGameGoodsEntityFamily_UsesTenantGameAppPrefixAndEntitySuffix() { var entityTypes = new[] { - typeof(TenantGameAppPackageEntity), - typeof(TenantGameAppOpenAccessEntity), - typeof(TenantGameAppAssetPackageEntity), - typeof(TenantGameAppAssetPackageVersionEntity), - typeof(TenantGameAppAssetPackageVersionHistoryEntity), - typeof(TenantGameAppRemoteConfigEntity), - typeof(TenantGameAppRemoteConfigKeyEntity), - typeof(TenantGameAppRemoteConfigModeEntity), - typeof(TenantGameAppReleaseVersionEntity), - typeof(TenantGameAppVersionDefinitionEntity), + typeof(GameAppPackageEntity), + typeof(GameAppOpenAccessEntity), + typeof(GameAppAssetPackageEntity), + typeof(GameAppAssetPackageVersionEntity), + typeof(GameAppAssetPackageVersionHistoryEntity), + typeof(GameAppRemoteConfigEntity), + typeof(GameAppRemoteConfigKeyEntity), + typeof(GameAppRemoteConfigModeEntity), + typeof(GameAppReleaseVersionEntity), + typeof(GameAppVersionDefinitionEntity), }; var failures = entityTypes - .Where(type => !type.Name.StartsWith("TenantGameApp", StringComparison.Ordinal) + .Where(type => !type.Name.StartsWith("GameApp", StringComparison.Ordinal) || !type.Name.EndsWith("Entity", StringComparison.Ordinal)) .Select(type => type.Name) .ToList(); @@ -79,16 +79,16 @@ public void TenantGameGoodsEntityFamily_UsesTenantGameAppPrefixAndEntitySuffix() [Fact] public void HostedSchedulerEntity_IsInitializedInMainDatabaseForCompatibility() { - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantGameTimeJobEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantGameTimeJobEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(TenantGameTimeJobEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(GameTimeJobEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(GameTimeJobEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(GameTimeJobEntity))); } [Fact] public void OnlineUserEntity_IsInitializedInMainDatabaseForCompatibility() { - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantOnlineUserEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantOnlineUserEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(OnlineUserEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(OnlineUserEntity))); } [Fact] @@ -96,18 +96,18 @@ public void SystemLogEntity_IsPlatformMainDatabase() { Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemLogOperationEntity))); Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(SystemLogOperationEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(SystemLogOperationEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(SystemLogOperationEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(SystemLogOperationEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(SystemLogOperationEntity))); Assert.Equal("system_log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(SystemLogOperationEntity), nameof(SystemLogOperationEntity))); } [Fact] public void TenantLogEntity_IsTenantDatabase() { - Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(TenantLogOperationEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantLogOperationEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(TenantLogOperationEntity))); - Assert.Equal("tenant_log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(TenantLogOperationEntity), nameof(TenantLogOperationEntity))); + Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(LogOperationEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(LogOperationEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(LogOperationEntity))); + Assert.Equal("log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(LogOperationEntity), nameof(LogOperationEntity))); } [Fact] @@ -115,7 +115,7 @@ public void SystemUser_IsSystemDatabase() { Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(SystemUserEntity))); Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemUserEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(SystemUserEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(SystemUserEntity))); Assert.Equal("system_user_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(SystemUserEntity), nameof(SystemUserEntity))); } @@ -124,7 +124,7 @@ public void GlobalMenu_IsGlobalDatabase() { Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(GlobalMenuEntity))); Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(GlobalMenuEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(GlobalMenuEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(GlobalMenuEntity))); Assert.Equal("global_menu_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(GlobalMenuEntity), nameof(GlobalMenuEntity))); } @@ -133,14 +133,14 @@ public void DictionaryEntities_AreGlobalDatabase() { Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(GlobalDictionaryTypeEntity))); Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(GlobalDictionaryTypeEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(GlobalDictionaryTypeEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(GlobalDictionaryTypeEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(GlobalDictionaryTypeEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(GlobalDictionaryTypeEntity))); Assert.Equal("global_dictionary_type_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(GlobalDictionaryTypeEntity), nameof(GlobalDictionaryTypeEntity))); Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(GlobalDictionaryDataEntity))); Assert.False(SqlSugarEntityBoundary.IsPlatformTable(typeof(GlobalDictionaryDataEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(GlobalDictionaryDataEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(GlobalDictionaryDataEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(GlobalDictionaryDataEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(GlobalDictionaryDataEntity))); Assert.Equal("global_dictionary_data_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(GlobalDictionaryDataEntity), nameof(GlobalDictionaryDataEntity))); } @@ -161,25 +161,25 @@ public void EmailConfigEntities_AreSplitBetweenSystemAndTenantDatabases() { Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemEmailProviderEntity))); Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(SystemEmailProviderEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(SystemEmailProviderEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(SystemEmailProviderEntity))); Assert.Equal("system_email_provider_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(SystemEmailProviderEntity), nameof(SystemEmailProviderEntity))); - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantEmailConfigEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantEmailConfigEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(TenantEmailConfigEntity))); - Assert.Equal("tenant_email_config_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(TenantEmailConfigEntity), nameof(TenantEmailConfigEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(EmailConfigEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(EmailConfigEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(EmailConfigEntity))); + Assert.Equal("email_config_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(EmailConfigEntity), nameof(EmailConfigEntity))); } [Fact] public void ChannelDefinitionEntities_AreSplitByOwnership() { Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(GlobalChannelDefinitionEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(GlobalChannelDefinitionEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(GlobalChannelDefinitionEntity))); Assert.Equal("global_channel_definition_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(GlobalChannelDefinitionEntity), nameof(GlobalChannelDefinitionEntity))); - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantChannelDefinitionEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantChannelDefinitionEntity))); - Assert.Equal("tenant_channel_definition_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(TenantChannelDefinitionEntity), nameof(TenantChannelDefinitionEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(ChannelDefinitionEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(ChannelDefinitionEntity))); + Assert.Equal("channel_definition_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(ChannelDefinitionEntity), nameof(ChannelDefinitionEntity))); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarRepositoryDiResolutionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarRepositoryDiResolutionTests.cs index 362a4ef5..2e4025d2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarRepositoryDiResolutionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarRepositoryDiResolutionTests.cs @@ -5,7 +5,7 @@ using GameFrameX.Core.Extension.Cache; using GameFrameX.Core.Option; using GameFrameX.Core.Service.Cache; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.System; using GameFrameX.Core.Extension.Const; @@ -34,7 +34,7 @@ public SqlSugarRepositoryDiResolutionTests() /// /// DI 解析平台表仓储:无租户上下文(superadmin 语义)下不抛异常,Context 路由主库且查询可用。 - /// 对应 AddTenantAsync 中 adminAccount 查重的修复路径。 + /// 对应 AddAsync 中 adminAccount 查重的修复路径。 /// [Fact] public void DiResolution_PlatformTableRepository_RoutesMainDatabase_WithoutTenantContext() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarTransactionBoundaryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarTransactionBoundaryTests.cs index c27f8b31..f039d520 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarTransactionBoundaryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarTransactionBoundaryTests.cs @@ -23,7 +23,7 @@ public void TransactionalMethods_UseSqlSugarTransactionAttribute() { var assemblies = new[] { - typeof(TenantUserService).Assembly, + typeof(UserService).Assembly, typeof(GameFrameX.Application.Platform.OpenAccess.SystemOpenAccessService).Assembly, }; @@ -32,8 +32,8 @@ public void TransactionalMethods_UseSqlSugarTransactionAttribute() .SelectMany(u => u.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)) .Where(u => u.GetCustomAttributes(true).Any()) .ToList(); - Assert.Contains(localTransactionMethods, u => u.DeclaringType == typeof(TenantUserService) && u.Name == nameof(TenantUserService.AddUserAsync)); - Assert.Contains(localTransactionMethods, u => u.DeclaringType == typeof(TenantRoleService) && u.Name == nameof(TenantRoleService.DeleteRoleAsync)); + Assert.Contains(localTransactionMethods, u => u.DeclaringType == typeof(UserService) && u.Name == nameof(UserService.AddUserAsync)); + Assert.Contains(localTransactionMethods, u => u.DeclaringType == typeof(RoleService) && u.Name == nameof(RoleService.DeleteRoleAsync)); Assert.Contains(localTransactionMethods, u => u.DeclaringType == typeof(GlobalMenuService) && u.Name == nameof(GlobalMenuService.DeleteMenuAsync)); Assert.Contains(localTransactionMethods, u => u.DeclaringType == typeof(PlatformCaptchaConfigService) && u.Name == nameof(PlatformCaptchaConfigService.UpdateAsync)); Assert.Contains(localTransactionMethods, u => u.DeclaringType == typeof(PlatformJwtConfigService) && u.Name == nameof(PlatformJwtConfigService.UpdateAsync)); @@ -42,8 +42,8 @@ public void TransactionalMethods_UseSqlSugarTransactionAttribute() [Fact] public void InternalTransactionalServices_UseExplicitTransactionRunner() { - AssertUsesTransactionRunner(typeof(TenantRoleMenuService), nameof(TenantRoleMenuService.GrantRoleMenuAsync)); - AssertUsesTransactionRunner(typeof(TenantUserRoleService), nameof(TenantUserRoleService.GrantUserRoleAsync)); + AssertUsesTransactionRunner(typeof(RoleMenuService), nameof(RoleMenuService.GrantRoleMenuAsync)); + AssertUsesTransactionRunner(typeof(UserRoleService), nameof(UserRoleService.GrantUserRoleAsync)); } private static void AssertUsesTransactionRunner(Type type, string methodName) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs index 601ee8d3..03da187f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs @@ -22,14 +22,14 @@ public void Apply_ConvertsInt64IdentifierPropertiesToString() var schema = ApplyFilter(new Dictionary { ["id"] = new OpenApiSchema { Type = JsonSchemaType.Integer, Format = "int64", }, - ["tenantId"] = new OpenApiSchema { Type = JsonSchemaType.Integer | JsonSchemaType.Null, Format = "int64", }, + ["id"] = new OpenApiSchema { Type = JsonSchemaType.Integer | JsonSchemaType.Null, Format = "int64", }, }); Assert.Equal(JsonSchemaType.String, schema.Properties["id"].Type); Assert.Null(schema.Properties["id"].Format); // 可空标志保留(String | Null),仅数值位替换 - Assert.Equal(JsonSchemaType.String | JsonSchemaType.Null, schema.Properties["tenantId"].Type); - Assert.Null(schema.Properties["tenantId"].Format); + Assert.Equal(JsonSchemaType.String | JsonSchemaType.Null, schema.Properties["id"].Type); + Assert.Null(schema.Properties["id"].Format); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs index 66a6ddcc..140559fb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs @@ -18,21 +18,21 @@ namespace GameFrameX.Core.Tests.System; /// -/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 主库(superadmin seed)+ 租户库(tenant_user seed)+ +/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 主库(superadmin seed)+ 租户库(user seed)+ /// 手写 fake(3 接口)+ CurrentUserContext 真实 + SystemConfigService 真实(FakeCache)+ ICaptcha/IServiceProvider null!(captcha IsEnabled=false 路径不调用)。 -/// C218 扩展:主库 + 租户库双连接 scope(configId=main/1001),FakeTenantDbConnectionProvider 返回租户 scope; +/// C218 扩展:主库 + 租户库双连接 scope(configId=main/1001),FakeDbConnectionProvider 返回租户 scope; /// DefaultHttpContext 供 CreateTokenAsync 写响应头;FakePlatformJwtTokenService 捕获 payload 供 Claim 校验。 /// internal sealed class AuthTestHost : IDisposable { private const string MainConfigId = "main"; - private const string TenantConfigId = "1001"; - private const long TenantUserId = 2001L; + private const string ConfigId = "1001"; + private const long UserId = 2001L; /// - /// 租户库 seed 用的租户 ID(与 对应)。 + /// 租户库 seed 用的租户 ID(与 对应)。 /// - public const long SeedTenantId = 1001L; + public const long SeedId = 1001L; private readonly SqlSugarScope _client; private readonly List _dbPaths = new(); @@ -41,18 +41,18 @@ public AuthTestHost() { SqlSugarCache.Configure(new FakeCache()); var mainConfig = CreateConfig(MainConfigId); - var tenantConfig = CreateConfig(TenantConfigId); - _client = new SqlSugarScope(new List { mainConfig, tenantConfig, }); + var config = CreateConfig(ConfigId); + _client = new SqlSugarScope(new List { mainConfig, config, }); SqlSugarSetup.InitDatabase(_client, mainConfig, new[] { typeof(SystemUserEntity), typeof(SystemConfigEntity), - typeof(TenantUserEntity), + typeof(UserEntity), }); - _client.GetConnectionScope(MainConfigId).CodeFirst.InitTables(); - SqlSugarSetup.InitDatabase(_client, tenantConfig, new[] + _client.GetConnectionScope(MainConfigId).CodeFirst.InitTables(); + SqlSugarSetup.InitDatabase(_client, config, new[] { - typeof(TenantUserEntity), + typeof(UserEntity), }); } @@ -70,7 +70,7 @@ public AuthTestHost() public SystemAuthService BuildService() { var httpContextAccessor = new HttpContextAccessor { HttpContext = HttpContext, }; -#pragma warning disable CS8604 // SystemUserEntity/SystemConfigEntity 是 platform table,构造不实际使用 tenantDbConnectionProvider;ICaptcha 在 captcha IsEnabled=false 路径不调用 +#pragma warning disable CS8604 // SystemUserEntity/SystemConfigEntity 是 platform table,构造不实际使用 dbConnectionProvider;ICaptcha 在 captcha IsEnabled=false 路径不调用 var systemUserRepository = new SqlSugarRepository(_client); var systemConfigRepository = new SqlSugarRepository(_client); var captcha = (Lazy.Captcha.Core.ICaptcha)null!; @@ -122,15 +122,15 @@ public async Task SeedSuperAdminAsync(string account, string password, bool? isE /// - /// 在租户库 seed 一条 (AccountType=NormalUser,IsEnabled=true,以通过冻结检查进入租户禁用分支)。 + /// 在租户库 seed 一条 (AccountType=NormalUser,IsEnabled=true,以通过冻结检查进入租户禁用分支)。 /// - public async Task SeedTenantUserAsync(long tenantId, string account, string password) + public async Task SeedUserAsync(long id, string account, string password) { - var user = BuildUser(TenantUserId, account, password, AccountTypeEnum.NormalUser); + var user = BuildUser(UserId, account, password, AccountTypeEnum.NormalUser); user.IsEnabled = true; - var tenantDb = _client.GetConnectionScope(MainConfigId); - await tenantDb.Insertable(user).ExecuteCommandAsync(); + var db = _client.GetConnectionScope(MainConfigId); + await db.Insertable(user).ExecuteCommandAsync(); } public void Dispose() @@ -145,7 +145,7 @@ public void Dispose() } /// - /// 填充 共享字段(system_user / tenant_user 通用),调用方再按需覆盖 Id/TenantId/IsEnabled/AccountType。 + /// 填充 共享字段(system_user / user 通用),调用方再按需覆盖 Id/Id/IsEnabled/AccountType。 /// private static T BuildUser(long id, string account, string password, AccountTypeEnum accountType) where T : SystemUserBase, new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeTenantDbConnectionProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs similarity index 54% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeTenantDbConnectionProvider.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs index c2328e15..a2be6bd2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeTenantDbConnectionProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs @@ -1,22 +1,22 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using SqlSugar; namespace GameFrameX.Core.Tests.System; -internal sealed class FakeTenantDbConnectionProvider +internal sealed class FakeDbConnectionProvider { private readonly SqlSugarScope _client; private readonly string _tenantConfigId; - public FakeTenantDbConnectionProvider(SqlSugarScope client, string tenantConfigId) + public FakeDbConnectionProvider(SqlSugarScope client, string configId) { _client = client; - _tenantConfigId = tenantConfigId; + _tenantConfigId = configId; } public ISqlSugarClient Database => _client.GetConnectionScope(_tenantConfigId); - public SqlSugarScopeProvider GetTenantDbConnectionScope(long tenantId) + public SqlSugarScopeProvider GetDbConnectionScope(long id) { return _client.GetConnectionScope(_tenantConfigId); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs index 7fe34d8f..0ae6c26d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs @@ -1,12 +1,12 @@ using System.Net; using GameFrameX.Application.Dashboard.GameHome; using GameFrameX.Core.Exceptions; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Cache; using GameFrameX.Core.Option; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.System; @@ -16,22 +16,22 @@ namespace GameFrameX.Core.Tests.System; // 用 Sqlite 双库 SqlSugarScope 种子数据,伪造 HttpMessageHandler 验证聚合、降级、计数与趋势桶行为。 public class GameHomeServiceTests : IDisposable { - private const long TenantId = 1001L; - private const string TenantConfigId = "1001"; + private const long Id = 1001L; + private const string ConfigId = "1001"; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"game_home_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _db; - private readonly FakeTenantDbConnectionProvider _tenantDbProvider; + private readonly FakeDbConnectionProvider _tenantDbProvider; public GameHomeServiceTests() { SqlSugarCache.Configure(new FakeCache()); // AuthTestHost 判例:连接配置必须经 SqlSugarSetup.SetDbConfig 装配 ConfigureExternalServices - // (实体列名/类型服务,[TenantTable] 实体前缀 mutate 也在此链路),否则 ORM 写读列映射不一致 + // (实体列名/类型服务,[BusinessTable] 实体前缀 mutate 也在此链路),否则 ORM 写读列映射不一致 // (实测种子 ControlApiPrefix 落 NULL、读回空导致 Build 抛降级)。建表与种子统一走租户库 scope。 var config = new DbConnectionConfig { - ConfigId = TenantConfigId, + ConfigId = ConfigId, DbType = DbType.Sqlite, ConnectionString = $"DataSource={_dbPath}", IsAutoCloseConnection = true, @@ -41,12 +41,12 @@ public GameHomeServiceTests() }; SqlSugarSetup.SetDbConfig(config); _db = new SqlSugarScope(new List { config, }); - var tenantScope = _db.GetConnectionScope(TenantConfigId); - tenantScope.CodeFirst.InitTables(); - tenantScope.CodeFirst.InitTables(); - tenantScope.CodeFirst.InitTables(); - tenantScope.CodeFirst.InitTables(); - _tenantDbProvider = new FakeTenantDbConnectionProvider(_db, TenantConfigId); + var scope = _db.GetConnectionScope(ConfigId); + scope.CodeFirst.InitTables(); + scope.CodeFirst.InitTables(); + scope.CodeFirst.InitTables(); + scope.CodeFirst.InitTables(); + _tenantDbProvider = new FakeDbConnectionProvider(_db, ConfigId); } private GameHomeService CreateService(HttpClient? httpClient = null) @@ -218,7 +218,7 @@ public async Task OnlineTrend_UsesMainDatabaseWithoutTenantContext() private async Task SeedAreaAsync(long id, string httpManageUrl, string controlPrefix, GameServerStatus serverStatus = GameServerStatus.Online) { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameAreaEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameAreaEntity { Id = id, CreatedId = 1, @@ -258,7 +258,7 @@ await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameAreaEntity private async Task SeedOrderAsync(long id, long createdTime, OrderStatusEnum status) { - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameOrderEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameOrderEntity { Id = id, CreatedId = 1, @@ -299,7 +299,7 @@ await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameOrderEntit private async Task SeedPlayerAsync(long id, long createdTime) { - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameUserEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameUserEntity { Id = id, CreatedId = 1, @@ -337,7 +337,7 @@ await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameUserEntity private async Task SeedSampleAsync(long sampleTime, int onlineCount) { - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameHomeOnlineSampleEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameHomeOnlineSampleEntity { Id = 40000L + sampleTime % 100000, CreatedId = 0, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs index 36c34319..06ef260b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs @@ -51,7 +51,7 @@ public void Menus_UseConsoleScopeAndRetainSuperAdminBoundary() .Where(menu => menu.Type == MenuTypeEnum.Menu && menu.SuperAdminOnly) .Select(menu => menu.Key).OrderBy(key => key)); Assert.All(menus.Where(menu => protectedKeys.Contains(menu.Key!)), - menu => Assert.False(menu.AllowTenantWhenSuperAdminOnly)); + menu => Assert.False(menu.AllowAdminWhenSuperAdminOnly)); } [Fact] @@ -61,14 +61,14 @@ public void KnownDriftSamples_StayOnAudiencePrefixedValues() // C302 改名映射:logDiff/logVisit 与 gameDockerTagEntity,种子曾残留旧文件名 var diffLogMenu = menus.Single(m => m.Key == "route:systemDiffLog"); - Assert.Contains(diffLogMenu.Component, new[] { "/tenant/system/log/logDiff/index", "/audit/logDiff/index" }); + Assert.Contains(diffLogMenu.Component, new[] { "/system/log/logDiff/index", "/audit/logDiff/index" }); var dockerMenu = menus.Single(m => m.Key == "route:gameDockerEntity"); Assert.Contains(dockerMenu.Component, new[] { "/app/opsCenter/gameDockerTagEntity/index", "/serverCenter/gameDockerTagEntity/index" }); // userCenter 组件实际文件为 UserCenter.vue(大写 U),种子曾小写导致 dynamicImport 零匹配 var userCenterMenu = menus.Single(m => m.Key == "route:systemUserCenter"); - Assert.Contains(userCenterMenu.Component, new[] { "/tenant/system/user/component/UserCenter", "/system/user/component/UserCenter" }); + Assert.Contains(userCenterMenu.Component, new[] { "/system/user/component/UserCenter", "/system/user/component/UserCenter" }); } private static string FirstSegment(string? value) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/Job/LogJobRetentionBoundaryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/Job/LogJobRetentionBoundaryTests.cs index b0ed39a7..b9902625 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/Job/LogJobRetentionBoundaryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/Job/LogJobRetentionBoundaryTests.cs @@ -17,8 +17,8 @@ public sealed class LogJobRetentionBoundaryTests : IDisposable public LogJobRetentionBoundaryTests() { - _database.InitTenantTables(typeof(SystemLogVisitEntity), typeof(SystemLogOperationEntity), typeof(SystemLogDiffEntity), - typeof(TenantLogVisitEntity), typeof(TenantLogOperationEntity), typeof(TenantLogDiffEntity)); + _database.InitBusinessTables(typeof(SystemLogVisitEntity), typeof(SystemLogOperationEntity), typeof(SystemLogDiffEntity), + typeof(LogVisitEntity), typeof(LogOperationEntity), typeof(LogDiffEntity)); } public void Dispose() @@ -35,9 +35,9 @@ public async Task LogJob_KeepsSystemVisitAndOperation_DeletesDiffAndTenantHistor new SystemLogVisitEntity { Id = 501, CreatedTime = cutoff - 100, }, new SystemLogOperationEntity { Id = 502, CreatedTime = cutoff - 100, }, new SystemLogDiffEntity { Id = 503, CreatedTime = cutoff - 100, }, - new TenantLogVisitEntity { Id = 504, CreatedTime = cutoff - 100, }, - new TenantLogOperationEntity { Id = 505, CreatedTime = cutoff - 100, }, - new TenantLogDiffEntity { Id = 506, CreatedTime = cutoff - 100, }, + new LogVisitEntity { Id = 504, CreatedTime = cutoff - 100, }, + new LogOperationEntity { Id = 505, CreatedTime = cutoff - 100, }, + new LogDiffEntity { Id = 506, CreatedTime = cutoff - 100, }, }) { _database.MainDb.InsertableByObject(entity).ExecuteCommand(); @@ -48,9 +48,9 @@ public async Task LogJob_KeepsSystemVisitAndOperation_DeletesDiffAndTenantHistor BackfillCreatedTime(501, cutoff); BackfillCreatedTime(502, cutoff); BackfillCreatedTime(503, cutoff); - BackfillCreatedTime(504, cutoff); - BackfillCreatedTime(505, cutoff); - BackfillCreatedTime(506, cutoff); + BackfillCreatedTime(504, cutoff); + BackfillCreatedTime(505, cutoff); + BackfillCreatedTime(506, cutoff); var services = new ServiceCollection(); services.AddSingleton(_database.MainDb); @@ -63,9 +63,9 @@ public async Task LogJob_KeepsSystemVisitAndOperation_DeletesDiffAndTenantHistor Assert.Equal(1, _database.MainDb.Queryable().Count()); // 差异日志与租户历史日志仍按保留期清理。 Assert.Equal(0, _database.MainDb.Queryable().Count()); - Assert.Equal(0, _database.MainDb.Queryable().Count()); - Assert.Equal(0, _database.MainDb.Queryable().Count()); - Assert.Equal(0, _database.MainDb.Queryable().Count()); + Assert.Equal(0, _database.MainDb.Queryable().Count()); + Assert.Equal(0, _database.MainDb.Queryable().Count()); + Assert.Equal(0, _database.MainDb.Queryable().Count()); } private void BackfillCreatedTime(long rowId, long cutoff) where TEntity : class, new() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs index 76ca2f57..0108d6ed 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs @@ -31,7 +31,7 @@ public class LogFieldSerializationGuardTests ""parameters"": [ { ""name"": ""input"", - ""value"": { ""account"": ""admin"", ""password"": ""secret"", ""tenantId"": 1300000000001 } + ""value"": { ""account"": ""admin"", ""password"": ""secret"", ""id"": 1300000000001 } } ], ""returnInformation"": { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogTenantQueryIsolationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs similarity index 68% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogTenantQueryIsolationTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs index 6ea50c43..b96d12c0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogTenantQueryIsolationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs @@ -7,10 +7,10 @@ namespace GameFrameX.Core.Tests.System; /// /// C156 日志边界隔离测试。日志不再集中到独立日志库,平台日志(SystemLog*)归属主库 system_log_*, -/// 租户日志(TenantLog*)归属当前租户库 tenant_log_*。隔离由实体归属 + 物理库边界共同保证: +/// 租户日志(Log*)归属当前租户库 log_*。隔离由实体归属 + 物理库边界共同保证: /// 平台与租户日志为不同 CLR 类型,分别路由到不同数据库(路由/catalog 验收见 SqlSugarDatabaseInitializationTests)。 /// -public class LogTenantQueryIsolationTests +public class LogQueryIsolationTests { [Fact] public void SystemLogEntities_ArePlatformMainDatabase() @@ -22,8 +22,8 @@ public void SystemLogEntities_ArePlatformMainDatabase() Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemLogAuditEntity))); Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemLogDiffEntity))); Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(SystemLogOperationEntity))); - Assert.False(SqlSugarEntityBoundary.IsTenantTable(typeof(SystemLogOperationEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(SystemLogOperationEntity))); + Assert.False(SqlSugarEntityBoundary.IsBusinessTable(typeof(SystemLogOperationEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(SystemLogOperationEntity))); Assert.Equal("system_log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(SystemLogOperationEntity), nameof(SystemLogOperationEntity))); } @@ -31,25 +31,25 @@ public void SystemLogEntities_ArePlatformMainDatabase() public void TenantLogEntities_UseMainDatabase() { // 历史日志表保留名称,读写统一归主库。 - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantLogVisitEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantLogOperationEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantLogExceptionEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantLogAuditEntity))); - Assert.True(SqlSugarEntityBoundary.IsTenantTable(typeof(TenantLogDiffEntity))); - Assert.False(SqlSugarEntityBoundary.RequiresTenantContext(typeof(TenantLogOperationEntity))); - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantLogOperationEntity))); - Assert.Equal("tenant_log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(TenantLogOperationEntity), nameof(TenantLogOperationEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(LogVisitEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(LogOperationEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(LogExceptionEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(LogAuditEntity))); + Assert.True(SqlSugarEntityBoundary.IsBusinessTable(typeof(LogDiffEntity))); + Assert.False(SqlSugarEntityBoundary.RequiresContext(typeof(LogOperationEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(LogOperationEntity))); + Assert.Equal("log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(LogOperationEntity), nameof(LogOperationEntity))); } [Fact] public void PlatformAndTenantLogs_UseDistinctClrTypes() { // C156 禁止同一 CLR 实体按运行上下文切物理表:平台与租户日志必须是不同实体类型。 - Assert.NotEqual(typeof(SystemLogVisitEntity), typeof(TenantLogVisitEntity)); - Assert.NotEqual(typeof(SystemLogOperationEntity), typeof(TenantLogOperationEntity)); - Assert.NotEqual(typeof(SystemLogExceptionEntity), typeof(TenantLogExceptionEntity)); - Assert.NotEqual(typeof(SystemLogAuditEntity), typeof(TenantLogAuditEntity)); - Assert.NotEqual(typeof(SystemLogDiffEntity), typeof(TenantLogDiffEntity)); + Assert.NotEqual(typeof(SystemLogVisitEntity), typeof(LogVisitEntity)); + Assert.NotEqual(typeof(SystemLogOperationEntity), typeof(LogOperationEntity)); + Assert.NotEqual(typeof(SystemLogExceptionEntity), typeof(LogExceptionEntity)); + Assert.NotEqual(typeof(SystemLogAuditEntity), typeof(LogAuditEntity)); + Assert.NotEqual(typeof(SystemLogDiffEntity), typeof(LogDiffEntity)); } [Fact] @@ -87,8 +87,8 @@ public void TryReadLoginScope_LoginParameters_ReturnsAccount() value = new { account = "admin", - tenantId = 1300000000001, - tenantHost = (string?)null, + id = 1300000000001, + host = (string?)null, }, }, }); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedCatalogTestData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedCatalogTestData.cs index 6ffae589..5eeba000 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedCatalogTestData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedCatalogTestData.cs @@ -57,7 +57,7 @@ internal static GlobalMenuEntity[] BuildSampleMenus() OrderNo = menu.OrderNo, Remark = menu.Remark ?? string.Empty, SuperAdminOnly = menu.SuperAdminOnly, - AllowTenantWhenSuperAdminOnly = menu.AllowTenantWhenSuperAdminOnly, + AllowAdminWhenSuperAdminOnly = menu.AllowAdminWhenSuperAdminOnly, IsEnabled = menu.IsEnabled, IsDeleted = false, CreatedId = 0, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedPermissionRouteReconciliationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedPermissionRouteReconciliationTests.cs index b210cd6a..640a9916 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedPermissionRouteReconciliationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedPermissionRouteReconciliationTests.cs @@ -33,7 +33,7 @@ public class MenuSeedPermissionRouteReconciliationTests "gameLoginTicketKey:update", // 动作被 rotate 取代 "appSignatureKey:update", // 动作被 renew/rotate 取代 "sessionKey:update", // 动作被 enable/disable 体系取代 - "tenantUser:detail", // 端点下线 + "user:detail", // 端点下线 }; [Fact] @@ -76,7 +76,7 @@ public void LegacyOrphanAllowlistHasNoDeadEntries() public void MenuSeedRouteNameOfProducesCanonicalRouteNames() { Assert.Equal("gamePenalty:detail", MenuSeedRouteName.Of(nameof(GamePenaltyService.GetAsync))); - Assert.Equal("tenantUser:ownRoleList:{userId}", MenuSeedRouteName.Of(nameof(TenantUserService.GetOwnRoleListAsync))); + Assert.Equal("user:ownRoleList:{userId}", MenuSeedRouteName.Of(nameof(UserService.GetOwnRoleListAsync))); } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs index 21edb788..dc19bef3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs @@ -122,16 +122,16 @@ public void Clean_ThenLoadFromDb_HealsLegacyDuplicatePermissionRows_GFX741() // 复活 GFX-741 脏数据形态:旧简写 Key 子树(1 route + 1 按钮样本)与新全称 Key 行同 Permission 并存 var legacyRoute = Normalize(new GlobalMenuEntity { - Id = StableSeedId.Menu("route:tenantAdCallbackConfigEntity"), - Key = "route:tenantAdCallbackConfigEntity", + Id = StableSeedId.Menu("route:adCallbackConfigEntity"), + Key = "route:adCallbackConfigEntity", Pid = 0, Type = MenuTypeEnum.Menu, Title = "广告回调配置(旧)", }); var legacyPage = Normalize(new GlobalMenuEntity { - Id = StableSeedId.Menu("tenantAdCallbackConfigEntity:page"), - Key = "tenantAdCallbackConfigEntity:page", + Id = StableSeedId.Menu("adCallbackConfigEntity:page"), + Key = "adCallbackConfigEntity:page", Pid = legacyRoute.Id, Type = MenuTypeEnum.Button, Permission = "advertisementCallbackConfig:page", @@ -144,7 +144,7 @@ public void Clean_ThenLoadFromDb_HealsLegacyDuplicatePermissionRows_GFX741() Assert.Contains("global_menu.Permission 重复: advertisementCallbackConfig:page", before.Message); var removedKeys = MenuSeedStaleRowCleaner.RemoveStaleRows(db, seedIdsByKey); - Assert.Equal(new[] { "route:tenantAdCallbackConfigEntity", "tenantAdCallbackConfigEntity:page", }, removedKeys.OrderBy(u => u, StringComparer.Ordinal).ToArray()); + Assert.Equal(new[] { "route:adCallbackConfigEntity", "adCallbackConfigEntity:page", }, removedKeys.OrderBy(u => u, StringComparer.Ordinal).ToArray()); // 清理后加载通过,且该 Permission 只剩一条有效定义(种子全称 Key 行) MenuSeedCatalog.LoadFromDb(db); @@ -314,7 +314,7 @@ private static GlobalMenuEntity Normalize(GlobalMenuEntity source) OrderNo = source.OrderNo, Remark = source.Remark ?? string.Empty, SuperAdminOnly = source.SuperAdminOnly, - AllowTenantWhenSuperAdminOnly = source.AllowTenantWhenSuperAdminOnly, + AllowAdminWhenSuperAdminOnly = source.AllowAdminWhenSuperAdminOnly, IsEnabled = source.IsEnabled ?? true, IsDeleted = false, CreatedId = 0, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/OnlineUserHubBoundaryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/OnlineUserHubBoundaryTests.cs index 9418b3d8..05501118 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/OnlineUserHubBoundaryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/OnlineUserHubBoundaryTests.cs @@ -13,7 +13,7 @@ public void Constructor_DoesNotResolveTenantOnlineUserRepository() .SelectMany(u => u.GetParameters()) .Select(u => u.ParameterType); - Assert.DoesNotContain(typeof(SqlSugarRepository), constructorParameterTypes); + Assert.DoesNotContain(typeof(SqlSugarRepository), constructorParameterTypes); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformPasswordPolicyConfigTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformPasswordPolicyConfigTests.cs index 509087e8..8a242f12 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformPasswordPolicyConfigTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformPasswordPolicyConfigTests.cs @@ -67,7 +67,7 @@ public void Deserialize_StrongPasswordTrue_ReflectsInSnapshot() /// /// 动态生效证据:Provider.RefreshAsync 内部把快照镜像同步到 CryptogramUtility 静态属性 - /// (这里直接验证 ApplyPasswordPolicy 镜像语义,TenantUserService.ChangePwdAsync 读 CryptogramUtility 静态属性)。 + /// (这里直接验证 ApplyPasswordPolicy 镜像语义,UserService.ChangePwdAsync 读 CryptogramUtility 静态属性)。 /// [Fact] public void ApplyPasswordPolicy_MirrorsSnapshotToCryptogramUtility() @@ -91,7 +91,7 @@ public void ApplyPasswordPolicy_MirrorsSnapshotToCryptogramUtility() /// /// 改密强度校验动态生效:SuperAdmin 保存 StrongPassword=true + 新正则后,Provider 镜像同步, - /// TenantUserService.ChangePwdAsync 读 CryptogramUtility.StrongPassword=true 并用镜像正则校验新密码。 + /// UserService.ChangePwdAsync 读 CryptogramUtility.StrongPassword=true 并用镜像正则校验新密码。 /// [Fact] public void ChangePwd_StrengthCheck_HonorsMirroredSnapshot() @@ -103,7 +103,7 @@ public void ChangePwd_StrengthCheck_HonorsMirroredSnapshot() { CryptogramUtility.ApplyPasswordPolicy(true, "^[A-Z]+$", "必须大写"); - // 模拟 TenantUserService.ChangePwdAsync 门控(CryptogramUtility.StrongPassword + Regex.IsMatch) + // 模拟 UserService.ChangePwdAsync 门控(CryptogramUtility.StrongPassword + Regex.IsMatch) var gateEnabled = CryptogramUtility.StrongPassword; var weakPasswordPasses = Regex.IsMatch("abc", CryptogramUtility.PasswordStrengthValidation); var strongPasswordPasses = Regex.IsMatch("ABC", CryptogramUtility.PasswordStrengthValidation); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/SuperAdminOnlyMenuSeedDataTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/SuperAdminOnlyMenuSeedDataTests.cs index b958c5eb..e6c59ab6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/SuperAdminOnlyMenuSeedDataTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/SuperAdminOnlyMenuSeedDataTests.cs @@ -22,7 +22,7 @@ public void SuperAdminOnlySubtrees_RemainProtectedUnderSystem() Assert.All(protectedChildren, menu => { Assert.Contains(menu.Id, protectedMenuIds); - Assert.False(menu.AllowTenantWhenSuperAdminOnly); + Assert.False(menu.AllowAdminWhenSuperAdminOnly); }); Assert.Contains(protectedChildren, menu => menu.Key == "route:develop"); Assert.Contains(protectedChildren, menu => menu.Key == "route:doc"); @@ -44,7 +44,7 @@ public void PlatformCaptchaConfigMenu_IsSuperAdminOnlyUnderSystem() var definition = MenuSeedCatalog.AllDefinitions.Single(u => u.Key == "route:platformCaptchaConfig"); Assert.True(definition.SuperAdminOnly); - Assert.False(definition.AllowTenantWhenSuperAdminOnly); + Assert.False(definition.AllowAdminWhenSuperAdminOnly); } [Fact] @@ -62,6 +62,6 @@ public void PlatformRateLimitConfigMenu_IsSuperAdminOnlyUnderGlobalConfig() var definition = MenuSeedCatalog.AllDefinitions.Single(u => u.Key == "route:platformRateLimitConfig"); Assert.True(definition.SuperAdminOnly); - Assert.False(definition.AllowTenantWhenSuperAdminOnly); + Assert.False(definition.AllowAdminWhenSuperAdminOnly); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/TenantUserServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/UserServiceTests.cs similarity index 57% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/TenantUserServiceTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/UserServiceTests.cs index 595cad31..1fe5eab5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/TenantUserServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/UserServiceTests.cs @@ -2,16 +2,16 @@ namespace GameFrameX.Core.Tests.System; -public class TenantUserServiceTests +public class UserServiceTests { [Fact] public void NormalizeNewUser_DefaultsNullStringColumns() { - var user = new TenantUserEntity { Account = "demo", }; + var user = new UserEntity { Account = "demo", }; - TenantUserService.NormalizeNewUser(user); + UserService.NormalizeNewUser(user); - foreach (var property in typeof(TenantUserEntity).GetProperties().Where(u => u.PropertyType == typeof(string) && u.CanWrite)) + foreach (var property in typeof(UserEntity).GetProperties().Where(u => u.PropertyType == typeof(string) && u.CanWrite)) { Assert.NotNull(property.GetValue(user)); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs index 9432324d..a6d8977a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs @@ -6,13 +6,13 @@ using GameFrameX.Core.BaseInputOutput; using GameFrameX.Core.Extension; using GameFrameX.Core.Service; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.ClientApiConfig; +using GameFrameX.Entity.Business.Game; -namespace GameFrameX.Core.Tests.Tenant; +namespace GameFrameX.Core.Tests.Business; // C373(GFX-838)T1/T2/T3:密钥生命周期操作集。 // change:gfx-doc/dev/client-api/changes/C373-credential-key-lifecycle/change.md @@ -26,50 +26,50 @@ public sealed class KeyLifecycleRotateTests : IDisposable public KeyLifecycleRotateTests() { - _originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - _db.InitTenantTables(typeof(TenantGameLoginTicketKeyEntity), typeof(TenantClientApiPolicyEntity)); + _originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + _db.InitBusinessTables(typeof(GameLoginTicketKeyEntity), typeof(ClientApiPolicyEntity)); } public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); _db.Dispose(); } private GameLoginTicketKeyService CreateTicketKeyService() { return new GameLoginTicketKeyService( - new Repository(_db.MainDb), + new Repository(_db.MainDb), new GameFrameX.Core.Service.User.CurrentUserContext(new Microsoft.AspNetCore.Http.HttpContextAccessor())); } private ClientApiPolicyService CreatePolicyService() { return new ClientApiPolicyService( - new Repository(_db.MainDb), + new Repository(_db.MainDb), new GameFrameX.Core.Service.User.CurrentUserContext(new Microsoft.AspNetCore.Http.HttpContextAccessor())); } /// /// 预置一把「当前生效」的旧钥(模拟既有密钥形态;密文与否不影响轮换标记逻辑,用密文形态贴近 C371 后库内现状)。 /// - private TenantGameLoginTicketKeyEntity SeedActiveTicketKey() + private GameLoginTicketKeyEntity SeedActiveTicketKey() { - var oldKey = new TenantGameLoginTicketKeyEntity + var oldKey = new GameLoginTicketKeyEntity { Kid = "kid-old-active", Algorithm = "RS256", - PrivateKeyPem = TenantSecretCrypto.Encrypt("old-private-pem") ?? string.Empty, + PrivateKeyPem = SecretCrypto.Encrypt("old-private-pem") ?? string.Empty, PublicKeyPem = "old-public-pem", NotBeforeTime = TimerHelper.UnixTimeSeconds() - 3600, ExpireTime = null, IsEnabled = true, Remark = "seed", }; - _db.TenantDb.Insertable(oldKey).ExecuteCommand(); - return _db.TenantDb.Queryable().First(u => u.Kid == "kid-old-active"); + _db.Db.Insertable(oldKey).ExecuteCommand(); + return _db.Db.Queryable().First(u => u.Kid == "kid-old-active"); } [Fact] @@ -81,14 +81,14 @@ public async Task TicketKeyRotate_DefaultOldKeyExpiresIn7Days() await CreateTicketKeyService().RotateAsync(new GameLoginTicketKeyRotateRequest { }); var after = TimerHelper.UnixTimeSeconds(); - var storedOld = _db.TenantDb.Queryable().First(u => u.Id == oldKey.Id); + var storedOld = _db.Db.Queryable().First(u => u.Id == oldKey.Id); Assert.NotNull(storedOld.RotatedTime); Assert.InRange(storedOld.RotatedTime.Value, before, after); Assert.InRange(storedOld.ExpireTime!.Value, before + GameLoginTicketKeyService.OldKeyDefaultExpireSeconds, after + GameLoginTicketKeyService.OldKeyDefaultExpireSeconds); // 新钥立即生效(NotBefore ∈ [before, after]),且未被标记轮换 - var newKey = _db.TenantDb.Queryable().First(u => u.Kid != "kid-old-active"); + var newKey = _db.Db.Queryable().First(u => u.Kid != "kid-old-active"); Assert.InRange(newKey.NotBeforeTime!.Value, before, after); Assert.Null(newKey.RotatedTime); } @@ -102,7 +102,7 @@ public async Task TicketKeyRotate_ExplicitOldKeyExpireWithin30Days_Applied() await CreateTicketKeyService().RotateAsync(new GameLoginTicketKeyRotateRequest { OldKeyExpireTime = explicitExpire, }); - var storedOld = _db.TenantDb.Queryable().First(u => u.Id == oldKey.Id); + var storedOld = _db.Db.Queryable().First(u => u.Id == oldKey.Id); Assert.Equal(explicitExpire, storedOld.ExpireTime); Assert.NotNull(storedOld.RotatedTime); } @@ -139,32 +139,32 @@ public async Task TicketKeyRotate_NoActiveOldKey_IsNoop() // 无旧钥场景(首把密钥轮换):仅生成新钥,不抛错 await CreateTicketKeyService().RotateAsync(new GameLoginTicketKeyRotateRequest { }); - var count = _db.TenantDb.Queryable().Count(); + var count = _db.Db.Queryable().Count(); Assert.Equal(1, count); } [Fact] public async Task PolicyRotate_GeneratesNewCipher_OldValueRevokedImmediately() { - var added = await CreatePolicyService().AddAsync(new AddTenantClientApiPolicyRequest + var added = await CreatePolicyService().AddAsync(new AddClientApiPolicyRequest { SigningKey = string.Empty, LifetimeMinutes = 30, TicketExpireTime = 0, }); - var cipherBefore = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id).SigningKey; - var plainBefore = TenantSecretCrypto.Decrypt(cipherBefore); - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, cipherBefore, StringComparison.Ordinal); + var cipherBefore = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id).SigningKey; + var plainBefore = SecretCrypto.Decrypt(cipherBefore); + Assert.StartsWith(SecretCrypto.EncryptedPrefix, cipherBefore, StringComparison.Ordinal); var before = TimerHelper.UnixTimeSeconds(); await CreatePolicyService().RotateAsync(new BaseIdRequest { Id = added.Id, }); var after = TimerHelper.UnixTimeSeconds(); - var stored = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); + var stored = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); // 新密文 ≠ 旧密文(旧值即刻作废),仍为密文形态且可解密为新 64-hex Assert.NotEqual(cipherBefore, stored.SigningKey); - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, stored.SigningKey, StringComparison.Ordinal); - var plainAfter = TenantSecretCrypto.Decrypt(stored.SigningKey); + Assert.StartsWith(SecretCrypto.EncryptedPrefix, stored.SigningKey, StringComparison.Ordinal); + var plainAfter = SecretCrypto.Decrypt(stored.SigningKey); Assert.NotEqual(plainBefore, plainAfter); Assert.Equal(64, plainAfter!.Length); Assert.Matches("^[0-9a-f]{64}$", plainAfter); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantSecretCryptoTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantSecretCryptoTests.cs deleted file mode 100644 index 6d885497..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantSecretCryptoTests.cs +++ /dev/null @@ -1,144 +0,0 @@ -using GameFrameX.Core.Service.Tenant; - -namespace GameFrameX.Core.Tests.Tenant; - -// C370(GFX-829):业务凭证静态加密收口 TenantSecretCrypto 的行为契约。 -// change:gfx-doc/dev/system-management/changes/C370-tenant-secret-crypto-foundation/change.md -// 覆盖:往返还原、enc:sec:v1: 前缀、明文兼容直通、幂等加密、空值透传、 -// 未配置密钥的降级直存、密文 + 缺密钥 / 错误密钥 / 篡改密文的失败语义、 -// 与连接串域 enc:v1: 密文互不认领(双向)。 -// 测试程序集已 DisableTestParallelization,环境变量在本类内集中设置与还原。 -public sealed class TenantSecretCryptoTests : IDisposable -{ - private const string PlainSecret = "AKIDexample-secret-key-2026"; - - private readonly string? _originalSecretKey; - - public TenantSecretCryptoTests() - { - _originalSecretKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - } - - public void Dispose() - { - Restore(TenantSecretCrypto.KeyEnvironmentVariable, _originalSecretKey); - } - - [Fact] - public void EncryptThenDecrypt_RestoresOriginalSecret() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - - var encrypted = TenantSecretCrypto.Encrypt(PlainSecret); - - Assert.StartsWith(TenantSecretCrypto.EncryptedPrefix, encrypted, StringComparison.Ordinal); - Assert.NotEqual(PlainSecret, encrypted); - Assert.DoesNotContain("example-secret-key", encrypted); - Assert.Equal(PlainSecret, TenantSecretCrypto.Decrypt(encrypted)); - } - - [Fact] - public void Encrypt_EachCallProducesDifferentCipherText() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - - // AesHelper 每次随机 Salt + Nonce,同明文两次密文必须不同(防彩虹对照) - Assert.NotEqual(TenantSecretCrypto.Encrypt(PlainSecret), TenantSecretCrypto.Encrypt(PlainSecret)); - } - - [Fact] - public void Decrypt_PlaintextWithoutPrefix_PassesThrough() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - - Assert.Equal(PlainSecret, TenantSecretCrypto.Decrypt(PlainSecret)); - } - - [Fact] - public void Encrypt_IsIdempotentForAlreadyEncryptedValue() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - var encrypted = TenantSecretCrypto.Encrypt(PlainSecret); - - Assert.Equal(encrypted, TenantSecretCrypto.Encrypt(encrypted)); - } - - [Fact] - public void EncryptDecrypt_NullAndEmpty_PassThrough() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - - Assert.Null(TenantSecretCrypto.Encrypt(null)); - Assert.Null(TenantSecretCrypto.Decrypt(null)); - Assert.Equal(string.Empty, TenantSecretCrypto.Encrypt(string.Empty)); - Assert.Equal(string.Empty, TenantSecretCrypto.Decrypt(string.Empty)); - } - - [Fact] - public void Encrypt_WithoutKey_ReturnsPlaintextDegradedMode() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, null); - - Assert.Equal(PlainSecret, TenantSecretCrypto.Encrypt(PlainSecret)); - } - - [Fact] - public void Decrypt_EncryptedWithoutKey_ThrowsWithKeyHint() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - var encrypted = TenantSecretCrypto.Encrypt(PlainSecret); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, null); - - var exception = Assert.Throws(() => TenantSecretCrypto.Decrypt(encrypted)); - Assert.Contains(TenantSecretCrypto.KeyEnvironmentVariable, exception.Message); - } - - [Fact] - public void Decrypt_WithWrongKey_ThrowsWithoutLeakingCipherText() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - var encrypted = TenantSecretCrypto.Encrypt(PlainSecret); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "another-secret-key"); - - var exception = Assert.Throws(() => TenantSecretCrypto.Decrypt(encrypted)); - Assert.DoesNotContain(encrypted[TenantSecretCrypto.EncryptedPrefix.Length..], exception.Message); - Assert.DoesNotContain("example-secret-key", exception.Message); - } - - [Fact] - public void Decrypt_TamperedCipherText_Throws() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - var encrypted = TenantSecretCrypto.Encrypt(PlainSecret); - // 翻转密文尾部一个字符,模拟存储值被篡改(AES-GCM 认证标签校验必须失败) - var tampered = encrypted[..^1] + (encrypted[^1] == 'A' ? 'B' : 'A'); - - Assert.Throws(() => TenantSecretCrypto.Decrypt(tampered)); - } - - [Fact] - public void IsEncrypted_ClassifiesStoredValueForm() - { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - - Assert.False(TenantSecretCrypto.IsEncrypted(PlainSecret)); - Assert.True(TenantSecretCrypto.IsEncrypted(TenantSecretCrypto.Encrypt(PlainSecret))); - Assert.False(TenantSecretCrypto.IsEncrypted(null)); - } - - [Fact] - public void Decrypt_ConnectionCipherText_PassesThroughWithoutClaiming() - { - // 两域前缀互斥(enc:sec:v1: vs enc:v1:):连接串密文对凭证收口是「无前缀值」,直通不认领、不误抛解密失败 - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - const string connectionCipher = "enc:v1:legacy-connection-cipher"; - - Assert.False(TenantSecretCrypto.IsEncrypted(connectionCipher)); - Assert.Equal(connectionCipher, TenantSecretCrypto.Decrypt(connectionCipher)); - } - - private static void Restore(string variable, string? value) - { - Environment.SetEnvironmentVariable(variable, value); - } -} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs index 200e3590..8a88b4c5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs @@ -44,21 +44,21 @@ public void Configure_WritesIdentifierLongsAsStringsAndReadsThemBack() var json = JsonSerializer.Serialize(new IdentifierJsonContract { Id = 4664278385747429000, - TenantId = 1300000000001, + Id = 1300000000001, CreatedTime = 1784073600, }, options); Assert.Contains("\"Id\":\"4664278385747429000\"", json); - Assert.Contains("\"TenantId\":\"1300000000001\"", json); + Assert.Contains("\"Id\":\"1300000000001\"", json); Assert.Contains("\"CreatedTime\":1784073600", json); var value = JsonSerializer.Deserialize( - "{\"Id\":\"4664278385747429000\",\"TenantId\":\"1300000000001\",\"CreatedTime\":1784073600}", + "{\"Id\":\"4664278385747429000\",\"Id\":\"1300000000001\",\"CreatedTime\":1784073600}", options); Assert.NotNull(value); Assert.Equal(4664278385747429000, value.Id); - Assert.Equal(1300000000001, value.TenantId); + Assert.Equal(1300000000001, value.Id); Assert.Equal(1784073600, value.CreatedTime); } @@ -80,7 +80,7 @@ private sealed class IdentifierJsonContract { public long Id { get; init; } - public long? TenantId { get; init; } + public long? Id { get; init; } public long CreatedTime { get; init; } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/ProjectJsonSerializerOptionsHostContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/ProjectJsonSerializerOptionsHostContractTests.cs index ac66694f..18d66455 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/ProjectJsonSerializerOptionsHostContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/ProjectJsonSerializerOptionsHostContractTests.cs @@ -12,7 +12,7 @@ private sealed class HostJsonContract { public long Id { get; set; } - public long? TenantId { get; set; } + public long? Id { get; set; } public long CreatedTime { get; set; } @@ -28,23 +28,23 @@ public void ApplyLongIdentifierStringContract_WritesIdentifierLongsAsStringsAndR var json = JsonSerializer.Serialize(new HostJsonContract { Id = 4664278385747429000, - TenantId = 1300000000001, + Id = 1300000000001, CreatedTime = 1784073600, Name = "hub", }, options); Assert.Contains("\"Id\":\"4664278385747429000\"", json); - Assert.Contains("\"TenantId\":\"1300000000001\"", json); + Assert.Contains("\"Id\":\"1300000000001\"", json); // 非 Id 结尾 long 不受契约影响,保持数字 Assert.Contains("\"CreatedTime\":1784073600", json); Assert.Contains("\"Name\":\"hub\"", json); // 反向宽容读取:字符串与数字形式的 Id 均可绑定(既有客户端提交数字不破坏) - var fromString = JsonSerializer.Deserialize("{\"Id\":\"4664278385747429000\",\"TenantId\":null,\"CreatedTime\":0,\"Name\":null}", options); + var fromString = JsonSerializer.Deserialize("{\"Id\":\"4664278385747429000\",\"Id\":null,\"CreatedTime\":0,\"Name\":null}", options); Assert.NotNull(fromString); Assert.Equal(4664278385747429000, fromString.Id); - var fromNumber = JsonSerializer.Deserialize("{\"Id\":100,\"TenantId\":null,\"CreatedTime\":0,\"Name\":null}", options); + var fromNumber = JsonSerializer.Deserialize("{\"Id\":100,\"Id\":null,\"CreatedTime\":0,\"Name\":null}", options); Assert.NotNull(fromNumber); Assert.Equal(100, fromNumber.Id); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Utility/CryptogramUtility.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Utility/CryptogramUtility.cs index a13680a2..83aa2301 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Utility/CryptogramUtility.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Utility/CryptogramUtility.cs @@ -14,7 +14,7 @@ public static class CryptogramUtility /// /// 应用平台密码策略快照到静态属性(C173)。由 PlatformPasswordPolicyConfigProvider.RefreshAsync - /// 在启动期与 SuperAdmin 保存后调用,使 TenantUserService.ChangePwd 读取的密码策略静态属性 + /// 在启动期与 SuperAdmin 保存后调用,使 UserService.ChangePwd 读取的密码策略静态属性 /// 始终反映 SystemConfigEntity 最新快照,实现同 Host 动态生效。 /// /// 是否开启密码强度验证 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/AdminApiRouteNaming.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/AdminApiRouteNaming.cs index 3e4624ec..b1b0ea95 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/AdminApiRouteNaming.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/AdminApiRouteNaming.cs @@ -14,7 +14,7 @@ namespace GameFrameX.Core.Api; public static class AdminApiRouteNaming { /// - /// 控制器路由段:类名去 Service 后缀后转 lowerCamelCase(如 TenantUserService → tenantUser)。 + /// 控制器路由段:类名去 Service 后缀后转 lowerCamelCase(如 UserService → user)。 /// public static string ControllerRouteSegment(Type controllerType) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/MenuSeedRouteName.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/MenuSeedRouteName.cs index 4054b4e4..47f6999c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/MenuSeedRouteName.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Api/MenuSeedRouteName.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Core.Api; /// /// 菜单种子按钮 Permission(routeName,controller:action 形态)的类型安全拼接入口(C368)。 /// -/// 种子写法:Permission = MenuSeedRouteName.Of<TenantUserService>(nameof(TenantUserService.DeleteUserAsync))。 +/// 种子写法:Permission = MenuSeedRouteName.Of<UserService>(nameof(UserService.DeleteUserAsync))。 /// 控制器段与动作段均按 唯一事实源推导——服务改名/删除后种子随编译自动跟随或报错, /// 不再出现手写字符串停留在旧路由名的漂移。仅推导 Permission 绑定链;按钮 Key 是前端权限码契约 /// (StableSeedId 由 Key 派生 Id,牵动 role-menu),必须保持字面量。 @@ -16,9 +16,9 @@ namespace GameFrameX.Core.Api; public static class MenuSeedRouteName { /// - /// 由服务类型与方法名推导 routeName(tenantUser:delete 形态)。 + /// 由服务类型与方法名推导 routeName(user:delete 形态)。 /// - /// Admin 动态 API 服务类型(如 TenantUserService)。 + /// Admin 动态 API 服务类型(如 UserService)。 /// 方法名(建议 nameof(TService.XxxAsync) 传入,保编译期存在性检查)。 public static string Of(string methodName) where TService : class { @@ -44,7 +44,7 @@ public static string Of(string methodName) where TService : class var routePath = routePaths[0]; - // routePath 形如 api/tenantUser/delete → routeName(tenantUser:delete)。 + // routePath 形如 api/user/delete → routeName(user:delete)。 // 多段模板(如 dbtypelist/{configid})与无特性 GET 动作参数段(如 ownRoleList/{userId}) // 统一转冒号形态,与存量字面量及 RouteNameToRoutePath 反向变换兼容。 const string apiPrefix = "api/"; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs index c60a412c..381da7f7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs @@ -11,7 +11,7 @@ public sealed class CacheConst public const string KeyUser = "cache:user:"; /// - /// 用户已授权菜单Id集合缓存(来自 TenantRoleMenuEntity,含目录/菜单/按钮,Id 化) + /// 用户已授权菜单Id集合缓存(来自 RoleMenuEntity,含目录/菜单/按钮,Id 化) /// public const string KeyUserMenu = "cache:user_menu:"; @@ -43,7 +43,7 @@ public sealed class CacheConst /// /// 租户缓存 /// - public const string KeyTenant = "cache:tenant"; + public const string Key = "cache:tenant"; /// /// 常量下拉框 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs index e5dcf729..efc8b168 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs @@ -60,12 +60,12 @@ public static IReadOnlyList SuperAdminOnlyRootMenuIds /// /// 获取 SuperAdmin-only 树下允许租户调用的只读辅助按钮 ID。 /// - public static IReadOnlySet TenantReadableSuperAdminOnlyMenuIds + public static IReadOnlySet AdminReadableSuperAdminOnlyMenuIds { get { return Definitions - .Where(u => u.SuperAdminOnly && u.AllowTenantWhenSuperAdminOnly) + .Where(u => u.SuperAdminOnly && u.AllowAdminWhenSuperAdminOnly) .Select(u => StableSeedId.Menu(u.Key)) .ToHashSet(); } @@ -178,7 +178,7 @@ public static void LoadFromDb(ISqlSugarClient db) dbMenu.CreatedTime, dbMenu.UpdateTime ?? dbMenu.CreatedTime, dbMenu.SuperAdminOnly, - dbMenu.AllowTenantWhenSuperAdminOnly, + dbMenu.AllowAdminWhenSuperAdminOnly, dbMenu.AppScope); }).ToArray(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs index d5922723..94422ec2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs @@ -28,5 +28,5 @@ public sealed record MenuSeedDefinition( long CreatedTime, long UpdateTime, bool SuperAdminOnly, - bool AllowTenantWhenSuperAdminOnly, + bool AllowAdminWhenSuperAdminOnly, MenuAppScopeEnum AppScope); \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/TenantErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorCode.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/TenantErrorCode.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorCode.cs index d278a7d1..096a7888 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/TenantErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorCode.cs @@ -3,61 +3,61 @@ namespace GameFrameX.Core.Enum.Errors; /// /// Admin 租户管理错误码(段 306,见 ;C265 自旧 D 码体系平移)。 /// -public enum TenantErrorCode +public enum ErrorCode { /// /// 禁止删除默认租户 /// [ErrorText("禁止删除默认租户", "Deleting the default tenant is forbidden")] - DeleteDefaultTenantForbidden = 30600001, + DeleteDefaultForbidden = 30600001, /// /// 已存在同名的租户 /// [ErrorText("已存在同名的租户", "A tenant with the same name already exists")] - TenantNameAlreadyExists = 30600002, + NameAlreadyExists = 30600002, /// - /// 已存在同名的租户管理员 + /// 已存在同名的管理员角色 /// - [ErrorText("已存在同名的租户管理员", "A tenant administrator with the same name already exists")] - TenantAdminNameAlreadyExists = 30600003, + [ErrorText("已存在同名的管理员角色", "A tenant administrator with the same name already exists")] + AdminNameAlreadyExists = 30600003, /// /// 默认租户状态禁止修改 /// [ErrorText("默认租户状态禁止修改", "The default tenant status cannot be changed")] - DefaultTenantStatusChangeForbidden = 30600004, + DefaultStatusChangeForbidden = 30600004, /// /// 禁止创建此类型的数据库 /// [ErrorText("禁止创建此类型的数据库", "Creating this type of database is forbidden")] - TenantDbTypeForbidden = 30600005, + DbTypeForbidden = 30600005, /// /// 租户已禁用 /// - [ErrorText("租户已禁用", "Tenant is disabled")] - TenantDisabled = 30600006, + [ErrorText("租户已禁用", "Business is disabled")] + Disabled = 30600006, /// /// 普通租户禁止使用ID隔离 /// - [ErrorText("普通租户禁止使用ID隔离", "ID isolation is forbidden for normal tenants")] - IdIsolationForbiddenForNormalTenant = 30600007, + [ErrorText("普通租户禁止使用ID隔离", "ID isolation is forbidden for normal s")] + IdIsolationForbiddenForNormal = 30600007, /// /// 租户数据库已创建,禁止重复创建 /// [ErrorText("租户数据库已创建,禁止重复创建", "The tenant database has already been created")] - TenantDatabaseAlreadyCreated = 30600008, + DatabaseAlreadyCreated = 30600008, /// /// 租户已过期 /// - [ErrorText("租户已过期", "Tenant has expired")] - TenantExpired = 30600009, + [ErrorText("租户已过期", "Business has expired")] + Expired = 30600009, /// /// 租户菜单同步手动触发仅超级管理员可用 @@ -69,7 +69,7 @@ public enum TenantErrorCode /// 租户不存在或不在菜单同步范围 /// [ErrorText("租户不存在或不在菜单同步范围", "The tenant does not exist or is out of the menu sync scope")] - MenuSyncTenantNotInScope = 30600011, + MenuSyncNotInScope = 30600011, /// /// 套餐不存在 @@ -87,11 +87,11 @@ public enum TenantErrorCode /// 套餐不存在或未启用 /// [ErrorText("套餐不存在或未启用", "The package does not exist or is not enabled")] - TenantPackageNotUsable = 30600014, + PackageNotUsable = 30600014, /// /// 默认租户套餐禁止修改 /// [ErrorText("默认租户套餐禁止修改", "The default tenant package cannot be changed")] - DefaultTenantPackageChangeForbidden = 30600015, + DefaultPackageChangeForbidden = 30600015, } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs index 1b470a00..a7b6d013 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs @@ -21,7 +21,7 @@ public static class ErrorSegmentRegistry new(303, ErrorDomain.AdminBusiness, "PayConfig", null, false, "Admin 支付配置(预留:暂无错误码成员)"), new(304, ErrorDomain.AdminBusiness, "Wechat", null, false, "Admin 微信生态配置(预留:暂无错误码成员)"), new(305, ErrorDomain.AdminBusiness, "PlatformConfig", nameof(PlatformConfigErrorCode), false, "Admin 平台配置"), - new(306, ErrorDomain.AdminBusiness, "Tenant", nameof(TenantErrorCode), false, "Admin 租户管理"), + new(306, ErrorDomain.AdminBusiness, "Business", nameof(ErrorCode), false, "Admin 租户管理"), new(307, ErrorDomain.AdminBusiness, "Organization", nameof(OrganizationErrorCode), false, "Admin 组织架构"), new(308, ErrorDomain.AdminBusiness, "Region", null, false, "Admin 区域(已退役,号段永久保留,禁止复用)"), new(309, ErrorDomain.AdminBusiness, "Position", nameof(PositionErrorCode), false, "Admin 职位"), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs index 6d3d7709..0586a818 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs @@ -8,12 +8,12 @@ public enum GameHomeErrorCode /// /// 首页读数仅租户上下文可用 /// - [ErrorText("首页读数仅租户上下文可用:请以租户管理员登录,或由平台管理员显式切换目标租户后重试", "Home metrics require a tenant context: sign in as a tenant administrator, or switch the target tenant explicitly")] - TenantContextRequired = 60500001, + [ErrorText("首页读数仅租户上下文可用:请以管理员角色登录,或由平台管理员显式切换目标租户后重试", "Home metrics require a tenant context: sign in as a tenant administrator, or switch the target tenant explicitly")] + ContextRequired = 60500001, /// /// 目标租户库连接不可用 /// [ErrorText("目标租户库连接不可用,无法读取首页读数", "Target tenant database connection is unavailable for home metrics")] - TenantDbUnavailable = 60500002, + DbUnavailable = 60500002, } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OnlineErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OnlineErrorCode.cs index f2c65e1d..9f6a17e7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OnlineErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OnlineErrorCode.cs @@ -71,7 +71,7 @@ public enum OnlineErrorCode /// Online 跨租户请求被拒绝(镜像 3xxx) /// [ErrorText("Online 跨租户请求被拒绝", "Online cross-tenant request denied")] - CrossTenantDenied = 32200002, + CrossDenied = 32200002, /// /// Online 跨 App 请求被拒绝(镜像 3xxx) @@ -86,7 +86,7 @@ public enum OnlineErrorCode ServerScopeDenied = 32200004, /// - /// Online 作用域缺失(Tenant/App/Server 未提供,镜像 3xxx) + /// Online 作用域缺失(Business/App/Server 未提供,镜像 3xxx) /// [ErrorText("Online 作用域缺失", "Online scope missing")] ScopeMissing = 32200005, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OrganizationErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OrganizationErrorCode.cs index 20b62cad..d25d17af 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OrganizationErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OrganizationErrorCode.cs @@ -51,7 +51,7 @@ public enum OrganizationErrorCode /// 租户默认组织禁止删除 /// [ErrorText("租户默认组织禁止删除", "The tenant default organization cannot be deleted")] - TenantDefaultOrganizationDeleteForbidden = 30700008, + DefaultOrganizationDeleteForbidden = 30700008, /// /// 禁止增加根节点组织 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/GlobalUsings.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/GlobalUsings.cs index 1572fa5b..1f6d46be 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/GlobalUsings.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/GlobalUsings.cs @@ -42,5 +42,5 @@ global using GameFrameX.Core.Enum.Errors; global using GameFrameX.Core.Service.Config; global using GameFrameX.Core.SqlSugar; -global using GameFrameX.Entity.Tenant; +global using GameFrameX.Entity.Business; global using GameFrameX.Foundation.Utility; \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Hub/OnlineUserHub.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Hub/OnlineUserHub.cs index 3b595e93..aa9604c1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Hub/OnlineUserHub.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Hub/OnlineUserHub.cs @@ -1,7 +1,7 @@ using GameFrameX.Core.Service.Cache; using GameFrameX.Core.Service.Message; using GameFrameX.Core.Service.Message.Dto; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using Microsoft.AspNetCore.SignalR; using System.Security.Claims; @@ -51,7 +51,7 @@ public override async Task OnConnectedAsync() var client = Parser.GetDefault().Parse(httpContext.Request.Headers["User-Agent"]); var userId = claims.FirstOrDefault(u => u.Type == ClaimConst.UserId)?.Value; - var user = new TenantOnlineUserEntity + var user = new OnlineUserEntity { ConnectionId = Context.ConnectionId, UserId = string.IsNullOrWhiteSpace(userId) ? 0 : long.Parse(userId), @@ -63,7 +63,7 @@ public override async Task OnConnectedAsync() Os = client.OS.Family + client.OS.Major, }; - var systemOnlineUserRepository = httpContext.RequestServices.GetRequiredService>(); + var systemOnlineUserRepository = httpContext.RequestServices.GetRequiredService>(); await systemOnlineUserRepository.InsertAsync(user); _systemCacheService.Set(CacheConst.KeyUserOnline + user.UserId, user); } @@ -86,7 +86,7 @@ public override async Task OnDisconnectedAsync(Exception? exception) return; } - var systemOnlineUserRepository = httpContext.RequestServices.GetRequiredService>(); + var systemOnlineUserRepository = httpContext.RequestServices.GetRequiredService>(); var user = await systemOnlineUserRepository.AsQueryable().Filter("", true).FirstAsync(u => u.ConnectionId == Context.ConnectionId); if (user == null) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/LogJob.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/LogJob.cs index 3b0bc917..22eca230 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/LogJob.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/LogJob.cs @@ -1,5 +1,5 @@ using GameFrameX.Core.Extension.Const; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; using GameFrameX.Entity.Log; @@ -37,9 +37,9 @@ public async Task ExecuteAsync(JobExecutingContext context, CancellationToken st // 此处仅保留差异日志与租户历史日志(C400 后只读)的清理。 await mainDb.Deleteable().Where(u => u.CreatedTime < cutoffTimestamp).ExecuteCommandAsync(stoppingToken); - await mainDb.Deleteable().Where(u => u.CreatedTime < cutoffTimestamp).ExecuteCommandAsync(stoppingToken); - await mainDb.Deleteable().Where(u => u.CreatedTime < cutoffTimestamp).ExecuteCommandAsync(stoppingToken); - await mainDb.Deleteable().Where(u => u.CreatedTime < cutoffTimestamp).ExecuteCommandAsync(stoppingToken); + await mainDb.Deleteable().Where(u => u.CreatedTime < cutoffTimestamp).ExecuteCommandAsync(stoppingToken); + await mainDb.Deleteable().Where(u => u.CreatedTime < cutoffTimestamp).ExecuteCommandAsync(stoppingToken); + await mainDb.Deleteable().Where(u => u.CreatedTime < cutoffTimestamp).ExecuteCommandAsync(stoppingToken); } } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/OnlineUserJob.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/OnlineUserJob.cs index a8e24593..254ea365 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/OnlineUserJob.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/OnlineUserJob.cs @@ -1,4 +1,4 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.System; using GameFrameX.Core.Service.Cache; using GameFrameX.Entity.Enum; @@ -24,7 +24,7 @@ public async Task ExecuteAsync(JobExecutingContext context, CancellationToken st using (var serviceScope = _scopeFactory.CreateScope()) { var database = serviceScope.ServiceProvider.GetRequiredService(); - await database.Deleteable().ExecuteCommandAsync(stoppingToken); + await database.Deleteable().ExecuteCommandAsync(stoppingToken); } Console.WriteLine("服务重启清空在线用户"); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/DatabaseLoggingWriter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/DatabaseLoggingWriter.cs index 711e04f8..b4bd477d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/DatabaseLoggingWriter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/DatabaseLoggingWriter.cs @@ -1,7 +1,7 @@ using System.Text.Json.Nodes; using GameFrameX.Core.Extension.Const; using GameFrameX.Core.Service.PlatformLogging; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; using GameFrameX.Entity.Log; @@ -162,7 +162,7 @@ private async Task WriteSingleAsync(LogMessage logMsg) } /// - /// 填充访问日志公共字段(SystemLogVisitEntity / TenantLogVisitEntity 共享 LogVisitFields)。 + /// 填充访问日志公共字段(SystemLogVisitEntity / LogVisitEntity 共享 LogVisitFields)。 /// private static void FillVisitFields(LogVisitFields target, LogContext ctx) { @@ -186,7 +186,7 @@ private static void FillVisitFields(LogVisitFields target, LogContext ctx) } /// - /// 填充操作/异常日志公共字段(SystemLogOperationEntity/Exception、TenantLogOperationEntity/Exception 共享 LogOperationFields)。 + /// 填充操作/异常日志公共字段(SystemLogOperationEntity/Exception、LogOperationEntity/Exception 共享 LogOperationFields)。 /// Exception 字段由调用方按日志种类决定(异常日志始终序列化,操作日志空值保持 null)。 /// private static void FillOperationFields(LogOperationFields target, LogContext ctx) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/GameAppRiskEnforcementModeResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/GameAppRiskEnforcementModeResolver.cs index 0ff459d9..f5b2d942 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/GameAppRiskEnforcementModeResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/GameAppRiskEnforcementModeResolver.cs @@ -1,5 +1,5 @@ using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; namespace GameFrameX.Core.Middleware; @@ -18,7 +18,7 @@ public GameAppRiskEnforcementModeResolver(ISqlSugarClient database) /// public RiskEnforcementModeEnum Resolve() { - var policy = _database.Queryable() + var policy = _database.Queryable() .Where(entity => entity.IsEnabled == true) .OrderByDescending(entity => entity.Id) .First(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs index 9da38a26..e6dfbe60 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs @@ -7,8 +7,8 @@ namespace GameFrameX.Core.Middleware; /// 两种 wire 形态(历史契约并存,不可合并为单一形态): /// /// :PascalCase {Code, Message},未传 errorCode 时 Code 回退 HTTP 状态码 —— -/// Client.Api(AppResolution / PublicCallbackTenantResolution / TenantExpiration)与 Hub.Api(HubTenant / TenantGameAppOpenAccessAuth) -/// 的拒绝出口;errorCode 参数直接消费 C262 统一错误码枚举数值(如 TenantErrorCode.TenantDisabled)。 +/// Client.Api(AppResolution / PublicCallbackResolution / Expiration)与 Hub.Api(Hub / GameAppOpenAccessAuth) +/// 的拒绝出口;errorCode 参数直接消费 C262 统一错误码枚举数值(如 ErrorCode.Disabled)。 /// :camelCase {code, message},601xx 信封码 /// (签名 60101-60103 / 加密信封 60104-60106)—— 与 MVC 主信封 camelCase 一致、客户端 Lua 读 tbErr.code 的双端冻结契约。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs index 95fb0a0f..53a9a19e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Core.Middleware; /// endpoint metadata 实现 的入口(外部平台 S2S 回调)豁免。 /// AuditOnly 语义:头值不在白名单()只记 Warning 日志放行, /// 不拦截——待不兼容 major 变更时才收紧为强制拒绝。 -/// 挂载点:管线最外层就近(TenantResolution 之后),先于签名/信封——版本观察与密钥态无关。 +/// 挂载点:管线最外层就近(Resolution 之后),先于签名/信封——版本观察与密钥态无关。 /// public sealed class ProtoVersionMiddleware { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/PublicStartupEndpointAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/PublicStartupEndpointAttribute.cs index 3ca36afa..29773bbf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/PublicStartupEndpointAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/PublicStartupEndpointAttribute.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Core.Middleware; /// 热更 manifest)一律纯 HTTPS 无请求签名,且客户端本就不在启动期做签名——不豁免则签名灰度切 FailClosed /// 会打断所有存量客户端启动流程。 /// 豁免边界:仅豁免传输签名强制,不等于匿名接口——仍要求租户 / 应用上下文解析 -/// (RequireTenantAppContext)+ TLS,也不豁免加密信封 opt-in 与其他中间件(如租户到期拦截)。 +/// (RequireAppContext)+ TLS,也不豁免加密信封 opt-in 与其他中间件(如租户到期拦截)。 /// 扩围纪律:新端点打标前必须先过分层判断口诀——「响应里有没有"这个人"的数据、请求有没有副作用」, /// 两个都没有才属 Tier 0;有写副作用或防滥用诉求(如 RegisterDevice、验证码发送)归 Tier 1,随 App 级 /// RiskPolicy 进入签名灰度。扩围须同步更新守护测试 PublicStartupEndpointGuardTests 的预期端点集合。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/RuntimeKeyMaterialCache.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/RuntimeKeyMaterialCache.cs index a47d94f5..88d3026f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/RuntimeKeyMaterialCache.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/RuntimeKeyMaterialCache.cs @@ -1,6 +1,6 @@ using System.Security.Cryptography; using System.Text; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using Microsoft.Extensions.Caching.Memory; namespace GameFrameX.Core.Middleware; @@ -12,13 +12,13 @@ internal static class RuntimeKeyMaterialCache internal static string Decrypt(string storedSecret) { - var environmentKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable) ?? string.Empty; + var environmentKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable) ?? string.Empty; var fingerprint = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(environmentKey + "\0" + storedSecret))); return Materials.GetOrCreate(fingerprint, entry => { entry.Size = 1; entry.SlidingExpiration = TimeSpan.FromMinutes(10); - return TenantSecretCrypto.Decrypt(storedSecret) ?? string.Empty; + return SecretCrypto.Decrypt(storedSecret) ?? string.Empty; })!; } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs index f85ff23a..e59c4fe9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs @@ -1,5 +1,5 @@ -using GameFrameX.Core.Service.Tenant; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Core.Service.Business; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Middleware; @@ -10,9 +10,9 @@ public sealed class SessionKeyResolver : ISessionKeyResolver { private readonly ISqlSugarClient _tenantDbProvider; - public SessionKeyResolver(ISqlSugarClient tenantDbProvider) + public SessionKeyResolver(ISqlSugarClient dbProvider) { - _tenantDbProvider = tenantDbProvider; + _tenantDbProvider = dbProvider; } /// @@ -33,7 +33,7 @@ public async Task ResolveAsync(string kid) /// 结果到中间件拒收信封码的映射见 ;Expire 判定为严格大于 /// (now == Expire 即到期),与 SignatureKeyResolver / LoginTicket key 查询口径一致。 /// - internal static SessionKeyLookupResult Judge(TenantSessionKeyEntity key, long now) + internal static SessionKeyLookupResult Judge(SessionKeyEntity key, long now) { if (key.IsEnabled == false) { @@ -53,10 +53,10 @@ internal static SessionKeyLookupResult Judge(TenantSessionKeyEntity key, long no return SessionKeyLookupResult.Active; } - private async Task GetKeyAsync(string kid) + private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _tenantDbProvider.Queryable().ClearFilter() + return await _tenantDbProvider.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs index 303954b8..b2eb1ef3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs @@ -1,5 +1,5 @@ -using GameFrameX.Core.Service.Tenant; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Core.Service.Business; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Middleware; @@ -10,9 +10,9 @@ public sealed class SignatureKeyResolver : ISignatureKeyResolver { private readonly ISqlSugarClient _tenantDbProvider; - public SignatureKeyResolver(ISqlSugarClient tenantDbProvider) + public SignatureKeyResolver(ISqlSugarClient dbProvider) { - _tenantDbProvider = tenantDbProvider; + _tenantDbProvider = dbProvider; } /// @@ -32,7 +32,7 @@ public async Task ResolveAsync(string kid) public async Task> GetActiveKeysAsync() { var now = TimerHelper.UnixTimeSeconds(); - var keys = await _tenantDbProvider.Queryable().ClearFilter() + var keys = await _tenantDbProvider.Queryable().ClearFilter() .Where(key => key.IsDeleted == false && key.IsEnabled == true && (key.NotBeforeTime == null || key.NotBeforeTime <= now) && (key.ExpireTime == null || key.ExpireTime > now)).ToListAsync(); @@ -48,7 +48,7 @@ public async Task> GetActiveKeysAsync() /// 结果到中间件拒签码的映射见 ;Expire 判定为严格大于 /// (now == Expire 即到期),与 LoginTicket key 查询口径一致。 /// - internal static SignatureKeyLookupResult Judge(TenantAppSignatureKeyEntity key, long now) + internal static SignatureKeyLookupResult Judge(AppSignatureKeyEntity key, long now) { if (key.IsEnabled == false) { @@ -68,10 +68,10 @@ internal static SignatureKeyLookupResult Judge(TenantAppSignatureKeyEntity key, return SignatureKeyLookupResult.Active; } - private async Task GetKeyAsync(string kid) + private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _tenantDbProvider.Queryable().ClearFilter() + return await _tenantDbProvider.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationMiddleware.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationMiddleware.cs index 19c233e8..6e94bf44 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationMiddleware.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationMiddleware.cs @@ -63,7 +63,7 @@ public async Task InvokeAsync(HttpContext context, IOptions() != null) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationOptions.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationOptions.cs index ab53c349..92768f33 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationOptions.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureValidationOptions.cs @@ -15,7 +15,7 @@ public sealed class SignatureValidationOptions /// /// v1 常量签名密钥。默认值与客户端 NetLib.ApiServerHttpRequest.SignatureSecret 同源 /// (C1 决策:密钥维持常量模式)。C2 起仅为 v1 过渡期回退路径,App 级 v2 密钥环 - /// (TenantAppSignatureKeyEntity)是正式密钥来源;C3 全量切换后本常量退役。 + /// (AppSignatureKeyEntity)是正式密钥来源;C3 全量切换后本常量退役。 /// public string Secret { get; set; } = "iwyWDopevzWv7zyriHi3DDtuwpKMOzfFPq0lkNITV44cPGD_"; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Option/DbSettings.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Option/DbSettings.cs index c31a2734..c713c4cc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Option/DbSettings.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Option/DbSettings.cs @@ -11,7 +11,7 @@ public sealed class DbSettings public bool EnableInitDb { get; set; } = true; /// - /// 启用库表差异日志。默认 true:写操作的差异快照经 AOP 落 system_log_diff / tenant_log_diff。 + /// 启用库表差异日志。默认 true:写操作的差异快照经 AOP 落 system_log_diff / log_diff。 /// public bool EnableDiffLog { get; set; } = true; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Auth/SystemAuthService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Auth/SystemAuthService.cs index ebc92650..bd1bb8db 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Auth/SystemAuthService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Auth/SystemAuthService.cs @@ -160,7 +160,7 @@ public async Task CreateTokenAsync(SystemUserBase user) { if (user.AccountType != AccountTypeEnum.SuperAdmin) { - await _serviceProvider.GetRequiredService().SingleLoginAsync(user.Id); + await _serviceProvider.GetRequiredService().SingleLoginAsync(user.Id); } // 生成Token令牌 @@ -207,7 +207,7 @@ public async Task CreateTokenAsync(SystemUserBase user) return systemUser; } - return await db.Queryable() + return await db.Queryable() .Where(u => u.IsDeleted == false && u.Account == account) .FirstAsync(); } @@ -224,7 +224,7 @@ public async Task GetUserInfoAsync() var userId = _currentUserContext.UserId; SystemUserBase? user = _currentUserContext.SuperAdmin ? await _systemUserRepository.GetFirstAsync(u => u.Id == userId) - : await _systemUserRepository.Context.Queryable().FirstAsync(u => u.IsDeleted == false && u.Id == userId); + : await _systemUserRepository.Context.Queryable().FirstAsync(u => u.IsDeleted == false && u.Id == userId); if (user == null) { @@ -375,7 +375,7 @@ public async Task SetupSuperAdminPasswordAsync([Required] SetupSu throw BusinessError.Oh(SystemUserErrorCode.SetupPasswordConfirmMismatch); } - // 密码强度(与 TenantUserService.ChangePwd 同构:平台密码策略开关控制正则校验) + // 密码强度(与 UserService.ChangePwd 同构:平台密码策略开关控制正则校验) if (CryptogramUtility.StrongPassword && !Regex.IsMatch(input.Password, CryptogramUtility.PasswordStrengthValidation)) { throw BusinessError.Oh(CryptogramUtility.PasswordStrengthValidationMsg); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Base/BaseService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Base/BaseService.cs index 30d34467..6dec8663 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Base/BaseService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Base/BaseService.cs @@ -1,4 +1,4 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Base; namespace GameFrameX.Core.Service.Base; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/DefaultTenantDatabaseSeeder.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/DefaultDatabaseSeeder.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/DefaultTenantDatabaseSeeder.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/DefaultDatabaseSeeder.cs index 3a8c87d7..0e1f2d65 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/DefaultTenantDatabaseSeeder.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/DefaultDatabaseSeeder.cs @@ -1,16 +1,16 @@ -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; -namespace GameFrameX.Core.Service.Tenant; +namespace GameFrameX.Core.Service.Business; -public static class DefaultTenantDatabaseSeeder +public static class DefaultDatabaseSeeder { /// /// 为新装主库构建默认启用的本地对象存储配置。 /// - public static TenantObjectStorageConfigEntity BuildDefaultObjectStorageConfig() + public static ObjectStorageConfigEntity BuildDefaultObjectStorageConfig() { var createdTime = DateTimeOffset.Parse("2022-02-10 00:00:00").ToUnixTimeSeconds(); - return new TenantObjectStorageConfigEntity + return new ObjectStorageConfigEntity { Id = SnowFlakeIdHelper.Instance.NextId(), Provider = "local", @@ -31,7 +31,7 @@ public static TenantObjectStorageConfigEntity BuildDefaultObjectStorageConfig() /// public static void SeedDefaultObjectStorageConfigIfEmpty(SqlSugarScopeProvider database) { - var hasAny = database.Queryable() + var hasAny = database.Queryable() .Filter(null, true) .Any(); if (hasAny) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/ObjectStorage/TenantObjectStorageConfigCrypto.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/ObjectStorage/ObjectStorageConfigCrypto.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/ObjectStorage/TenantObjectStorageConfigCrypto.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/ObjectStorage/ObjectStorageConfigCrypto.cs index 2132405f..1d05afe5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/ObjectStorage/TenantObjectStorageConfigCrypto.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/ObjectStorage/ObjectStorageConfigCrypto.cs @@ -1,20 +1,20 @@ using System.Text.Json.Nodes; using GameFrameX.ObjectStorage.Abstract; -namespace GameFrameX.Core.Service.Tenant.ObjectStorage; +namespace GameFrameX.Core.Service.Business.ObjectStorage; /// /// 租户对象存储 ConfigJson 敏感字段级加解密收口(C370 / GFX-829):写入侧在 规范化之后、 /// 落库之前调用 ;读取侧在 之前调用 。 /// 敏感字段集合由 Provider Schema 的 Sensitive 标记驱动(与表单脱敏同源),非敏感字段(Bucket / Endpoint 等)保持明文可读; -/// 字段值为 密文形态(enc:sec:v1: 前缀)时幂等跳过。 +/// 字段值为 密文形态(enc:sec:v1: 前缀)时幂等跳过。 /// 性能约束:底层 PBKDF2 派生单次数百毫秒级,而文件上传 / 下载 / 连通性测试按请求读取配置—— /// 按「密文原文 → 明文 JSON」做进程级缓存,同一密文只解密一次; /// 任何配置写入都会产生新密文(每次加密随机 Salt + Nonce),缓存 key 随之失效,无需显式失效协议。 /// ponytail: 缓存字典无淘汰上限(key 为整段密文 JSON,每条数 KB);对象存储配置行数极少(每租户至多几条), /// 增长天花板可忽略。升级路径:按 StorageConfigId 失效或换 LRU。 /// -public static class TenantObjectStorageConfigCrypto +public static class ObjectStorageConfigCrypto { private static readonly ObjectStorageConfigSchemaProvider SchemaProvider = new(); private static readonly ConcurrentDictionary SchemaCache = new(StringComparer.Ordinal); @@ -39,7 +39,7 @@ public static string EncryptConfigJson(string provider, string configJson) return configJson; } - return TransformSensitiveFields(configJson, sensitiveKeys, TenantSecretCrypto.Encrypt); + return TransformSensitiveFields(configJson, sensitiveKeys, SecretCrypto.Encrypt); } /// @@ -51,7 +51,7 @@ public static string EncryptConfigJson(string provider, string configJson) /// 敏感字段为明文、可直接构建 Provider 上下文的 ConfigJson public static string DecryptConfigJson(string provider, string configJson) { - if (string.IsNullOrWhiteSpace(configJson) || !configJson.Contains(TenantSecretCrypto.EncryptedPrefix, StringComparison.Ordinal)) + if (string.IsNullOrWhiteSpace(configJson) || !configJson.Contains(SecretCrypto.EncryptedPrefix, StringComparison.Ordinal)) { return configJson; } @@ -69,7 +69,7 @@ private static string DecryptCore(string provider, string configJson) return configJson; } - return TransformSensitiveFields(configJson, sensitiveKeys, TenantSecretCrypto.Decrypt); + return TransformSensitiveFields(configJson, sensitiveKeys, SecretCrypto.Decrypt); } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantReadActionClassifier.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/ReadActionClassifier.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantReadActionClassifier.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/ReadActionClassifier.cs index 9495e180..eab3f2b1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantReadActionClassifier.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/ReadActionClassifier.cs @@ -1,15 +1,15 @@ -namespace GameFrameX.Core.Service.Tenant; +namespace GameFrameX.Core.Service.Business; /// /// 租户请求读写动作分类器。 /// 用于「过期租户禁止写操作、允许读操作」的门禁裁决:action 名命中只读前缀集合判为读并放行,否则判为写并按过期规则拦截。 /// 策略偏向安全侧——未知 action 默认判为写,漏判只会多挡读、不会漏挡写。 -/// 刻意用方法名前缀而非 HTTP 方法:项目内分页等查询走 POST(如 apiSystemTenantPagePost),用 HTTP 方法会把过期租户的读误判为写。 +/// 刻意用方法名前缀而非 HTTP 方法:项目内分页等查询走 POST(如 apiSystemPagePost),用 HTTP 方法会把过期租户的读误判为写。 /// -public static class TenantReadActionClassifier +public static class ReadActionClassifier { /// - /// 只读动作方法名前缀集合(命中即判为读,放行过期租户)。扩充需同步更新 TenantReadActionClassifierTests。 + /// 只读动作方法名前缀集合(命中即判为读,放行过期租户)。扩充需同步更新 ReadActionClassifierTests。 /// 刻意排除 Is / Has:会误伤 Issue(发放)/ Hash 等写操作。 /// public static readonly string[] ReadPrefixes = diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantSecretCrypto.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/SecretCrypto.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantSecretCrypto.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/SecretCrypto.cs index 84113635..b282e1ca 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantSecretCrypto.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/SecretCrypto.cs @@ -1,21 +1,21 @@ using System.Collections.Concurrent; -using GameFrameX.Core.Service.Tenant.ObjectStorage; +using GameFrameX.Core.Service.Business.ObjectStorage; using GameFrameX.Foundation.Encryption; -namespace GameFrameX.Core.Service.Tenant; +namespace GameFrameX.Core.Service.Business; /// /// 租户业务凭证静态加密唯一收口(C370 / GFX-829):除连接串外的可逆凭证(邮件 Provider 凭据、开放接口 AccessSecret、 /// 对象存储 ConfigJson 敏感字段等)落库前加密、使用前解密都必须经过本类,禁止调用方自行判断密文形态。 /// 密文格式为 enc:sec:v1:<Base64>,底层复用 Foundation.Encryption 的 (AES-GCM + PBKDF2 600,000 迭代派生); -/// 密钥取环境变量 (GFX_TENANT_SECRET_ENC_KEY),用于主库保留运行凭据的静态加密。 +/// 密钥取环境变量 (GAMEFRAMEX_SECRET_ENCRYPTION_KEY),用于主库保留运行凭据的静态加密。 /// 前缀刻意区别于 历史连接串的 enc:v1::两类密文互不认领,防止连接串密文被凭证收口误当明文透传(反之亦然)。 /// 兼容语义:无 enc:sec:v1: 前缀的存量值视为明文直通;未配置密钥时写入侧保持明文直存(降级模式,首次打一条告警), /// 读取侧遇到带前缀密文则抛错提示补配密钥,绝不静默把密文当明文使用(fail-closed)。 /// 性能约束:PBKDF2 派生开销大(单次数百毫秒级),加解密只允许发生在「配置加载」边界(进程级缓存 / 单次加载语义), -/// 禁止每请求解密;对象存储 ConfigJson 的字段级收口与缓存见 。 +/// 禁止每请求解密;对象存储 ConfigJson 的字段级收口与缓存见 。 /// -public static class TenantSecretCrypto +public static class SecretCrypto { /// /// 密文前缀(sec = 业务凭证域;v1 = AesHelper 当前负载格式版本)。变更前缀语义必须升版本号而非复用。 @@ -25,7 +25,7 @@ public static class TenantSecretCrypto /// /// 加密密钥的环境变量名。三 host 与回填执行器共用同一密钥,否则跨 host 解密失败。 /// - public const string KeyEnvironmentVariable = "GFX_TENANT_SECRET_ENC_KEY"; + public const string KeyEnvironmentVariable = "GAMEFRAMEX_SECRET_ENCRYPTION_KEY"; /// /// 降级模式(未配置密钥)告警只打一次的哨兵:0 = 未告警,1 = 已告警。 @@ -51,7 +51,7 @@ public static class TenantSecretCrypto // 降级模式:无密钥时明文直存,与存量部署兼容;读取侧无前缀直通,行为一致。 if (Interlocked.CompareExchange(ref _degradedModeWarned, 1, 0) == 0) { - Console.WriteLine($"[TenantSecretCrypto] 警告:环境变量 {KeyEnvironmentVariable} 未配置,业务凭证以明文落库(降级模式)。配置后新写入即密文,存量明文由回填执行器加密。"); + Console.WriteLine($"[SecretCrypto] 警告:环境变量 {KeyEnvironmentVariable} 未配置,业务凭证以明文落库(降级模式)。配置后新写入即密文,存量明文由回填执行器加密。"); } return plainSecret; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/Dto/TenantFileResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/Dto/TenantFileResponse.cs deleted file mode 100644 index 07569e7e..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/Dto/TenantFileResponse.cs +++ /dev/null @@ -1,93 +0,0 @@ -namespace GameFrameX.Core.Service.File.Dto; - -/// -/// 系统文件输出参数 -/// -public class TenantFileResponse -{ - /// - /// Id - /// - public long Id { get; set; } - - /// - /// 提供者 - /// - public string? Provider { get; set; } - - /// - /// 关联的租户对象存储配置 ID(TenantObjectStorageConfigEntity.Id)。 - /// 新上传文件必填,用于按精确配置解析下载/删除路径;历史记录为 null 时按本地 legacy 行为兜底。 - /// - public long? StorageConfigId { get; set; } - - /// - /// 仓储名称 - /// - public string? BucketName { get; set; } - - /// - /// 文件名称(源文件名) - /// - public string? FileName { get; set; } - - /// - /// 文件后缀 - /// - public string? Suffix { get; set; } - - /// - /// 存储路径 - /// - public string? FilePath { get; set; } - - /// - /// 文件大小KB - /// - public string? SizeKb { get; set; } - - /// - /// 文件大小信息-计算后的 - /// - public string? SizeInfo { get; set; } - - /// - /// 外链地址-OSS上传后生成外链地址方便前端预览 - /// - public string? Url { get; set; } - - /// - /// 文件MD5 - /// - public string? FileMd5 { get; set; } - - /// - /// 是否启用 - /// - public bool? IsEnabled { get; set; } - - /// - /// 创建时间 - /// - public long CreatedTime { get; set; } - - /// - /// 创建人 - /// - public string? CreatedName { get; set; } - - /// - /// 更新时间 - /// - public long? UpdateTime { get; set; } - - /// - /// 更新人 - /// - public string? UpdatedName { get; set; } - - /// - /// 行版本号(乐观锁) - /// - public long? RowVersion { get; set; } -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/TenantFileService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/FileService.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/TenantFileService.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/FileService.cs index dbb47e9a..e65133a9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/TenantFileService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/File/FileService.cs @@ -1,7 +1,7 @@ using GameFrameX.Core.Service.File.Dto; -using GameFrameX.Core.Service.Tenant.ObjectStorage; +using GameFrameX.Core.Service.Business.ObjectStorage; using GameFrameX.Core.Service.User; -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; using GameFrameX.ObjectStorage.Abstract; using Microsoft.AspNetCore.StaticFiles; @@ -13,31 +13,31 @@ namespace GameFrameX.Core.Service.File; /// 业务规则: /// /// 上传必须命中当前租户唯一启用的配置;未启用任何配置时直接报错,不做隐式 fallback。 -/// 下载/删除按文件记录的 精确解析(即使该配置已被禁用)。 -/// 为 null 的历史记录按本地 legacy 行为兜底(wwwroot 下原 FilePath)。 -/// 大小限额直接按字节比较 。 +/// 下载/删除按文件记录的 精确解析(即使该配置已被禁用)。 +/// 为 null 的历史记录按本地 legacy 行为兜底(wwwroot 下原 FilePath)。 +/// 大小限额直接按字节比较 。 /// MD5 去重 key 收紧为 StorageConfigId + FileMd5 + SizeKb。 /// 上传 Provider 失败 → 不写文件记录;删除 Provider 失败 → 保留记录并记录日志。 /// /// [ApiDescriptionSettings(Order = 410)] -public class TenantFileService : IAdminApiController +public class FileService : IAdminApiController { private static readonly JsonSerializerOptions ContentTypeJsonOptions = new(); private readonly CurrentUserContext _currentUserContext; - private readonly SqlSugarRepository _systemFileRepository; - private readonly SqlSugarRepository _storageConfigRepository; + private readonly SqlSugarRepository _systemFileRepository; + private readonly SqlSugarRepository _storageConfigRepository; private readonly IObjectStorageAdapterFactory _adapterFactory; private readonly IServiceProvider _serviceProvider; - private readonly ILogger _logger; + private readonly ILogger _logger; - public TenantFileService(CurrentUserContext currentUserContext, - SqlSugarRepository systemFileRepository, - SqlSugarRepository storageConfigRepository, + public FileService(CurrentUserContext currentUserContext, + SqlSugarRepository systemFileRepository, + SqlSugarRepository storageConfigRepository, IObjectStorageAdapterFactory adapterFactory, IServiceProvider serviceProvider, - ILogger logger) + ILogger logger) { _currentUserContext = currentUserContext; _systemFileRepository = systemFileRepository; @@ -54,7 +54,7 @@ public TenantFileService(CurrentUserContext currentUserContext, /// [DisplayName("获取文件分页列表")] [ApiDescriptionSettings(Name = "Page")] - public async Task> PageAsync(PageFileRequest input) + public async Task> PageAsync(PageFileRequest input) { var startTimestamp = input.StartTime ?? 0; var endTimestamp = input.EndTime ?? long.MaxValue; @@ -64,7 +64,7 @@ public async Task> PageAsync(PageFileReque .WhereIF(input.StartTime.HasValue && input.EndTime.HasValue, u => u.CreatedTime >= startTimestamp && u.CreatedTime <= endTimestamp) .OrderBy(u => u.CreatedTime, OrderByType.Desc) - .Select() + .Select() .ToPagedListAsync(input.Page, input.PageSize); } @@ -232,7 +232,7 @@ public async Task UpdateFileAsync(FileRequest input) throw BusinessError.Oh(FileErrorCode.FileNotFound); } - await _systemFileRepository.UpdateAsync(u => new TenantFileEntity { FileName = input.FileName, }, u => u.Id == input.Id); + await _systemFileRepository.UpdateAsync(u => new FileEntity { FileName = input.FileName, }, u => u.Id == input.Id); } /// @@ -240,7 +240,7 @@ public async Task UpdateFileAsync(FileRequest input) /// /// /// - private async Task GetFileAsync([FromQuery] FileRequest input) + private async Task GetFileAsync([FromQuery] FileRequest input) { var file = await _systemFileRepository.GetFirstAsync(u => u.Id == input.Id); return file ?? throw BusinessError.Oh(FileErrorCode.FileNotFound); @@ -252,7 +252,7 @@ private async Task GetFileAsync([FromQuery] FileRequest input) /// 文件 /// 路径覆盖值;为空时使用配置的 PathTemplate /// - private async Task HandleUploadFileAsync(IFormFile file, string? savePath) + private async Task HandleUploadFileAsync(IFormFile file, string? savePath) { if (file == null) { @@ -303,7 +303,7 @@ private async Task HandleUploadFileAsync(IFormFile file, strin } } - var newFile = new TenantFileEntity + var newFile = new FileEntity { Id = SnowFlakeIdHelper.Instance.NextId(), Provider = config.Provider, @@ -321,7 +321,7 @@ private async Task HandleUploadFileAsync(IFormFile file, strin // 上传 Provider 失败 → 不写文件记录。ConfigJson 敏感字段解密走进程级缓存(C370,禁止每请求 PBKDF2 派生) var adapter = _adapterFactory.Resolve(config.Provider); - var context = _adapterFactory.BuildContext(config.Provider, TenantObjectStorageConfigCrypto.DecryptConfigJson(config.Provider, config.ConfigJson), config.PathTemplate); + var context = _adapterFactory.BuildContext(config.Provider, ObjectStorageConfigCrypto.DecryptConfigJson(config.Provider, config.ConfigJson), config.PathTemplate); try { using (var uploadStream = file.OpenReadStream()) @@ -371,7 +371,7 @@ private async Task HandleUploadFileAsync(IFormFile file, strin [ApiDescriptionSettings(Name = "UploadAvatar")] public async Task UploadAvatarAsync([Required] IFormFile file) { - var systemUserRepository = _serviceProvider.GetRequiredService>(); + var systemUserRepository = _serviceProvider.GetRequiredService>(); var user = systemUserRepository.GetFirst(u => u.Id == _currentUserContext.UserId); // 删除当前用户已有头像 if (!string.IsNullOrWhiteSpace(user.Avatar)) @@ -381,7 +381,7 @@ public async Task UploadAvatarAsync([Required] IFormFile file) } var res = await UploadFileAsync(file, "Upload/Avatar"); - await systemUserRepository.UpdateAsync(u => new TenantUserEntity { Avatar = $"{res.FilePath}/{res.Name}", }, u => u.Id == user.Id); + await systemUserRepository.UpdateAsync(u => new UserEntity { Avatar = $"{res.FilePath}/{res.Name}", }, u => u.Id == user.Id); return res; } @@ -394,7 +394,7 @@ public async Task UploadAvatarAsync([Required] IFormFile file) [ApiDescriptionSettings(Name = "UploadSignature")] public async Task UploadSignatureAsync([Required] IFormFile file) { - var systemUserRepository = _serviceProvider.GetRequiredService>(); + var systemUserRepository = _serviceProvider.GetRequiredService>(); var user = systemUserRepository.GetFirst(u => u.Id == _currentUserContext.UserId); // 删除当前用户已有电子签名 if (!string.IsNullOrWhiteSpace(user.Signature) && user.Signature.EndsWith(".png")) @@ -404,7 +404,7 @@ public async Task UploadSignatureAsync([Required] IFormFile file) } var res = await UploadFileAsync(file, "Upload/Signature"); - await systemUserRepository.UpdateAsync(u => new TenantUserEntity { Signature = $"{res.FilePath}/{res.Name}", }, u => u.Id == user.Id); + await systemUserRepository.UpdateAsync(u => new UserEntity { Signature = $"{res.FilePath}/{res.Name}", }, u => u.Id == user.Id); return res; } @@ -412,7 +412,7 @@ public async Task UploadSignatureAsync([Required] IFormFile file) /// 解析既有文件的 Adapter + Context:StorageConfigId 命中则按精确配置(即使已禁用); /// 历史记录(StorageConfigId 为空)按本地 legacy 兜底。 /// - private async Task ResolveForExistingFileAsync(TenantFileEntity file) + private async Task ResolveForExistingFileAsync(FileEntity file) { if (file.StorageConfigId.HasValue && file.StorageConfigId.Value > 0) { @@ -420,7 +420,7 @@ private async Task ResolveForExistingFileAsync(TenantFileEn if (config != null) { var adapter = _adapterFactory.Resolve(config.Provider); - var context = _adapterFactory.BuildContext(config.Provider, TenantObjectStorageConfigCrypto.DecryptConfigJson(config.Provider, config.ConfigJson), config.PathTemplate); + var context = _adapterFactory.BuildContext(config.Provider, ObjectStorageConfigCrypto.DecryptConfigJson(config.Provider, config.ConfigJson), config.PathTemplate); return new ResolvedFileAdapter(adapter, context); } } @@ -431,7 +431,7 @@ private async Task ResolveForExistingFileAsync(TenantFileEn return new ResolvedFileAdapter(localAdapter, localContext); } - private static string BuildObjectKey(TenantFileEntity file) + private static string BuildObjectKey(FileEntity file) { var finalName = file.Id + (file.Suffix ?? string.Empty); return string.IsNullOrEmpty(file.FilePath) ? finalName : file.FilePath + "/" + finalName; @@ -465,7 +465,7 @@ private static string ResolveUploadPath(string? savePath, string pathTemplate) /// /// 当前租户启用的配置列表。 /// 唯一启用配置。 - internal static TenantObjectStorageConfigEntity EnsureSingleActiveConfig(List activeConfigs) + internal static ObjectStorageConfigEntity EnsureSingleActiveConfig(List activeConfigs) { if (activeConfigs == null || activeConfigs.Count == 0) { @@ -524,7 +524,7 @@ private static string ResolveSuffix(IFormFile file) return suffix ?? string.Empty; } - private static bool IsContentTypeAllowed(TenantObjectStorageConfigEntity config, string contentType) + private static bool IsContentTypeAllowed(ObjectStorageConfigEntity config, string contentType) { if (string.IsNullOrWhiteSpace(config.AllowedContentTypesJson)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/AddMenuRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/AddMenuRequest.cs index 075d6be0..8bbb9be7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/AddMenuRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/AddMenuRequest.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Core.Service.Menu.Dto; /// /// 新增/编辑菜单输入参数。 -/// 显式声明前端表单可填字段,不再继承 ,避免种子安全元数据(SuperAdminOnly、AllowTenantWhenSuperAdminOnly、Key)与子节点导航属性被前端批量赋值。 +/// 显式声明前端表单可填字段,不再继承 ,避免种子安全元数据(SuperAdminOnly、AllowAdminWhenSuperAdminOnly、Key)与子节点导航属性被前端批量赋值。 /// public class AddMenuRequest { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs index 0b29fcb5..c58b33fa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs @@ -111,10 +111,10 @@ public class GlobalMenuResponse /// /// 超管专属菜单下允许租户只读访问 /// - public bool AllowTenantWhenSuperAdminOnly { get; set; } + public bool AllowAdminWhenSuperAdminOnly { get; set; } /// - /// 应用作用域(Tenant 租户默认 / Platform 仅超管 / App 应用工作台)。显式声明菜单归属域,取代路由前缀推断。 + /// 应用作用域(Business 租户默认 / Platform 仅超管 / App 应用工作台)。显式声明菜单归属域,取代路由前缀推断。 /// public MenuAppScopeEnum AppScope { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/GlobalMenuService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/GlobalMenuService.cs index 4c83d41e..f94f52cf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/GlobalMenuService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/GlobalMenuService.cs @@ -5,7 +5,7 @@ using GameFrameX.Core.Service.User; using GameFrameX.Core.Const.MenuSeed; using GameFrameX.Core.Extension.Const; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; using GameFrameX.Entity.Global; @@ -67,9 +67,9 @@ public async Task> GetLoginMenuTreeAsync() else { var menuIdList = await GetMenuIdListAsync(); - // B5: 过滤整棵 SuperAdmin-only 子树(而非仅 AllowTenant 子集)。 - // 旧逻辑只剔除 TenantReadableSuperAdminOnlyMenuIds,当某菜单由"租户可见"改为"超管专属"(SuperAdminOnly=true, AllowTenant=false)后, - // 既有租户的 tenant_role_menu 仍残留旧授权,且不在 AllowTenant 集合内,导致菜单仍出现在租户导航中(点击后端 403)。改为剔除整棵超管子树可防御性修复。 + // B5: 过滤整棵 SuperAdmin-only 子树(而非仅 Allow 子集)。 + // 旧逻辑只剔除 AdminReadableSuperAdminOnlyMenuIds,当某菜单由"租户可见"改为"超管专属"(SuperAdminOnly=true, Allow=false)后, + // 既有租户的 role_menu 仍残留旧授权,且不在 Allow 集合内,导致菜单仍出现在租户导航中(点击后端 403)。改为剔除整棵超管子树可防御性修复。 var menuTreeIds = menuIdList .Where(u => !MenuSeedCatalog.SuperAdminOnlySubtreeMenuIds.Contains(u)) .ToArray(); @@ -244,12 +244,12 @@ public async Task DeleteMenuAsync(DeleteMenuRequest input) } /// - /// 从主库删除指定菜单的角色授权(tenant_role_menu)。 + /// 从主库删除指定菜单的角色授权(role_menu)。 /// private async Task CascadeDeleteRoleMenusAsync(List menuIdList) { var mainDb = _sqlSugarClient.AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId); - await mainDb.Deleteable().Where(u => menuIdList.Contains(u.MenuId)).ExecuteCommandAsync(); + await mainDb.Deleteable().Where(u => menuIdList.Contains(u.MenuId)).ExecuteCommandAsync(); } /// @@ -309,7 +309,7 @@ public async Task> GetOwnButtonPermListAsync() } /// - /// 获取当前用户已授权的菜单Id集合(缓存,含目录/菜单/按钮,来自 TenantRoleMenuEntity)。 + /// 获取当前用户已授权的菜单Id集合(缓存,含目录/菜单/按钮,来自 RoleMenuEntity)。 /// 供基于稳定身份(Key)的鉴权使用: 由 Key 派生的 Id 与本集合比对。 /// /// 非超管返回其角色已授权的 MenuId 集合;超管本不应被调用(JwtHandler 提前放行),此处仍返回空集以保证安全。 @@ -447,7 +447,7 @@ private void DeleteMenuCache() /// private async Task> GetMenuIdListAsync() { - var roleIdList = await _serviceProvider.GetRequiredService().GetUserRoleIdListAsync(_currentUserContext.UserId); - return await _serviceProvider.GetRequiredService().GetRoleMenuIdListAsync(roleIdList); + var roleIdList = await _serviceProvider.GetRequiredService().GetUserRoleIdListAsync(_currentUserContext.UserId); + return await _serviceProvider.GetRequiredService().GetRoleMenuIdListAsync(roleIdList); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemEmailPurpose.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemEmailPurpose.cs index fced1a76..8b6a9738 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemEmailPurpose.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemEmailPurpose.cs @@ -17,7 +17,7 @@ public enum SystemEmailPurpose /// /// 租户生命周期通知(开通、到期、账单)。 /// - TenantLifecycle = 1, + Lifecycle = 1, /// /// 平台安全通知(异常登录、密钥泄露告警等)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemMessageService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemMessageService.cs index 36ce93aa..0ea0e00b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemMessageService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemMessageService.cs @@ -47,7 +47,7 @@ public async Task SendAllUserAsync(MessageRequest input) [ApiDescriptionSettings(Name = "SendOtherUser")] public async Task SendOtherUserAsync(MessageRequest input) { - var user = _systemCacheService.Get(CacheConst.KeyUserOnline + input.UserId); + var user = _systemCacheService.Get(CacheConst.KeyUserOnline + input.UserId); if (user != null && !string.IsNullOrEmpty(user.ConnectionId)) { await _chatHubContext.Clients.AllExcept(user.ConnectionId).ReceiveMessageAsync(input); @@ -63,7 +63,7 @@ public async Task SendOtherUserAsync(MessageRequest input) [ApiDescriptionSettings(Name = "SendUser")] public async Task SendUserAsync(MessageRequest input) { - var user = _systemCacheService.Get(CacheConst.KeyUserOnline + input.UserId); + var user = _systemCacheService.Get(CacheConst.KeyUserOnline + input.UserId); if (user == null || string.IsNullOrEmpty(user.ConnectionId)) { return; @@ -89,7 +89,7 @@ public async Task SendUsersAsync(MessageRequest input) var userlist = new List(); foreach (var userid in input.UserIds) { - var user = _systemCacheService.Get(CacheConst.KeyUserOnline + userid); + var user = _systemCacheService.Get(CacheConst.KeyUserOnline + userid); if (user != null && !string.IsNullOrEmpty(user.ConnectionId)) { userlist.Add(user.ConnectionId); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/Dto/TenantOnlineUserResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/Dto/OnlineUserResponse.cs similarity index 97% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/Dto/TenantOnlineUserResponse.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/Dto/OnlineUserResponse.cs index 3bf9d495..5e006df0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/Dto/TenantOnlineUserResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/Dto/OnlineUserResponse.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Core.Service.OnlineUser.Dto; /// /// 系统在线用户输出参数 /// -public class TenantOnlineUserResponse +public class OnlineUserResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/TenantOnlineUserService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/OnlineUserService.cs similarity index 82% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/TenantOnlineUserService.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/OnlineUserService.cs index bfaf90cf..807c7bd2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/TenantOnlineUserService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/OnlineUser/OnlineUserService.cs @@ -8,13 +8,13 @@ namespace GameFrameX.Core.Service.OnlineUser; /// 系统在线用户服务 /// [ApiDescriptionSettings(Order = 300)] -public class TenantOnlineUserService : IAdminApiController +public class OnlineUserService : IAdminApiController { - private readonly SqlSugarRepository _systemOnlineUerRepository; + private readonly SqlSugarRepository _systemOnlineUerRepository; private readonly SystemConfigService _systemConfigService; private readonly IHubContext _onlineUserHubContext; - public TenantOnlineUserService(SqlSugarRepository systemOnlineUerRepository, + public OnlineUserService(SqlSugarRepository systemOnlineUerRepository, SystemConfigService systemConfigService, IHubContext onlineUserHubContext) { @@ -29,12 +29,12 @@ public TenantOnlineUserService(SqlSugarRepository system /// [NonAction] [DisplayName("获取在线用户分页列表")] - public async Task> PageAsync(PageOnlineUserRequest input) + public async Task> PageAsync(PageOnlineUserRequest input) { return await _systemOnlineUerRepository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(input.UserName), u => u.UserName.Contains(input.UserName ?? string.Empty)) .WhereIF(!string.IsNullOrWhiteSpace(input.RealName), u => (u.RealName ?? string.Empty).Contains(input.RealName ?? string.Empty)) - .Select() + .Select() .ToPagedListAsync(input.Page, input.PageSize); } @@ -46,7 +46,7 @@ public async Task> PageAsync(PageOnl [NonAction] [NonValidation] [DisplayName("强制下线")] - public async Task ForceOfflineAsync(TenantOnlineUserEntity user) + public async Task ForceOfflineAsync(OnlineUserEntity user) { if (string.IsNullOrEmpty(user.ConnectionId)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigProvider.cs index 440912c3..d4eb5fce 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigProvider.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Core.Service.PlatformPasswordPolicy; /// 平台密码策略配置提供器(C173)。维护同一 Admin Host 内的内存快照:启动期由 /// PlatformPasswordPolicyStartupLoader(Web.Core)调 /// 从主库 加载;SuperAdmin 保存配置后由配置服务调用 -/// 刷新快照并镜像同步 密码策略静态属性,使后续 TenantUserService.ChangePwdAsync +/// 刷新快照并镜像同步 密码策略静态属性,使后续 UserService.ChangePwdAsync /// 读到最新密码强度规则。密钥(CryptoType/PublicKey/PrivateKey)不在此处管理,保持启动期 Secret。 /// public sealed class PlatformPasswordPolicyConfigProvider @@ -141,7 +141,7 @@ private static void EnsureValidRegex(string pattern) } /// - /// 将密码策略快照镜像同步到 CryptogramUtility 静态属性,使 TenantUserService.ChangePwdAsync 读到最新值(同 Host 动态生效)。 + /// 将密码策略快照镜像同步到 CryptogramUtility 静态属性,使 UserService.ChangePwdAsync 读到最新值(同 Host 动态生效)。 /// private static void ApplyToCryptogramUtility(PlatformPasswordPolicySettings settings) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigService.cs index 49bf8fc3..01fd00f5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicyConfigService.cs @@ -40,7 +40,7 @@ public async Task DetailAsync() /// /// 保存平台密码策略配置。CAS 乐观锁冲突重试;成功后刷新同 Host 快照并镜像同步 CryptogramUtility 密码策略静态属性, - /// 后续 TenantUserService.ChangePwdAsync 立即按新规则校验。 + /// 后续 UserService.ChangePwdAsync 立即按新规则校验。 /// [ApiDescriptionSettings(Name = "Update")] [HttpPost] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicySettings.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicySettings.cs index 370e20fc..3a481b83 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicySettings.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/PlatformPasswordPolicy/PlatformPasswordPolicySettings.cs @@ -9,7 +9,7 @@ public sealed class PlatformPasswordPolicySettings { /// /// 是否开启密码强度验证。默认关闭,等价历史 StrongPassword 默认值(关闭)。 - /// 保存后同 Host 即时生效(TenantUserService.ChangePwdAsync 读 CryptogramUtility 镜像)。 + /// 保存后同 Host 即时生效(UserService.ChangePwdAsync 读 CryptogramUtility 镜像)。 /// public bool StrongPassword { get; set; } = false; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/AddRoleRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/AddRoleRequest.cs index 6496c94a..f52b21b7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/AddRoleRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/AddRoleRequest.cs @@ -1,6 +1,6 @@ namespace GameFrameX.Core.Service.Role.Dto; -public class AddRoleRequest : TenantRoleEntity +public class AddRoleRequest : RoleEntity { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/TenantRoleResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/TenantRoleResponse.cs deleted file mode 100644 index 2b28ebaf..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/Dto/TenantRoleResponse.cs +++ /dev/null @@ -1,69 +0,0 @@ -using GameFrameX.Entity.Enum; - -namespace GameFrameX.Core.Service.Role.Dto; - -/// -/// 系统角色输出参数 -/// -public class TenantRoleResponse -{ - /// - /// Id - /// - public long Id { get; set; } - - /// - /// 名称 - /// - public string Name { get; set; } = string.Empty; - - /// - /// 编码 - /// - public string? Code { get; set; } - - /// - /// 排序 - /// - public int OrderNo { get; set; } = 100; - - /// - /// 数据范围(1全部数据 2本部门及以下数据 3本部门数据 4仅本人数据 5自定义数据) - /// - public DataScopeEnum DataScope { get; set; } = DataScopeEnum.Self; - - /// - /// 备注 - /// - public string? Remark { get; set; } - - /// - /// 是否启用 - /// - public bool? IsEnabled { get; set; } - - /// - /// 创建时间 - /// - public long CreatedTime { get; set; } - - /// - /// 创建人 - /// - public string? CreatedName { get; set; } - - /// - /// 更新时间 - /// - public long? UpdateTime { get; set; } - - /// - /// 更新人 - /// - public string? UpdatedName { get; set; } - - /// - /// 行版本号(乐观锁) - /// - public long? RowVersion { get; set; } -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/TenantRoleMenuService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/RoleMenuService.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/TenantRoleMenuService.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/RoleMenuService.cs index 0bf013c6..6a659d76 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/TenantRoleMenuService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/RoleMenuService.cs @@ -8,14 +8,14 @@ namespace GameFrameX.Core.Service.Role; /// /// 系统角色菜单服务 /// -public class TenantRoleMenuService +public class RoleMenuService { - private readonly SqlSugarRepository _systemRoleMenuRepository; + private readonly SqlSugarRepository _systemRoleMenuRepository; private readonly SqlSugarRepository _systemMenuRepository; private readonly SystemCacheService _systemCacheService; private readonly SqlSugarTransactionRunner _transactionRunner; - public TenantRoleMenuService(SqlSugarRepository systemRoleMenuRepository, + public RoleMenuService(SqlSugarRepository systemRoleMenuRepository, SqlSugarRepository systemMenuRepository, SystemCacheService systemCacheService, SqlSugarTransactionRunner transactionRunner) @@ -52,7 +52,7 @@ await _transactionRunner.ExecuteAsync(async () => await _systemRoleMenuRepository.DeleteAsync(u => u.RoleId == input.Id); if (input.MenuIdList.Count > 0) { - var menus = input.MenuIdList.Select(u => new TenantRoleMenuEntity + var menus = input.MenuIdList.Select(u => new RoleMenuEntity { RoleId = input.Id, MenuId = u, @@ -89,8 +89,8 @@ private async Task> ExcludeSuperAdminOnlyMenusAsync(List menuId } var reservedMenuIds = await GetSuperAdminOnlyMenuIdsAsync(); - var tenantReadableMenuIds = MenuSeedCatalog.TenantReadableSuperAdminOnlyMenuIds; - return menuIdList.Where(u => !reservedMenuIds.Contains(u) || tenantReadableMenuIds.Contains(u)).Distinct().ToList(); + var readableMenuIds = MenuSeedCatalog.AdminReadableSuperAdminOnlyMenuIds; + return menuIdList.Where(u => !reservedMenuIds.Contains(u) || readableMenuIds.Contains(u)).Distinct().ToList(); } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/TenantRoleService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/RoleService.cs similarity index 90% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/TenantRoleService.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/RoleService.cs index 7966adf1..89d1ebb7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/TenantRoleService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Role/RoleService.cs @@ -11,18 +11,18 @@ namespace GameFrameX.Core.Service.Role; /// 系统角色服务 /// [ApiDescriptionSettings(Order = 480)] -public class TenantRoleService : BaseSystemService +public class RoleService : BaseSystemService { - private readonly SqlSugarRepository _systemRoleRepository; - private readonly TenantRoleMenuService _systemRoleMenuService; - private readonly TenantUserRoleService _systemUserRoleService; + private readonly SqlSugarRepository _systemRoleRepository; + private readonly RoleMenuService _systemRoleMenuService; + private readonly UserRoleService _systemUserRoleService; private readonly IServiceProvider _serviceProvider; - public TenantRoleService( + public RoleService( CurrentUserContext currentUserContext, - SqlSugarRepository systemRoleRepository, - TenantRoleMenuService systemRoleMenuService, - TenantUserRoleService systemUserRoleService, + SqlSugarRepository systemRoleRepository, + RoleMenuService systemRoleMenuService, + UserRoleService systemUserRoleService, IServiceProvider serviceProvider) : base(currentUserContext) { @@ -39,14 +39,14 @@ public TenantRoleService( /// [DisplayName("获取角色分页列表")] [ApiDescriptionSettings(Name = "Page")] - public async Task> PageAsync(PageRoleRequest input) + public async Task> PageAsync(PageRoleRequest input) { return await _systemRoleRepository.AsQueryable() .WhereIF(!CurrentUserContext.SuperAdmin, u => u.CreatedId == CurrentUserContext.UserId) // 若非超管,则只能操作自己创建的角色 .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name)) .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => (u.Code ?? string.Empty).Contains(input.Code ?? string.Empty)) .OrderBy(u => u.OrderNo) - .Select() + .Select() .ToPagedListAsync(input.Page, input.PageSize); } @@ -81,7 +81,7 @@ public async Task AddRoleAsync(AddRoleRequest input) throw BusinessError.Oh(CommonErrorCode.RecordAlreadyExists); } - var newRole = await _systemRoleRepository.AsInsertable(input.Adapt()).ExecuteReturnEntityAsync(); + var newRole = await _systemRoleRepository.AsInsertable(input.Adapt()).ExecuteReturnEntityAsync(); input.Id = newRole.Id; await UpdateRoleMenuAsync(input); } @@ -123,7 +123,7 @@ public async Task UpdateRoleAsync(UpdateRoleRequest input) throw BusinessError.Oh(CommonErrorCode.RecordAlreadyExists); } - await _systemRoleRepository.AsUpdateable(input.Adapt()).IgnoreColumns(true) + await _systemRoleRepository.AsUpdateable(input.Adapt()).IgnoreColumns(true) .IgnoreColumns(u => new { u.DataScope, }).ExecuteCommandWithOptLockAsync(true); await UpdateRoleMenuAsync(input); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs index 0543c115..135eccfe 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs @@ -1,13 +1,13 @@ using System.Reflection; using System.Text.Json; -using GameFrameX.Entity.Tenant.Game.ServerConfig; +using GameFrameX.Entity.Business.Game.ServerConfig; -namespace GameFrameX.Core.Service.Tenant; +namespace GameFrameX.Core.Service.Business; /// /// 游戏运营配置出厂基线行工厂(C314)。 /// 单一事实源为嵌入资源 GameServerConfigs.json(原厂实测 10 键 + 原厂 md5), -/// 供两条种子渠道共享:租户库建库种子(DefaultTenantDatabaseSeeder,自动推导租户连接 EnableInitSeed=false +/// 供两条种子渠道共享:租户库建库种子(DefaultDatabaseSeeder,自动推导租户连接 EnableInitSeed=false /// 时 ISqlSugarEntitySeedData 渠道不生效,故走本工厂)与框架种子(GameAppServerConfigSeedData 薄壳)。 /// md5 沿用原厂值不重算——拉过原厂配置的老客户端 md5 自洽不重传;行 Id 用固定基数保证跨环境稳定。 /// @@ -20,7 +20,7 @@ public static class GameServerConfigBaselineSeed /// /// 构建全部出厂基线行(主库默认配置) /// - public static List BuildRows() + public static List BuildRows() { var assembly = Assembly.GetExecutingAssembly(); using (var stream = assembly.GetManifestResourceStream(ResourceName)) @@ -32,12 +32,12 @@ public static List BuildRows() using (var document = JsonDocument.Parse(stream)) { - var records = new List(); + var records = new List(); var index = 0; foreach (var property in document.RootElement.EnumerateObject()) { var entry = property.Value; - records.Add(new TenantGameAppServerConfigEntity + records.Add(new GameAppServerConfigEntity { Key = property.Name, Config = entry.GetProperty("config").GetRawText(), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/Payment/PaymentConfigCrypto.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/Payment/PaymentConfigCrypto.cs index c510cb5b..8574703a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/Payment/PaymentConfigCrypto.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/Payment/PaymentConfigCrypto.cs @@ -3,10 +3,10 @@ using System.Text.Json.Nodes; using GameFrameX.Payment.Abstract; -namespace GameFrameX.Core.Service.Tenant; +namespace GameFrameX.Core.Service.Business; /// -/// 支付配置 ConfigJson 敏感字段级加解密收口(C371 / GFX-838,对齐 C370 TenantObjectStorageConfigCrypto): +/// 支付配置 ConfigJson 敏感字段级加解密收口(C371 / GFX-838,对齐 C370 ObjectStorageConfigCrypto): /// 写入侧在 ValidateConfigJson 校验之后、落库之前调用 ; /// 读取侧(PaymentOptionSettingProvider 反序列化前)调用 。 /// 敏感字段集合由渠道 Option 类的 [PaymentField(Sensitive = true)] 标注驱动(与表单 schema 反射同源), @@ -41,7 +41,7 @@ public static class PaymentConfigCrypto /// 敏感字段已加密的 ConfigJson(或无可加密内容时的原值) public static string EncryptConfigJson(string payChannel, string configJson) { - return TransformSensitiveFields(payChannel, configJson, TenantSecretCrypto.Encrypt); + return TransformSensitiveFields(payChannel, configJson, SecretCrypto.Encrypt); } /// @@ -53,14 +53,14 @@ public static string EncryptConfigJson(string payChannel, string configJson) /// 敏感字段为明文的 ConfigJson public static string DecryptConfigJson(string payChannel, string configJson) { - if (string.IsNullOrWhiteSpace(configJson) || !configJson.Contains(TenantSecretCrypto.EncryptedPrefix, StringComparison.Ordinal)) + if (string.IsNullOrWhiteSpace(configJson) || !configJson.Contains(SecretCrypto.EncryptedPrefix, StringComparison.Ordinal)) { return configJson; } // 缓存 key 必须含渠道:敏感字段集合由渠道 Option 反射决定,同一密文字符串在不同渠道下的解密结果不同 // ponytail: 并发首次 miss 会各自解密一次后竞争写入(最后者胜),浪费一次派生但不产生错误数据;下单读取并发度可控,不值得加锁。 - return DecryptCache.GetOrAdd(payChannel + "\n" + configJson, _ => TransformSensitiveFields(payChannel, configJson, TenantSecretCrypto.Decrypt)); + return DecryptCache.GetOrAdd(payChannel + "\n" + configJson, _ => TransformSensitiveFields(payChannel, configJson, SecretCrypto.Decrypt)); } /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/ResetPwdResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/ResetPwdResponse.cs index 1eace49f..5abfd54d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/ResetPwdResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/ResetPwdResponse.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Core.Service.User.Dto; /// -/// 重置密码结果(平台用户与租户管理员重置共用) +/// 重置密码结果(平台用户与管理员角色重置共用) /// public class ResetPwdResponse { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/TenantUserResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/UserResponse.cs similarity index 99% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/TenantUserResponse.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/UserResponse.cs index 8e5bd5d0..cbc98636 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/TenantUserResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/Dto/UserResponse.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Core.Service.User.Dto; /// /// 租户用户输出参数 /// -public class TenantUserResponse +public class UserResponse { /// /// Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/TenantUserRoleService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserRoleService.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/TenantUserRoleService.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserRoleService.cs index 4dc7ba0a..baf6ca64 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/TenantUserRoleService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserRoleService.cs @@ -7,13 +7,13 @@ namespace GameFrameX.Core.Service.User; /// /// 系统用户角色服务 /// -public class TenantUserRoleService +public class UserRoleService { - private readonly SqlSugarRepository _systemUserRoleRepository; + private readonly SqlSugarRepository _systemUserRoleRepository; private readonly SystemCacheService _systemCacheService; private readonly SqlSugarTransactionRunner _transactionRunner; - public TenantUserRoleService(SqlSugarRepository systemUserRoleRepository, + public UserRoleService(SqlSugarRepository systemUserRoleRepository, SystemCacheService systemCacheService, SqlSugarTransactionRunner transactionRunner) { @@ -35,7 +35,7 @@ await _transactionRunner.ExecuteAsync(async () => if (input.RoleIdList != null && input.RoleIdList.Count > 0) { - var roles = input.RoleIdList.Select(u => new TenantUserRoleEntity + var roles = input.RoleIdList.Select(u => new UserRoleEntity { UserId = input.UserId, RoleId = u, @@ -83,12 +83,12 @@ public async Task DeleteUserRoleByUserIdAsync(long userId) /// /// /// - public async Task> GetUserRoleListAsync(long userId) + public async Task> GetUserRoleListAsync(long userId) { var systemUserRoleList = await _systemUserRoleRepository.AsQueryable() - .Includes(u => u.TenantRoleEntity) + .Includes(u => u.RoleEntity) .Where(u => u.UserId == userId).ToListAsync(); - return systemUserRoleList.Where(u => u.TenantRoleEntity != null).Select(u => u.TenantRoleEntity.Adapt()).ToList(); + return systemUserRoleList.Where(u => u.RoleEntity != null).Select(u => u.RoleEntity.Adapt()).ToList(); } /// @@ -99,7 +99,7 @@ public async Task> GetUserRoleListAsync(long userId) public async Task> GetUserRoleIdListAsync(long userId) { return await _systemUserRoleRepository.AsQueryable() - .InnerJoin((userRole, role) => userRole.RoleId == role.Id) + .InnerJoin((userRole, role) => userRole.RoleId == role.Id) .Where((userRole, role) => userRole.UserId == userId) .Where((userRole, role) => (role.IsEnabled == null || role.IsEnabled == true) && (role.IsDeleted == null || role.IsDeleted == false)) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/TenantUserService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/TenantUserService.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs index bbe1367f..be080f9c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/TenantUserService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs @@ -9,27 +9,27 @@ namespace GameFrameX.Core.Service.User; /// 租户用户服务 /// [ApiDescriptionSettings(Order = 490)] -public class TenantUserService : BaseSystemService +public class UserService : BaseSystemService { - private readonly SqlSugarRepository _tenantUserRepository; - private readonly TenantUserRoleService _tenantUserRoleService; + private readonly SqlSugarRepository _tenantUserRepository; + private readonly UserRoleService _tenantUserRoleService; private readonly SystemConfigService _systemConfigService; - public TenantUserService( + public UserService( CurrentUserContext currentUserContext, - SqlSugarRepository tenantUserRepository, - TenantUserRoleService tenantUserRoleService, + SqlSugarRepository userRepository, + UserRoleService userRoleService, SystemConfigService systemConfigService) : base(currentUserContext) { - _tenantUserRepository = tenantUserRepository; - _tenantUserRoleService = tenantUserRoleService; + _tenantUserRepository = userRepository; + _tenantUserRoleService = userRoleService; _systemConfigService = systemConfigService; } - internal static void NormalizeNewUser(TenantUserEntity user) + internal static void NormalizeNewUser(UserEntity user) { - foreach (var property in typeof(TenantUserEntity).GetProperties().Where(u => u.PropertyType == typeof(string) && u.CanWrite)) + foreach (var property in typeof(UserEntity).GetProperties().Where(u => u.PropertyType == typeof(string) && u.CanWrite)) { if (property.GetValue(user) == null) { @@ -45,7 +45,7 @@ internal static void NormalizeNewUser(TenantUserEntity user) /// [DisplayName("获取用户分页列表")] [ApiDescriptionSettings(Name = "Page")] - public async Task> PageAsync(PageUserRequest input) + public async Task> PageAsync(PageUserRequest input) { return await _tenantUserRepository.AsQueryable() .Where(u => u.AccountType != AccountTypeEnum.SuperAdmin) @@ -53,7 +53,7 @@ public async Task> PageAsync(PageUserReque .WhereIF(!string.IsNullOrWhiteSpace(input.RealName), u => u.RealName.Contains(input.RealName)) .WhereIF(!string.IsNullOrWhiteSpace(input.Phone), u => u.Phone.Contains(input.Phone)) .OrderBy(u => u.OrderNo) - .Select() + .Select() .ToPagedListAsync(input.Page, input.PageSize); } @@ -76,7 +76,7 @@ public async Task AddUserAsync(AddUserRequest input) var password = await _systemConfigService.GetConfigValueAsync(CommonConst.SysPassword); - var user = input.Adapt(); + var user = input.Adapt(); NormalizeNewUser(user); user.Password = CryptogramUtility.HashPassword(password); var newUser = await _tenantUserRepository.AsInsertable(user).ExecuteReturnEntityAsync(); @@ -102,7 +102,7 @@ public async Task UpdateUserAsync(UpdateUserRequest input) throw BusinessError.Oh(SystemUserErrorCode.AccountAlreadyExists); } - await _tenantUserRepository.AsUpdateable(input.Adapt()).IgnoreColumns(true) + await _tenantUserRepository.AsUpdateable(input.Adapt()).IgnoreColumns(true) .IgnoreColumns(u => new { u.Password, u.IsEnabled, }).ExecuteCommandAsync(); await UpdateUserRolesAsync(input); @@ -155,11 +155,11 @@ public async Task DeleteUserAsync(DeleteUserRequest input) /// [DisplayName("查看用户基本信息")] [ApiDescriptionSettings(Name = "GetBaseInfo")] - public async Task GetBaseInfoAsync() + public async Task GetBaseInfoAsync() { var user = await _tenantUserRepository.GetFirstAsync(u => u.Id == CurrentUserContext.UserId); #pragma warning disable CS8603 // 查询未命中时返回 null 是既有 API 契约(前端按 null 判断 not-found) - return user?.Adapt(); + return user?.Adapt(); #pragma warning restore CS8603 } @@ -170,7 +170,7 @@ public async Task GetBaseInfoAsync() [ApiDescriptionSettings(Name = "BaseInfo")] [HttpPost] [DisplayName("更新用户基本信息")] - public async Task UpdateBaseInfoAsync(TenantUserEntity user) + public async Task UpdateBaseInfoAsync(UserEntity user) { return await _tenantUserRepository.AsUpdateable(user) .IgnoreColumns(u => new { u.CreatedTime, u.Account, u.Password, u.AccountType, }).ExecuteCommandAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SignatureAuth/SignatureSpec.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SignatureAuth/SignatureSpec.cs index 3a1bc159..ccc94b0d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SignatureAuth/SignatureSpec.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SignatureAuth/SignatureSpec.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Core.SignatureAuth; /// /// 传输签名规范常量(C267 单一权威)。消息串格式、字段顺序与分隔符的唯一代码事实源, -/// 服务端验签(SignatureValidationMiddleware / TenantGameAppOpenAccessAuthMiddleware)、 +/// 服务端验签(SignatureValidationMiddleware / GameAppOpenAccessAuthMiddleware)、 /// 客户端 SDK 与 Postman 预请求脚本均按此对齐。 /// 规范正文(唯一权威 spec):gfx-doc/dev/signature/spec.md。 /// 标准来源:RFC 2104(HMAC-SHA256)+ RFC 3986 §2.1/§3.4(percent-encoding + canonical query) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarFilter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarFilter.cs index 31e9fc7e..fbce3656 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarFilter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarFilter.cs @@ -66,8 +66,8 @@ public static int SetDataScopeFilter(SqlSugarScopeProvider db) else { var currentUserId = long.Parse(userId); - var roleList = db.Queryable() - .LeftJoin((userRole, role) => userRole.RoleId == role.Id) + var roleList = db.Queryable() + .LeftJoin((userRole, role) => userRole.RoleId == role.Id) .Where((userRole, role) => userRole.UserId == currentUserId) .Select((userRole, role) => role.DataScope) .ToList(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs index e5f2e233..3ba19baa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs @@ -4,13 +4,13 @@ using GameFrameX.Core.Extension.Cache; using GameFrameX.Core.Extension.Const; using GameFrameX.Core.Extension.Option; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; using GameFrameX.Entity.Global; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; using GameFrameX.Foundation.Orm.Entity; using Microsoft.Extensions.Hosting; using MySqlConnector; @@ -253,7 +253,7 @@ private static void SetDbDiffLog(SqlSugarScopeProvider db, DbConnectionConfig co } /// - /// 填充差异日志实体公共字段。SystemLogDiffEntity 与 TenantLogDiffEntity 共享 字段, + /// 填充差异日志实体公共字段。SystemLogDiffEntity 与 LogDiffEntity 共享 字段, /// 调用方按当前操作库归属决定具体实体类型与写入连接。 /// private static void FillDiffLogFields(LogDiffFields target, DiffLogModel u, DbConnectionConfig config, List? beforeList, List? afterList, string? snapshot) @@ -503,10 +503,10 @@ internal static void InitDatabase(SqlSugarScope db, DbConnectionConfig config, I if (config.ConfigId.ToString() == SqlSugarConst.MainConfigId) { // 新装主库空配置时提供本地存储;已有配置(包括停用或软删)不覆盖。 - if (effectiveTypes.Contains(typeof(TenantObjectStorageConfigEntity)) - && dbProvider.DbMaintenance.IsAnyTable(dbProvider.EntityMaintenance.GetEntityInfo().DbTableName, false)) + if (effectiveTypes.Contains(typeof(ObjectStorageConfigEntity)) + && dbProvider.DbMaintenance.IsAnyTable(dbProvider.EntityMaintenance.GetEntityInfo().DbTableName, false)) { - DefaultTenantDatabaseSeeder.SeedDefaultObjectStorageConfigIfEmpty(dbProvider); + DefaultDatabaseSeeder.SeedDefaultObjectStorageConfigIfEmpty(dbProvider); } // C117 (GFX-117):8 棵游戏业务菜单路径已收敛到新前缀(appCenter/playerCenter/goodsCenter/ diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantChannelDefinitionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ChannelDefinitionEntity.cs similarity index 68% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantChannelDefinitionEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ChannelDefinitionEntity.cs index 3962621d..107b5c1b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantChannelDefinitionEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ChannelDefinitionEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.System; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// /// 主库共享的渠道定义表。 /// 分包、支付与兑换码等业务通过渠道标识引用此字典。 /// [SugarTable(null, "租户渠道定义表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantChannelDefinitionEntity : ChannelDefinition +public class ChannelDefinitionEntity : ChannelDefinition { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantAdvertisementCallbackConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/AdvertisementCallbackConfigEntity.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantAdvertisementCallbackConfigEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/AdvertisementCallbackConfigEntity.cs index 61e344ae..1327a994 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantAdvertisementCallbackConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/AdvertisementCallbackConfigEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; using GameFrameX.Foundation.Orm.Entity; -namespace GameFrameX.Entity.Tenant.ClientApiConfig; +namespace GameFrameX.Entity.Business.ClientApiConfig; /// /// 租户广告回调配置。 /// 承载广告服务端回调用于验签和参数识别的最小配置材料,Client API 公开回调入口按 Provider 读取该配置。 /// [SugarTable(null, "租户广告回调配置")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantAdvertisementCallbackConfigEntity : EntityBasic +public class AdvertisementCallbackConfigEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantClientApiPolicyEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/ClientApiPolicyEntity.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantClientApiPolicyEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/ClientApiPolicyEntity.cs index 3892779d..1efd04d5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantClientApiPolicyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/ClientApiPolicyEntity.cs @@ -1,6 +1,6 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.ClientApiConfig; +namespace GameFrameX.Entity.Business.ClientApiConfig; /// /// 租户 Client API 运行策略合并配置(C378 四表合一:Token / 登录票据 / 区服输出 / 订单策略)。 @@ -8,9 +8,9 @@ namespace GameFrameX.Entity.Tenant.ClientApiConfig; /// 存量数据由启动期迁移执行器从原四表幂等迁入(同键 Id 大者优先),迁移后原四表停写。 /// [SugarTable(null, "租户ClientAPI运行策略")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantClientApiPolicyEntity : EntityBasic +public class ClientApiPolicyEntity : EntityBasic { /// /// 是否要求请求签名。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantEmailConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/EmailConfigEntity.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantEmailConfigEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/EmailConfigEntity.cs index 660f6f28..f3cc8de4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantEmailConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/EmailConfigEntity.cs @@ -1,19 +1,19 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.ClientApiConfig; +namespace GameFrameX.Entity.Business.ClientApiConfig; /// /// 租户业务邮件配置。 /// 承载玩家注册验证码、找回密码、玩家运营触达等租户品牌发信;与平台系统邮件(SystemEmailProviderEntity)完全独立,互不 fallback。 /// [SugarTable(null, "租户业务邮件配置")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantEmailConfigEntity : EntityBasic +public class EmailConfigEntity : EntityBasic { /// - /// 租户业务邮件用途(TenantEmailPurpose)。0 表示通配该租户 / 应用下所有租户业务邮件。 + /// 租户业务邮件用途(EmailPurpose)。0 表示通配该租户 / 应用下所有租户业务邮件。 /// [SugarColumn(ColumnDescription = "租户业务邮件用途", DefaultValue = "0")] public int Purpose { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceEntity.cs similarity index 56% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceEntity.cs index b8840efa..f7ccc773 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Device; +namespace GameFrameX.Entity.Business.Device; /// /// 客户机器码(应用级设备资源)。 -/// 命名遵循 C210 应用中心实体家族 TenantGameApp*Entity;物理表名由类名下划线生成(tenant_game_app_device_entity),与 TenantGameAppPackageEntity 等同模式(SugarTable(null))。 +/// 命名遵循 C210 应用中心实体家族 GameApp*Entity;物理表名由类名下划线生成(game_app_device_entity),与 GameAppPackageEntity 等同模式(SugarTable(null))。 /// [SugarTable(null, "客户机器码")] [SugarIndex("idx_device_unique_identifier", nameof(DeviceUniqueIdentifier), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAppDeviceEntity : EntityBasicSelect +public class GameAppDeviceEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceGroupEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceGroupEntity.cs similarity index 65% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceGroupEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceGroupEntity.cs index 0619a59a..57280186 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceGroupEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceGroupEntity.cs @@ -1,18 +1,18 @@ using GameFrameX.Entity.Base; using GameFrameX.Foundation.Orm.Entity.Filter; -namespace GameFrameX.Entity.Tenant.Device; +namespace GameFrameX.Entity.Business.Device; /// /// 客户机器码分组(应用级设备资源)。 -/// 分组只能绑定同一应用下的设备,跨应用设备加入分组由 TenantGameAppDeviceGroupService 拒绝。 -/// 命名遵循 C210 应用中心实体家族 TenantGameApp*Entity;物理表名由类名下划线生成(tenant_game_app_device_group_entity)。 +/// 分组只能绑定同一应用下的设备,跨应用设备加入分组由 GameAppDeviceGroupService 拒绝。 +/// 命名遵循 C210 应用中心实体家族 GameApp*Entity;物理表名由类名下划线生成(game_app_device_group_entity)。 /// [SugarTable(null, "客户机器码分组")] [SugarIndex("idx_device_group_name", nameof(Name), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppDeviceGroupEntity : EntityBasic, ISelectFilter +public sealed class GameAppDeviceGroupEntity : EntityBasic, ISelectFilter { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceGroupRelationEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceGroupRelationEntity.cs similarity index 65% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceGroupRelationEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceGroupRelationEntity.cs index 44f47acf..57bbe0b9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Device/TenantGameAppDeviceGroupRelationEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Device/GameAppDeviceGroupRelationEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Device; +namespace GameFrameX.Entity.Business.Device; /// /// 客户机器码对机器码分组关系(应用级)。 /// 跨应用设备加入分组直接拒绝。 -/// 命名遵循 C210 应用中心实体家族 TenantGameApp*Entity;物理表名由类名下划线生成(tenant_game_app_device_group_relation_entity)。 +/// 命名遵循 C210 应用中心实体家族 GameApp*Entity;物理表名由类名下划线生成(game_app_device_group_relation_entity)。 /// [SugarTable(null, "客户机器码对机器码分组")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAppDeviceGroupRelationEntity : EntityBasic +public class GameAppDeviceGroupRelationEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantFileEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/FileEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantFileEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/FileEntity.cs index 91e7a9fa..55f7c586 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantFileEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/FileEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// /// 系统文件表 /// [SugarTable(null, "租户库文件表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantFileEntity : EntityBasic +public class FileEntity : EntityBasic { /// /// 提供者 @@ -17,7 +17,7 @@ public class TenantFileEntity : EntityBasic public string? Provider { get; set; } /// - /// 关联的租户对象存储配置 ID(TenantObjectStorageConfigEntity.Id)。 + /// 关联的租户对象存储配置 ID(ObjectStorageConfigEntity.Id)。 /// 新上传文件必填,用于按精确配置解析下载/删除路径;历史记录为 null 时按本地 legacy 行为兜底。 /// [SugarColumn(ColumnDescription = "对象存储配置ID", IsNullable = true)] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Announcement/TenantGameAnnouncementEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Announcement/GameAnnouncementEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Announcement/TenantGameAnnouncementEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Announcement/GameAnnouncementEntity.cs index 49319900..e1c9a2fc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Announcement/TenantGameAnnouncementEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Announcement/GameAnnouncementEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.Announcement; +namespace GameFrameX.Entity.Business.Game.Announcement; /// /// 游戏内公告 /// [SugarTable(null, "游戏内公告")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAnnouncementEntity : EntityBasic +public class GameAnnouncementEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Announcement/TenantGameBannerAnnouncementEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Announcement/GameBannerAnnouncementEntity.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Announcement/TenantGameBannerAnnouncementEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Announcement/GameBannerAnnouncementEntity.cs index 7851433a..cb89f03d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Announcement/TenantGameBannerAnnouncementEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Announcement/GameBannerAnnouncementEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.Announcement; +namespace GameFrameX.Entity.Business.Game.Announcement; /// /// 游戏横幅公告 /// [SugarTable(null, "游戏横幅公告")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameBannerAnnouncementEntity : EntityBasic +public class GameBannerAnnouncementEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/App/TenantGameAppOpenAccessEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/App/GameAppOpenAccessEntity.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/App/TenantGameAppOpenAccessEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/App/GameAppOpenAccessEntity.cs index 40e0a943..c3206c3d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/App/TenantGameAppOpenAccessEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/App/GameAppOpenAccessEntity.cs @@ -1,19 +1,19 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.App; +namespace GameFrameX.Entity.Business.Game.App; /// /// 应用开放访问凭证。 -/// 物理表名由类名下划线化推导为 tenant_game_app_open_access_entity(C34 契约:受管实体 SugarTable 首参为 null,不硬编码表名)。 +/// 物理表名由类名下划线化推导为 game_app_open_access_entity(C34 契约:受管实体 SugarTable 首参为 null,不硬编码表名)。 /// 对称平台级 :System = 平台开放接口身份,GameApp = 应用机器凭证。 -/// 鉴权走 Hub.Api TenantGameAppOpenAccessAuthMiddleware(HMAC-SHA256 签名 + Scopes 接口范围校验),与 SystemOpenAccessEntity 的 C181 Signature scheme 独立共存。 +/// 鉴权走 Hub.Api GameAppOpenAccessAuthMiddleware(HMAC-SHA256 签名 + Scopes 接口范围校验),与 SystemOpenAccessEntity 的 C181 Signature scheme 独立共存。 /// [SugarTable(null, "应用开放访问凭证")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAppOpenAccessEntity : EntityBasic +public class GameAppOpenAccessEntity : EntityBasic { - public TenantGameAppOpenAccessEntity() + public GameAppOpenAccessEntity() { IsEnabled = true; } @@ -56,7 +56,7 @@ public TenantGameAppOpenAccessEntity() public string AccessKey { get; set; } = null!; /// - /// 访问密钥。C371(GFX-838)起经 TenantSecretCrypto 密文落租户库(HMAC-SHA256 签名验证需服务端持有可逆共享密钥)。 + /// 访问密钥。C371(GFX-838)起经 SecretCrypto 密文落租户库(HMAC-SHA256 签名验证需服务端持有可逆共享密钥)。 /// 签发 / 轮换时仅返回一次明文,列表 / 详情不得输出。 /// [SugarColumn(ColumnDescription = "访问Secret", Length = EntityStringLength.Length512)] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/App/TenantGameAppPackageEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/App/GameAppPackageEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/App/TenantGameAppPackageEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/App/GameAppPackageEntity.cs index 17677404..bb47dacf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/App/TenantGameAppPackageEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/App/GameAppPackageEntity.cs @@ -1,17 +1,17 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game.App; +namespace GameFrameX.Entity.Business.Game.App; /// /// 游戏应用分包 /// [SugarTable(null, "游戏应用分包")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAppPackageEntity : EntityBasicSelect +public class GameAppPackageEntity : EntityBasicSelect { - public TenantGameAppPackageEntity() + public GameAppPackageEntity() { IsEnabled = true; PackageKind = PackageKindEnum.Normal; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantAppSignatureKeyEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/AppSignatureKeyEntity.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantAppSignatureKeyEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/AppSignatureKeyEntity.cs index 4620a3bc..1462838f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantAppSignatureKeyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/AppSignatureKeyEntity.cs @@ -1,17 +1,17 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// App 传输签名密钥(HMAC-SHA256 对称密钥环,change C2 sig-keyring-server)。 -/// 形状照 体系:Kid 版本化寻址、NotBefore/Expire 租约、 +/// 形状照 体系:Kid 版本化寻址、NotBefore/Expire 租约、 /// Rotate 双活、禁删保护;区别在算法为 HMAC 对称密钥(LoginTicket 为 RSA 非对称)。 /// 单 key 失效(禁用/到期)仅拒用该 key 签名的请求,不影响其余 key(多版本客户端共存的基础)。 /// [SugarTable(null, "App 传输签名密钥")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantAppSignatureKeyEntity : EntityBasic +public class AppSignatureKeyEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/TenantGameAppFeatureSwitchEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/FeatureSwitch/GameAppFeatureSwitchEntity.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/TenantGameAppFeatureSwitchEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/FeatureSwitch/GameAppFeatureSwitchEntity.cs index 01731423..94173215 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/TenantGameAppFeatureSwitchEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/FeatureSwitch/GameAppFeatureSwitchEntity.cs @@ -1,6 +1,6 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.FeatureSwitch; +namespace GameFrameX.Entity.Business.Game.FeatureSwitch; /// /// 活动/功能开关注册表(租户库)。 @@ -9,9 +9,9 @@ namespace GameFrameX.Entity.Tenant.Game.FeatureSwitch; /// [SugarTable(null, "活动/功能开关注册表")] [SugarIndex("idx_feature_switch_key", nameof(SwitchKey), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppFeatureSwitchEntity : EntityBasic +public sealed class GameAppFeatureSwitchEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAdvertisementRewardEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAdvertisementRewardEntity.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAdvertisementRewardEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAdvertisementRewardEntity.cs index d61d3399..59c8038a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAdvertisementRewardEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAdvertisementRewardEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏广告奖励发放账本。 @@ -10,9 +10,9 @@ namespace GameFrameX.Entity.Tenant.Game; /// [SugarTable(null, "游戏广告奖励发放账本")] [SugarIndex("ux_ad_reward_idempotency", nameof(IdempotencyKey), OrderByType.Asc, true)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAdvertisementRewardEntity : EntityBasic +public class GameAdvertisementRewardEntity : EntityBasic { /// @@ -34,7 +34,7 @@ public class TenantGameAdvertisementRewardEntity : EntityBasic public string AdvertisementUnit { get; set; } = null!; /// - /// 角色 Id。反查自 TenantGameRoleEntity。 + /// 角色 Id。反查自 GameRoleEntity。 /// [SugarColumn(ColumnDescription = "角色Id", Length = EntityStringLength.Length256)] public string RoleId { get; set; } = null!; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAntiCheatEventEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAntiCheatEventEntity.cs similarity index 97% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAntiCheatEventEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAntiCheatEventEntity.cs index 2f95053a..bfc4333e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAntiCheatEventEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAntiCheatEventEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 反作弊事件账本(安全治理事件事实源)。记录反作弊 / 广告奖励 Provider 上报的每一笔风险事件: @@ -14,9 +14,9 @@ namespace GameFrameX.Entity.Tenant.Game; [SugarIndex("ux_anticheat_idempotency", nameof(IdempotencyKey), OrderByType.Asc, true)] [SugarIndex("idx_anticheat_risk_level", nameof(RiskLevel), OrderByType.Asc)] [SugarIndex("idx_anticheat_manual_review", nameof(ManualReviewState), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAntiCheatEventEntity : EntityBasic +public class GameAntiCheatEventEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaClassifyEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaClassifyEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaClassifyEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaClassifyEntity.cs index 4b3dd95c..78756d42 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaClassifyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaClassifyEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 区服分类 /// [SugarTable(null, "区服分类")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAreaClassifyEntity : EntityBasicSelect +public class GameAreaClassifyEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaEntity.cs similarity index 98% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaEntity.cs index eb986779..f84b4885 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaEntity.cs @@ -1,21 +1,21 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏区服 /// [SugarTable(null, "游戏区服")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAreaEntity : EntityBasicSelect +public class GameAreaEntity : EntityBasicSelect { /// /// 区服默认启用。启用标记复用基类 IsEnabled(C301 归一,原独立列 is_enable 移除): /// 全局 ISafeEnabledFilter 会隐藏 IsEnabled==false 的行,管理列表如需展示禁用区服须按 FixPattern 用 Filter(null, true) 绕过。 /// - public TenantGameAreaEntity() + public GameAreaEntity() { IsEnabled = true; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaMergePlanEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaMergePlanEntity.cs similarity index 97% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaMergePlanEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaMergePlanEntity.cs index 6748708c..1502e0dc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameAreaMergePlanEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameAreaMergePlanEntity.cs @@ -1,13 +1,13 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// 主库合服计划及阶段报告。 [SugarTable(null, "合服计划")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameAreaMergePlanEntity : EntityBasic +public class GameAreaMergePlanEntity : EntityBasic { /// 目标服。 [SugarColumn(ColumnDescription = "目标服", DefaultValue = "0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameClientLocalizationEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameClientLocalizationEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameClientLocalizationEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameClientLocalizationEntity.cs index 8c84d6c9..9cdfb2fb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameClientLocalizationEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameClientLocalizationEntity.cs @@ -6,15 +6,15 @@ using GameFrameX.Foundation.Orm.Entity; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏客户端本地化配置表 /// [SugarTable(null, "游戏客户端本地化配置表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameClientLocalizationEntity : EntityBase +public class GameClientLocalizationEntity : EntityBase { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameCommodityEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameCommodityEntity.cs similarity index 74% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameCommodityEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameCommodityEntity.cs index e3e84181..b8d72d5b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameCommodityEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameCommodityEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏资源 /// [SugarTable(null, "商品")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameCommodityEntity : EntityBasic +public class GameCommodityEntity : EntityBasic { /// @@ -18,7 +18,7 @@ public class TenantGameCommodityEntity : EntityBasic public string Status { get; set; } = null!; /// - /// 类别Id。引用 TenantGameGoodsCatalogueEntity.Id(C391:由 string 统一为 long,对齐 TenantGameGoodsEntity.ClassifyId 模式)。 + /// 类别Id。引用 GameGoodsCatalogueEntity.Id(C391:由 string 统一为 long,对齐 GameGoodsEntity.ClassifyId 模式)。 /// [SugarColumn(ColumnDescription = "类别Id", DefaultValue = "0")] public long CategoryId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameDockerTagEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameDockerTagEntity.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameDockerTagEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameDockerTagEntity.cs index a4f37dcd..3e7902fe 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameDockerTagEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameDockerTagEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏区服 /// [SugarTable(null, "游戏区服镜像标签")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameDockerTagEntity : EntityBasicSelect +public class GameDockerTagEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameGoodsCatalogueEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameGoodsCatalogueEntity.cs similarity index 54% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameGoodsCatalogueEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameGoodsCatalogueEntity.cs index e9cb1cfb..5668e132 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameGoodsCatalogueEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameGoodsCatalogueEntity.cs @@ -1,13 +1,13 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏资源分类 /// [SugarTable(null, "游戏资源分类")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameGoodsCatalogueEntity : EntityBasicSelect +public class GameGoodsCatalogueEntity : EntityBasicSelect { } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameGoodsEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameGoodsEntity.cs similarity index 84% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameGoodsEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameGoodsEntity.cs index 8f1aa9a5..cc2c7aaa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameGoodsEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameGoodsEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏资源 /// [SugarTable(null, "游戏资源")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameGoodsEntity : EntityBasicSelect +public class GameGoodsEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameHomeOnlineSampleEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameHomeOnlineSampleEntity.cs similarity index 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameHomeOnlineSampleEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameHomeOnlineSampleEntity.cs index 1231baa7..db9d9f24 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameHomeOnlineSampleEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameHomeOnlineSampleEntity.cs @@ -1,6 +1,6 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 首页在线人数时序采样(C321 / GFX-730) @@ -8,10 +8,10 @@ namespace GameFrameX.Entity.Tenant.Game; /// 首页趋势接口按整点桶回读,缺桶返回 null(前端降级画 —)。 /// [SugarTable(null, "首页在线人数时序采样")] -[SugarIndex("ux_home_online_sample_tenant_time", nameof(SampleTime), OrderByType.Asc, true)] -[TenantTable] +[SugarIndex("ux_home_online_sample_time", nameof(SampleTime), OrderByType.Asc, true)] +[BusinessTable] [IncrementTable] -public class TenantGameHomeOnlineSampleEntity : EntityBasic +public class GameHomeOnlineSampleEntity : EntityBasic { /// /// 采样桶时间(15 分钟桶起点,Unix 秒) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameLoginTicketKeyEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameLoginTicketKeyEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameLoginTicketKeyEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameLoginTicketKeyEntity.cs index b0aaa728..2dbfe814 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameLoginTicketKeyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameLoginTicketKeyEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// Game 登录票据签名 Key。 /// [SugarTable(null, "Game 登录票据签名 Key")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameLoginTicketKeyEntity : EntityBasic +public class GameLoginTicketKeyEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailCampaignEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailCampaignEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailCampaignEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailCampaignEntity.cs index e093d2d1..84f8107d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailCampaignEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailCampaignEntity.cs @@ -7,21 +7,21 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Game.Mail; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 运营邮件 Campaign 草稿/发布记录。Admin 侧承载草稿编辑(多语言内容、附件、过滤、过期策略)+ Server 回写的发布状态。 /// 生命周期 Draft → Published → Revoked(+ Failed);发布后主体字段不可修改(B1)、不可删除,仅可撤回。 -/// 与既有 TenantGameMailEntity(历史直发 post_mail)是两套独立邮件系统,不合并、字段不混用。 +/// 与既有 GameMailEntity(历史直发 post_mail)是两套独立邮件系统,不合并、字段不混用。 /// [SugarTable(null, "运营邮件Campaign")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameMailCampaignEntity : EntityBasic +public class GameMailCampaignEntity : EntityBasic { /// - /// 区服Id。用于解析目标游戏服 TenantGameAreaEntity.HttpManageUrl 调用 Server 发布接口(与既有直发邮件同口径)。 + /// 区服Id。用于解析目标游戏服 GameAreaEntity.HttpManageUrl 调用 Server 发布接口(与既有直发邮件同口径)。 /// [SugarColumn(ColumnDescription = "区服Id", DefaultValue = "0")] public long AreaId { get; set; } @@ -33,7 +33,7 @@ public class TenantGameMailCampaignEntity : EntityBasic public string Name { get; set; } = null!; /// - /// 模板 Id。引用既有 TenantGameMailTemplateEntity(0 = 无模板,裸文案发布);Server 仅作信息引用,内容冻结在本实体。 + /// 模板 Id。引用既有 GameMailTemplateEntity(0 = 无模板,裸文案发布);Server 仅作信息引用,内容冻结在本实体。 /// [SugarColumn(ColumnDescription = "模板Id", DefaultValue = "0")] public long TemplateId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailEntity.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailEntity.cs index 9bf2c8fc..c1eeac58 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailEntity.cs @@ -1,15 +1,15 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏邮件 /// [SugarTable(null, "游戏邮件")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameMailEntity : EntityBasic +public class GameMailEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailTemplateCategoryEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailTemplateCategoryEntity.cs similarity index 80% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailTemplateCategoryEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailTemplateCategoryEntity.cs index 84e8cc17..924eb338 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailTemplateCategoryEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailTemplateCategoryEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 邮件模板分类 /// [SugarTable(null, "邮件模板分类")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameMailTemplateCategoryEntity : EntityBasicSelect +public class GameMailTemplateCategoryEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailTemplateEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailTemplateEntity.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailTemplateEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailTemplateEntity.cs index de5f70ce..8d05a353 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameMailTemplateEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameMailTemplateEntity.cs @@ -1,15 +1,15 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 邮件模板 /// [SugarTable(null, "邮件模板")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameMailTemplateEntity : EntityBasicSelect +public class GameMailTemplateEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameOrderEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameOrderEntity.cs similarity index 97% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameOrderEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameOrderEntity.cs index cc73f5f1..b54781dd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameOrderEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameOrderEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏订单 @@ -13,10 +13,10 @@ namespace GameFrameX.Entity.Tenant.Game; [SugarIndex("ux_game_order_provider_transaction", nameof(PayChannel), OrderByType.Asc, nameof(ProviderTransactionId), OrderByType.Asc, true)] [SugarIndex("idx_game_order_apple_original_transaction_id", nameof(AppleOriginalTransactionId), OrderByType.Asc)] // 首页聚合「今日订单」按 CreatedTime 过滤计数走索引(C321 / GFX-730) -[SugarIndex("idx_tenant_game_order_created_time", nameof(CreatedTime), OrderByType.Asc)] -[TenantTable] +[SugarIndex("idx_game_order_created_time", nameof(CreatedTime), OrderByType.Asc)] +[BusinessTable] [IncrementTable] -public class TenantGameOrderEntity : EntityBasic +public class GameOrderEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameOrderFulfillmentEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameOrderFulfillmentEntity.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameOrderFulfillmentEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameOrderFulfillmentEntity.cs index bfad66c8..01979459 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameOrderFulfillmentEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameOrderFulfillmentEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 权益发货账本(权益事实源)。记录每一笔权益发放的完整生命周期: @@ -11,13 +11,13 @@ namespace GameFrameX.Entity.Tenant.Game; [SugarTable(null, "权益发货账本")] [SugarIndex("ux_fulfillment_idempotency", nameof(IdempotencyKey), OrderByType.Asc, true)] [SugarIndex("idx_fulfillment_order", nameof(OrderId), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameOrderFulfillmentEntity : EntityBasic +public class GameOrderFulfillmentEntity : EntityBasic { /// - /// 来源订单 Id(TenantGameOrderEntity.Id)。 + /// 来源订单 Id(GameOrderEntity.Id)。 /// [SugarColumn(ColumnDescription = "来源订单", DefaultValue = "0")] public long OrderId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePaymentConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePaymentConfigEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePaymentConfigEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePaymentConfigEntity.cs index 7b696a96..f8907fc9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePaymentConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePaymentConfigEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏支付配置 /// [SugarTable(null, "游戏支付配置")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGamePaymentConfigEntity : EntityBasic +public class GamePaymentConfigEntity : EntityBasic { /// /// 分包ID。空表示应用默认配置。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePenaltyAppealEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePenaltyAppealEntity.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePenaltyAppealEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePenaltyAppealEntity.cs index 78531af6..fdd7f75f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePenaltyAppealEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePenaltyAppealEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 申诉事实源。玩家对处罚提交的申诉及审核记录:关联处罚、申诉人、理由、状态、审核人审计。 @@ -9,13 +9,13 @@ namespace GameFrameX.Entity.Tenant.Game; /// [SugarTable(null, "申诉事实源")] [SugarIndex("idx_appeal_penalty", nameof(PenaltyId), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGamePenaltyAppealEntity : EntityBasic +public class GamePenaltyAppealEntity : EntityBasic { /// - /// 关联处罚 Id(TenantGamePenaltyEntity.Id)。 + /// 关联处罚 Id(GamePenaltyEntity.Id)。 /// [SugarColumn(ColumnDescription = "关联处罚Id", DefaultValue = "0")] public long PenaltyId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePenaltyEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePenaltyEntity.cs similarity index 97% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePenaltyEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePenaltyEntity.cs index c331aefb..b347b0ae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGamePenaltyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePenaltyEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 处罚事实源。记录账号 / 角色 / 设备 / IP 维度的封禁 / 限制登录 / 禁言 / 限制交易 / 限制匹配处罚生命周期: @@ -10,9 +10,9 @@ namespace GameFrameX.Entity.Tenant.Game; /// [SugarTable(null, "处罚事实源")] [SugarIndex("idx_penalty_target", nameof(TargetType), OrderByType.Asc, nameof(TargetId), OrderByType.Asc, nameof(Status), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGamePenaltyEntity : EntityBasic +public class GamePenaltyEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRankEntryEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRankEntryEntity.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRankEntryEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRankEntryEntity.cs index 1c94e7bf..ab8eb334 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRankEntryEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRankEntryEntity.cs @@ -1,6 +1,6 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏排行榜条目(C9 排行域:RSGet*/RSQuery*/RSHeartBeat 自建) @@ -9,10 +9,10 @@ namespace GameFrameX.Entity.Tenant.Game; /// 机器人补位行同表存储(合成 userid),保证 Get/Query/HeartBeat 三视图榜单一致。 /// [SugarTable(null, "游戏排行榜条目")] -[TenantTable] +[BusinessTable] [IncrementTable] [SugarIndex("ux_game_rank_entry", nameof(RankType), OrderByType.Asc, nameof(GroupId), OrderByType.Asc, nameof(UserId), OrderByType.Asc, true)] -public class TenantGameRankEntryEntity : EntityBasicSelect +public class GameRankEntryEntity : EntityBasicSelect { /// /// 榜单类型(1=BakeOut 烘焙 / 2=Multi 组队 / 3=Weekly1 周榜一 / 4=Weekly2 周榜二) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeChannelEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeChannelEntity.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeChannelEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeChannelEntity.cs index fc7af713..586e92b9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeChannelEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeChannelEntity.cs @@ -6,15 +6,15 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏兑换码渠道 /// [SugarTable(null, "游戏兑换码渠道")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameRedeemCodeChannelEntity : EntityBasicSelect +public class GameRedeemCodeChannelEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeChannelRoleUsageEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeChannelRoleUsageEntity.cs similarity index 85% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeChannelRoleUsageEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeChannelRoleUsageEntity.cs index a9c92eb4..853d7f70 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeChannelRoleUsageEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeChannelRoleUsageEntity.cs @@ -6,22 +6,22 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏兑换码渠道角色使用累计。承载兑换码分组(渠道)下每个角色的成功兑换次数,是组级角色限制额度的事实源。 /// 幂等:ux_redeem_channel_role_usage 在数据库层保证 (ChannelId, RoleId) 全局唯一,并发兑换只产生一行累计,重复回调/并发请求不会插入重复行。 -/// 边界:该表只承担组级额度累计与并发兜底;兑换流水仍由 记录,不在此表保存兑换码快照之外的审计字段。 +/// 边界:该表只承担组级额度累计与并发兜底;兑换流水仍由 记录,不在此表保存兑换码快照之外的审计字段。 /// [SugarTable(null, "游戏兑换码渠道角色使用累计")] [SugarIndex("ux_redeem_channel_role_usage", nameof(ChannelId), OrderByType.Asc, nameof(RoleId), OrderByType.Asc, true)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameRedeemCodeChannelRoleUsageEntity : EntityBasic +public class GameRedeemCodeChannelRoleUsageEntity : EntityBasic { /// - /// 兑换码渠道/分组 Id,来自兑换码 ChannelId()。 + /// 兑换码渠道/分组 Id,来自兑换码 ChannelId()。 /// [SugarColumn(ColumnDescription = "兑换码渠道Id", DefaultValue = "0")] public long ChannelId { get; set; } @@ -33,7 +33,7 @@ public class TenantGameRedeemCodeChannelRoleUsageEntity : EntityBasic public long RoleId { get; set; } /// - /// 该角色在该渠道/分组下成功兑换的累计次数。组级额度判断 = UsedCount < TenantGameRedeemCodeChannelEntity.RoleUsageLimit。 + /// 该角色在该渠道/分组下成功兑换的累计次数。组级额度判断 = UsedCount < GameRedeemCodeChannelEntity.RoleUsageLimit。 /// [SugarColumn(ColumnDescription = "已使用次数", DefaultValue = "0")] public int UsedCount { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeEntity.cs index d0823a84..8a3d0e14 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏兑换码 /// [SugarTable(null, "游戏兑换码")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameRedeemCodeEntity : EntityBasic +public class GameRedeemCodeEntity : EntityBasic { /// @@ -27,7 +27,7 @@ public class TenantGameRedeemCodeEntity : EntityBasic /// 兑换码渠道 /// [Navigate(NavigateType.OneToOne, nameof(ChannelId))] - public TenantGameRedeemCodeChannelEntity Channel { get; set; } = null!; + public GameRedeemCodeChannelEntity Channel { get; set; } = null!; /// /// 礼包码的唯一字符串。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeUseRecordEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeUseRecordEntity.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeUseRecordEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeUseRecordEntity.cs index a129b398..74a08a3c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRedeemCodeUseRecordEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRedeemCodeUseRecordEntity.cs @@ -6,15 +6,15 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏兑换码使用记录 /// [SugarTable(null, "游戏兑换码使用记录")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameRedeemCodeUseRecordEntity : EntityBasic +public class GameRedeemCodeUseRecordEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameReportEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameReportEntity.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameReportEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameReportEntity.cs index c56a80c4..c1f3bda7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameReportEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameReportEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 举报事实源。管理端录入的玩家举报记录:举报人、被举报对象、类型、场景、证据、处理状态与结果处罚关联。 @@ -9,9 +9,9 @@ namespace GameFrameX.Entity.Tenant.Game; /// [SugarTable(null, "举报事实源")] [SugarIndex("idx_report_target", nameof(TargetType), OrderByType.Asc, nameof(TargetId), OrderByType.Asc)] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameReportEntity : EntityBasic +public class GameReportEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRewardTemplateEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRewardTemplateEntity.cs similarity index 85% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRewardTemplateEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRewardTemplateEntity.cs index 106e2c46..483aa65a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRewardTemplateEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRewardTemplateEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 奖励模板。 /// 模板用于运营配置复用,业务使用时复制奖励快照;模板修改不影响已生成邮件、兑换码或活动。 /// [SugarTable(null, "奖励模板")] -[SugarIndex("idx_tenant_game_reward_template_group", nameof(GroupId), OrderByType.Asc)] -[TenantTable] +[SugarIndex("idx_game_reward_template_group", nameof(GroupId), OrderByType.Asc)] +[BusinessTable] [IncrementTable] -public class TenantGameRewardTemplateEntity : EntityBasicSelect +public class GameRewardTemplateEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRewardTemplateGroupEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRewardTemplateGroupEntity.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRewardTemplateGroupEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRewardTemplateGroupEntity.cs index 8c972498..80a25f7b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRewardTemplateGroupEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRewardTemplateGroupEntity.cs @@ -1,15 +1,15 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 奖励模板分组。 /// 分组用于邮件、兑换码、活动等运营场景归类奖励模板;分组本身强制绑定具体应用,不存在租户默认分组。 /// [SugarTable(null, "奖励模板分组")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameRewardTemplateGroupEntity : EntityBasicSelect +public class GameRewardTemplateGroupEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRoleAdvertisementEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRoleAdvertisementEntity.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRoleAdvertisementEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRoleAdvertisementEntity.cs index d5e49e70..3e97ce0a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRoleAdvertisementEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRoleAdvertisementEntity.cs @@ -1,15 +1,15 @@ using GameFrameX.Entity.Base; using GameFrameX.Foundation.Orm.Entity; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏角色广告 /// [SugarTable(null, "游戏角色广告")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameRoleAdvertisementEntity : EntityBase +public class GameRoleAdvertisementEntity : EntityBase { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRoleEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRoleEntity.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRoleEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRoleEntity.cs index 06d15a99..3c7beb6d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRoleEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRoleEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏角色 /// [SugarTable(null, "游戏角色")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameRoleEntity : EntityBasicSelect +public class GameRoleEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameTimeJobEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameTimeJobEntity.cs similarity index 87% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameTimeJobEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameTimeJobEntity.cs index e46f7547..8a00ead0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameTimeJobEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameTimeJobEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏资源 /// [SugarTable(null, "定时任务")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameTimeJobEntity : EntityBasicSelect +public class GameTimeJobEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserArchiveEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserArchiveEntity.cs similarity index 98% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserArchiveEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserArchiveEntity.cs index 0a5a6b02..cc4cf8b2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserArchiveEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserArchiveEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏玩家存档(C8 存档三件套) /// 分表透传存储:BranchesJson 原样保存客户端 24 张分表行数组,服务端不解析行内容(round-trip 字节等价的前提)。 /// [SugarTable(null, "游戏玩家存档")] -[TenantTable] +[BusinessTable] [IncrementTable] [SugarIndex("ux_game_user_archive_user", nameof(UserId), OrderByType.Asc, true)] -public class TenantGameUserArchiveEntity : EntityBasicSelect +public class GameUserArchiveEntity : EntityBasicSelect { /// /// 玩家 id(租户内唯一,一玩家一行) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserEmailEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserEmailEntity.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserEmailEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserEmailEntity.cs index ef21d488..c4c06c46 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserEmailEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserEmailEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 用户邮件 /// [SugarTable(null, "用户邮件")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameUserEmailEntity : EntityBasic +public class GameUserEmailEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserEntity.cs index b5432f64..08d4c3a0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserEntity.cs @@ -2,17 +2,17 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏玩家账号 /// [SugarTable(null, "游戏玩家账号")] // 首页聚合「今日新增玩家」按 CreatedTime 过滤计数走索引(C321 / GFX-730) -[SugarIndex("idx_tenant_game_user_created_time", nameof(CreatedTime), OrderByType.Asc)] -[TenantTable] +[SugarIndex("idx_game_user_created_time", nameof(CreatedTime), OrderByType.Asc)] +[BusinessTable] [IncrementTable] -public class TenantGameUserEntity : EntityBasicSelect +public class GameUserEntity : EntityBasicSelect { /// /// 用户名 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserLogoutRecordEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserLogoutRecordEntity.cs similarity index 86% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserLogoutRecordEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserLogoutRecordEntity.cs index 68129f49..0308ed19 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserLogoutRecordEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserLogoutRecordEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏玩家登出记录(C8:BLMarkLogout 自建;仅删号成功后上报,在线统计用) /// [SugarTable(null, "游戏玩家登出记录")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameUserLogoutRecordEntity : EntityBasicSelect +public class GameUserLogoutRecordEntity : EntityBasicSelect { /// /// 玩家 id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserRewardEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserRewardEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserRewardEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserRewardEntity.cs index 2da2e6f2..8b9dae29 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserRewardEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserRewardEntity.cs @@ -1,6 +1,6 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏玩家奖励记录(C8 奖励域:BLGetUserRewards / BLReceiveRewards1 自建) @@ -9,10 +9,10 @@ namespace GameFrameX.Entity.Tenant.Game; /// token 幂等:同 token 重放必须返回相同结果(客户端响应丢失重试时补发本地奖励,防丢奖)。 /// [SugarTable(null, "游戏玩家奖励记录")] -[TenantTable] +[BusinessTable] [IncrementTable] [SugarIndex("ux_game_user_reward_user_key", nameof(UserId), OrderByType.Asc, nameof(RewardKey), OrderByType.Asc, true)] -public class TenantGameUserRewardEntity : EntityBasicSelect +public class GameUserRewardEntity : EntityBasicSelect { /// /// 玩家 id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameWebShopEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameWebShopEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameWebShopEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameWebShopEntity.cs index fa033f99..cc933c80 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameWebShopEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameWebShopEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 游戏邮件 /// [SugarTable(null, "网页商城")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameWebShopEntity : EntityBasicSelect +public class GameWebShopEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameWebShopOrderEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameWebShopOrderEntity.cs similarity index 91% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameWebShopOrderEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameWebShopOrderEntity.cs index 767c3988..39514633 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameWebShopOrderEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameWebShopOrderEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 网页商城,只有网页商城发送失败才会新增 /// [SugarTable(null, "网页商城订单")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameWebShopOrderEntity : EntityBasicSelect +public class GameWebShopOrderEntity : EntityBasicSelect { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Online/TenantGameOnlineConfigRolloutEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Online/GameOnlineConfigRolloutEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Online/TenantGameOnlineConfigRolloutEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Online/GameOnlineConfigRolloutEntity.cs index d0db8390..d00a9abd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Online/TenantGameOnlineConfigRolloutEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Online/GameOnlineConfigRolloutEntity.cs @@ -7,7 +7,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Game.Online; -namespace GameFrameX.Entity.Tenant.Game.Online; +namespace GameFrameX.Entity.Business.Game.Online; /// /// 配置灰度发布(Rollout)版本行。每次发布 / 回滚都追加新行(版本化),历史行不可修改不可删除(vault:C8 S7.8 / VC-7.12)。 @@ -15,9 +15,9 @@ namespace GameFrameX.Entity.Tenant.Game.Online; /// 灰度语义(SegmentId + Percent 1-100 ↔ Online 侧解释 ↔ 既有 RolloutMatcher)三方对照见 OnlineRolloutSemanticMap。 /// [SugarTable(null, "配置灰度发布版本")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameOnlineConfigRolloutEntity : EntityBasic +public class GameOnlineConfigRolloutEntity : EntityBasic { /// @@ -42,7 +42,7 @@ public class TenantGameOnlineConfigRolloutEntity : EntityBasic public int ConfigVersion { get; set; } /// - /// 灰度分群Id(引用 TenantGameOnlinePlayerSegmentEntity.Id;必须为已同步 Online 的分群)。 + /// 灰度分群Id(引用 GameOnlinePlayerSegmentEntity.Id;必须为已同步 Online 的分群)。 /// [SugarColumn(ColumnDescription = "灰度分群Id", DefaultValue = "0")] public long SegmentId { get; set; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Online/TenantGameOnlinePlayerSegmentEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Online/GameOnlinePlayerSegmentEntity.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Online/TenantGameOnlinePlayerSegmentEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Online/GameOnlinePlayerSegmentEntity.cs index fac16c29..42abfc4b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Online/TenantGameOnlinePlayerSegmentEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Online/GameOnlinePlayerSegmentEntity.cs @@ -7,7 +7,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Game.Online; -namespace GameFrameX.Entity.Tenant.Game.Online; +namespace GameFrameX.Entity.Business.Game.Online; /// /// 玩家分群定义。Admin 是分群定义的事实源(编排),Online 侧按其事件数据解释与命中判定(vault:C8 S7.5/S7.8)。 @@ -15,9 +15,9 @@ namespace GameFrameX.Entity.Tenant.Game.Online; /// OnlineRolloutSemanticMap,本实体只承载 JSON 表达式不解释语义;同步状态反映最近一次 syncOnline 结果。 /// [SugarTable(null, "玩家分群定义")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantGameOnlinePlayerSegmentEntity : EntityBasic +public class GameOnlinePlayerSegmentEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppAssetPackageVersionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppAssetPackageVersionEntity.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppAssetPackageVersionEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppAssetPackageVersionEntity.cs index 3dde9399..5863cec1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppAssetPackageVersionEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppAssetPackageVersionEntity.cs @@ -1,11 +1,11 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.Release; +namespace GameFrameX.Entity.Business.Game.Release; [SugarTable(null, "客户端资源包版本")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppAssetPackageVersionEntity : EntityBasic +public sealed class GameAppAssetPackageVersionEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppAssetPackageVersionHistoryEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppAssetPackageVersionHistoryEntity.cs similarity index 79% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppAssetPackageVersionHistoryEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppAssetPackageVersionHistoryEntity.cs index 4f5ee1a8..ea4928cd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppAssetPackageVersionHistoryEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppAssetPackageVersionHistoryEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.Release; +namespace GameFrameX.Entity.Business.Game.Release; /// /// 客户端资源包版本变更历史(分包级流水,作用域跟随外键)。 -/// 通过 关联 , +/// 通过 关联 , /// 查询入口必须带 VersionId 过滤,由外键链路保证隔离,不应被当成可跨版本扫描的应用数据。 /// [SugarTable(null, "客户端资源包版本记录")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppAssetPackageVersionHistoryEntity : EntityBasic +public sealed class GameAppAssetPackageVersionHistoryEntity : EntityBasic { /// /// 资源包版本Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppReleaseVersionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppReleaseVersionEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppReleaseVersionEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppReleaseVersionEntity.cs index 38b92ab3..15e249b2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppReleaseVersionEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppReleaseVersionEntity.cs @@ -1,11 +1,11 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.Release; +namespace GameFrameX.Entity.Business.Game.Release; [SugarTable(null, "客户端程序版本配置表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppReleaseVersionEntity : EntityBasic +public sealed class GameAppReleaseVersionEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppVersionDefinitionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppVersionDefinitionEntity.cs similarity index 82% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppVersionDefinitionEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppVersionDefinitionEntity.cs index c491f6c2..3803d0c9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Release/TenantGameAppVersionDefinitionEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Release/GameAppVersionDefinitionEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; using GameFrameX.Foundation.Orm.Entity.Filter; -namespace GameFrameX.Entity.Tenant.Game.Release; +namespace GameFrameX.Entity.Business.Game.Release; /// /// 客户端程序版本号字典(应用作用域事实数据)。 /// [SugarTable(null, "客户端程序版本配置表")] [SugarIndex("idx_version_definition_name", nameof(Name), OrderByType.Asc, true)] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppVersionDefinitionEntity : EntityBasic, ISelectFilter +public sealed class GameAppVersionDefinitionEntity : EntityBasic, ISelectFilter { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigEntity.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigEntity.cs index bd44249f..9d2686a1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigEntity.cs @@ -1,11 +1,11 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.RemoteConfig; +namespace GameFrameX.Entity.Business.Game.RemoteConfig; [SugarTable(null, "客户端远程配置表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppRemoteConfigEntity : EntityBasic +public sealed class GameAppRemoteConfigEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigKeyEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigKeyEntity.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigKeyEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigKeyEntity.cs index ff38cef8..cedee6a9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigKeyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigKeyEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.RemoteConfig; +namespace GameFrameX.Entity.Business.Game.RemoteConfig; /// /// 客户端远程配置内容键定义表 /// [SugarTable(null, "客户端远程配置内容键定义表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppRemoteConfigKeyEntity : EntityBasic +public sealed class GameAppRemoteConfigKeyEntity : EntityBasic { /// /// JSON key 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigModeEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigModeEntity.cs similarity index 87% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigModeEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigModeEntity.cs index 45a3159a..6a1d1df5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/RemoteConfig/TenantGameAppRemoteConfigModeEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/RemoteConfig/GameAppRemoteConfigModeEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.RemoteConfig; +namespace GameFrameX.Entity.Business.Game.RemoteConfig; /// /// 客户端远程配置模式定义表 /// [SugarTable(null, "客户端远程配置模式定义表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppRemoteConfigModeEntity : EntityBasic +public sealed class GameAppRemoteConfigModeEntity : EntityBasic { /// /// 模式编码 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Resource/TenantGameAppAssetPackageEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Resource/GameAppAssetPackageEntity.cs similarity index 83% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Resource/TenantGameAppAssetPackageEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Resource/GameAppAssetPackageEntity.cs index 761bb5d8..b556d728 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/Resource/TenantGameAppAssetPackageEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/Resource/GameAppAssetPackageEntity.cs @@ -1,7 +1,7 @@ using GameFrameX.Entity.Base; using GameFrameX.Foundation.Orm.Entity.Filter; -namespace GameFrameX.Entity.Tenant.Game.Resource; +namespace GameFrameX.Entity.Business.Game.Resource; /// /// 客户端资源包名称字典。 @@ -10,9 +10,9 @@ namespace GameFrameX.Entity.Tenant.Game.Resource; /// /// [SugarTable(null, "客户端资源包")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppAssetPackageEntity : EntityBasic, ISelectFilter +public sealed class GameAppAssetPackageEntity : EntityBasic, ISelectFilter { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/ServerConfig/TenantGameAppServerConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/ServerConfig/GameAppServerConfigEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/ServerConfig/TenantGameAppServerConfigEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/ServerConfig/GameAppServerConfigEntity.cs index 8ac8c8ec..a0d7d983 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/ServerConfig/TenantGameAppServerConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/ServerConfig/GameAppServerConfigEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.ServerConfig; +namespace GameFrameX.Entity.Business.Game.ServerConfig; /// /// 游戏运营配置表(登录 Config md5 差异下发的内容源,原厂 10 键:bakeOut/badge/bulletinLanguage/bundleController/chapterUpdate/fileReplace/frame/general_conf/notify/reward_replace) /// [SugarTable(null, "游戏运营配置表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantGameAppServerConfigEntity : EntityBasic +public sealed class GameAppServerConfigEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantSessionKeyEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/SessionKeyEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantSessionKeyEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/SessionKeyEntity.cs index b185d60f..b493741e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantSessionKeyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/SessionKeyEntity.cs @@ -1,17 +1,17 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// App 会话密钥(AES-256-GCM 加密信封对称密钥环,change C5 server-envelope-middleware)。 -/// 形状照 (C2 密钥环先例):Kid 版本化寻址、NotBefore/Expire 租约、 +/// 形状照 (C2 密钥环先例):Kid 版本化寻址、NotBefore/Expire 租约、 /// Rotate 双活、禁删保护;区别在算法为 AES-GCM 信封密钥(会话层,双向 c2s/s2c HKDF 分钥)而非 HMAC 签名密钥。 /// 客户端信封自报 kid 定密钥(双活轮换窗口内新旧 key 共存)。 /// [SugarTable(null, "App 会话密钥")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantSessionKeyEntity : EntityBasic +public class SessionKeyEntity : EntityBasic { /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ObjectStorage/TenantObjectStorageConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ObjectStorage/ObjectStorageConfigEntity.cs similarity index 94% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ObjectStorage/TenantObjectStorageConfigEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ObjectStorage/ObjectStorageConfigEntity.cs index 40d576aa..4716ca2f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ObjectStorage/TenantObjectStorageConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ObjectStorage/ObjectStorageConfigEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.ObjectStorage; +namespace GameFrameX.Entity.Business.ObjectStorage; /// /// 租户对象存储配置。每个租户维护若干存储提供商配置,其中至多一条处于启用状态。 /// [SugarTable(null, "租户对象存储配置")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantObjectStorageConfigEntity : EntityBasic +public class ObjectStorageConfigEntity : EntityBasic { /// /// 存储提供商名称(稳定小写值:local / aliyun / tencent-cos / qiniu)。创建后不可变更。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantOnlineUserEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/OnlineUserEntity.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantOnlineUserEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/OnlineUserEntity.cs index 23bc4ae2..8c1126c9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantOnlineUserEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/OnlineUserEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Foundation.Orm.Entity; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// /// 系统在线用户表 /// [SugarTable(null, "租户库在线用户表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantOnlineUserEntity : EntityBase +public sealed class OnlineUserEntity : EntityBase { /// /// 连接Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleEntity.cs similarity index 92% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleEntity.cs index b0a1a745..38970821 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleEntity.cs @@ -1,15 +1,15 @@ using GameFrameX.Entity.Enum; using GameFrameX.Foundation.Orm.Entity; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// /// 系统角色表 /// [SugarTable(null, "租户库角色表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantRoleEntity : EntityBase +public class RoleEntity : EntityBase { /// /// 名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleMenuEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleMenuEntity.cs similarity index 87% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleMenuEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleMenuEntity.cs index f04ab69e..60c68e68 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleMenuEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleMenuEntity.cs @@ -1,15 +1,15 @@ using GameFrameX.Foundation.Orm.Entity; using GameFrameX.Entity.Global; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// /// 系统角色菜单表 /// [SugarTable(null, "租户库角色菜单表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantRoleMenuEntity : EntityBase +public class RoleMenuEntity : EntityBase { /// /// 角色Id diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserEntity.cs new file mode 100644 index 00000000..41acfdb5 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserEntity.cs @@ -0,0 +1,13 @@ +using GameFrameX.Entity.System; + +namespace GameFrameX.Entity.Business; + +/// +/// 租户库用户表,仅承载普通租户身份与管理员角色账号,必须在明确租户上下文中访问。 +/// +[SugarTable(null, "租户库用户表")] +[BusinessTable] +[IncrementTable] +public class UserEntity : SystemUserBase +{ +} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserRoleEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserRoleEntity.cs similarity index 76% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserRoleEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserRoleEntity.cs index 266091ec..ba44d1b8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserRoleEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserRoleEntity.cs @@ -1,14 +1,14 @@ using GameFrameX.Foundation.Orm.Entity; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// /// 系统用户角色表 /// [SugarTable(null, "租户库用户角色表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public class TenantUserRoleEntity : EntityBase +public class UserRoleEntity : EntityBase { /// /// 用户Id @@ -20,7 +20,7 @@ public class TenantUserRoleEntity : EntityBase /// 用户 /// [Navigate(NavigateType.OneToOne, nameof(UserId))] - public TenantUserEntity User { get; set; } = null!; + public UserEntity User { get; set; } = null!; /// /// 角色Id @@ -32,5 +32,5 @@ public class TenantUserRoleEntity : EntityBase /// 角色 /// [Navigate(NavigateType.OneToOne, nameof(RoleId))] - public TenantRoleEntity TenantRoleEntity { get; set; } = null!; + public RoleEntity RoleEntity { get; set; } = null!; } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantWechatUserEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/WechatUserEntity.cs similarity index 95% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantWechatUserEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/WechatUserEntity.cs index b30fea04..24442cb8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantWechatUserEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/WechatUserEntity.cs @@ -1,15 +1,15 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// /// 租户微信用户绑定表 /// [SugarTable(null, "租户微信用户绑定表")] -[TenantTable] +[BusinessTable] [IncrementTable] -public sealed class TenantWechatUserEntity : EntityBasic +public sealed class WechatUserEntity : EntityBasic { /// /// 租户用户Id @@ -21,7 +21,7 @@ public sealed class TenantWechatUserEntity : EntityBasic /// 租户用户 /// [Navigate(NavigateType.OneToOne, nameof(UserId))] - public TenantUserEntity User { get; set; } = null!; + public UserEntity User { get; set; } = null!; /// /// 平台类型 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatProviderEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatProviderEnum.cs index 1fb440e1..4ad827e1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatProviderEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatProviderEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 反作弊 / 广告奖励 Provider 来源(反作弊事件账本 TenantGameAntiCheatEventEntity.Provider)。 +/// 反作弊 / 广告奖励 Provider 来源(反作弊事件账本 GameAntiCheatEventEntity.Provider)。 /// 严格锁定 4 值:与广告回调 Provider(C11-B / C114)对齐,避免任意 Provider 字符串;非枚举内的来源统一用 Custom 并在 ProviderName 字段记录实际名称。 /// [Description("反作弊Provider")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatSuggestedActionEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatSuggestedActionEnum.cs index 9833ff6e..c3c37755 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatSuggestedActionEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatSuggestedActionEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 反作弊建议处置(反作弊事件账本 TenantGameAntiCheatEventEntity.SuggestedAction)。 +/// 反作弊建议处置(反作弊事件账本 GameAntiCheatEventEntity.SuggestedAction)。 /// 严格锁定 4 值:这是 Provider 上报的建议,永不自动落处罚,必须经人工复核(Review)才能影响后续。 /// 建议集合与处罚登录阻断子集(Ban/RestrictLogin)对齐,便于复核通过后在 C11-D-followup 中映射为处罚。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatTargetTypeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatTargetTypeEnum.cs index 71c4a6bf..95ddf422 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatTargetTypeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AntiCheatTargetTypeEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 反作弊事件指向对象类型(反作弊事件账本 TenantGameAntiCheatEventEntity.TargetType)。 +/// 反作弊事件指向对象类型(反作弊事件账本 GameAntiCheatEventEntity.TargetType)。 /// 严格锁定 4 值:值与 C11-C(C115)计划的 PenaltyTargetTypeEnum 对齐(Account=1/Role=2/Device=3/Ip=4), /// 便于 C11-D-followup 在复核通过后将反作弊建议映射为同维度处罚,避免语义错位。 /// @@ -10,17 +10,17 @@ namespace GameFrameX.Entity.Enum; public enum AntiCheatTargetTypeEnum { /// - /// 游戏账号(TenantGameUserEntity.Id)。 + /// 游戏账号(GameUserEntity.Id)。 /// [Description("账号")] Account = 1, /// - /// 游戏角色(TenantGameRoleEntity.Id)。 + /// 游戏角色(GameRoleEntity.Id)。 /// [Description("角色")] Role = 2, /// - /// 设备标识(TenantGameAppDeviceEntity)。 + /// 设备标识(GameAppDeviceEntity)。 /// [Description("设备")] Device = 3, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AppealStatusEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AppealStatusEnum.cs index 75a21103..05947fef 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AppealStatusEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/AppealStatusEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 申诉状态。申诉事实源(TenantGamePenaltyAppealEntity)的生命周期状态。 +/// 申诉状态。申诉事实源(GamePenaltyAppealEntity)的生命周期状态。 /// [Description("申诉状态")] [AdminEnum] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ChannelScopeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ChannelScopeEnum.cs index 62c9ebe4..96ddc36a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ChannelScopeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ChannelScopeEnum.cs @@ -15,5 +15,5 @@ public enum ChannelScopeEnum /// /// 租户自定义渠道 /// - [Description("租户")] Tenant = 2, + [Description("租户")] Business = 2, } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentStatusEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentStatusEnum.cs index 3d0140a6..7729ac50 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentStatusEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentStatusEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 权益发放状态。权益发货账本(TenantGameOrderFulfillmentEntity)的单笔发放生命周期状态。 +/// 权益发放状态。权益发货账本(GameOrderFulfillmentEntity)的单笔发放生命周期状态。 /// 与订单 OrderStatusEnum 独立:账本记录「权益实际发放结果」,订单记录「订单交易状态」。 /// [Description("权益发放状态")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentTypeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentTypeEnum.cs index eb5ef104..9f043aa7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentTypeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/FulfillmentTypeEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 权益发放类型。权益发货账本(TenantGameOrderFulfillmentEntity)的发放动作分类。 +/// 权益发放类型。权益发货账本(GameOrderFulfillmentEntity)的发放动作分类。 /// [Description("权益发放类型")] [AdminEnum] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ManualReviewStateEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ManualReviewStateEnum.cs index 021af790..c3821988 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ManualReviewStateEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ManualReviewStateEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 人工复核状态(反作弊事件账本 TenantGameAntiCheatEventEntity.ManualReviewState)。 +/// 人工复核状态(反作弊事件账本 GameAntiCheatEventEntity.ManualReviewState)。 /// 严格锁定 4 值:状态机单向迁移 Pending → Approved/Rejected/Escalated;非 Pending 拒绝重审。 /// 这是"风险 Provider 上报不能绕过人工审核策略"的闸门——Submit 一律写 Pending,SuggestedAction 永不跳过此状态。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyActionTypeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyActionTypeEnum.cs index 7ef083fd..8a46a65d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyActionTypeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyActionTypeEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 处罚动作。处罚事实源(TenantGamePenaltyEntity)的动作分类。 +/// 处罚动作。处罚事实源(GamePenaltyEntity)的动作分类。 /// 严格锁定 5 值;登录阻断集合严格等于 {Ban, RestrictLogin}。 /// 禁言与限制发言语义同一,合并为单个 Mute;Mute / RestrictTrade / RestrictMatch 不阻断登录与支付,仅落账。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyStatusEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyStatusEnum.cs index 23175741..59d3429a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyStatusEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyStatusEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 处罚状态。处罚事实源(TenantGamePenaltyEntity)的生命周期状态。 +/// 处罚状态。处罚事实源(GamePenaltyEntity)的生命周期状态。 /// [Description("处罚状态")] [AdminEnum] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyTargetTypeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyTargetTypeEnum.cs index 4c25f977..570b1aeb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyTargetTypeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/PenaltyTargetTypeEnum.cs @@ -1,24 +1,24 @@ namespace GameFrameX.Entity.Enum; /// -/// 处罚对象类型。处罚事实源(TenantGamePenaltyEntity)与举报事实源(TenantGameReportEntity)共用的对象分类。 +/// 处罚对象类型。处罚事实源(GamePenaltyEntity)与举报事实源(GameReportEntity)共用的对象分类。 /// [Description("处罚对象类型")] [AdminEnum] public enum PenaltyTargetTypeEnum { /// - /// 游戏账号(TenantGameUserEntity.Id)。 + /// 游戏账号(GameUserEntity.Id)。 /// [Description("账号")] Account = 1, /// - /// 游戏角色(TenantGameRoleEntity.Id)。 + /// 游戏角色(GameRoleEntity.Id)。 /// [Description("角色")] Role = 2, /// - /// 设备(TenantGameAppDeviceEntity 设备标识)。 + /// 设备(GameAppDeviceEntity 设备标识)。 /// [Description("设备")] Device = 3, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportStatusEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportStatusEnum.cs index 38371bad..6590904f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportStatusEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportStatusEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 举报状态。举报事实源(TenantGameReportEntity)的生命周期状态。 +/// 举报状态。举报事实源(GameReportEntity)的生命周期状态。 /// [Description("举报状态")] [AdminEnum] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportTypeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportTypeEnum.cs index d44ec2bd..131ef502 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportTypeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ReportTypeEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 举报类型。举报事实源(TenantGameReportEntity)的分类。 +/// 举报类型。举报事实源(GameReportEntity)的分类。 /// 严格锁定 5 值。 /// [Description("举报类型")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeEnum.cs index 2a112cc4..3d3b0457 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 风险策略生效模式(解析 TenantClientApiPolicyEntity.RiskPolicy 字符串后的结构化决策)。 +/// 风险策略生效模式(解析 ClientApiPolicyEntity.RiskPolicy 字符串后的结构化决策)。 /// 严格锁定 3 值:直接对齐 C11-D 验收"风险策略 fail closed / fail open 必须按应用配置明确"。 /// 不引入 Disabled——AuditOnly 已表达"不阻断但记录"。 /// 解析默认安全:开启 SignatureRequired / DeviceProofRequired 且未显式配置时,回退 FailClosed(见 RiskEnforcementModeParser)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeParser.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeParser.cs index c79221a5..807fca24 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeParser.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskEnforcementModeParser.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Entity.Enum; /// /// 风险策略生效模式解析器(纯函数,无 IO,便于单元测试)。 -/// 把 TenantClientApiPolicyEntity.RiskPolicy 字符串解析为结构化 。 +/// 把 ClientApiPolicyEntity.RiskPolicy 字符串解析为结构化 。 /// 解析优先级(默认安全): /// /// 字符串非空且能 Enum.TryParse(忽略大小写)成功 → 返回解析值。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskLevelEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskLevelEnum.cs index 45acafea..6f129a27 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskLevelEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/RiskLevelEnum.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Entity.Enum; /// -/// 风险等级(反作弊事件账本 TenantGameAntiCheatEventEntity.RiskLevel)。 +/// 风险等级(反作弊事件账本 GameAntiCheatEventEntity.RiskLevel)。 /// 严格锁定 4 值:由 Provider 上报,建议处置强度递增,仅作为人工复核参考,不自动决定处罚。 /// [Description("风险等级")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/TenantTypeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/TypeEnum.cs similarity index 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/TenantTypeEnum.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/TypeEnum.cs index 4e84c09e..fd2e8e11 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/TenantTypeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/TypeEnum.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Entity.Enum; /// [Description("租户类型枚举")] [AdminEnum] -public enum TenantTypeEnum +public enum TypeEnum { /// /// 库隔离 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/LiveOpsSourceKind.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/LiveOpsSourceKind.cs index 4c0ec5ba..3fa41908 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/LiveOpsSourceKind.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/LiveOpsSourceKind.cs @@ -21,27 +21,27 @@ namespace GameFrameX.Entity.Game.Online; public enum LiveOpsSourceKind { /// - /// 远程配置(TenantGameAppRemoteConfigEntity;Online 命令 publishRemoteConfig,配置内容快照幂等)。 + /// 远程配置(GameAppRemoteConfigEntity;Online 命令 publishRemoteConfig,配置内容快照幂等)。 /// [Description("远程配置")] RemoteConfig = 1, /// - /// 设备分组(TenantDeviceGroupEntity;Online 命令 syncDeviceGroup,全量快照同步幂等)。 + /// 设备分组(DeviceGroupEntity;Online 命令 syncDeviceGroup,全量快照同步幂等)。 /// [Description("设备分组")] DeviceGroup = 2, /// - /// 定时任务(TenantGameTimeJobEntity;Online 命令 syncScheduledTask,任务定义快照同步幂等)。 + /// 定时任务(GameTimeJobEntity;Online 命令 syncScheduledTask,任务定义快照同步幂等)。 /// [Description("定时任务")] ScheduledTask = 3, /// - /// 玩家公告(TenantGameAnnouncementEntity;Online 命令 pushAnnouncement,公告 Id + 内容快照幂等)。 + /// 玩家公告(GameAnnouncementEntity;Online 命令 pushAnnouncement,公告 Id + 内容快照幂等)。 /// [Description("玩家公告")] Announcement = 4, /// - /// 运营邮件 Campaign(TenantGameMailCampaignEntity;复用既有 publish_mail_campaign 链路, + /// 运营邮件 Campaign(GameMailCampaignEntity;复用既有 publish_mail_campaign 链路, /// 同目标已发布时合并返回首次回执,不重复下发)。 /// [Description("邮件 Campaign")] MailCampaign = 5, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/OnlineConfigRolloutKind.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/OnlineConfigRolloutKind.cs index b8b57168..5aca0680 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/OnlineConfigRolloutKind.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Game/Online/OnlineConfigRolloutKind.cs @@ -19,22 +19,22 @@ namespace GameFrameX.Entity.Game.Online; public enum OnlineConfigRolloutKind { /// - /// 远程配置(ConfigKey = TenantGameAppRemoteConfigEntity.Id)。 + /// 远程配置(ConfigKey = GameAppRemoteConfigEntity.Id)。 /// [Description("远程配置")] RemoteConfig = 1, /// - /// 玩家公告(ConfigKey = TenantGameAnnouncementEntity.Id)。 + /// 玩家公告(ConfigKey = GameAnnouncementEntity.Id)。 /// [Description("玩家公告")] Announcement = 2, /// - /// 设备分组(ConfigKey = TenantDeviceGroupEntity.Id)。 + /// 设备分组(ConfigKey = DeviceGroupEntity.Id)。 /// [Description("设备分组")] DeviceGroup = 3, /// - /// 定时任务(ConfigKey = TenantGameTimeJobEntity.Id)。 + /// 定时任务(ConfigKey = GameTimeJobEntity.Id)。 /// [Description("定时任务")] ScheduledTask = 4, } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs index 218b6e4d..8944ec1d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs @@ -131,7 +131,7 @@ public sealed class GlobalMenuEntity : EntityBasic /// 超管专属菜单下允许租户只读访问 /// [SugarColumn(ColumnDescription = "超管专属允许租户只读", DefaultValue = "false")] - public bool AllowTenantWhenSuperAdminOnly { get; set; } + public bool AllowAdminWhenSuperAdminOnly { get; set; } /// /// 控制台作用域。所有菜单共用工作台,可见权限由用户角色与超管标记控制。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/GlobalUsing.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/GlobalUsing.cs index 03892dfc..f4d9d4e9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/GlobalUsing.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/GlobalUsing.cs @@ -2,4 +2,4 @@ global using GameFrameX.Foundation.Orm.Attribute; global using SqlSugar; global using GameFrameX.Entity; -global using GameFrameX.Entity.Tenant; \ No newline at end of file +global using GameFrameX.Entity.Business; \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditEntity.cs new file mode 100644 index 00000000..41a2f4c3 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditEntity.cs @@ -0,0 +1,11 @@ +namespace GameFrameX.Entity.Log; + +/// +/// 租户审计日志表(当前租户库 log_* 归属) +/// +[SugarTable(null, "租户审计日志表")] +[IncrementTable] +[BusinessTable] +public class LogAuditEntity : LogAuditFields +{ +} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditFields.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditFields.cs index 9dda80b8..9471cad0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogAuditFields.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Entity.Log; /// -/// 审计日志公共字段基类。不映射物理表,供 与 复用字段。 +/// 审计日志公共字段基类。不映射物理表,供 与 复用字段。 /// public class LogAuditFields : EntityBasic { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffEntity.cs new file mode 100644 index 00000000..3cc13e36 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffEntity.cs @@ -0,0 +1,11 @@ +namespace GameFrameX.Entity.Log; + +/// +/// 租户差异日志表(当前租户库 log_* 归属) +/// +[SugarTable(null, "租户差异日志表")] +[IncrementTable] +[BusinessTable] +public class LogDiffEntity : LogDiffFields +{ +} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs index ac3a8433..443073df 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs @@ -3,13 +3,13 @@ namespace GameFrameX.Entity.Log; /// -/// 差异日志公共字段基类。不映射物理表,供 与 复用字段。 +/// 差异日志公共字段基类。不映射物理表,供 与 复用字段。 /// public class LogDiffFields : EntityBasic { /// 历史审计归属,仅保留既有记录,不参与路由或自动填充。 [SugarColumn(ColumnDescription = "历史租户标识", IsNullable = true)] - public long? TenantId { get; set; } + public long? Id { get; set; } /// /// 操作前记录 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogExceptionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogExceptionEntity.cs new file mode 100644 index 00000000..11647736 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogExceptionEntity.cs @@ -0,0 +1,11 @@ +namespace GameFrameX.Entity.Log; + +/// +/// 租户异常日志表(当前租户库 log_* 归属) +/// +[SugarTable(null, "租户异常日志表")] +[IncrementTable] +[BusinessTable] +public class LogExceptionEntity : LogOperationFields +{ +} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogOperationEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogOperationEntity.cs new file mode 100644 index 00000000..6174ab5c --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogOperationEntity.cs @@ -0,0 +1,11 @@ +namespace GameFrameX.Entity.Log; + +/// +/// 租户操作日志表(当前租户库 log_* 归属) +/// +[SugarTable(null, "租户操作日志表")] +[IncrementTable] +[BusinessTable] +public class LogOperationEntity : LogOperationFields +{ +} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitEntity.cs new file mode 100644 index 00000000..0f2e3a78 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitEntity.cs @@ -0,0 +1,11 @@ +namespace GameFrameX.Entity.Log; + +/// +/// 租户访问日志表(当前租户库 log_* 归属) +/// +[SugarTable(null, "租户访问日志表")] +[IncrementTable] +[BusinessTable] +public class LogVisitEntity : LogVisitFields +{ +} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs index d1db3803..1a015446 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs @@ -4,14 +4,14 @@ namespace GameFrameX.Entity.Log; /// -/// 访问日志公共字段基类。不映射物理表,仅供 与 复用字段, +/// 访问日志公共字段基类。不映射物理表,仅供 与 复用字段, /// 避免单个 CLR 实体按运行上下文切换物理表。 /// public class LogVisitFields : EntityBase { /// 历史审计归属,仅保留既有记录,不参与路由或自动填充。 [SugarColumn(ColumnDescription = "历史租户标识", IsNullable = true)] - public long? TenantId { get; set; } + public long? Id { get; set; } /// /// 模块名称 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogAuditEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogAuditEntity.cs deleted file mode 100644 index dbff92fb..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogAuditEntity.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace GameFrameX.Entity.Log; - -/// -/// 租户审计日志表(当前租户库 tenant_log_* 归属) -/// -[SugarTable(null, "租户审计日志表")] -[IncrementTable] -[TenantTable] -public class TenantLogAuditEntity : LogAuditFields -{ -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogDiffEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogDiffEntity.cs deleted file mode 100644 index bf3fc13a..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogDiffEntity.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace GameFrameX.Entity.Log; - -/// -/// 租户差异日志表(当前租户库 tenant_log_* 归属) -/// -[SugarTable(null, "租户差异日志表")] -[IncrementTable] -[TenantTable] -public class TenantLogDiffEntity : LogDiffFields -{ -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogExceptionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogExceptionEntity.cs deleted file mode 100644 index 250de928..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogExceptionEntity.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace GameFrameX.Entity.Log; - -/// -/// 租户异常日志表(当前租户库 tenant_log_* 归属) -/// -[SugarTable(null, "租户异常日志表")] -[IncrementTable] -[TenantTable] -public class TenantLogExceptionEntity : LogOperationFields -{ -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogOperationEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogOperationEntity.cs deleted file mode 100644 index c884062a..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogOperationEntity.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace GameFrameX.Entity.Log; - -/// -/// 租户操作日志表(当前租户库 tenant_log_* 归属) -/// -[SugarTable(null, "租户操作日志表")] -[IncrementTable] -[TenantTable] -public class TenantLogOperationEntity : LogOperationFields -{ -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogVisitEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogVisitEntity.cs deleted file mode 100644 index 9e65c3c2..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/TenantLogVisitEntity.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace GameFrameX.Entity.Log; - -/// -/// 租户访问日志表(当前租户库 tenant_log_* 归属) -/// -[SugarTable(null, "租户访问日志表")] -[IncrementTable] -[TenantTable] -public class TenantLogVisitEntity : LogVisitFields -{ -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs index 3bef73ef..5f31e5fc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs @@ -36,7 +36,7 @@ namespace GameFrameX.Entity.Routing; /// 归属:主数据库,承载租户可通过白名单只读访问的全局定义(菜单、字典、语言、平台、渠道定义、租户套餐模板等)。 /// 访问:租户代码只能通过显式白名单 Provider/API 只读访问,写入仅限平台;禁止租户任意查询主库。 /// 路由:必须解析到主库,与 system_ 同属主库初始化集合,禁止 fallback 到租户库。 -/// 边界:与 、 互斥。C34 新增,用于区分平台私有表(system_)与租户白名单只读全局定义表(global_)。 +/// 边界:与 、 互斥。C34 新增,用于区分平台私有表(system_)与租户白名单只读全局定义表(global_)。 /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class GlobalTableAttribute : Attribute diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/PlatformTableAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/PlatformTableAttribute.cs index f44da4d1..bde56a34 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/PlatformTableAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/PlatformTableAttribute.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Entity.Routing; /// /// 归属:主数据库,仅平台与 SuperAdmin 可读写,承载平台身份、租户注册、平台私有配置等平台私有数据。 /// 路由:必须解析到主库,禁止根据连接或用户切换物理表名,禁止 fallback 到租户库或日志库。 -/// 边界:与 、 互斥,每个受管持久化实体只能标注其中一个。 +/// 边界:与 、 互斥,每个受管持久化实体只能标注其中一个。 /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class PlatformTableAttribute : Attribute diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/ChannelDefinition.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/ChannelDefinition.cs index 475b4b72..f45b3dde 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/ChannelDefinition.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/ChannelDefinition.cs @@ -22,7 +22,7 @@ public abstract class ChannelDefinition : EntityBasic, ISelectFilter /// 渠道作用域 /// [SugarColumn(ColumnDescription = "渠道作用域", DefaultValue = "0")] - public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Tenant; + public ChannelScopeEnum Scope { get; set; } = ChannelScopeEnum.Business; /// /// 适用平台编码 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs index fbc8cfb4..f1c9314b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Entity.System; /// /// 平台系统邮件 Provider 配置。 -/// 存储边界:主库 / SuperAdmin-only;与租户业务邮件(TenantEmailConfigEntity)完全独立,互不 fallback。 +/// 存储边界:主库 / SuperAdmin-only;与租户业务邮件(EmailConfigEntity)完全独立,互不 fallback。 /// 典型用途:租户生命周期、账单、平台安全、平台运维、异常事件通知;调用方不依赖当前请求租户上下文。 /// 同一 /// SystemEmailPurpose diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemRegisterEmailCodeEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemRegisterEmailCodeEntity.cs index afe0c96f..90cabce1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemRegisterEmailCodeEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemRegisterEmailCodeEntity.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Entity.System; /// /// 平台邮箱自助注册验证码。 -/// 存储边界:主库 / 匿名注册流程;与租户玩家邮件验证码(TenantGameUserEmailEntity)完全独立,互不复用。 +/// 存储边界:主库 / 匿名注册流程;与租户玩家邮件验证码(GameUserEmailEntity)完全独立,互不复用。 /// [SugarTable(null, "平台邮箱自助注册验证码")] [SugarIndex("idx_system_register_email_code_email", nameof(Email), OrderByType.Asc)] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemUserBase.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemUserBase.cs index aec613f0..52345cfd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemUserBase.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemUserBase.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Entity.System; /// -/// 用户字段基类,仅提供 system_user 与 tenant_user 共享字段,不直接映射物理表。 +/// 用户字段基类,仅提供 system_user 与 user 共享字段,不直接映射物理表。 /// public abstract class SystemUserBase : EntityBase { @@ -170,7 +170,7 @@ public abstract class SystemUserBase : EntityBase /// 直属主管 /// [Navigate(NavigateType.OneToOne, nameof(ManagerUserId))] - public TenantUserEntity ManagerUser { get; set; } = null!; + public UserEntity ManagerUser { get; set; } = null!; /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemWechatPayEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemWechatPayEntity.cs index 6ce5c006..2315f61d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemWechatPayEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemWechatPayEntity.cs @@ -135,7 +135,7 @@ public sealed class SystemWechatPayEntity : EntityBasic /// 关联微信用户 /// [Navigate(NavigateType.OneToOne, nameof(OpenId))] - public TenantWechatUserEntity TenantWechatUserEntity { get; set; } = null!; + public WechatUserEntity WechatUserEntity { get; set; } = null!; /// /// 子商户号 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs index f1d325d3..69d89c7f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs @@ -1,7 +1,7 @@ -namespace GameFrameX.Entity.Tenant.Game.FeatureSwitch; +namespace GameFrameX.Entity.Business.Game.FeatureSwitch; /// -/// 开关注册表消费方标记( 列)的取值域。 +/// 开关注册表消费方标记( 列)的取值域。 /// 定义在实体层:列默认值、Admin 写入校验与投放解析的行过滤必须共用同一取值域,避免字面量漂移。 /// public static class FeatureSwitchAudienceValues diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/GamePropItem.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/GamePropItem.cs index 613961f0..f642370e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/GamePropItem.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/GamePropItem.cs @@ -4,7 +4,7 @@ // // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! -namespace GameFrameX.Entity.Tenant.Game; +namespace GameFrameX.Entity.Business.Game; /// /// 道具对象。非物理表映射:作为邮件附件 / 奖励明细 / 兑换码内容等 string 列的内嵌 JSON 值对象使用,不参与 SqlSugar 建表与仓储。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserEntity.cs deleted file mode 100644 index b87efbff..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserEntity.cs +++ /dev/null @@ -1,13 +0,0 @@ -using GameFrameX.Entity.System; - -namespace GameFrameX.Entity.Tenant; - -/// -/// 租户库用户表,仅承载普通租户身份与租户管理员账号,必须在明确租户上下文中访问。 -/// -[SugarTable(null, "租户库用户表")] -[TenantTable] -[IncrementTable] -public class TenantUserEntity : SystemUserBase -{ -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Const/OpenAccessScopeConst.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Const/OpenAccessScopeConst.cs index 13598ff4..5b0fff78 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Const/OpenAccessScopeConst.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Const/OpenAccessScopeConst.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Hub.Api.Const; /// /// 应用开放访问凭证接口范围(scope)取值常量。 -/// scope 值为路由前缀(不含 /api/),由 TenantGameAppOpenAccessAuthMiddleware +/// scope 值为路由前缀(不含 /api/),由 GameAppOpenAccessAuthMiddleware /// 按前缀匹配放行;凭证配置入口按自由字符串录入,本常量集只收敛 Hub.Api 已提供的机器端点取值域。 /// public static class OpenAccessScopeConst diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/FeatureSwitchSyncController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/FeatureSwitchSyncController.cs index a74cb943..c3a6c093 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/FeatureSwitchSyncController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/FeatureSwitchSyncController.cs @@ -9,7 +9,7 @@ namespace GameFrameX.Hub.Api.Controllers; /// /// 功能开关服务器同步控制器(C347 Hub 通道)。 -/// 游戏服务器运行时同步通道:机器对机器调用,由 +/// 游戏服务器运行时同步通道:机器对机器调用,由 /// 鉴权(C267 HMAC v2 单头 + nonce 去重 + 时间窗,scope = ), /// 非 JWT,故标记 [AllowAnonymous](C236 起 JWT 默认鉴权由各控制器显式承担,本控制器不参与, /// 与 PackageBuildReportController 同模式)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/PackageBuildReportController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/PackageBuildReportController.cs index 76ef3342..0de204d3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/PackageBuildReportController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Controllers/PackageBuildReportController.cs @@ -1,7 +1,7 @@ using GameFrameX.Core.Const; using GameFrameX.Core.Service; using GameFrameX.Core.BaseInputOutput; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Hub.Api.Dto.PackageBuildReport; using GameFrameX.Hub.Api.Middleware; using Microsoft.AspNetCore.Authorization; @@ -11,17 +11,17 @@ namespace GameFrameX.Hub.Api.Controllers; /// /// 打包上报控制器。 -/// 机器对机器调用(打包机 / CI / 流水线),由 鉴权(非 JWT),故标记 [AllowAnonymous](C236 起 JWT 默认鉴权由各控制器显式 [Authorize] 承担,本控制器不参与)。 +/// 机器对机器调用(打包机 / CI / 流水线),由 鉴权(非 JWT),故标记 [AllowAnonymous](C236 起 JWT 默认鉴权由各控制器显式 [Authorize] 承担,本控制器不参与)。 /// 分包 Id 驱动:查分包解析 PackageName / PlatformCode / ChannelCode,校验分包存在且启用, -/// 资源包 → ,整包 → ,幂等 upsert(存在则更新,否则新增)。 +/// 资源包 → ,整包 → ,幂等 upsert(存在则更新,否则新增)。 /// 遵循 Hub.Api Controller 惯例(Repository 直接操作 Entity,不调 Application Service),故未提层 ScopeValidator / 未复用 Application.RemoteConfig 的 CheckXxxUnique —— Controller 自写归属与查重。 /// [AllowAnonymous] public class PackageBuildReportController : BaseController { - private readonly Repository _packageRepo; - private readonly Repository _assetVersionRepo; - private readonly Repository _releaseVersionRepo; + private readonly Repository _packageRepo; + private readonly Repository _assetVersionRepo; + private readonly Repository _releaseVersionRepo; /// /// 打包上报控制器构造函数。 @@ -30,9 +30,9 @@ public class PackageBuildReportController : BaseController /// 资源包版本仓储。 /// 整包版本仓储。 public PackageBuildReportController( - Repository packageRepo, - Repository assetVersionRepo, - Repository releaseVersionRepo) + Repository packageRepo, + Repository assetVersionRepo, + Repository releaseVersionRepo) { _packageRepo = packageRepo; _assetVersionRepo = assetVersionRepo; @@ -87,7 +87,7 @@ public async Task> Report([FromBody /// /// 资源包版本幂等 upsert(Package + AppVersion + AssetPackageName + Language 命中则更新,否则新增)。 /// - private async Task UpsertAssetVersionAsync(TenantGameAppPackageEntity package, PackageBuildReportRequest input, string language) + private async Task UpsertAssetVersionAsync(GameAppPackageEntity package, PackageBuildReportRequest input, string language) { var existing = await _assetVersionRepo.GetFirstAsync(v => v.Package == package.PackageName @@ -105,7 +105,7 @@ private async Task UpsertAssetVersionAsync(TenantGameAppPackageEntity package, P return; } - var entity = new TenantGameAppAssetPackageVersionEntity + var entity = new GameAppAssetPackageVersionEntity { Package = package.PackageName, Platform = package.PlatformCode, @@ -122,7 +122,7 @@ private async Task UpsertAssetVersionAsync(TenantGameAppPackageEntity package, P /// /// 整包版本幂等 upsert(Package + AppVersion + Language 命中则更新,否则新增)。 /// - private async Task UpsertReleaseVersionAsync(TenantGameAppPackageEntity package, PackageBuildReportRequest input, string language) + private async Task UpsertReleaseVersionAsync(GameAppPackageEntity package, PackageBuildReportRequest input, string language) { var existing = await _releaseVersionRepo.GetFirstAsync(v => v.Package == package.PackageName @@ -138,7 +138,7 @@ private async Task UpsertReleaseVersionAsync(TenantGameAppPackageEntity package, return; } - var entity = new TenantGameAppReleaseVersionEntity + var entity = new GameAppReleaseVersionEntity { Package = package.PackageName, Platform = package.PlatformCode, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Dto/FeatureSwitchSync/FeatureSwitchSyncRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Dto/FeatureSwitchSync/FeatureSwitchSyncRequest.cs index 6b49399a..09ae4582 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Dto/FeatureSwitchSync/FeatureSwitchSyncRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Dto/FeatureSwitchSync/FeatureSwitchSyncRequest.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Hub.Api.Dto.FeatureSwitchSync; /// /// 功能开关服务器同步请求(C347 Hub 通道,机器凭证驱动)。 -/// 应用作用域不可在请求侧声明:由 TenantGameAppOpenAccessAuthMiddleware 按凭证绑定注入 +/// 应用作用域不可在请求侧声明:由 GameAppOpenAccessAuthMiddleware 按凭证绑定注入 /// HttpContext.Items,控制器的查询只取该注入值。 /// public class FeatureSwitchSyncRequest diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/GlobalUsing.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/GlobalUsing.cs index 446aa00f..1be11f49 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/GlobalUsing.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/GlobalUsing.cs @@ -3,7 +3,7 @@ global using GameFrameX.Core.Extension; global using Mapster; global using Microsoft.AspNetCore.Mvc; -global using GameFrameX.Entity.Tenant.Game.Release; +global using GameFrameX.Entity.Business.Game.Release; global using GameFrameX.Entity; global using GameFrameX.Core.Enum; global using GameFrameX.Core.SqlSugar; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Middleware/TenantGameAppOpenAccessAuthMiddleware.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Middleware/GameAppOpenAccessAuthMiddleware.cs similarity index 93% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Middleware/TenantGameAppOpenAccessAuthMiddleware.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Middleware/GameAppOpenAccessAuthMiddleware.cs index 51403894..36d9e3c6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Middleware/TenantGameAppOpenAccessAuthMiddleware.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Middleware/GameAppOpenAccessAuthMiddleware.cs @@ -5,10 +5,10 @@ using GameFrameX.Core.Const; using GameFrameX.Core.Middleware; using GameFrameX.Core.Service.Cache; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SignatureAuth; -using GameFrameX.Entity.Tenant; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business; +using GameFrameX.Entity.Business.Game.App; namespace GameFrameX.Hub.Api.Middleware; @@ -17,7 +17,7 @@ namespace GameFrameX.Hub.Api.Middleware; /// 机器通道独立于 JWT:校验凭证生命周期、HMAC v2、时间窗、nonce 与接口范围, /// 然后绑定主库操作人供审计使用。 /// -public class TenantGameAppOpenAccessAuthMiddleware +public class GameAppOpenAccessAuthMiddleware { private readonly RequestDelegate _next; @@ -28,7 +28,7 @@ public class TenantGameAppOpenAccessAuthMiddleware /// private const int AllowedDriftSeconds = 300; - public TenantGameAppOpenAccessAuthMiddleware(RequestDelegate next) + public GameAppOpenAccessAuthMiddleware(RequestDelegate next) { _next = next; } @@ -40,8 +40,8 @@ public TenantGameAppOpenAccessAuthMiddleware(RequestDelegate next) /// 缓存服务(nonce 去重)。 public async Task InvokeAsync(HttpContext context, SystemCacheService cacheService) { - var credentialRepo = context.RequestServices.GetRequiredService>(); - var userRepo = context.RequestServices.GetRequiredService>(); + var credentialRepo = context.RequestServices.GetRequiredService>(); + var userRepo = context.RequestServices.GetRequiredService>(); // 2. 鉴权头(C267 起单头 Signature: v2;{accessKey};{ts};{nonce};{base64sig},与传输签名规范统一) var signatureHeader = context.Request.Headers[SignatureSpec.SignatureHeader].FirstOrDefault(); @@ -69,7 +69,7 @@ public async Task InvokeAsync(HttpContext context, SystemCacheService cacheServi // C372(GFX-838):开放访问凭证读取边界解密(C371 起库内密文;无前缀明文直通兼容存量行)。 // 实体为本次查询的请求本地实例,改写无副作用;进程级密文缓存兜底,避免每请求 PBKDF2 派生。 - credential.AccessSecret = TenantSecretCrypto.DecryptCached(credential.AccessSecret) ?? string.Empty; + credential.AccessSecret = SecretCrypto.DecryptCached(credential.AccessSecret) ?? string.Empty; // 5. 生命周期校验 if (credential.IsEnabled != true) @@ -137,7 +137,7 @@ public async Task InvokeAsync(HttpContext context, SystemCacheService cacheServi } // 11. 构造 ClaimsPrincipal,供审计列 AOP 与下游授权使用 - var identity = new ClaimsIdentity("TenantGameAppOpenAccess"); + var identity = new ClaimsIdentity("GameAppOpenAccess"); identity.AddClaim(new Claim(ClaimConst.UserId, credential.BindUserId + "")); identity.AddClaim(new Claim(ClaimConst.Account, user.Account ?? string.Empty)); identity.AddClaim(new Claim(ClaimConst.RealName, user.RealName ?? string.Empty)); @@ -193,7 +193,7 @@ internal static bool TryParseSignatureHeader(string? headerValue, out string acc /// 消息串拼装与 HMAC 计算均委托 (全仓唯一实现); /// 比较为字节级恒时(先比长度再 FixedTimeEquals)。 /// - internal static bool VerifySignature(TenantGameAppOpenAccessEntity credential, string method, string path, string canonicalQuery, long timestamp, string nonce, byte[] body, byte[] providedSignature) + internal static bool VerifySignature(GameAppOpenAccessEntity credential, string method, string path, string canonicalQuery, long timestamp, string nonce, byte[] body, byte[] providedSignature) { var message = CanonicalRequestBuilder.BuildV2Message(method, path, canonicalQuery, credential.AccessKey, timestamp, nonce, body); var expected = CanonicalRequestBuilder.HmacSha256(Encoding.UTF8.GetBytes(credential.AccessSecret), message); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Program.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Program.cs index 04f57c4b..2b08398f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Program.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Program.cs @@ -90,11 +90,11 @@ private static void Main(string[] args) app.UseAuthorization(); // 机器凭证、签名和授权范围校验。 app.UseWhen(context => context.Request.Path.StartsWithSegments("/api/PackageBuildReport", StringComparison.OrdinalIgnoreCase), - branch => branch.UseMiddleware()); + branch => branch.UseMiddleware()); // 功能开关服务器同步(C347):游戏服务器机器凭证同步通道,同一 OpenAccess 中间件鉴权(scope = FeatureSwitchSync 路由前缀) app.UseWhen(context => context.Request.Path.StartsWithSegments("/api/" + GameFrameX.Hub.Api.Const.OpenAccessScopeConst.FeatureSwitchSync, StringComparison.OrdinalIgnoreCase), - branch => branch.UseMiddleware()); + branch => branch.UseMiddleware()); app.MapHostHealthChecks(); app.MapControllers(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Services/HubUserAuditHandler.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Services/HubUserAuditHandler.cs index 6f4339f3..a3f5a18d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Services/HubUserAuditHandler.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Services/HubUserAuditHandler.cs @@ -8,7 +8,7 @@ namespace GameFrameX.Hub.Api.Services; /// Hub API 操作人审计 handler:经共享层 SqlSugarClientConfig.AddSqlSugarClientService 的 userAuditHandler /// 挂点接入(ClaimConst 位于 GameFrameX.Core,共享层无法反向引用,故 Hub 差异留在 host 端参数化)。 /// 依据当前 context.User claims 填充 CreatedId / CreatedName(插入)与 UpdatedId / UpdatedName(更新), -/// 修 Hub.Api 既有 CreatedId 恒 0 缺陷;JWT 与 TenantGameAppOpenAccessEntity 机器凭证路径均受益。 +/// 修 Hub.Api 既有 CreatedId 恒 0 缺陷;JWT 与 GameAppOpenAccessEntity 机器凭证路径均受益。 /// 逻辑承接自原 Hub.Api SqlSugarClientConfig(三 host 仓储收敛 C259)。 /// public static class HubUserAuditHandler @@ -26,7 +26,7 @@ public static Action Handle(IHttpContextAccessor httpContextAcc if (entityInfo.OperationType == DataFilterType.InsertByObject) { - // CreatedId / CreatedName(对齐 Core SqlSugarSetup,修 Hub.Api 既有 CreatedId 恒 0 缺陷;JWT 与 TenantGameAppOpenAccessEntity 机器凭证路径均受益) + // CreatedId / CreatedName(对齐 Core SqlSugarSetup,修 Hub.Api 既有 CreatedId 恒 0 缺陷;JWT 与 GameAppOpenAccessEntity 机器凭证路径均受益) if (user != null && entityInfo.PropertyName == nameof(EntityBasic.CreatedId)) { var createdId = ((dynamic)entityInfo.EntityValue).CreatedId; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/DependencyInjection/ProjectDependencyInjectionSetup.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/DependencyInjection/ProjectDependencyInjectionSetup.cs index 6b046131..10af826d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/DependencyInjection/ProjectDependencyInjectionSetup.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/DependencyInjection/ProjectDependencyInjectionSetup.cs @@ -2,7 +2,7 @@ using GameFrameX.Application.Platform.Job; using GameFrameX.Core.Api; using GameFrameX.Core.DependencyInjection; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using Microsoft.Extensions.DependencyInjection; namespace GameFrameX.Web.Api.DependencyInjection; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/ApiEndpointCatalogSync.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/ApiEndpointCatalogSync.cs index d4638df3..97c325a6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/ApiEndpointCatalogSync.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/ApiEndpointCatalogSync.cs @@ -301,7 +301,7 @@ private async Task ReconcileEndpointsAsync(SqlSugarRepository /// 一次性迁移:读 DB global_menu 按钮 Permission(routeName)→ RoutePath → 匹配 api_endpoint → 回填 global_menu_endpoint。 - /// 幂等。**不**读 .g.cs 文件,保证 C43 删源生成器后仍可迁移。**不**动 Id/Key/tenant_role_menu。 + /// 幂等。**不**读 .g.cs 文件,保证 C43 删源生成器后仍可迁移。**不**动 Id/Key/role_menu。 /// private async Task MigrateBindingsFromMenuPermissionAsync( SqlSugarRepository menuRepository, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs index d15ac403..082c5347 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs @@ -84,7 +84,7 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton(); // 对象存储配置 schema 提供器(供 ObjectStorageConfigService 动态渲染和校验) services.AddScoped(); - // 对象存储 Adapter 工厂(单例;供 TenantFileService 与 TestConnectionAsync 端点解析租户存储配置) + // 对象存储 Adapter 工厂(单例;供 FileService 与 TestConnectionAsync 端点解析租户存储配置) services.AddSingleton(); services.AddHttpClient(); services.AddHttpClient(); @@ -104,7 +104,7 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddHostedService(); // 平台密码策略运行时配置(C173):快照由启动加载器填充并镜像同步 CryptogramUtility 密码策略静态属性, - // TenantUserService.ChangePwdAsync 读镜像实现保存后同 Host 动态生效 + // UserService.ChangePwdAsync 读镜像实现保存后同 Host 动态生效 services.AddSingleton(); services.AddHostedService(); // JWT diff --git a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/DefaultObjectStorageAdapterFactory.cs b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/DefaultObjectStorageAdapterFactory.cs index 8647f418..6fce4b14 100644 --- a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/DefaultObjectStorageAdapterFactory.cs +++ b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/DefaultObjectStorageAdapterFactory.cs @@ -5,7 +5,7 @@ namespace GameFrameX.ObjectStorage.Abstract; /// /// 默认对象存储 Adapter 工厂。按 Provider 名返回对应 Adapter 单例, /// 并把租户配置(ConfigJson + 路径模板)解析为运行时上下文。 -/// 在 Web.Core/Startup.cs 以 AddSingleton 手动注册到 DI,供 TenantFileService 与 TestConnection 端点共用。 +/// 在 Web.Core/Startup.cs 以 AddSingleton 手动注册到 DI,供 FileService 与 TestConnection 端点共用。 /// public class DefaultObjectStorageAdapterFactory : IObjectStorageAdapterFactory { diff --git a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/IObjectStorageAdapterFactory.cs b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/IObjectStorageAdapterFactory.cs index 59ac79d3..aa20e521 100644 --- a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/IObjectStorageAdapterFactory.cs +++ b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/IObjectStorageAdapterFactory.cs @@ -2,7 +2,7 @@ namespace GameFrameX.ObjectStorage.Abstract; /// /// 对象存储 Adapter 工厂。按 Provider 名解析 Adapter,并把租户配置(ConfigJson + 路径模板) -/// 解析为运行时上下文。DI 注入;TenantFileService 与 TestConnection 端点共用此工厂。 +/// 解析为运行时上下文。DI 注入;FileService 与 TestConnection 端点共用此工厂。 /// public interface IObjectStorageAdapterFactory { diff --git a/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql b/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql index e8cd775c..7f155248 100644 --- a/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql +++ b/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql @@ -1,4 +1,4 @@ -- GameFrameX Admin 内置 PostgreSQL 初始化:首次启动自动创建主库与默认租户库。 -- 由 docker/postgres/initdb.d 挂载执行(仅数据卷为空时运行一次),账号由 compose 的 POSTGRES_USER 提供。 CREATE DATABASE gameframex_admin; -CREATE DATABASE gameframex_admin_tenant_1300000000001; +CREATE DATABASE gameframex_admin_1300000000001; diff --git a/GameFrameX.Admin.Unified.Api/docs/postman-envelope-pre-request.js b/GameFrameX.Admin.Unified.Api/docs/postman-envelope-pre-request.js index 0b0e3826..8b6be4aa 100644 --- a/GameFrameX.Admin.Unified.Api/docs/postman-envelope-pre-request.js +++ b/GameFrameX.Admin.Unified.Api/docs/postman-envelope-pre-request.js @@ -7,7 +7,7 @@ // 依赖 Postman 环境变量(在 Postman Environment / Collection Variables 里配置): // session_kid 信封 kid(SessionKeyService Add/Rotate 响应的 Kid) // session_key_hex 会话密钥明文(64 位 hex,Add/Rotate 一次性回显;未配置则跳过信封、仅签名) -// sig_key_id v2 签名 keyId(TenantAppSignatureKeyEntity 的 Kid) +// sig_key_id v2 签名 keyId(AppSignatureKeyEntity 的 Kid) // sig_key_secret v2 签名密钥明文(HMAC-SHA256) // // 约定: From 74e897f5caf6c8388e3225778e105205d3395916 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:38:33 +0800 Subject: [PATCH 03/86] =?UTF-8?q?feat(core):=20=E5=88=A0=E9=99=A4=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E8=AF=BB=E5=8A=A8=E4=BD=9C=E5=88=86=E7=B1=BB=E5=99=A8?= =?UTF-8?q?=E4=B8=8E=E9=94=99=E8=AF=AF=E5=93=8D=E5=BA=94=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C406 D10:移除 TenantReadActionClassifier 及其测试(租户过期读放行 门禁已退场,仅剩测试在用);MiddlewareResponseWriter 删除无调用方 的 errorCode 可选参数(唯一消费者 TenantErrorCode.TenantDisabled 已 随租户机制退场),Code 恒为 HTTP 状态码,并改写 XML 注释中的租户 中间件列举。 Linear: GFX-1232 --- .../MiddlewareResponseWriterTests.cs | 24 ++----- .../Tenant/TenantReadActionClassifierTests.cs | 66 ------------------- .../Middleware/MiddlewareResponseWriter.cs | 14 ++-- .../Tenant/TenantReadActionClassifier.cs | 60 ----------------- 4 files changed, 10 insertions(+), 154 deletions(-) delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantReadActionClassifierTests.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantReadActionClassifier.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Middleware/MiddlewareResponseWriterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Middleware/MiddlewareResponseWriterTests.cs index 9b24f651..76e61d8e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Middleware/MiddlewareResponseWriterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Middleware/MiddlewareResponseWriterTests.cs @@ -5,43 +5,27 @@ namespace GameFrameX.Core.Tests.Middleware; /// -/// C270 共享中间件错误响应 writer 行为测试:两种 wire 形态(PascalCase 通用错误 / camelCase 信封码)与 Code 回退语义。 +/// C270 共享中间件错误响应 writer 行为测试:两种 wire 形态(PascalCase 通用错误 / camelCase 信封码)。 /// public sealed class MiddlewareResponseWriterTests { [Fact] - public async Task WriteRejectedAsync_WithoutErrorCode_CodeFallsBackToStatusCode() + public async Task WriteRejectedAsync_PascalCaseShape_CodeEqualsStatusCode() { var context = CreateContext(); - await MiddlewareResponseWriter.WriteRejectedAsync(context, StatusCodes.Status401Unauthorized, "无效的应用 ID"); + await MiddlewareResponseWriter.WriteRejectedAsync(context, StatusCodes.Status401Unauthorized, "无效的签名头"); Assert.Equal(StatusCodes.Status401Unauthorized, context.Response.StatusCode); Assert.Equal("application/json", context.Response.ContentType); using (var document = await ParseBodyAsync(context)) { Assert.Equal(StatusCodes.Status401Unauthorized, document.RootElement.GetProperty("Code").GetInt32()); - Assert.Equal("无效的应用 ID", document.RootElement.GetProperty("Message").GetString()); + Assert.Equal("无效的签名头", document.RootElement.GetProperty("Message").GetString()); Assert.False(document.RootElement.TryGetProperty("code", out _)); } } - [Fact] - public async Task WriteRejectedAsync_WithErrorCode_CodeUsesErrorCode() - { - var context = CreateContext(); - - await MiddlewareResponseWriter.WriteRejectedAsync(context, StatusCodes.Status403Forbidden, "租户已禁用", 30600006); - - Assert.Equal(StatusCodes.Status403Forbidden, context.Response.StatusCode); - Assert.Equal("application/json", context.Response.ContentType); - using (var document = await ParseBodyAsync(context)) - { - Assert.Equal(30600006, document.RootElement.GetProperty("Code").GetInt32()); - Assert.Equal("租户已禁用", document.RootElement.GetProperty("Message").GetString()); - } - } - [Fact] public async Task WriteEnvelopeRejectedAsync_CamelCaseEnvelopeShape() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantReadActionClassifierTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantReadActionClassifierTests.cs deleted file mode 100644 index 2e455500..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/TenantReadActionClassifierTests.cs +++ /dev/null @@ -1,66 +0,0 @@ -using GameFrameX.Core.Service.Tenant; - -namespace GameFrameX.Core.Tests.Tenant; - -/// -/// 固化 只读前缀集合与判定规则。 -/// 扩充只读前缀时必须同步更新本测试,避免「未禁止即放行」的隐性写操作漏判。 -/// -public class TenantReadActionClassifierTests -{ - [Theory] - [InlineData("Get", true)] - [InlineData("GetUser", true)] - [InlineData("Page", true)] - [InlineData("PageAsync", true)] - [InlineData("List", true)] - [InlineData("QueryUsers", true)] - [InlineData("Find", true)] - [InlineData("ExportData", true)] - [InlineData("CheckPermission", true)] - [InlineData("VerifyCode", true)] - [InlineData("Info", true)] - [InlineData("Options", true)] - [InlineData("Tree", true)] - [InlineData("Count", true)] - [InlineData("Exist", true)] - [InlineData("Add", false)] - [InlineData("AddTenant", false)] - [InlineData("Update", false)] - [InlineData("UpdateTenant", false)] - [InlineData("Delete", false)] - [InlineData("Remove", false)] - [InlineData("CreateOrder", false)] - [InlineData("SendEmail", false)] - [InlineData("Publish", false)] - [InlineData("IssueCoupon", false)] // 关键:Is 已被排除,Issue 不会被误判为读 - [InlineData("HashToken", false)] // 关键:Has 已被排除 - [InlineData("Enable", false)] - [InlineData("", false)] - [InlineData(null, false)] - public void IsReadAction_MatchesReadOnlyPrefixes(string? actionName, bool expected) - { - Assert.Equal(expected, TenantReadActionClassifier.IsReadAction(actionName)); - } - - [Fact] - public void IsReadAction_IsCaseInsensitive() - { - Assert.True(TenantReadActionClassifier.IsReadAction("page")); - Assert.True(TenantReadActionClassifier.IsReadAction("GETUSER")); - Assert.False(TenantReadActionClassifier.IsReadAction("DELETE")); - } - - [Fact] - public void ReadPrefixes_AreLocked() - { - // 锁定集合内容,扩充需同步更新本测试(吸收 strict-change lesson:复合扩展点单测固化)。 - var expected = new[] - { - "Get", "Page", "List", "Query", "Find", "Fetch", "Read", "View", - "Info", "Detail", "Tree", "Select", "Option", "Options", - "Check", "Verify", "Export", "Count", "Exist", - }; - Assert.Equal(expected, TenantReadActionClassifier.ReadPrefixes); - } -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs index 9da38a26..c6ef3847 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs @@ -6,9 +6,8 @@ namespace GameFrameX.Core.Middleware; /// (守护测试 MiddlewareErrorResponseWriterGuardTests 锁定防回潮)。 /// 两种 wire 形态(历史契约并存,不可合并为单一形态): /// -/// :PascalCase {Code, Message},未传 errorCode 时 Code 回退 HTTP 状态码 —— -/// Client.Api(AppResolution / PublicCallbackTenantResolution / TenantExpiration)与 Hub.Api(HubTenant / TenantGameAppOpenAccessAuth) -/// 的拒绝出口;errorCode 参数直接消费 C262 统一错误码枚举数值(如 TenantErrorCode.TenantDisabled)。 +/// :PascalCase {Code, Message},Code 恒为 HTTP 状态码 —— +/// Client.Api(PublicCallbackTenantResolution)与 Hub.Api(TenantGameAppOpenAccessAuth)及协议版本中间件的拒绝出口。 /// :camelCase {code, message},601xx 信封码 /// (签名 60101-60103 / 加密信封 60104-60106)—— 与 MVC 主信封 camelCase 一致、客户端 Lua 读 tbErr.code 的双端冻结契约。 /// @@ -16,17 +15,16 @@ namespace GameFrameX.Core.Middleware; public static class MiddlewareResponseWriter { /// - /// 写 PascalCase {Code, Message} JSON 拒绝响应;未传 errorCode 时 Code 回退为 HTTP 状态码。 + /// 写 PascalCase {Code, Message} JSON 拒绝响应;Code 恒等于 。 /// /// HTTP 上下文。 - /// HTTP 状态码(响应状态,兼作 Code 缺省值)。 + /// HTTP 状态码(响应状态,兼作 Code 值)。 /// 拒绝原因。 - /// C262 统一错误码数值(可选;缺省回退 )。 - public static async Task WriteRejectedAsync(HttpContext context, int statusCode, string message, int? errorCode = null) + public static async Task WriteRejectedAsync(HttpContext context, int statusCode, string message) { context.Response.StatusCode = statusCode; context.Response.ContentType = "application/json"; - var result = JsonSerializer.Serialize(new { Code = errorCode ?? statusCode, Message = message, }); + var result = JsonSerializer.Serialize(new { Code = statusCode, Message = message, }); await context.Response.WriteAsync(result); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantReadActionClassifier.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantReadActionClassifier.cs deleted file mode 100644 index 9495e180..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/TenantReadActionClassifier.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace GameFrameX.Core.Service.Tenant; - -/// -/// 租户请求读写动作分类器。 -/// 用于「过期租户禁止写操作、允许读操作」的门禁裁决:action 名命中只读前缀集合判为读并放行,否则判为写并按过期规则拦截。 -/// 策略偏向安全侧——未知 action 默认判为写,漏判只会多挡读、不会漏挡写。 -/// 刻意用方法名前缀而非 HTTP 方法:项目内分页等查询走 POST(如 apiSystemTenantPagePost),用 HTTP 方法会把过期租户的读误判为写。 -/// -public static class TenantReadActionClassifier -{ - /// - /// 只读动作方法名前缀集合(命中即判为读,放行过期租户)。扩充需同步更新 TenantReadActionClassifierTests。 - /// 刻意排除 Is / Has:会误伤 Issue(发放)/ Hash 等写操作。 - /// - public static readonly string[] ReadPrefixes = - { - "Get", - "Page", - "List", - "Query", - "Find", - "Fetch", - "Read", - "View", - "Info", - "Detail", - "Tree", - "Select", - "Option", - "Options", - "Check", - "Verify", - "Export", - "Count", - "Exist", - }; - - /// - /// 判断 action 名是否为只读动作。null/空判为写(安全侧)。 - /// - /// MVC action 方法名(优先 [ApiDescriptionSettings(Name = ...)],否则取 MethodInfo.Name)。 - /// 命中只读前缀返回 true;否则 false。 - public static bool IsReadAction(string? actionName) - { - if (string.IsNullOrWhiteSpace(actionName)) - { - return false; - } - - foreach (var prefix in ReadPrefixes) - { - if (actionName.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) - { - return true; - } - } - - return false; - } -} \ No newline at end of file From 53bf358ca34ce68fd4046dcc5dcc00a17325431e Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:39:22 +0800 Subject: [PATCH 04/86] =?UTF-8?q?refactor(vue):=20=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E4=B8=8E=E5=BA=94=E7=94=A8=E4=BD=9C=E7=94=A8?= =?UTF-8?q?=E5=9F=9F=E8=AF=AD=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除前端数据库 TenantId 列入口、租户绑定显示和租户生命周期选项,清理请求表单中的 AppId 语义。同步五语登录、策略、活动和首页文案,保留区服与 GameApp 业务语义。\n\nLinear: GFX-1232 --- .../src/composables/useEditDialog.ts | 4 ++-- .../src/i18n/pages/client/en.ts | 4 ++-- .../src/i18n/pages/client/ja.ts | 4 ++-- .../src/i18n/pages/client/ko.ts | 4 ++-- .../src/i18n/pages/client/zh-cn.ts | 4 ++-- .../src/i18n/pages/client/zh-tw.ts | 4 ++-- .../src/i18n/pages/gameBusiness/en.ts | 4 ++-- .../src/i18n/pages/gameBusiness/ja.ts | 4 ++-- .../src/i18n/pages/gameBusiness/ko.ts | 4 ++-- .../src/i18n/pages/gameBusiness/zh-cn.ts | 4 ++-- .../src/i18n/pages/gameBusiness/zh-tw.ts | 4 ++-- .../src/i18n/pages/login/en.ts | 2 +- .../src/i18n/pages/login/ja.ts | 2 +- .../src/i18n/pages/login/ko.ts | 2 +- .../src/i18n/pages/login/zh-cn.ts | 2 +- .../src/i18n/pages/login/zh-tw.ts | 2 +- .../src/i18n/pages/system/en.ts | 3 --- .../src/i18n/pages/system/ja.ts | 3 --- .../src/i18n/pages/system/ko.ts | 3 --- .../src/i18n/pages/system/zh-cn.ts | 3 --- .../src/i18n/pages/system/zh-tw.ts | 3 --- .../src/i18n/pages/tenant/appHome/en.ts | 2 +- .../src/i18n/pages/tenant/appHome/ja.ts | 2 +- .../src/i18n/pages/tenant/appHome/ko.ts | 2 +- .../src/i18n/pages/tenant/appHome/zh-cn.ts | 2 +- .../src/i18n/pages/tenant/appHome/zh-tw.ts | 2 +- .../navigationMenu/menuConverter.test.ts | 10 ++++----- .../component/EditDialog.vue | 2 +- .../gameAppOpenAccess/index.vue | 2 -- .../gamePaymentConfigEntity/notifyUrl.test.ts | 2 +- .../gamePaymentConfigEntity/notifyUrl.ts | 2 +- .../component/EditDialog.vue | 2 +- .../release/appReleaseVersion/index.vue | 2 +- .../release/assetPackageVersion/index.vue | 2 -- .../remoteConfig/component/EditDialog.vue | 1 - .../clientDelivery/remoteConfig/index.vue | 2 +- .../serverConfig/component/EditDialog.vue | 1 - .../controlledOperation/commandForm.test.ts | 1 + .../src/views/login/component/loginForm.scss | 2 +- .../src/views/login/index.vue | 2 +- .../system/database/component/AddTable.vue | 22 ------------------- .../src/views/system/openAccess/index.vue | 1 - .../component/EditDialog.vue | 1 - .../system/systemEmailProvider/index.vue | 1 - 44 files changed, 46 insertions(+), 91 deletions(-) diff --git a/GameFrameX.Admin.Unified.Vue/src/composables/useEditDialog.ts b/GameFrameX.Admin.Unified.Vue/src/composables/useEditDialog.ts index 41d1b348..fcd48fa2 100644 --- a/GameFrameX.Admin.Unified.Vue/src/composables/useEditDialog.ts +++ b/GameFrameX.Admin.Unified.Vue/src/composables/useEditDialog.ts @@ -16,7 +16,7 @@ function isNewGameMode(id: unknown): boolean { function isNewSystemMode(id: unknown): boolean { // 雪花 long 的 JSON 形态是字符串(超出 JS 安全整数),正整数字符串同样是已有项; - // 否则菜单/租户等 long 主键行编辑会被误判为新增,提交打到 add 接口报"路由名称重复" + // 否则菜单等 long 主键行编辑会被误判为新增,提交打到 add 接口报"路由名称重复" if (typeof id === 'string') return !/^[1-9]\d*$/.test(id) return !(id != null && typeof id === 'number' && id > 0) } @@ -30,7 +30,7 @@ function extractId(row: unknown): unknown { // 避免 createdTime 等 ISO 字符串污染载荷(后端 long/Int64 解析失败)或审计列被前端覆写。 // UpdateTime 与 UpdatedTime 并存:后端基类 UpdateTime 归一化为 updateTime, // 部分老接口(JobTrigger 等)仍保留 UpdatedTime → updatedTime。 -const AUDIT_FIELDS = ['createdTime', 'createdId', 'createdBy', 'updatedTime', 'updatedId', 'updatedBy', 'updateTime', 'tenantId'] +const AUDIT_FIELDS = ['createdTime', 'createdId', 'createdBy', 'updatedTime', 'updatedId', 'updatedBy', 'updateTime'] const LEGACY_ROW_VERSION_FIELDS = ['version', 'Version'] function stripAuditFields(values: T): T { diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts index ff7e013c..815a84ad 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts @@ -146,9 +146,9 @@ export default { clientApiPolicySectionArea: 'Server Output', clientApiPolicySectionOrder: 'Order / Sandbox', clientApiPolicySigningKey: 'Signing Key', - clientApiPolicySigningKeyHint: 'Leave empty to auto-generate on create; leave empty or keep ****** unchanged on edit. Only the tenant default row (AppId=0) takes effect', + clientApiPolicySigningKeyHint: 'Leave empty to auto-generate on create; leave empty or keep ****** unchanged on edit. Only the default row takes effect', clientApiPolicyLifetimeMinutes: 'Lifetime (minutes)', - clientApiPolicyLifetimeRange: 'Range 1-10080 (7 days); only the tenant default row (AppId=0) takes effect', + clientApiPolicyLifetimeRange: 'Range 1-10080 (7 days); only the default row takes effect', clientApiPolicyLifetimeRequired: 'Please enter lifetime (1-10080)', clientApiPolicyTicketExpireTime: 'Ticket Expire Time', clientApiPolicyTicketExpireHint: 'Empty means never expire; non-empty must be later than now and within 30 days', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts index c14ba7d7..14e321a0 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts @@ -146,9 +146,9 @@ export default { clientApiPolicySectionArea: 'サーバー出力', clientApiPolicySectionOrder: '注文 / サンドボックス', clientApiPolicySigningKey: '署名鍵', - clientApiPolicySigningKeyHint: '追加時は空欄で自動生成;編集時は空欄または ****** のままで変更なし。テナントデフォルト行(AppId=0)のみ有効', + clientApiPolicySigningKeyHint: '追加時は空欄で自動生成;編集時は空欄または ****** のままで変更なし。デフォルト行のみ有効', clientApiPolicyLifetimeMinutes: '有効期限(分)', - clientApiPolicyLifetimeRange: '範囲 1-10080 (7日);テナントデフォルト行(AppId=0)のみ有効', + clientApiPolicyLifetimeRange: '範囲 1-10080 (7日);デフォルト行のみ有効', clientApiPolicyLifetimeRequired: '有効期限を入力してください(1-10080)', clientApiPolicyTicketExpireTime: 'チケット失効時間', clientApiPolicyTicketExpireHint: '空欄は無期限;入力する場合は現在より後かつ最長 30 日', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts index 31d2ad14..1aaa8d6d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts @@ -146,9 +146,9 @@ export default { clientApiPolicySectionArea: '서버 출력', clientApiPolicySectionOrder: '주문 / 샌드박스', clientApiPolicySigningKey: '서명 키', - clientApiPolicySigningKeyHint: '추가 시 비워두면 자동 생성; 편집 시 비워두거나 ****** 를 유지하면 변경 없음. 테넌트 기본 행(AppId=0)만 적용', + clientApiPolicySigningKeyHint: '추가 시 비워두면 자동 생성; 편집 시 비워두거나 ****** 를 유지하면 변경 없음. 기본 행만 적용', clientApiPolicyLifetimeMinutes: '유효기간(분)', - clientApiPolicyLifetimeRange: '범위 1-10080 (7일); 테넌트 기본 행(AppId=0)만 적용', + clientApiPolicyLifetimeRange: '범위 1-10080 (7일); 기본 행만 적용', clientApiPolicyLifetimeRequired: '유효기간을 입력하세요(1-10080)', clientApiPolicyTicketExpireTime: '티켓 만료 시간', clientApiPolicyTicketExpireHint: '비워두면 만료 없음; 입력 시 현재보다 이후이고 최대 30일까지', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts index 7bd63a81..804438c3 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts @@ -146,9 +146,9 @@ export default { clientApiPolicySectionArea: '区服输出', clientApiPolicySectionOrder: '订单 / 沙箱', clientApiPolicySigningKey: '签名密钥', - clientApiPolicySigningKeyHint: '新增留空自动生成;编辑留空或 ****** 保持不变。仅租户默认行(AppId=0)生效', + clientApiPolicySigningKeyHint: '新增留空自动生成;编辑留空或 ****** 保持不变。仅默认行生效', clientApiPolicyLifetimeMinutes: '有效期(分钟)', - clientApiPolicyLifetimeRange: '范围 1-10080 (7 天);仅租户默认行(AppId=0)生效', + clientApiPolicyLifetimeRange: '范围 1-10080 (7 天);仅默认行生效', clientApiPolicyLifetimeRequired: '请输入有效期(1-10080)', clientApiPolicyTicketExpireTime: '票据到期时间', clientApiPolicyTicketExpireHint: '留空表示永不过期;非空必须晚于当前时间且最长 30 天', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts index 7aad07b6..c39c375c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts @@ -146,9 +146,9 @@ export default { clientApiPolicySectionArea: '區服輸出', clientApiPolicySectionOrder: '訂單 / 沙箱', clientApiPolicySigningKey: '簽名密鑰', - clientApiPolicySigningKeyHint: '新增留空自動生成;編輯留空或 ****** 保持不變。僅租戶預設行(AppId=0)生效', + clientApiPolicySigningKeyHint: '新增留空自動生成;編輯留空或 ****** 保持不變。僅預設行生效', clientApiPolicyLifetimeMinutes: '有效期(分鐘)', - clientApiPolicyLifetimeRange: '範圍 1-10080 (7 天);僅租戶預設行(AppId=0)生效', + clientApiPolicyLifetimeRange: '範圍 1-10080 (7 天);僅預設行生效', clientApiPolicyLifetimeRequired: '請輸入有效期(1-10080)', clientApiPolicyTicketExpireTime: '票據到期時間', clientApiPolicyTicketExpireHint: '留空表示永不過期;非空必須晚於當前時間且最長 30 天', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts index b1aad86b..8dae8486 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts @@ -42,7 +42,7 @@ export default { // Current application context (game business pages) - // Config scope (tenant default / app override) + // Configuration scope (default / override) configScope: { gameDefault: 'Default configuration', scope: 'Scope', @@ -364,7 +364,7 @@ export default { addSenderName: 'Add Sender Name', addAttachment: 'Add Attachment', name: 'Campaign Name', - namePlaceholder: 'Enter campaign name (unique per appId+areaId)', + namePlaceholder: 'Enter campaign name (unique per area)', nameRequired: 'Please enter campaign name', areaId: 'Area ID', areaIdRequired: 'Please select area', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts index 71200ceb..032536e7 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts @@ -42,7 +42,7 @@ export default { // Current application context (game business pages) - // Config scope (tenant default / app override) + // 設定スコープ(デフォルト / 上書き) configScope: { gameDefault: '既定の設定', scope: 'スコープ', @@ -364,7 +364,7 @@ export default { addSenderName: '差出人名追加', addAttachment: '添付追加', name: 'キャンペーン名', - namePlaceholder: 'キャンペーン名を入力(appId+areaId 単位で一意)', + namePlaceholder: 'キャンペーン名を入力(エリア単位で一意)', nameRequired: 'キャンペーン名を入力してください', areaId: 'エリア ID', areaIdRequired: 'エリアを選択してください', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts index e428ef74..c44e0393 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts @@ -42,7 +42,7 @@ export default { // Current application context (game business pages) - // Config scope (tenant default / app override) + // 설정 범위(기본 / 재정의) configScope: { gameDefault: '기본 설정', scope: '스코프', @@ -364,7 +364,7 @@ export default { addSenderName: '발신자 이름 추가', addAttachment: '첨부 추가', name: '캠페인 이름', - namePlaceholder: '캠페인 이름 입력 (appId+areaId 단위 고유)', + namePlaceholder: '캠페인 이름 입력 (영역 서버별 고유)', nameRequired: '캠페인 이름을 입력하세요', areaId: '영역 ID', areaIdRequired: '영역을 선택하세요', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts index d4eb2a00..b3693724 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts @@ -42,7 +42,7 @@ export default { // Current application context (game business pages) - // Config scope (tenant default / app override) + // 配置作用域(默认 / 覆盖) configScope: { gameDefault: '默认配置', scope: '作用域', @@ -364,7 +364,7 @@ export default { addSenderName: '添加发件人名称', addAttachment: '添加附件', name: '活动名称', - namePlaceholder: '请输入活动名称(同一 appId+areaId 下唯一)', + namePlaceholder: '请输入活动名称(同一区服下唯一)', nameRequired: '请输入活动名称', areaId: '区服 ID', areaIdRequired: '请选择区服', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts index f04fcded..9757c164 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts @@ -42,7 +42,7 @@ export default { // Current application context (game business pages) - // Config scope (tenant default / app override) + // 配置作用域(預設 / 覆蓋) configScope: { gameDefault: '預設設定', scope: '作用域', @@ -364,7 +364,7 @@ export default { addSenderName: '新增發件人名稱', addAttachment: '新增附件', name: '活動名稱', - namePlaceholder: '請輸入活動名稱(同一 appId+areaId 下唯一)', + namePlaceholder: '請輸入活動名稱(同一區服下唯一)', nameRequired: '請輸入活動名稱', areaId: '區服 ID', areaIdRequired: '請選擇區服', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/en.ts index eb4941b5..9eb3ce4c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/en.ts @@ -7,7 +7,7 @@ export default { forgotHint: 'Lost your credentials? Contact your system administrator', account: { accountLabel: 'Account', - accountPlaceholder: "admin{'@'}tenantId", + accountPlaceholder: "Enter operator account", passwordLabel: 'Password', passwordPlaceholder: '123456', codeLabel: 'Verification code', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ja.ts index 1464dcc6..0859205d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ja.ts @@ -7,7 +7,7 @@ export default { forgotHint: 'ログイン情報を忘れた場合は管理者にお問い合わせください', account: { accountLabel: 'アカウント', - accountPlaceholder: "admin{'@'}tenantId", + accountPlaceholder: "管理者アカウントを入力", passwordLabel: 'パスワード', passwordPlaceholder: '123456', codeLabel: '認証コード', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ko.ts index 43e68018..7bde5ff4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/ko.ts @@ -7,7 +7,7 @@ export default { forgotHint: '로그인 정보를 잊으셨나요? 시스템 관리자에게 문의하세요', account: { accountLabel: '계정', - accountPlaceholder: "admin{'@'}tenantId", + accountPlaceholder: "관리자 계정을 입력하세요", passwordLabel: '비밀번호', passwordPlaceholder: '123456', codeLabel: '인증 코드', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-cn.ts index aa19a2ff..871b6e1f 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-cn.ts @@ -7,7 +7,7 @@ export default { forgotHint: '忘记凭据?请联系系统管理员', account: { accountLabel: '账号', - accountPlaceholder: "admin{'@'}租户ID", + accountPlaceholder: "请输入管理员账号", passwordLabel: '密码', passwordPlaceholder: '123456', codeLabel: '验证码', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-tw.ts index 6681b358..fd92b74a 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/login/zh-tw.ts @@ -7,7 +7,7 @@ export default { forgotHint: '忘記憑證?請聯絡系統管理員', account: { accountLabel: '帳號', - accountPlaceholder: "admin{'@'}租戶ID", + accountPlaceholder: "請輸入管理員帳號", passwordLabel: '密碼', passwordPlaceholder: '123456', codeLabel: '驗證碼', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/en.ts index cb128b85..0a2020b7 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/en.ts @@ -191,10 +191,8 @@ export default { columnInfo: 'Column Info', addPrimaryColumn: 'Add Primary Key Column', addNormalColumn: 'Add Normal Column', - addTenantColumn: 'Add Tenant Column', addBaseColumn: 'Add Base Columns', primaryKeyId: 'Primary Key Id', - tenantId: 'Tenant Id', createTimeDesc: 'Created Time', updateTimeDesc: 'Updated Time', creatorIdDesc: 'Creator Id', @@ -395,7 +393,6 @@ export default { helpView: 'Help', accessSecret: 'Secret Key', bindUserAccount: 'Bound User Account', - bindTenantName: 'Bound Tenant Name', bindUser: 'Bind User', }, // ===== Server module ===== diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ja.ts index 19870996..c6eb4407 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ja.ts @@ -191,10 +191,8 @@ export default { columnInfo: 'カラム情報', addPrimaryColumn: '主キーカラム追加', addNormalColumn: '通常カラム追加', - addTenantColumn: 'テナントカラム追加', addBaseColumn: '基本カラム追加', primaryKeyId: '主キーID', - tenantId: 'テナントID', createTimeDesc: '作成時間', updateTimeDesc: '更新時間', creatorIdDesc: '作成者ID', @@ -392,7 +390,6 @@ export default { helpView: 'ヘルプ', accessSecret: 'シークレットキー', bindUserAccount: 'バインドされたユーザーアカウント', - bindTenantName: 'バインドされたテナント名', bindUser: 'ユーザーバインド', }, // ===== サーバーモジュール ===== diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ko.ts index 22b0963c..f01996b9 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/ko.ts @@ -191,10 +191,8 @@ export default { columnInfo: '컬럼 정보', addPrimaryColumn: '기본키 컬럼 추가', addNormalColumn: '일반 컬럼 추가', - addTenantColumn: '테넌트 컬럼 추가', addBaseColumn: '기본 컬럼 추가', primaryKeyId: '기본키 ID', - tenantId: '테넌트 ID', createTimeDesc: '생성 시간', updateTimeDesc: '수정 시간', creatorIdDesc: '생성자 ID', @@ -392,7 +390,6 @@ export default { helpView: '도움말', accessSecret: '시크릿 키', bindUserAccount: '바인딩된 사용자 계정', - bindTenantName: '바인딩된 테넌트 이름', bindUser: '사용자 바인딩', }, // ===== 서버 모듈 ===== diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-cn.ts index 55bed44f..5f3bdff5 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-cn.ts @@ -191,10 +191,8 @@ export default { columnInfo: '数据列信息', addPrimaryColumn: '新增主键字段', addNormalColumn: '新增普通字段', - addTenantColumn: '新增租户字段', addBaseColumn: '新增基础字段', primaryKeyId: '主键Id', - tenantId: '租户Id', createTimeDesc: '创建时间', updateTimeDesc: '更新时间', creatorIdDesc: '创建人Id', @@ -395,7 +393,6 @@ export default { helpView: '帮助说明', accessSecret: '密钥', bindUserAccount: '绑定用户账号', - bindTenantName: '绑定租户名称', bindUser: '绑定用户', }, // ===== Server module ===== diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-tw.ts index 6dff66cd..c5d40a5b 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/system/zh-tw.ts @@ -191,10 +191,8 @@ export default { columnInfo: '數據列資訊', addPrimaryColumn: '新增主鍵欄位', addNormalColumn: '新增普通欄位', - addTenantColumn: '新增租戶欄位', addBaseColumn: '新增基礎欄位', primaryKeyId: '主鍵Id', - tenantId: '租戶Id', createTimeDesc: '創建時間', updateTimeDesc: '更新時間', creatorIdDesc: '創建人Id', @@ -395,7 +393,6 @@ export default { helpView: '幫助說明', accessSecret: '密鑰', bindUserAccount: '綁定用戶帳號', - bindTenantName: '綁定租戶名稱', bindUser: '綁定用戶', }, // ===== Server module ===== diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/en.ts index 523ace26..374392d4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/en.ts @@ -1,4 +1,4 @@ -// Defined content (APP cockpit = tenant home after selecting an app) +// Defined content (single-game operations home) export default { appHome: { kpiOnline: 'Online · THIS APP', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ja.ts index edaaabc7..0caa71ac 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ja.ts @@ -1,4 +1,4 @@ -// 定義内容(APP-コックピット=テナントがアプリ選択後の運用ホーム) +// 定義内容(単一ゲーム運用ホーム) export default { appHome: { kpiOnline: 'アプリオンライン · ONLINE', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ko.ts index 1ca14d4f..df20111d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ko.ts @@ -1,4 +1,4 @@ -// 정의 내용 (APP-콕핏=테넌트가 앱 선택 후의 운영 홈) +// 정의 내용 (단일 게임 운영 홈) export default { appHome: { kpiOnline: '앱 온라인 · ONLINE', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-cn.ts index f0949573..ac326023 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-cn.ts @@ -1,4 +1,4 @@ -// 定义内容(APP-驾驶舱=租户选定应用后的运营首页) +// 定义内容(单游戏运营首页) export default { appHome: { kpiOnline: '应用在线 · ONLINE', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-tw.ts index 858a7646..31458976 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-tw.ts @@ -1,4 +1,4 @@ -// 定義內容(APP-駕駛艙=租戶選定應用後的運營首頁) +// 定義內容(單一遊戲運營首頁) export default { appHome: { kpiOnline: '應用在線 · ONLINE', diff --git a/GameFrameX.Admin.Unified.Vue/src/layout/navigationMenu/menuConverter.test.ts b/GameFrameX.Admin.Unified.Vue/src/layout/navigationMenu/menuConverter.test.ts index 50f3d47d..f039951e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/layout/navigationMenu/menuConverter.test.ts +++ b/GameFrameX.Admin.Unified.Vue/src/layout/navigationMenu/menuConverter.test.ts @@ -3,13 +3,13 @@ import {convertRoutesToMenuItems} from './menuConverter'; vi.mock('../../i18n/index', () => ({t: (key: string) => key})); -test('直接保留后端菜单树,不再根据旧应用作用域筛选菜单', () => { +test('直接保留后端菜单树,不进行旧作用域元数据筛选', () => { const routes = [ - {path: '/dashboard', meta: {title: 'Overview', menuContext: 'tenantShell'}, children: [ - {path: '/dashboard/home', meta: {title: 'Home', appScope: 'console'}}, + {path: '/dashboard', meta: {title: 'Overview'}, children: [ + {path: '/dashboard/home', meta: {title: 'Home'}}, ]}, - {path: '/serverCenter', meta: {title: 'Servers', menuContext: 'retiredContext'}, children: [ - {path: '/serverCenter/gameAreaEntity', meta: {title: 'Areas', appScope: 'app'}}, + {path: '/serverCenter', meta: {title: 'Servers'}, children: [ + {path: '/serverCenter/gameAreaEntity', meta: {title: 'Areas'}}, {path: '/serverCenter/hidden', meta: {isHide: true}}, ]}, ]; diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/component/EditDialog.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/component/EditDialog.vue index 7e323855..167287e4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/component/EditDialog.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/component/EditDialog.vue @@ -146,7 +146,7 @@ const wrappedUpdateApi = async (payload: any) => { await gameAppOpenAccessUpdatePost(payload) } -// ---- 加载租户用户列表 ---- +// ---- 加载绑定用户列表 ---- const loadUsers = async () => { try { const res: any = await tenantUserPagePost({ page: 1, pageSize: MAX_PAGE_SIZE }) diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/index.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/index.vue index 9501f24d..e40733d8 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/index.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gameAppOpenAccess/index.vue @@ -214,8 +214,6 @@ const actions = { delete: onDelete, } -// ---- 路由应用切换 ---- - onMounted(() => { onQuery() }) diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.test.ts b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.test.ts index ec630a25..61248e6b 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.test.ts +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.test.ts @@ -75,7 +75,7 @@ test('buildNotifyUrl omits packageId segment when missing, zero, or empty', () = expect(buildNotifyUrl({ ...base, packageId: undefined })).toBe('/api/gameOrder/notifyApple') }) -test('buildNotifyUrl omits tenant and app path segments', () => { +test('buildNotifyUrl uses the canonical callback path without retired scope segments', () => { const url = buildNotifyUrl({ payChannel: 'alipay' }) expect(url).toBe('/api/gameOrder/notifyAliPay') }) diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.ts b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.ts index 5b7d8f77..7a0d46cc 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.ts +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.ts @@ -7,7 +7,7 @@ * 其中 `{action}` 为 lowerCamelCase(`notifyApple` 等)。后端为 `BaseController` token 路由 * `api/[controller]/[action]`,ASP.NET Core literal 路由段匹配大小写不敏感(C298 已实测: * 小写 / PascalCase 回调 URL 均命中路由),故前端统一输出小写 camel 规范形态, - * 不要求与后端 action 方法名逐字符一致。公开回调只从 URL 路由段解析租户上下文, + * 不要求与后端 action 方法名逐字符一致。公开回调只从 URL 路由段解析业务上下文, * 不得退化回旧 `/client/gameOrder/...` 或 query 形式。 * * 本文件不依赖任何 `/@/` 别名或 Vue 运行时,可被 node:test 直接加载(Node 24 原生 type stripping)。 diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/component/EditDialog.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/component/EditDialog.vue index ed796d94..673520b2 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/component/EditDialog.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/component/EditDialog.vue @@ -146,7 +146,7 @@ const beforeOpen = (form: any, isEditor: boolean) => { return form } -// 切换应用:清空包名并按新应用重载候选,避免保留其它应用的包。 +// 清空包名并重新加载候选,避免保留无关包。 const openDialog = (row: any) => { dialogRef.value.openDialog(row) diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/index.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/index.vue index c8d89693..3dccb030 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/index.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/appReleaseVersion/index.vue @@ -162,7 +162,7 @@ const actions = { delete: onDelete, } -// 切换应用:清空包名筛选并按新应用重载包名候选,避免残留其它应用的包。 +// 载入包名候选并保持当前筛选值。 onLanguageQuery() onPackageQuery() diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/assetPackageVersion/index.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/assetPackageVersion/index.vue index 978c6f36..79c9f509 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/assetPackageVersion/index.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/release/assetPackageVersion/index.vue @@ -216,8 +216,6 @@ const onQuerySelectorAssetPackageName = async () => { querySelectorParams.value.assetPackageName = res.data.data } -// 切换应用:清空包名筛选并按新应用重载包名候选,避免残留其它应用的包。 - onQuerySelectorChannel() onQuerySelectorPlatform() onQuerySelectorAppVersion() diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/component/EditDialog.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/component/EditDialog.vue index 7fd04c4a..31d53b29 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/component/EditDialog.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/component/EditDialog.vue @@ -174,7 +174,6 @@ const openDialog = async (row: any) => { } const beforeSubmit = (ruleForm: any) => { - delete ruleForm.appId ruleForm.content = ruleForm.content || '{}' ruleForm.modeContents = ruleForm.modeContents || '{}' ruleForm.isEnabled = ruleForm.isEnabled !== false diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/index.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/index.vue index 04bf9de4..19f425a5 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/index.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/remoteConfig/index.vue @@ -160,7 +160,7 @@ const onVersionQuery = async () => { } // 包名候选按当前应用加载:gameAppPackageListGet 已按应用过滤、默认包置顶。 -// 当前应用未确认时不展示候选,避免展示其它应用包名。 +// 当前产品未确认时不展示候选,避免展示无关包名。 const buildPackageOptions = (packages: any[]) => { const options: any[] = [{label: t('message.client.appDefaultPackage'), value: 'default'}] for (const p of packages || []) { diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/serverConfig/component/EditDialog.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/serverConfig/component/EditDialog.vue index ab2859f6..d5d3df02 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/serverConfig/component/EditDialog.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/serverConfig/component/EditDialog.vue @@ -73,7 +73,6 @@ const openDialog = (row: any) => { } const beforeSubmit = (ruleForm: any) => { - delete ruleForm.appId ruleForm.enabled = ruleForm.enabled !== false ruleForm.description = ruleForm.description ?? '' try { diff --git a/GameFrameX.Admin.Unified.Vue/src/views/gmCenter/controlledOperation/commandForm.test.ts b/GameFrameX.Admin.Unified.Vue/src/views/gmCenter/controlledOperation/commandForm.test.ts index fe8b3879..d4d9bd51 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/gmCenter/controlledOperation/commandForm.test.ts +++ b/GameFrameX.Admin.Unified.Vue/src/views/gmCenter/controlledOperation/commandForm.test.ts @@ -105,6 +105,7 @@ test('请求组装:command 数字 + 恰好一个目标字段 + 开关型带 di }), ) expect(req.command).toBe(3) + // 负向契约:运营命令出站请求不得携带已删除的 AppId 作用域字段。 expect('appId' in req).toBe(false) expect(req.serverId).toBe('srv-1') expect(req.playerId).toBe('player-100') diff --git a/GameFrameX.Admin.Unified.Vue/src/views/login/component/loginForm.scss b/GameFrameX.Admin.Unified.Vue/src/views/login/component/loginForm.scss index 31e002be..5c25dca1 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/login/component/loginForm.scss +++ b/GameFrameX.Admin.Unified.Vue/src/views/login/component/loginForm.scss @@ -59,7 +59,7 @@ caret-color: var(--p-primary-color); // Chromium 截断 placeholder 跟随 input 自身的 text-overflow(伪元素上设置无效): - // 长占位文案(账号@租户ID 格式提示)窄屏省略号截断,避免拦腰断字。 + // 长账号提示在窄屏使用省略号截断,避免拦腰断字。 // InputText 根即 input;Password 的 input 是后代——两种形态都覆盖 overflow: hidden; text-overflow: ellipsis; diff --git a/GameFrameX.Admin.Unified.Vue/src/views/login/index.vue b/GameFrameX.Admin.Unified.Vue/src/views/login/index.vue index e4368bed..963df28f 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/login/index.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/login/index.vue @@ -141,7 +141,7 @@ onMounted(async () => { captchaEnabled: res?.data?.data?.captchaEnabled === true, }; superAdminNeedsSetup.value = res?.data?.data?.superAdminPasswordConfigured === false; - // 首装零门槛:超管密码未初始化时直接落到初始化面(租户用户可点「返回登录」正常登录) + // 首装零门槛:管理员密码未初始化时直接落到初始化面(其他管理员可点「返回登录」正常登录) if (superAdminNeedsSetup.value) { switchMode('setup'); } diff --git a/GameFrameX.Admin.Unified.Vue/src/views/system/database/component/AddTable.vue b/GameFrameX.Admin.Unified.Vue/src/views/system/database/component/AddTable.vue index 990de6ee..4d76b662 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/system/database/component/AddTable.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/system/database/component/AddTable.vue @@ -96,10 +96,6 @@ {{ t('system.database.addNormalColumn') }} - public enum GameHomeErrorCode { - /// - /// 首页读数仅租户上下文可用 - /// - [ErrorText("首页读数仅租户上下文可用:请以租户管理员登录,或由平台管理员显式切换目标租户后重试", "Home metrics require a tenant context: sign in as a tenant administrator, or switch the target tenant explicitly")] - TenantContextRequired = 60500001, - /// /// 目标租户库连接不可用 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OpenAccessErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OpenAccessErrorCode.cs index ce4071cf..da15e475 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OpenAccessErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OpenAccessErrorCode.cs @@ -12,15 +12,9 @@ public enum OpenAccessErrorCode IdentityAlreadyExists = 31300001, /// - /// 应用不存在或不属于当前租户 + /// 绑定用户不存在 /// - [ErrorText("应用不存在或不属于当前租户", "App does not exist or does not belong to the current tenant")] - AppNotFoundOrNotOwned = 31300002, - - /// - /// 绑定用户不存在或不属于当前租户 - /// - [ErrorText("绑定用户不存在或不属于当前租户", "Bound user does not exist or does not belong to the current tenant")] + [ErrorText("绑定用户不存在", "Bound user does not exist")] BoundUserNotFoundOrNotOwned = 31300003, /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OrganizationErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OrganizationErrorCode.cs deleted file mode 100644 index 20b62cad..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OrganizationErrorCode.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace GameFrameX.Core.Enum.Errors; - -/// -/// Admin 组织架构错误码(段 307,见 ;C265 自旧 D 码体系平移)。 -/// -public enum OrganizationErrorCode -{ - /// - /// 上级组织不存在 - /// - [ErrorText("上级组织不存在", "Parent organization does not exist")] - ParentOrganizationNotFound = 30700001, - - /// - /// 当前组织Id不能与上级组织Id相同 - /// - [ErrorText("当前组织Id不能与上级组织Id相同", "Organization ID cannot equal its parent ID")] - OrganizationIdEqualsParentForbidden = 30700002, - - /// - /// 已有相同运营组织,编码或名称相同 - /// - [ErrorText("已有相同运营组织,编码或名称相同", "An organization with the same code or name already exists")] - OrganizationAlreadyExists = 30700003, - - /// - /// 没有权限操作组织 - /// - [ErrorText("没有权限操作组织", "No permission to operate on the organization")] - NoPermissionForOrganizationOperation = 30700004, - - /// - /// 该组织下有用户禁止删除 - /// - [ErrorText("该组织下有用户禁止删除", "The organization has users and cannot be deleted")] - OrganizationHasUsersDeleteForbidden = 30700005, - - /// - /// 附属组织下有用户禁止删除 - /// - [ErrorText("附属组织下有用户禁止删除", "The affiliated organization has users and cannot be deleted")] - AffiliatedOrganizationHasUsersDeleteForbidden = 30700006, - - /// - /// 下级组织下有用户禁止删除 - /// - [ErrorText("下级组织下有用户禁止删除", "The child organization has users and cannot be deleted")] - ChildOrganizationHasUsersDeleteForbidden = 30700007, - - /// - /// 租户默认组织禁止删除 - /// - [ErrorText("租户默认组织禁止删除", "The tenant default organization cannot be deleted")] - TenantDefaultOrganizationDeleteForbidden = 30700008, - - /// - /// 禁止增加根节点组织 - /// - [ErrorText("禁止增加根节点组织", "Creating root organizations is forbidden")] - RootOrganizationCreateForbidden = 30700009, -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/PositionErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/PositionErrorCode.cs deleted file mode 100644 index eafb6b5e..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/PositionErrorCode.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace GameFrameX.Core.Enum.Errors; - -/// -/// Admin 职位错误码(段 309,见 ;C265 自旧 D 码体系平移)。 -/// -public enum PositionErrorCode -{ - /// - /// 已存在同名或同编码职位 - /// - [ErrorText("已存在同名或同编码职位", "A position with the same name or code already exists")] - PositionAlreadyExists = 30900001, - - /// - /// 该职位下有用户禁止删除 - /// - [ErrorText("该职位下有用户禁止删除", "The position has users and cannot be deleted")] - PositionHasUsersDeleteForbidden = 30900002, - - /// - /// 无权修改本职位 - /// - [ErrorText("无权修改本职位", "No permission to modify this position")] - NoPermissionForPosition = 30900003, - - /// - /// 职位不存在 - /// - [ErrorText("职位不存在", "Position does not exist")] - PositionNotFound = 30900004, -} \ No newline at end of file From 4fe31c04e99fbf3fcf63165a0398dd4f80d835ea Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:42:55 +0800 Subject: [PATCH 14/86] =?UTF-8?q?refactor(core):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E9=9B=B6=E5=BC=95=E7=94=A8=E7=9A=84=E7=A7=9F=E6=88=B7=E4=B8=8E?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E7=BC=93=E5=AD=98=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CacheConst.KeyTenant 与 KeyUserOrganization 无任何消费方(组织机制 已退场),按 D1 处理原则删除。 Linear: GFX-1232 --- .../GameFrameX.Core/Const/CacheConst.cs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs index c60a412c..fdf93aa3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs @@ -20,11 +20,6 @@ public sealed class CacheConst /// public const string KeyUserButton = "cache:user_button:"; - /// - /// 用户机构缓存 - /// - public const string KeyUserOrganization = "cache:user_org:"; - /// /// 角色最大数据范围缓存 /// @@ -40,11 +35,6 @@ public sealed class CacheConst /// public const string KeyVerCode = "cache:ver_code:"; - /// - /// 租户缓存 - /// - public const string KeyTenant = "cache:tenant"; - /// /// 常量下拉框 /// From 035399f25f8e4bdcaa450503ffc59b4c6520a561 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:43:11 +0800 Subject: [PATCH 15/86] =?UTF-8?q?docs(gm-center):=20=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E6=B3=A8=E9=87=8A=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C406 D2.3:GmCenter 五处注释中的「仅同步 TenantAdmin」统一改为 「仅同步管理员角色」;核查确认无逻辑依赖租户管理员角色概念 (ShouldSyncToRole 无生产定义、无 TenantAdmin 角色种子)。 Linear: GFX-1232 --- .../GmCenter/Asset/OnlineAssetGrantCommandService.cs | 2 +- .../GmCenter/Console/Dto/OnlineControlledCommandRequest.cs | 2 +- .../GmCenter/Console/OnlineControlledCommandService.cs | 2 +- .../GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs | 2 +- .../GmCenter/Social/OnlinePenaltyLinkCommandService.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs index f63d13b9..8650e912 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/OnlineAssetGrantCommandService.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.GmCenter.Asset; /// -/// Online 资产人工发放/撤销受限命令服务(高危;权限码 onlineAssetGrantCommand:grant / :revoke 仅同步 TenantAdmin)。 +/// Online 资产人工发放/撤销受限命令服务(高危;权限码 onlineAssetGrantCommand:grant / :revoke 仅同步管理员角色)。 /// /// 路由前缀 /api/onlineAssetGrantCommand(change C340 / vault:C4 S3.6「Admin 人工发放或撤销」六类来源之一)。 /// 经 调 Online Grant API——Admin 侧零直写(守护测试 OnlineAssetCommandWhitelistTests); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs index 39c859fd..b8ab9bfa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineControlledCommandRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.GmCenter.Console.Dto; /// /// 受控操作命令输入参数(高危端点;change C344 / vault:C9 S8.1)。 /// -/// 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 TenantAdmin),Reason 与 +/// 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步管理员角色),Reason 与 /// ReviewerOperatorId 对全部四命令必填——双人复核字段落地 vault「审批(如需)」,不做通用审批流。 /// 目标标识按命令取值:CancelTicket → TicketId;EndAbnormalMatch → MatchId;SuspendResumePlayer / MatchIsolation → PlayerId。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs index 98369bb3..e8864452 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineControlledCommandService.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.GmCenter.Console; /// -/// Online 控制台受控操作命令服务(高危;权限码 onlineControlledCommand:execute 仅同步 TenantAdmin)。 +/// Online 控制台受控操作命令服务(高危;权限码 onlineControlledCommand:execute 仅同步管理员角色)。 /// /// 路由前缀 /api/onlineControlledCommand(change C344 / vault:C9 S8.1)。 /// 只承载四条新命令( 严格四值),经 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs index 6df9a7cc..eee8acc3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlinePenaltyLinkRequest.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Application.GmCenter.Social.Dto; /// -/// 处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。 +/// 处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步管理员角色)。 /// 作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。 /// public class OnlinePenaltyLinkRequest diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs index 43827867..2cd1435e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Application.GmCenter.Social; /// -/// Online 处罚联动命令服务(高危;权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。 +/// Online 处罚联动命令服务(高危;权限码 onlinePenaltyLinkCommand:execute 仅同步管理员角色)。 /// /// 路由前缀 /api/onlinePenaltyLinkCommand(change C350 / vault:C7、vault:C2 S1.4)。 /// 经 调 Online 显式命令接口(踢下线 / 吊销 Token / 禁言,三命令硬白名单,X3 红线); From 9b913f342910f837384190d5f55839798d615c6c Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:47:13 +0800 Subject: [PATCH 16/86] =?UTF-8?q?refactor:=20D5=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=20AppScope=20=E5=88=97=E4=B8=8E=20D10=20?= =?UTF-8?q?=E6=97=A5=E5=BF=97=20TenantId=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除 GlobalMenuEntity.AppScope、MenuAppScopeEnum、全部种子 AppScope 赋值、 MenuSeedDefinition/Catalog 校验、GlobalMenuResponse 与 SystemMenuMetaResponse 输出; 删除 LogDiffFields/LogVisitFields 的历史租户标识列(原 TenantId,机械改名后为 Id); 对应 schema 演进与初始化测试同步收口。EnumContractTests 哈希随后统一重算。 Linear: GFX-1232 --- .../System/GlobalMenuSeedData.AppCenter.cs | 32 ------------------- .../System/GlobalMenuSeedData.Automation.cs | 1 - .../System/GlobalMenuSeedData.Content.cs | 8 ----- .../System/GlobalMenuSeedData.Dashboard.cs | 2 -- .../System/GlobalMenuSeedData.GlobalConfig.cs | 5 --- .../System/GlobalMenuSeedData.Goods.cs | 3 -- .../System/GlobalMenuSeedData.Online.cs | 9 ------ .../System/GlobalMenuSeedData.OnlineMatch.cs | 3 -- .../System/GlobalMenuSeedData.OnlineSocial.cs | 2 -- .../GlobalMenuSeedData.OperationsRoots.cs | 6 ---- .../SeedData/System/GlobalMenuSeedData.Ops.cs | 3 -- .../System/GlobalMenuSeedData.Platform.cs | 12 ------- .../System/GlobalMenuSeedData.Player.cs | 5 --- .../System/GlobalMenuSeedData.RedeemCode.cs | 3 -- .../GlobalMenuSeedData.RewardTemplate.cs | 9 +++--- .../System/GlobalMenuSeedData.ServerMerge.cs | 1 - .../GlobalMenuSeedData.ServerProvision.cs | 1 - .../System/GlobalMenuSeedData.System.cs | 12 ------- .../System/GlobalMenuSeedData.TrustCenter.cs | 5 --- .../System/GlobalMenuSeedData.WebShop.cs | 2 -- .../Online/Asset/OnlineAssetMenuSeedTests.cs | 2 -- .../Console/OnlineConsoleMenuSeedTests.cs | 1 - .../CodeFirstSchemaEvolutionPostgresTests.cs | 4 +-- .../SqlSugarDatabaseInitializationTests.cs | 10 +++--- .../GlobalMenuSeedAudiencePrefixGuardTests.cs | 1 - .../System/MenuOutputScopeTests.cs | 6 ++-- .../Const/MenuSeed/MenuSeedCatalog.cs | 8 +---- .../Const/MenuSeed/MenuSeedDefinition.cs | 3 +- .../Service/Menu/Dto/GlobalMenuResponse.cs | 4 --- .../Menu/Dto/SystemMenuMetaResponse.cs | 4 --- .../Service/Menu/SystemMenuMapper.cs | 1 - .../Enum/MenuAppScopeEnum.cs | 12 ------- .../Global/GlobalMenuEntity.cs | 5 --- .../GameFrameX.Entity/Log/LogDiffFields.cs | 4 --- .../GameFrameX.Entity/Log/LogVisitFields.cs | 4 --- 35 files changed, 13 insertions(+), 180 deletions(-) delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/MenuAppScopeEnum.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs index e617f3df..e8073213 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs @@ -46,7 +46,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "serverConfig", Path = "/clientDelivery/serverConfig", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/serverConfig/index", Redirect = null, Permission = null, @@ -75,7 +74,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "featureSwitch", Path = "/clientDelivery/featureSwitch", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/featureSwitch/index", Redirect = null, Permission = null, @@ -104,7 +102,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "remoteConfig", Path = "/clientDelivery/remoteConfig/config", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/remoteConfig/index", Redirect = null, Permission = null, @@ -133,7 +130,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "configKey", Path = "/clientDelivery/remoteConfig/configKey", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/remoteConfig/contentKeyConfig/index", Redirect = null, Permission = null, @@ -162,7 +158,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "configMode", Path = "/clientDelivery/remoteConfig/configMode", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/remoteConfig/modeConfig/index", Redirect = null, Permission = null, @@ -191,7 +186,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "device", Path = "/clientDelivery/device/deviceList", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/device/device/index", Redirect = null, Permission = null, @@ -220,7 +214,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "deviceGroup", Path = "/clientDelivery/device/deviceGroup", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/device/group/index", Redirect = null, Permission = null, @@ -249,7 +242,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameAppAssetPackage", Path = "/clientDelivery/resource/assetPackage", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/resource/assetPackage/index", Redirect = null, Permission = null, @@ -278,7 +270,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "channelDefinition", Path = "/clientDelivery/channelDefinition", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/channelDefinition/index", Redirect = null, Permission = null, @@ -307,7 +298,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameAppReleaseVersion", Path = "/clientDelivery/release/appReleaseVersion", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/release/appReleaseVersion/index", Redirect = null, Permission = null, @@ -336,7 +326,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameAppAssetPackageVersion", Path = "/clientDelivery/release/assetPackageVersion", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/release/assetPackageVersion/index", Redirect = null, Permission = null, @@ -365,7 +354,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameAppVersionDefinition", Path = "/clientDelivery/release/versionDefinition", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/release/versionDefinition/index", Redirect = null, Permission = null, @@ -2074,7 +2062,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameAppOpenAccess", Path = "/clientDelivery/gameAppOpenAccess", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/gameAppOpenAccess/index", Redirect = null, Permission = null, @@ -2327,7 +2314,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameAppPackage", Path = "/clientDelivery/gameAppPackage", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/gameAppPackage/index", Redirect = null, Permission = null, @@ -2552,7 +2538,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Dir, Name = "gameAppRelease", Path = "/clientDelivery/release", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -2581,7 +2566,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Dir, Name = "gameAppResource", Path = "/clientDelivery/resource", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -2610,7 +2594,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Dir, Name = "appRuntimeConfig", Path = "/clientDelivery/runtimeConfig", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -2639,7 +2622,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Dir, Name = "deviceManagement", Path = "/clientDelivery/device", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -2808,7 +2790,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Dir, Name = "appIntegrationConfig", Path = "/clientDelivery/integrationConfig", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -2837,7 +2818,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gamePaymentConfigEntity", Path = "/clientDelivery/gamePaymentConfigEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/gamePaymentConfigEntity/index", Redirect = null, Permission = null, @@ -3036,7 +3016,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "advertisementCallbackConfigEntity", Path = "/clientDelivery/advertisementCallbackConfigEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/advertisementCallbackConfigEntity/index", Redirect = null, Permission = null, @@ -3067,7 +3046,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameAdvertisementRewardEntity", Path = "/clientDelivery/gameAdvertisementRewardEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/gameAdvertisementRewardEntity/index", Redirect = null, Permission = null, @@ -3380,7 +3358,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Dir, Name = "clientApiConfig", Path = "/clientDelivery/clientApiConfig", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -3409,7 +3386,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "clientApiPolicyEntity", Path = "/clientDelivery/clientApiPolicyEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/clientApiPolicyEntity/index", Redirect = null, Permission = null, @@ -3438,7 +3414,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Button, Name = null, Path = null, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.PageAsync)), @@ -3467,7 +3442,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Button, Name = null, Path = null, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.AddAsync)), @@ -3496,7 +3470,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Button, Name = null, Path = null, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.UpdateAsync)), @@ -3525,7 +3498,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Button, Name = null, Path = null, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.RotateAsync)), @@ -3554,7 +3526,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Button, Name = null, Path = null, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.DeleteAsync)), @@ -3583,7 +3554,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameLoginTicketKeyEntity", Path = "/clientDelivery/gameLoginTicketKeyEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/gameLoginTicketKeyEntity/index", Redirect = null, Permission = null, @@ -3668,7 +3638,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "appSignatureKeyEntity", Path = "/clientDelivery/appSignatureKeyEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/appSignatureKeyEntity/index", Redirect = null, Permission = null, @@ -3783,7 +3752,6 @@ private static IEnumerable AppCenterMenus() Type = MenuTypeEnum.Menu, Name = "sessionKeyEntity", Path = "/clientDelivery/sessionKeyEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/clientDelivery/sessionKeyEntity/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs index 87fbe43b..57c43163 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Automation.cs @@ -25,7 +25,6 @@ private static IEnumerable AutomationMenus() Type = MenuTypeEnum.Menu, Name = "gameTimeJobEntity", Path = "/system/gameTimeJobEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/system/gameTimeJobEntity/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs index 1cd8d886..039e34b9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Content.cs @@ -30,7 +30,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Menu, Name = "gameAnnouncementEntity", Path = "/noticeCenter/announcement/gameAnnouncementEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/noticeCenter/announcement/gameAnnouncementEntity/index", Redirect = null, Permission = null, @@ -59,7 +58,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Menu, Name = "gameBannerAnnouncementEntity", Path = "/noticeCenter/announcement/gameBannerAnnouncementEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/noticeCenter/announcement/gameBannerAnnouncementEntity/index", Redirect = null, Permission = null, @@ -88,7 +86,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Dir, Name = "announcement", Path = "/noticeCenter/announcement", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -117,7 +114,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Dir, Name = "mail", Path = "/noticeCenter/mail", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -146,7 +142,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Menu, Name = "gameMailEntity", Path = "/noticeCenter/mail/gameMailEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/noticeCenter/mail/gameMailEntity/index", Redirect = null, Permission = null, @@ -175,7 +170,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Menu, Name = "gameMailTemplateEntity", Path = "/noticeCenter/mail/gameMailTemplateEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/noticeCenter/mail/gameMailTemplateEntity/index", Redirect = null, Permission = null, @@ -204,7 +198,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Menu, Name = "gameMailTemplateCategoryEntity", Path = "/noticeCenter/mail/gameMailTemplateCategoryEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/noticeCenter/mail/gameMailTemplateCategoryEntity/index", Redirect = null, Permission = null, @@ -233,7 +226,6 @@ private static IEnumerable ContentMenus() Type = MenuTypeEnum.Menu, Name = "mailCampaign", Path = "/noticeCenter/mail/mailCampaignEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/noticeCenter/mail/mailCampaignEntity/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs index f8baa343..c82514a0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Dashboard.cs @@ -24,7 +24,6 @@ private static IEnumerable DashboardMenus() Type = MenuTypeEnum.Dir, Name = "dashboard", Path = "/dashboard", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Redirect = null, Permission = null, @@ -53,7 +52,6 @@ private static IEnumerable DashboardMenus() Type = MenuTypeEnum.Menu, Name = "home", Path = "/dashboard/home", - AppScope = MenuAppScopeEnum.Console, Component = "/dashboard/home/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs index ddb2fd8f..5cf9f20f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.GlobalConfig.cs @@ -29,7 +29,6 @@ private static IEnumerable GlobalConfigMenus() Type = MenuTypeEnum.Dir, Name = "globalConfig", Path = "/system/globalConfig", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Redirect = null, Permission = null, @@ -58,7 +57,6 @@ private static IEnumerable GlobalConfigMenus() Type = MenuTypeEnum.Menu, Name = "platformJwtConfig", Path = "/system/platformJwtConfig", - AppScope = MenuAppScopeEnum.Console, Component = "/system/platformJwtConfig/index", Redirect = null, Permission = null, @@ -143,7 +141,6 @@ private static IEnumerable GlobalConfigMenus() Type = MenuTypeEnum.Menu, Name = "platformRateLimitConfig", Path = "/system/platformRateLimitConfig", - AppScope = MenuAppScopeEnum.Console, Component = "/system/platformRateLimitConfig/index", Redirect = null, Permission = null, @@ -228,7 +225,6 @@ private static IEnumerable GlobalConfigMenus() Type = MenuTypeEnum.Menu, Name = "platformLoggingConfig", Path = "/system/platformLoggingConfig", - AppScope = MenuAppScopeEnum.Console, Component = "/system/platformLoggingConfig/index", Redirect = null, Permission = null, @@ -313,7 +309,6 @@ private static IEnumerable GlobalConfigMenus() Type = MenuTypeEnum.Menu, Name = "platformPasswordPolicyConfig", Path = "/system/platformPasswordPolicyConfig", - AppScope = MenuAppScopeEnum.Console, Component = "/system/platformPasswordPolicyConfig/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs index bc78675e..8a30c0db 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Goods.cs @@ -27,7 +27,6 @@ private static IEnumerable GoodsMenus() Type = MenuTypeEnum.Menu, Name = "gameCommodityEntity", Path = "/commerceCenter/gameCommodityEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameCommodityEntity/index", Redirect = null, Permission = null, @@ -504,7 +503,6 @@ private static IEnumerable GoodsMenus() Type = MenuTypeEnum.Menu, Name = "gameGoodsEntity", Path = "/commerceCenter/gameGoodsEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameGoodsEntity/index", Redirect = null, Permission = null, @@ -533,7 +531,6 @@ private static IEnumerable GoodsMenus() Type = MenuTypeEnum.Menu, Name = "gameGoodsCatalogueEntity", Path = "/commerceCenter/gameGoodsCatalogueEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameGoodsCatalogueEntity/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs index df524583..c491838d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Online.cs @@ -35,7 +35,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "onlinePlayerSegment", Path = "/gmCenter/onlinePlayerSegment", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/onlinePlayerSegment/index", Redirect = null, Permission = null, @@ -204,7 +203,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "onlineConfigRollout", Path = "/gmCenter/onlineConfigRollout", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/onlineConfigRollout/index", Redirect = null, Permission = null, @@ -402,7 +400,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "walletLedger", Path = "/gmCenter/walletLedger", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/walletLedger/index", Redirect = null, Permission = null, @@ -431,7 +428,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "transactionDetail", Path = "/gmCenter/transactionDetail", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/transactionDetail/index", Redirect = null, Permission = null, @@ -460,7 +456,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "assetAudit", Path = "/gmCenter/assetAudit", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/assetAudit/index", Redirect = null, Permission = null, @@ -632,7 +627,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "onlineDashboard", Path = "/gmCenter/onlineDashboard", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/onlineDashboard/index", Redirect = null, Permission = null, @@ -662,7 +656,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "onlinePlayerTimeline", Path = "/gmCenter/onlinePlayerTimeline", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/onlinePlayerTimeline/index", Redirect = null, Permission = null, @@ -691,7 +684,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "onlineAuditSearch", Path = "/gmCenter/onlineAuditSearch", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/onlineAuditSearch/index", Redirect = null, Permission = null, @@ -722,7 +714,6 @@ private static IEnumerable OnlineMenus() Type = MenuTypeEnum.Menu, Name = "controlledOperation", Path = "/gmCenter/controlledOperation", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/controlledOperation/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs index 73ae0bea..5ae3ad77 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineMatch.cs @@ -30,7 +30,6 @@ private static IEnumerable OnlineMatchMenus() Type = MenuTypeEnum.Menu, Name = "matchQueueOverview", Path = "/gmCenter/matchQueueOverview", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/matchQueueOverview/index", Redirect = null, Permission = null, @@ -59,7 +58,6 @@ private static IEnumerable OnlineMatchMenus() Type = MenuTypeEnum.Menu, Name = "matchFailureReason", Path = "/gmCenter/matchFailureReason", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/matchFailureReason/index", Redirect = null, Permission = null, @@ -88,7 +86,6 @@ private static IEnumerable OnlineMatchMenus() Type = MenuTypeEnum.Menu, Name = "matchAbnormalTicket", Path = "/gmCenter/matchAbnormalTicket", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/matchAbnormalTicket/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs index f7b356c2..022b1bad 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OnlineSocial.cs @@ -26,7 +26,6 @@ private static IEnumerable OnlineSocialMenus() Type = MenuTypeEnum.Menu, Name = "messageAudit", Path = "/gmCenter/messageAudit", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/messageAudit/index", Redirect = null, Permission = null, @@ -55,7 +54,6 @@ private static IEnumerable OnlineSocialMenus() Type = MenuTypeEnum.Menu, Name = "reportCase", Path = "/gmCenter/reportCase", - AppScope = MenuAppScopeEnum.Console, Component = "/gmCenter/reportCase/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs index c6add916..006a1b20 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.OperationsRoots.cs @@ -22,7 +22,6 @@ private static IEnumerable OperationsRootMenus() Type = MenuTypeEnum.Dir, Name = "serverCenter", Path = "/serverCenter", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Title = "区服", TitleCode = "message.menu.serverCenter", @@ -44,7 +43,6 @@ private static IEnumerable OperationsRootMenus() Type = MenuTypeEnum.Dir, Name = "noticeCenter", Path = "/noticeCenter", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Title = "内容运营", TitleCode = "message.menu.noticeCenter", @@ -66,7 +64,6 @@ private static IEnumerable OperationsRootMenus() Type = MenuTypeEnum.Dir, Name = "gmCenter", Path = "/gmCenter", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Title = "在线运维", TitleCode = "message.menu.gmCenter", @@ -88,7 +85,6 @@ private static IEnumerable OperationsRootMenus() Type = MenuTypeEnum.Dir, Name = "commerceCenter", Path = "/commerceCenter", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Title = "商业化", TitleCode = "message.menu.commerceCenter", @@ -110,7 +106,6 @@ private static IEnumerable OperationsRootMenus() Type = MenuTypeEnum.Dir, Name = "clientDelivery", Path = "/clientDelivery", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Title = "C 端交付", TitleCode = "message.menu.clientDelivery", @@ -132,7 +127,6 @@ private static IEnumerable OperationsRootMenus() Type = MenuTypeEnum.Dir, Name = "audit", Path = "/audit", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Title = "审计", TitleCode = "message.menu.audit", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs index 36e993e4..56a7b59b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Ops.cs @@ -476,7 +476,6 @@ private static IEnumerable OpsMenus() Type = MenuTypeEnum.Menu, Name = "gameAreaEntity", Path = "/serverCenter/gameAreaEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/serverCenter/gameAreaEntity/index", Redirect = null, Permission = null, @@ -505,7 +504,6 @@ private static IEnumerable OpsMenus() Type = MenuTypeEnum.Menu, Name = "gameAreaClassifyEntity", Path = "/serverCenter/gameAreaClassifyEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/serverCenter/gameAreaClassifyEntity/index", Redirect = null, Permission = null, @@ -534,7 +532,6 @@ private static IEnumerable OpsMenus() Type = MenuTypeEnum.Menu, Name = "gameDockerEntity", Path = "/serverCenter/gameDockerTagEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/serverCenter/gameDockerTagEntity/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs index 5b24b78d..909439b9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Platform.cs @@ -31,7 +31,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Dir, Name = "develop", Path = "/system/develop", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Redirect = null, Permission = null, @@ -60,7 +59,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Dir, Name = "doc", Path = "/system/doc", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Redirect = null, Permission = null, @@ -89,7 +87,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemMenu", Path = "/system/menu", - AppScope = MenuAppScopeEnum.Console, Component = "/system/menu/index", Redirect = null, Permission = null, @@ -118,7 +115,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemConfig", Path = "/system/config", - AppScope = MenuAppScopeEnum.Console, Component = "/system/config/index", Redirect = null, Permission = null, @@ -147,7 +143,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemDict", Path = "/system/dict", - AppScope = MenuAppScopeEnum.Console, Component = "/system/dict/index", Redirect = null, Permission = null, @@ -176,7 +171,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemJob", Path = "/system/job", - AppScope = MenuAppScopeEnum.Console, Component = "/system/job/index", Redirect = null, Permission = null, @@ -205,7 +199,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemOpenAccess", Path = "/system/openAccess", - AppScope = MenuAppScopeEnum.Console, Component = "/system/openAccess/index", Redirect = null, Permission = null, @@ -234,7 +227,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "platformCaptchaConfig", Path = "/system/platformCaptchaConfig", - AppScope = MenuAppScopeEnum.Console, Component = "/system/platformCaptchaConfig/index", Redirect = null, Permission = null, @@ -879,7 +871,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemEmailProviderEntity", Path = "/system/systemEmailProvider", - AppScope = MenuAppScopeEnum.Console, Component = "/system/systemEmailProvider/index", Redirect = null, Permission = null, @@ -1048,7 +1039,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemDatabase", Path = "/system/database", - AppScope = MenuAppScopeEnum.Console, Component = "/system/database/index", Redirect = null, Permission = null, @@ -1077,7 +1067,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemBackendGuide", Path = "/system/backend", - AppScope = MenuAppScopeEnum.Console, Component = "layout/routerView/link", Redirect = null, Permission = null, @@ -1106,7 +1095,6 @@ private static IEnumerable PlatformMenus() Type = MenuTypeEnum.Menu, Name = "systemSqlSugar", Path = "/system/SqlSugar", - AppScope = MenuAppScopeEnum.Console, Component = "layout/routerView/link", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs index 40effba3..8c607b83 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.Player.cs @@ -29,7 +29,6 @@ private static IEnumerable PlayerMenus() Type = MenuTypeEnum.Dir, Name = "player", Path = "/playerCenter", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Redirect = null, Permission = null, @@ -58,7 +57,6 @@ private static IEnumerable PlayerMenus() Type = MenuTypeEnum.Menu, Name = "gameRoleEntity", Path = "/playerCenter/gameRoleEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/playerCenter/gameRoleEntity/index", Redirect = null, Permission = null, @@ -87,7 +85,6 @@ private static IEnumerable PlayerMenus() Type = MenuTypeEnum.Menu, Name = "gameUserEntity", Path = "/playerCenter/gameUserEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/playerCenter/gameUserEntity/index", Redirect = null, Permission = null, @@ -116,7 +113,6 @@ private static IEnumerable PlayerMenus() Type = MenuTypeEnum.Menu, Name = "gameOrderEntity", Path = "/commerceCenter/gameOrderEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameOrderEntity/index", Redirect = null, Permission = null, @@ -484,7 +480,6 @@ private static IEnumerable PlayerMenus() Type = MenuTypeEnum.Menu, Name = "gameOrderFulfillmentEntity", Path = "/commerceCenter/gameOrderFulfillmentEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameOrderFulfillmentEntity/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs index c83ee9ca..41cb78c5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RedeemCode.cs @@ -447,7 +447,6 @@ private static IEnumerable RedeemCodeMenus() Type = MenuTypeEnum.Menu, Name = "gameRedeemCodeEntity", Path = "/commerceCenter/gameRedeemCodeEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameRedeemCodeEntity/index", Redirect = null, Permission = null, @@ -476,7 +475,6 @@ private static IEnumerable RedeemCodeMenus() Type = MenuTypeEnum.Menu, Name = "gameRedeemCodeChannelEntity", Path = "/commerceCenter/gameRedeemCodeChannelEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameRedeemCodeChannelEntity/index", Redirect = null, Permission = null, @@ -505,7 +503,6 @@ private static IEnumerable RedeemCodeMenus() Type = MenuTypeEnum.Menu, Name = "gameRedeemCodeUseRecordEntity", Path = "/commerceCenter/gameRedeemCodeUseRecordEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/gameRedeemCodeUseRecordEntity/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs index 06eb0827..aa01c256 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.RewardTemplate.cs @@ -16,9 +16,9 @@ private static IEnumerable ContentRewardTemplateMenus() { return new[] { - Menu("route:rewardTemplate", "route:noticeCenter", "rewardTemplate", "/noticeCenter/reward", null, "奖励模板", "message.menu.rewardTemplate", "fa-solid fa-gift", 300, MenuAppScopeEnum.Console), - Menu("route:gameRewardTemplateGroupEntity", "route:rewardTemplate", "gameRewardTemplateGroupEntity", "/noticeCenter/reward/gameRewardTemplateGroupEntity", "/noticeCenter/reward/gameRewardTemplateGroupEntity/index", "奖励模板分组", "message.menu.gameRewardTemplateGroupEntity", "fa-solid fa-folder-open", 100, MenuAppScopeEnum.Console), - Menu("route:gameRewardTemplateEntity", "route:rewardTemplate", "gameRewardTemplateEntity", "/noticeCenter/reward/gameRewardTemplateEntity", "/noticeCenter/reward/gameRewardTemplateEntity/index", "奖励模板", "message.menu.gameRewardTemplateEntity", "fa-solid fa-gift", 200, MenuAppScopeEnum.Console), + Menu("route:rewardTemplate", "route:noticeCenter", "rewardTemplate", "/noticeCenter/reward", null, "奖励模板", "message.menu.rewardTemplate", "fa-solid fa-gift", 300), + Menu("route:gameRewardTemplateGroupEntity", "route:rewardTemplate", "gameRewardTemplateGroupEntity", "/noticeCenter/reward/gameRewardTemplateGroupEntity", "/noticeCenter/reward/gameRewardTemplateGroupEntity/index", "奖励模板分组", "message.menu.gameRewardTemplateGroupEntity", "fa-solid fa-folder-open", 100), + Menu("route:gameRewardTemplateEntity", "route:rewardTemplate", "gameRewardTemplateEntity", "/noticeCenter/reward/gameRewardTemplateEntity", "/noticeCenter/reward/gameRewardTemplateEntity/index", "奖励模板", "message.menu.gameRewardTemplateEntity", "fa-solid fa-gift", 200), Button("gameRewardTemplateGroupEntity:page", "route:gameRewardTemplateGroupEntity", "gameRewardTemplateGroup:page", "查询", 100), Button("gameRewardTemplateGroupEntity:detail", "route:gameRewardTemplateGroupEntity", "gameRewardTemplateGroup:detail", "详情", 110), Button("gameRewardTemplateGroupEntity:Select", "route:gameRewardTemplateGroupEntity", "gameRewardTemplateGroup:Select", "选择", 115), @@ -35,7 +35,7 @@ private static IEnumerable ContentRewardTemplateMenus() }; } - private static GlobalMenuEntity Menu(string key, string parentKey, string name, string path, string? component, string title, string titleCode, string icon, int orderNo, MenuAppScopeEnum appScope) + private static GlobalMenuEntity Menu(string key, string parentKey, string name, string path, string? component, string title, string titleCode, string icon, int orderNo) { return new GlobalMenuEntity { @@ -45,7 +45,6 @@ private static GlobalMenuEntity Menu(string key, string parentKey, string name, Type = component == null ? MenuTypeEnum.Dir : MenuTypeEnum.Menu, Name = name, Path = path, - AppScope = appScope, Component = component, Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerMerge.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerMerge.cs index c3f46d6f..cf99a8e6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerMerge.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerMerge.cs @@ -20,7 +20,6 @@ private static IEnumerable ServerMergeMenus() Type = MenuTypeEnum.Menu, Name = "gameAreaMerge", Path = "/serverCenter/gameAreaMerge", - AppScope = MenuAppScopeEnum.Console, Component = "/serverCenter/gameAreaMerge/index", Title = "合服", TitleCode = "message.menu.gameAreaMerge", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerProvision.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerProvision.cs index 807bcae6..f992dd75 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerProvision.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.ServerProvision.cs @@ -22,7 +22,6 @@ private static IEnumerable ServerProvisionMenus() Name = "gameAreaProvision", Path = "/serverCenter/gameAreaProvision", Component = "/serverCenter/gameAreaProvision/index", - AppScope = MenuAppScopeEnum.Console, Title = "开服向导", TitleCode = "message.menu.gameAreaProvision", Icon = "fa-solid fa-server", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs index 4ce06185..42c8e4ce 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.System.cs @@ -30,7 +30,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Dir, Name = "system", Path = "/system", - AppScope = MenuAppScopeEnum.Console, Component = "Layout", Redirect = null, Permission = null, @@ -59,7 +58,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemUser", Path = "/system/user", - AppScope = MenuAppScopeEnum.Console, Component = "/system/user/index", Redirect = null, Permission = null, @@ -88,7 +86,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemRole", Path = "/system/role", - AppScope = MenuAppScopeEnum.Console, Component = "/system/role/index", Redirect = null, Permission = null, @@ -117,7 +114,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemUserCenter", Path = "/system/userCenter", - AppScope = MenuAppScopeEnum.Console, Component = "/system/user/component/UserCenter", Redirect = null, Permission = null, @@ -146,7 +142,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Dir, Name = "systemIntegrationConfig", Path = "/system/integrationConfig", - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = null, @@ -175,7 +170,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "objectStorageConfigEntity", Path = "/system/objectStorageConfigEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/system/objectStorageConfigEntity/index", Redirect = null, Permission = null, @@ -1016,7 +1010,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemFile", Path = "/system/file", - AppScope = MenuAppScopeEnum.Console, Component = "/system/file/index", Redirect = null, Permission = null, @@ -1185,7 +1178,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemVisLog", Path = "/audit/logVisit", - AppScope = MenuAppScopeEnum.Console, Component = "/audit/logVisit/index", Redirect = null, Permission = null, @@ -1214,7 +1206,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemOpLog", Path = "/audit/logOperation", - AppScope = MenuAppScopeEnum.Console, Component = "/audit/logOperation/index", Redirect = null, Permission = null, @@ -1243,7 +1234,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemExLog", Path = "/audit/logException", - AppScope = MenuAppScopeEnum.Console, Component = "/audit/logException/index", Redirect = null, Permission = null, @@ -1272,7 +1262,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "systemDiffLog", Path = "/audit/logDiff", - AppScope = MenuAppScopeEnum.Console, Component = "/audit/logDiff/index", Redirect = null, Permission = null, @@ -1581,7 +1570,6 @@ private static IEnumerable SystemMenus() Type = MenuTypeEnum.Menu, Name = "globalChannelDefinition", Path = "/system/globalChannelDefinition", - AppScope = MenuAppScopeEnum.Console, Component = "/system/globalChannelDefinition/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs index 3a949b09..016a899d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.TrustCenter.cs @@ -34,7 +34,6 @@ private static IEnumerable TrustCenterMenus() Type = MenuTypeEnum.Menu, Name = "gameReportEntity", Path = "/playerCenter/gameReportEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/playerCenter/gameReportEntity/index", Redirect = null, Permission = null, @@ -148,7 +147,6 @@ private static IEnumerable TrustCenterMenus() Type = MenuTypeEnum.Menu, Name = "gamePenaltyEntity", Path = "/playerCenter/gamePenaltyEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/playerCenter/gamePenaltyEntity/index", Redirect = null, Permission = null, @@ -345,7 +343,6 @@ private static IEnumerable TrustCenterMenus() Type = MenuTypeEnum.Menu, Name = "gamePenaltyAppealEntity", Path = "/playerCenter/gamePenaltyAppealEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/playerCenter/gamePenaltyAppealEntity/index", Redirect = null, Permission = null, @@ -458,7 +455,6 @@ private static IEnumerable TrustCenterMenus() Type = MenuTypeEnum.Menu, Name = "antiCheatEventEntity", Path = "/playerCenter/antiCheatEventEntity", - AppScope = MenuAppScopeEnum.Console, Component = "/playerCenter/antiCheatEventEntity/index", Redirect = null, Permission = null, @@ -601,7 +597,6 @@ private static IEnumerable TrustCenterMenus() Type = MenuTypeEnum.Menu, Name = "penaltyEnforcement", Path = "/playerCenter/penaltyEnforcement", - AppScope = MenuAppScopeEnum.Console, Component = "/playerCenter/penaltyEnforcement/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs index 4d53ed73..70859dc9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/GlobalMenuSeedData.WebShop.cs @@ -278,7 +278,6 @@ private static IEnumerable WebShopMenus() Type = MenuTypeEnum.Menu, Name = "webShopItemManager", Path = "/commerceCenter/webShop", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/webShop/index", Redirect = null, Permission = null, @@ -307,7 +306,6 @@ private static IEnumerable WebShopMenus() Type = MenuTypeEnum.Menu, Name = "webShopOrderManager", Path = "/commerceCenter/webShopOrder", - AppScope = MenuAppScopeEnum.Console, Component = "/commerceCenter/webShopOrder/index", Redirect = null, Permission = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs index 5dd20e70..27891b78 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs @@ -20,7 +20,6 @@ public void OnlineAssetMenus_Container_UsesOnlineOperationsRoot() // C403:在线运维是独立根目录,排序由共享契约固定。 Assert.Equal("/gmCenter", container.Path); Assert.Equal(0, container.Pid); - Assert.Equal(MenuAppScopeEnum.Console, container.AppScope); Assert.Equal("message.menu.gmCenter", container.TitleCode); Assert.Equal("在线运维", container.Title); Assert.Equal(300, container.OrderNo); @@ -38,7 +37,6 @@ public void OnlineAssetMenus_Pages_UseOnlineOperationsPathsAndMatchLedgerSpec( var page = Assert.Single(menus, m => m.Key == key); Assert.Equal(MenuTypeEnum.Menu, page.Type); - Assert.Equal(MenuAppScopeEnum.Console, page.AppScope); Assert.Equal(StableSeedId.Menu("route:gmCenter"), page.Pid); Assert.Equal(title, page.Title); Assert.Equal(titleCode, page.TitleCode); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs index 269ccf77..a915ed9a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs @@ -32,7 +32,6 @@ public void OnlineConsoleMenus_Pages_UseOnlineOperationsPaths( var page = Assert.Single(menus, m => m.Key == key); Assert.Equal(MenuTypeEnum.Menu, page.Type); - Assert.Equal(MenuAppScopeEnum.Console, page.AppScope); Assert.Equal(StableSeedId.Menu("route:gmCenter"), page.Pid); Assert.Equal(title, page.Title); Assert.Equal(titleCode, page.TitleCode); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs index e4755cb5..2b6b1caa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/CodeFirstSchemaEvolutionPostgresTests.cs @@ -55,19 +55,17 @@ public void InitDatabase_OnLegacyGlobalMenuWithoutSeedColumns_AddsColumnsWithDef // 模拟 2026-07 之前的存量库:DROP 三个存活列(老行对应数据随列丢弃) mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN super_admin_only"); mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN allow_admin_when_super_admin_only"); - mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN app_scope"); // 二次初始化 = 生产升级重放:CodeFirst 检出缺列 → ALTER ADD COLUMN NOT NULL DEFAULT(零重写) SqlSugarSetup.InitDatabase(scope, config, new[] { typeof(GlobalMenuEntity), typeof(SystemUserEntity), }); var legacyRow = mainDatabase.Ado.SqlQuery( - "SELECT super_admin_only, allow_admin_when_super_admin_only, app_scope FROM global_menu_entity WHERE id = @id", + "SELECT super_admin_only, allow_admin_when_super_admin_only FROM global_menu_entity WHERE id = @id", new SugarParameter("@id", LegacyMenuId)).Single(); // 老行读到实体 DefaultValue(与原 EnsureColumn 回填值一致:false/0/false/Business=0) Assert.False((bool)legacyRow.super_admin_only); Assert.False((bool)legacyRow.allow_admin_when_super_admin_only); - Assert.Equal((int)MenuAppScopeEnum.Console, (int)legacyRow.app_scope); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs index dfa96099..58da31c1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs @@ -224,11 +224,10 @@ public void MenuSeedCatalog_LoadFromDb_KeepsRuntimeAutoPermissionMenusAsDbSource var createdTimeColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.CreatedTime)); var createdNameColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.CreatedName)); var updateCountColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.UpdateCount)); - var appScopeColumn = ColumnName(mainDb, typeof(GlobalMenuEntity), nameof(GlobalMenuEntity.AppScope)); mainDb.Ado.ExecuteCommand( - $"INSERT INTO {tableName} ({idColumn}, {pidColumn}, {keyColumn}, {titleColumn}, {typeColumn}, {isHideColumn}, {isIframeColumn}, {isKeepAliveColumn}, {isAffixColumn}, {orderNoColumn}, {superAdminOnlyColumn}, {allowColumn}, {isEnabledColumn}, {isDeletedColumn}, {createdIdColumn}, {createdTimeColumn}, {createdNameColumn}, {updateCountColumn}, {appScopeColumn}) " + - "VALUES (@legacyId, @pid, @legacyKey, @legacyTitle, @type, @falseValue, @falseValue, @trueValue, @falseValue, @orderNo, @falseValue, @falseValue, @trueValue, @falseValue, @createdId, @createdTime, @createdName, @updateCount, @appScope), " + - "(@autoId, @pid, @autoKey, @autoTitle, @type, @trueValue, @falseValue, @trueValue, @falseValue, @orderNo, @falseValue, @falseValue, @trueValue, @falseValue, @createdId, @createdTime, @createdName, @updateCount, @appScope)", + $"INSERT INTO {tableName} ({idColumn}, {pidColumn}, {keyColumn}, {titleColumn}, {typeColumn}, {isHideColumn}, {isIframeColumn}, {isKeepAliveColumn}, {isAffixColumn}, {orderNoColumn}, {superAdminOnlyColumn}, {allowColumn}, {isEnabledColumn}, {isDeletedColumn}, {createdIdColumn}, {createdTimeColumn}, {createdNameColumn}, {updateCountColumn}) " + + "VALUES (@legacyId, @pid, @legacyKey, @legacyTitle, @type, @falseValue, @falseValue, @trueValue, @falseValue, @orderNo, @falseValue, @falseValue, @trueValue, @falseValue, @createdId, @createdTime, @createdName, @updateCount), " + + "(@autoId, @pid, @autoKey, @autoTitle, @type, @trueValue, @falseValue, @trueValue, @falseValue, @orderNo, @falseValue, @falseValue, @trueValue, @falseValue, @createdId, @createdTime, @createdName, @updateCount)", new SugarParameter("@legacyId", legacyId), new SugarParameter("@pid", 0), new SugarParameter("@legacyKey", "legacy:menu"), @@ -243,8 +242,7 @@ public void MenuSeedCatalog_LoadFromDb_KeepsRuntimeAutoPermissionMenusAsDbSource new SugarParameter("@createdName", "test"), new SugarParameter("@updateCount", 0), new SugarParameter("@trueValue", true), - new SugarParameter("@falseValue", false), - new SugarParameter("@appScope", (int)MenuAppScopeEnum.Console)); + new SugarParameter("@falseValue", false)); ResetMenuSeedCatalogDbCache(); MenuSeedCatalog.LoadFromDb(mainDb); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs index 06ef260b..13a3ad82 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GlobalMenuSeedAudiencePrefixGuardTests.cs @@ -38,7 +38,6 @@ public void LeafMenu_PathFirstSegment_MatchesComponentFirstSegment() public void Menus_UseConsoleScopeAndRetainSuperAdminBoundary() { var menus = GlobalMenuSeedData.BuildData(); - Assert.All(menus, menu => Assert.Equal(MenuAppScopeEnum.Console, menu.AppScope)); var protectedKeys = new HashSet(StringComparer.Ordinal) { "route:platformJwtConfig", "route:platformRateLimitConfig", "route:platformLoggingConfig", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuOutputScopeTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuOutputScopeTests.cs index acddd470..58e56dfd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuOutputScopeTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuOutputScopeTests.cs @@ -8,8 +8,7 @@ namespace GameFrameX.Core.Tests.System; /// -/// 映射器将 global_menu.app_scope 枚举直传为 meta.appScope,并派生 meta.menuContext。 -/// 路径前缀推断已删除,作用域是显式数据列 global_menu.app_scope(由种子 GlobalMenuSeedData.* 显式声明)。 +/// 映射器派生 meta.menuContext。 /// public class MenuOutputScopeTests { @@ -19,9 +18,8 @@ public void MenuOutputMeta_UsesConsoleContext() var config = new TypeAdapterConfig(); new SystemMenuMapper().Register(config); - var output = new GlobalMenuEntity { AppScope = MenuAppScopeEnum.Console, }.Adapt(config); + var output = new GlobalMenuEntity { }.Adapt(config); - Assert.Equal("console", output.Meta.AppScope); Assert.Equal("console", output.Meta.MenuContext); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs index efc8b168..98b2132a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs @@ -178,8 +178,7 @@ public static void LoadFromDb(ISqlSugarClient db) dbMenu.CreatedTime, dbMenu.UpdateTime ?? dbMenu.CreatedTime, dbMenu.SuperAdminOnly, - dbMenu.AllowAdminWhenSuperAdminOnly, - dbMenu.AppScope); + dbMenu.AllowAdminWhenSuperAdminOnly); }).ToArray(); _dbMenus = dbMenus; @@ -232,11 +231,6 @@ private static void ValidateDbMenus(IReadOnlyList dbMenus) - var invalidAppScope = dbMenus.FirstOrDefault(u => !global::System.Enum.IsDefined(typeof(MenuAppScopeEnum), u.AppScope)); - if (invalidAppScope != null) - { - throw new InvalidOperationException($"global_menu.AppScope 非法值: Key={invalidAppScope.Key}, AppScope={invalidAppScope.AppScope}。"); - } EnsureNoCycles(dbMenus); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs index 94422ec2..1638b7ac 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedDefinition.cs @@ -28,5 +28,4 @@ public sealed record MenuSeedDefinition( long CreatedTime, long UpdateTime, bool SuperAdminOnly, - bool AllowAdminWhenSuperAdminOnly, - MenuAppScopeEnum AppScope); \ No newline at end of file + bool AllowAdminWhenSuperAdminOnly); \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs index c58b33fa..cc3a30b4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/GlobalMenuResponse.cs @@ -113,10 +113,6 @@ public class GlobalMenuResponse /// public bool AllowAdminWhenSuperAdminOnly { get; set; } - /// - /// 应用作用域(Business 租户默认 / Platform 仅超管 / App 应用工作台)。显式声明菜单归属域,取代路由前缀推断。 - /// - public MenuAppScopeEnum AppScope { get; set; } /// /// 菜单子项 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/SystemMenuMetaResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/SystemMenuMetaResponse.cs index 314c716a..13e3f05d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/SystemMenuMetaResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/Dto/SystemMenuMetaResponse.cs @@ -50,8 +50,4 @@ public class SystemMenuMetaResponse /// public string MenuContext { get; set; } = null!; - /// - /// 菜单作用域:console。 - /// - public string AppScope { get; set; } = null!; } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/SystemMenuMapper.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/SystemMenuMapper.cs index 028315af..6d2dd555 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/SystemMenuMapper.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/SystemMenuMapper.cs @@ -19,7 +19,6 @@ public void Register(TypeAdapterConfig config) .Map(t => t.Meta.IsHide, o => o.IsHide) .Map(t => t.Meta.IsKeepAlive, o => o.IsKeepAlive) .Map(t => t.Meta.IsAffix, o => o.IsAffix) - .Map(t => t.Meta.AppScope, o => "console") .Map(t => t.Meta.MenuContext, o => "console"); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/MenuAppScopeEnum.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/MenuAppScopeEnum.cs deleted file mode 100644 index 2006a886..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/MenuAppScopeEnum.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace GameFrameX.Entity.Enum; - -/// -/// 控制台菜单作用域,所有菜单共用同一工作台。 -/// -[Description("菜单作用域枚举")] -[AdminEnum] -public enum MenuAppScopeEnum -{ - /// 统一控制台。 - [Description("控制台")] Console = 0, -} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs index 8944ec1d..c3c8ed69 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs @@ -133,11 +133,6 @@ public sealed class GlobalMenuEntity : EntityBasic [SugarColumn(ColumnDescription = "超管专属允许租户只读", DefaultValue = "false")] public bool AllowAdminWhenSuperAdminOnly { get; set; } - /// - /// 控制台作用域。所有菜单共用工作台,可见权限由用户角色与超管标记控制。 - /// - [SugarColumn(ColumnDescription = "控制台作用域", DefaultValue = "0")] - public MenuAppScopeEnum AppScope { get; set; } /// /// 菜单子项 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs index 443073df..2fe33d39 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs @@ -7,10 +7,6 @@ namespace GameFrameX.Entity.Log; /// public class LogDiffFields : EntityBasic { - /// 历史审计归属,仅保留既有记录,不参与路由或自动填充。 - [SugarColumn(ColumnDescription = "历史租户标识", IsNullable = true)] - public long? Id { get; set; } - /// /// 操作前记录 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs index 1a015446..7f2e52bd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs @@ -9,10 +9,6 @@ namespace GameFrameX.Entity.Log; /// public class LogVisitFields : EntityBase { - /// 历史审计归属,仅保留既有记录,不参与路由或自动填充。 - [SugarColumn(ColumnDescription = "历史租户标识", IsNullable = true)] - public long? Id { get; set; } - /// /// 模块名称 /// From 6beae9d9a7a50315f7d6bd7b1fcf4a07ac3eefbd Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:50:35 +0800 Subject: [PATCH 17/86] =?UTF-8?q?feat(core):=20=E6=97=A7=E5=BA=93=E6=8B=92?= =?UTF-8?q?=E7=BB=9D=E5=90=AF=E5=8A=A8=E5=AE=88=E5=8D=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C406 D7:新增 LegacySchemaStartupGuard,AddSqlSugar 初始化循环内在 建库建表种子之前 fail-closed 检查旧 schema 标志(tenant_ 前缀表或旧 租户登记表 system_tenant_entity),命中即抛中文错误终止启动(2.0 不支持旧库升级,只能用新库或整体回滚),不建表不写数据。守卫覆盖 仅 Web.Api 装配路径;Client/Hub 不建表无需守卫(设计说明见 notes-core.md §3)。测试:预建 tenant_ 表初始化抛错且无新表、登记 表标志抛错、空库正常初始化、装配顺序源码守护。 Linear: GFX-1232 --- .../LegacySchemaStartupGuardTests.cs | 174 ++++++++++++++++++ .../Bootstrap/LegacySchemaStartupGuard.cs | 68 +++++++ .../GameFrameX.Core/SqlSugar/SqlSugarSetup.cs | 6 +- 3 files changed, 246 insertions(+), 2 deletions(-) create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs new file mode 100644 index 00000000..c267bd0a --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs @@ -0,0 +1,174 @@ +using GameFrameX.Core.Bootstrap; +using GameFrameX.Core.Option; +using GameFrameX.Core.SqlSugar; +using GameFrameX.Entity.Global; +using GameFrameX.Entity.System; +using SqlSugar; + +namespace GameFrameX.Core.Tests.Bootstrap; + +/// +/// 旧库拒绝启动守卫测试(C406 / D7):预建旧 schema 标志表后初始化必须抛错且不建表;空库正常初始化; +/// 生产装配顺序(AddSqlSugar 循环内守卫先于 InitDatabase)以源码顺序断言守护。 +/// SQLite 临时库承载。 +/// +[Collection("MenuSeedCatalog")] +public sealed class LegacySchemaStartupGuardTests : IDisposable +{ + private readonly List _dbPaths = new(); + + [Fact] + public void EnsureNotLegacySchema_TenantPrefixedTable_Throws() + { + using var scope = CreateScopeWithLegacyTable("tenant_game_user_entity", out _); + + var exception = Assert.Throws( + () => LegacySchemaStartupGuard.EnsureNotLegacySchema(scope, CreateConfig("main"))); + + Assert.Contains("2.0 不支持旧库升级,只能用新库或整体回滚", exception.Message); + Assert.Contains("tenant_game_user_entity", exception.Message); + } + + [Fact] + public void EnsureNotLegacySchema_LegacyTenantRegistryTable_Throws() + { + using var scope = CreateScopeWithLegacyTable("system_tenant_entity", out _); + + var exception = Assert.Throws( + () => LegacySchemaStartupGuard.EnsureNotLegacySchema(scope, CreateConfig("main"))); + + Assert.Contains("2.0 不支持旧库升级,只能用新库或整体回滚", exception.Message); + Assert.Contains("system_tenant_entity", exception.Message); + } + + [Fact] + public void EnsureNotLegacySchema_EmptyDatabase_PassesAndInitDatabaseCreatesTables() + { + using var scope = CreateScope("main"); + var config = CreateConfig("main"); + + LegacySchemaStartupGuard.EnsureNotLegacySchema(scope, config); + SqlSugarSetup.InitDatabase(scope, config, new[] { typeof(SystemUserEntity), typeof(GlobalMenuEntity), }); + + var database = scope.GetConnectionScope("main"); + Assert.True(database.DbMaintenance.IsAnyTable("system_user_entity", false)); + Assert.True(database.DbMaintenance.IsAnyTable("global_menu_entity", false)); + } + + [Fact] + public void GuardedInitSequence_LegacySchema_ThrowsBeforeCreatingAnyTable() + { + using var scope = CreateScopeWithLegacyTable("tenant_game_user_entity", out _); + var config = CreateConfig("main"); + var types = new[] { typeof(SystemUserEntity), typeof(GlobalMenuEntity), }; + + // 复刻 AddSqlSugar 初始化循环的顺序:守卫先于 InitDatabase(雪花单例使 AddSqlSugar 无法在测试进程二次装配) + var exception = Record.Exception(() => + { + LegacySchemaStartupGuard.EnsureNotLegacySchema(scope, config); + SqlSugarSetup.InitDatabase(scope, config, types); + }); + + Assert.IsType(exception); + Assert.Contains("2.0 不支持旧库升级,只能用新库或整体回滚", exception!.Message); + + // 守卫在建表前抛出:除预建的旧表外不得出现任何新表 + var tables = scope.GetConnectionScope("main").DbMaintenance.GetTableInfoList(false).Select(table => table.Name).ToList(); + Assert.Equal(new[] { "tenant_game_user_entity", }, tables); + } + + [Fact] + public void AddSqlSugar_Wiring_GuardRunsBeforeInitDatabase() + { + // 生产装配顺序守护:AddSqlSugar 初始化循环内守卫必须先于 InitDatabase 调用(建表前 fail-closed 拦截)。 + // AddSqlSugar 端到端装配在测试进程不可行(紧凑雪花单例拒绝二次 InitSnowFlake),以源码顺序断言代替。 + var source = File.ReadAllText(Path.Combine(FindRepositoryRoot(), "GameFrameX.Core", "SqlSugar", "SqlSugarSetup.cs")); + var guardIndex = source.IndexOf("LegacySchemaStartupGuard.EnsureNotLegacySchema", StringComparison.Ordinal); + var initIndex = source.IndexOf("InitDatabase(sqlSugar, config, effectiveTypes)", StringComparison.Ordinal); + + Assert.True(guardIndex >= 0, "AddSqlSugar 必须调用 LegacySchemaStartupGuard.EnsureNotLegacySchema"); + Assert.True(initIndex > guardIndex, "守卫调用必须先于 InitDatabase(建表前 fail-closed)"); + } + + private static string FindRepositoryRoot() + { + var directory = new DirectoryInfo(AppContext.BaseDirectory); + while (directory is not null && !File.Exists(Path.Combine(directory.FullName, "GameFrameX.Admin.Unified.slnx"))) + { + directory = directory.Parent; + } + + return directory?.FullName ?? throw new InvalidOperationException("Repository root not found from " + AppContext.BaseDirectory); + } + + private string CreateDbPath() + { + var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_legacy_guard_{Guid.NewGuid():N}.db"); + _dbPaths.Add(dbPath); + return dbPath; + } + + private DbConnectionConfig CreateConfig(string configId) + { + var dbPath = CreateDbPath(); + var config = new DbConnectionConfig + { + ConfigId = configId, + DbType = DbType.Sqlite, + ConnectionString = $"DataSource={dbPath}", + IsAutoCloseConnection = true, + DbSettings = new DbSettings + { + EnableInitDb = true, + EnableDiffLog = false, + }, + TableSettings = new TableSettings + { + EnableInitTable = true, + EnableIncreTable = false, + }, + SeedSettings = new SeedSettings + { + EnableInitSeed = false, + EnableIncreSeed = false, + }, + }; + SqlSugarSetup.SetDbConfig(config); + return config; + } + + private SqlSugarScope CreateScope(string configId) + { + var config = CreateConfig(configId); + return new SqlSugarScope(new List { config, }); + } + + /// + /// 建一个带预置旧 schema 标志表的 SQLite 库并返回指向它的 scope(配置 ConfigId=main,与库文件对应)。 + /// + private SqlSugarScope CreateScopeWithLegacyTable(string legacyTableName, out string dbPath) + { + dbPath = CreateDbPath(); + var config = new DbConnectionConfig + { + ConfigId = "main", + DbType = DbType.Sqlite, + ConnectionString = $"DataSource={dbPath}", + IsAutoCloseConnection = true, + }; + var scope = new SqlSugarScope(new List { config, }); + scope.GetConnectionScope("main").Ado.ExecuteCommand($"CREATE TABLE {legacyTableName} (Id INTEGER PRIMARY KEY);"); + return scope; + } + + public void Dispose() + { + foreach (var dbPath in _dbPaths) + { + if (File.Exists(dbPath)) + { + File.Delete(dbPath); + } + } + } +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs new file mode 100644 index 00000000..03336049 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs @@ -0,0 +1,68 @@ +using GameFrameX.Core.Option; + +namespace GameFrameX.Core.Bootstrap; + +/// +/// 旧库拒绝启动守卫(C406 / D7):Web.Api 初始化数据库(建表、种子)之前的 fail-closed 检查。 +/// 2.0 为破坏性断代版本,不迁移旧数据:检测到旧 schema 标志(任一 tenant_ 前缀表,或旧租户登记表 +/// system_tenant_entity)即抛 终止启动——不建表、不写种子、不写数据, +/// 只能用新库或整体回滚。 +/// +public static class LegacySchemaStartupGuard +{ + /// + /// 旧租户登记表物理名(1.x SystemTenantEntity,[PlatformTable] 派生;租户登记机制已删除,新代码永不创建)。 + /// + private const string LegacyTenantRegistryTable = "system_tenant_entity"; + + /// + /// 旧租户业务表物理名前缀。 + /// + private const string LegacyTenantTablePrefix = "tenant_"; + + /// + /// 检查目标库不是旧 schema;命中旧标志即抛 。 + /// 新装库尚不存在时先幂等建库(与 SqlSugarSetup.InitDatabase 同条件跳过 SQLite/Oracle), + /// 保证 PostgreSQL/MySQL 首装场景在库不存在时按空库放行,而不是误报连接失败。 + /// + /// SqlSugar 作用域客户端。 + /// 目标连接配置。 + public static void EnsureNotLegacySchema(SqlSugarScope database, DbConnectionConfig config) + { + var dbProvider = database.GetConnectionScope(config.ConfigId); + + if (config.DbSettings.EnableInitDb && config.DbType != DbType.Sqlite && config.DbType != DbType.Oracle) + { + dbProvider.DbMaintenance.CreateDatabase(); + } + + var legacyTables = dbProvider.DbMaintenance.GetTableInfoList(false) + .Select(table => table.Name) + .Where(IsLegacyTableName) + .OrderBy(name => name, StringComparer.Ordinal) + .ToList(); + + if (legacyTables.Count > 0) + { + var examples = string.Join("、", legacyTables.Take(3)); + throw new InvalidOperationException( + $"检测到旧版多租户数据库架构(示例表:{examples},共 {legacyTables.Count} 张)。2.0 不支持旧库升级,只能用新库或整体回滚。"); + } + } + + /// + /// 判断表名是否为旧 schema 标志:tenant_ 前缀表或旧租户登记表(均忽略大小写)。 + /// + /// 物理表名。 + /// 命中旧标志返回 true。 + private static bool IsLegacyTableName(string tableName) + { + if (string.IsNullOrWhiteSpace(tableName)) + { + return false; + } + + return tableName.StartsWith(LegacyTenantTablePrefix, StringComparison.OrdinalIgnoreCase) + || string.Equals(tableName, LegacyTenantRegistryTable, StringComparison.OrdinalIgnoreCase); + } +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs index e5f2e233..353b6a02 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs @@ -1,3 +1,4 @@ +using GameFrameX.Core.Bootstrap; using GameFrameX.Core.Logging; using GameFrameX.Foundation.Orm.Attribute; using GameFrameX.Core.Const.MenuSeed; @@ -61,10 +62,11 @@ public static void AddSqlSugar(this IServiceCollection services, }); services.AddSingleton(sqlSugar); // 单例注册 services.AddScoped(typeof(SqlSugarRepository<>)); // 仓储注册 - - // 初始化数据库表结构及种子数据 + // 初始化数据库表结构及种子数据;建库/建表/种子前先做旧库拒绝检查(C406 / D7), + // 命中旧 schema 标志(tenant_ 前缀表或旧租户登记表)即 fail-closed 终止启动。 foreach (var config in dbOptions.ConnectionConfigs) { + LegacySchemaStartupGuard.EnsureNotLegacySchema(sqlSugar, config); InitDatabase(sqlSugar, config, effectiveTypes); } From 701e8308a8dc82b15cc2a4924c9e6d9dfd2cfd4c Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:53:44 +0800 Subject: [PATCH 18/86] =?UTF-8?q?test(auth):=20=E5=B9=B3=E5=8F=B0=20JWT=20?= =?UTF-8?q?=E7=AD=BE=E5=8F=91=20claim=20=E9=9B=86=E5=90=88=E7=B2=BE?= =?UTF-8?q?=E7=A1=AE=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C406 身份收口:真实 PlatformJwtTokenService 签发链路(SQLite 配置行 + PlatformJwtRuntimeProvider)签发 AccessToken 并解码,断言 claim 全集 恰好为身份四项(UserId/Account/RealName/AccountType)加签发框架项 (iat/nbf/exp/iss/aud/platform_jwt_version),防止签发层私自加回 租户或应用作用域 claim。 Linear: GFX-1232 --- .../System/PlatformJwtIssuedClaimSetTests.cs | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs new file mode 100644 index 00000000..5d561828 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs @@ -0,0 +1,86 @@ +using GameFrameX.Core.Cache; +using GameFrameX.Core.Const; +using GameFrameX.Core.Option; +using GameFrameX.Core.Service.PlatformJwt; +using GameFrameX.Core.SqlSugar; +using GameFrameX.Entity.Enum; +using GameFrameX.Entity.System; +using Microsoft.IdentityModel.JsonWebTokens; +using SqlSugar; + +namespace GameFrameX.Core.Tests.System; + +/// +/// 平台 JWT 签发 claim 集合精确断言(C406 身份收口): +/// 真实 签发的 AccessToken claim 全集必须恰好为 +/// 身份四项(UserId/Account/RealName/AccountType)+ 签发框架项(iat/nbf/exp/iss/aud/platform_jwt_version), +/// 不得出现 TenantId、TenantHost、AppId、组织或租户角色等已删除作用域 claim。 +/// +public sealed class PlatformJwtIssuedClaimSetTests : IDisposable +{ + private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"gfx_jwt_claim_set_{Guid.NewGuid():N}.db"); + private readonly SqlSugarScope _client; + + public PlatformJwtIssuedClaimSetTests() + { + var config = new DbConnectionConfig + { + ConfigId = "main", + DbType = DbType.Sqlite, + ConnectionString = $"DataSource={_dbPath}", + IsAutoCloseConnection = true, + }; + SqlSugarSetup.SetDbConfig(config); + SqlSugarCache.Configure(new FakeCache()); + _client = new SqlSugarScope(new List { config, }); + _client.GetConnectionScope("main").CodeFirst.InitTables(typeof(SystemConfigEntity)); + } + + [Fact] + public async Task CreateAccessTokenAsync_IssuedClaimSet_ExactlyIdentityAndFrameworkClaims() + { + // 与 SystemAuthService.CreateTokenAsync 相同的 payload 构造(身份四项) + var payload = new Dictionary + { + { ClaimConst.UserId, 1001L }, + { ClaimConst.Account, "operator" }, + { ClaimConst.RealName, "运营管理员" }, + { ClaimConst.AccountType, AccountTypeEnum.NormalUser }, + }; + + var repository = new SqlSugarRepository(_client); + var runtimeProvider = new PlatformJwtRuntimeProvider(repository); + await runtimeProvider.EnsureDefaultSettingsAsync(); + var tokenService = new PlatformJwtTokenService(runtimeProvider); + + var token = await tokenService.CreateAccessTokenAsync(payload, expiredMinutes: 20); + + var jwtToken = new JsonWebTokenHandler().ReadJsonWebToken(token); + var claimTypes = jwtToken.Claims.Select(claim => claim.Type).Distinct().OrderBy(type => type, StringComparer.Ordinal).ToArray(); + + Assert.Equal( + new[] + { + "Account", + "AccountType", + "RealName", + "UserId", + "aud", + "exp", + "iat", + "iss", + "nbf", + PlatformJwtConfigConstants.TokenVersionClaim, + }, + claimTypes); + } + + public void Dispose() + { + _client.Dispose(); + if (File.Exists(_dbPath)) + { + File.Delete(_dbPath); + } + } +} From b764ddf642a6d41bff49cbd1d19cdf4b0496e80a Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 14:57:55 +0800 Subject: [PATCH 19/86] =?UTF-8?q?refactor:=20=E6=94=B6=E6=95=9B=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E4=B8=8E=E6=B8=B8=E6=88=8F=E6=9C=8D=E7=BA=BF=E7=BC=86?= =?UTF-8?q?=E8=AF=AD=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除旧回调路由兼容重建,统一单分包回调地址;请求旧作用域字段按未知字段处理并改用出站业务白名单。移除校验器旧参数和测试数据库替身,配置读取统一使用主库客户端。\n\nLinear: GFX-1232 --- .../GmCenter/Console/OnlineAuditSourceMap.cs | 4 +- .../ServerCenter/Online/OnlineServerClient.cs | 18 +++++-- .../GameRole/Dto/GamePlayerLoginRequest.cs | 4 +- .../GameRole/GameRoleController.cs | 20 +------- .../Advertisement/GameAdWebHookController.cs | 10 ++-- .../Payment/GameOrderController.ApplePay.cs | 2 +- .../Payment/PaymentOptionSettingProvider.cs | 13 +++-- .../GameFrameX.Client.Api/Program.cs | 10 ++-- .../ClientApiTenantOptionsProvider.cs | 10 ++-- .../GameLoginTicketKeyResolver.cs | 10 ++-- .../Services/IAppAttestationVerifier.cs | 5 +- .../Services/NullAppAttestationVerifier.cs | 4 +- .../PackageVersion/GameAppPackageResolver.cs | 8 +-- .../PublicCallbackNotifyUrlBuilder.cs | 49 ++++--------------- .../C116AntiCheatAndRiskEnforcementTests.cs | 4 +- .../ClientApiEndpointCoverageMatrix.cs | 8 +-- .../ClientApiEndpointCoverageTests.cs | 33 +++++++++++++ .../ClientApi/ClientApiRoleEndpointTests.cs | 20 +++++--- .../ClientApiWebShopEndpointTests.cs | 10 ++-- .../PublicCallbackTenantRoutingTests.cs | 6 +-- .../Online/OnlineServerClientTests.cs | 9 ++-- .../System/AuthTestHost.cs | 4 +- .../System/FakeTenantDbConnectionProvider.cs | 23 --------- .../System/GameHomeServiceTests.cs | 6 +-- .../Middleware/ProtoVersionMiddleware.cs | 8 +-- .../Middleware/SessionKeyResolver.cs | 8 +-- .../Middleware/SignatureKeyResolver.cs | 10 ++-- 27 files changed, 148 insertions(+), 168 deletions(-) delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeTenantDbConnectionProvider.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs index 9285586f..e7896ec7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs @@ -45,7 +45,7 @@ private sealed class RequestJsonProbe }; /// - /// RequestParam JSON 中探测作用域的已知键(appId/serverId 双形态)。 + /// RequestParam JSON 中探测区服作用域的已知键(serverId 双形态)。 /// private static readonly string[] ScopeKeys = { "serverId", "ServerId", }; @@ -234,7 +234,7 @@ private static RequestJsonProbe ExtractIdentifiersFromRequestJson(string? reques } /// - /// 作用域数字键探测:先根层,miss 再下钻一层对象值(appId/serverId 常在 {"input":{...}} 包裹内,与目标键同形态)。 + /// 区服数字键探测:先根层,miss 再下钻一层对象值(serverId 常在 {"input":{...}} 包裹内,与目标键同形态)。 /// private static long? ProbeInt64Deep(JsonElement container, string camelKey, string pascalKey) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs index 2523d469..366ba0c5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs @@ -9,6 +9,19 @@ namespace GameFrameX.Application.ServerCenter.Online; /// public sealed class OnlineServerClient : IOnlineServerClient { + private static readonly HashSet BusinessPayloadKeys = new(StringComparer.OrdinalIgnoreCase) + { + "ServerId", "RequestId", "IdempotencyKey", "Reason", "ReasonCode", "Message", "MessageKey", + "PlayerId", "PlayerIds", "TargetPlayerId", "OperatorId", "PenaltyId", "TicketId", "TransactionId", + "BusinessOrderNumber", "CommandType", "Action", "OnlineAction", "SegmentId", "OnlineSegmentId", + "ConfirmVersion", "ConfigKey", "ConfigVersion", "ConfigKind", "Version", "Mode", "Region", + "StartTime", "EndTime", "Cursor", "PageSize", "AbnormalKind", "GrantItems", "Items", + "CurrencyOrItemType", "Source", "Status", "Summary", "NotifyContent", "Content", "Subject", + "MailId", "TemplateId", "MailTemplateId", "Title", "Body", "Language", "Channel", "Platform", + "Package", "DryRun", "BackupConfirmed", "PlanId", "TargetServerId", "SourceServerIds", + "ReviewerOperatorId", "RollbackReason", "IsEnabled", "ValueJson", "PublishVersion", + }; + private readonly HttpClient _httpClient; private readonly IOnlineServerEndpointResolver _endpointResolver; private readonly SqlSugarRepository _gameAreaRepository; @@ -95,7 +108,7 @@ private static TResponse Unwrap(string content, string url) where TRe return response.Data; } - /// 区服标识并入请求体,业务载荷不能覆盖已验证的区服。 + /// 区服标识并入请求体,业务载荷不能覆盖已验证的区服;未知字段不出站。 private static Dictionary MergeScopeIntoPayload(object request, OnlineScopeContext scope) { var merged = new Dictionary(StringComparer.Ordinal); @@ -104,8 +117,7 @@ private static TResponse Unwrap(string content, string url) where TRe { foreach (var property in payload.EnumerateObject()) { - if (string.Equals(property.Name, "TenantId", StringComparison.OrdinalIgnoreCase) - || string.Equals(property.Name, "AppId", StringComparison.OrdinalIgnoreCase) + if (!BusinessPayloadKeys.Contains(property.Name) || string.Equals(property.Name, "ServerId", StringComparison.OrdinalIgnoreCase)) { continue; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GamePlayerLoginRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GamePlayerLoginRequest.cs index b7962c7e..a80ab9e9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GamePlayerLoginRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/Dto/GamePlayerLoginRequest.cs @@ -45,8 +45,8 @@ public sealed class GamePlayerLoginRequest public string Platform { get; set; } = null!; /// - /// 未声明字段,用于拒绝历史上下文字段覆盖 Header 或 token claims。 + /// 未声明字段;未知字段仅作为输入兼容数据保留,不参与上下文解析或出站载荷。 /// [JsonExtensionData] public Dictionary ExtraFields { get; set; } = null!; -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs index e083d0a5..3ea2b3c0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs @@ -222,11 +222,6 @@ public async Task>> GetList([FromBody] [ProducesResponseType(200, Type = typeof(GameLoginTicketResponse))] public async Task> Login([FromBody] GamePlayerLoginRequest input) { - if (HasForbiddenContextField(input)) - { - return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "请求体不能包含租户、应用或账号上下文字段"); - } - var tokenValidation = await _clientApiTokenIssuer.ValidateAsync(input.AccessToken); if (!tokenValidation.IsValid) { @@ -359,19 +354,6 @@ private bool TryGetContextLong(string key, out long value) return long.TryParse(item.ToString(), out value); } - private static bool HasForbiddenContextField(GamePlayerLoginRequest input) - { - if (input.ExtraFields == null) - { - return false; - } - - return input.ExtraFields.Keys.Any(k => - string.Equals(k, "tenantId", StringComparison.OrdinalIgnoreCase) || - string.Equals(k, "appId", StringComparison.OrdinalIgnoreCase) || - string.Equals(k, "userId", StringComparison.OrdinalIgnoreCase)); - } - private static string BuildRouteTarget(TenantGameAreaEntity area) { if (area.WebSocketUrl.IsNotNullOrEmpty()) @@ -437,4 +419,4 @@ public async Task> GetById([FromBody] GetBy return GameApiResult.Error(GameRoleErrorCode.RoleNotFound, "角色不存在"); } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs index de06a829..42c1ec57 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs @@ -41,7 +41,7 @@ public GameAdWebHookController(SqlSugarRepository验签 + 幂等账本 + 发奖由 处理;本端点仅保留 C59 公开回调路由与 HTTP 形状。 /// [PublicCallbackEndpoint("topon", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{packageId:long?}")] public async Task TopOnNotify() { var result = await _advertisementRewardService.ReceiveTopOnAsync(); @@ -54,7 +54,7 @@ public async Task TopOnNotify() /// 租户身份只来自公开回调 URL 路由上下文;验签走 (仅验签,不进发奖链路),签名通过后才允许查询广告发放记录。 /// [PublicCallbackEndpoint("pangle", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{packageId:long?}")] public async Task PangleGlobalNotify([FromQuery] AdvertisementPangleGlobalGameEntityRequest input) { var advertisementOptions = await _optionsProvider.GetAdvertisementCallbackOptionsAsync(); @@ -86,7 +86,7 @@ public async Task PangleGlobalNotify([FromQuery] AdvertisementPangle /// 发放成功后保留对 的写入(C75/C91 应用作用域事实,范围外不动)。 /// [PublicCallbackEndpoint("admob", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{packageId:long?}")] public async Task AdMobNotify([FromQuery] AdMobCallbackRequest input) { var result = await _advertisementRewardService.ReceiveAdMobAsync(); @@ -107,7 +107,7 @@ public async Task AdMobNotify([FromQuery] AdMobCallbackRequest input /// 验签 + 幂等账本 + 发奖由 处理(C114 新增端点)。 /// [PublicCallbackEndpoint("unityads", "ad")] - [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{packageId:long?}")] public async Task UnityAdsNotify([FromQuery] AdvertisementUnityAdsCallbackRequest input) { var result = await _advertisementRewardService.ReceiveUnityAdsAsync(); @@ -197,4 +197,4 @@ public sealed class PlayerSendAdvertisementItemRequest public sealed class PlayerSendAdvertisementItemResponse { } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs index 228edf73..eea46aaf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs @@ -100,7 +100,7 @@ public async Task> NotifyApple() if (applePaymentOptionSetting == null || applePayNotificationPayload == null || string.IsNullOrWhiteSpace(transactionPayloadJson)) { - LogHelper.Error("Apple支付配置未找到或 JWS 签名验证失败。请检查 tenantId/appId/env 对应的后台支付配置"); + LogHelper.Error("Apple支付配置未找到或 JWS 签名验证失败。请检查后台支付配置和 Apple 环境"); Response.StatusCode = 400; return HttpJsonResultData.ValidationError(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs index f9241f1f..c5c297d9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs @@ -36,15 +36,15 @@ public class PaymentOptionSettingProvider : IPaymentOptionSettingProvider PropertyNameCaseInsensitive = true, }; - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _database; private readonly IHttpContextAccessor _httpContextAccessor; /// /// 支付配置提供器实现 /// - public PaymentOptionSettingProvider(ISqlSugarClient tenantDbProvider, IHttpContextAccessor httpContextAccessor) + public PaymentOptionSettingProvider(ISqlSugarClient database, IHttpContextAccessor httpContextAccessor) { - _tenantDbProvider = tenantDbProvider; + _database = database; _httpContextAccessor = httpContextAccessor; } @@ -74,7 +74,7 @@ public IEnumerable GetOptionSettings(string channelName) } var context = _httpContextAccessor.HttpContext; - var packageId = ResolveCurrentPackageId(context, _tenantDbProvider); + var packageId = ResolveCurrentPackageId(context, _database); return GetPaymentConfigs(normalizedChannel, packageId) .Where(config => !string.IsNullOrWhiteSpace(config.ConfigJson)) // C372(GFX-838):支付配置读取边界字段级解密(C371 起库内敏感字段密文; @@ -120,7 +120,7 @@ public IEnumerable GetOptionSettings(string channelName) where T : class, private List GetPaymentConfigs(string channelName, long? packageId) { var context = _httpContextAccessor.HttpContext; - var db = _tenantDbProvider; + var db = _database; var environments = GetRequestedEnvironments(context); var hasPackageId = packageId.HasValue; var packageIdValue = packageId.GetValueOrDefault(); @@ -163,8 +163,7 @@ private List GetPaymentConfigs(string channelName /// /// 按公开回调路由规范化支付渠道的回调通知地址(C401,GFX-1213):站点根地址自动补全路由段 - /// (含当前分包段),旧「回调/{tenantId}/{appId}/{packageId}」三段地址自动去段重建; - /// 无法识别的地址置空并由支付处理器按「通知地址未配置」拒绝下单,避免网关回调打在无法命中的地址上 + /// (含当前分包段);旧地址无法识别时置空并由支付处理器按「通知地址未配置」拒绝下单,避免网关回调打在无法命中的地址上 /// 导致已付款订单不发货。其余渠道地址原样透传。 /// /// 渠道名称(已小写规范化)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs index c0b7e928..663b667a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs @@ -109,14 +109,14 @@ private static async Task Main(string[] args) builder.Services.AddSingleton(); // 仅依赖 ICache + IOptions builder.Services.AddTransient(); // 订单发货/退款服务 builder.Services.AddSingleton(); // 包名解析服务 - builder.Services.AddSingleton(); // 公开 provider 回调 URL -> 租户/应用上下文解析 - // Client API 请求期租户配置 Provider:依赖 IHttpContextAccessor + ISqlSugarClient,按请求作用域读取租户库配置 + builder.Services.AddSingleton(); // 公开 provider 回调 URL -> 分包上下文解析 + // Client API 请求期配置 Provider:依赖 IHttpContextAccessor + ISqlSugarClient,按请求读取主库配置 builder.Services.AddScoped(); // 广告奖励发放账本服务(C114 / GFX-110):依赖 Repository + IClientApiTenantOptionsProvider + HttpClient + IHttpContextAccessor builder.Services.AddAdvertisementCallbacks(); builder.Services.AddScoped(); builder.Services.AddScoped(); - // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 租户仓储,随请求作用域解析) + // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 主库仓储,随请求作用域解析) builder.Services.AddScoped(); // 邮件分域:租户业务邮件(玩家注册 / 找回密码);平台系统邮件(SystemMessageService 等)走 ISystemEmailSender builder.Services.AddScoped(); @@ -124,7 +124,7 @@ private static async Task Main(string[] args) GameFrameX.Application.Platform.Email.SystemEmailSender>(); // Token / Ticket 签发服务依赖 IClientApiTenantOptionsProvider(Scoped),必须随之降为 Scoped builder.Services.AddScoped(); - // C7 登录会话密钥签发:依赖 Scoped 租户仓储(SqlSugarRepository<>),随请求作用域 + // C7 登录会话密钥签发:依赖 Scoped 主库仓储(SqlSugarRepository<>),随请求作用域 builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); @@ -224,4 +224,4 @@ private static async Task Main(string[] args) throw; } } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs index 5a6021ba..bfec29c4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs @@ -14,7 +14,7 @@ namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; /// public sealed class ClientApiTenantOptionsProvider : IClientApiTenantOptionsProvider { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _database; private readonly IHttpContextAccessor _httpContextAccessor; private TenantClientApiPolicyEntity? _effectivePolicyRow; @@ -22,7 +22,7 @@ public sealed class ClientApiTenantOptionsProvider : IClientApiTenantOptionsProv public ClientApiTenantOptionsProvider(ISqlSugarClient database, IHttpContextAccessor httpContextAccessor) { - _tenantDbProvider = database; + _database = database; _httpContextAccessor = httpContextAccessor; } @@ -30,7 +30,7 @@ public ClientApiTenantOptionsProvider(ISqlSugarClient database, IHttpContextAcce #pragma warning disable CS8603 // 接口 IClientApiTenantOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake public async Task GetEmailOptionsAsync() { - var db = _tenantDbProvider; + var db = _database; var entity = await TenantEmailConfigSelector.SelectAsync(db, 0); return entity == null ? null @@ -84,7 +84,7 @@ public async Task GetAdvertisementCallbackOp private async Task PickAdvertisementCallbackConfigAsync() { - var db = _tenantDbProvider; + var db = _database; var provider = ResolvePublicCallbackProvider(_httpContextAccessor.HttpContext); var query = db.Queryable() .Where(c => c.IsEnabled == true); @@ -151,7 +151,7 @@ public async Task GetAreaPolicyAsync() { if (!_effectivePolicyRowFetched) { - _effectivePolicyRow = await _tenantDbProvider.Queryable() + _effectivePolicyRow = await _database.Queryable() .Where(c => c.IsEnabled == true) .OrderByDescending(c => c.Id) .FirstAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs index b7bf6896..a5c70919 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs @@ -12,12 +12,12 @@ namespace GameFrameX.Client.Api.Services.GameLoginTicket; /// public sealed class GameLoginTicketKeyResolver : IGameLoginTicketKeyResolver { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _database; private readonly IClientApiTenantOptionsProvider _optionsProvider; - public GameLoginTicketKeyResolver(ISqlSugarClient tenantDbProvider, IClientApiTenantOptionsProvider optionsProvider) + public GameLoginTicketKeyResolver(ISqlSugarClient database, IClientApiTenantOptionsProvider optionsProvider) { - _tenantDbProvider = tenantDbProvider; + _database = database; _optionsProvider = optionsProvider; } @@ -65,7 +65,7 @@ public async Task> GetPublicKeysAs /// private async Task> GetActiveKeyEntitiesAsync(long now) { - var db = _tenantDbProvider; + var db = _database; return await db.Queryable() .Where(x => x.IsEnabled != false && x.Algorithm == GameLoginTicketSigningKey.AlgorithmRs256 && @@ -81,7 +81,7 @@ private async Task> GetActiveKeyEntitiesAsy /// private async Task CreateRsaKeyEntityAsync(long now) { - var db = _tenantDbProvider; + var db = _database; using (var rsa = RSA.Create(2048)) { var entity = new TenantGameLoginTicketKeyEntity diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/IAppAttestationVerifier.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/IAppAttestationVerifier.cs index 608eb21e..b7b5f819 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/IAppAttestationVerifier.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/IAppAttestationVerifier.cs @@ -10,8 +10,7 @@ public interface IAppAttestationVerifier /// /// 校验当前请求是否满足应用签名 / 设备证明要求。 /// - /// 当前应用 ID /// 当前 HTTP 上下文 /// 校验通过返回 true,否则 false - Task VerifyAsync(long appId, HttpContext context); -} \ No newline at end of file + Task VerifyAsync(HttpContext context); +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/NullAppAttestationVerifier.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/NullAppAttestationVerifier.cs index 4fc60caf..1f9a7a59 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/NullAppAttestationVerifier.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/NullAppAttestationVerifier.cs @@ -8,8 +8,8 @@ namespace GameFrameX.Client.Api.Services; public class NullAppAttestationVerifier : IAppAttestationVerifier { /// - public Task VerifyAsync(long appId, HttpContext context) + public Task VerifyAsync(HttpContext context) { throw new NotImplementedException("应用签名/设备证明校验由衍生 change 实现"); } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs index fdc215a1..7619cab9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs @@ -21,11 +21,11 @@ namespace GameFrameX.Client.Api.Services.PackageVersion; public class GameAppPackageResolver { private PackageCache? _cache; - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _database; - public GameAppPackageResolver(ISqlSugarClient tenantDbProvider) + public GameAppPackageResolver(ISqlSugarClient database) { - _tenantDbProvider = tenantDbProvider; + _database = database; } /// @@ -62,7 +62,7 @@ public string Resolve(string sourcePackageName) /// private PackageCache RefreshCacheIfChanged() { - var db = _tenantDbProvider; + var db = _database; var signal = GetSignal(db); if (_cache is { } existing && existing.Signal == signal) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs index 4eaa7ce2..59e1adcb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs @@ -4,23 +4,17 @@ namespace GameFrameX.Client.Api.Services.PublicCallback; /// /// 公开回调通知地址构造器。 -/// 管理员配置可能是:站点根地址(含反向代理前缀)、完整的新回调路由地址、或路由升级前遗留的 -/// 旧「回调/{tenantId}/{appId}/{packageId}」三段地址。本构造器统一规范化为能命中当前公开回调端点 -/// ({packageId} 可选路由模板)的完整地址:路由段之后遗留的纯数字尾段(至多 3 段)一律剥除后 -/// 按当前上下文重建,分包段以当前下单上下文的分包标识为准(无则生成不带分包段的主库地址)。 +/// 管理员配置可能是:站点根地址(含反向代理前缀)或完整的新回调路由地址。 +/// 本构造器统一规范化为能命中当前公开回调端点({packageId} 可选路由模板)的完整地址。 +/// 分包段以当前下单上下文的分包标识为准(无则生成不带分包段的主库地址)。 /// 无法识别的路径返回 null,由调用方在下单前拒绝,避免网关回调打在无法命中的地址上导致已付款订单不发货。 /// public static class PublicCallbackNotifyUrlBuilder { - /// - /// 路由升级前回调地址末尾携带的最大纯数字段数(租户 / 应用 / 分包三段)。 - /// - private const int LegacyRouteTailMaximum = 3; - /// /// 构造能命中公开回调端点的完整通知地址。 /// - /// 管理员配置的通知地址(站点根地址 / 完整新地址 / 旧三段地址)。 + /// 管理员配置的通知地址(站点根地址 / 完整新地址)。 /// 回调端点路由段(如 api/GameOrder/NotifyAliPay,不含分包段)。 /// 当前下单上下文的分包标识;无值时不生成分包段。 /// 完整回调地址;配置为空或无法识别时返回 null。 @@ -56,7 +50,7 @@ public static class PublicCallbackNotifyUrlBuilder /// /// 提取回调路由之前的站点前缀段:空路径(站点根)返回空列表; - /// 路径必须以回调路由段结尾(允许其后至多 3 段纯数字遗留尾段,剥除后不参与结果), + /// 路径必须以回调路由段结尾,或以回调路由段加单一 packageId 段结尾, /// 否则视为无法识别的地址返回 null。 /// /// 配置地址的路径段。 @@ -70,15 +64,11 @@ public static class PublicCallbackNotifyUrlBuilder } var effectiveSegments = pathSegments; - var numericTailCount = CountTrailingNumericSegments(pathSegments); - if (numericTailCount > 0) + if (pathSegments.Count > routeSegments.Count + && pathSegments[^1].All(char.IsDigit) + && EndsWithSegments(pathSegments.Take(pathSegments.Count - 1).ToList(), routeSegments)) { - if (numericTailCount > LegacyRouteTailMaximum) - { - return null; - } - - effectiveSegments = pathSegments.Take(pathSegments.Count - numericTailCount).ToList(); + effectiveSegments = pathSegments.Take(pathSegments.Count - 1).ToList(); } if (effectiveSegments.Count < routeSegments.Count || !EndsWithSegments(effectiveSegments, routeSegments)) @@ -89,27 +79,6 @@ public static class PublicCallbackNotifyUrlBuilder return effectiveSegments.Take(effectiveSegments.Count - routeSegments.Count).ToList(); } - /// - /// 统计路径末尾连续的纯数字段数量。 - /// - /// 路径段。 - /// 末尾连续纯数字段数量。 - private static int CountTrailingNumericSegments(List segments) - { - var count = 0; - for (var index = segments.Count - 1; index >= 0; index--) - { - if (segments[index].Length == 0 || !segments[index].All(char.IsDigit)) - { - break; - } - - count++; - } - - return count; - } - /// /// 判断段列表是否以指定路由段结尾(忽略大小写按段比较)。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/C116AntiCheatAndRiskEnforcementTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/C116AntiCheatAndRiskEnforcementTests.cs index 6667cd36..66b4e782 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/C116AntiCheatAndRiskEnforcementTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/C116/C116AntiCheatAndRiskEnforcementTests.cs @@ -32,7 +32,7 @@ public void Parser_Resolves_Default_Safe( public async Task NullAppAttestationVerifier_Throws_And_Never_Passes() { var verifier = new NullAppAttestationVerifier(); - await Assert.ThrowsAsync(() => verifier.VerifyAsync(1, null!)); + await Assert.ThrowsAsync(() => verifier.VerifyAsync(null!)); } [Fact] @@ -61,4 +61,4 @@ public void AntiCheatEnums_Lock_Expected_Values() Assert.Equal(3, (int)AntiCheatTargetTypeEnum.Device); Assert.Equal(4, (int)AntiCheatTargetTypeEnum.Ip); } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs index dc03bd54..7e846394 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs @@ -6,10 +6,10 @@ internal static class ClientApiEndpointCoverageMatrix { private static readonly ClientApiEndpointCoverage[] Endpoints = { - Endpoint("GameAdWebHook.TopOnNotify", "GET", "api/GameAdWebHook/TopOnNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid TopOn callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), - Endpoint("GameAdWebHook.PangleGlobalNotify", "GET", "api/GameAdWebHook/PangleGlobalNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid Pangle callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-app"), - Endpoint("GameAdWebHook.AdMobNotify", "GET", "api/GameAdWebHook/AdMobNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid AdMob callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-tenant"), - Endpoint("GameAdWebHook.UnityAdsNotify", "GET", "api/GameAdWebHook/UnityAdsNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid UnityAds callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback"), + Endpoint("GameAdWebHook.TopOnNotify", "GET", "api/GameAdWebHook/TopOnNotify/{packageId:long?}", "ad-callback", false, false, false, true, "valid TopOn callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), + Endpoint("GameAdWebHook.PangleGlobalNotify", "GET", "api/GameAdWebHook/PangleGlobalNotify/{packageId:long?}", "ad-callback", false, false, false, true, "valid Pangle callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), + Endpoint("GameAdWebHook.AdMobNotify", "GET", "api/GameAdWebHook/AdMobNotify/{packageId:long?}", "ad-callback", false, false, false, true, "valid AdMob callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), + Endpoint("GameAdWebHook.UnityAdsNotify", "GET", "api/GameAdWebHook/UnityAdsNotify/{packageId:long?}", "ad-callback", false, false, false, true, "valid UnityAds callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback"), Endpoint("GameAnnouncement.List", "GET", "api/GameAnnouncementService/List", "announcement", true, true, false, false, "lists enabled announcements by language", "missing-tenant", "disabled-record-hidden"), Endpoint("GameAnnouncement.ListByAreaId", "POST", "api/GameAnnouncementService/ListByAreaId", "announcement", true, true, false, false, "lists enabled area announcements", "missing-tenant", "area-not-found"), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs index 1d7236a0..068957e2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs @@ -1,8 +1,15 @@ using GameFrameX.Client.Api.GameAnnouncement; using GameFrameX.Client.Api.GameUser; +using GameFrameX.Client.Api.Integrations.Advertisement; using System.Reflection; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Routing; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.TestHost; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; namespace GameFrameX.Core.Tests.ClientApi; @@ -72,6 +79,32 @@ public void AccountLoginEndpoints_ProtectPascalCaseAccessTokenContract() Assert.All(loginEndpoints, endpoint => Assert.Contains("pascal-case", endpoint.FailureCases)); } + [Fact] + public async Task AdvertisementCallback_LegacyThreeSegmentRoute_ReturnsNotFound() + { + using var host = await new HostBuilder() + .ConfigureWebHost(webBuilder => + { + webBuilder.UseTestServer(); + webBuilder.ConfigureServices(services => + { + services.AddRouting(); + services.AddControllers().AddApplicationPart(typeof(GameAdWebHookController).Assembly); + }); + webBuilder.Configure(app => + { + app.UseRouting(); + app.UseEndpoints(endpoints => endpoints.MapControllers()); + }); + }) + .StartAsync(); + + using var client = host.GetTestClient(); + var response = await client.GetAsync("/api/GameAdWebHook/TopOnNotify/100/200/300"); + + Assert.Equal(StatusCodes.Status404NotFound, (int)response.StatusCode); + } + private static IReadOnlyDictionary DiscoverClientApiActions() { var controllerTypes = typeof(GameUserController).Assembly diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs index 127dd113..c915a8a5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs @@ -179,26 +179,34 @@ public async Task GameRole_Login_IssuesGameTicketForOwnedRole() } [Fact] - public async Task GameRole_Login_RejectsBodyContextOverrideFields() + public async Task GameRole_Login_IgnoresUnknownLegacyContextFields() { using var db = new ClientApiTestDb(); - var controller = CreateController(db); + db.SeedUser(1001, "legacy-fields-user"); + db.SeedAreaClassify(10); + db.SeedArea(2001, 10); + db.SeedRole(3001, 1001, 2001); + db.InitTenantTables(typeof(TenantGameUserEntity)); + var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); + var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); + var controller = CreateController(db, ClientApiRecordingHttpHandler.WithGameServerDefaults(), issuer); db.AttachContext(controller); var result = await controller.Login(new GamePlayerLoginRequest { PlayerId = 3001, AreaId = 2001, - AccessToken = "token", + AccessToken = accessToken.Token, ExtraFields = new Dictionary { ["tenantId"] = JsonDocument.Parse("10").RootElement.Clone(), + ["appId"] = JsonDocument.Parse("20").RootElement.Clone(), + ["gameAppId"] = JsonDocument.Parse("30").RootElement.Clone(), }, }); var root = ClientApiResultReader.Read(result); - Assert.Equal((int)AuthErrorCode.AuthorizeInvalid, ClientApiResultReader.Code(root)); - Assert.Equal("请求体不能包含租户、应用或账号上下文字段", ClientApiResultReader.Message(root)); + Assert.Equal(0, ClientApiResultReader.Code(root)); } [Fact] @@ -268,4 +276,4 @@ public Task> GetPublicKeysAsync() return Task.FromResult(keys); } } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs index 3a94152b..ed3274b7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs @@ -62,7 +62,7 @@ public async Task GameWebShop_Buy_BuildsCallbackUrlFromSiteRootWithPackageSegmen } [Fact] - public async Task GameWebShop_Buy_NormalizesLegacyThreeSegmentCallbackUrl() + public async Task GameWebShop_Buy_RejectsLegacyThreeSegmentCallbackUrl() { using var db = new ClientApiTestDb(); db.SeedAreaClassify(10); @@ -83,11 +83,9 @@ public async Task GameWebShop_Buy_NormalizesLegacyThreeSegmentCallbackUrl() }); var root = ClientApiResultReader.Read(result); - Assert.Equal(0, ClientApiResultReader.Code(root)); - // 旧「回调/租户/应用/分包」三段地址被去段重建,只保留新路由 + 当前分包段 - Assert.Contains(handler.RequestBodies, requestBody => requestBody.Contains("NotifyWebShop%2F7001", StringComparison.Ordinal)); - Assert.DoesNotContain(handler.RequestBodies, requestBody => requestBody.Contains("NotifyWebShop%2F123", StringComparison.Ordinal)); - Assert.DoesNotContain(handler.RequestBodies, requestBody => requestBody.Contains("NotifyWebShop%2F456", StringComparison.Ordinal)); + Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(root)); + // 旧三段地址不再去段重建:下单前拒绝,不提交网关 + Assert.DoesNotContain("/submit.php", handler.RequestPaths); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs index fce81e2f..17e935e4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs @@ -107,7 +107,7 @@ public void PaymentProvider_BuildsCallbackUrlFromSiteRootWithoutPackageContext() } [Fact] - public void PaymentProvider_NormalizesLegacyThreeSegmentCallbackUrl() + public void PaymentProvider_RejectsLegacyThreeSegmentCallbackUrl() { using (var fixture = CreateFixture()) { @@ -115,9 +115,9 @@ public void PaymentProvider_NormalizesLegacyThreeSegmentCallbackUrl() var context = new DefaultHttpContext(); var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); var setting = provider.GetOptionSetting("alipay"); - // 旧「租户/应用/分包」三段地址去段重建为新路由(无分包上下文时不带分包段) + // 旧三段地址不再去段重建,避免静默兼容已退场的作用域路由 Assert.NotNull(setting); - Assert.Equal("https://client.example.com/api/GameOrder/NotifyAliPay", setting.AliPayNotifyUrl); + Assert.Equal(string.Empty, setting.AliPayNotifyUrl); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs index ce026c62..d8f40512 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs @@ -94,8 +94,7 @@ public async Task PostAsync_Respects_CustomOnlineAdminPrefix_FromArea() } /// - /// 作用域注入:POST 请求体顶层强制携带 ServerId,丢弃旧租户与应用字段;业务体自带的伪作用域字段被鉴权值覆盖 - ///(「以鉴权与服务端路由为准,客户端字段不可直接覆盖」vault 契约);业务字段原样保留。 + /// 作用域注入:POST 请求体顶层强制携带 ServerId,未知字段被白名单丢弃;业务体自带的伪作用域字段被鉴权值覆盖。 /// [Fact] public async Task PostAsync_MergesScopeIntoPayload_OverridingClientScopeFields() @@ -105,11 +104,15 @@ public async Task PostAsync_MergesScopeIntoPayload_OverridingClientScopeFields() var handler = new FakeHandler(SuccessEnvelope(new OnlineDemoData { PlayerId = "p-1", })); var client = CreateClient(handler); - await client.PostAsync("kick_player", new { TenantId = 999L, AppId = 888L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, }, await CreateScopeAsync()); + await client.PostAsync("kick_player", new { tenantId = 999L, appId = 888L, gameAppId = 777L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, UnknownField = "drop-me", }, await CreateScopeAsync()); var body = handler.LastRequestBodyJson; Assert.False(body.ContainsKey("TenantId")); Assert.False(body.ContainsKey("AppId")); + Assert.False(body.ContainsKey("tenantId")); + Assert.False(body.ContainsKey("appId")); + Assert.False(body.ContainsKey("gameAppId")); + Assert.False(body.ContainsKey("UnknownField")); Assert.Equal(Area1001, Convert.ToInt64(body["ServerId"]?.ToString())); Assert.Equal("request-1", body["RequestId"]?.ToString()); Assert.Equal("key-1", body["IdempotencyKey"]?.ToString()); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs index 66a6ddcc..aa891591 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs @@ -18,9 +18,9 @@ namespace GameFrameX.Core.Tests.System; /// -/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 主库(superadmin seed)+ 租户库(tenant_user seed)+ +/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 主库(superadmin seed)+ 业务用户测试连接(tenant_user seed)+ /// 手写 fake(3 接口)+ CurrentUserContext 真实 + SystemConfigService 真实(FakeCache)+ ICaptcha/IServiceProvider null!(captcha IsEnabled=false 路径不调用)。 -/// C218 扩展:主库 + 租户库双连接 scope(configId=main/1001),FakeTenantDbConnectionProvider 返回租户 scope; +/// C218 扩展:主库 + 业务测试连接双 scope(configId=main/1001)。 /// DefaultHttpContext 供 CreateTokenAsync 写响应头;FakePlatformJwtTokenService 捕获 payload 供 Claim 校验。 /// internal sealed class AuthTestHost : IDisposable diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeTenantDbConnectionProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeTenantDbConnectionProvider.cs deleted file mode 100644 index c2328e15..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeTenantDbConnectionProvider.cs +++ /dev/null @@ -1,23 +0,0 @@ -using GameFrameX.Core.Service.Tenant; -using SqlSugar; - -namespace GameFrameX.Core.Tests.System; - -internal sealed class FakeTenantDbConnectionProvider -{ - private readonly SqlSugarScope _client; - private readonly string _tenantConfigId; - - public FakeTenantDbConnectionProvider(SqlSugarScope client, string tenantConfigId) - { - _client = client; - _tenantConfigId = tenantConfigId; - } - - public ISqlSugarClient Database => _client.GetConnectionScope(_tenantConfigId); - - public SqlSugarScopeProvider GetTenantDbConnectionScope(long tenantId) - { - return _client.GetConnectionScope(_tenantConfigId); - } -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs index 7fe34d8f..72daaa94 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs @@ -21,7 +21,7 @@ public class GameHomeServiceTests : IDisposable private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"game_home_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _db; - private readonly FakeTenantDbConnectionProvider _tenantDbProvider; + private readonly ISqlSugarClient _database; public GameHomeServiceTests() { @@ -46,13 +46,13 @@ public GameHomeServiceTests() tenantScope.CodeFirst.InitTables(); tenantScope.CodeFirst.InitTables(); tenantScope.CodeFirst.InitTables(); - _tenantDbProvider = new FakeTenantDbConnectionProvider(_db, TenantConfigId); + _database = _db.GetConnectionScope(TenantConfigId); } private GameHomeService CreateService(HttpClient? httpClient = null) { var client = httpClient ?? new HttpClient(new StubHandler(_ => throw new InvalidOperationException("should not call"))); - return new GameHomeService(new StubHttpClientFactory(client), _tenantDbProvider.Database); + return new GameHomeService(new StubHttpClientFactory(client), _database); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs index 95fb0a0f..9b6f866e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/ProtoVersionMiddleware.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Core.Middleware; /// endpoint metadata 实现 的入口(外部平台 S2S 回调)豁免。 /// AuditOnly 语义:头值不在白名单()只记 Warning 日志放行, /// 不拦截——待不兼容 major 变更时才收紧为强制拒绝。 -/// 挂载点:管线最外层就近(TenantResolution 之后),先于签名/信封——版本观察与密钥态无关。 +/// 挂载点:请求上下文建立之后,先于签名/信封——版本观察与密钥态无关。 /// public sealed class ProtoVersionMiddleware { @@ -34,7 +34,7 @@ public async Task InvokeAsync(HttpContext context, IOptions return; } - // 缺版本头一律拒绝;记录 path/appId 便于定位未携带头的接入方 + // 缺版本头一律拒绝;记录路径便于定位未携带头的接入方 logger.LogWarning("缺失协议版本头,拒绝请求:path={Path}", context.Request.Path); await MiddlewareResponseWriter.WriteRejectedAsync(context, StatusCodes.Status400BadRequest, "缺少协议版本头(X-Proto-Ver)"); return; @@ -43,11 +43,11 @@ public async Task InvokeAsync(HttpContext context, IOptions var options = optionsAccessor.Value; if (!options.AllowedVersions.Contains(headerValue, StringComparer.Ordinal)) { - // AuditOnly:只告警不拦截(major 变更时才收紧);记录 appId/租户便于定位未升级客户端 + // AuditOnly:只告警不拦截(major 变更时才收紧) logger.LogWarning("未知协议版本放行(AuditOnly):protoVer={ProtoVer} allowed=[{Allowed}] path={Path}", headerValue, string.Join(",", options.AllowedVersions), context.Request.Path); } await _next(context); } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs index f85ff23a..4a638fb8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs @@ -8,11 +8,11 @@ namespace GameFrameX.Core.Middleware; /// public sealed class SessionKeyResolver : ISessionKeyResolver { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _database; - public SessionKeyResolver(ISqlSugarClient tenantDbProvider) + public SessionKeyResolver(ISqlSugarClient database) { - _tenantDbProvider = tenantDbProvider; + _database = database; } /// @@ -56,7 +56,7 @@ internal static SessionKeyLookupResult Judge(TenantSessionKeyEntity key, long no private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _tenantDbProvider.Queryable().ClearFilter() + return await _database.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs index 303954b8..c183121b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs @@ -8,11 +8,11 @@ namespace GameFrameX.Core.Middleware; /// public sealed class SignatureKeyResolver : ISignatureKeyResolver { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _database; - public SignatureKeyResolver(ISqlSugarClient tenantDbProvider) + public SignatureKeyResolver(ISqlSugarClient database) { - _tenantDbProvider = tenantDbProvider; + _database = database; } /// @@ -32,7 +32,7 @@ public async Task ResolveAsync(string kid) public async Task> GetActiveKeysAsync() { var now = TimerHelper.UnixTimeSeconds(); - var keys = await _tenantDbProvider.Queryable().ClearFilter() + var keys = await _database.Queryable().ClearFilter() .Where(key => key.IsDeleted == false && key.IsEnabled == true && (key.NotBeforeTime == null || key.NotBeforeTime <= now) && (key.ExpireTime == null || key.ExpireTime > now)).ToListAsync(); @@ -71,7 +71,7 @@ internal static SignatureKeyLookupResult Judge(TenantAppSignatureKeyEntity key, private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _tenantDbProvider.Queryable().ClearFilter() + return await _database.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } From 56c0390e868c02d11e4674cd95966d18a6a974fe Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:10:39 +0800 Subject: [PATCH 20/86] =?UTF-8?q?feat:=20=E9=87=8D=E5=AF=BC=20openapi=20?= =?UTF-8?q?=E5=B9=B6=E9=87=8D=E6=96=B0=E7=94=9F=E6=88=90=20Vue=20API=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=EF=BC=88C406=20=E6=94=B9=E5=90=8D?= =?UTF-8?q?=E5=90=8E=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Web.Api 隔离实例(SQLite / 端口 21104)导出 swagger.json; pnpm gen:api 重新生成 src/api/**:tenant* 目录更名为去前缀目录 (tenantUser→user 等 3 组 6 删 6 增),88 文件同步。 Linear: GFX-1232 --- GameFrameX.Admin.Unified.Vue/openapi.json | 36180 ++++++++-------- .../src/api/_shared/data-contracts.ts | 9 +- .../api/advertisementCallbackConfig/index.ts | 12 +- .../api/advertisementCallbackConfig/types.ts | 6 +- .../src/api/appSignatureKey/index.ts | 4 +- .../src/api/appSignatureKey/types.ts | 2 +- .../src/api/clientApiPolicy/index.ts | 12 +- .../src/api/clientApiPolicy/types.ts | 6 +- .../src/api/deviceGroup/index.ts | 8 +- .../src/api/deviceGroup/types.ts | 4 +- .../src/api/file/index.ts | 220 + .../src/api/{tenantFile => file}/types.ts | 103 +- .../src/api/gameAdvertisementReward/index.ts | 14 +- .../src/api/gameAdvertisementReward/types.ts | 8 +- .../src/api/gameAnnouncement/index.ts | 12 +- .../src/api/gameAnnouncement/types.ts | 6 +- .../src/api/gameAntiCheatEvent/index.ts | 12 +- .../src/api/gameAntiCheatEvent/types.ts | 6 +- .../src/api/gameAppDevice/index.ts | 8 +- .../src/api/gameAppDevice/types.ts | 4 +- .../src/api/gameAppOpenAccess/index.ts | 12 +- .../src/api/gameAppOpenAccess/types.ts | 8 +- .../src/api/gameArea/index.ts | 12 +- .../src/api/gameArea/types.ts | 6 +- .../src/api/gameAreaClassify/index.ts | 12 +- .../src/api/gameAreaClassify/types.ts | 6 +- .../src/api/gameBannerAnnouncement/index.ts | 12 +- .../src/api/gameBannerAnnouncement/types.ts | 6 +- .../src/api/gameCommodity/index.ts | 12 +- .../src/api/gameCommodity/types.ts | 8 +- .../src/api/gameDockerTag/index.ts | 12 +- .../src/api/gameDockerTag/types.ts | 6 +- .../src/api/gameGoods/index.ts | 12 +- .../src/api/gameGoods/types.ts | 6 +- .../src/api/gameGoodsCatalogue/index.ts | 12 +- .../src/api/gameGoodsCatalogue/types.ts | 6 +- .../src/api/gameLoginTicketKey/index.ts | 4 +- .../src/api/gameLoginTicketKey/types.ts | 2 +- .../src/api/gameMail/index.ts | 12 +- .../src/api/gameMail/types.ts | 6 +- .../src/api/gameMailCampaign/index.ts | 12 +- .../src/api/gameMailCampaign/types.ts | 6 +- .../src/api/gameMailTemplate/index.ts | 12 +- .../src/api/gameMailTemplate/types.ts | 6 +- .../src/api/gameMailTemplateCategory/index.ts | 12 +- .../src/api/gameMailTemplateCategory/types.ts | 6 +- .../src/api/gameOnlineConfigRollout/index.ts | 4 +- .../src/api/gameOnlineConfigRollout/types.ts | 2 +- .../src/api/gameOnlinePlayerSegment/index.ts | 12 +- .../src/api/gameOnlinePlayerSegment/types.ts | 6 +- .../src/api/gameOrder/index.ts | 16 +- .../src/api/gameOrder/types.ts | 6 +- .../src/api/gameOrderFulfillment/index.ts | 10 +- .../src/api/gameOrderFulfillment/types.ts | 6 +- .../src/api/gamePenalty/index.ts | 20 +- .../src/api/gamePenalty/types.ts | 10 +- .../src/api/gamePenaltyAppeal/index.ts | 16 +- .../src/api/gamePenaltyAppeal/types.ts | 10 +- .../src/api/gameRedeemCode/index.ts | 12 +- .../src/api/gameRedeemCode/types.ts | 6 +- .../src/api/gameRedeemCodeChannel/index.ts | 12 +- .../src/api/gameRedeemCodeChannel/types.ts | 6 +- .../src/api/gameRedeemCodeUseRecord/index.ts | 54 +- .../src/api/gameRedeemCodeUseRecord/types.ts | 20 +- .../src/api/gameReport/index.ts | 16 +- .../src/api/gameReport/types.ts | 8 +- .../src/api/gameRewardTemplate/index.ts | 12 +- .../src/api/gameRewardTemplate/types.ts | 6 +- .../src/api/gameRewardTemplateGroup/index.ts | 12 +- .../src/api/gameRewardTemplateGroup/types.ts | 6 +- .../src/api/gameRole/index.ts | 18 +- .../src/api/gameRole/types.ts | 6 +- .../src/api/gameTimeJob/index.ts | 12 +- .../src/api/gameTimeJob/types.ts | 6 +- .../src/api/gameUser/index.ts | 20 +- .../src/api/gameUser/types.ts | 8 +- .../src/api/gameWebShop/index.ts | 12 +- .../src/api/gameWebShop/types.ts | 6 +- .../src/api/gameWebShopOrder/index.ts | 12 +- .../src/api/gameWebShopOrder/types.ts | 6 +- .../src/api/globalMenu/index.ts | 2 +- .../src/api/globalMenu/types.ts | 13 +- .../src/api/logDiff/types.ts | 1 - .../src/api/logVisit/types.ts | 1 - .../src/api/objectStorageConfig/index.ts | 12 +- .../src/api/objectStorageConfig/types.ts | 6 +- .../src/api/onlineControlledCommand/types.ts | 2 +- .../src/api/onlinePenaltyLinkCommand/types.ts | 2 +- .../api/platformPasswordPolicyConfig/index.ts | 2 +- .../src/api/role/index.ts | 188 + .../src/api/{tenantRole => role}/types.ts | 58 +- .../src/api/sessionKey/index.ts | 4 +- .../src/api/sessionKey/types.ts | 2 +- .../src/api/tenantFile/index.ts | 226 - .../src/api/tenantRole/index.ts | 197 - .../src/api/tenantUser/index.ts | 254 - .../src/api/user/index.ts | 236 + .../src/api/{tenantUser => user}/types.ts | 206 +- 98 files changed, 19175 insertions(+), 19493 deletions(-) create mode 100644 GameFrameX.Admin.Unified.Vue/src/api/file/index.ts rename GameFrameX.Admin.Unified.Vue/src/api/{tenantFile => file}/types.ts (74%) create mode 100644 GameFrameX.Admin.Unified.Vue/src/api/role/index.ts rename GameFrameX.Admin.Unified.Vue/src/api/{tenantRole => role}/types.ts (85%) delete mode 100644 GameFrameX.Admin.Unified.Vue/src/api/tenantFile/index.ts delete mode 100644 GameFrameX.Admin.Unified.Vue/src/api/tenantRole/index.ts delete mode 100644 GameFrameX.Admin.Unified.Vue/src/api/tenantUser/index.ts create mode 100644 GameFrameX.Admin.Unified.Vue/src/api/user/index.ts rename GameFrameX.Admin.Unified.Vue/src/api/{tenantUser => user}/types.ts (94%) diff --git a/GameFrameX.Admin.Unified.Vue/openapi.json b/GameFrameX.Admin.Unified.Vue/openapi.json index dea8fb4c..f8337c58 100644 --- a/GameFrameX.Admin.Unified.Vue/openapi.json +++ b/GameFrameX.Admin.Unified.Vue/openapi.json @@ -16,17 +16,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/AddAdvertisementCallbackConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/AddAdvertisementCallbackConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/AddAdvertisementCallbackConfigRequest" } } } @@ -432,17 +432,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/PageAdvertisementCallbackConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/PageAdvertisementCallbackConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/PageAdvertisementCallbackConfigRequest" } } } @@ -994,17 +994,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/UpdateAdvertisementCallbackConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/UpdateAdvertisementCallbackConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantAdvertisementCallbackConfigRequest" + "$ref": "#/components/schemas/UpdateAdvertisementCallbackConfigRequest" } } } @@ -1320,17 +1320,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantAppSignatureKeyRequest" + "$ref": "#/components/schemas/PageAppSignatureKeyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantAppSignatureKeyRequest" + "$ref": "#/components/schemas/PageAppSignatureKeyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantAppSignatureKeyRequest" + "$ref": "#/components/schemas/PageAppSignatureKeyRequest" } } } @@ -3026,17 +3026,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/AddClientApiPolicyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/AddClientApiPolicyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/AddClientApiPolicyRequest" } } } @@ -3442,17 +3442,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/PageClientApiPolicyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/PageClientApiPolicyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/PageClientApiPolicyRequest" } } } @@ -3669,17 +3669,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/UpdateClientApiPolicyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/UpdateClientApiPolicyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantClientApiPolicyRequest" + "$ref": "#/components/schemas/UpdateClientApiPolicyRequest" } } } @@ -3703,17 +3703,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantDeviceGroupRequest" + "$ref": "#/components/schemas/AddDeviceGroupRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantDeviceGroupRequest" + "$ref": "#/components/schemas/AddDeviceGroupRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantDeviceGroupRequest" + "$ref": "#/components/schemas/AddDeviceGroupRequest" } } } @@ -4719,17 +4719,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantDeviceGroupRequest" + "$ref": "#/components/schemas/UpdateDeviceGroupRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantDeviceGroupRequest" + "$ref": "#/components/schemas/UpdateDeviceGroupRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantDeviceGroupRequest" + "$ref": "#/components/schemas/UpdateDeviceGroupRequest" } } } @@ -4741,28 +4741,97 @@ } } }, - "/api/gameAdvertisementReward/add": { + "/api/file/delete": { "post": { "tags": [ - "gameAdvertisementReward" + "file" ], - "summary": "新增", - "operationId": "GameAdvertisementRewardAddPost", + "summary": "删除文件", + "operationId": "FileDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAdvertisementRewardEntityRequest" + "$ref": "#/components/schemas/DeleteFileRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAdvertisementRewardEntityRequest" + "$ref": "#/components/schemas/DeleteFileRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAdvertisementRewardEntityRequest" + "$ref": "#/components/schemas/DeleteFileRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/file/downloadFile": { + "post": { + "tags": [ + "file" + ], + "summary": "根据文件Id或Url下载", + "operationId": "FileDownloadFilePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FileRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FileRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/file/page": { + "post": { + "tags": [ + "file" + ], + "summary": "获取文件分页列表", + "operationId": "FilePagePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageFileRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageFileRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageFileRequest" } } } @@ -4795,7 +4864,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + "$ref": "#/components/schemas/FileResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -4848,7 +4917,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + "$ref": "#/components/schemas/FileResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -4901,7 +4970,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + "$ref": "#/components/schemas/FileResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -4935,29 +5004,29 @@ } } }, - "/api/gameAdvertisementReward/delete": { + "/api/file/update": { "post": { "tags": [ - "gameAdvertisementReward" + "file" ], - "summary": "删除", - "operationId": "GameAdvertisementRewardDeletePost", + "summary": "更新文件", + "operationId": "FileUpdatePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/FileRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/FileRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/FileRequest" } } } @@ -4969,26 +5038,37 @@ } } }, - "/api/gameAdvertisementReward/detail": { - "get": { + "/api/file/uploadAvatar": { + "post": { "tags": [ - "gameAdvertisementReward" + "file" ], - "summary": "详情", - "operationId": "GameAdvertisementRewardDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "上传头像", + "operationId": "FileUploadAvatarPost", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "file" + ], + "type": "object", + "properties": { + "file": { + "type": "string", + "description": "", + "format": "binary" + } + } + }, + "encoding": { + "file": { + "style": "form" + } + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -5017,7 +5097,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5070,7 +5150,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5123,7 +5203,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5157,28 +5237,43 @@ } } }, - "/api/gameAdvertisementReward/export": { + "/api/file/uploadFile": { "post": { "tags": [ - "gameAdvertisementReward" + "file" + ], + "summary": "上传文件", + "operationId": "FileUploadFilePost", + "parameters": [ + { + "name": "path", + "in": "query", + "description": "", + "schema": { + "type": "string" + } + } ], - "summary": "导出当前过滤条件下的账本列表(上限 1000 行;文件化由前端处理)。", - "operationId": "GameAdvertisementRewardExportPost", "requestBody": { "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameAdvertisementRewardEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameAdvertisementRewardEntityRequest" - } - }, - "application/*+json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAdvertisementRewardEntityRequest" + "required": [ + "file" + ], + "type": "object", + "properties": { + "file": { + "type": "string", + "description": "", + "format": "binary" + } + } + }, + "encoding": { + "file": { + "style": "form" + } } } } @@ -5211,10 +5306,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" - } + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5267,10 +5359,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" - } + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5323,10 +5412,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponse" - } + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5360,28 +5446,29 @@ } } }, - "/api/gameAdvertisementReward/page": { + "/api/file/uploadFileFromBase64": { "post": { "tags": [ - "gameAdvertisementReward" + "file" ], - "summary": "分页查询", - "operationId": "GameAdvertisementRewardPagePost", + "summary": "上传文件Base64", + "operationId": "FileUploadFileFromBase64Post", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAdvertisementRewardEntityRequest" + "$ref": "#/components/schemas/UploadFileFromBase64Request" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAdvertisementRewardEntityRequest" + "$ref": "#/components/schemas/UploadFileFromBase64Request" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAdvertisementRewardEntityRequest" + "$ref": "#/components/schemas/UploadFileFromBase64Request" } } } @@ -5414,7 +5501,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5467,7 +5554,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5520,7 +5607,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAdvertisementRewardResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5554,61 +5641,36 @@ } } }, - "/api/gameAdvertisementReward/update": { - "post": { - "tags": [ - "gameAdvertisementReward" - ], - "summary": "更新", - "operationId": "GameAdvertisementRewardUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAdvertisementRewardEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAdvertisementRewardEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAdvertisementRewardEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAnnouncement/add": { + "/api/file/uploadFiles": { "post": { "tags": [ - "gameAnnouncement" + "file" ], - "summary": "新增", - "operationId": "GameAnnouncementAddPost", + "summary": "上传多文件", + "operationId": "FileUploadFilesPost", "requestBody": { "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameAnnouncementEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameAnnouncementEntityRequest" - } - }, - "application/*+json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAnnouncementEntityRequest" + "required": [ + "files" + ], + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + }, + "description": "" + } + } + }, + "encoding": { + "files": { + "style": "form" + } } } } @@ -5641,7 +5703,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/FileResponse" + } }, "trackId": { "type": "string", @@ -5694,7 +5759,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/FileResponse" + } }, "trackId": { "type": "string", @@ -5747,7 +5815,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/FileResponse" + } }, "trackId": { "type": "string", @@ -5781,60 +5852,37 @@ } } }, - "/api/gameAnnouncement/delete": { + "/api/file/uploadSignature": { "post": { "tags": [ - "gameAnnouncement" + "file" ], - "summary": "删除", - "operationId": "GameAnnouncementDeletePost", + "summary": "上传电子签名", + "operationId": "FileUploadSignaturePost", "requestBody": { - "description": "", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "required": [ + "file" + ], + "type": "object", + "properties": { + "file": { + "type": "string", + "description": "", + "format": "binary" + } + } + }, + "encoding": { + "file": { + "style": "form" + } } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAnnouncement/detail": { - "get": { - "tags": [ - "gameAnnouncement" - ], - "summary": "详情", - "operationId": "GameAnnouncementDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -5863,7 +5911,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponse" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5916,7 +5964,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponse" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -5969,7 +6017,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponse" + "$ref": "#/components/schemas/FileResponse" }, "trackId": { "type": "string", @@ -6003,28 +6051,28 @@ } } }, - "/api/gameAnnouncement/dispatchOnline": { + "/api/gameAdvertisementReward/add": { "post": { "tags": [ - "gameAnnouncement" + "gameAdvertisementReward" ], - "summary": "经 Online 统一下发当前公告(来源 change C343 / vault:C8 S7.7):转调 OnlineLiveOpsDispatchService 单一入口(pushAnnouncement 通道),\n来源类型固定注入 Announcement,存在性 / 应用归属 / 作用域校验在单一入口完成。", - "operationId": "GameAnnouncementDispatchOnlinePost", + "summary": "新增", + "operationId": "GameAdvertisementRewardAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/AddGameAdvertisementRewardEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/AddGameAdvertisementRewardEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/AddGameAdvertisementRewardEntityRequest" } } } @@ -6057,7 +6105,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" }, "trackId": { "type": "string", @@ -6110,7 +6158,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" }, "trackId": { "type": "string", @@ -6163,7 +6211,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" }, "trackId": { "type": "string", @@ -6197,32 +6245,60 @@ } } }, - "/api/gameAnnouncement/page": { + "/api/gameAdvertisementReward/delete": { "post": { "tags": [ - "gameAnnouncement" + "gameAdvertisementReward" ], - "summary": "分页查询", - "operationId": "GameAnnouncementPagePost", + "summary": "删除", + "operationId": "GameAdvertisementRewardDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAnnouncementEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAnnouncementEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAnnouncementEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAdvertisementReward/detail": { + "get": { + "tags": [ + "gameAdvertisementReward" + ], + "summary": "详情", + "operationId": "GameAdvertisementRewardDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -6251,7 +6327,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" }, "trackId": { "type": "string", @@ -6304,7 +6380,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" }, "trackId": { "type": "string", @@ -6357,7 +6433,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAnnouncementResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" }, "trackId": { "type": "string", @@ -6391,93 +6467,32 @@ } } }, - "/api/gameAnnouncement/update": { - "post": { - "tags": [ - "gameAnnouncement" - ], - "summary": "更新", - "operationId": "GameAnnouncementUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAnnouncementEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAnnouncementEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAnnouncementEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAntiCheatEvent/delete": { + "/api/gameAdvertisementReward/export": { "post": { "tags": [ - "gameAntiCheatEvent" + "gameAdvertisementReward" ], - "summary": "删除", - "operationId": "GameAntiCheatEventDeletePost", + "summary": "导出当前过滤条件下的账本列表(上限 1000 行;文件化由前端处理)。", + "operationId": "GameAdvertisementRewardExportPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameAdvertisementRewardEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameAdvertisementRewardEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameAdvertisementRewardEntityRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAntiCheatEvent/detail": { - "get": { - "tags": [ - "gameAntiCheatEvent" - ], - "summary": "详情。", - "operationId": "GameAntiCheatEventDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -6506,7 +6521,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + } }, "trackId": { "type": "string", @@ -6559,7 +6577,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + } }, "trackId": { "type": "string", @@ -6612,7 +6633,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAdvertisementRewardResponse" + } }, "trackId": { "type": "string", @@ -6646,28 +6670,28 @@ } } }, - "/api/gameAntiCheatEvent/page": { + "/api/gameAdvertisementReward/page": { "post": { "tags": [ - "gameAntiCheatEvent" + "gameAdvertisementReward" ], - "summary": "分页查询反作弊事件(按 Provider / RiskLevel / ManualReviewState / TargetType / TargetId 过滤)。", - "operationId": "GameAntiCheatEventPagePost", + "summary": "分页查询", + "operationId": "GameAdvertisementRewardPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAntiCheatEventRequest" + "$ref": "#/components/schemas/PageGameAdvertisementRewardEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAntiCheatEventRequest" + "$ref": "#/components/schemas/PageGameAdvertisementRewardEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAntiCheatEventRequest" + "$ref": "#/components/schemas/PageGameAdvertisementRewardEntityRequest" } } } @@ -6700,7 +6724,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAdvertisementRewardResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -6753,7 +6777,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAdvertisementRewardResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -6806,7 +6830,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAdvertisementRewardResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -6840,28 +6864,28 @@ } } }, - "/api/gameAntiCheatEvent/review": { + "/api/gameAdvertisementReward/update": { "post": { "tags": [ - "gameAntiCheatEvent" + "gameAdvertisementReward" ], - "summary": "人工复核动作。\n\n合法状态迁移:仅 Pending → Approved/Rejected/Escalated;非 Pending 拒绝重审,目标状态非法拒绝。\n不写处罚表:本方法只更新事件自身的复核状态与审计字段;是否据此创建处罚属 C11-C(C115)与 C11-D-followup。", - "operationId": "GameAntiCheatEventReviewPost", + "summary": "更新", + "operationId": "GameAdvertisementRewardUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAntiCheatEventReviewRequest" + "$ref": "#/components/schemas/UpdateGameAdvertisementRewardEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAntiCheatEventReviewRequest" + "$ref": "#/components/schemas/UpdateGameAdvertisementRewardEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAntiCheatEventReviewRequest" + "$ref": "#/components/schemas/UpdateGameAdvertisementRewardEntityRequest" } } } @@ -6873,28 +6897,28 @@ } } }, - "/api/gameAntiCheatEvent/submit": { + "/api/gameAnnouncement/add": { "post": { "tags": [ - "gameAntiCheatEvent" + "gameAnnouncement" ], - "summary": "反作弊事件上报接入(幂等)。\n\n幂等策略:统一走 Foundation 协调器 + 事件表即 Store(GameFrameX.Application.GmCenter.GameAntiCheatEvent.AntiCheatEventIdempotencyStore)——\n占位即入账(本站点执行 == 持久化,无外部副作用),并发同键由 `ux_anticheat_idempotency` 唯一索引仲裁,\n输家按 Replay 口径返回既有事件(不重复入账、不抛错);ManualReviewState 固定为 Pending。\n建议不自动生效:SuggestedAction 仅落字段,本方法不创建任何处罚记录;\n处罚创建/撤销属 C11-C(C115)职责,复核通过后的映射由 C11-D-followup 承接。", - "operationId": "GameAntiCheatEventSubmitPost", + "summary": "新增", + "operationId": "GameAnnouncementAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAntiCheatEventRequest" + "$ref": "#/components/schemas/AddGameAnnouncementEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAntiCheatEventRequest" + "$ref": "#/components/schemas/AddGameAnnouncementEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAntiCheatEventRequest" + "$ref": "#/components/schemas/AddGameAnnouncementEntityRequest" } } } @@ -6927,7 +6951,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponse" + "$ref": "#/components/schemas/GameAnnouncementResponse" }, "trackId": { "type": "string", @@ -6980,7 +7004,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponse" + "$ref": "#/components/schemas/GameAnnouncementResponse" }, "trackId": { "type": "string", @@ -7033,7 +7057,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAntiCheatEventResponse" + "$ref": "#/components/schemas/GameAnnouncementResponse" }, "trackId": { "type": "string", @@ -7067,32 +7091,60 @@ } } }, - "/api/gameAppAssetPackage/add": { + "/api/gameAnnouncement/delete": { "post": { "tags": [ - "gameAppAssetPackage" + "gameAnnouncement" ], - "summary": "新增", - "operationId": "GameAppAssetPackageAddPost", + "summary": "删除", + "operationId": "GameAnnouncementDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAnnouncement/detail": { + "get": { + "tags": [ + "gameAnnouncement" + ], + "summary": "详情", + "operationId": "GameAnnouncementDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -7121,7 +7173,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponse" + "$ref": "#/components/schemas/GameAnnouncementResponse" }, "trackId": { "type": "string", @@ -7174,7 +7226,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponse" + "$ref": "#/components/schemas/GameAnnouncementResponse" }, "trackId": { "type": "string", @@ -7227,7 +7279,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponse" + "$ref": "#/components/schemas/GameAnnouncementResponse" }, "trackId": { "type": "string", @@ -7261,60 +7313,32 @@ } } }, - "/api/gameAppAssetPackage/delete": { + "/api/gameAnnouncement/dispatchOnline": { "post": { "tags": [ - "gameAppAssetPackage" + "gameAnnouncement" ], - "summary": "删除", - "operationId": "GameAppAssetPackageDeletePost", + "summary": "经 Online 统一下发当前公告(来源 change C343 / vault:C8 S7.7):转调 OnlineLiveOpsDispatchService 单一入口(pushAnnouncement 通道),\n来源类型固定注入 Announcement,存在性 / 应用归属 / 作用域校验在单一入口完成。", + "operationId": "GameAnnouncementDispatchOnlinePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppAssetPackage/detail": { - "get": { - "tags": [ - "gameAppAssetPackage" - ], - "summary": "详情", - "operationId": "GameAppAssetPackageDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -7343,7 +7367,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -7396,7 +7420,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -7449,7 +7473,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -7483,28 +7507,28 @@ } } }, - "/api/gameAppAssetPackage/page": { + "/api/gameAnnouncement/page": { "post": { "tags": [ - "gameAppAssetPackage" + "gameAnnouncement" ], "summary": "分页查询", - "operationId": "GameAppAssetPackagePagePost", + "operationId": "GameAnnouncementPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageRequest" + "$ref": "#/components/schemas/PageGameAnnouncementEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageRequest" + "$ref": "#/components/schemas/PageGameAnnouncementEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageRequest" + "$ref": "#/components/schemas/PageGameAnnouncementEntityRequest" } } } @@ -7537,7 +7561,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAnnouncementResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -7590,7 +7614,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAnnouncementResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -7643,7 +7667,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAnnouncementResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -7677,32 +7701,93 @@ } } }, - "/api/gameAppAssetPackage/select": { + "/api/gameAnnouncement/update": { "post": { "tags": [ - "gameAppAssetPackage" + "gameAnnouncement" ], - "summary": "获取主库中的资源包选择器列表。", - "operationId": "GameAppAssetPackageSelectPost", + "summary": "更新", + "operationId": "GameAnnouncementUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAnnouncementEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAnnouncementEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAnnouncementEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAntiCheatEvent/delete": { + "post": { + "tags": [ + "gameAntiCheatEvent" + ], + "summary": "删除", + "operationId": "GameAntiCheatEventDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAntiCheatEvent/detail": { + "get": { + "tags": [ + "gameAntiCheatEvent" + ], + "summary": "详情。", + "operationId": "GameAntiCheatEventDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -7731,10 +7816,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAntiCheatEventResponse" }, "trackId": { "type": "string", @@ -7787,10 +7869,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAntiCheatEventResponse" }, "trackId": { "type": "string", @@ -7843,10 +7922,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAntiCheatEventResponse" }, "trackId": { "type": "string", @@ -7880,28 +7956,28 @@ } } }, - "/api/gameAppAssetPackage/selectString": { + "/api/gameAntiCheatEvent/page": { "post": { "tags": [ - "gameAppAssetPackage" + "gameAntiCheatEvent" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameAppAssetPackageSelectStringPost", + "summary": "分页查询反作弊事件(按 Provider / RiskLevel / ManualReviewState / TargetType / TargetId 过滤)。", + "operationId": "GameAntiCheatEventPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAntiCheatEventRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAntiCheatEventRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAntiCheatEventRequest" } } } @@ -7934,10 +8010,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAntiCheatEventResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -7990,10 +8063,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAntiCheatEventResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -8046,10 +8116,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAntiCheatEventResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -8083,28 +8150,28 @@ } } }, - "/api/gameAppAssetPackage/update": { + "/api/gameAntiCheatEvent/review": { "post": { "tags": [ - "gameAppAssetPackage" + "gameAntiCheatEvent" ], - "summary": "更新", - "operationId": "GameAppAssetPackageUpdatePost", + "summary": "人工复核动作。\n\n合法状态迁移:仅 Pending → Approved/Rejected/Escalated;非 Pending 拒绝重审,目标状态非法拒绝。\n不写处罚表:本方法只更新事件自身的复核状态与审计字段;是否据此创建处罚属 C11-C(C115)与 C11-D-followup。", + "operationId": "GameAntiCheatEventReviewPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppAssetPackageRequest" + "$ref": "#/components/schemas/UpdateGameAntiCheatEventReviewRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppAssetPackageRequest" + "$ref": "#/components/schemas/UpdateGameAntiCheatEventReviewRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppAssetPackageRequest" + "$ref": "#/components/schemas/UpdateGameAntiCheatEventReviewRequest" } } } @@ -8116,28 +8183,28 @@ } } }, - "/api/gameAppAssetPackageVersion/add": { + "/api/gameAntiCheatEvent/submit": { "post": { "tags": [ - "gameAppAssetPackageVersion" + "gameAntiCheatEvent" ], - "summary": "新增", - "operationId": "GameAppAssetPackageVersionAddPost", + "summary": "反作弊事件上报接入(幂等)。\n\n幂等策略:统一走 Foundation 协调器 + 事件表即 Store(GameFrameX.Application.GmCenter.GameAntiCheatEvent.AntiCheatEventIdempotencyStore)——\n占位即入账(本站点执行 == 持久化,无外部副作用),并发同键由 `ux_anticheat_idempotency` 唯一索引仲裁,\n输家按 Replay 口径返回既有事件(不重复入账、不抛错);ManualReviewState 固定为 Pending。\n建议不自动生效:SuggestedAction 仅落字段,本方法不创建任何处罚记录;\n处罚创建/撤销属 C11-C(C115)职责,复核通过后的映射由 C11-D-followup 承接。", + "operationId": "GameAntiCheatEventSubmitPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageVersionRequest" + "$ref": "#/components/schemas/AddGameAntiCheatEventRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageVersionRequest" + "$ref": "#/components/schemas/AddGameAntiCheatEventRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageVersionRequest" + "$ref": "#/components/schemas/AddGameAntiCheatEventRequest" } } } @@ -8170,7 +8237,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" + "$ref": "#/components/schemas/GameAntiCheatEventResponse" }, "trackId": { "type": "string", @@ -8223,7 +8290,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" + "$ref": "#/components/schemas/GameAntiCheatEventResponse" }, "trackId": { "type": "string", @@ -8276,7 +8343,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" + "$ref": "#/components/schemas/GameAntiCheatEventResponse" }, "trackId": { "type": "string", @@ -8310,60 +8377,32 @@ } } }, - "/api/gameAppAssetPackageVersion/delete": { + "/api/gameAppAssetPackage/add": { "post": { "tags": [ - "gameAppAssetPackageVersion" + "gameAppAssetPackage" ], - "summary": "删除", - "operationId": "GameAppAssetPackageVersionDeletePost", + "summary": "新增", + "operationId": "GameAppAssetPackageAddPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppAssetPackageVersion/detail": { - "get": { - "tags": [ - "gameAppAssetPackageVersion" - ], - "summary": "详情", - "operationId": "GameAppAssetPackageVersionDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -8392,7 +8431,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" + "$ref": "#/components/schemas/GameAppAssetPackageResponse" }, "trackId": { "type": "string", @@ -8445,7 +8484,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" + "$ref": "#/components/schemas/GameAppAssetPackageResponse" }, "trackId": { "type": "string", @@ -8498,7 +8537,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" + "$ref": "#/components/schemas/GameAppAssetPackageResponse" }, "trackId": { "type": "string", @@ -8532,32 +8571,60 @@ } } }, - "/api/gameAppAssetPackageVersion/page": { + "/api/gameAppAssetPackage/delete": { "post": { "tags": [ - "gameAppAssetPackageVersion" + "gameAppAssetPackage" ], - "summary": "分页查询", - "operationId": "GameAppAssetPackageVersionPagePost", + "summary": "删除", + "operationId": "GameAppAssetPackageDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppAssetPackage/detail": { + "get": { + "tags": [ + "gameAppAssetPackage" + ], + "summary": "详情", + "operationId": "GameAppAssetPackageDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -8586,7 +8653,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageResponse" }, "trackId": { "type": "string", @@ -8639,7 +8706,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageResponse" }, "trackId": { "type": "string", @@ -8692,7 +8759,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageResponse" }, "trackId": { "type": "string", @@ -8726,62 +8793,28 @@ } } }, - "/api/gameAppAssetPackageVersion/return": { - "post": { - "tags": [ - "gameAppAssetPackageVersion" - ], - "summary": "回退资源包版本", - "operationId": "GameAppAssetPackageVersionReturnPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionReturnByIdRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionReturnByIdRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionReturnByIdRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppAssetPackageVersion/select": { + "/api/gameAppAssetPackage/page": { "post": { "tags": [ - "gameAppAssetPackageVersion" + "gameAppAssetPackage" ], - "summary": "获取当前分包下可选的资源版本列表。", - "operationId": "GameAppAssetPackageVersionSelectPost", + "summary": "分页查询", + "operationId": "GameAppAssetPackagePagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionSelectRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionSelectRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionSelectRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageRequest" } } } @@ -8814,10 +8847,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppAssetPackageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -8870,10 +8900,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppAssetPackageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -8926,10 +8953,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppAssetPackageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -8963,61 +8987,28 @@ } } }, - "/api/gameAppAssetPackageVersion/update": { - "post": { - "tags": [ - "gameAppAssetPackageVersion" - ], - "summary": "更新", - "operationId": "GameAppAssetPackageVersionUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateGameAppAssetPackageVersionRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateGameAppAssetPackageVersionRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateGameAppAssetPackageVersionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppAssetPackageVersionHistory/add": { + "/api/gameAppAssetPackage/select": { "post": { "tags": [ - "gameAppAssetPackageVersionHistory" + "gameAppAssetPackage" ], - "summary": "新增", - "operationId": "GameAppAssetPackageVersionHistoryAddPost", + "summary": "获取主库中的资源包选择器列表。", + "operationId": "GameAppAssetPackageSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageVersionHistoryRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageVersionHistoryRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppAssetPackageVersionHistoryRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -9050,7 +9041,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -9103,7 +9097,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -9156,7 +9153,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -9190,60 +9190,32 @@ } } }, - "/api/gameAppAssetPackageVersionHistory/delete": { + "/api/gameAppAssetPackage/selectString": { "post": { "tags": [ - "gameAppAssetPackageVersionHistory" + "gameAppAssetPackage" ], - "summary": "删除", - "operationId": "GameAppAssetPackageVersionHistoryDeletePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameAppAssetPackageSelectStringPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppAssetPackageVersionHistory/detail": { - "get": { - "tags": [ - "gameAppAssetPackageVersionHistory" - ], - "summary": "详情", - "operationId": "GameAppAssetPackageVersionHistoryDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -9272,201 +9244,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/api/gameAppAssetPackageVersionHistory/page": { - "post": { - "tags": [ - "gameAppAssetPackageVersionHistory" - ], - "summary": "分页查询", - "operationId": "GameAppAssetPackageVersionHistoryPagePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionHistoryRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionHistoryRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageGameAppAssetPackageVersionHistoryRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -9519,7 +9300,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -9572,7 +9356,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -9606,28 +9393,28 @@ } } }, - "/api/gameAppAssetPackageVersionHistory/update": { + "/api/gameAppAssetPackage/update": { "post": { "tags": [ - "gameAppAssetPackageVersionHistory" + "gameAppAssetPackage" ], "summary": "更新", - "operationId": "GameAppAssetPackageVersionHistoryUpdatePost", + "operationId": "GameAppAssetPackageUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseUpdateRequest" + "$ref": "#/components/schemas/UpdateGameAppAssetPackageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseUpdateRequest" + "$ref": "#/components/schemas/UpdateGameAppAssetPackageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseUpdateRequest" + "$ref": "#/components/schemas/UpdateGameAppAssetPackageRequest" } } } @@ -9639,28 +9426,28 @@ } } }, - "/api/gameAppDevice/add": { + "/api/gameAppAssetPackageVersion/add": { "post": { "tags": [ - "gameAppDevice" + "gameAppAssetPackageVersion" ], "summary": "新增", - "operationId": "GameAppDeviceAddPost", + "operationId": "GameAppAssetPackageVersionAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAppDeviceRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageVersionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAppDeviceRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageVersionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAppDeviceRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageVersionRequest" } } } @@ -9693,7 +9480,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" }, "trackId": { "type": "string", @@ -9746,7 +9533,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" }, "trackId": { "type": "string", @@ -9799,7 +9586,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" }, "trackId": { "type": "string", @@ -9833,13 +9620,13 @@ } } }, - "/api/gameAppDevice/delete": { + "/api/gameAppAssetPackageVersion/delete": { "post": { "tags": [ - "gameAppDevice" + "gameAppAssetPackageVersion" ], "summary": "删除", - "operationId": "GameAppDeviceDeletePost", + "operationId": "GameAppAssetPackageVersionDeletePost", "requestBody": { "description": "", "content": { @@ -9867,13 +9654,13 @@ } } }, - "/api/gameAppDevice/detail": { + "/api/gameAppAssetPackageVersion/detail": { "get": { "tags": [ - "gameAppDevice" + "gameAppAssetPackageVersion" ], "summary": "详情", - "operationId": "GameAppDeviceDetailGet", + "operationId": "GameAppAssetPackageVersionDetailGet", "parameters": [ { "name": "Id", @@ -9915,7 +9702,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" }, "trackId": { "type": "string", @@ -9968,7 +9755,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" }, "trackId": { "type": "string", @@ -10021,7 +9808,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponse" }, "trackId": { "type": "string", @@ -10055,28 +9842,28 @@ } } }, - "/api/gameAppDevice/page": { + "/api/gameAppAssetPackageVersion/page": { "post": { "tags": [ - "gameAppDevice" + "gameAppAssetPackageVersion" ], "summary": "分页查询", - "operationId": "GameAppDevicePagePost", + "operationId": "GameAppAssetPackageVersionPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameAppDeviceRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GameAppDeviceRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GameAppDeviceRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionRequest" } } } @@ -10109,7 +9896,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -10162,7 +9949,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -10215,7 +10002,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppDeviceResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageVersionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -10249,231 +10036,62 @@ } } }, - "/api/gameAppDevice/select": { + "/api/gameAppAssetPackageVersion/return": { "post": { "tags": [ - "gameAppDevice" + "gameAppAssetPackageVersion" ], - "summary": "获取主库选择器列表。", - "operationId": "GameAppDeviceSelectPost", + "summary": "回退资源包版本", + "operationId": "GameAppAssetPackageVersionReturnPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/GameAppAssetPackageVersionReturnByIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/GameAppAssetPackageVersionReturnByIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/GameAppAssetPackageVersionReturnByIdRequest" } } } }, "responses": { "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } + "description": "OK" } } } }, - "/api/gameAppDevice/selectString": { + "/api/gameAppAssetPackageVersion/select": { "post": { "tags": [ - "gameAppDevice" + "gameAppAssetPackageVersion" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameAppDeviceSelectStringPost", + "summary": "获取当前分包下可选的资源版本列表。", + "operationId": "GameAppAssetPackageVersionSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionSelectRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionSelectRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionSelectRequest" } } } @@ -10508,7 +10126,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -10564,7 +10182,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -10620,7 +10238,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -10655,28 +10273,28 @@ } } }, - "/api/gameAppDevice/update": { + "/api/gameAppAssetPackageVersion/update": { "post": { "tags": [ - "gameAppDevice" + "gameAppAssetPackageVersion" ], "summary": "更新", - "operationId": "GameAppDeviceUpdatePost", + "operationId": "GameAppAssetPackageVersionUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAppDeviceRequest" + "$ref": "#/components/schemas/UpdateGameAppAssetPackageVersionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAppDeviceRequest" + "$ref": "#/components/schemas/UpdateGameAppAssetPackageVersionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAppDeviceRequest" + "$ref": "#/components/schemas/UpdateGameAppAssetPackageVersionRequest" } } } @@ -10688,28 +10306,28 @@ } } }, - "/api/gameAppFeatureSwitch/add": { + "/api/gameAppAssetPackageVersionHistory/add": { "post": { "tags": [ - "gameAppFeatureSwitch" + "gameAppAssetPackageVersionHistory" ], "summary": "新增", - "operationId": "GameAppFeatureSwitchAddPost", + "operationId": "GameAppAssetPackageVersionHistoryAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageVersionHistoryRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageVersionHistoryRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/AddGameAppAssetPackageVersionHistoryRequest" } } } @@ -10742,7 +10360,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" }, "trackId": { "type": "string", @@ -10795,7 +10413,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" }, "trackId": { "type": "string", @@ -10848,7 +10466,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" }, "trackId": { "type": "string", @@ -10882,13 +10500,13 @@ } } }, - "/api/gameAppFeatureSwitch/delete": { + "/api/gameAppAssetPackageVersionHistory/delete": { "post": { "tags": [ - "gameAppFeatureSwitch" + "gameAppAssetPackageVersionHistory" ], "summary": "删除", - "operationId": "GameAppFeatureSwitchDeletePost", + "operationId": "GameAppAssetPackageVersionHistoryDeletePost", "requestBody": { "description": "", "content": { @@ -10916,13 +10534,13 @@ } } }, - "/api/gameAppFeatureSwitch/detail": { + "/api/gameAppAssetPackageVersionHistory/detail": { "get": { "tags": [ - "gameAppFeatureSwitch" + "gameAppAssetPackageVersionHistory" ], "summary": "详情", - "operationId": "GameAppFeatureSwitchDetailGet", + "operationId": "GameAppAssetPackageVersionHistoryDetailGet", "parameters": [ { "name": "Id", @@ -10964,7 +10582,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" }, "trackId": { "type": "string", @@ -11017,7 +10635,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" }, "trackId": { "type": "string", @@ -11070,7 +10688,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponse" }, "trackId": { "type": "string", @@ -11104,28 +10722,28 @@ } } }, - "/api/gameAppFeatureSwitch/page": { + "/api/gameAppAssetPackageVersionHistory/page": { "post": { "tags": [ - "gameAppFeatureSwitch" + "gameAppAssetPackageVersionHistory" ], "summary": "分页查询", - "operationId": "GameAppFeatureSwitchPagePost", + "operationId": "GameAppAssetPackageVersionHistoryPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionHistoryRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionHistoryRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/PageGameAppAssetPackageVersionHistoryRequest" } } } @@ -11158,7 +10776,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -11211,7 +10829,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -11264,7 +10882,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppFeatureSwitchResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppAssetPackageVersionHistoryResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -11298,28 +10916,28 @@ } } }, - "/api/gameAppFeatureSwitch/update": { + "/api/gameAppAssetPackageVersionHistory/update": { "post": { "tags": [ - "gameAppFeatureSwitch" + "gameAppAssetPackageVersionHistory" ], "summary": "更新", - "operationId": "GameAppFeatureSwitchUpdatePost", + "operationId": "GameAppAssetPackageVersionHistoryUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/BaseUpdateRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/BaseUpdateRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppFeatureSwitchRequest" + "$ref": "#/components/schemas/BaseUpdateRequest" } } } @@ -11331,29 +10949,28 @@ } } }, - "/api/gameAppOpenAccess/add": { + "/api/gameAppDevice/add": { "post": { "tags": [ - "gameAppOpenAccess" + "gameAppDevice" ], - "summary": "签发应用开放访问凭证。AccessKey / AccessSecret 由服务端生成,AccessSecret 仅本次响应一次性返回。", - "operationId": "GameAppOpenAccessAddPost", + "summary": "新增", + "operationId": "GameAppDeviceAddPost", "requestBody": { - "description": "签发输入。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAppOpenAccessRequest" + "$ref": "#/components/schemas/AddGameAppDeviceRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAppOpenAccessRequest" + "$ref": "#/components/schemas/AddGameAppDeviceRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAppOpenAccessRequest" + "$ref": "#/components/schemas/AddGameAppDeviceRequest" } } } @@ -11386,7 +11003,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" + "$ref": "#/components/schemas/GameAppDeviceResponse" }, "trackId": { "type": "string", @@ -11439,7 +11056,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" + "$ref": "#/components/schemas/GameAppDeviceResponse" }, "trackId": { "type": "string", @@ -11492,7 +11109,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" + "$ref": "#/components/schemas/GameAppDeviceResponse" }, "trackId": { "type": "string", @@ -11526,29 +11143,29 @@ } } }, - "/api/gameAppOpenAccess/delete": { + "/api/gameAppDevice/delete": { "post": { "tags": [ - "gameAppOpenAccess" + "gameAppDevice" ], - "summary": "删除应用开放访问凭证。", - "operationId": "GameAppOpenAccessDeletePost", + "summary": "删除", + "operationId": "GameAppDeviceDeletePost", "requestBody": { - "description": "操作输入(Id)。", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -11560,101 +11177,26 @@ } } }, - "/api/gameAppOpenAccess/disable": { - "post": { + "/api/gameAppDevice/detail": { + "get": { "tags": [ - "gameAppOpenAccess" + "gameAppDevice" ], - "summary": "禁用应用开放访问凭证。", - "operationId": "GameAppOpenAccessDisablePost", - "requestBody": { - "description": "操作输入(Id)。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } + "summary": "详情", + "operationId": "GameAppDeviceDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppOpenAccess/enable": { - "post": { - "tags": [ - "gameAppOpenAccess" ], - "summary": "启用应用开放访问凭证(已撤销的凭证不可启用)。", - "operationId": "GameAppOpenAccessEnablePost", - "requestBody": { - "description": "操作输入(Id)。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppOpenAccess/page": { - "post": { - "tags": [ - "gameAppOpenAccess" - ], - "summary": "获取应用开放访问凭证分页列表(AccessSecret 永不输出)。", - "operationId": "GameAppOpenAccessPagePost", - "requestBody": { - "description": "分页查询输入。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameAppOpenAccessRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameAppOpenAccessRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameAppOpenAccessRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -11683,7 +11225,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppDeviceResponse" }, "trackId": { "type": "string", @@ -11736,7 +11278,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppDeviceResponse" }, "trackId": { "type": "string", @@ -11789,7 +11331,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppDeviceResponse" }, "trackId": { "type": "string", @@ -11823,29 +11365,28 @@ } } }, - "/api/gameAppOpenAccess/refresh": { + "/api/gameAppDevice/page": { "post": { "tags": [ - "gameAppOpenAccess" + "gameAppDevice" ], - "summary": "续期 / 轮换密钥。重置 AccessSecret 并一次性返回(前端须立即保存)。", - "operationId": "GameAppOpenAccessRefreshPost", + "summary": "分页查询", + "operationId": "GameAppDevicePagePost", "requestBody": { - "description": "操作输入(Id)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" + "$ref": "#/components/schemas/GameAppDeviceRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" + "$ref": "#/components/schemas/GameAppDeviceRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" + "$ref": "#/components/schemas/GameAppDeviceRequest" } } } @@ -11878,7 +11419,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" + "$ref": "#/components/schemas/GameAppDeviceResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -11931,7 +11472,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" + "$ref": "#/components/schemas/GameAppDeviceResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -11984,7 +11525,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" + "$ref": "#/components/schemas/GameAppDeviceResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -12018,96 +11559,28 @@ } } }, - "/api/gameAppOpenAccess/revoke": { - "post": { - "tags": [ - "gameAppOpenAccess" - ], - "summary": "吊销应用开放访问凭证(写 RevokedTime / RevokeReason,并禁用)。", - "operationId": "GameAppOpenAccessRevokePost", - "requestBody": { - "description": "操作输入(Id + 原因)。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppOpenAccess/update": { - "post": { - "tags": [ - "gameAppOpenAccess" - ], - "summary": "更新应用开放访问凭证。校验绑定用户存在与 Scopes 有效。", - "operationId": "GameAppOpenAccessUpdatePost", - "requestBody": { - "description": "更新输入(含客户端乐观锁 RowVersion)。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAppOpenAccessRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAppOpenAccessRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAppOpenAccessRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppPackage/add": { + "/api/gameAppDevice/select": { "post": { "tags": [ - "gameAppPackage" + "gameAppDevice" ], - "summary": "新增分包", - "operationId": "GameAppPackageAddPost", + "summary": "获取主库选择器列表。", + "operationId": "GameAppDeviceSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppPackageRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppPackageRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppPackageRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -12140,7 +11613,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -12193,7 +11669,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -12246,7 +11725,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -12280,59 +11762,32 @@ } } }, - "/api/gameAppPackage/delete": { + "/api/gameAppDevice/selectString": { "post": { "tags": [ - "gameAppPackage" + "gameAppDevice" ], - "summary": "删除分包", - "operationId": "GameAppPackageDeletePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameAppDeviceSelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppPackage/detail": { - "get": { - "tags": [ - "gameAppPackage" - ], - "summary": "详情", - "operationId": "GameAppPackageDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -12361,7 +11816,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -12414,7 +11872,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -12467,7 +11928,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -12501,13 +11965,65 @@ } } }, - "/api/gameAppPackage/list": { - "get": { + "/api/gameAppDevice/update": { + "post": { "tags": [ - "gameAppPackage" + "gameAppDevice" ], - "summary": "获取主库启用分包列表", - "operationId": "GameAppPackageListGet", + "summary": "更新", + "operationId": "GameAppDeviceUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppDeviceRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppDeviceRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppDeviceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppFeatureSwitch/add": { + "post": { + "tags": [ + "gameAppFeatureSwitch" + ], + "summary": "新增", + "operationId": "GameAppFeatureSwitchAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppFeatureSwitchRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppFeatureSwitchRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppFeatureSwitchRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -12536,10 +12052,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAppPackageListResponse" - } + "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" }, "trackId": { "type": "string", @@ -12592,10 +12105,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAppPackageListResponse" - } + "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" }, "trackId": { "type": "string", @@ -12648,10 +12158,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAppPackageListResponse" - } + "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" }, "trackId": { "type": "string", @@ -12685,32 +12192,60 @@ } } }, - "/api/gameAppPackage/page": { + "/api/gameAppFeatureSwitch/delete": { "post": { "tags": [ - "gameAppPackage" + "gameAppFeatureSwitch" ], - "summary": "分页查询", - "operationId": "GameAppPackagePagePost", + "summary": "删除", + "operationId": "GameAppFeatureSwitchDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppPackageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppPackageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppPackageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppFeatureSwitch/detail": { + "get": { + "tags": [ + "gameAppFeatureSwitch" + ], + "summary": "详情", + "operationId": "GameAppFeatureSwitchDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -12739,7 +12274,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" }, "trackId": { "type": "string", @@ -12792,7 +12327,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" }, "trackId": { "type": "string", @@ -12845,7 +12380,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppPackageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppFeatureSwitchResponse" }, "trackId": { "type": "string", @@ -12879,28 +12414,28 @@ } } }, - "/api/gameAppPackage/select": { + "/api/gameAppFeatureSwitch/page": { "post": { "tags": [ - "gameAppPackage" + "gameAppFeatureSwitch" ], - "summary": "获取分包选择器列表。", - "operationId": "GameAppPackageSelectPost", + "summary": "分页查询", + "operationId": "GameAppFeatureSwitchPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppFeatureSwitchRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppFeatureSwitchRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppFeatureSwitchRequest" } } } @@ -12933,10 +12468,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppFeatureSwitchResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -12989,10 +12521,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppFeatureSwitchResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -13045,10 +12574,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppFeatureSwitchResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -13082,28 +12608,62 @@ } } }, - "/api/gameAppPackage/selectString": { + "/api/gameAppFeatureSwitch/update": { "post": { "tags": [ - "gameAppPackage" + "gameAppFeatureSwitch" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameAppPackageSelectStringPost", + "summary": "更新", + "operationId": "GameAppFeatureSwitchUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAppFeatureSwitchRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAppFeatureSwitchRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAppFeatureSwitchRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppOpenAccess/add": { + "post": { + "tags": [ + "gameAppOpenAccess" + ], + "summary": "签发应用开放访问凭证。AccessKey / AccessSecret 由服务端生成,AccessSecret 仅本次响应一次性返回。", + "operationId": "GameAppOpenAccessAddPost", + "requestBody": { + "description": "签发输入。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppOpenAccessRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppOpenAccessRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppOpenAccessRequest" } } } @@ -13136,10 +12696,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" }, "trackId": { "type": "string", @@ -13192,10 +12749,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" }, "trackId": { "type": "string", @@ -13248,10 +12802,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" }, "trackId": { "type": "string", @@ -13285,28 +12836,29 @@ } } }, - "/api/gameAppPackage/setDefault": { + "/api/gameAppOpenAccess/delete": { "post": { "tags": [ - "gameAppPackage" + "gameAppOpenAccess" ], - "summary": "设置默认分包", - "operationId": "GameAppPackageSetDefaultPost", + "summary": "删除应用开放访问凭证。", + "operationId": "GameAppOpenAccessDeletePost", "requestBody": { + "description": "操作输入(Id)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } } } @@ -13318,28 +12870,29 @@ } } }, - "/api/gameAppPackage/setStatus": { + "/api/gameAppOpenAccess/disable": { "post": { "tags": [ - "gameAppPackage" + "gameAppOpenAccess" ], - "summary": "启用或停用分包", - "operationId": "GameAppPackageSetStatusPost", + "summary": "禁用应用开放访问凭证。", + "operationId": "GameAppOpenAccessDisablePost", "requestBody": { + "description": "操作输入(Id)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetGameAppPackageStatusRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/SetGameAppPackageStatusRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/SetGameAppPackageStatusRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } } } @@ -13351,28 +12904,29 @@ } } }, - "/api/gameAppPackage/update": { + "/api/gameAppOpenAccess/enable": { "post": { "tags": [ - "gameAppPackage" + "gameAppOpenAccess" ], - "summary": "更新分包", - "operationId": "GameAppPackageUpdatePost", + "summary": "启用应用开放访问凭证(已撤销的凭证不可启用)。", + "operationId": "GameAppOpenAccessEnablePost", "requestBody": { + "description": "操作输入(Id)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppPackageRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppPackageRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppPackageRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } } } @@ -13384,28 +12938,29 @@ } } }, - "/api/gameAppReleaseVersion/add": { + "/api/gameAppOpenAccess/page": { "post": { "tags": [ - "gameAppReleaseVersion" + "gameAppOpenAccess" ], - "summary": "新增", - "operationId": "GameAppReleaseVersionAddPost", + "summary": "获取应用开放访问凭证分页列表(AccessSecret 永不输出)。", + "operationId": "GameAppOpenAccessPagePost", "requestBody": { + "description": "分页查询输入。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/PageGameAppOpenAccessRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/PageGameAppOpenAccessRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/PageGameAppOpenAccessRequest" } } } @@ -13438,7 +12993,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponse" + "$ref": "#/components/schemas/GameAppOpenAccessResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -13491,7 +13046,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponse" + "$ref": "#/components/schemas/GameAppOpenAccessResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -13544,7 +13099,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponse" + "$ref": "#/components/schemas/GameAppOpenAccessResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -13578,60 +13133,33 @@ } } }, - "/api/gameAppReleaseVersion/delete": { + "/api/gameAppOpenAccess/refresh": { "post": { "tags": [ - "gameAppReleaseVersion" + "gameAppOpenAccess" ], - "summary": "删除", - "operationId": "GameAppReleaseVersionDeletePost", + "summary": "续期 / 轮换密钥。重置 AccessSecret 并一次性返回(前端须立即保存)。", + "operationId": "GameAppOpenAccessRefreshPost", "requestBody": { - "description": "", + "description": "操作输入(Id)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppReleaseVersion/detail": { - "get": { - "tags": [ - "gameAppReleaseVersion" - ], - "summary": "详情", - "operationId": "GameAppReleaseVersionDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -13660,7 +13188,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponse" + "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" }, "trackId": { "type": "string", @@ -13713,7 +13241,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponse" + "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" }, "trackId": { "type": "string", @@ -13766,7 +13294,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponse" + "$ref": "#/components/schemas/GameAppOpenAccessSecretResponse" }, "trackId": { "type": "string", @@ -13800,28 +13328,96 @@ } } }, - "/api/gameAppReleaseVersion/page": { + "/api/gameAppOpenAccess/revoke": { "post": { "tags": [ - "gameAppReleaseVersion" + "gameAppOpenAccess" ], - "summary": "分页查询", - "operationId": "GameAppReleaseVersionPagePost", + "summary": "吊销应用开放访问凭证(写 RevokedTime / RevokeReason,并禁用)。", + "operationId": "GameAppOpenAccessRevokePost", "requestBody": { + "description": "操作输入(Id + 原因)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/GameAppOpenAccessActionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppOpenAccess/update": { + "post": { + "tags": [ + "gameAppOpenAccess" + ], + "summary": "更新应用开放访问凭证。校验绑定用户存在与 Scopes 有效。", + "operationId": "GameAppOpenAccessUpdatePost", + "requestBody": { + "description": "更新输入(含客户端乐观锁 RowVersion)。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppOpenAccessRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppOpenAccessRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppOpenAccessRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppPackage/add": { + "post": { + "tags": [ + "gameAppPackage" + ], + "summary": "新增分包", + "operationId": "GameAppPackageAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppPackageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppPackageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameAppPackageRequest" } } } @@ -13854,7 +13450,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppPackageResponse" }, "trackId": { "type": "string", @@ -13907,7 +13503,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppPackageResponse" }, "trackId": { "type": "string", @@ -13960,7 +13556,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppReleaseVersionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppPackageResponse" }, "trackId": { "type": "string", @@ -13994,28 +13590,28 @@ } } }, - "/api/gameAppReleaseVersion/update": { + "/api/gameAppPackage/delete": { "post": { "tags": [ - "gameAppReleaseVersion" + "gameAppPackage" ], - "summary": "更新", - "operationId": "GameAppReleaseVersionUpdatePost", + "summary": "删除分包", + "operationId": "GameAppPackageDeletePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppReleaseVersionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -14027,32 +13623,26 @@ } } }, - "/api/gameAppRemoteConfig/add": { - "post": { + "/api/gameAppPackage/detail": { + "get": { "tags": [ - "gameAppRemoteConfig" + "gameAppPackage" ], - "summary": "新增", - "operationId": "GameAppRemoteConfigAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigRequest" - } + "summary": "详情", + "operationId": "GameAppPackageDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -14081,7 +13671,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponse" + "$ref": "#/components/schemas/GameAppPackageResponse" }, "trackId": { "type": "string", @@ -14134,7 +13724,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponse" + "$ref": "#/components/schemas/GameAppPackageResponse" }, "trackId": { "type": "string", @@ -14187,7 +13777,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponse" + "$ref": "#/components/schemas/GameAppPackageResponse" }, "trackId": { "type": "string", @@ -14221,60 +13811,13 @@ } } }, - "/api/gameAppRemoteConfig/delete": { - "post": { - "tags": [ - "gameAppRemoteConfig" - ], - "summary": "删除", - "operationId": "GameAppRemoteConfigDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAppRemoteConfig/detail": { + "/api/gameAppPackage/list": { "get": { "tags": [ - "gameAppRemoteConfig" - ], - "summary": "详情", - "operationId": "GameAppRemoteConfigDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } + "gameAppPackage" ], + "summary": "获取主库启用分包列表", + "operationId": "GameAppPackageListGet", "responses": { "200": { "description": "OK", @@ -14303,7 +13846,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAppPackageListResponse" + } }, "trackId": { "type": "string", @@ -14356,7 +13902,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAppPackageListResponse" + } }, "trackId": { "type": "string", @@ -14409,7 +13958,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAppPackageListResponse" + } }, "trackId": { "type": "string", @@ -14443,28 +13995,28 @@ } } }, - "/api/gameAppRemoteConfig/dispatchOnline": { + "/api/gameAppPackage/page": { "post": { "tags": [ - "gameAppRemoteConfig" + "gameAppPackage" ], - "summary": "经 Online 统一下发当前远程配置(来源 change C343 / vault:C8 S7.7):转调 OnlineLiveOpsDispatchService 单一入口(publishRemoteConfig 通道),\n来源类型固定注入 RemoteConfig,存在性 / 区服校验在单一入口完成。", - "operationId": "GameAppRemoteConfigDispatchOnlinePost", + "summary": "分页查询", + "operationId": "GameAppPackagePagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/PageGameAppPackageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/PageGameAppPackageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/PageGameAppPackageRequest" } } } @@ -14497,7 +14049,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/GameAppPackageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -14550,7 +14102,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/GameAppPackageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -14603,7 +14155,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/GameAppPackageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -14637,28 +14189,28 @@ } } }, - "/api/gameAppRemoteConfig/page": { + "/api/gameAppPackage/select": { "post": { "tags": [ - "gameAppRemoteConfig" + "gameAppPackage" ], - "summary": "分页查询", - "operationId": "GameAppRemoteConfigPagePost", + "summary": "获取分包选择器列表。", + "operationId": "GameAppPackageSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -14691,7 +14243,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -14744,7 +14299,213 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "/api/gameAppPackage/selectString": { + "post": { + "tags": [ + "gameAppPackage" + ], + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameAppPackageSelectStringPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -14797,7 +14558,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -14831,28 +14595,28 @@ } } }, - "/api/gameAppRemoteConfig/update": { + "/api/gameAppPackage/setDefault": { "post": { "tags": [ - "gameAppRemoteConfig" + "gameAppPackage" ], - "summary": "更新", - "operationId": "GameAppRemoteConfigUpdatePost", + "summary": "设置默认分包", + "operationId": "GameAppPackageSetDefaultPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigRequest" + "$ref": "#/components/schemas/BaseIdRequest" } } } @@ -14864,28 +14628,94 @@ } } }, - "/api/gameAppRemoteConfigKey/add": { + "/api/gameAppPackage/setStatus": { "post": { "tags": [ - "gameAppRemoteConfigKey" + "gameAppPackage" + ], + "summary": "启用或停用分包", + "operationId": "GameAppPackageSetStatusPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetGameAppPackageStatusRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SetGameAppPackageStatusRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SetGameAppPackageStatusRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppPackage/update": { + "post": { + "tags": [ + "gameAppPackage" + ], + "summary": "更新分包", + "operationId": "GameAppPackageUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppPackageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppPackageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppPackageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAppReleaseVersion/add": { + "post": { + "tags": [ + "gameAppReleaseVersion" ], "summary": "新增", - "operationId": "GameAppRemoteConfigKeyAddPost", + "operationId": "GameAppReleaseVersionAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/AddGameAppReleaseVersionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/AddGameAppReleaseVersionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/AddGameAppReleaseVersionRequest" } } } @@ -14918,7 +14748,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" + "$ref": "#/components/schemas/GameAppReleaseVersionResponse" }, "trackId": { "type": "string", @@ -14971,7 +14801,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" + "$ref": "#/components/schemas/GameAppReleaseVersionResponse" }, "trackId": { "type": "string", @@ -15024,7 +14854,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" + "$ref": "#/components/schemas/GameAppReleaseVersionResponse" }, "trackId": { "type": "string", @@ -15058,13 +14888,13 @@ } } }, - "/api/gameAppRemoteConfigKey/delete": { + "/api/gameAppReleaseVersion/delete": { "post": { "tags": [ - "gameAppRemoteConfigKey" + "gameAppReleaseVersion" ], "summary": "删除", - "operationId": "GameAppRemoteConfigKeyDeletePost", + "operationId": "GameAppReleaseVersionDeletePost", "requestBody": { "description": "", "content": { @@ -15092,13 +14922,13 @@ } } }, - "/api/gameAppRemoteConfigKey/detail": { + "/api/gameAppReleaseVersion/detail": { "get": { "tags": [ - "gameAppRemoteConfigKey" + "gameAppReleaseVersion" ], "summary": "详情", - "operationId": "GameAppRemoteConfigKeyDetailGet", + "operationId": "GameAppReleaseVersionDetailGet", "parameters": [ { "name": "Id", @@ -15140,7 +14970,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" + "$ref": "#/components/schemas/GameAppReleaseVersionResponse" }, "trackId": { "type": "string", @@ -15193,7 +15023,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" + "$ref": "#/components/schemas/GameAppReleaseVersionResponse" }, "trackId": { "type": "string", @@ -15246,7 +15076,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" + "$ref": "#/components/schemas/GameAppReleaseVersionResponse" }, "trackId": { "type": "string", @@ -15280,28 +15110,28 @@ } } }, - "/api/gameAppRemoteConfigKey/page": { + "/api/gameAppReleaseVersion/page": { "post": { "tags": [ - "gameAppRemoteConfigKey" + "gameAppReleaseVersion" ], "summary": "分页查询", - "operationId": "GameAppRemoteConfigKeyPagePost", + "operationId": "GameAppReleaseVersionPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/PageGameAppReleaseVersionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/PageGameAppReleaseVersionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/PageGameAppReleaseVersionRequest" } } } @@ -15334,7 +15164,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppReleaseVersionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -15387,7 +15217,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppReleaseVersionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -15440,7 +15270,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppReleaseVersionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -15474,28 +15304,28 @@ } } }, - "/api/gameAppRemoteConfigKey/update": { + "/api/gameAppReleaseVersion/update": { "post": { "tags": [ - "gameAppRemoteConfigKey" + "gameAppReleaseVersion" ], "summary": "更新", - "operationId": "GameAppRemoteConfigKeyUpdatePost", + "operationId": "GameAppReleaseVersionUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/UpdateGameAppReleaseVersionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/UpdateGameAppReleaseVersionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigKeyRequest" + "$ref": "#/components/schemas/UpdateGameAppReleaseVersionRequest" } } } @@ -15507,28 +15337,28 @@ } } }, - "/api/gameAppRemoteConfigMode/add": { + "/api/gameAppRemoteConfig/add": { "post": { "tags": [ - "gameAppRemoteConfigMode" + "gameAppRemoteConfig" ], - "summary": "新增模式定义。\n显式声明 AddAsync 方法,确保 Admin API 约定以强类型 GameFrameX.Application.ClientDelivery.GameAppRemoteConfigMode.Dto.AddGameAppRemoteConfigModeRequest 绑定参数,\n避免继承的泛型 AddAsync 方法被解析为 dynamic/ExpandoObject 后在基类 (BaseAddRequest) 强转时抛 InvalidCastException。", - "operationId": "GameAppRemoteConfigModeAddPost", + "summary": "新增", + "operationId": "GameAppRemoteConfigAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigRequest" } } } @@ -15561,7 +15391,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigResponse" }, "trackId": { "type": "string", @@ -15614,7 +15444,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigResponse" }, "trackId": { "type": "string", @@ -15667,7 +15497,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigResponse" }, "trackId": { "type": "string", @@ -15701,13 +15531,13 @@ } } }, - "/api/gameAppRemoteConfigMode/delete": { + "/api/gameAppRemoteConfig/delete": { "post": { "tags": [ - "gameAppRemoteConfigMode" + "gameAppRemoteConfig" ], "summary": "删除", - "operationId": "GameAppRemoteConfigModeDeletePost", + "operationId": "GameAppRemoteConfigDeletePost", "requestBody": { "description": "", "content": { @@ -15735,13 +15565,13 @@ } } }, - "/api/gameAppRemoteConfigMode/detail": { + "/api/gameAppRemoteConfig/detail": { "get": { "tags": [ - "gameAppRemoteConfigMode" + "gameAppRemoteConfig" ], "summary": "详情", - "operationId": "GameAppRemoteConfigModeDetailGet", + "operationId": "GameAppRemoteConfigDetailGet", "parameters": [ { "name": "Id", @@ -15783,7 +15613,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigResponse" }, "trackId": { "type": "string", @@ -15836,7 +15666,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigResponse" }, "trackId": { "type": "string", @@ -15889,7 +15719,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigResponse" }, "trackId": { "type": "string", @@ -15923,28 +15753,28 @@ } } }, - "/api/gameAppRemoteConfigMode/page": { + "/api/gameAppRemoteConfig/dispatchOnline": { "post": { "tags": [ - "gameAppRemoteConfigMode" + "gameAppRemoteConfig" ], - "summary": "分页查询", - "operationId": "GameAppRemoteConfigModePagePost", + "summary": "经 Online 统一下发当前远程配置(来源 change C343 / vault:C8 S7.7):转调 OnlineLiveOpsDispatchService 单一入口(publishRemoteConfig 通道),\n来源类型固定注入 RemoteConfig,存在性 / 区服校验在单一入口完成。", + "operationId": "GameAppRemoteConfigDispatchOnlinePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } } } @@ -15977,7 +15807,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponseSqlSugarPagedList" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -16030,7 +15860,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponseSqlSugarPagedList" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -16083,7 +15913,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppRemoteConfigModeResponseSqlSugarPagedList" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -16117,28 +15947,222 @@ } } }, - "/api/gameAppRemoteConfigMode/update": { + "/api/gameAppRemoteConfig/page": { "post": { "tags": [ - "gameAppRemoteConfigMode" + "gameAppRemoteConfig" + ], + "summary": "分页查询", + "operationId": "GameAppRemoteConfigPagePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageGameAppRemoteConfigRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageGameAppRemoteConfigRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageGameAppRemoteConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GameAppRemoteConfigResponseSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GameAppRemoteConfigResponseSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GameAppRemoteConfigResponseSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "/api/gameAppRemoteConfig/update": { + "post": { + "tags": [ + "gameAppRemoteConfig" ], "summary": "更新", - "operationId": "GameAppRemoteConfigModeUpdatePost", + "operationId": "GameAppRemoteConfigUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppRemoteConfigModeRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigRequest" } } } @@ -16150,28 +16174,28 @@ } } }, - "/api/gameAppServerConfig/add": { + "/api/gameAppRemoteConfigKey/add": { "post": { "tags": [ - "gameAppServerConfig" + "gameAppRemoteConfigKey" ], "summary": "新增", - "operationId": "GameAppServerConfigAddPost", + "operationId": "GameAppRemoteConfigKeyAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppServerConfigRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigKeyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppServerConfigRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigKeyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppServerConfigRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigKeyRequest" } } } @@ -16204,7 +16228,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" }, "trackId": { "type": "string", @@ -16257,7 +16281,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" }, "trackId": { "type": "string", @@ -16310,7 +16334,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" }, "trackId": { "type": "string", @@ -16344,13 +16368,13 @@ } } }, - "/api/gameAppServerConfig/delete": { + "/api/gameAppRemoteConfigKey/delete": { "post": { "tags": [ - "gameAppServerConfig" + "gameAppRemoteConfigKey" ], "summary": "删除", - "operationId": "GameAppServerConfigDeletePost", + "operationId": "GameAppRemoteConfigKeyDeletePost", "requestBody": { "description": "", "content": { @@ -16378,13 +16402,13 @@ } } }, - "/api/gameAppServerConfig/detail": { + "/api/gameAppRemoteConfigKey/detail": { "get": { "tags": [ - "gameAppServerConfig" + "gameAppRemoteConfigKey" ], "summary": "详情", - "operationId": "GameAppServerConfigDetailGet", + "operationId": "GameAppRemoteConfigKeyDetailGet", "parameters": [ { "name": "Id", @@ -16426,7 +16450,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" }, "trackId": { "type": "string", @@ -16479,7 +16503,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" }, "trackId": { "type": "string", @@ -16532,7 +16556,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponse" }, "trackId": { "type": "string", @@ -16566,28 +16590,28 @@ } } }, - "/api/gameAppServerConfig/page": { + "/api/gameAppRemoteConfigKey/page": { "post": { "tags": [ - "gameAppServerConfig" + "gameAppRemoteConfigKey" ], "summary": "分页查询", - "operationId": "GameAppServerConfigPagePost", + "operationId": "GameAppRemoteConfigKeyPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppServerConfigRequest" + "$ref": "#/components/schemas/PageGameAppRemoteConfigKeyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppServerConfigRequest" + "$ref": "#/components/schemas/PageGameAppRemoteConfigKeyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppServerConfigRequest" + "$ref": "#/components/schemas/PageGameAppRemoteConfigKeyRequest" } } } @@ -16620,7 +16644,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -16673,7 +16697,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -16726,7 +16750,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppServerConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppRemoteConfigKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -16760,28 +16784,28 @@ } } }, - "/api/gameAppServerConfig/update": { + "/api/gameAppRemoteConfigKey/update": { "post": { "tags": [ - "gameAppServerConfig" + "gameAppRemoteConfigKey" ], "summary": "更新", - "operationId": "GameAppServerConfigUpdatePost", + "operationId": "GameAppRemoteConfigKeyUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppServerConfigRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigKeyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppServerConfigRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigKeyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppServerConfigRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigKeyRequest" } } } @@ -16793,28 +16817,28 @@ } } }, - "/api/gameAppVersionDefinition/add": { + "/api/gameAppRemoteConfigMode/add": { "post": { "tags": [ - "gameAppVersionDefinition" + "gameAppRemoteConfigMode" ], - "summary": "新增", - "operationId": "GameAppVersionDefinitionAddPost", + "summary": "新增模式定义。\n显式声明 AddAsync 方法,确保 Admin API 约定以强类型 GameFrameX.Application.ClientDelivery.GameAppRemoteConfigMode.Dto.AddGameAppRemoteConfigModeRequest 绑定参数,\n避免继承的泛型 AddAsync 方法被解析为 dynamic/ExpandoObject 后在基类 (BaseAddRequest) 强转时抛 InvalidCastException。", + "operationId": "GameAppRemoteConfigModeAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigModeRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigModeRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/AddGameAppRemoteConfigModeRequest" } } } @@ -16847,7 +16871,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" }, "trackId": { "type": "string", @@ -16900,7 +16924,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" }, "trackId": { "type": "string", @@ -16953,7 +16977,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" }, "trackId": { "type": "string", @@ -16987,13 +17011,13 @@ } } }, - "/api/gameAppVersionDefinition/delete": { + "/api/gameAppRemoteConfigMode/delete": { "post": { "tags": [ - "gameAppVersionDefinition" + "gameAppRemoteConfigMode" ], "summary": "删除", - "operationId": "GameAppVersionDefinitionDeletePost", + "operationId": "GameAppRemoteConfigModeDeletePost", "requestBody": { "description": "", "content": { @@ -17021,13 +17045,13 @@ } } }, - "/api/gameAppVersionDefinition/detail": { + "/api/gameAppRemoteConfigMode/detail": { "get": { "tags": [ - "gameAppVersionDefinition" + "gameAppRemoteConfigMode" ], "summary": "详情", - "operationId": "GameAppVersionDefinitionDetailGet", + "operationId": "GameAppRemoteConfigModeDetailGet", "parameters": [ { "name": "Id", @@ -17069,7 +17093,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" }, "trackId": { "type": "string", @@ -17122,7 +17146,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" }, "trackId": { "type": "string", @@ -17175,7 +17199,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponse" }, "trackId": { "type": "string", @@ -17209,28 +17233,28 @@ } } }, - "/api/gameAppVersionDefinition/page": { + "/api/gameAppRemoteConfigMode/page": { "post": { "tags": [ - "gameAppVersionDefinition" + "gameAppRemoteConfigMode" ], "summary": "分页查询", - "operationId": "GameAppVersionDefinitionPagePost", + "operationId": "GameAppRemoteConfigModePagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/PageGameAppRemoteConfigModeRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/PageGameAppRemoteConfigModeRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/PageGameAppRemoteConfigModeRequest" } } } @@ -17263,7 +17287,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -17316,7 +17340,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -17369,7 +17393,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppRemoteConfigModeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -17403,231 +17427,61 @@ } } }, - "/api/gameAppVersionDefinition/select": { + "/api/gameAppRemoteConfigMode/update": { "post": { "tags": [ - "gameAppVersionDefinition" + "gameAppRemoteConfigMode" ], - "summary": "获取主库版本定义选择器列表。", - "operationId": "GameAppVersionDefinitionSelectPost", + "summary": "更新", + "operationId": "GameAppRemoteConfigModeUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigModeRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigModeRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameAppRemoteConfigModeRequest" } } } }, "responses": { "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } + "description": "OK" } } } }, - "/api/gameAppVersionDefinition/selectString": { + "/api/gameAppServerConfig/add": { "post": { "tags": [ - "gameAppVersionDefinition" + "gameAppServerConfig" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameAppVersionDefinitionSelectStringPost", + "summary": "新增", + "operationId": "GameAppServerConfigAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/AddGameAppServerConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/AddGameAppServerConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/AddGameAppServerConfigRequest" } } } @@ -17660,10 +17514,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppServerConfigResponse" }, "trackId": { "type": "string", @@ -17716,10 +17567,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppServerConfigResponse" }, "trackId": { "type": "string", @@ -17772,10 +17620,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppServerConfigResponse" }, "trackId": { "type": "string", @@ -17809,28 +17654,29 @@ } } }, - "/api/gameAppVersionDefinition/update": { + "/api/gameAppServerConfig/delete": { "post": { "tags": [ - "gameAppVersionDefinition" + "gameAppServerConfig" ], - "summary": "更新", - "operationId": "GameAppVersionDefinitionUpdatePost", + "summary": "删除", + "operationId": "GameAppServerConfigDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateGameAppVersionDefinitionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -17842,32 +17688,26 @@ } } }, - "/api/gameArea/add": { - "post": { + "/api/gameAppServerConfig/detail": { + "get": { "tags": [ - "gameArea" + "gameAppServerConfig" ], - "summary": "新增", - "operationId": "GameAreaAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameAreaEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameAreaEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameAreaEntityRequest" - } + "summary": "详情", + "operationId": "GameAppServerConfigDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -17896,7 +17736,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponse" + "$ref": "#/components/schemas/GameAppServerConfigResponse" }, "trackId": { "type": "string", @@ -17949,7 +17789,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponse" + "$ref": "#/components/schemas/GameAppServerConfigResponse" }, "trackId": { "type": "string", @@ -18002,7 +17842,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponse" + "$ref": "#/components/schemas/GameAppServerConfigResponse" }, "trackId": { "type": "string", @@ -18036,60 +17876,32 @@ } } }, - "/api/gameArea/delete": { + "/api/gameAppServerConfig/page": { "post": { "tags": [ - "gameArea" + "gameAppServerConfig" ], - "summary": "删除", - "operationId": "GameAreaDeletePost", + "summary": "分页查询", + "operationId": "GameAppServerConfigPagePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameAppServerConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameAppServerConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameAppServerConfigRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameArea/detail": { - "get": { - "tags": [ - "gameArea" - ], - "summary": "详情:绕过全局过滤器读取(禁用区服 IsEnabled=false 会被 ISafeEnabledFilter 隐藏,详情页必须可见,C301)。", - "operationId": "GameAreaDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -18118,7 +17930,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponse" + "$ref": "#/components/schemas/GameAppServerConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -18171,7 +17983,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponse" + "$ref": "#/components/schemas/GameAppServerConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -18224,7 +18036,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponse" + "$ref": "#/components/schemas/GameAppServerConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -18258,63 +18070,28 @@ } } }, - "/api/gameArea/disableDelete": { - "post": { - "tags": [ - "gameArea" - ], - "summary": "删除游戏区服", - "operationId": "GameAreaDisableDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameArea/open": { + "/api/gameAppServerConfig/update": { "post": { "tags": [ - "gameArea" + "gameAppServerConfig" ], - "summary": "游戏区服开服", - "operationId": "GameAreaOpenPost", + "summary": "更新", + "operationId": "GameAppServerConfigUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/UpdateGameAppServerConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/UpdateGameAppServerConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/UpdateGameAppServerConfigRequest" } } } @@ -18326,28 +18103,28 @@ } } }, - "/api/gameArea/page": { + "/api/gameAppVersionDefinition/add": { "post": { "tags": [ - "gameArea" + "gameAppVersionDefinition" ], - "summary": "分页查询", - "operationId": "GameAreaPagePost", + "summary": "新增", + "operationId": "GameAppVersionDefinitionAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAreaEntityRequest" + "$ref": "#/components/schemas/AddGameAppVersionDefinitionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAreaEntityRequest" + "$ref": "#/components/schemas/AddGameAppVersionDefinitionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAreaEntityRequest" + "$ref": "#/components/schemas/AddGameAppVersionDefinitionRequest" } } } @@ -18380,7 +18157,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" }, "trackId": { "type": "string", @@ -18433,7 +18210,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" }, "trackId": { "type": "string", @@ -18486,7 +18263,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" }, "trackId": { "type": "string", @@ -18520,29 +18297,29 @@ } } }, - "/api/gameArea/restart": { + "/api/gameAppVersionDefinition/delete": { "post": { "tags": [ - "gameArea" + "gameAppVersionDefinition" ], - "summary": "重启游戏区服", - "operationId": "GameAreaRestartPost", + "summary": "删除", + "operationId": "GameAppVersionDefinitionDeletePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -18554,32 +18331,26 @@ } } }, - "/api/gameArea/select": { - "post": { + "/api/gameAppVersionDefinition/detail": { + "get": { "tags": [ - "gameArea" + "gameAppVersionDefinition" ], - "summary": "获取选择器列表", - "operationId": "GameAreaSelectPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } + "summary": "详情", + "operationId": "GameAppVersionDefinitionDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -18608,10 +18379,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" }, "trackId": { "type": "string", @@ -18664,10 +18432,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" }, "trackId": { "type": "string", @@ -18720,10 +18485,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponse" }, "trackId": { "type": "string", @@ -18757,28 +18519,28 @@ } } }, - "/api/gameArea/selectString": { + "/api/gameAppVersionDefinition/page": { "post": { "tags": [ - "gameArea" + "gameAppVersionDefinition" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameAreaSelectStringPost", + "summary": "分页查询", + "operationId": "GameAppVersionDefinitionPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppVersionDefinitionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppVersionDefinitionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameAppVersionDefinitionRequest" } } } @@ -18811,10 +18573,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -18867,10 +18626,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -18923,10 +18679,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAppVersionDefinitionPageResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -18960,95 +18713,28 @@ } } }, - "/api/gameArea/stop": { - "post": { - "tags": [ - "gameArea" - ], - "summary": "停止游戏区服", - "operationId": "GameAreaStopPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameArea/update": { - "post": { - "tags": [ - "gameArea" - ], - "summary": "更新", - "operationId": "GameAreaUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAreaEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAreaEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAreaEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAreaClassify/add": { + "/api/gameAppVersionDefinition/select": { "post": { "tags": [ - "gameAreaClassify" + "gameAppVersionDefinition" ], - "summary": "新增", - "operationId": "GameAreaClassifyAddPost", + "summary": "获取主库版本定义选择器列表。", + "operationId": "GameAppVersionDefinitionSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -19081,7 +18767,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -19134,7 +18823,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -19187,7 +18879,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -19221,60 +18916,32 @@ } } }, - "/api/gameAreaClassify/delete": { + "/api/gameAppVersionDefinition/selectString": { "post": { "tags": [ - "gameAreaClassify" + "gameAppVersionDefinition" ], - "summary": "删除", - "operationId": "GameAreaClassifyDeletePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameAppVersionDefinitionSelectStringPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameAreaClassify/detail": { - "get": { - "tags": [ - "gameAreaClassify" - ], - "summary": "详情", - "operationId": "GameAreaClassifyDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -19303,7 +18970,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -19356,7 +19026,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -19409,7 +19082,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -19443,28 +19119,61 @@ } } }, - "/api/gameAreaClassify/page": { + "/api/gameAppVersionDefinition/update": { "post": { "tags": [ - "gameAreaClassify" + "gameAppVersionDefinition" ], - "summary": "分页查询", - "operationId": "GameAreaClassifyPagePost", + "summary": "更新", + "operationId": "GameAppVersionDefinitionUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppVersionDefinitionRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppVersionDefinitionRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAppVersionDefinitionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameArea/add": { + "post": { + "tags": [ + "gameArea" + ], + "summary": "新增", + "operationId": "GameAreaAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/AddGameAreaEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/AddGameAreaEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/AddGameAreaEntityRequest" } } } @@ -19497,7 +19206,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaResponse" }, "trackId": { "type": "string", @@ -19550,7 +19259,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaResponse" }, "trackId": { "type": "string", @@ -19603,7 +19312,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaClassifyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaResponse" }, "trackId": { "type": "string", @@ -19637,32 +19346,60 @@ } } }, - "/api/gameAreaClassify/select": { + "/api/gameArea/delete": { "post": { "tags": [ - "gameAreaClassify" + "gameArea" ], - "summary": "获取选择器列表", - "operationId": "GameAreaClassifySelectPost", + "summary": "删除", + "operationId": "GameAreaDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameArea/detail": { + "get": { + "tags": [ + "gameArea" + ], + "summary": "详情:绕过全局过滤器读取(禁用区服 IsEnabled=false 会被 ISafeEnabledFilter 隐藏,详情页必须可见,C301)。", + "operationId": "GameAreaDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -19691,10 +19428,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAreaResponse" }, "trackId": { "type": "string", @@ -19747,10 +19481,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAreaResponse" }, "trackId": { "type": "string", @@ -19803,10 +19534,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameAreaResponse" }, "trackId": { "type": "string", @@ -19840,28 +19568,96 @@ } } }, - "/api/gameAreaClassify/selectString": { + "/api/gameArea/disableDelete": { "post": { "tags": [ - "gameAreaClassify" + "gameArea" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameAreaClassifySelectStringPost", + "summary": "删除游戏区服", + "operationId": "GameAreaDisableDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameArea/open": { + "post": { + "tags": [ + "gameArea" + ], + "summary": "游戏区服开服", + "operationId": "GameAreaOpenPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameArea/page": { + "post": { + "tags": [ + "gameArea" + ], + "summary": "分页查询", + "operationId": "GameAreaPagePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageGameAreaEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageGameAreaEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageGameAreaEntityRequest" } } } @@ -19894,10 +19690,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAreaResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -19950,10 +19743,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAreaResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -20006,10 +19796,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameAreaResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -20043,28 +19830,29 @@ } } }, - "/api/gameAreaClassify/update": { + "/api/gameArea/restart": { "post": { "tags": [ - "gameAreaClassify" + "gameArea" ], - "summary": "更新", - "operationId": "GameAreaClassifyUpdatePost", + "summary": "重启游戏区服", + "operationId": "GameAreaRestartPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameAreaClassifyEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } } } @@ -20076,28 +19864,28 @@ } } }, - "/api/gameAreaMerge/add": { + "/api/gameArea/select": { "post": { "tags": [ - "gameAreaMerge" + "gameArea" ], - "summary": "验证区服及占用关系,在目标服生成合服计划。", - "operationId": "GameAreaMergeAddPost", + "summary": "获取选择器列表", + "operationId": "GameAreaSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/CreateGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/CreateGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -20130,7 +19918,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -20183,7 +19974,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -20236,7 +20030,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -20270,28 +20067,28 @@ } } }, - "/api/gameAreaMerge/approve": { + "/api/gameArea/selectString": { "post": { "tags": [ - "gameAreaMerge" + "gameArea" ], - "summary": "当前登录复核人确认零全局域写入;申请人不得自批。", - "operationId": "GameAreaMergeApprovePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameAreaSelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApproveGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ApproveGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ApproveGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -20324,7 +20121,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -20377,7 +20177,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -20430,7 +20233,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -20464,28 +20270,95 @@ } } }, - "/api/gameAreaMerge/cancel": { + "/api/gameArea/stop": { "post": { "tags": [ - "gameAreaMerge" + "gameArea" ], - "summary": "取消尚未进入执行阶段的合服计划,释放参与区服。", - "operationId": "GameAreaMergeCancelPost", + "summary": "停止游戏区服", + "operationId": "GameAreaStopPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CancelGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/CancelGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/CancelGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameArea/update": { + "post": { + "tags": [ + "gameArea" + ], + "summary": "更新", + "operationId": "GameAreaUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAreaEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAreaEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameAreaEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAreaClassify/add": { + "post": { + "tags": [ + "gameAreaClassify" + ], + "summary": "新增", + "operationId": "GameAreaClassifyAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAreaClassifyEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameAreaClassifyEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameAreaClassifyEntityRequest" } } } @@ -20518,7 +20391,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponse" }, "trackId": { "type": "string", @@ -20571,7 +20444,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponse" }, "trackId": { "type": "string", @@ -20624,7 +20497,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponse" }, "trackId": { "type": "string", @@ -20658,13 +20531,47 @@ } } }, - "/api/gameAreaMerge/detail": { + "/api/gameAreaClassify/delete": { + "post": { + "tags": [ + "gameAreaClassify" + ], + "summary": "删除", + "operationId": "GameAreaClassifyDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAreaClassify/detail": { "get": { "tags": [ - "gameAreaMerge" + "gameAreaClassify" ], - "summary": "读取计划与两个阶段的完整报告快照。", - "operationId": "GameAreaMergeDetailGet", + "summary": "详情", + "operationId": "GameAreaClassifyDetailGet", "parameters": [ { "name": "Id", @@ -20706,7 +20613,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponse" }, "trackId": { "type": "string", @@ -20759,7 +20666,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponse" }, "trackId": { "type": "string", @@ -20812,7 +20719,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponse" }, "trackId": { "type": "string", @@ -20846,28 +20753,28 @@ } } }, - "/api/gameAreaMerge/dryRun": { + "/api/gameAreaClassify/page": { "post": { "tags": [ - "gameAreaMerge" + "gameAreaClassify" ], - "summary": "仅草稿或失败计划可重新预演;保存报告供复核。", - "operationId": "GameAreaMergeDryRunPost", + "summary": "分页查询", + "operationId": "GameAreaClassifyPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/PageGameAreaClassifyEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/PageGameAreaClassifyEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/PageGameAreaClassifyEntityRequest" } } } @@ -20900,7 +20807,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -20953,7 +20860,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -21006,7 +20913,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "$ref": "#/components/schemas/GameAreaClassifyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -21040,28 +20947,28 @@ } } }, - "/api/gameAreaMerge/execute": { + "/api/gameAreaClassify/select": { "post": { "tags": [ - "gameAreaMerge" + "gameAreaClassify" ], - "summary": "备份确认后同步执行;成功或幂等回放时原子完成计划与源服退场。", - "operationId": "GameAreaMergeExecutePost", + "summary": "获取选择器列表", + "operationId": "GameAreaClassifySelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExecuteGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ExecuteGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ExecuteGameAreaMergePlanRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -21094,7 +21001,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -21147,7 +21057,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -21200,7 +21113,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -21234,28 +21150,28 @@ } } }, - "/api/gameAreaMerge/page": { + "/api/gameAreaClassify/selectString": { "post": { "tags": [ - "gameAreaMerge" + "gameAreaClassify" ], - "summary": "查询合服计划,最新计划优先。", - "operationId": "GameAreaMergePagePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameAreaClassifySelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BasePageRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BasePageRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BasePageRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -21288,7 +21204,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -21341,7 +21260,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -21394,7 +21316,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaMergePlanResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -21428,28 +21353,61 @@ } } }, - "/api/gameAreaProvision/create": { + "/api/gameAreaClassify/update": { "post": { "tags": [ - "gameAreaProvision" + "gameAreaClassify" ], - "summary": "以新区服编号为幂等键创建禁用行;同编号但参数不同的请求拒绝覆盖。", - "operationId": "GameAreaProvisionCreatePost", + "summary": "更新", + "operationId": "GameAreaClassifyUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameAreaProvisionCreateRequest" + "$ref": "#/components/schemas/UpdateGameAreaClassifyEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GameAreaProvisionCreateRequest" + "$ref": "#/components/schemas/UpdateGameAreaClassifyEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GameAreaProvisionCreateRequest" + "$ref": "#/components/schemas/UpdateGameAreaClassifyEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameAreaMerge/add": { + "post": { + "tags": [ + "gameAreaMerge" + ], + "summary": "验证区服及占用关系,在目标服生成合服计划。", + "operationId": "GameAreaMergeAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGameAreaMergePlanRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateGameAreaMergePlanRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateGameAreaMergePlanRequest" } } } @@ -21482,7 +21440,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21535,7 +21493,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21588,7 +21546,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21622,28 +21580,28 @@ } } }, - "/api/gameAreaProvision/execute": { + "/api/gameAreaMerge/approve": { "post": { "tags": [ - "gameAreaProvision" + "gameAreaMerge" ], - "summary": "从尚未完成的步骤继续,失败保留已有事实,绝不提前启用。", - "operationId": "GameAreaProvisionExecutePost", + "summary": "当前登录复核人确认零全局域写入;申请人不得自批。", + "operationId": "GameAreaMergeApprovePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/ApproveGameAreaMergePlanRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/ApproveGameAreaMergePlanRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/ApproveGameAreaMergePlanRequest" } } } @@ -21676,7 +21634,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21729,7 +21687,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21782,7 +21740,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21816,26 +21774,32 @@ } } }, - "/api/gameAreaProvision/preview": { - "get": { + "/api/gameAreaMerge/cancel": { + "post": { "tags": [ - "gameAreaProvision" + "gameAreaMerge" ], - "summary": "预览显式克隆字段及必须填写的差异字段,不复制状态与运行时标识。", - "operationId": "GameAreaProvisionPreviewGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "取消尚未进入执行阶段的合服计划,释放参与区服。", + "operationId": "GameAreaMergeCancelPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CancelGameAreaMergePlanRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CancelGameAreaMergePlanRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CancelGameAreaMergePlanRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -21864,7 +21828,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionPreviewResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21917,7 +21881,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionPreviewResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -21970,7 +21934,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionPreviewResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22004,13 +21968,13 @@ } } }, - "/api/gameAreaProvision/status": { + "/api/gameAreaMerge/detail": { "get": { "tags": [ - "gameAreaProvision" + "gameAreaMerge" ], - "summary": "从区服记录和 Online 日历查询四个步骤的事实状态。", - "operationId": "GameAreaProvisionStatusGet", + "summary": "读取计划与两个阶段的完整报告快照。", + "operationId": "GameAreaMergeDetailGet", "parameters": [ { "name": "Id", @@ -22052,7 +22016,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22105,7 +22069,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22158,7 +22122,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22192,13 +22156,32 @@ } } }, - "/api/gameAreaProvision/templates": { - "get": { + "/api/gameAreaMerge/dryRun": { + "post": { "tags": [ - "gameAreaProvision" + "gameAreaMerge" ], - "summary": "获取可选模板(包含禁用行,但不包含已软删行)。", - "operationId": "GameAreaProvisionTemplatesGet", + "summary": "仅草稿或失败计划可重新预演;保存报告供复核。", + "operationId": "GameAreaMergeDryRunPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -22227,10 +22210,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAreaProvisionTemplateResponse" - } + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22283,10 +22263,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAreaProvisionTemplateResponse" - } + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22339,10 +22316,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameAreaProvisionTemplateResponse" - } + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22376,28 +22350,28 @@ } } }, - "/api/gameBannerAnnouncement/add": { + "/api/gameAreaMerge/execute": { "post": { "tags": [ - "gameBannerAnnouncement" + "gameAreaMerge" ], - "summary": "新增", - "operationId": "GameBannerAnnouncementAddPost", + "summary": "备份确认后同步执行;成功或幂等回放时原子完成计划与源服退场。", + "operationId": "GameAreaMergeExecutePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameBannerAnnouncementEntityRequest" + "$ref": "#/components/schemas/ExecuteGameAreaMergePlanRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameBannerAnnouncementEntityRequest" + "$ref": "#/components/schemas/ExecuteGameAreaMergePlanRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameBannerAnnouncementEntityRequest" + "$ref": "#/components/schemas/ExecuteGameAreaMergePlanRequest" } } } @@ -22430,7 +22404,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22483,7 +22457,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22536,7 +22510,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponse" }, "trackId": { "type": "string", @@ -22570,60 +22544,32 @@ } } }, - "/api/gameBannerAnnouncement/delete": { + "/api/gameAreaMerge/page": { "post": { "tags": [ - "gameBannerAnnouncement" + "gameAreaMerge" ], - "summary": "删除", - "operationId": "GameBannerAnnouncementDeletePost", + "summary": "查询合服计划,最新计划优先。", + "operationId": "GameAreaMergePagePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BasePageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BasePageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BasePageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameBannerAnnouncement/detail": { - "get": { - "tags": [ - "gameBannerAnnouncement" - ], - "summary": "详情", - "operationId": "GameBannerAnnouncementDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -22652,7 +22598,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -22705,7 +22651,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -22758,7 +22704,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponse" + "$ref": "#/components/schemas/GameAreaMergePlanResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -22792,28 +22738,28 @@ } } }, - "/api/gameBannerAnnouncement/page": { + "/api/gameAreaProvision/create": { "post": { "tags": [ - "gameBannerAnnouncement" + "gameAreaProvision" ], - "summary": "分页查询", - "operationId": "GameBannerAnnouncementPagePost", + "summary": "以新区服编号为幂等键创建禁用行;同编号但参数不同的请求拒绝覆盖。", + "operationId": "GameAreaProvisionCreatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameBannerAnnouncementEntityRequest" + "$ref": "#/components/schemas/GameAreaProvisionCreateRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameBannerAnnouncementEntityRequest" + "$ref": "#/components/schemas/GameAreaProvisionCreateRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameBannerAnnouncementEntityRequest" + "$ref": "#/components/schemas/GameAreaProvisionCreateRequest" } } } @@ -22846,7 +22792,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -22899,7 +22845,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -22952,7 +22898,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameBannerAnnouncementResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -22986,61 +22932,28 @@ } } }, - "/api/gameBannerAnnouncement/update": { - "post": { - "tags": [ - "gameBannerAnnouncement" - ], - "summary": "更新", - "operationId": "GameBannerAnnouncementUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameBannerAnnouncementEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameBannerAnnouncementEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameBannerAnnouncementEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameCommodity/add": { + "/api/gameAreaProvision/execute": { "post": { "tags": [ - "gameCommodity" + "gameAreaProvision" ], - "summary": "新增", - "operationId": "GameCommodityAddPost", + "summary": "从尚未完成的步骤继续,失败保留已有事实,绝不提前启用。", + "operationId": "GameAreaProvisionExecutePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameCommodityEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameCommodityEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameCommodityEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } } } @@ -23073,7 +22986,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponse" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -23126,7 +23039,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponse" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -23179,7 +23092,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponse" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -23213,47 +23126,13 @@ } } }, - "/api/gameCommodity/delete": { - "post": { - "tags": [ - "gameCommodity" - ], - "summary": "删除", - "operationId": "GameCommodityDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameCommodity/detail": { + "/api/gameAreaProvision/preview": { "get": { "tags": [ - "gameCommodity" + "gameAreaProvision" ], - "summary": "详情", - "operationId": "GameCommodityDetailGet", + "summary": "预览显式克隆字段及必须填写的差异字段,不复制状态与运行时标识。", + "operationId": "GameAreaProvisionPreviewGet", "parameters": [ { "name": "Id", @@ -23295,7 +23174,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponse" + "$ref": "#/components/schemas/GameAreaProvisionPreviewResponse" }, "trackId": { "type": "string", @@ -23348,7 +23227,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponse" + "$ref": "#/components/schemas/GameAreaProvisionPreviewResponse" }, "trackId": { "type": "string", @@ -23401,7 +23280,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponse" + "$ref": "#/components/schemas/GameAreaProvisionPreviewResponse" }, "trackId": { "type": "string", @@ -23435,32 +23314,26 @@ } } }, - "/api/gameCommodity/page": { - "post": { + "/api/gameAreaProvision/status": { + "get": { "tags": [ - "gameCommodity" + "gameAreaProvision" ], - "summary": "分页查询", - "operationId": "GameCommodityPagePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameCommodityEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameCommodityEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageTenantGameCommodityEntityRequest" - } + "summary": "从区服记录和 Online 日历查询四个步骤的事实状态。", + "operationId": "GameAreaProvisionStatusGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -23489,7 +23362,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -23542,7 +23415,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -23595,7 +23468,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameCommodityResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameAreaProvisionStatusResponse" }, "trackId": { "type": "string", @@ -23629,65 +23502,13 @@ } } }, - "/api/gameCommodity/update": { - "post": { - "tags": [ - "gameCommodity" - ], - "summary": "更新", - "operationId": "GameCommodityUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameCommodityEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameCommodityEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameCommodityEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameDockerTag/add": { - "post": { + "/api/gameAreaProvision/templates": { + "get": { "tags": [ - "gameDockerTag" + "gameAreaProvision" ], - "summary": "新增", - "operationId": "GameDockerTagAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameDockerTagEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameDockerTagEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameDockerTagEntityRequest" - } - } - } - }, + "summary": "获取可选模板(包含禁用行,但不包含已软删行)。", + "operationId": "GameAreaProvisionTemplatesGet", "responses": { "200": { "description": "OK", @@ -23716,7 +23537,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAreaProvisionTemplateResponse" + } }, "trackId": { "type": "string", @@ -23769,7 +23593,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAreaProvisionTemplateResponse" + } }, "trackId": { "type": "string", @@ -23822,7 +23649,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameAreaProvisionTemplateResponse" + } }, "trackId": { "type": "string", @@ -23856,60 +23686,32 @@ } } }, - "/api/gameDockerTag/delete": { + "/api/gameBannerAnnouncement/add": { "post": { "tags": [ - "gameDockerTag" + "gameBannerAnnouncement" ], - "summary": "删除", - "operationId": "GameDockerTagDeletePost", + "summary": "新增", + "operationId": "GameBannerAnnouncementAddPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameBannerAnnouncementEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameBannerAnnouncementEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameBannerAnnouncementEntityRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameDockerTag/detail": { - "get": { - "tags": [ - "gameDockerTag" - ], - "summary": "详情", - "operationId": "GameDockerTagDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -23938,7 +23740,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponse" + "$ref": "#/components/schemas/GameBannerAnnouncementResponse" }, "trackId": { "type": "string", @@ -23991,7 +23793,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponse" + "$ref": "#/components/schemas/GameBannerAnnouncementResponse" }, "trackId": { "type": "string", @@ -24044,7 +23846,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponse" + "$ref": "#/components/schemas/GameBannerAnnouncementResponse" }, "trackId": { "type": "string", @@ -24078,32 +23880,60 @@ } } }, - "/api/gameDockerTag/page": { + "/api/gameBannerAnnouncement/delete": { "post": { "tags": [ - "gameDockerTag" + "gameBannerAnnouncement" ], - "summary": "分页查询", - "operationId": "GameDockerTagPagePost", + "summary": "删除", + "operationId": "GameBannerAnnouncementDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameDockerTagEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameDockerTagEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameDockerTagEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameBannerAnnouncement/detail": { + "get": { + "tags": [ + "gameBannerAnnouncement" + ], + "summary": "详情", + "operationId": "GameBannerAnnouncementDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -24132,7 +23962,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameBannerAnnouncementResponse" }, "trackId": { "type": "string", @@ -24185,7 +24015,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameBannerAnnouncementResponse" }, "trackId": { "type": "string", @@ -24238,7 +24068,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameDockerTagResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameBannerAnnouncementResponse" }, "trackId": { "type": "string", @@ -24272,28 +24102,28 @@ } } }, - "/api/gameDockerTag/select": { + "/api/gameBannerAnnouncement/page": { "post": { "tags": [ - "gameDockerTag" + "gameBannerAnnouncement" ], - "summary": "获取选择器列表", - "operationId": "GameDockerTagSelectPost", + "summary": "分页查询", + "operationId": "GameBannerAnnouncementPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameBannerAnnouncementEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameBannerAnnouncementEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameBannerAnnouncementEntityRequest" } } } @@ -24326,10 +24156,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameBannerAnnouncementResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -24382,10 +24209,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameBannerAnnouncementResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -24438,213 +24262,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/api/gameDockerTag/selectString": { - "post": { - "tags": [ - "gameDockerTag" - ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameDockerTagSelectStringPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameBannerAnnouncementResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -24678,28 +24296,28 @@ } } }, - "/api/gameDockerTag/update": { + "/api/gameBannerAnnouncement/update": { "post": { "tags": [ - "gameDockerTag" + "gameBannerAnnouncement" ], "summary": "更新", - "operationId": "GameDockerTagUpdatePost", + "operationId": "GameBannerAnnouncementUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameDockerTagEntityRequest" + "$ref": "#/components/schemas/UpdateGameBannerAnnouncementEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameDockerTagEntityRequest" + "$ref": "#/components/schemas/UpdateGameBannerAnnouncementEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameDockerTagEntityRequest" + "$ref": "#/components/schemas/UpdateGameBannerAnnouncementEntityRequest" } } } @@ -24711,28 +24329,28 @@ } } }, - "/api/gameGoods/add": { + "/api/gameCommodity/add": { "post": { "tags": [ - "gameGoods" + "gameCommodity" ], "summary": "新增", - "operationId": "GameGoodsAddPost", + "operationId": "GameCommodityAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameGoodsEntityRequest" + "$ref": "#/components/schemas/AddGameCommodityEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameGoodsEntityRequest" + "$ref": "#/components/schemas/AddGameCommodityEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameGoodsEntityRequest" + "$ref": "#/components/schemas/AddGameCommodityEntityRequest" } } } @@ -24765,7 +24383,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponse" + "$ref": "#/components/schemas/GameCommodityResponse" }, "trackId": { "type": "string", @@ -24818,7 +24436,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponse" + "$ref": "#/components/schemas/GameCommodityResponse" }, "trackId": { "type": "string", @@ -24871,7 +24489,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponse" + "$ref": "#/components/schemas/GameCommodityResponse" }, "trackId": { "type": "string", @@ -24905,13 +24523,13 @@ } } }, - "/api/gameGoods/delete": { + "/api/gameCommodity/delete": { "post": { "tags": [ - "gameGoods" + "gameCommodity" ], "summary": "删除", - "operationId": "GameGoodsDeletePost", + "operationId": "GameCommodityDeletePost", "requestBody": { "description": "", "content": { @@ -24939,13 +24557,13 @@ } } }, - "/api/gameGoods/detail": { + "/api/gameCommodity/detail": { "get": { "tags": [ - "gameGoods" + "gameCommodity" ], "summary": "详情", - "operationId": "GameGoodsDetailGet", + "operationId": "GameCommodityDetailGet", "parameters": [ { "name": "Id", @@ -24987,7 +24605,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponse" + "$ref": "#/components/schemas/GameCommodityResponse" }, "trackId": { "type": "string", @@ -25040,7 +24658,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponse" + "$ref": "#/components/schemas/GameCommodityResponse" }, "trackId": { "type": "string", @@ -25093,7 +24711,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponse" + "$ref": "#/components/schemas/GameCommodityResponse" }, "trackId": { "type": "string", @@ -25127,28 +24745,28 @@ } } }, - "/api/gameGoods/page": { + "/api/gameCommodity/page": { "post": { "tags": [ - "gameGoods" + "gameCommodity" ], "summary": "分页查询", - "operationId": "GameGoodsPagePost", + "operationId": "GameCommodityPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameGoodsEntityRequest" + "$ref": "#/components/schemas/PageGameCommodityEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameGoodsEntityRequest" + "$ref": "#/components/schemas/PageGameCommodityEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameGoodsEntityRequest" + "$ref": "#/components/schemas/PageGameCommodityEntityRequest" } } } @@ -25181,7 +24799,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameCommodityResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -25234,7 +24852,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameCommodityResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -25287,7 +24905,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameCommodityResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -25321,28 +24939,61 @@ } } }, - "/api/gameGoods/select": { + "/api/gameCommodity/update": { "post": { "tags": [ - "gameGoods" + "gameCommodity" ], - "summary": "获取选择器列表", - "operationId": "GameGoodsSelectPost", + "summary": "更新", + "operationId": "GameCommodityUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameCommodityEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameCommodityEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameCommodityEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameDockerTag/add": { + "post": { + "tags": [ + "gameDockerTag" + ], + "summary": "新增", + "operationId": "GameDockerTagAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameDockerTagEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameDockerTagEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameDockerTagEntityRequest" } } } @@ -25375,10 +25026,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameDockerTagResponse" }, "trackId": { "type": "string", @@ -25431,10 +25079,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameDockerTagResponse" }, "trackId": { "type": "string", @@ -25487,10 +25132,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameDockerTagResponse" }, "trackId": { "type": "string", @@ -25524,32 +25166,60 @@ } } }, - "/api/gameGoods/selectString": { + "/api/gameDockerTag/delete": { "post": { "tags": [ - "gameGoods" + "gameDockerTag" ], - "summary": "获取物品选择列表(含分类信息)", - "operationId": "GameGoodsSelectStringPost", + "summary": "删除", + "operationId": "GameDockerTagDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameDockerTag/detail": { + "get": { + "tags": [ + "gameDockerTag" + ], + "summary": "详情", + "operationId": "GameDockerTagDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -25578,10 +25248,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameDockerTagResponse" }, "trackId": { "type": "string", @@ -25634,10 +25301,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameDockerTagResponse" }, "trackId": { "type": "string", @@ -25690,10 +25354,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameDockerTagResponse" }, "trackId": { "type": "string", @@ -25727,61 +25388,28 @@ } } }, - "/api/gameGoods/update": { - "post": { - "tags": [ - "gameGoods" - ], - "summary": "更新", - "operationId": "GameGoodsUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameGoodsEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameGoodsEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameGoodsEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameGoodsCatalogue/add": { + "/api/gameDockerTag/page": { "post": { "tags": [ - "gameGoodsCatalogue" + "gameDockerTag" ], - "summary": "新增", - "operationId": "GameGoodsCatalogueAddPost", + "summary": "分页查询", + "operationId": "GameDockerTagPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameGoodsCatalogueEntityRequest" + "$ref": "#/components/schemas/PageGameDockerTagEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameGoodsCatalogueEntityRequest" + "$ref": "#/components/schemas/PageGameDockerTagEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameGoodsCatalogueEntityRequest" + "$ref": "#/components/schemas/PageGameDockerTagEntityRequest" } } } @@ -25814,229 +25442,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/api/gameGoodsCatalogue/delete": { - "post": { - "tags": [ - "gameGoodsCatalogue" - ], - "summary": "删除", - "operationId": "GameGoodsCatalogueDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameGoodsCatalogue/detail": { - "get": { - "tags": [ - "gameGoodsCatalogue" - ], - "summary": "详情", - "operationId": "GameGoodsCatalogueDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponse" + "$ref": "#/components/schemas/GameDockerTagResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -26089,7 +25495,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponse" + "$ref": "#/components/schemas/GameDockerTagResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -26142,7 +25548,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponse" + "$ref": "#/components/schemas/GameDockerTagResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -26176,28 +25582,28 @@ } } }, - "/api/gameGoodsCatalogue/page": { + "/api/gameDockerTag/select": { "post": { "tags": [ - "gameGoodsCatalogue" + "gameDockerTag" ], - "summary": "分页查询", - "operationId": "GameGoodsCataloguePagePost", + "summary": "获取选择器列表", + "operationId": "GameDockerTagSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameGoodsCatalogueEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameGoodsCatalogueEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameGoodsCatalogueEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -26230,7 +25636,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -26283,7 +25692,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -26336,7 +25748,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameGoodsCatalogueResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -26370,13 +25785,13 @@ } } }, - "/api/gameGoodsCatalogue/select": { + "/api/gameDockerTag/selectString": { "post": { "tags": [ - "gameGoodsCatalogue" + "gameDockerTag" ], - "summary": "获取选择器列表", - "operationId": "GameGoodsCatalogueSelectPost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameDockerTagSelectStringPost", "requestBody": { "content": { "application/json": { @@ -26426,7 +25841,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -26482,7 +25897,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -26538,7 +25953,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -26573,28 +25988,61 @@ } } }, - "/api/gameGoodsCatalogue/selectString": { + "/api/gameDockerTag/update": { "post": { "tags": [ - "gameGoodsCatalogue" + "gameDockerTag" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameGoodsCatalogueSelectStringPost", + "summary": "更新", + "operationId": "GameDockerTagUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameDockerTagEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameDockerTagEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateGameDockerTagEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameGoods/add": { + "post": { + "tags": [ + "gameGoods" + ], + "summary": "新增", + "operationId": "GameGoodsAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameGoodsEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameGoodsEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameGoodsEntityRequest" } } } @@ -26627,10 +26075,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameGoodsResponse" }, "trackId": { "type": "string", @@ -26683,10 +26128,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameGoodsResponse" }, "trackId": { "type": "string", @@ -26739,10 +26181,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameGoodsResponse" }, "trackId": { "type": "string", @@ -26776,140 +26215,15 @@ } } }, - "/api/gameGoodsCatalogue/update": { - "post": { - "tags": [ - "gameGoodsCatalogue" - ], - "summary": "更新", - "operationId": "GameGoodsCatalogueUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameGoodsCatalogueEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameGoodsCatalogueEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameGoodsCatalogueEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameHome/getOnline": { - "post": { - "tags": [ - "gameHome" - ], - "summary": "获取在线玩家信息", - "operationId": "GameHomeGetOnlinePost", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GameHomeOnlineResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameHomeOnlineResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameHomeOnlineResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/gameHome/onlineTrend": { - "post": { - "tags": [ - "gameHome" - ], - "summary": "首页 24h 在线人数时序:最近 24 个整点桶回读采样表,桶内取最后一次采样,缺桶为 null(C321 / GFX-730)", - "operationId": "GameHomeOnlineTrendPost", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GameHomeOnlineTrendResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameHomeOnlineTrendResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameHomeOnlineTrendResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/gameHome/overview": { - "post": { - "tags": [ - "gameHome" - ], - "summary": "首页运营驾驶舱聚合读数:在线人数、今日订单(待发货/退款中细分)、玩家总数/今日新增、区服计数(C321 / GFX-730)", - "operationId": "GameHomeOverviewPost", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/GameHomeOverviewResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameHomeOverviewResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameHomeOverviewResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/gameLoginTicketKey/delete": { + "/api/gameGoods/delete": { "post": { "tags": [ - "gameLoginTicketKey" + "gameGoods" ], - "summary": "禁止删除签名密钥:历史 key 是 Server 验签在途票据的依据,删除会导致验签失败;请改用禁用或轮换。", - "operationId": "GameLoginTicketKeyDeletePost", + "summary": "删除", + "operationId": "GameGoodsDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { @@ -26935,13 +26249,13 @@ } } }, - "/api/gameLoginTicketKey/detail": { + "/api/gameGoods/detail": { "get": { "tags": [ - "gameLoginTicketKey" + "gameGoods" ], - "summary": "密钥详情(仅公钥与元数据,私钥永不回显)。", - "operationId": "GameLoginTicketKeyDetailGet", + "summary": "详情", + "operationId": "GameGoodsDetailGet", "parameters": [ { "name": "Id", @@ -26983,7 +26297,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameLoginTicketKeyResponse" + "$ref": "#/components/schemas/GameGoodsResponse" }, "trackId": { "type": "string", @@ -27036,7 +26350,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameLoginTicketKeyResponse" + "$ref": "#/components/schemas/GameGoodsResponse" }, "trackId": { "type": "string", @@ -27089,7 +26403,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameLoginTicketKeyResponse" + "$ref": "#/components/schemas/GameGoodsResponse" }, "trackId": { "type": "string", @@ -27123,94 +26437,28 @@ } } }, - "/api/gameLoginTicketKey/disable": { - "post": { - "tags": [ - "gameLoginTicketKey" - ], - "summary": "禁用密钥。", - "operationId": "GameLoginTicketKeyDisablePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameLoginTicketKey/enable": { - "post": { - "tags": [ - "gameLoginTicketKey" - ], - "summary": "启用密钥。", - "operationId": "GameLoginTicketKeyEnablePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameLoginTicketKey/page": { + "/api/gameGoods/page": { "post": { "tags": [ - "gameLoginTicketKey" + "gameGoods" ], - "summary": "分页查询签名密钥(仅公钥与元数据,私钥永不回显)。", - "operationId": "GameLoginTicketKeyPagePost", + "summary": "分页查询", + "operationId": "GameGoodsPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameLoginTicketKeyRequest" + "$ref": "#/components/schemas/PageGameGoodsEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameLoginTicketKeyRequest" + "$ref": "#/components/schemas/PageGameGoodsEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameLoginTicketKeyRequest" + "$ref": "#/components/schemas/PageGameGoodsEntityRequest" } } } @@ -27243,7 +26491,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameLoginTicketKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameGoodsResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -27296,7 +26544,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameLoginTicketKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameGoodsResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -27349,7 +26597,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameLoginTicketKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameGoodsResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -27383,61 +26631,28 @@ } } }, - "/api/gameLoginTicketKey/rotate": { - "post": { - "tags": [ - "gameLoginTicketKey" - ], - "summary": "手动轮换:立即生成新 key(ExpireTime 为 null 则永不过期);\n旧 key 打 RotatedTime 标记并收窄到期时间到退场时刻(默认 now + 7 天、上限 now + 30 天),\n到点被生效查询自然排除——轮换后旧公钥在退场窗口内仍可验签在途票据,窗口外自然退场。", - "operationId": "GameLoginTicketKeyRotatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameLoginTicketKeyRotateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/GameLoginTicketKeyRotateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/GameLoginTicketKeyRotateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameMail/add": { + "/api/gameGoods/select": { "post": { "tags": [ - "gameMail" + "gameGoods" ], - "summary": "新增", - "operationId": "GameMailAddPost", + "summary": "获取选择器列表", + "operationId": "GameGoodsSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -27470,7 +26685,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -27523,7 +26741,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -27576,7 +26797,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -27610,60 +26834,32 @@ } } }, - "/api/gameMail/delete": { + "/api/gameGoods/selectString": { "post": { "tags": [ - "gameMail" + "gameGoods" ], - "summary": "删除", - "operationId": "GameMailDeletePost", + "summary": "获取物品选择列表(含分类信息)", + "operationId": "GameGoodsSelectStringPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameMail/detail": { - "get": { - "tags": [ - "gameMail" - ], - "summary": "详情", - "operationId": "GameMailDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -27692,7 +26888,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -27745,7 +26944,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -27798,7 +27000,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -27832,28 +27037,61 @@ } } }, - "/api/gameMail/page": { + "/api/gameGoods/update": { "post": { "tags": [ - "gameMail" + "gameGoods" ], - "summary": "分页查询", - "operationId": "GameMailPagePost", + "summary": "更新", + "operationId": "GameGoodsUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailEntityRequest" + "$ref": "#/components/schemas/UpdateGameGoodsEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailEntityRequest" + "$ref": "#/components/schemas/UpdateGameGoodsEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailEntityRequest" + "$ref": "#/components/schemas/UpdateGameGoodsEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameGoodsCatalogue/add": { + "post": { + "tags": [ + "gameGoodsCatalogue" + ], + "summary": "新增", + "operationId": "GameGoodsCatalogueAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameGoodsCatalogueEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameGoodsCatalogueEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameGoodsCatalogueEntityRequest" } } } @@ -27886,7 +27124,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameGoodsCatalogueResponse" }, "trackId": { "type": "string", @@ -27939,7 +27177,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameGoodsCatalogueResponse" }, "trackId": { "type": "string", @@ -27992,7 +27230,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameGoodsCatalogueResponse" }, "trackId": { "type": "string", @@ -28026,29 +27264,29 @@ } } }, - "/api/gameMail/send": { + "/api/gameGoodsCatalogue/delete": { "post": { "tags": [ - "gameMail" + "gameGoodsCatalogue" ], - "summary": "发送游戏邮件", - "operationId": "GameMailSendPost", + "summary": "删除", + "operationId": "GameGoodsCatalogueDeletePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -28060,65 +27298,26 @@ } } }, - "/api/gameMail/update": { - "post": { + "/api/gameGoodsCatalogue/detail": { + "get": { "tags": [ - "gameMail" + "gameGoodsCatalogue" ], - "summary": "更新", - "operationId": "GameMailUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailEntityRequest" - } + "summary": "详情", + "operationId": "GameGoodsCatalogueDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameMailCampaign/add": { - "post": { - "tags": [ - "gameMailCampaign" ], - "summary": "新增", - "operationId": "GameMailCampaignAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameMailCampaignEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameMailCampaignEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameMailCampaignEntityRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -28147,7 +27346,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponse" + "$ref": "#/components/schemas/GameGoodsCatalogueResponse" }, "trackId": { "type": "string", @@ -28200,7 +27399,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponse" + "$ref": "#/components/schemas/GameGoodsCatalogueResponse" }, "trackId": { "type": "string", @@ -28253,7 +27452,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponse" + "$ref": "#/components/schemas/GameGoodsCatalogueResponse" }, "trackId": { "type": "string", @@ -28287,59 +27486,32 @@ } } }, - "/api/gameMailCampaign/delete": { + "/api/gameGoodsCatalogue/page": { "post": { "tags": [ - "gameMailCampaign" + "gameGoodsCatalogue" ], - "summary": "删除:仅 Draft/Failed 可删除(Published/Revoked 主体不可删 B1)。", - "operationId": "GameMailCampaignDeletePost", + "summary": "分页查询", + "operationId": "GameGoodsCataloguePagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameGoodsCatalogueEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameGoodsCatalogueEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameGoodsCatalogueEntityRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameMailCampaign/detail": { - "get": { - "tags": [ - "gameMailCampaign" - ], - "summary": "详情", - "operationId": "GameMailCampaignDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -28368,7 +27540,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponse" + "$ref": "#/components/schemas/GameGoodsCatalogueResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -28421,7 +27593,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponse" + "$ref": "#/components/schemas/GameGoodsCatalogueResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -28474,7 +27646,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponse" + "$ref": "#/components/schemas/GameGoodsCatalogueResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -28508,28 +27680,28 @@ } } }, - "/api/gameMailCampaign/dispatchOnline": { + "/api/gameGoodsCatalogue/select": { "post": { "tags": [ - "gameMailCampaign" + "gameGoodsCatalogue" ], - "summary": "经 Online 统一下发当前 Campaign(来源 change C343 / vault:C8 S7.7,方案C):转调 OnlineLiveOpsDispatchService 单一入口(publish_mail_campaign 通道)。\n\n邮件不重复下发:单一入口只收 Published(同目标 ServerId==AreaId 合并返回首次发布回执);Draft/Failed/Revoked 拒绝并指引走本服务 publish 链路。", - "operationId": "GameMailCampaignDispatchOnlinePost", + "summary": "获取选择器列表", + "operationId": "GameGoodsCatalogueSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -28562,7 +27734,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -28615,7 +27790,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -28668,7 +27846,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -28702,28 +27883,28 @@ } } }, - "/api/gameMailCampaign/page": { + "/api/gameGoodsCatalogue/selectString": { "post": { "tags": [ - "gameMailCampaign" + "gameGoodsCatalogue" ], - "summary": "分页查询", - "operationId": "GameMailCampaignPagePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameGoodsCatalogueSelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailCampaignEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailCampaignEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailCampaignEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -28756,7 +27937,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -28809,7 +27993,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -28862,7 +28049,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailCampaignResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -28896,90 +28086,190 @@ } } }, - "/api/gameMailCampaign/preview": { + "/api/gameGoodsCatalogue/update": { "post": { "tags": [ - "gameMailCampaign" + "gameGoodsCatalogue" ], - "summary": "预览 / 校验 Campaign:调用 Server preview,不落库、不改状态。预估命中数一期为 -1(未知)。", - "operationId": "GameMailCampaignPreviewPost", + "summary": "更新", + "operationId": "GameGoodsCatalogueUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewMailCampaignEntityRequest" + "$ref": "#/components/schemas/UpdateGameGoodsCatalogueEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PreviewMailCampaignEntityRequest" + "$ref": "#/components/schemas/UpdateGameGoodsCatalogueEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PreviewMailCampaignEntityRequest" + "$ref": "#/components/schemas/UpdateGameGoodsCatalogueEntityRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameHome/getOnline": { + "post": { + "tags": [ + "gameHome" + ], + "summary": "获取在线玩家信息", + "operationId": "GameHomeGetOnlinePost", "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/PreviewMailCampaignEntityResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } + "$ref": "#/components/schemas/GameHomeOnlineResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameHomeOnlineResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GameHomeOnlineResponseHttpJsonResultData" + } + } + } + } + } + } + }, + "/api/gameHome/onlineTrend": { + "post": { + "tags": [ + "gameHome" + ], + "summary": "首页 24h 在线人数时序:最近 24 个整点桶回读采样表,桶内取最后一次采样,缺桶为 null(C321 / GFX-730)", + "operationId": "GameHomeOnlineTrendPost", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/GameHomeOnlineTrendResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameHomeOnlineTrendResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GameHomeOnlineTrendResponseHttpJsonResultData" + } + } + } + } + } + } + }, + "/api/gameHome/overview": { + "post": { + "tags": [ + "gameHome" + ], + "summary": "首页运营驾驶舱聚合读数:在线人数、今日订单(待发货/退款中细分)、玩家总数/今日新增、区服计数(C321 / GFX-730)", + "operationId": "GameHomeOverviewPost", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/GameHomeOverviewResponseHttpJsonResultData" } }, "application/json": { + "schema": { + "$ref": "#/components/schemas/GameHomeOverviewResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GameHomeOverviewResponseHttpJsonResultData" + } + } + } + } + } + } + }, + "/api/gameLoginTicketKey/delete": { + "post": { + "tags": [ + "gameLoginTicketKey" + ], + "summary": "禁止删除签名密钥:历史 key 是 Server 验签在途票据的依据,删除会导致验签失败;请改用禁用或轮换。", + "operationId": "GameLoginTicketKeyDeletePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameLoginTicketKey/detail": { + "get": { + "tags": [ + "gameLoginTicketKey" + ], + "summary": "密钥详情(仅公钥与元数据,私钥永不回显)。", + "operationId": "GameLoginTicketKeyDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { "schema": { "required": [ "code", @@ -29003,148 +28293,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PreviewMailCampaignEntityResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/PreviewMailCampaignEntityResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/api/gameMailCampaign/publish": { - "post": { - "tags": [ - "gameMailCampaign" - ], - "summary": "发布 Campaign:调用 Server publish。Ok 时回写 ServerCampaignId/PublishVersion/PublishedTime 并置 Published;非 Ok 时置 Failed 并记录 LastServerCode/Message,抛出友好错误。\n\n仅 Draft/Failed 可发布(Published/Revoked 主体不可重复发布 B1)。", - "operationId": "GameMailCampaignPublishPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PublishMailCampaignEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PublishMailCampaignEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PublishMailCampaignEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/PublishMailCampaignEntityResponse" + "$ref": "#/components/schemas/GameLoginTicketKeyResponse" }, "trackId": { "type": "string", @@ -29197,7 +28346,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PublishMailCampaignEntityResponse" + "$ref": "#/components/schemas/GameLoginTicketKeyResponse" }, "trackId": { "type": "string", @@ -29250,7 +28399,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PublishMailCampaignEntityResponse" + "$ref": "#/components/schemas/GameLoginTicketKeyResponse" }, "trackId": { "type": "string", @@ -29284,28 +28433,94 @@ } } }, - "/api/gameMailCampaign/revoke": { + "/api/gameLoginTicketKey/disable": { "post": { "tags": [ - "gameMailCampaign" + "gameLoginTicketKey" ], - "summary": "撤回 Campaign:调用 Server revoke。仅 Published 可撤回(撤回不可逆 B3,已发放资产不回滚)。Ok 时回写 RevokedTime/RevokeOperator 并置 Revoked。", - "operationId": "GameMailCampaignRevokePost", + "summary": "禁用密钥。", + "operationId": "GameLoginTicketKeyDisablePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RevokeMailCampaignEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/RevokeMailCampaignEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/RevokeMailCampaignEntityRequest" + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameLoginTicketKey/enable": { + "post": { + "tags": [ + "gameLoginTicketKey" + ], + "summary": "启用密钥。", + "operationId": "GameLoginTicketKeyEnablePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameLoginTicketKey/page": { + "post": { + "tags": [ + "gameLoginTicketKey" + ], + "summary": "分页查询签名密钥(仅公钥与元数据,私钥永不回显)。", + "operationId": "GameLoginTicketKeyPagePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageGameLoginTicketKeyRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageGameLoginTicketKeyRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageGameLoginTicketKeyRequest" } } } @@ -29338,7 +28553,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/RevokeMailCampaignEntityResponse" + "$ref": "#/components/schemas/GameLoginTicketKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -29391,7 +28606,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/RevokeMailCampaignEntityResponse" + "$ref": "#/components/schemas/GameLoginTicketKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -29444,7 +28659,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/RevokeMailCampaignEntityResponse" + "$ref": "#/components/schemas/GameLoginTicketKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -29478,28 +28693,28 @@ } } }, - "/api/gameMailCampaign/update": { + "/api/gameLoginTicketKey/rotate": { "post": { "tags": [ - "gameMailCampaign" + "gameLoginTicketKey" ], - "summary": "更新", - "operationId": "GameMailCampaignUpdatePost", + "summary": "手动轮换:立即生成新 key(ExpireTime 为 null 则永不过期);\n旧 key 打 RotatedTime 标记并收窄到期时间到退场时刻(默认 now + 7 天、上限 now + 30 天),\n到点被生效查询自然排除——轮换后旧公钥在退场窗口内仍可验签在途票据,窗口外自然退场。", + "operationId": "GameLoginTicketKeyRotatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailCampaignEntityRequest" + "$ref": "#/components/schemas/GameLoginTicketKeyRotateRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailCampaignEntityRequest" + "$ref": "#/components/schemas/GameLoginTicketKeyRotateRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailCampaignEntityRequest" + "$ref": "#/components/schemas/GameLoginTicketKeyRotateRequest" } } } @@ -29511,28 +28726,28 @@ } } }, - "/api/gameMailTemplate/add": { + "/api/gameMail/add": { "post": { "tags": [ - "gameMailTemplate" + "gameMail" ], "summary": "新增", - "operationId": "GameMailTemplateAddPost", + "operationId": "GameMailAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailTemplateEntityRequest" + "$ref": "#/components/schemas/AddGameMailEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailTemplateEntityRequest" + "$ref": "#/components/schemas/AddGameMailEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailTemplateEntityRequest" + "$ref": "#/components/schemas/AddGameMailEntityRequest" } } } @@ -29565,7 +28780,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponse" + "$ref": "#/components/schemas/GameMailResponse" }, "trackId": { "type": "string", @@ -29618,7 +28833,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponse" + "$ref": "#/components/schemas/GameMailResponse" }, "trackId": { "type": "string", @@ -29671,7 +28886,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponse" + "$ref": "#/components/schemas/GameMailResponse" }, "trackId": { "type": "string", @@ -29705,13 +28920,13 @@ } } }, - "/api/gameMailTemplate/delete": { + "/api/gameMail/delete": { "post": { "tags": [ - "gameMailTemplate" + "gameMail" ], "summary": "删除", - "operationId": "GameMailTemplateDeletePost", + "operationId": "GameMailDeletePost", "requestBody": { "description": "", "content": { @@ -29739,13 +28954,13 @@ } } }, - "/api/gameMailTemplate/detail": { + "/api/gameMail/detail": { "get": { "tags": [ - "gameMailTemplate" + "gameMail" ], "summary": "详情", - "operationId": "GameMailTemplateDetailGet", + "operationId": "GameMailDetailGet", "parameters": [ { "name": "Id", @@ -29787,7 +29002,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponse" + "$ref": "#/components/schemas/GameMailResponse" }, "trackId": { "type": "string", @@ -29840,7 +29055,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponse" + "$ref": "#/components/schemas/GameMailResponse" }, "trackId": { "type": "string", @@ -29893,7 +29108,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponse" + "$ref": "#/components/schemas/GameMailResponse" }, "trackId": { "type": "string", @@ -29927,28 +29142,28 @@ } } }, - "/api/gameMailTemplate/page": { + "/api/gameMail/page": { "post": { "tags": [ - "gameMailTemplate" + "gameMail" ], "summary": "分页查询", - "operationId": "GameMailTemplatePagePost", + "operationId": "GameMailPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailTemplateEntityRequest" + "$ref": "#/components/schemas/PageGameMailEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailTemplateEntityRequest" + "$ref": "#/components/schemas/PageGameMailEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailTemplateEntityRequest" + "$ref": "#/components/schemas/PageGameMailEntityRequest" } } } @@ -29981,7 +29196,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -30034,7 +29249,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -30087,7 +29302,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -30121,28 +29336,95 @@ } } }, - "/api/gameMailTemplate/select": { + "/api/gameMail/send": { "post": { "tags": [ - "gameMailTemplate" + "gameMail" ], - "summary": "获取选择器列表", - "operationId": "GameMailTemplateSelectPost", + "summary": "发送游戏邮件", + "operationId": "GameMailSendPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseIdRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameMail/update": { + "post": { + "tags": [ + "gameMail" + ], + "summary": "更新", + "operationId": "GameMailUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameMailEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameMailEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameMailEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameMailCampaign/add": { + "post": { + "tags": [ + "gameMailCampaign" + ], + "summary": "新增", + "operationId": "GameMailCampaignAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameMailCampaignEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameMailCampaignEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameMailCampaignEntityRequest" } } } @@ -30175,10 +29457,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameMailCampaignResponse" }, "trackId": { "type": "string", @@ -30231,10 +29510,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameMailCampaignResponse" }, "trackId": { "type": "string", @@ -30287,10 +29563,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameMailCampaignResponse" }, "trackId": { "type": "string", @@ -30324,32 +29597,59 @@ } } }, - "/api/gameMailTemplate/selectString": { + "/api/gameMailCampaign/delete": { "post": { "tags": [ - "gameMailTemplate" + "gameMailCampaign" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameMailTemplateSelectStringPost", + "summary": "删除:仅 Draft/Failed 可删除(Published/Revoked 主体不可删 B1)。", + "operationId": "GameMailCampaignDeletePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameMailCampaign/detail": { + "get": { + "tags": [ + "gameMailCampaign" + ], + "summary": "详情", + "operationId": "GameMailCampaignDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -30378,10 +29678,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameMailCampaignResponse" }, "trackId": { "type": "string", @@ -30434,10 +29731,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameMailCampaignResponse" }, "trackId": { "type": "string", @@ -30490,10 +29784,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameMailCampaignResponse" }, "trackId": { "type": "string", @@ -30527,61 +29818,28 @@ } } }, - "/api/gameMailTemplate/update": { - "post": { - "tags": [ - "gameMailTemplate" - ], - "summary": "更新", - "operationId": "GameMailTemplateUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailTemplateEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailTemplateEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailTemplateEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameMailTemplateCategory/add": { + "/api/gameMailCampaign/dispatchOnline": { "post": { "tags": [ - "gameMailTemplateCategory" + "gameMailCampaign" ], - "summary": "新增", - "operationId": "GameMailTemplateCategoryAddPost", + "summary": "经 Online 统一下发当前 Campaign(来源 change C343 / vault:C8 S7.7,方案C):转调 OnlineLiveOpsDispatchService 单一入口(publish_mail_campaign 通道)。\n\n邮件不重复下发:单一入口只收 Published(同目标 ServerId==AreaId 合并返回首次发布回执);Draft/Failed/Revoked 拒绝并指引走本服务 publish 链路。", + "operationId": "GameMailCampaignDispatchOnlinePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/OnlineLiveOpsSourceDispatchRequest" } } } @@ -30614,7 +29872,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -30667,7 +29925,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -30720,7 +29978,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -30754,60 +30012,32 @@ } } }, - "/api/gameMailTemplateCategory/delete": { + "/api/gameMailCampaign/page": { "post": { "tags": [ - "gameMailTemplateCategory" + "gameMailCampaign" ], - "summary": "删除", - "operationId": "GameMailTemplateCategoryDeletePost", + "summary": "分页查询", + "operationId": "GameMailCampaignPagePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameMailCampaignEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameMailCampaignEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameMailCampaignEntityRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameMailTemplateCategory/detail": { - "get": { - "tags": [ - "gameMailTemplateCategory" - ], - "summary": "详情", - "operationId": "GameMailTemplateCategoryDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -30836,7 +30066,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" + "$ref": "#/components/schemas/GameMailCampaignResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -30889,7 +30119,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" + "$ref": "#/components/schemas/GameMailCampaignResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -30942,7 +30172,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" + "$ref": "#/components/schemas/GameMailCampaignResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -30976,28 +30206,28 @@ } } }, - "/api/gameMailTemplateCategory/page": { + "/api/gameMailCampaign/preview": { "post": { "tags": [ - "gameMailTemplateCategory" + "gameMailCampaign" ], - "summary": "分页查询", - "operationId": "GameMailTemplateCategoryPagePost", + "summary": "预览 / 校验 Campaign:调用 Server preview,不落库、不改状态。预估命中数一期为 -1(未知)。", + "operationId": "GameMailCampaignPreviewPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/PreviewMailCampaignEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/PreviewMailCampaignEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/PreviewMailCampaignEntityRequest" } } } @@ -31030,7 +30260,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponseSqlSugarPagedList" + "$ref": "#/components/schemas/PreviewMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31083,7 +30313,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponseSqlSugarPagedList" + "$ref": "#/components/schemas/PreviewMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31136,7 +30366,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameMailTemplateCategoryResponseSqlSugarPagedList" + "$ref": "#/components/schemas/PreviewMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31170,28 +30400,28 @@ } } }, - "/api/gameMailTemplateCategory/select": { + "/api/gameMailCampaign/publish": { "post": { "tags": [ - "gameMailTemplateCategory" + "gameMailCampaign" ], - "summary": "获取选择器列表", - "operationId": "GameMailTemplateCategorySelectPost", + "summary": "发布 Campaign:调用 Server publish。Ok 时回写 ServerCampaignId/PublishVersion/PublishedTime 并置 Published;非 Ok 时置 Failed 并记录 LastServerCode/Message,抛出友好错误。\n\n仅 Draft/Failed 可发布(Published/Revoked 主体不可重复发布 B1)。", + "operationId": "GameMailCampaignPublishPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PublishMailCampaignEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PublishMailCampaignEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PublishMailCampaignEntityRequest" } } } @@ -31224,10 +30454,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/PublishMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31280,10 +30507,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/PublishMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31336,10 +30560,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/PublishMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31373,28 +30594,28 @@ } } }, - "/api/gameMailTemplateCategory/selectString": { + "/api/gameMailCampaign/revoke": { "post": { "tags": [ - "gameMailTemplateCategory" + "gameMailCampaign" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameMailTemplateCategorySelectStringPost", + "summary": "撤回 Campaign:调用 Server revoke。仅 Published 可撤回(撤回不可逆 B3,已发放资产不回滚)。Ok 时回写 RevokedTime/RevokeOperator 并置 Revoked。", + "operationId": "GameMailCampaignRevokePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/RevokeMailCampaignEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/RevokeMailCampaignEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/RevokeMailCampaignEntityRequest" } } } @@ -31427,10 +30648,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/RevokeMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31483,10 +30701,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/RevokeMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31539,10 +30754,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/RevokeMailCampaignEntityResponse" }, "trackId": { "type": "string", @@ -31576,28 +30788,28 @@ } } }, - "/api/gameMailTemplateCategory/update": { + "/api/gameMailCampaign/update": { "post": { "tags": [ - "gameMailTemplateCategory" + "gameMailCampaign" ], "summary": "更新", - "operationId": "GameMailTemplateCategoryUpdatePost", + "operationId": "GameMailCampaignUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/UpdateGameMailCampaignEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/UpdateGameMailCampaignEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameMailTemplateCategoryEntityRequest" + "$ref": "#/components/schemas/UpdateGameMailCampaignEntityRequest" } } } @@ -31609,28 +30821,28 @@ } } }, - "/api/gameOnlineConfigRollout/page": { + "/api/gameMailTemplate/add": { "post": { "tags": [ - "gameOnlineConfigRollout" + "gameMailTemplate" ], - "summary": "分页查询版本行:按 ConfigKind / ConfigKey / Status / ServerId 过滤,新版本在前。", - "operationId": "GameOnlineConfigRolloutPagePost", + "summary": "新增", + "operationId": "GameMailTemplateAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOnlineConfigRolloutRequest" + "$ref": "#/components/schemas/AddGameMailTemplateEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOnlineConfigRolloutRequest" + "$ref": "#/components/schemas/AddGameMailTemplateEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOnlineConfigRolloutRequest" + "$ref": "#/components/schemas/AddGameMailTemplateEntityRequest" } } } @@ -31663,7 +30875,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlineConfigRolloutResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailTemplateResponse" }, "trackId": { "type": "string", @@ -31716,7 +30928,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlineConfigRolloutResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailTemplateResponse" }, "trackId": { "type": "string", @@ -31769,7 +30981,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlineConfigRolloutResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailTemplateResponse" }, "trackId": { "type": "string", @@ -31803,32 +31015,60 @@ } } }, - "/api/gameOnlineConfigRollout/publish": { + "/api/gameMailTemplate/delete": { "post": { "tags": [ - "gameOnlineConfigRollout" + "gameMailTemplate" ], - "summary": "灰度发布:校验(Percent 边界 / 来源存在 / 分群已同步)→ 分配 ConfigVersion → 落版本行 → 经单一入口下发 Online → 回写确认版本并替代旧生效行。\n\n下发失败(Online 非 0 协议码 / 作用域拒绝)时删除刚插入的版本行后原样抛出——Online 未确认即无生效事实,不留半生效审计行,可整重试。", - "operationId": "GameOnlineConfigRolloutPublishPost", + "summary": "删除", + "operationId": "GameMailTemplateDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PublishConfigRolloutRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PublishConfigRolloutRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PublishConfigRolloutRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameMailTemplate/detail": { + "get": { + "tags": [ + "gameMailTemplate" + ], + "summary": "详情", + "operationId": "GameMailTemplateDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -31857,7 +31097,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PublishConfigRolloutResponse" + "$ref": "#/components/schemas/GameMailTemplateResponse" }, "trackId": { "type": "string", @@ -31910,7 +31150,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PublishConfigRolloutResponse" + "$ref": "#/components/schemas/GameMailTemplateResponse" }, "trackId": { "type": "string", @@ -31963,7 +31203,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PublishConfigRolloutResponse" + "$ref": "#/components/schemas/GameMailTemplateResponse" }, "trackId": { "type": "string", @@ -31997,28 +31237,28 @@ } } }, - "/api/gameOnlineConfigRollout/rollback": { + "/api/gameMailTemplate/page": { "post": { "tags": [ - "gameOnlineConfigRollout" + "gameMailTemplate" ], - "summary": "灰度回滚:版本化新下发——目标版本语义(SegmentId/Percent)恢复到新行,新行 TargetVersion 指向目标,经单一入口 rollbackConfigRollout 通道生效。\n\n目标版本必须存在于该配置的版本序列(无论当前是否生效——恢复任一历史版本行为均合法);成功后旧生效行置 RolledBack。", - "operationId": "GameOnlineConfigRolloutRollbackPost", + "summary": "分页查询", + "operationId": "GameMailTemplatePagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RollbackConfigRolloutRequest" + "$ref": "#/components/schemas/PageGameMailTemplateEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/RollbackConfigRolloutRequest" + "$ref": "#/components/schemas/PageGameMailTemplateEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/RollbackConfigRolloutRequest" + "$ref": "#/components/schemas/PageGameMailTemplateEntityRequest" } } } @@ -32051,7 +31291,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/RollbackConfigRolloutResponse" + "$ref": "#/components/schemas/GameMailTemplateResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -32104,7 +31344,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/RollbackConfigRolloutResponse" + "$ref": "#/components/schemas/GameMailTemplateResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -32157,7 +31397,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/RollbackConfigRolloutResponse" + "$ref": "#/components/schemas/GameMailTemplateResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -32191,28 +31431,28 @@ } } }, - "/api/gameOnlinePlayerSegment/add": { + "/api/gameMailTemplate/select": { "post": { "tags": [ - "gameOnlinePlayerSegment" + "gameMailTemplate" ], - "summary": "新增", - "operationId": "GameOnlinePlayerSegmentAddPost", + "summary": "获取选择器列表", + "operationId": "GameMailTemplateSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOnlinePlayerSegmentRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOnlinePlayerSegmentRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOnlinePlayerSegmentRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -32245,7 +31485,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -32298,7 +31541,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -32351,7 +31597,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -32385,59 +31634,32 @@ } } }, - "/api/gameOnlinePlayerSegment/delete": { + "/api/gameMailTemplate/selectString": { "post": { "tags": [ - "gameOnlinePlayerSegment" + "gameMailTemplate" ], - "summary": "删除:已被灰度版本行引用(任一状态)的分群不可删除——版本行是不可变审计历史,引用悬空会破坏回溯。", - "operationId": "GameOnlinePlayerSegmentDeletePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameMailTemplateSelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameOnlinePlayerSegment/detail": { - "get": { - "tags": [ - "gameOnlinePlayerSegment" - ], - "summary": "详情", - "operationId": "GameOnlinePlayerSegmentDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -32466,7 +31688,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -32519,7 +31744,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -32572,7 +31800,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -32606,28 +31837,61 @@ } } }, - "/api/gameOnlinePlayerSegment/page": { + "/api/gameMailTemplate/update": { "post": { "tags": [ - "gameOnlinePlayerSegment" + "gameMailTemplate" ], - "summary": "分页查询", - "operationId": "GameOnlinePlayerSegmentPagePost", + "summary": "更新", + "operationId": "GameMailTemplateUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameMailTemplateEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameMailTemplateEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameMailTemplateEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameMailTemplateCategory/add": { + "post": { + "tags": [ + "gameMailTemplateCategory" + ], + "summary": "新增", + "operationId": "GameMailTemplateCategoryAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOnlinePlayerSegmentRequest" + "$ref": "#/components/schemas/AddGameMailTemplateCategoryEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOnlinePlayerSegmentRequest" + "$ref": "#/components/schemas/AddGameMailTemplateCategoryEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOnlinePlayerSegmentRequest" + "$ref": "#/components/schemas/AddGameMailTemplateCategoryEntityRequest" } } } @@ -32660,7 +31924,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" }, "trackId": { "type": "string", @@ -32713,7 +31977,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" }, "trackId": { "type": "string", @@ -32766,7 +32030,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" }, "trackId": { "type": "string", @@ -32800,32 +32064,60 @@ } } }, - "/api/gameOnlinePlayerSegment/syncOnline": { + "/api/gameMailTemplateCategory/delete": { "post": { "tags": [ - "gameOnlinePlayerSegment" + "gameMailTemplateCategory" ], - "summary": "分群同步 Online:定义快照经统一下发入口(syncPlayerSegment 通道)送达 Online,Online 分配分群标识回写本行。\n\n成功置 Synced 并回写回执;失败(含 Online 非 0 协议码镜像异常)置 Failed 落库可见后原样抛出,可重试。", - "operationId": "GameOnlinePlayerSegmentSyncOnlinePost", + "summary": "删除", + "operationId": "GameMailTemplateCategoryDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SyncPlayerSegmentOnlineRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/SyncPlayerSegmentOnlineRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/SyncPlayerSegmentOnlineRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameMailTemplateCategory/detail": { + "get": { + "tags": [ + "gameMailTemplateCategory" + ], + "summary": "详情", + "operationId": "GameMailTemplateCategoryDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -32854,7 +32146,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SyncPlayerSegmentOnlineResponse" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" }, "trackId": { "type": "string", @@ -32907,7 +32199,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SyncPlayerSegmentOnlineResponse" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" }, "trackId": { "type": "string", @@ -32960,7 +32252,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SyncPlayerSegmentOnlineResponse" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponse" }, "trackId": { "type": "string", @@ -32994,61 +32286,28 @@ } } }, - "/api/gameOnlinePlayerSegment/update": { - "post": { - "tags": [ - "gameOnlinePlayerSegment" - ], - "summary": "更新", - "operationId": "GameOnlinePlayerSegmentUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOnlinePlayerSegmentRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOnlinePlayerSegmentRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOnlinePlayerSegmentRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameOrder/add": { + "/api/gameMailTemplateCategory/page": { "post": { "tags": [ - "gameOrder" + "gameMailTemplateCategory" ], - "summary": "新增", - "operationId": "GameOrderAddPost", + "summary": "分页查询", + "operationId": "GameMailTemplateCategoryPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/PageGameMailTemplateCategoryEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/PageGameMailTemplateCategoryEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/PageGameMailTemplateCategoryEntityRequest" } } } @@ -33081,7 +32340,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponse" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -33134,7 +32393,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponse" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -33187,7 +32446,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponse" + "$ref": "#/components/schemas/GameMailTemplateCategoryResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -33221,60 +32480,32 @@ } } }, - "/api/gameOrder/delete": { + "/api/gameMailTemplateCategory/select": { "post": { "tags": [ - "gameOrder" + "gameMailTemplateCategory" ], - "summary": "删除", - "operationId": "GameOrderDeletePost", + "summary": "获取选择器列表", + "operationId": "GameMailTemplateCategorySelectPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameOrder/detail": { - "get": { - "tags": [ - "gameOrder" - ], - "summary": "详情", - "operationId": "GameOrderDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -33303,7 +32534,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -33356,7 +32590,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -33409,7 +32646,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -33443,28 +32683,28 @@ } } }, - "/api/gameOrder/page": { + "/api/gameMailTemplateCategory/selectString": { "post": { "tags": [ - "gameOrder" + "gameMailTemplateCategory" ], - "summary": "分页查询", - "operationId": "GameOrderPagePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameMailTemplateCategorySelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -33497,7 +32737,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -33550,7 +32793,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -33603,7 +32849,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -33637,28 +32886,28 @@ } } }, - "/api/gameOrder/send": { + "/api/gameMailTemplateCategory/update": { "post": { "tags": [ - "gameOrder" + "gameMailTemplateCategory" ], - "summary": "游戏支付订单人工补发(高风险)。走 M:GameFrameX.Application.CommerceCenter.GameOrder.GameOrderShipService.CompensateAsync(System.Int64,System.String,System.Int64) 审计路径:\n必须带操作人(当前登录 Admin),独立幂等键 + OperatorId 落账,不改动订单状态、不重复累加角色累充。", - "operationId": "GameOrderSendPost", + "summary": "更新", + "operationId": "GameMailTemplateCategoryUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/UpdateGameMailTemplateCategoryEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/UpdateGameMailTemplateCategoryEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/UpdateGameMailTemplateCategoryEntityRequest" } } } @@ -33670,28 +32919,28 @@ } } }, - "/api/gameOrder/summary": { + "/api/gameOnlineConfigRollout/page": { "post": { "tags": [ - "gameOrder" + "gameOnlineConfigRollout" ], - "summary": "订单统计汇总", - "operationId": "GameOrderSummaryPost", + "summary": "分页查询版本行:按 ConfigKind / ConfigKey / Status / ServerId 过滤,新版本在前。", + "operationId": "GameOnlineConfigRolloutPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/PageGameOnlineConfigRolloutRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/PageGameOnlineConfigRolloutRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderEntityRequest" + "$ref": "#/components/schemas/PageGameOnlineConfigRolloutRequest" } } } @@ -33724,7 +32973,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderSummaryResponse" + "$ref": "#/components/schemas/GameOnlineConfigRolloutResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -33777,7 +33026,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderSummaryResponse" + "$ref": "#/components/schemas/GameOnlineConfigRolloutResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -33830,7 +33079,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderSummaryResponse" + "$ref": "#/components/schemas/GameOnlineConfigRolloutResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -33864,61 +33113,28 @@ } } }, - "/api/gameOrder/update": { - "post": { - "tags": [ - "gameOrder" - ], - "summary": "更新", - "operationId": "GameOrderUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOrderEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOrderEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOrderEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameOrderFulfillment/add": { + "/api/gameOnlineConfigRollout/publish": { "post": { "tags": [ - "gameOrderFulfillment" + "gameOnlineConfigRollout" ], - "summary": "新增", - "operationId": "GameOrderFulfillmentAddPost", + "summary": "灰度发布:校验(Percent 边界 / 来源存在 / 分群已同步)→ 分配 ConfigVersion → 落版本行 → 经单一入口下发 Online → 回写确认版本并替代旧生效行。\n\n下发失败(Online 非 0 协议码 / 作用域拒绝)时删除刚插入的版本行后原样抛出——Online 未确认即无生效事实,不留半生效审计行,可整重试。", + "operationId": "GameOnlineConfigRolloutPublishPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/PublishConfigRolloutRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/PublishConfigRolloutRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/PublishConfigRolloutRequest" } } } @@ -33951,7 +33167,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + "$ref": "#/components/schemas/PublishConfigRolloutResponse" }, "trackId": { "type": "string", @@ -34004,7 +33220,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + "$ref": "#/components/schemas/PublishConfigRolloutResponse" }, "trackId": { "type": "string", @@ -34057,7 +33273,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + "$ref": "#/components/schemas/PublishConfigRolloutResponse" }, "trackId": { "type": "string", @@ -34091,28 +33307,28 @@ } } }, - "/api/gameOrderFulfillment/compensate": { + "/api/gameOnlineConfigRollout/rollback": { "post": { "tags": [ - "gameOrderFulfillment" + "gameOnlineConfigRollout" ], - "summary": "人工补偿/补发(高风险)。委托 GameOrderShipService.CompensateAsync(C113):按 Purchase 链路重发,账本落 CompensateAsync 类型 + OperatorId 审计。\n\nC223:Admin result 统一对象契约——失败抛 BusinessException 走 AdminResultFilter 统一错误路径,不再透传 HttpJsonResultData 双重信封。", - "operationId": "GameOrderFulfillmentCompensatePost", + "summary": "灰度回滚:版本化新下发——目标版本语义(SegmentId/Percent)恢复到新行,新行 TargetVersion 指向目标,经单一入口 rollbackConfigRollout 通道生效。\n\n目标版本必须存在于该配置的版本序列(无论当前是否生效——恢复任一历史版本行为均合法);成功后旧生效行置 RolledBack。", + "operationId": "GameOnlineConfigRolloutRollbackPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/RollbackConfigRolloutRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/RollbackConfigRolloutRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/RollbackConfigRolloutRequest" } } } @@ -34145,7 +33361,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/RollbackConfigRolloutResponse" }, "trackId": { "type": "string", @@ -34198,7 +33414,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/RollbackConfigRolloutResponse" }, "trackId": { "type": "string", @@ -34251,7 +33467,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/RollbackConfigRolloutResponse" }, "trackId": { "type": "string", @@ -34285,15 +33501,208 @@ } } }, - "/api/gameOrderFulfillment/delete": { + "/api/gameOnlinePlayerSegment/add": { "post": { "tags": [ - "gameOrderFulfillment" + "gameOnlinePlayerSegment" ], - "summary": "删除", - "operationId": "GameOrderFulfillmentDeletePost", + "summary": "新增", + "operationId": "GameOnlinePlayerSegmentAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameOnlinePlayerSegmentRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameOnlinePlayerSegmentRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameOnlinePlayerSegmentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "/api/gameOnlinePlayerSegment/delete": { + "post": { + "tags": [ + "gameOnlinePlayerSegment" + ], + "summary": "删除:已被灰度版本行引用(任一状态)的分群不可删除——版本行是不可变审计历史,引用悬空会破坏回溯。", + "operationId": "GameOnlinePlayerSegmentDeletePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { @@ -34319,13 +33728,13 @@ } } }, - "/api/gameOrderFulfillment/detail": { + "/api/gameOnlinePlayerSegment/detail": { "get": { "tags": [ - "gameOrderFulfillment" + "gameOnlinePlayerSegment" ], "summary": "详情", - "operationId": "GameOrderFulfillmentDetailGet", + "operationId": "GameOnlinePlayerSegmentDetailGet", "parameters": [ { "name": "Id", @@ -34367,7 +33776,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" }, "trackId": { "type": "string", @@ -34420,7 +33829,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" }, "trackId": { "type": "string", @@ -34473,7 +33882,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponse" }, "trackId": { "type": "string", @@ -34507,28 +33916,28 @@ } } }, - "/api/gameOrderFulfillment/export": { + "/api/gameOnlinePlayerSegment/page": { "post": { "tags": [ - "gameOrderFulfillment" + "gameOnlinePlayerSegment" ], - "summary": "导出当前过滤条件下的账本列表(上限 1000 行;文件化由前端处理)。", - "operationId": "GameOrderFulfillmentExportPost", + "summary": "分页查询", + "operationId": "GameOnlinePlayerSegmentPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderFulfillmentEntityRequest" + "$ref": "#/components/schemas/PageGameOnlinePlayerSegmentRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderFulfillmentEntityRequest" + "$ref": "#/components/schemas/PageGameOnlinePlayerSegmentRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderFulfillmentEntityRequest" + "$ref": "#/components/schemas/PageGameOnlinePlayerSegmentRequest" } } } @@ -34561,10 +33970,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" - } + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -34617,10 +34023,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" - } + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -34673,10 +34076,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponse" - } + "$ref": "#/components/schemas/GameOnlinePlayerSegmentResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -34710,28 +34110,28 @@ } } }, - "/api/gameOrderFulfillment/page": { + "/api/gameOnlinePlayerSegment/syncOnline": { "post": { "tags": [ - "gameOrderFulfillment" + "gameOnlinePlayerSegment" ], - "summary": "分页查询", - "operationId": "GameOrderFulfillmentPagePost", + "summary": "分群同步 Online:定义快照经统一下发入口(syncPlayerSegment 通道)送达 Online,Online 分配分群标识回写本行。\n\n成功置 Synced 并回写回执;失败(含 Online 非 0 协议码镜像异常)置 Failed 落库可见后原样抛出,可重试。", + "operationId": "GameOnlinePlayerSegmentSyncOnlinePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderFulfillmentEntityRequest" + "$ref": "#/components/schemas/SyncPlayerSegmentOnlineRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderFulfillmentEntityRequest" + "$ref": "#/components/schemas/SyncPlayerSegmentOnlineRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameOrderFulfillmentEntityRequest" + "$ref": "#/components/schemas/SyncPlayerSegmentOnlineRequest" } } } @@ -34764,7 +34164,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponseSqlSugarPagedList" + "$ref": "#/components/schemas/SyncPlayerSegmentOnlineResponse" }, "trackId": { "type": "string", @@ -34817,7 +34217,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponseSqlSugarPagedList" + "$ref": "#/components/schemas/SyncPlayerSegmentOnlineResponse" }, "trackId": { "type": "string", @@ -34870,7 +34270,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameOrderFulfillmentResponseSqlSugarPagedList" + "$ref": "#/components/schemas/SyncPlayerSegmentOnlineResponse" }, "trackId": { "type": "string", @@ -34904,28 +34304,61 @@ } } }, - "/api/gameOrderFulfillment/refund": { + "/api/gameOnlinePlayerSegment/update": { "post": { "tags": [ - "gameOrderFulfillment" + "gameOnlinePlayerSegment" ], - "summary": "退款扣除(高风险)。C310 / GFX-718 起两阶段:已支付订单先渠道退款(按 PayChannel 路由 IRefundManager——\n渠道失败 / 不支持主动退款 / 配置缺失抛统一错误码 PaymentErrorCode 段 704,本地账本不动),\n渠道成功后委托 GameOrderShipService.RefundAsync(C113):按订单状态走作废 / 扣除路径,账本落 RefundAsync 类型 + 状态 + FailureReason。\nUnpaid 订单未收款,跳过渠道直接本地作废。\n\nC223:Admin result 统一对象契约——失败抛 BusinessException 走 AdminResultFilter 统一错误路径,不再透传 HttpJsonResultData 双重信封。", - "operationId": "GameOrderFulfillmentRefundPost", + "summary": "更新", + "operationId": "GameOnlinePlayerSegmentUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/UpdateGameOnlinePlayerSegmentRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/UpdateGameOnlinePlayerSegmentRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/UpdateGameOnlinePlayerSegmentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameOrder/add": { + "post": { + "tags": [ + "gameOrder" + ], + "summary": "新增", + "operationId": "GameOrderAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameOrderEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameOrderEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameOrderEntityRequest" } } } @@ -34958,7 +34391,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/GameOrderResponse" }, "trackId": { "type": "string", @@ -35011,7 +34444,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/GameOrderResponse" }, "trackId": { "type": "string", @@ -35064,7 +34497,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/GameOrderResponse" }, "trackId": { "type": "string", @@ -35098,32 +34531,60 @@ } } }, - "/api/gameOrderFulfillment/resend": { + "/api/gameOrder/delete": { "post": { "tags": [ - "gameOrderFulfillment" + "gameOrder" ], - "summary": "重新发货(高风险)。收敛到 CompensateAsync(不新增发放类型枚举,C113 已锁定 Purchase/RefundAsync/CompensateAsync 三类)。\n\nC223:Admin result 统一对象契约,同 CompensateAsync。", - "operationId": "GameOrderFulfillmentResendPost", + "summary": "删除", + "operationId": "GameOrderDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/FulfillmentActionRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameOrder/detail": { + "get": { + "tags": [ + "gameOrder" + ], + "summary": "详情", + "operationId": "GameOrderDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -35152,7 +34613,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/GameOrderResponse" }, "trackId": { "type": "string", @@ -35205,7 +34666,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/GameOrderResponse" }, "trackId": { "type": "string", @@ -35258,7 +34719,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FulfillmentActionResponse" + "$ref": "#/components/schemas/GameOrderResponse" }, "trackId": { "type": "string", @@ -35292,61 +34753,28 @@ } } }, - "/api/gameOrderFulfillment/update": { - "post": { - "tags": [ - "gameOrderFulfillment" - ], - "summary": "更新", - "operationId": "GameOrderFulfillmentUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOrderFulfillmentEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOrderFulfillmentEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameOrderFulfillmentEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gamePaymentConfig/add": { + "/api/gameOrder/page": { "post": { "tags": [ - "gamePaymentConfig" + "gameOrder" ], - "summary": "新增支付配置", - "operationId": "GamePaymentConfigAddPost", + "summary": "分页查询", + "operationId": "GameOrderPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddGamePaymentConfigRequest" + "$ref": "#/components/schemas/PageGameOrderEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddGamePaymentConfigRequest" + "$ref": "#/components/schemas/PageGameOrderEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddGamePaymentConfigRequest" + "$ref": "#/components/schemas/PageGameOrderEntityRequest" } } } @@ -35379,7 +34807,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponse" + "$ref": "#/components/schemas/GameOrderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -35432,7 +34860,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponse" + "$ref": "#/components/schemas/GameOrderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -35485,7 +34913,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponse" + "$ref": "#/components/schemas/GameOrderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -35519,13 +34947,65 @@ } } }, - "/api/gamePaymentConfig/channels": { - "get": { + "/api/gameOrder/send": { + "post": { "tags": [ - "gamePaymentConfig" + "gameOrder" ], - "summary": "获取所有支持渠道的清单", - "operationId": "GamePaymentConfigChannelsGet", + "summary": "游戏支付订单人工补发(高风险)。走 M:GameFrameX.Application.CommerceCenter.GameOrder.GameOrderShipService.CompensateAsync(System.Int64,System.String,System.Int64) 审计路径:\n必须带操作人(当前登录 Admin),独立幂等键 + OperatorId 落账,不改动订单状态、不重复累加角色累充。", + "operationId": "GameOrderSendPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameOrderEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameOrderEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameOrderEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameOrder/summary": { + "post": { + "tags": [ + "gameOrder" + ], + "summary": "订单统计汇总", + "operationId": "GameOrderSummaryPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageGameOrderEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageGameOrderEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageGameOrderEntityRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -35554,10 +35034,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentConfigChannel" - } + "$ref": "#/components/schemas/GameOrderSummaryResponse" }, "trackId": { "type": "string", @@ -35610,10 +35087,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentConfigChannel" - } + "$ref": "#/components/schemas/GameOrderSummaryResponse" }, "trackId": { "type": "string", @@ -35666,10 +35140,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentConfigChannel" - } + "$ref": "#/components/schemas/GameOrderSummaryResponse" }, "trackId": { "type": "string", @@ -35703,29 +35174,28 @@ } } }, - "/api/gamePaymentConfig/delete": { + "/api/gameOrder/update": { "post": { "tags": [ - "gamePaymentConfig" + "gameOrder" ], - "summary": "删除", - "operationId": "GamePaymentConfigDeletePost", + "summary": "更新", + "operationId": "GameOrderUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameOrderEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameOrderEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameOrderEntityRequest" } } } @@ -35737,26 +35207,32 @@ } } }, - "/api/gamePaymentConfig/detail": { - "get": { + "/api/gameOrderFulfillment/add": { + "post": { "tags": [ - "gamePaymentConfig" + "gameOrderFulfillment" ], - "summary": "详情(配置脱敏)", - "operationId": "GamePaymentConfigDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "新增", + "operationId": "GameOrderFulfillmentAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FulfillmentActionRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FulfillmentActionRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FulfillmentActionRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -35785,7 +35261,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponse" + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" }, "trackId": { "type": "string", @@ -35838,7 +35314,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponse" + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" }, "trackId": { "type": "string", @@ -35891,7 +35367,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponse" + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" }, "trackId": { "type": "string", @@ -35925,28 +35401,28 @@ } } }, - "/api/gamePaymentConfig/page": { + "/api/gameOrderFulfillment/compensate": { "post": { "tags": [ - "gamePaymentConfig" + "gameOrderFulfillment" ], - "summary": "分页查询(配置脱敏)", - "operationId": "GamePaymentConfigPagePost", + "summary": "人工补偿/补发(高风险)。委托 GameOrderShipService.CompensateAsync(C113):按 Purchase 链路重发,账本落 CompensateAsync 类型 + OperatorId 审计。\n\nC223:Admin result 统一对象契约——失败抛 BusinessException 走 AdminResultFilter 统一错误路径,不再透传 HttpJsonResultData 双重信封。", + "operationId": "GameOrderFulfillmentCompensatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageGamePaymentConfigRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageGamePaymentConfigRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageGamePaymentConfigRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } } } @@ -35979,7 +35455,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -36032,7 +35508,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -36085,7 +35561,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePaymentConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -36119,19 +35595,57 @@ } } }, - "/api/gamePaymentConfig/schema": { + "/api/gameOrderFulfillment/delete": { + "post": { + "tags": [ + "gameOrderFulfillment" + ], + "summary": "删除", + "operationId": "GameOrderFulfillmentDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameOrderFulfillment/detail": { "get": { "tags": [ - "gamePaymentConfig" + "gameOrderFulfillment" ], - "summary": "获取指定支付渠道的字段 schema", - "operationId": "GamePaymentConfigSchemaGet", + "summary": "详情", + "operationId": "GameOrderFulfillmentDetailGet", "parameters": [ { - "name": "payChannel", + "name": "Id", "in": "query", + "required": true, "schema": { - "type": "string" + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } ], @@ -36163,7 +35677,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PaymentConfigSchema" + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" }, "trackId": { "type": "string", @@ -36216,7 +35730,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PaymentConfigSchema" + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" }, "trackId": { "type": "string", @@ -36269,7 +35783,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PaymentConfigSchema" + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" }, "trackId": { "type": "string", @@ -36303,61 +35817,28 @@ } } }, - "/api/gamePaymentConfig/update": { - "post": { - "tags": [ - "gamePaymentConfig" - ], - "summary": "更新支付配置", - "operationId": "GamePaymentConfigUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateGamePaymentConfigRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateGamePaymentConfigRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateGamePaymentConfigRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gamePenalty/add": { + "/api/gameOrderFulfillment/export": { "post": { "tags": [ - "gamePenalty" + "gameOrderFulfillment" ], - "summary": "新增处罚。审计字段服务端强制。", - "operationId": "GamePenaltyAddPost", + "summary": "导出当前过滤条件下的账本列表(上限 1000 行;文件化由前端处理)。", + "operationId": "GameOrderFulfillmentExportPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/PageGameOrderFulfillmentEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/PageGameOrderFulfillmentEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/PageGameOrderFulfillmentEntityRequest" } } } @@ -36390,7 +35871,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + } }, "trackId": { "type": "string", @@ -36443,7 +35927,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + } }, "trackId": { "type": "string", @@ -36496,7 +35983,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GameOrderFulfillmentResponse" + } }, "trackId": { "type": "string", @@ -36530,60 +36020,32 @@ } } }, - "/api/gamePenalty/delete": { + "/api/gameOrderFulfillment/page": { "post": { "tags": [ - "gamePenalty" + "gameOrderFulfillment" ], - "summary": "删除", - "operationId": "GamePenaltyDeletePost", + "summary": "分页查询", + "operationId": "GameOrderFulfillmentPagePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameOrderFulfillmentEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameOrderFulfillmentEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameOrderFulfillmentEntityRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gamePenalty/detail": { - "get": { - "tags": [ - "gamePenalty" - ], - "summary": "详情", - "operationId": "GamePenaltyDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -36612,7 +36074,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponse" + "$ref": "#/components/schemas/GameOrderFulfillmentResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -36665,7 +36127,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponse" + "$ref": "#/components/schemas/GameOrderFulfillmentResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -36718,7 +36180,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponse" + "$ref": "#/components/schemas/GameOrderFulfillmentResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -36752,28 +36214,28 @@ } } }, - "/api/gamePenalty/page": { + "/api/gameOrderFulfillment/refund": { "post": { "tags": [ - "gamePenalty" + "gameOrderFulfillment" ], - "summary": "分页查询", - "operationId": "GamePenaltyPagePost", + "summary": "退款扣除(高风险)。C310 / GFX-718 起两阶段:已支付订单先渠道退款(按 PayChannel 路由 IRefundManager——\n渠道失败 / 不支持主动退款 / 配置缺失抛统一错误码 PaymentErrorCode 段 704,本地账本不动),\n渠道成功后委托 GameOrderShipService.RefundAsync(C113):按订单状态走作废 / 扣除路径,账本落 RefundAsync 类型 + 状态 + FailureReason。\nUnpaid 订单未收款,跳过渠道直接本地作废。\n\nC223:Admin result 统一对象契约——失败抛 BusinessException 走 AdminResultFilter 统一错误路径,不再透传 HttpJsonResultData 双重信封。", + "operationId": "GameOrderFulfillmentRefundPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } } } @@ -36806,7 +36268,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -36859,7 +36321,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -36912,7 +36374,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -36946,63 +36408,28 @@ } } }, - "/api/gamePenalty/revoke": { - "post": { - "tags": [ - "gamePenalty" - ], - "summary": "撤销生效中处罚。仅 Active 可撤销;写撤销审计三元组。Enforcement 直读库无缓存,撤销后即时生效。", - "operationId": "GamePenaltyRevokePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RevokeTenantGamePenaltyEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/RevokeTenantGamePenaltyEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/RevokeTenantGamePenaltyEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gamePenalty/syncOnlineRuntime": { + "/api/gameOrderFulfillment/resend": { "post": { "tags": [ - "gamePenalty" + "gameOrderFulfillment" ], - "summary": "把生效中处罚同步到 Online 运行时(手动补发联动;Add/Revoke 语义不变)。联动命令按 ActionType 服务端推导,\n经 GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService 唯一入口下发——事实源先行、联动可重试(同 IdempotencyKey 重试幂等)。", - "operationId": "GamePenaltySyncOnlineRuntimePost", + "summary": "重新发货(高风险)。收敛到 CompensateAsync(不新增发放类型枚举,C113 已锁定 Purchase/RefundAsync/CompensateAsync 三类)。\n\nC223:Admin result 统一对象契约,同 CompensateAsync。", + "operationId": "GameOrderFulfillmentResendPost", "requestBody": { - "description": "处罚 Id(必须生效中)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SyncOnlineRuntimeTenantGamePenaltyRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/SyncOnlineRuntimeTenantGamePenaltyRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/SyncOnlineRuntimeTenantGamePenaltyRequest" + "$ref": "#/components/schemas/FulfillmentActionRequest" } } } @@ -37035,7 +36462,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -37088,7 +36515,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -37141,7 +36568,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + "$ref": "#/components/schemas/FulfillmentActionResponse" }, "trackId": { "type": "string", @@ -37175,28 +36602,28 @@ } } }, - "/api/gamePenalty/update": { + "/api/gameOrderFulfillment/update": { "post": { "tags": [ - "gamePenalty" + "gameOrderFulfillment" ], "summary": "更新", - "operationId": "GamePenaltyUpdatePost", + "operationId": "GameOrderFulfillmentUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/UpdateGameOrderFulfillmentEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/UpdateGameOrderFulfillmentEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGamePenaltyEntityRequest" + "$ref": "#/components/schemas/UpdateGameOrderFulfillmentEntityRequest" } } } @@ -37208,28 +36635,28 @@ } } }, - "/api/gamePenaltyAppeal/add": { + "/api/gamePaymentConfig/add": { "post": { "tags": [ - "gamePenaltyAppeal" + "gamePaymentConfig" ], - "summary": "提交申诉:校验处罚生效中、同一处罚无待审申诉;Status 服务端强制为 Pending。", - "operationId": "GamePenaltyAppealAddPost", + "summary": "新增支付配置", + "operationId": "GamePaymentConfigAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGamePenaltyAppealEntityRequest" + "$ref": "#/components/schemas/AddGamePaymentConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGamePenaltyAppealEntityRequest" + "$ref": "#/components/schemas/AddGamePaymentConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGamePenaltyAppealEntityRequest" + "$ref": "#/components/schemas/AddGamePaymentConfigRequest" } } } @@ -37262,7 +36689,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponse" + "$ref": "#/components/schemas/GamePaymentConfigResponse" }, "trackId": { "type": "string", @@ -37315,7 +36742,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponse" + "$ref": "#/components/schemas/GamePaymentConfigResponse" }, "trackId": { "type": "string", @@ -37368,7 +36795,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponse" + "$ref": "#/components/schemas/GamePaymentConfigResponse" }, "trackId": { "type": "string", @@ -37402,60 +36829,13 @@ } } }, - "/api/gamePenaltyAppeal/delete": { - "post": { - "tags": [ - "gamePenaltyAppeal" - ], - "summary": "删除", - "operationId": "GamePenaltyAppealDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gamePenaltyAppeal/detail": { + "/api/gamePaymentConfig/channels": { "get": { "tags": [ - "gamePenaltyAppeal" - ], - "summary": "详情", - "operationId": "GamePenaltyAppealDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } + "gamePaymentConfig" ], + "summary": "获取所有支持渠道的清单", + "operationId": "GamePaymentConfigChannelsGet", "responses": { "200": { "description": "OK", @@ -37484,7 +36864,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentConfigChannel" + } }, "trackId": { "type": "string", @@ -37537,7 +36920,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentConfigChannel" + } }, "trackId": { "type": "string", @@ -37590,7 +36976,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentConfigChannel" + } }, "trackId": { "type": "string", @@ -37624,32 +37013,60 @@ } } }, - "/api/gamePenaltyAppeal/page": { + "/api/gamePaymentConfig/delete": { "post": { "tags": [ - "gamePenaltyAppeal" + "gamePaymentConfig" ], - "summary": "分页查询", - "operationId": "GamePenaltyAppealPagePost", + "summary": "删除", + "operationId": "GamePaymentConfigDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGamePenaltyAppealEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGamePenaltyAppealEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGamePenaltyAppealEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gamePaymentConfig/detail": { + "get": { + "tags": [ + "gamePaymentConfig" + ], + "summary": "详情(配置脱敏)", + "operationId": "GamePaymentConfigDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -37678,7 +37095,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePaymentConfigResponse" }, "trackId": { "type": "string", @@ -37731,7 +37148,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePaymentConfigResponse" }, "trackId": { "type": "string", @@ -37784,7 +37201,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GamePenaltyAppealResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePaymentConfigResponse" }, "trackId": { "type": "string", @@ -37818,95 +37235,28 @@ } } }, - "/api/gamePenaltyAppeal/review": { - "post": { - "tags": [ - "gamePenaltyAppeal" - ], - "summary": "审核申诉。仅 Pending 可审核。通过→撤销关联处罚并写 SourceAppealId 审计;驳回→Rejected。审核人/备注/时间服务端写。", - "operationId": "GamePenaltyAppealReviewPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReviewTenantGamePenaltyAppealEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ReviewTenantGamePenaltyAppealEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/ReviewTenantGamePenaltyAppealEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gamePenaltyAppeal/update": { - "post": { - "tags": [ - "gamePenaltyAppeal" - ], - "summary": "更新", - "operationId": "GamePenaltyAppealUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGamePenaltyAppealEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGamePenaltyAppealEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGamePenaltyAppealEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRedeemCode/add": { + "/api/gamePaymentConfig/page": { "post": { "tags": [ - "gameRedeemCode" + "gamePaymentConfig" ], - "summary": "新增", - "operationId": "GameRedeemCodeAddPost", + "summary": "分页查询(配置脱敏)", + "operationId": "GamePaymentConfigPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeEntityRequest" + "$ref": "#/components/schemas/PageGamePaymentConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeEntityRequest" + "$ref": "#/components/schemas/PageGamePaymentConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeEntityRequest" + "$ref": "#/components/schemas/PageGamePaymentConfigRequest" } } } @@ -37939,7 +37289,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponse" + "$ref": "#/components/schemas/GamePaymentConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -37992,7 +37342,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponse" + "$ref": "#/components/schemas/GamePaymentConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -38045,7 +37395,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponse" + "$ref": "#/components/schemas/GamePaymentConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -38079,57 +37429,19 @@ } } }, - "/api/gameRedeemCode/delete": { - "post": { - "tags": [ - "gameRedeemCode" - ], - "summary": "删除", - "operationId": "GameRedeemCodeDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRedeemCode/detail": { + "/api/gamePaymentConfig/schema": { "get": { "tags": [ - "gameRedeemCode" + "gamePaymentConfig" ], - "summary": "详情", - "operationId": "GameRedeemCodeDetailGet", + "summary": "获取指定支付渠道的字段 schema", + "operationId": "GamePaymentConfigSchemaGet", "parameters": [ { - "name": "Id", + "name": "payChannel", "in": "query", - "required": true, "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "type": "string" } } ], @@ -38161,7 +37473,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponse" + "$ref": "#/components/schemas/PaymentConfigSchema" }, "trackId": { "type": "string", @@ -38214,7 +37526,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponse" + "$ref": "#/components/schemas/PaymentConfigSchema" }, "trackId": { "type": "string", @@ -38267,7 +37579,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponse" + "$ref": "#/components/schemas/PaymentConfigSchema" }, "trackId": { "type": "string", @@ -38301,28 +37613,61 @@ } } }, - "/api/gameRedeemCode/page": { + "/api/gamePaymentConfig/update": { "post": { "tags": [ - "gameRedeemCode" + "gamePaymentConfig" ], - "summary": "分页查询", - "operationId": "GameRedeemCodePagePost", + "summary": "更新支付配置", + "operationId": "GamePaymentConfigUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGamePaymentConfigRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGamePaymentConfigRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGamePaymentConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gamePenalty/add": { + "post": { + "tags": [ + "gamePenalty" + ], + "summary": "新增处罚。审计字段服务端强制。", + "operationId": "GamePenaltyAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeEntityRequest" + "$ref": "#/components/schemas/AddGamePenaltyEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeEntityRequest" + "$ref": "#/components/schemas/AddGamePenaltyEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeEntityRequest" + "$ref": "#/components/schemas/AddGamePenaltyEntityRequest" } } } @@ -38355,234 +37700,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponseSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponseSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameRedeemCodeResponseSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/api/gameRedeemCode/update": { - "post": { - "tags": [ - "gameRedeemCode" - ], - "summary": "更新", - "operationId": "GameRedeemCodeUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRedeemCodeChannel/add": { - "post": { - "tags": [ - "gameRedeemCodeChannel" - ], - "summary": "新增", - "operationId": "GameRedeemCodeChannelAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeChannelEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeChannelEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeChannelEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" + "$ref": "#/components/schemas/GamePenaltyResponse" }, "trackId": { "type": "string", @@ -38635,7 +37753,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" + "$ref": "#/components/schemas/GamePenaltyResponse" }, "trackId": { "type": "string", @@ -38688,7 +37806,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" + "$ref": "#/components/schemas/GamePenaltyResponse" }, "trackId": { "type": "string", @@ -38722,13 +37840,13 @@ } } }, - "/api/gameRedeemCodeChannel/delete": { + "/api/gamePenalty/delete": { "post": { "tags": [ - "gameRedeemCodeChannel" + "gamePenalty" ], "summary": "删除", - "operationId": "GameRedeemCodeChannelDeletePost", + "operationId": "GamePenaltyDeletePost", "requestBody": { "description": "", "content": { @@ -38756,13 +37874,13 @@ } } }, - "/api/gameRedeemCodeChannel/detail": { + "/api/gamePenalty/detail": { "get": { "tags": [ - "gameRedeemCodeChannel" + "gamePenalty" ], "summary": "详情", - "operationId": "GameRedeemCodeChannelDetailGet", + "operationId": "GamePenaltyDetailGet", "parameters": [ { "name": "Id", @@ -38804,7 +37922,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" + "$ref": "#/components/schemas/GamePenaltyResponse" }, "trackId": { "type": "string", @@ -38857,7 +37975,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" + "$ref": "#/components/schemas/GamePenaltyResponse" }, "trackId": { "type": "string", @@ -38910,7 +38028,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" + "$ref": "#/components/schemas/GamePenaltyResponse" }, "trackId": { "type": "string", @@ -38944,28 +38062,28 @@ } } }, - "/api/gameRedeemCodeChannel/page": { + "/api/gamePenalty/page": { "post": { "tags": [ - "gameRedeemCodeChannel" + "gamePenalty" ], "summary": "分页查询", - "operationId": "GameRedeemCodeChannelPagePost", + "operationId": "GamePenaltyPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeChannelEntityRequest" + "$ref": "#/components/schemas/PageGamePenaltyEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeChannelEntityRequest" + "$ref": "#/components/schemas/PageGamePenaltyEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeChannelEntityRequest" + "$ref": "#/components/schemas/PageGamePenaltyEntityRequest" } } } @@ -38998,7 +38116,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePenaltyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -39051,7 +38169,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePenaltyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -39104,7 +38222,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeChannelResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePenaltyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -39138,231 +38256,63 @@ } } }, - "/api/gameRedeemCodeChannel/select": { + "/api/gamePenalty/revoke": { "post": { "tags": [ - "gameRedeemCodeChannel" + "gamePenalty" ], - "summary": "获取选择器列表", - "operationId": "GameRedeemCodeChannelSelectPost", + "summary": "撤销生效中处罚。仅 Active 可撤销;写撤销审计三元组。Enforcement 直读库无缓存,撤销后即时生效。", + "operationId": "GamePenaltyRevokePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/RevokeGamePenaltyEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/RevokeGamePenaltyEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/RevokeGamePenaltyEntityRequest" } } } }, "responses": { "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } + "description": "OK" } } } }, - "/api/gameRedeemCodeChannel/selectString": { + "/api/gamePenalty/syncOnlineRuntime": { "post": { "tags": [ - "gameRedeemCodeChannel" + "gamePenalty" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameRedeemCodeChannelSelectStringPost", + "summary": "把生效中处罚同步到 Online 运行时(手动补发联动;Add/Revoke 语义不变)。联动命令按 ActionType 服务端推导,\n经 GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService 唯一入口下发——事实源先行、联动可重试(同 IdempotencyKey 重试幂等)。", + "operationId": "GamePenaltySyncOnlineRuntimePost", "requestBody": { + "description": "处罚 Id(必须生效中)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/SyncOnlineRuntimeGamePenaltyRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/SyncOnlineRuntimeGamePenaltyRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/SyncOnlineRuntimeGamePenaltyRequest" } } } @@ -39395,10 +38345,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" }, "trackId": { "type": "string", @@ -39451,10 +38398,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" }, "trackId": { "type": "string", @@ -39507,10 +38451,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" }, "trackId": { "type": "string", @@ -39544,28 +38485,28 @@ } } }, - "/api/gameRedeemCodeChannel/update": { + "/api/gamePenalty/update": { "post": { "tags": [ - "gameRedeemCodeChannel" + "gamePenalty" ], "summary": "更新", - "operationId": "GameRedeemCodeChannelUpdatePost", + "operationId": "GamePenaltyUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeChannelEntityRequest" + "$ref": "#/components/schemas/UpdateGamePenaltyEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeChannelEntityRequest" + "$ref": "#/components/schemas/UpdateGamePenaltyEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeChannelEntityRequest" + "$ref": "#/components/schemas/UpdateGamePenaltyEntityRequest" } } } @@ -39577,28 +38518,28 @@ } } }, - "/api/gameRedeemCodeUseRecord/add": { + "/api/gamePenaltyAppeal/add": { "post": { "tags": [ - "gameRedeemCodeUseRecord" + "gamePenaltyAppeal" ], - "summary": "新增", - "operationId": "GameRedeemCodeUseRecordAddPost", + "summary": "提交申诉:校验处罚生效中、同一处罚无待审申诉;Status 服务端强制为 Pending。", + "operationId": "GamePenaltyAppealAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/AddGamePenaltyAppealEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/AddGamePenaltyAppealEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/AddGamePenaltyAppealEntityRequest" } } } @@ -39631,7 +38572,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" + "$ref": "#/components/schemas/GamePenaltyAppealResponse" }, "trackId": { "type": "string", @@ -39684,7 +38625,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" + "$ref": "#/components/schemas/GamePenaltyAppealResponse" }, "trackId": { "type": "string", @@ -39737,7 +38678,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" + "$ref": "#/components/schemas/GamePenaltyAppealResponse" }, "trackId": { "type": "string", @@ -39771,13 +38712,13 @@ } } }, - "/api/gameRedeemCodeUseRecord/delete": { + "/api/gamePenaltyAppeal/delete": { "post": { "tags": [ - "gameRedeemCodeUseRecord" + "gamePenaltyAppeal" ], "summary": "删除", - "operationId": "GameRedeemCodeUseRecordDeletePost", + "operationId": "GamePenaltyAppealDeletePost", "requestBody": { "description": "", "content": { @@ -39805,13 +38746,13 @@ } } }, - "/api/gameRedeemCodeUseRecord/detail": { + "/api/gamePenaltyAppeal/detail": { "get": { "tags": [ - "gameRedeemCodeUseRecord" + "gamePenaltyAppeal" ], "summary": "详情", - "operationId": "GameRedeemCodeUseRecordDetailGet", + "operationId": "GamePenaltyAppealDetailGet", "parameters": [ { "name": "Id", @@ -39853,7 +38794,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" + "$ref": "#/components/schemas/GamePenaltyAppealResponse" }, "trackId": { "type": "string", @@ -39906,7 +38847,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" + "$ref": "#/components/schemas/GamePenaltyAppealResponse" }, "trackId": { "type": "string", @@ -39959,7 +38900,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" + "$ref": "#/components/schemas/GamePenaltyAppealResponse" }, "trackId": { "type": "string", @@ -39993,28 +38934,28 @@ } } }, - "/api/gameRedeemCodeUseRecord/page": { + "/api/gamePenaltyAppeal/page": { "post": { "tags": [ - "gameRedeemCodeUseRecord" + "gamePenaltyAppeal" ], "summary": "分页查询", - "operationId": "GameRedeemCodeUseRecordPagePost", + "operationId": "GamePenaltyAppealPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/PageGamePenaltyAppealEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/PageGamePenaltyAppealEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/PageGamePenaltyAppealEntityRequest" } } } @@ -40047,7 +38988,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePenaltyAppealResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -40100,7 +39041,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePenaltyAppealResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -40153,7 +39094,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GamePenaltyAppealResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -40187,13 +39128,99 @@ } } }, - "/api/gameRedeemCodeUseRecord/tenantGameAreaEntityAreaIdDropdown": { - "get": { + "/api/gamePenaltyAppeal/review": { + "post": { "tags": [ - "gameRedeemCodeUseRecord" + "gamePenaltyAppeal" ], - "summary": "获取区服下拉列表(AreaId 外键关联)", - "operationId": "GameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGet", + "summary": "审核申诉。仅 Pending 可审核。通过→撤销关联处罚并写 SourceAppealId 审计;驳回→Rejected。审核人/备注/时间服务端写。", + "operationId": "GamePenaltyAppealReviewPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReviewGamePenaltyAppealEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ReviewGamePenaltyAppealEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ReviewGamePenaltyAppealEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gamePenaltyAppeal/update": { + "post": { + "tags": [ + "gamePenaltyAppeal" + ], + "summary": "更新", + "operationId": "GamePenaltyAppealUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGamePenaltyAppealEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGamePenaltyAppealEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGamePenaltyAppealEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRedeemCode/add": { + "post": { + "tags": [ + "gameRedeemCode" + ], + "summary": "新增", + "operationId": "GameRedeemCodeAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameRedeemCodeEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameRedeemCodeEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameRedeemCodeEntityRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -40222,10 +39249,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRedeemCodeResponse" }, "trackId": { "type": "string", @@ -40278,10 +39302,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRedeemCodeResponse" }, "trackId": { "type": "string", @@ -40334,10 +39355,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRedeemCodeResponse" }, "trackId": { "type": "string", @@ -40371,28 +39389,29 @@ } } }, - "/api/gameRedeemCodeUseRecord/update": { + "/api/gameRedeemCode/delete": { "post": { "tags": [ - "gameRedeemCodeUseRecord" + "gameRedeemCode" ], - "summary": "更新", - "operationId": "GameRedeemCodeUseRecordUpdatePost", + "summary": "删除", + "operationId": "GameRedeemCodeDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRedeemCodeUseRecordEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -40404,32 +39423,26 @@ } } }, - "/api/gameReport/add": { - "post": { + "/api/gameRedeemCode/detail": { + "get": { "tags": [ - "gameReport" + "gameRedeemCode" ], - "summary": "录入举报:Status/HandlerId 服务端强制。", - "operationId": "GameReportAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameReportEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameReportEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameReportEntityRequest" - } + "summary": "详情", + "operationId": "GameRedeemCodeDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -40458,7 +39471,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponse" + "$ref": "#/components/schemas/GameRedeemCodeResponse" }, "trackId": { "type": "string", @@ -40511,7 +39524,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponse" + "$ref": "#/components/schemas/GameRedeemCodeResponse" }, "trackId": { "type": "string", @@ -40564,7 +39577,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponse" + "$ref": "#/components/schemas/GameRedeemCodeResponse" }, "trackId": { "type": "string", @@ -40598,60 +39611,32 @@ } } }, - "/api/gameReport/delete": { + "/api/gameRedeemCode/page": { "post": { "tags": [ - "gameReport" + "gameRedeemCode" ], - "summary": "删除", - "operationId": "GameReportDeletePost", + "summary": "分页查询", + "operationId": "GameRedeemCodePagePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeEntityRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameReport/detail": { - "get": { - "tags": [ - "gameReport" - ], - "summary": "详情", - "operationId": "GameReportDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -40680,7 +39665,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponse" + "$ref": "#/components/schemas/GameRedeemCodeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -40733,7 +39718,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponse" + "$ref": "#/components/schemas/GameRedeemCodeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -40786,7 +39771,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponse" + "$ref": "#/components/schemas/GameRedeemCodeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -40820,29 +39805,28 @@ } } }, - "/api/gameReport/linkPenalty": { + "/api/gameRedeemCode/update": { "post": { "tags": [ - "gameReport" + "gameRedeemCode" ], - "summary": "关联处罚:仅 Confirmed 举报可关联;处罚必须存在;写 ResultPenaltyId + HandlerId,不自动创建处罚。", - "operationId": "GameReportLinkPenaltyPost", + "summary": "更新", + "operationId": "GameRedeemCodeUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LinkPenaltyTenantGameReportEntityRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/LinkPenaltyTenantGameReportEntityRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/LinkPenaltyTenantGameReportEntityRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeEntityRequest" } } } @@ -40854,28 +39838,28 @@ } } }, - "/api/gameReport/page": { + "/api/gameRedeemCodeChannel/add": { "post": { "tags": [ - "gameReport" + "gameRedeemCodeChannel" ], - "summary": "分页查询", - "operationId": "GameReportPagePost", + "summary": "新增", + "operationId": "GameRedeemCodeChannelAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameReportEntityRequest" + "$ref": "#/components/schemas/AddGameRedeemCodeChannelEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameReportEntityRequest" + "$ref": "#/components/schemas/AddGameRedeemCodeChannelEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameReportEntityRequest" + "$ref": "#/components/schemas/AddGameRedeemCodeChannelEntityRequest" } } } @@ -40908,7 +39892,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" }, "trackId": { "type": "string", @@ -40961,7 +39945,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" }, "trackId": { "type": "string", @@ -41014,7 +39998,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameReportResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" }, "trackId": { "type": "string", @@ -41048,28 +40032,29 @@ } } }, - "/api/gameReport/update": { + "/api/gameRedeemCodeChannel/delete": { "post": { "tags": [ - "gameReport" + "gameRedeemCodeChannel" ], - "summary": "更新", - "operationId": "GameReportUpdatePost", + "summary": "删除", + "operationId": "GameRedeemCodeChannelDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameReportEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameReportEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameReportEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -41081,32 +40066,26 @@ } } }, - "/api/gameRewardTemplate/add": { - "post": { + "/api/gameRedeemCodeChannel/detail": { + "get": { "tags": [ - "gameRewardTemplate" + "gameRedeemCodeChannel" ], - "summary": "新增", - "operationId": "GameRewardTemplateAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameRewardTemplateEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameRewardTemplateEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddTenantGameRewardTemplateEntityRequest" - } + "summary": "详情", + "operationId": "GameRedeemCodeChannelDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -41135,7 +40114,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponse" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" }, "trackId": { "type": "string", @@ -41188,7 +40167,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponse" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" }, "trackId": { "type": "string", @@ -41241,7 +40220,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponse" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponse" }, "trackId": { "type": "string", @@ -41275,28 +40254,28 @@ } } }, - "/api/gameRewardTemplate/copySnapshot": { + "/api/gameRedeemCodeChannel/page": { "post": { "tags": [ - "gameRewardTemplate" + "gameRedeemCodeChannel" ], - "summary": "复制当前模板奖励快照。业务侧应保存返回的 JSON 快照,而不是运行时引用模板。", - "operationId": "GameRewardTemplateCopySnapshotPost", + "summary": "分页查询", + "operationId": "GameRedeemCodeChannelPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameRewardTemplateSnapshotRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeChannelEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GameRewardTemplateSnapshotRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeChannelEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GameRewardTemplateSnapshotRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeChannelEntityRequest" } } } @@ -41329,7 +40308,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateSnapshotResponse" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -41382,7 +40361,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateSnapshotResponse" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -41435,7 +40414,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateSnapshotResponse" + "$ref": "#/components/schemas/GameRedeemCodeChannelResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -41469,60 +40448,235 @@ } } }, - "/api/gameRewardTemplate/delete": { + "/api/gameRedeemCodeChannel/select": { "post": { "tags": [ - "gameRewardTemplate" + "gameRedeemCodeChannel" ], - "summary": "删除", - "operationId": "GameRewardTemplateDeletePost", + "summary": "获取选择器列表", + "operationId": "GameRedeemCodeChannelSelectPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } } } } }, - "/api/gameRewardTemplate/detail": { - "get": { + "/api/gameRedeemCodeChannel/selectString": { + "post": { "tags": [ - "gameRewardTemplate" + "gameRedeemCodeChannel" ], - "summary": "详情", - "operationId": "GameRewardTemplateDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameRedeemCodeChannelSelectStringPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -41551,7 +40705,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -41604,7 +40761,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -41657,7 +40817,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -41691,28 +40854,61 @@ } } }, - "/api/gameRewardTemplate/page": { + "/api/gameRedeemCodeChannel/update": { "post": { "tags": [ - "gameRewardTemplate" + "gameRedeemCodeChannel" ], - "summary": "分页查询", - "operationId": "GameRewardTemplatePagePost", + "summary": "更新", + "operationId": "GameRedeemCodeChannelUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRewardTemplateEntityRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeChannelEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRewardTemplateEntityRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeChannelEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRewardTemplateEntityRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeChannelEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRedeemCodeUseRecord/add": { + "post": { + "tags": [ + "gameRedeemCodeUseRecord" + ], + "summary": "新增", + "operationId": "GameRedeemCodeUseRecordAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameRedeemCodeUseRecordEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameRedeemCodeUseRecordEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameRedeemCodeUseRecordEntityRequest" } } } @@ -41745,7 +40941,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" }, "trackId": { "type": "string", @@ -41798,7 +40994,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" }, "trackId": { "type": "string", @@ -41851,7 +41047,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" }, "trackId": { "type": "string", @@ -41885,32 +41081,60 @@ } } }, - "/api/gameRewardTemplate/select": { + "/api/gameRedeemCodeUseRecord/delete": { "post": { "tags": [ - "gameRewardTemplate" + "gameRedeemCodeUseRecord" ], - "summary": "获取主库中启用的奖励模板。", - "operationId": "GameRewardTemplateSelectPost", + "summary": "删除", + "operationId": "GameRedeemCodeUseRecordDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRedeemCodeUseRecord/detail": { + "get": { + "tags": [ + "gameRedeemCodeUseRecord" + ], + "summary": "详情", + "operationId": "GameRedeemCodeUseRecordDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -41939,10 +41163,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" }, "trackId": { "type": "string", @@ -41995,10 +41216,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" }, "trackId": { "type": "string", @@ -42051,10 +41269,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponse" }, "trackId": { "type": "string", @@ -42088,32 +41303,13 @@ } } }, - "/api/gameRewardTemplate/selectString": { - "post": { + "/api/gameRedeemCodeUseRecord/gameAreaEntityAreaIdDropdown": { + "get": { "tags": [ - "gameRewardTemplate" + "gameRedeemCodeUseRecord" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameRewardTemplateSelectStringPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - } - } - }, + "summary": "获取区服下拉列表(AreaId 外键关联)", + "operationId": "GameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGet", "responses": { "200": { "description": "OK", @@ -42144,7 +41340,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -42200,7 +41396,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -42256,7 +41452,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -42291,61 +41487,28 @@ } } }, - "/api/gameRewardTemplate/update": { - "post": { - "tags": [ - "gameRewardTemplate" - ], - "summary": "更新", - "operationId": "GameRewardTemplateUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRewardTemplateEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRewardTemplateEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRewardTemplateEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRewardTemplateGroup/add": { + "/api/gameRedeemCodeUseRecord/page": { "post": { "tags": [ - "gameRewardTemplateGroup" + "gameRedeemCodeUseRecord" ], - "summary": "新增", - "operationId": "GameRewardTemplateGroupAddPost", + "summary": "分页查询", + "operationId": "GameRedeemCodeUseRecordPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeUseRecordEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeUseRecordEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/PageGameRedeemCodeUseRecordEntityRequest" } } } @@ -42378,7 +41541,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -42431,7 +41594,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -42484,7 +41647,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" + "$ref": "#/components/schemas/GameRedeemCodeUseRecordResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -42518,29 +41681,28 @@ } } }, - "/api/gameRewardTemplateGroup/delete": { + "/api/gameRedeemCodeUseRecord/update": { "post": { "tags": [ - "gameRewardTemplateGroup" + "gameRedeemCodeUseRecord" ], - "summary": "删除", - "operationId": "GameRewardTemplateGroupDeletePost", + "summary": "更新", + "operationId": "GameRedeemCodeUseRecordUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeUseRecordEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeUseRecordEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameRedeemCodeUseRecordEntityRequest" } } } @@ -42552,26 +41714,32 @@ } } }, - "/api/gameRewardTemplateGroup/detail": { - "get": { + "/api/gameReport/add": { + "post": { "tags": [ - "gameRewardTemplateGroup" + "gameReport" ], - "summary": "详情", - "operationId": "GameRewardTemplateGroupDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "录入举报:Status/HandlerId 服务端强制。", + "operationId": "GameReportAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameReportEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameReportEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameReportEntityRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -42600,7 +41768,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" + "$ref": "#/components/schemas/GameReportResponse" }, "trackId": { "type": "string", @@ -42653,7 +41821,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" + "$ref": "#/components/schemas/GameReportResponse" }, "trackId": { "type": "string", @@ -42706,7 +41874,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" + "$ref": "#/components/schemas/GameReportResponse" }, "trackId": { "type": "string", @@ -42740,32 +41908,60 @@ } } }, - "/api/gameRewardTemplateGroup/page": { + "/api/gameReport/delete": { "post": { "tags": [ - "gameRewardTemplateGroup" + "gameReport" ], - "summary": "分页查询", - "operationId": "GameRewardTemplateGroupPagePost", + "summary": "删除", + "operationId": "GameReportDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameReport/detail": { + "get": { + "tags": [ + "gameReport" + ], + "summary": "详情", + "operationId": "GameReportDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -42794,7 +41990,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameReportResponse" }, "trackId": { "type": "string", @@ -42847,7 +42043,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameReportResponse" }, "trackId": { "type": "string", @@ -42900,7 +42096,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRewardTemplateGroupResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameReportResponse" }, "trackId": { "type": "string", @@ -42934,231 +42130,62 @@ } } }, - "/api/gameRewardTemplateGroup/select": { + "/api/gameReport/linkPenalty": { "post": { "tags": [ - "gameRewardTemplateGroup" + "gameReport" ], - "summary": "获取主库中启用的奖励模板分组。", - "operationId": "GameRewardTemplateGroupSelectPost", + "summary": "关联处罚:仅 Confirmed 举报可关联;处罚必须存在;写 ResultPenaltyId + HandlerId,不自动创建处罚。", + "operationId": "GameReportLinkPenaltyPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/LinkPenaltyGameReportEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/LinkPenaltyGameReportEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/LinkPenaltyGameReportEntityRequest" } } } }, "responses": { "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } + "description": "OK" } } } }, - "/api/gameRewardTemplateGroup/selectString": { + "/api/gameReport/page": { "post": { "tags": [ - "gameRewardTemplateGroup" + "gameReport" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameRewardTemplateGroupSelectStringPost", + "summary": "分页查询", + "operationId": "GameReportPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameReportEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameReportEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameReportEntityRequest" } } } @@ -43191,10 +42218,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameReportResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -43247,10 +42271,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameReportResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -43303,10 +42324,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameReportResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -43340,28 +42358,28 @@ } } }, - "/api/gameRewardTemplateGroup/update": { + "/api/gameReport/update": { "post": { "tags": [ - "gameRewardTemplateGroup" + "gameReport" ], "summary": "更新", - "operationId": "GameRewardTemplateGroupUpdatePost", + "operationId": "GameReportUpdatePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/UpdateGameReportEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/UpdateGameReportEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRewardTemplateGroupEntityRequest" + "$ref": "#/components/schemas/UpdateGameReportEntityRequest" } } } @@ -43373,28 +42391,28 @@ } } }, - "/api/gameRole/add": { + "/api/gameRewardTemplate/add": { "post": { "tags": [ - "gameRole" + "gameRewardTemplate" ], "summary": "新增", - "operationId": "GameRoleAddPost", + "operationId": "GameRewardTemplateAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRoleEntityRequest" + "$ref": "#/components/schemas/AddGameRewardTemplateEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRoleEntityRequest" + "$ref": "#/components/schemas/AddGameRewardTemplateEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameRoleEntityRequest" + "$ref": "#/components/schemas/AddGameRewardTemplateEntityRequest" } } } @@ -43427,7 +42445,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRoleResponse" + "$ref": "#/components/schemas/GameRewardTemplateResponse" }, "trackId": { "type": "string", @@ -43480,7 +42498,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRoleResponse" + "$ref": "#/components/schemas/GameRewardTemplateResponse" }, "trackId": { "type": "string", @@ -43533,7 +42551,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRoleResponse" + "$ref": "#/components/schemas/GameRewardTemplateResponse" }, "trackId": { "type": "string", @@ -43567,60 +42585,32 @@ } } }, - "/api/gameRole/delete": { + "/api/gameRewardTemplate/copySnapshot": { "post": { "tags": [ - "gameRole" + "gameRewardTemplate" ], - "summary": "删除", - "operationId": "GameRoleDeletePost", + "summary": "复制当前模板奖励快照。业务侧应保存返回的 JSON 快照,而不是运行时引用模板。", + "operationId": "GameRewardTemplateCopySnapshotPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/GameRewardTemplateSnapshotRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/GameRewardTemplateSnapshotRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/GameRewardTemplateSnapshotRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRole/detail": { - "get": { - "tags": [ - "gameRole" - ], - "summary": "获取游戏角色", - "operationId": "GameRoleDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -43649,7 +42639,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRoleResponse" + "$ref": "#/components/schemas/GameRewardTemplateSnapshotResponse" }, "trackId": { "type": "string", @@ -43702,7 +42692,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRoleResponse" + "$ref": "#/components/schemas/GameRewardTemplateSnapshotResponse" }, "trackId": { "type": "string", @@ -43755,7 +42745,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameRoleResponse" + "$ref": "#/components/schemas/GameRewardTemplateSnapshotResponse" }, "trackId": { "type": "string", @@ -43789,226 +42779,60 @@ } } }, - "/api/gameRole/page": { + "/api/gameRewardTemplate/delete": { "post": { "tags": [ - "gameRole" + "gameRewardTemplate" ], - "summary": "分页查询游戏角色(含 RoleId 回填)", - "operationId": "GameRolePagePost", + "summary": "删除", + "operationId": "GameRewardTemplateDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRoleEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRoleEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameRoleEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, "responses": { "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameRoleResponseSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameRoleResponseSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GameRoleResponseSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } + "description": "OK" } } } }, - "/api/gameRole/select": { - "post": { + "/api/gameRewardTemplate/detail": { + "get": { "tags": [ - "gameRole" + "gameRewardTemplate" ], - "summary": "获取选择器列表", - "operationId": "GameRoleSelectPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } + "summary": "详情", + "operationId": "GameRewardTemplateDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -44037,10 +42861,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateResponse" }, "trackId": { "type": "string", @@ -44093,10 +42914,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateResponse" }, "trackId": { "type": "string", @@ -44149,10 +42967,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateResponse" }, "trackId": { "type": "string", @@ -44186,28 +43001,28 @@ } } }, - "/api/gameRole/selectString": { + "/api/gameRewardTemplate/page": { "post": { "tags": [ - "gameRole" + "gameRewardTemplate" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameRoleSelectStringPost", + "summary": "分页查询", + "operationId": "GameRewardTemplatePagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRewardTemplateEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRewardTemplateEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRewardTemplateEntityRequest" } } } @@ -44240,10 +43055,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -44296,10 +43108,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -44352,10 +43161,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -44389,164 +43195,28 @@ } } }, - "/api/gameRole/sync": { - "post": { - "tags": [ - "gameRole" - ], - "summary": "同步游戏角色", - "operationId": "GameRoleSyncPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRole/update": { - "post": { - "tags": [ - "gameRole" - ], - "summary": "更新游戏角色", - "operationId": "GameRoleUpdatePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRole/updateToSandBox": { - "post": { - "tags": [ - "gameRole" - ], - "summary": "更新游戏角色为沙盒用户", - "operationId": "GameRoleUpdateToSandBoxPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameRole/updateToUnSandBox": { - "post": { - "tags": [ - "gameRole" - ], - "summary": "更新游戏角色为非沙盒用户", - "operationId": "GameRoleUpdateToUnSandBoxPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameRoleEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameTimeJob/add": { + "/api/gameRewardTemplate/select": { "post": { "tags": [ - "gameTimeJob" + "gameRewardTemplate" ], - "summary": "新增", - "operationId": "GameTimeJobAddPost", + "summary": "获取主库中启用的奖励模板。", + "operationId": "GameRewardTemplateSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameTimeJobEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameTimeJobEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameTimeJobEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -44579,7 +43249,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -44632,7 +43305,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -44685,7 +43361,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -44719,60 +43398,32 @@ } } }, - "/api/gameTimeJob/delete": { + "/api/gameRewardTemplate/selectString": { "post": { "tags": [ - "gameTimeJob" + "gameRewardTemplate" ], - "summary": "删除", - "operationId": "GameTimeJobDeletePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameRewardTemplateSelectStringPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameTimeJob/detail": { - "get": { - "tags": [ - "gameTimeJob" - ], - "summary": "详情", - "operationId": "GameTimeJobDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -44801,7 +43452,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -44854,7 +43508,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -44907,7 +43564,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -44941,28 +43601,61 @@ } } }, - "/api/gameTimeJob/page": { + "/api/gameRewardTemplate/update": { "post": { "tags": [ - "gameTimeJob" + "gameRewardTemplate" ], - "summary": "分页查询", - "operationId": "GameTimeJobPagePost", + "summary": "更新", + "operationId": "GameRewardTemplateUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRewardTemplateEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRewardTemplateEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRewardTemplateEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRewardTemplateGroup/add": { + "post": { + "tags": [ + "gameRewardTemplateGroup" + ], + "summary": "新增", + "operationId": "GameRewardTemplateGroupAddPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameTimeJobEntityRequest" + "$ref": "#/components/schemas/AddGameRewardTemplateGroupEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameTimeJobEntityRequest" + "$ref": "#/components/schemas/AddGameRewardTemplateGroupEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameTimeJobEntityRequest" + "$ref": "#/components/schemas/AddGameRewardTemplateGroupEntityRequest" } } } @@ -44995,7 +43688,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" }, "trackId": { "type": "string", @@ -45048,7 +43741,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" }, "trackId": { "type": "string", @@ -45101,7 +43794,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameTimeJobResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" }, "trackId": { "type": "string", @@ -45135,32 +43828,60 @@ } } }, - "/api/gameTimeJob/select": { + "/api/gameRewardTemplateGroup/delete": { "post": { "tags": [ - "gameTimeJob" + "gameRewardTemplateGroup" ], - "summary": "获取选择器列表", - "operationId": "GameTimeJobSelectPost", + "summary": "删除", + "operationId": "GameRewardTemplateGroupDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRewardTemplateGroup/detail": { + "get": { + "tags": [ + "gameRewardTemplateGroup" + ], + "summary": "详情", + "operationId": "GameRewardTemplateGroupDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -45189,10 +43910,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" }, "trackId": { "type": "string", @@ -45245,10 +43963,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" }, "trackId": { "type": "string", @@ -45301,10 +44016,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateGroupResponse" }, "trackId": { "type": "string", @@ -45338,28 +44050,28 @@ } } }, - "/api/gameTimeJob/selectString": { + "/api/gameRewardTemplateGroup/page": { "post": { "tags": [ - "gameTimeJob" + "gameRewardTemplateGroup" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameTimeJobSelectStringPost", + "summary": "分页查询", + "operationId": "GameRewardTemplateGroupPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRewardTemplateGroupEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRewardTemplateGroupEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRewardTemplateGroupEntityRequest" } } } @@ -45392,10 +44104,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateGroupResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -45448,10 +44157,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateGroupResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -45504,10 +44210,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameRewardTemplateGroupResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -45541,61 +44244,28 @@ } } }, - "/api/gameTimeJob/update": { - "post": { - "tags": [ - "gameTimeJob" - ], - "summary": "更新", - "operationId": "GameTimeJobUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameTimeJobEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameTimeJobEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameTimeJobEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameUser/add": { + "/api/gameRewardTemplateGroup/select": { "post": { "tags": [ - "gameUser" + "gameRewardTemplateGroup" ], - "summary": "新增", - "operationId": "GameUserAddPost", + "summary": "获取主库中启用的奖励模板分组。", + "operationId": "GameRewardTemplateGroupSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameUserEntityByMailRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameUserEntityByMailRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameUserEntityByMailRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -45628,7 +44298,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -45681,7 +44354,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -45734,7 +44410,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -45768,29 +44447,28 @@ } } }, - "/api/gameUser/addByMail": { + "/api/gameRewardTemplateGroup/selectString": { "post": { "tags": [ - "gameUser" + "gameRewardTemplateGroup" ], - "summary": "通过邮箱增加账号", - "operationId": "GameUserAddByMailPost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameRewardTemplateGroupSelectStringPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameUserEntityByMailRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameUserEntityByMailRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameUserEntityByMailRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -45823,7 +44501,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -45876,7 +44557,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -45929,7 +44613,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -45963,29 +44650,28 @@ } } }, - "/api/gameUser/ban": { + "/api/gameRewardTemplateGroup/update": { "post": { "tags": [ - "gameUser" + "gameRewardTemplateGroup" ], - "summary": "封禁游戏账号", - "operationId": "GameUserBanPost", + "summary": "更新", + "operationId": "GameRewardTemplateGroupUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteTenantGameUserEntityRequest" + "$ref": "#/components/schemas/UpdateGameRewardTemplateGroupEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteTenantGameUserEntityRequest" + "$ref": "#/components/schemas/UpdateGameRewardTemplateGroupEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteTenantGameUserEntityRequest" + "$ref": "#/components/schemas/UpdateGameRewardTemplateGroupEntityRequest" } } } @@ -45997,60 +44683,32 @@ } } }, - "/api/gameUser/delete": { + "/api/gameRole/add": { "post": { "tags": [ - "gameUser" + "gameRole" ], - "summary": "删除", - "operationId": "GameUserDeletePost", + "summary": "新增", + "operationId": "GameRoleAddPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameRoleEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameRoleEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/AddGameRoleEntityRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameUser/detail": { - "get": { - "tags": [ - "gameUser" - ], - "summary": "详情", - "operationId": "GameUserDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -46079,7 +44737,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "$ref": "#/components/schemas/GameRoleResponse" }, "trackId": { "type": "string", @@ -46132,7 +44790,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "$ref": "#/components/schemas/GameRoleResponse" }, "trackId": { "type": "string", @@ -46185,7 +44843,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponse" + "$ref": "#/components/schemas/GameRoleResponse" }, "trackId": { "type": "string", @@ -46219,32 +44877,60 @@ } } }, - "/api/gameUser/page": { + "/api/gameRole/delete": { "post": { "tags": [ - "gameUser" + "gameRole" ], - "summary": "分页查询", - "operationId": "GameUserPagePost", + "summary": "删除", + "operationId": "GameRoleDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameUserEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameUserEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameUserEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRole/detail": { + "get": { + "tags": [ + "gameRole" + ], + "summary": "获取游戏角色", + "operationId": "GameRoleDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -46273,7 +44959,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRoleResponse" }, "trackId": { "type": "string", @@ -46326,7 +45012,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRoleResponse" }, "trackId": { "type": "string", @@ -46379,7 +45065,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameUserResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameRoleResponse" }, "trackId": { "type": "string", @@ -46413,28 +45099,28 @@ } } }, - "/api/gameUser/select": { + "/api/gameRole/page": { "post": { "tags": [ - "gameUser" + "gameRole" ], - "summary": "获取选择器列表", - "operationId": "GameUserSelectPost", + "summary": "分页查询游戏角色(含 RoleId 回填)", + "operationId": "GameRolePagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRoleEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRoleEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameRoleEntityRequest" } } } @@ -46467,10 +45153,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRoleResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -46523,10 +45206,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRoleResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -46579,10 +45259,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameRoleResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -46616,13 +45293,13 @@ } } }, - "/api/gameUser/selectString": { + "/api/gameRole/select": { "post": { "tags": [ - "gameUser" + "gameRole" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameUserSelectStringPost", + "summary": "获取选择器列表", + "operationId": "GameRoleSelectPost", "requestBody": { "content": { "application/json": { @@ -46672,7 +45349,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -46728,7 +45405,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -46784,7 +45461,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -46819,95 +45496,28 @@ } } }, - "/api/gameUser/unseal": { - "post": { - "tags": [ - "gameUser" - ], - "summary": "解除封禁游戏账号", - "operationId": "GameUserUnsealPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTenantGameUserEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTenantGameUserEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeleteTenantGameUserEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameUser/update": { - "post": { - "tags": [ - "gameUser" - ], - "summary": "更新", - "operationId": "GameUserUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameUserEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameUserEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameUserEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameWebShop/add": { + "/api/gameRole/selectString": { "post": { "tags": [ - "gameWebShop" + "gameRole" ], - "summary": "新增", - "operationId": "GameWebShopAddPost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameRoleSelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameWebShopEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameWebShopEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameWebShopEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -46940,7 +45550,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -46993,7 +45606,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -47046,7 +45662,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -47080,29 +45699,29 @@ } } }, - "/api/gameWebShop/delete": { + "/api/gameRole/sync": { "post": { "tags": [ - "gameWebShop" + "gameRole" ], - "summary": "删除", - "operationId": "GameWebShopDeletePost", + "summary": "同步游戏角色", + "operationId": "GameRoleSyncPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" } } } @@ -47114,26 +45733,134 @@ } } }, - "/api/gameWebShop/detail": { - "get": { + "/api/gameRole/update": { + "post": { "tags": [ - "gameWebShop" + "gameRole" ], - "summary": "详情", - "operationId": "GameWebShopDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "更新游戏角色", + "operationId": "GameRoleUpdatePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } } } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRole/updateToSandBox": { + "post": { + "tags": [ + "gameRole" ], + "summary": "更新游戏角色为沙盒用户", + "operationId": "GameRoleUpdateToSandBoxPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameRole/updateToUnSandBox": { + "post": { + "tags": [ + "gameRole" + ], + "summary": "更新游戏角色为非沙盒用户", + "operationId": "GameRoleUpdateToUnSandBoxPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameRoleEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameTimeJob/add": { + "post": { + "tags": [ + "gameTimeJob" + ], + "summary": "新增", + "operationId": "GameTimeJobAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameTimeJobEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameTimeJobEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameTimeJobEntityRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -47162,7 +45889,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponse" + "$ref": "#/components/schemas/GameTimeJobResponse" }, "trackId": { "type": "string", @@ -47215,7 +45942,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponse" + "$ref": "#/components/schemas/GameTimeJobResponse" }, "trackId": { "type": "string", @@ -47268,7 +45995,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponse" + "$ref": "#/components/schemas/GameTimeJobResponse" }, "trackId": { "type": "string", @@ -47302,32 +46029,60 @@ } } }, - "/api/gameWebShop/page": { + "/api/gameTimeJob/delete": { "post": { "tags": [ - "gameWebShop" + "gameTimeJob" ], - "summary": "分页查询", - "operationId": "GameWebShopPagePost", + "summary": "删除", + "operationId": "GameTimeJobDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameWebShopEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameWebShopEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameWebShopEntityRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameTimeJob/detail": { + "get": { + "tags": [ + "gameTimeJob" + ], + "summary": "详情", + "operationId": "GameTimeJobDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -47356,7 +46111,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameTimeJobResponse" }, "trackId": { "type": "string", @@ -47409,7 +46164,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameTimeJobResponse" }, "trackId": { "type": "string", @@ -47462,7 +46217,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameTimeJobResponse" }, "trackId": { "type": "string", @@ -47496,28 +46251,28 @@ } } }, - "/api/gameWebShop/select": { + "/api/gameTimeJob/page": { "post": { "tags": [ - "gameWebShop" + "gameTimeJob" ], - "summary": "获取选择器列表", - "operationId": "GameWebShopSelectPost", + "summary": "分页查询", + "operationId": "GameTimeJobPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameTimeJobEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameTimeJobEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameTimeJobEntityRequest" } } } @@ -47550,10 +46305,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameTimeJobResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -47606,10 +46358,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameTimeJobResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -47662,10 +46411,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameTimeJobResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -47699,13 +46445,13 @@ } } }, - "/api/gameWebShop/selectString": { + "/api/gameTimeJob/select": { "post": { "tags": [ - "gameWebShop" + "gameTimeJob" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameWebShopSelectStringPost", + "summary": "获取选择器列表", + "operationId": "GameTimeJobSelectPost", "requestBody": { "content": { "application/json": { @@ -47755,7 +46501,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -47811,7 +46557,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -47867,7 +46613,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -47902,61 +46648,28 @@ } } }, - "/api/gameWebShop/update": { - "post": { - "tags": [ - "gameWebShop" - ], - "summary": "更新", - "operationId": "GameWebShopUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameWebShopEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameWebShopEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameWebShopEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/gameWebShopOrder/add": { + "/api/gameTimeJob/selectString": { "post": { "tags": [ - "gameWebShopOrder" + "gameTimeJob" ], - "summary": "新增", - "operationId": "GameWebShopOrderAddPost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameTimeJobSelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameWebShopOrderEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameWebShopOrderEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddTenantGameWebShopOrderEntityRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -47989,7 +46702,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -48042,7 +46758,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -48095,7 +46814,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -48129,29 +46851,28 @@ } } }, - "/api/gameWebShopOrder/delete": { + "/api/gameTimeJob/update": { "post": { "tags": [ - "gameWebShopOrder" + "gameTimeJob" ], - "summary": "删除", - "operationId": "GameWebShopOrderDeletePost", + "summary": "更新", + "operationId": "GameTimeJobUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameTimeJobEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameTimeJobEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/UpdateGameTimeJobEntityRequest" } } } @@ -48163,26 +46884,32 @@ } } }, - "/api/gameWebShopOrder/detail": { - "get": { + "/api/gameUser/add": { + "post": { "tags": [ - "gameWebShopOrder" + "gameUser" ], - "summary": "详情", - "operationId": "GameWebShopOrderDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "新增", + "operationId": "GameUserAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameUserEntityByMailRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameUserEntityByMailRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameUserEntityByMailRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -48211,7 +46938,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponse" + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48264,7 +46991,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponse" + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48317,7 +47044,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponse" + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48351,28 +47078,29 @@ } } }, - "/api/gameWebShopOrder/page": { + "/api/gameUser/addByMail": { "post": { "tags": [ - "gameWebShopOrder" + "gameUser" ], - "summary": "分页查询", - "operationId": "GameWebShopOrderPagePost", + "summary": "通过邮箱增加账号", + "operationId": "GameUserAddByMailPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameWebShopOrderEntityRequest" + "$ref": "#/components/schemas/AddGameUserEntityByMailRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameWebShopOrderEntityRequest" + "$ref": "#/components/schemas/AddGameUserEntityByMailRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantGameWebShopOrderEntityRequest" + "$ref": "#/components/schemas/AddGameUserEntityByMailRequest" } } } @@ -48405,7 +47133,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48458,7 +47186,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48511,7 +47239,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GameWebShopOrderResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48545,29 +47273,29 @@ } } }, - "/api/gameWebShopOrder/redo": { + "/api/gameUser/ban": { "post": { "tags": [ - "gameWebShopOrder" + "gameUser" ], - "summary": "重新发送订单", - "operationId": "GameWebShopOrderRedoPost", + "summary": "封禁游戏账号", + "operationId": "GameUserBanPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseUpdateRequest" + "$ref": "#/components/schemas/DeleteGameUserEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseUpdateRequest" + "$ref": "#/components/schemas/DeleteGameUserEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseUpdateRequest" + "$ref": "#/components/schemas/DeleteGameUserEntityRequest" } } } @@ -48579,32 +47307,60 @@ } } }, - "/api/gameWebShopOrder/select": { + "/api/gameUser/delete": { "post": { "tags": [ - "gameWebShopOrder" + "gameUser" ], - "summary": "获取选择器列表", - "operationId": "GameWebShopOrderSelectPost", + "summary": "删除", + "operationId": "GameUserDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameUser/detail": { + "get": { + "tags": [ + "gameUser" + ], + "summary": "详情", + "operationId": "GameUserDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -48633,10 +47389,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48689,10 +47442,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48745,10 +47495,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameUserResponse" }, "trackId": { "type": "string", @@ -48782,28 +47529,28 @@ } } }, - "/api/gameWebShopOrder/selectString": { + "/api/gameUser/page": { "post": { "tags": [ - "gameWebShopOrder" + "gameUser" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GameWebShopOrderSelectStringPost", + "summary": "分页查询", + "operationId": "GameUserPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameUserEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameUserEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameUserEntityRequest" } } } @@ -48836,10 +47583,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameUserResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -48892,10 +47636,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameUserResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -48948,10 +47689,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameUserResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -48985,61 +47723,28 @@ } } }, - "/api/gameWebShopOrder/update": { - "post": { - "tags": [ - "gameWebShopOrder" - ], - "summary": "更新", - "operationId": "GameWebShopOrderUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameWebShopOrderEntityRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameWebShopOrderEntityRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantGameWebShopOrderEntityRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalChannelDefinition/add": { + "/api/gameUser/select": { "post": { "tags": [ - "globalChannelDefinition" + "gameUser" ], - "summary": "新增", - "operationId": "GlobalChannelDefinitionAddPost", + "summary": "获取选择器列表", + "operationId": "GameUserSelectPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddChannelDefinitionRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddChannelDefinitionRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddChannelDefinitionRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -49072,7 +47777,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -49125,7 +47833,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -49178,7 +47889,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -49212,59 +47926,32 @@ } } }, - "/api/globalChannelDefinition/delete": { + "/api/gameUser/selectString": { "post": { "tags": [ - "globalChannelDefinition" + "gameUser" ], - "summary": "删除渠道", - "operationId": "GlobalChannelDefinitionDeletePost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameUserSelectStringPost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalChannelDefinition/detail": { - "get": { - "tags": [ - "globalChannelDefinition" - ], - "summary": "详情", - "operationId": "GlobalChannelDefinitionDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -49293,7 +47980,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -49346,7 +48036,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -49399,7 +48092,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -49433,28 +48129,95 @@ } } }, - "/api/globalChannelDefinition/page": { + "/api/gameUser/unseal": { "post": { "tags": [ - "globalChannelDefinition" + "gameUser" ], - "summary": "分页查询", - "operationId": "GlobalChannelDefinitionPagePost", + "summary": "解除封禁游戏账号", + "operationId": "GameUserUnsealPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageChannelDefinitionRequest" + "$ref": "#/components/schemas/DeleteGameUserEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageChannelDefinitionRequest" + "$ref": "#/components/schemas/DeleteGameUserEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageChannelDefinitionRequest" + "$ref": "#/components/schemas/DeleteGameUserEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameUser/update": { + "post": { + "tags": [ + "gameUser" + ], + "summary": "更新", + "operationId": "GameUserUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameUserEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameUserEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateGameUserEntityRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameWebShop/add": { + "post": { + "tags": [ + "gameWebShop" + ], + "summary": "新增", + "operationId": "GameWebShopAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameWebShopEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameWebShopEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameWebShopEntityRequest" } } } @@ -49487,7 +48250,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameWebShopResponse" }, "trackId": { "type": "string", @@ -49540,7 +48303,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameWebShopResponse" }, "trackId": { "type": "string", @@ -49593,7 +48356,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ChannelDefinitionResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameWebShopResponse" }, "trackId": { "type": "string", @@ -49627,32 +48390,60 @@ } } }, - "/api/globalChannelDefinition/select": { + "/api/gameWebShop/delete": { "post": { "tags": [ - "globalChannelDefinition" + "gameWebShop" ], - "summary": "获取选择器列表", - "operationId": "GlobalChannelDefinitionSelectPost", + "summary": "删除", + "operationId": "GameWebShopDeletePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameWebShop/detail": { + "get": { + "tags": [ + "gameWebShop" + ], + "summary": "详情", + "operationId": "GameWebShopDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -49681,10 +48472,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameWebShopResponse" }, "trackId": { "type": "string", @@ -49737,10 +48525,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameWebShopResponse" }, "trackId": { "type": "string", @@ -49793,10 +48578,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" - } + "$ref": "#/components/schemas/GameWebShopResponse" }, "trackId": { "type": "string", @@ -49830,28 +48612,28 @@ } } }, - "/api/globalChannelDefinition/selectString": { + "/api/gameWebShop/page": { "post": { "tags": [ - "globalChannelDefinition" + "gameWebShop" ], - "summary": "获取选择器列表(字符串 ID)", - "operationId": "GlobalChannelDefinitionSelectStringPost", + "summary": "分页查询", + "operationId": "GameWebShopPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameWebShopEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameWebShopEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/PageGameWebShopEntityRequest" } } } @@ -49884,10 +48666,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameWebShopResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -49940,10 +48719,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameWebShopResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -49996,10 +48772,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" - } + "$ref": "#/components/schemas/GameWebShopResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -50033,98 +48806,32 @@ } } }, - "/api/globalChannelDefinition/update": { - "post": { - "tags": [ - "globalChannelDefinition" - ], - "summary": "更新", - "operationId": "GlobalChannelDefinitionUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateChannelDefinitionRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateChannelDefinitionRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateChannelDefinitionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalDictionaryData/add": { + "/api/gameWebShop/select": { "post": { "tags": [ - "globalDictionaryData" + "gameWebShop" ], - "summary": "增加字典值", - "operationId": "GlobalDictionaryDataAddPost", + "summary": "获取选择器列表", + "operationId": "GameWebShopSelectPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddDictionaryDataRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddDictionaryDataRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddDictionaryDataRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalDictionaryData/dataList": { - "get": { - "tags": [ - "globalDictionaryData" - ], - "summary": "根据查询条件获取字典值集合", - "operationId": "GlobalDictionaryDataDataListGet", - "parameters": [ - { - "name": "Code", - "in": "query", - "description": "编码", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "IsEnabled", - "in": "query", - "schema": { - "type": "boolean" - } - } - ], "responses": { "200": { "description": "OK", @@ -50155,7 +48862,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -50211,7 +48918,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -50267,7 +48974,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -50302,24 +49009,32 @@ } } }, - "/api/globalDictionaryData/dataList/{code}": { - "get": { + "/api/gameWebShop/selectString": { + "post": { "tags": [ - "globalDictionaryData" + "gameWebShop" ], - "summary": "根据字典类型编码获取字典值集合", - "operationId": "GlobalDictionaryDataDataListGet", - "parameters": [ - { - "name": "code", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string" + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameWebShopSelectStringPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -50350,7 +49065,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -50406,7 +49121,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -50462,7 +49177,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -50497,29 +49212,28 @@ } } }, - "/api/globalDictionaryData/delete": { + "/api/gameWebShop/update": { "post": { "tags": [ - "globalDictionaryData" + "gameWebShop" ], - "summary": "删除字典值", - "operationId": "GlobalDictionaryDataDeletePost", + "summary": "更新", + "operationId": "GameWebShopUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteDictionaryDataRequest" + "$ref": "#/components/schemas/UpdateGameWebShopEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteDictionaryDataRequest" + "$ref": "#/components/schemas/UpdateGameWebShopEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteDictionaryDataRequest" + "$ref": "#/components/schemas/UpdateGameWebShopEntityRequest" } } } @@ -50531,34 +49245,32 @@ } } }, - "/api/globalDictionaryData/detail": { - "get": { + "/api/gameWebShopOrder/add": { + "post": { "tags": [ - "globalDictionaryData" + "gameWebShopOrder" ], - "summary": "获取字典值详情", - "operationId": "GlobalDictionaryDataDetailGet", - "parameters": [ - { - "name": "IsEnabled", - "in": "query", - "description": "是否启用", - "schema": { - "type": "boolean" - } - }, - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "新增", + "operationId": "GameWebShopOrderAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddGameWebShopOrderEntityRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddGameWebShopOrderEntityRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddGameWebShopOrderEntityRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -50587,7 +49299,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/GameWebShopOrderResponse" }, "trackId": { "type": "string", @@ -50640,7 +49352,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/GameWebShopOrderResponse" }, "trackId": { "type": "string", @@ -50693,7 +49405,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/GameWebShopOrderResponse" }, "trackId": { "type": "string", @@ -50727,18 +49439,51 @@ } } }, - "/api/globalDictionaryData/list": { + "/api/gameWebShopOrder/delete": { + "post": { + "tags": [ + "gameWebShopOrder" + ], + "summary": "删除", + "operationId": "GameWebShopOrderDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/gameWebShopOrder/detail": { "get": { "tags": [ - "globalDictionaryData" + "gameWebShopOrder" ], - "summary": "获取字典值列表", - "operationId": "GlobalDictionaryDataListGet", + "summary": "详情", + "operationId": "GameWebShopOrderDetailGet", "parameters": [ { - "name": "DictionaryTypeId", + "name": "Id", "in": "query", - "description": "字典类型Id", "required": true, "schema": { "maximum": 9.223372036854776E+18, @@ -50776,10 +49521,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" - } + "$ref": "#/components/schemas/GameWebShopOrderResponse" }, "trackId": { "type": "string", @@ -50832,10 +49574,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" - } + "$ref": "#/components/schemas/GameWebShopOrderResponse" }, "trackId": { "type": "string", @@ -50888,10 +49627,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" - } + "$ref": "#/components/schemas/GameWebShopOrderResponse" }, "trackId": { "type": "string", @@ -50925,29 +49661,28 @@ } } }, - "/api/globalDictionaryData/page": { + "/api/gameWebShopOrder/page": { "post": { "tags": [ - "globalDictionaryData" + "gameWebShopOrder" ], - "summary": "获取字典值分页列表", - "operationId": "GlobalDictionaryDataPagePost", + "summary": "分页查询", + "operationId": "GameWebShopOrderPagePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDictionaryDataRequest" + "$ref": "#/components/schemas/PageGameWebShopOrderEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageDictionaryDataRequest" + "$ref": "#/components/schemas/PageGameWebShopOrderEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageDictionaryDataRequest" + "$ref": "#/components/schemas/PageGameWebShopOrderEntityRequest" } } } @@ -50980,7 +49715,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameWebShopOrderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -51033,7 +49768,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameWebShopOrderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -51086,7 +49821,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponseSqlSugarPagedList" + "$ref": "#/components/schemas/GameWebShopOrderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -51120,63 +49855,29 @@ } } }, - "/api/globalDictionaryData/setStatus": { - "post": { - "tags": [ - "globalDictionaryData" - ], - "summary": "修改字典值状态", - "operationId": "GlobalDictionaryDataSetStatusPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DictionaryDataRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DictionaryDataRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DictionaryDataRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalDictionaryData/update": { + "/api/gameWebShopOrder/redo": { "post": { "tags": [ - "globalDictionaryData" + "gameWebShopOrder" ], - "summary": "更新字典值", - "operationId": "GlobalDictionaryDataUpdatePost", + "summary": "重新发送订单", + "operationId": "GameWebShopOrderRedoPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateDictionaryDataRequest" + "$ref": "#/components/schemas/BaseUpdateRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateDictionaryDataRequest" + "$ref": "#/components/schemas/BaseUpdateRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateDictionaryDataRequest" + "$ref": "#/components/schemas/BaseUpdateRequest" } } } @@ -51188,47 +49889,32 @@ } } }, - "/api/globalDictionaryType/add": { + "/api/gameWebShopOrder/select": { "post": { "tags": [ - "globalDictionaryType" + "gameWebShopOrder" ], - "summary": "添加字典类型", - "operationId": "GlobalDictionaryTypeAddPost", + "summary": "获取选择器列表", + "operationId": "GameWebShopOrderSelectPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddDictionaryTypeRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddDictionaryTypeRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddDictionaryTypeRequest" + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalDictionaryType/allDictionaryList": { - "get": { - "tags": [ - "globalDictionaryType" - ], - "summary": "获取所有字典集合", - "operationId": "GlobalDictionaryTypeAllDictionaryListGet", "responses": { "200": { "description": "OK", @@ -51259,7 +49945,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -51315,7 +50001,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -51371,7 +50057,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -51406,24 +50092,32 @@ } } }, - "/api/globalDictionaryType/dataList": { - "get": { + "/api/gameWebShopOrder/selectString": { + "post": { "tags": [ - "globalDictionaryType" + "gameWebShopOrder" ], - "summary": "获取字典类型-值列表", - "operationId": "GlobalDictionaryTypeDataListGet", - "parameters": [ - { - "name": "Code", - "in": "query", - "description": "编码", - "required": true, - "schema": { - "type": "string" + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GameWebShopOrderSelectStringPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -51454,7 +50148,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -51510,7 +50204,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -51566,7 +50260,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + "$ref": "#/components/schemas/BaseSelectPageStringResponse" } }, "trackId": { @@ -51601,29 +50295,28 @@ } } }, - "/api/globalDictionaryType/delete": { + "/api/gameWebShopOrder/update": { "post": { "tags": [ - "globalDictionaryType" + "gameWebShopOrder" ], - "summary": "删除字典类型", - "operationId": "GlobalDictionaryTypeDeletePost", + "summary": "更新", + "operationId": "GameWebShopOrderUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteDictionaryTypeRequest" + "$ref": "#/components/schemas/UpdateGameWebShopOrderEntityRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteDictionaryTypeRequest" + "$ref": "#/components/schemas/UpdateGameWebShopOrderEntityRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteDictionaryTypeRequest" + "$ref": "#/components/schemas/UpdateGameWebShopOrderEntityRequest" } } } @@ -51635,34 +50328,32 @@ } } }, - "/api/globalDictionaryType/detail": { - "get": { + "/api/globalChannelDefinition/add": { + "post": { "tags": [ - "globalDictionaryType" + "globalChannelDefinition" ], - "summary": "获取字典类型详情", - "operationId": "GlobalDictionaryTypeDetailGet", - "parameters": [ - { - "name": "IsEnabled", - "in": "query", - "description": "是否启用", - "schema": { - "type": "boolean" - } - }, - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "summary": "新增", + "operationId": "GlobalChannelDefinitionAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddChannelDefinitionRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddChannelDefinitionRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddChannelDefinitionRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -51691,60 +50382,60 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + "$ref": "#/components/schemas/ChannelDefinitionResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/ChannelDefinitionResponse" }, "trackId": { "type": "string", @@ -51797,7 +50488,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + "$ref": "#/components/schemas/ChannelDefinitionResponse" }, "trackId": { "type": "string", @@ -51831,13 +50522,59 @@ } } }, - "/api/globalDictionaryType/list": { + "/api/globalChannelDefinition/delete": { + "post": { + "tags": [ + "globalChannelDefinition" + ], + "summary": "删除渠道", + "operationId": "GlobalChannelDefinitionDeletePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseDeleteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/globalChannelDefinition/detail": { "get": { "tags": [ - "globalDictionaryType" + "globalChannelDefinition" + ], + "summary": "详情", + "operationId": "GlobalChannelDefinitionDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } ], - "summary": "获取字典类型列表", - "operationId": "GlobalDictionaryTypeListGet", "responses": { "200": { "description": "OK", @@ -51866,10 +50603,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" - } + "$ref": "#/components/schemas/ChannelDefinitionResponse" }, "trackId": { "type": "string", @@ -51922,10 +50656,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" - } + "$ref": "#/components/schemas/ChannelDefinitionResponse" }, "trackId": { "type": "string", @@ -51978,10 +50709,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" - } + "$ref": "#/components/schemas/ChannelDefinitionResponse" }, "trackId": { "type": "string", @@ -52015,28 +50743,28 @@ } } }, - "/api/globalDictionaryType/page": { + "/api/globalChannelDefinition/page": { "post": { "tags": [ - "globalDictionaryType" + "globalChannelDefinition" ], - "summary": "获取字典类型分页列表", - "operationId": "GlobalDictionaryTypePagePost", + "summary": "分页查询", + "operationId": "GlobalChannelDefinitionPagePost", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDictionaryTypeRequest" + "$ref": "#/components/schemas/PageChannelDefinitionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageDictionaryTypeRequest" + "$ref": "#/components/schemas/PageChannelDefinitionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageDictionaryTypeRequest" + "$ref": "#/components/schemas/PageChannelDefinitionRequest" } } } @@ -52069,7 +50797,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponseSqlSugarPagedList" + "$ref": "#/components/schemas/ChannelDefinitionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -52122,7 +50850,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponseSqlSugarPagedList" + "$ref": "#/components/schemas/ChannelDefinitionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -52175,7 +50903,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/GlobalDictionaryTypeResponseSqlSugarPagedList" + "$ref": "#/components/schemas/ChannelDefinitionResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -52209,81 +50937,13 @@ } } }, - "/api/globalDictionaryType/setStatus": { - "post": { - "tags": [ - "globalDictionaryType" - ], - "summary": "修改字典类型状态", - "operationId": "GlobalDictionaryTypeSetStatusPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DictionaryTypeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DictionaryTypeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DictionaryTypeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalDictionaryType/update": { - "post": { - "tags": [ - "globalDictionaryType" - ], - "summary": "更新字典类型", - "operationId": "GlobalDictionaryTypeUpdatePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDictionaryTypeRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDictionaryTypeRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateDictionaryTypeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/globalLanguage/select": { + "/api/globalChannelDefinition/select": { "post": { "tags": [ - "globalLanguage" + "globalChannelDefinition" ], - "summary": "获取语言选择器列表", - "operationId": "GlobalLanguageSelectPost", + "summary": "获取选择器列表", + "operationId": "GlobalChannelDefinitionSelectPost", "requestBody": { "content": { "application/json": { @@ -52480,13 +51140,13 @@ } } }, - "/api/globalLanguage/selectString": { + "/api/globalChannelDefinition/selectString": { "post": { "tags": [ - "globalLanguage" + "globalChannelDefinition" ], - "summary": "获取语言选择器列表(字符串 ID)", - "operationId": "GlobalLanguageSelectStringPost", + "summary": "获取选择器列表(字符串 ID)", + "operationId": "GlobalChannelDefinitionSelectStringPost", "requestBody": { "content": { "application/json": { @@ -52683,29 +51343,28 @@ } } }, - "/api/globalMenu/add": { + "/api/globalChannelDefinition/update": { "post": { "tags": [ - "globalMenu" + "globalChannelDefinition" ], - "summary": "增加菜单", - "operationId": "GlobalMenuAddPost", + "summary": "更新", + "operationId": "GlobalChannelDefinitionUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddMenuRequest" + "$ref": "#/components/schemas/UpdateChannelDefinitionRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddMenuRequest" + "$ref": "#/components/schemas/UpdateChannelDefinitionRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddMenuRequest" + "$ref": "#/components/schemas/UpdateChannelDefinitionRequest" } } } @@ -52717,29 +51376,29 @@ } } }, - "/api/globalMenu/delete": { + "/api/globalDictionaryData/add": { "post": { "tags": [ - "globalMenu" + "globalDictionaryData" ], - "summary": "删除菜单", - "operationId": "GlobalMenuDeletePost", + "summary": "增加字典值", + "operationId": "GlobalDictionaryDataAddPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteMenuRequest" + "$ref": "#/components/schemas/AddDictionaryDataRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteMenuRequest" + "$ref": "#/components/schemas/AddDictionaryDataRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteMenuRequest" + "$ref": "#/components/schemas/AddDictionaryDataRequest" } } } @@ -52751,13 +51410,31 @@ } } }, - "/api/globalMenu/endpointPermissionMapAsync": { + "/api/globalDictionaryData/dataList": { "get": { "tags": [ - "globalMenu" + "globalDictionaryData" + ], + "summary": "根据查询条件获取字典值集合", + "operationId": "GlobalDictionaryDataDataListGet", + "parameters": [ + { + "name": "Code", + "in": "query", + "description": "编码", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "IsEnabled", + "in": "query", + "schema": { + "type": "boolean" + } + } ], - "summary": "获取端点权限目录(U6/C42):(HttpMethod, RoutePath) → GameFrameX.Core.Authorization.EndpointPermissionEntry。\n\n由 `ApiEndpointCatalogSync` 启动时构建并预热;此处请求期按需返回缓存,缓存缺失则即时重建。", - "operationId": "GlobalMenuEndpointPermissionMapAsyncGet", "responses": { "200": { "description": "OK", @@ -52786,9 +51463,9 @@ "description": "错误或提示信息" }, "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EndpointPermissionEntry" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -52842,9 +51519,9 @@ "description": "错误或提示信息" }, "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EndpointPermissionEntry" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -52898,9 +51575,9 @@ "description": "错误或提示信息" }, "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EndpointPermissionEntry" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -52935,29 +51612,22 @@ } } }, - "/api/globalMenu/list": { + "/api/globalDictionaryData/dataList/{code}": { "get": { "tags": [ - "globalMenu" + "globalDictionaryData" ], - "summary": "获取菜单列表", - "operationId": "GlobalMenuListGet", + "summary": "根据字典类型编码获取字典值集合", + "operationId": "GlobalDictionaryDataDataListGet", "parameters": [ { - "name": "Title", - "in": "query", - "description": "标题", + "name": "code", + "in": "path", + "description": "", + "required": true, "schema": { "type": "string" } - }, - { - "name": "Type", - "in": "query", - "description": "菜单类型(1目录 2菜单 3按钮)", - "schema": { - "$ref": "#/components/schemas/MenuTypeEnum" - } } ], "responses": { @@ -52990,7 +51660,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalMenuResponse" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -53046,7 +51716,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalMenuResponse" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -53102,7 +51772,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GlobalMenuResponse" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -53137,13 +51807,68 @@ } } }, - "/api/globalMenu/loginMenuTree": { + "/api/globalDictionaryData/delete": { + "post": { + "tags": [ + "globalDictionaryData" + ], + "summary": "删除字典值", + "operationId": "GlobalDictionaryDataDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDictionaryDataRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDictionaryDataRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteDictionaryDataRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/globalDictionaryData/detail": { "get": { "tags": [ - "globalMenu" + "globalDictionaryData" + ], + "summary": "获取字典值详情", + "operationId": "GlobalDictionaryDataDetailGet", + "parameters": [ + { + "name": "IsEnabled", + "in": "query", + "description": "是否启用", + "schema": { + "type": "boolean" + } + }, + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } ], - "summary": "获取登录菜单树", - "operationId": "GlobalMenuLoginMenuTreeGet", "responses": { "200": { "description": "OK", @@ -53172,10 +51897,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MenuResponse" - } + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" }, "trackId": { "type": "string", @@ -53205,6 +51927,142 @@ } }, "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "/api/globalDictionaryData/list": { + "get": { + "tags": [ + "globalDictionaryData" + ], + "summary": "获取字典值列表", + "operationId": "GlobalDictionaryDataListGet", + "parameters": [ + { + "name": "DictionaryTypeId", + "in": "query", + "description": "字典类型Id", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { "schema": { "required": [ "code", @@ -53230,7 +52088,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/MenuResponse" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -53260,7 +52118,7 @@ } } }, - "text/json": { + "application/json": { "schema": { "required": [ "code", @@ -53286,135 +52144,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/MenuResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/api/globalMenu/ownButtonPermList": { - "get": { - "tags": [ - "globalMenu" - ], - "summary": "获取用户拥有按钮权限集合(缓存)", - "operationId": "GlobalMenuOwnButtonPermListGet", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "type": "string" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "type": "string" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -53470,7 +52200,7 @@ "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -53505,13 +52235,33 @@ } } }, - "/api/globalMenu/ownMenuIdList": { - "get": { + "/api/globalDictionaryData/page": { + "post": { "tags": [ - "globalMenu" + "globalDictionaryData" ], - "summary": "获取当前用户已授权的菜单Id集合(缓存,含目录/菜单/按钮,来自 TenantRoleMenuEntity)。\n\n供基于稳定身份(Key)的鉴权使用:M:GameFrameX.Core.Const.MenuSeed.StableSeedId.Menu(System.String) 由 Key 派生的 Id 与本集合比对。", - "operationId": "GlobalMenuOwnMenuIdListGet", + "summary": "获取字典值分页列表", + "operationId": "GlobalDictionaryDataPagePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDictionaryDataRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageDictionaryDataRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageDictionaryDataRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -53540,11 +52290,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } + "$ref": "#/components/schemas/GlobalDictionaryDataResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -53597,11 +52343,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } + "$ref": "#/components/schemas/GlobalDictionaryDataResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -53654,11 +52396,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } + "$ref": "#/components/schemas/GlobalDictionaryDataResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -53692,29 +52430,29 @@ } } }, - "/api/globalMenu/update": { + "/api/globalDictionaryData/setStatus": { "post": { "tags": [ - "globalMenu" + "globalDictionaryData" ], - "summary": "更新菜单", - "operationId": "GlobalMenuUpdatePost", + "summary": "修改字典值状态", + "operationId": "GlobalDictionaryDataSetStatusPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateMenuRequest" + "$ref": "#/components/schemas/DictionaryDataRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateMenuRequest" + "$ref": "#/components/schemas/DictionaryDataRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateMenuRequest" + "$ref": "#/components/schemas/DictionaryDataRequest" } } } @@ -53726,32 +52464,81 @@ } } }, - "/api/globalPlatform/select": { + "/api/globalDictionaryData/update": { "post": { "tags": [ - "globalPlatform" + "globalDictionaryData" ], - "summary": "获取平台选择器列表", - "operationId": "GlobalPlatformSelectPost", + "summary": "更新字典值", + "operationId": "GlobalDictionaryDataUpdatePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateDictionaryDataRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateDictionaryDataRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" + "$ref": "#/components/schemas/UpdateDictionaryDataRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/globalDictionaryType/add": { + "post": { + "tags": [ + "globalDictionaryType" + ], + "summary": "添加字典类型", + "operationId": "GlobalDictionaryTypeAddPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddDictionaryTypeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddDictionaryTypeRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddDictionaryTypeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/globalDictionaryType/allDictionaryList": { + "get": { + "tags": [ + "globalDictionaryType" + ], + "summary": "获取所有字典集合", + "operationId": "GlobalDictionaryTypeAllDictionaryListGet", "responses": { "200": { "description": "OK", @@ -53782,7 +52569,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" } }, "trackId": { @@ -53838,7 +52625,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" } }, "trackId": { @@ -53894,7 +52681,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageResponse" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" } }, "trackId": { @@ -53929,32 +52716,24 @@ } } }, - "/api/globalPlatform/selectString": { - "post": { + "/api/globalDictionaryType/dataList": { + "get": { "tags": [ - "globalPlatform" + "globalDictionaryType" ], - "summary": "获取平台选择器列表(字符串 ID)", - "operationId": "GlobalPlatformSelectStringPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseSelectPageRequest" - } + "summary": "获取字典类型-值列表", + "operationId": "GlobalDictionaryTypeDataListGet", + "parameters": [ + { + "name": "Code", + "in": "query", + "description": "编码", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", @@ -53985,7 +52764,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -54041,7 +52820,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -54097,7 +52876,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/BaseSelectPageStringResponse" + "$ref": "#/components/schemas/GlobalDictionaryDataResponse" } }, "trackId": { @@ -54132,13 +52911,68 @@ } } }, - "/api/logDiff/clear": { + "/api/globalDictionaryType/delete": { "post": { "tags": [ - "logDiff" + "globalDictionaryType" + ], + "summary": "删除字典类型", + "operationId": "GlobalDictionaryTypeDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDictionaryTypeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDictionaryTypeRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteDictionaryTypeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/globalDictionaryType/detail": { + "get": { + "tags": [ + "globalDictionaryType" + ], + "summary": "获取字典类型详情", + "operationId": "GlobalDictionaryTypeDetailGet", + "parameters": [ + { + "name": "IsEnabled", + "in": "query", + "description": "是否启用", + "schema": { + "type": "boolean" + } + }, + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } ], - "summary": "清空主库新日志和历史日志。", - "operationId": "LogDiffClearPost", "responses": { "200": { "description": "OK", @@ -54167,7 +53001,7 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" }, "trackId": { "type": "string", @@ -54220,7 +53054,7 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" }, "trackId": { "type": "string", @@ -54273,7 +53107,7 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" }, "trackId": { "type": "string", @@ -54307,33 +53141,13 @@ } } }, - "/api/logDiff/page": { - "post": { + "/api/globalDictionaryType/list": { + "get": { "tags": [ - "logDiff" + "globalDictionaryType" ], - "summary": "获取日志分页列表", - "operationId": "LogDiffPagePost", - "requestBody": { - "description": "分页查询参数", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageLogRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageLogRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageLogRequest" - } - } - } - }, + "summary": "获取字典类型列表", + "operationId": "GlobalDictionaryTypeListGet", "responses": { "200": { "description": "OK", @@ -54362,7 +53176,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogDiffFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + } }, "trackId": { "type": "string", @@ -54415,7 +53232,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogDiffFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + } }, "trackId": { "type": "string", @@ -54468,7 +53288,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogDiffFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalDictionaryTypeResponse" + } }, "trackId": { "type": "string", @@ -54502,13 +53325,32 @@ } } }, - "/api/logException/clear": { + "/api/globalDictionaryType/page": { "post": { "tags": [ - "logException" + "globalDictionaryType" ], - "summary": "清空主库新日志和历史日志。", - "operationId": "LogExceptionClearPost", + "summary": "获取字典类型分页列表", + "operationId": "GlobalDictionaryTypePagePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDictionaryTypeRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageDictionaryTypeRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageDictionaryTypeRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -54537,7 +53379,7 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -54590,7 +53432,7 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -54643,7 +53485,7 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "$ref": "#/components/schemas/GlobalDictionaryTypeResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -54677,29 +53519,29 @@ } } }, - "/api/logException/export": { + "/api/globalDictionaryType/setStatus": { "post": { "tags": [ - "logException" + "globalDictionaryType" ], - "summary": "导出异常日志", - "operationId": "LogExceptionExportPost", + "summary": "修改字典类型状态", + "operationId": "GlobalDictionaryTypeSetStatusPost", "requestBody": { - "description": "导出参数", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LogRequest" + "$ref": "#/components/schemas/DictionaryTypeRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/LogRequest" + "$ref": "#/components/schemas/DictionaryTypeRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/LogRequest" + "$ref": "#/components/schemas/DictionaryTypeRequest" } } } @@ -54711,29 +53553,62 @@ } } }, - "/api/logException/page": { + "/api/globalDictionaryType/update": { "post": { "tags": [ - "logException" + "globalDictionaryType" ], - "summary": "获取日志分页列表", - "operationId": "LogExceptionPagePost", + "summary": "更新字典类型", + "operationId": "GlobalDictionaryTypeUpdatePost", "requestBody": { - "description": "分页查询参数", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageLogRequest" + "$ref": "#/components/schemas/UpdateDictionaryTypeRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageLogRequest" + "$ref": "#/components/schemas/UpdateDictionaryTypeRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageLogRequest" + "$ref": "#/components/schemas/UpdateDictionaryTypeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/globalLanguage/select": { + "post": { + "tags": [ + "globalLanguage" + ], + "summary": "获取语言选择器列表", + "operationId": "GlobalLanguageSelectPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" } } } @@ -54766,7 +53641,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -54819,7 +53697,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -54872,7 +53753,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageResponse" + } }, "trackId": { "type": "string", @@ -54906,13 +53790,32 @@ } } }, - "/api/logOperation/clear": { + "/api/globalLanguage/selectString": { "post": { "tags": [ - "logOperation" + "globalLanguage" ], - "summary": "清空主库新日志和历史日志。", - "operationId": "LogOperationClearPost", + "summary": "获取语言选择器列表(字符串 ID)", + "operationId": "GlobalLanguageSelectStringPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -54941,7 +53844,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -54994,7 +53900,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -55047,7 +53956,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -55081,29 +53993,29 @@ } } }, - "/api/logOperation/export": { + "/api/globalMenu/add": { "post": { "tags": [ - "logOperation" + "globalMenu" ], - "summary": "导出操作日志", - "operationId": "LogOperationExportPost", + "summary": "增加菜单", + "operationId": "GlobalMenuAddPost", "requestBody": { - "description": "导出参数", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LogRequest" + "$ref": "#/components/schemas/AddMenuRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/LogRequest" + "$ref": "#/components/schemas/AddMenuRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/LogRequest" + "$ref": "#/components/schemas/AddMenuRequest" } } } @@ -55115,208 +54027,47 @@ } } }, - "/api/logOperation/page": { + "/api/globalMenu/delete": { "post": { "tags": [ - "logOperation" + "globalMenu" ], - "summary": "获取日志分页列表", - "operationId": "LogOperationPagePost", + "summary": "删除菜单", + "operationId": "GlobalMenuDeletePost", "requestBody": { - "description": "分页查询参数", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageLogRequest" + "$ref": "#/components/schemas/DeleteMenuRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageLogRequest" + "$ref": "#/components/schemas/DeleteMenuRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageLogRequest" + "$ref": "#/components/schemas/DeleteMenuRequest" } } } }, "responses": { "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "application/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - } - } + "description": "OK" } } } }, - "/api/logVisit/clear": { - "post": { + "/api/globalMenu/endpointPermissionMapAsync": { + "get": { "tags": [ - "logVisit" + "globalMenu" ], - "summary": "清空主库新日志和历史日志。", - "operationId": "LogVisitClearPost", + "summary": "获取端点权限目录(U6/C42):(HttpMethod, RoutePath) → GameFrameX.Core.Authorization.EndpointPermissionEntry。\n\n由 `ApiEndpointCatalogSync` 启动时构建并预热;此处请求期按需返回缓存,缓存缺失则即时重建。", + "operationId": "GlobalMenuEndpointPermissionMapAsyncGet", "responses": { "200": { "description": "OK", @@ -55345,7 +54096,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EndpointPermissionEntry" + } }, "trackId": { "type": "string", @@ -55398,7 +54152,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EndpointPermissionEntry" + } }, "trackId": { "type": "string", @@ -55451,7 +54208,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EndpointPermissionEntry" + } }, "trackId": { "type": "string", @@ -55485,33 +54245,31 @@ } } }, - "/api/logVisit/page": { - "post": { + "/api/globalMenu/list": { + "get": { "tags": [ - "logVisit" + "globalMenu" ], - "summary": "获取日志分页列表", - "operationId": "LogVisitPagePost", - "requestBody": { - "description": "分页查询参数", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageLogRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageLogRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageLogRequest" - } + "summary": "获取菜单列表", + "operationId": "GlobalMenuListGet", + "parameters": [ + { + "name": "Title", + "in": "query", + "description": "标题", + "schema": { + "type": "string" + } + }, + { + "name": "Type", + "in": "query", + "description": "菜单类型(1目录 2菜单 3按钮)", + "schema": { + "$ref": "#/components/schemas/MenuTypeEnum" } } - }, + ], "responses": { "200": { "description": "OK", @@ -55540,7 +54298,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogVisitFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalMenuResponse" + } }, "trackId": { "type": "string", @@ -55593,7 +54354,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogVisitFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalMenuResponse" + } }, "trackId": { "type": "string", @@ -55646,7 +54410,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LogVisitFieldsSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalMenuResponse" + } }, "trackId": { "type": "string", @@ -55680,32 +54447,13 @@ } } }, - "/api/objectStorageConfig/add": { - "post": { + "/api/globalMenu/loginMenuTree": { + "get": { "tags": [ - "objectStorageConfig" + "globalMenu" ], - "summary": "新增配置。校验 Provider 已注册、规范化 ConfigJson;若启用则在事务内停用同租户其它配置。", - "operationId": "ObjectStorageConfigAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantObjectStorageConfigRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddTenantObjectStorageConfigRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddTenantObjectStorageConfigRequest" - } - } - } - }, + "summary": "获取登录菜单树", + "operationId": "GlobalMenuLoginMenuTreeGet", "responses": { "200": { "description": "OK", @@ -55734,7 +54482,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/MenuResponse" + } }, "trackId": { "type": "string", @@ -55787,7 +54538,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/MenuResponse" + } }, "trackId": { "type": "string", @@ -55840,7 +54594,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/MenuResponse" + } }, "trackId": { "type": "string", @@ -55874,60 +54631,13 @@ } } }, - "/api/objectStorageConfig/delete": { - "post": { - "tags": [ - "objectStorageConfig" - ], - "summary": "删除", - "operationId": "ObjectStorageConfigDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/objectStorageConfig/detail": { + "/api/globalMenu/ownButtonPermList": { "get": { "tags": [ - "objectStorageConfig" - ], - "summary": "详情,ConfigJson 字段级脱敏(仅敏感字段替换为 ******)。", - "operationId": "ObjectStorageConfigDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } + "globalMenu" ], + "summary": "获取用户拥有按钮权限集合(缓存)", + "operationId": "GlobalMenuOwnButtonPermListGet", "responses": { "200": { "description": "OK", @@ -55956,7 +54666,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponse" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -56009,7 +54722,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponse" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -56062,7 +54778,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponse" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -56096,32 +54815,13 @@ } } }, - "/api/objectStorageConfig/page": { - "post": { + "/api/globalMenu/ownMenuIdList": { + "get": { "tags": [ - "objectStorageConfig" + "globalMenu" ], - "summary": "分页查询,ConfigJson 整体脱敏。", - "operationId": "ObjectStorageConfigPagePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantObjectStorageConfigRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageTenantObjectStorageConfigRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageTenantObjectStorageConfigRequest" - } - } - } - }, + "summary": "获取当前用户已授权的菜单Id集合(缓存,含目录/菜单/按钮,来自 RoleMenuEntity)。\n\n供基于稳定身份(Key)的鉴权使用:M:GameFrameX.Core.Const.MenuSeed.StableSeedId.Menu(System.String) 由 Key 派生的 Id 与本集合比对。", + "operationId": "GlobalMenuOwnMenuIdListGet", "responses": { "200": { "description": "OK", @@ -56150,7 +54850,11 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } }, "trackId": { "type": "string", @@ -56203,7 +54907,11 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } }, "trackId": { "type": "string", @@ -56256,7 +54964,11 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } }, "trackId": { "type": "string", @@ -56290,13 +55002,66 @@ } } }, - "/api/objectStorageConfig/providers": { - "get": { + "/api/globalMenu/update": { + "post": { "tags": [ - "objectStorageConfig" + "globalMenu" ], - "summary": "获取所有支持的存储提供商清单。", - "operationId": "ObjectStorageConfigProvidersGet", + "summary": "更新菜单", + "operationId": "GlobalMenuUpdatePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMenuRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMenuRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateMenuRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/globalPlatform/select": { + "post": { + "tags": [ + "globalPlatform" + ], + "summary": "获取平台选择器列表", + "operationId": "GlobalPlatformSelectPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -56327,7 +55092,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ObjectStorageProviderItem" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -56383,7 +55148,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ObjectStorageProviderItem" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -56439,7 +55204,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ObjectStorageProviderItem" + "$ref": "#/components/schemas/BaseSelectPageResponse" } }, "trackId": { @@ -56474,22 +55239,32 @@ } } }, - "/api/objectStorageConfig/schema": { - "get": { + "/api/globalPlatform/selectString": { + "post": { "tags": [ - "objectStorageConfig" + "globalPlatform" ], - "summary": "获取指定提供商的配置字段 Schema。", - "operationId": "ObjectStorageConfigSchemaGet", - "parameters": [ - { - "name": "provider", - "in": "query", - "schema": { - "type": "string" + "summary": "获取平台选择器列表(字符串 ID)", + "operationId": "GlobalPlatformSelectStringPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseSelectPageRequest" + } } } - ], + }, "responses": { "200": { "description": "OK", @@ -56518,7 +55293,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigSchema" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -56571,7 +55349,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigSchema" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -56624,7 +55405,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/ObjectStorageConfigSchema" + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseSelectPageStringResponse" + } }, "trackId": { "type": "string", @@ -56658,26 +55442,13 @@ } } }, - "/api/objectStorageConfig/testConnection": { - "get": { + "/api/logDiff/clear": { + "post": { "tags": [ - "objectStorageConfig" - ], - "summary": "使用已保存配置测试连通性(不回显凭证)。", - "operationId": "ObjectStorageConfigTestConnectionGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } + "logDiff" ], + "summary": "清空主库新日志和历史日志。", + "operationId": "LogDiffClearPost", "responses": { "200": { "description": "OK", @@ -56846,62 +55617,29 @@ } } }, - "/api/objectStorageConfig/update": { - "post": { - "tags": [ - "objectStorageConfig" - ], - "summary": "更新配置。Provider 必须与既有记录一致;ConfigJson 规范化(****** 沿用旧值);启用时事务停用其它。", - "operationId": "ObjectStorageConfigUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantObjectStorageConfigRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantObjectStorageConfigRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateTenantObjectStorageConfigRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/onlineAssetAuditQuery/page": { + "/api/logDiff/page": { "post": { "tags": [ - "onlineAssetAuditQuery" + "logDiff" ], - "summary": "资产审计分页查询:操作者 / 命令类型 / 目标玩家 / 时间窗过滤,游标翻页往返透传 Online。", - "operationId": "OnlineAssetAuditQueryPagePost", + "summary": "获取日志分页列表", + "operationId": "LogDiffPagePost", "requestBody": { - "description": "作用域(必填)+ 操作者/玩家/命令类型/时间窗过滤 + 游标。", + "description": "分页查询参数", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAssetAuditRequest" + "$ref": "#/components/schemas/PageLogRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAssetAuditRequest" + "$ref": "#/components/schemas/PageLogRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAssetAuditRequest" + "$ref": "#/components/schemas/PageLogRequest" } } } @@ -56934,7 +55672,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetAuditPageResponse" + "$ref": "#/components/schemas/LogDiffFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -56987,7 +55725,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetAuditPageResponse" + "$ref": "#/components/schemas/LogDiffFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -57040,7 +55778,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetAuditPageResponse" + "$ref": "#/components/schemas/LogDiffFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -57074,33 +55812,13 @@ } } }, - "/api/onlineAssetGrantCommand/grant": { + "/api/logException/clear": { "post": { "tags": [ - "onlineAssetGrantCommand" + "logException" ], - "summary": "人工发放资产(高危端点):明细 + 必填理由经 Online Grant API 执行,响应透传 Online 首次结果。", - "operationId": "OnlineAssetGrantCommandGrantPost", - "requestBody": { - "description": "作用域(必填)+ 目标玩家 + 发放明细 + 理由(必填)+ 可选业务单号。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OnlineAssetGrantRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/OnlineAssetGrantRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/OnlineAssetGrantRequest" - } - } - } - }, + "summary": "清空主库新日志和历史日志。", + "operationId": "LogExceptionClearPost", "responses": { "200": { "description": "OK", @@ -57129,7 +55847,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57182,7 +55900,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57235,7 +55953,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57269,29 +55987,63 @@ } } }, - "/api/onlineAssetGrantCommand/revoke": { + "/api/logException/export": { "post": { "tags": [ - "onlineAssetGrantCommand" + "logException" ], - "summary": "人工撤销资产(高危端点):按目标交易 Id 撤销已生效变更,经 Online Grant/Transaction API 执行。", - "operationId": "OnlineAssetGrantCommandRevokePost", + "summary": "导出异常日志", + "operationId": "LogExceptionExportPost", "requestBody": { - "description": "作用域(必填)+ 目标玩家 + 被撤销交易 Id + 理由(必填)+ 可选业务单号。", + "description": "导出参数", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineAssetRevokeRequest" + "$ref": "#/components/schemas/LogRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineAssetRevokeRequest" + "$ref": "#/components/schemas/LogRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineAssetRevokeRequest" + "$ref": "#/components/schemas/LogRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/logException/page": { + "post": { + "tags": [ + "logException" + ], + "summary": "获取日志分页列表", + "operationId": "LogExceptionPagePost", + "requestBody": { + "description": "分页查询参数", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageLogRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageLogRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageLogRequest" } } } @@ -57324,7 +56076,182 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" + "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "/api/logOperation/clear": { + "post": { + "tags": [ + "logOperation" + ], + "summary": "清空主库新日志和历史日志。", + "operationId": "LogOperationClearPost", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "boolean" }, "trackId": { "type": "string", @@ -57377,7 +56304,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57430,7 +56357,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57464,29 +56391,63 @@ } } }, - "/api/onlineAssetLedgerQuery/page": { + "/api/logOperation/export": { "post": { "tags": [ - "onlineAssetLedgerQuery" + "logOperation" ], - "summary": "资产流水分页查询:玩家 + 货币/道具类型 + 时间窗过滤,游标翻页往返透传 Online。", - "operationId": "OnlineAssetLedgerQueryPagePost", + "summary": "导出操作日志", + "operationId": "LogOperationExportPost", "requestBody": { - "description": "作用域(必填)+ 目标玩家 + 资产维度/时间窗过滤 + 游标。", + "description": "导出参数", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAssetLedgerRequest" + "$ref": "#/components/schemas/LogRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAssetLedgerRequest" + "$ref": "#/components/schemas/LogRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAssetLedgerRequest" + "$ref": "#/components/schemas/LogRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/logOperation/page": { + "post": { + "tags": [ + "logOperation" + ], + "summary": "获取日志分页列表", + "operationId": "LogOperationPagePost", + "requestBody": { + "description": "分页查询参数", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageLogRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageLogRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageLogRequest" } } } @@ -57519,7 +56480,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetLedgerPageResponse" + "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -57572,7 +56533,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetLedgerPageResponse" + "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -57625,7 +56586,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetLedgerPageResponse" + "$ref": "#/components/schemas/LogOperationFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -57659,37 +56620,13 @@ } } }, - "/api/onlineAssetTransactionQuery/detail": { - "get": { + "/api/logVisit/clear": { + "post": { "tags": [ - "onlineAssetTransactionQuery" - ], - "summary": "交易详情查询:按 TransactionId 返回交易/Grant 全字段(变更来源完整可查的 Admin 展示半边)。", - "operationId": "OnlineAssetTransactionQueryDetailGet", - "parameters": [ - { - "name": "ServerId", - "in": "query", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - }, - { - "name": "TransactionId", - "in": "query", - "description": "交易 Id(必填;流水行反查交易详情的唯一键)。", - "required": true, - "schema": { - "maxLength": 256, - "type": "string" - } - } + "logVisit" ], + "summary": "清空主库新日志和历史日志。", + "operationId": "LogVisitClearPost", "responses": { "200": { "description": "OK", @@ -57718,7 +56655,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetTransactionDetailResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57771,7 +56708,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetTransactionDetailResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57824,7 +56761,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineAssetTransactionDetailResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -57858,29 +56795,29 @@ } } }, - "/api/onlineAuditSearch/page": { + "/api/logVisit/page": { "post": { "tags": [ - "onlineAuditSearch" + "logVisit" ], - "summary": "统一审计检索分页:三来源各取时间倒序 top(PageSize+1)→ 统一映射 → 五维内存过滤 → 跨源 OccurredAt 倒序归并取一页。\n\n分页语义(时间倒序 keyset):NextCursor = 本页末行 OccurredAt Unix 秒,下一页各来源只取 OccurredAt 严格小于\ncursor 的行。同秒截断边界:Unix 秒粒度下同一秒内多行被页边界截断时,下一页会跳过同秒的后续行——\n秒级时间戳无法区分同秒行序,属已知精度限制,非数据丢失(重放检索用时间窗过滤代替深翻页可达同区域)。\n深翻页近似边界:每来源只翻 top(PageSize+1)即参与归并——若某来源的命中行稀疏分散在时间深处(五维过滤\n命中率低),该来源可能在未翻尽时提前不再贡献行,HasMore 随之为 false。缓解:作用域/时间/对象维度尽量\nSQL 预筛下推(见各来源查询),稀疏过滤请优先收窄时间窗与作用域,而非无限深翻页。", - "operationId": "OnlineAuditSearchPagePost", + "summary": "获取日志分页列表", + "operationId": "LogVisitPagePost", "requestBody": { - "description": "五维过滤(操作者/对象/作用域/命令类型/时间窗)+ keyset 游标 + 页大小。", + "description": "分页查询参数", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAuditSearchRequest" + "$ref": "#/components/schemas/PageLogRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAuditSearchRequest" + "$ref": "#/components/schemas/PageLogRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageOnlineAuditSearchRequest" + "$ref": "#/components/schemas/PageLogRequest" } } } @@ -57913,7 +56850,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PageOnlineAuditSearchResponse" + "$ref": "#/components/schemas/LogVisitFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -57966,7 +56903,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PageOnlineAuditSearchResponse" + "$ref": "#/components/schemas/LogVisitFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -58019,7 +56956,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PageOnlineAuditSearchResponse" + "$ref": "#/components/schemas/LogVisitFieldsSqlSugarPagedList" }, "trackId": { "type": "string", @@ -58053,29 +56990,28 @@ } } }, - "/api/onlineControlledCommand/execute": { + "/api/objectStorageConfig/add": { "post": { "tags": [ - "onlineControlledCommand" + "objectStorageConfig" ], - "summary": "执行受控操作命令(高危端点):四值命令路由 + 目标/方向校验 + 双人复核字段必填。\n\n幂等语义(vault:C9 VC-8.4 / vault:C2 S1.5):每次调用按\nM:GameFrameX.Application.GmCenter.Console.OnlineControlledCommandService.BuildIdempotencyKey(System.String,System.Nullable{GameFrameX.Application.GmCenter.Console.Dto.ControlledCommandDirection},System.String,System.Int64) 规则派生 Online IdempotencyKey 下发——同一(命令, 方向, 目标, 区服)\n组合的重复调用携带相同幂等键,Online 侧按契约返回首次执行结果,不产生第二次副作用;\n因此网络重试 / 运营重复点击天然安全,失败可直接重试。", - "operationId": "OnlineControlledCommandExecutePost", + "summary": "新增配置。校验 Provider 已注册、规范化 ConfigJson;若启用则在事务内停用同租户其它配置。", + "operationId": "ObjectStorageConfigAddPost", "requestBody": { - "description": "作用域(必填)+ 命令(严格四值)+ 目标标识 + 方向(开关型命令)+ 原因 + 复核人(均必填项见 DTO 注释)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineControlledCommandRequest" + "$ref": "#/components/schemas/AddObjectStorageConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineControlledCommandRequest" + "$ref": "#/components/schemas/AddObjectStorageConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineControlledCommandRequest" + "$ref": "#/components/schemas/AddObjectStorageConfigRequest" } } } @@ -58108,7 +57044,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineControlledCommandAckResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponse" }, "trackId": { "type": "string", @@ -58161,7 +57097,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineControlledCommandAckResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponse" }, "trackId": { "type": "string", @@ -58214,7 +57150,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineControlledCommandAckResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponse" }, "trackId": { "type": "string", @@ -58248,33 +57184,60 @@ } } }, - "/api/onlineLiveOpsDispatch/dispatch": { + "/api/objectStorageConfig/delete": { "post": { "tags": [ - "onlineLiveOpsDispatch" + "objectStorageConfig" ], - "summary": "统一下发运营事件(五类来源单一入口)。校验序与来源路由表见类注释。", - "operationId": "OnlineLiveOpsDispatchDispatchPost", + "summary": "删除", + "operationId": "ObjectStorageConfigDeletePost", "requestBody": { - "description": "下发输入。", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/objectStorageConfig/detail": { + "get": { + "tags": [ + "objectStorageConfig" + ], + "summary": "详情,ConfigJson 字段级脱敏(仅敏感字段替换为 ******)。", + "operationId": "ObjectStorageConfigDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -58303,7 +57266,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponse" }, "trackId": { "type": "string", @@ -58356,7 +57319,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponse" }, "trackId": { "type": "string", @@ -58409,7 +57372,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponse" }, "trackId": { "type": "string", @@ -58443,29 +57406,28 @@ } } }, - "/api/onlineMatchQueueQuery/overview": { + "/api/objectStorageConfig/page": { "post": { "tags": [ - "onlineMatchQueueQuery" + "objectStorageConfig" ], - "summary": "匹配队列总览查询:按 Mode/Region 维度返回队列深度、平均等待、吞吐快照,并标注 Online 侧 ServerTime。", - "operationId": "OnlineMatchQueueQueryOverviewPost", + "summary": "分页查询,ConfigJson 整体脱敏。", + "operationId": "ObjectStorageConfigPagePost", "requestBody": { - "description": "作用域(必填)+ 匹配模式/地区过滤。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineMatchOverviewRequest" + "$ref": "#/components/schemas/PageObjectStorageConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineMatchOverviewRequest" + "$ref": "#/components/schemas/PageObjectStorageConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineMatchOverviewRequest" + "$ref": "#/components/schemas/PageObjectStorageConfigRequest" } } } @@ -58498,7 +57460,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchOverviewResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -58551,7 +57513,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchOverviewResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -58604,7 +57566,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchOverviewResponse" + "$ref": "#/components/schemas/ObjectStorageConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -58638,33 +57600,13 @@ } } }, - "/api/onlineMatchTicketQuery/abnormalPage": { - "post": { + "/api/objectStorageConfig/providers": { + "get": { "tags": [ - "onlineMatchTicketQuery" + "objectStorageConfig" ], - "summary": "异常 Ticket 分页查询:按异常类别(长时间未分配/重复取消/孤儿)检索,游标翻页往返透传 Online。", - "operationId": "OnlineMatchTicketQueryAbnormalPagePost", - "requestBody": { - "description": "作用域(必填)+ 异常类别 + 游标。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMatchAbnormalTicketRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMatchAbnormalTicketRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMatchAbnormalTicketRequest" - } - } - } - }, + "summary": "获取所有支持的存储提供商清单。", + "operationId": "ObjectStorageConfigProvidersGet", "responses": { "200": { "description": "OK", @@ -58693,7 +57635,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchAbnormalTicketPageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectStorageProviderItem" + } }, "trackId": { "type": "string", @@ -58746,7 +57691,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchAbnormalTicketPageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectStorageProviderItem" + } }, "trackId": { "type": "string", @@ -58799,7 +57747,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchAbnormalTicketPageResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/ObjectStorageProviderItem" + } }, "trackId": { "type": "string", @@ -58833,33 +57784,22 @@ } } }, - "/api/onlineMatchTicketQuery/failurePage": { - "post": { + "/api/objectStorageConfig/schema": { + "get": { "tags": [ - "onlineMatchTicketQuery" + "objectStorageConfig" ], - "summary": "匹配失败原因分页查询:原因码/时间窗过滤 + 按原因码聚合摘要,游标翻页往返透传 Online。", - "operationId": "OnlineMatchTicketQueryFailurePagePost", - "requestBody": { - "description": "作用域(必填)+ 原因码/时间窗过滤 + 游标。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMatchFailureRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMatchFailureRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMatchFailureRequest" - } + "summary": "获取指定提供商的配置字段 Schema。", + "operationId": "ObjectStorageConfigSchemaGet", + "parameters": [ + { + "name": "provider", + "in": "query", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", @@ -58888,7 +57828,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchFailurePageResponse" + "$ref": "#/components/schemas/ObjectStorageConfigSchema" }, "trackId": { "type": "string", @@ -58941,7 +57881,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchFailurePageResponse" + "$ref": "#/components/schemas/ObjectStorageConfigSchema" }, "trackId": { "type": "string", @@ -58994,7 +57934,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMatchFailurePageResponse" + "$ref": "#/components/schemas/ObjectStorageConfigSchema" }, "trackId": { "type": "string", @@ -59028,33 +57968,26 @@ } } }, - "/api/onlineMessageAuditQuery/page": { - "post": { + "/api/objectStorageConfig/testConnection": { + "get": { "tags": [ - "onlineMessageAuditQuery" + "objectStorageConfig" ], - "summary": "消息审计分页查询:过滤条件透传 Online,游标分页往返,展示前集中脱敏。", - "operationId": "OnlineMessageAuditQueryPagePost", - "requestBody": { - "description": "作用域(必填)+ 频道/参与者/关键词/时间窗过滤 + 游标。", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMessageAuditRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMessageAuditRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageOnlineMessageAuditRequest" - } + "summary": "使用已保存配置测试连通性(不回显凭证)。", + "operationId": "ObjectStorageConfigTestConnectionGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } - }, + ], "responses": { "200": { "description": "OK", @@ -59083,7 +58016,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMessageAuditPageResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -59136,7 +58069,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMessageAuditPageResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -59189,7 +58122,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineMessageAuditPageResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -59223,29 +58156,62 @@ } } }, - "/api/onlineOverviewQuery/snapshot": { + "/api/objectStorageConfig/update": { "post": { "tags": [ - "onlineOverviewQuery" + "objectStorageConfig" ], - "summary": "在线总览快照查询:在线玩家数 / Session 数 / 匹配队列概况 / 进行中对局数 / 重连率 + Online 侧快照时间。\n\n缺快照字段即缺省呈现(Online 侧返回什么呈现什么),Admin 不做本地聚合或推断补齐。", - "operationId": "OnlineOverviewQuerySnapshotPost", + "summary": "更新配置。Provider 必须与既有记录一致;ConfigJson 规范化(****** 沿用旧值);启用时事务停用其它。", + "operationId": "ObjectStorageConfigUpdatePost", "requestBody": { - "description": "作用域(必填)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineOverviewRequest" + "$ref": "#/components/schemas/UpdateObjectStorageConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineOverviewRequest" + "$ref": "#/components/schemas/UpdateObjectStorageConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineOverviewRequest" + "$ref": "#/components/schemas/UpdateObjectStorageConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/onlineAssetAuditQuery/page": { + "post": { + "tags": [ + "onlineAssetAuditQuery" + ], + "summary": "资产审计分页查询:操作者 / 命令类型 / 目标玩家 / 时间窗过滤,游标翻页往返透传 Online。", + "operationId": "OnlineAssetAuditQueryPagePost", + "requestBody": { + "description": "作用域(必填)+ 操作者/玩家/命令类型/时间窗过滤 + 游标。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageOnlineAssetAuditRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageOnlineAssetAuditRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageOnlineAssetAuditRequest" } } } @@ -59278,7 +58244,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineOverviewResponse" + "$ref": "#/components/schemas/OnlineAssetAuditPageResponse" }, "trackId": { "type": "string", @@ -59331,7 +58297,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineOverviewResponse" + "$ref": "#/components/schemas/OnlineAssetAuditPageResponse" }, "trackId": { "type": "string", @@ -59384,7 +58350,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineOverviewResponse" + "$ref": "#/components/schemas/OnlineAssetAuditPageResponse" }, "trackId": { "type": "string", @@ -59418,29 +58384,29 @@ } } }, - "/api/onlinePenaltyLinkCommand/execute": { + "/api/onlineAssetGrantCommand/grant": { "post": { "tags": [ - "onlinePenaltyLinkCommand" + "onlineAssetGrantCommand" ], - "summary": "执行处罚联动命令(高危端点):按处罚事实源行推导作用域并下发 Online 命令。", - "operationId": "OnlinePenaltyLinkCommandExecutePost", + "summary": "人工发放资产(高危端点):明细 + 必填理由经 Online Grant API 执行,响应透传 Online 首次结果。", + "operationId": "OnlineAssetGrantCommandGrantPost", "requestBody": { - "description": "处罚 Id + 联动命令(Kick / Ban / Mute 三值硬白名单)。", + "description": "作用域(必填)+ 目标玩家 + 发放明细 + 理由(必填)+ 可选业务单号。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlinePenaltyLinkRequest" + "$ref": "#/components/schemas/OnlineAssetGrantRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlinePenaltyLinkRequest" + "$ref": "#/components/schemas/OnlineAssetGrantRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlinePenaltyLinkRequest" + "$ref": "#/components/schemas/OnlineAssetGrantRequest" } } } @@ -59473,7 +58439,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" }, "trackId": { "type": "string", @@ -59526,7 +58492,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" }, "trackId": { "type": "string", @@ -59579,7 +58545,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" }, "trackId": { "type": "string", @@ -59613,29 +58579,29 @@ } } }, - "/api/onlinePlayerTimelineQuery/query": { + "/api/onlineAssetGrantCommand/revoke": { "post": { "tags": [ - "onlinePlayerTimelineQuery" + "onlineAssetGrantCommand" ], - "summary": "玩家时间线查询:按 PlayerId 拉取跨域事件链(Session/匹配/对局/资产/社交/处罚),\n支持事件分组过滤 + 时间窗 + 游标翻页;事件行与游标原值往返透传 Online。", - "operationId": "OnlinePlayerTimelineQueryQueryPost", + "summary": "人工撤销资产(高危端点):按目标交易 Id 撤销已生效变更,经 Online Grant/Transaction API 执行。", + "operationId": "OnlineAssetGrantCommandRevokePost", "requestBody": { - "description": "作用域(必填)+ 玩家 Id(必填)+ 分组过滤 + 时间窗 + 游标。", + "description": "作用域(必填)+ 目标玩家 + 被撤销交易 Id + 理由(必填)+ 可选业务单号。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlinePlayerTimelineRequest" + "$ref": "#/components/schemas/OnlineAssetRevokeRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlinePlayerTimelineRequest" + "$ref": "#/components/schemas/OnlineAssetRevokeRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlinePlayerTimelineRequest" + "$ref": "#/components/schemas/OnlineAssetRevokeRequest" } } } @@ -59668,7 +58634,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePlayerTimelineResponse" + "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" }, "trackId": { "type": "string", @@ -59721,7 +58687,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePlayerTimelineResponse" + "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" }, "trackId": { "type": "string", @@ -59774,7 +58740,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlinePlayerTimelineResponse" + "$ref": "#/components/schemas/OnlineAssetGrantAckResponse" }, "trackId": { "type": "string", @@ -59808,29 +58774,29 @@ } } }, - "/api/onlineReportCase/handle": { + "/api/onlineAssetLedgerQuery/page": { "post": { "tags": [ - "onlineReportCase" + "onlineAssetLedgerQuery" ], - "summary": "处置举报案件:按决策分派三步流(事实源 → 联动 → 通知/回写),任一步失败不静默——落审计并在响应中呈现。\n\n决策语义:Dismiss(驳回,不写事实源)/ Warn(警告通知,不写事实源)/ Mute / Ban(写处罚事实源并联动 Online 运行时)/\nForwardPenalty(转交处罚流程人工跟进,案件转 Handling,不自动写事实源)。", - "operationId": "OnlineReportCaseHandlePost", + "summary": "资产流水分页查询:玩家 + 货币/道具类型 + 时间窗过滤,游标翻页往返透传 Online。", + "operationId": "OnlineAssetLedgerQueryPagePost", "requestBody": { - "description": "案件作用域 + 决策 + 原因(+ Mute/Ban 时长与被举报人)。", + "description": "作用域(必填)+ 目标玩家 + 资产维度/时间窗过滤 + 游标。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OnlineReportHandleRequest" + "$ref": "#/components/schemas/PageOnlineAssetLedgerRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/OnlineReportHandleRequest" + "$ref": "#/components/schemas/PageOnlineAssetLedgerRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/OnlineReportHandleRequest" + "$ref": "#/components/schemas/PageOnlineAssetLedgerRequest" } } } @@ -59863,7 +58829,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineReportHandleResponse" + "$ref": "#/components/schemas/OnlineAssetLedgerPageResponse" }, "trackId": { "type": "string", @@ -59916,7 +58882,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineReportHandleResponse" + "$ref": "#/components/schemas/OnlineAssetLedgerPageResponse" }, "trackId": { "type": "string", @@ -59969,7 +58935,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineReportHandleResponse" + "$ref": "#/components/schemas/OnlineAssetLedgerPageResponse" }, "trackId": { "type": "string", @@ -60003,29 +58969,228 @@ } } }, - "/api/onlineReportCase/page": { + "/api/onlineAssetTransactionQuery/detail": { + "get": { + "tags": [ + "onlineAssetTransactionQuery" + ], + "summary": "交易详情查询:按 TransactionId 返回交易/Grant 全字段(变更来源完整可查的 Admin 展示半边)。", + "operationId": "OnlineAssetTransactionQueryDetailGet", + "parameters": [ + { + "name": "ServerId", + "in": "query", + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + }, + { + "name": "TransactionId", + "in": "query", + "description": "交易 Id(必填;流水行反查交易详情的唯一键)。", + "required": true, + "schema": { + "maxLength": 256, + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/OnlineAssetTransactionDetailResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/OnlineAssetTransactionDetailResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/OnlineAssetTransactionDetailResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "/api/onlineAuditSearch/page": { "post": { "tags": [ - "onlineReportCase" + "onlineAuditSearch" ], - "summary": "举报案件分页查询:过滤条件透传 Online,游标分页往返。", - "operationId": "OnlineReportCasePagePost", + "summary": "统一审计检索分页:三来源各取时间倒序 top(PageSize+1)→ 统一映射 → 五维内存过滤 → 跨源 OccurredAt 倒序归并取一页。\n\n分页语义(时间倒序 keyset):NextCursor = 本页末行 OccurredAt Unix 秒,下一页各来源只取 OccurredAt 严格小于\ncursor 的行。同秒截断边界:Unix 秒粒度下同一秒内多行被页边界截断时,下一页会跳过同秒的后续行——\n秒级时间戳无法区分同秒行序,属已知精度限制,非数据丢失(重放检索用时间窗过滤代替深翻页可达同区域)。\n深翻页近似边界:每来源只翻 top(PageSize+1)即参与归并——若某来源的命中行稀疏分散在时间深处(五维过滤\n命中率低),该来源可能在未翻尽时提前不再贡献行,HasMore 随之为 false。缓解:作用域/时间/对象维度尽量\nSQL 预筛下推(见各来源查询),稀疏过滤请优先收窄时间窗与作用域,而非无限深翻页。", + "operationId": "OnlineAuditSearchPagePost", "requestBody": { - "description": "作用域(必填)+ 案件过滤条件 + 游标。", + "description": "五维过滤(操作者/对象/作用域/命令类型/时间窗)+ keyset 游标 + 页大小。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineReportCaseRequest" + "$ref": "#/components/schemas/PageOnlineAuditSearchRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageOnlineReportCaseRequest" + "$ref": "#/components/schemas/PageOnlineAuditSearchRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageOnlineReportCaseRequest" + "$ref": "#/components/schemas/PageOnlineAuditSearchRequest" } } } @@ -60058,7 +59223,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineReportCasePageResponse" + "$ref": "#/components/schemas/PageOnlineAuditSearchResponse" }, "trackId": { "type": "string", @@ -60111,7 +59276,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineReportCasePageResponse" + "$ref": "#/components/schemas/PageOnlineAuditSearchResponse" }, "trackId": { "type": "string", @@ -60164,7 +59329,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OnlineReportCasePageResponse" + "$ref": "#/components/schemas/PageOnlineAuditSearchResponse" }, "trackId": { "type": "string", @@ -60198,13 +59363,33 @@ } } }, - "/api/platformCaptchaConfig/detail": { + "/api/onlineControlledCommand/execute": { "post": { "tags": [ - "platformCaptchaConfig" + "onlineControlledCommand" ], - "summary": "获取平台图形验证码配置详情。", - "operationId": "PlatformCaptchaConfigDetailPost", + "summary": "执行受控操作命令(高危端点):四值命令路由 + 目标/方向校验 + 双人复核字段必填。\n\n幂等语义(vault:C9 VC-8.4 / vault:C2 S1.5):每次调用按\nM:GameFrameX.Application.GmCenter.Console.OnlineControlledCommandService.BuildIdempotencyKey(System.String,System.Nullable{GameFrameX.Application.GmCenter.Console.Dto.ControlledCommandDirection},System.String,System.Int64) 规则派生 Online IdempotencyKey 下发——同一(命令, 方向, 目标, 区服)\n组合的重复调用携带相同幂等键,Online 侧按契约返回首次执行结果,不产生第二次副作用;\n因此网络重试 / 运营重复点击天然安全,失败可直接重试。", + "operationId": "OnlineControlledCommandExecutePost", + "requestBody": { + "description": "作用域(必填)+ 命令(严格四值)+ 目标标识 + 方向(开关型命令)+ 原因 + 复核人(均必填项见 DTO 注释)。", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OnlineControlledCommandRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/OnlineControlledCommandRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/OnlineControlledCommandRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -60233,7 +59418,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformCaptchaConfigResponse" + "$ref": "#/components/schemas/OnlineControlledCommandAckResponse" }, "trackId": { "type": "string", @@ -60286,7 +59471,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformCaptchaConfigResponse" + "$ref": "#/components/schemas/OnlineControlledCommandAckResponse" }, "trackId": { "type": "string", @@ -60339,7 +59524,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformCaptchaConfigResponse" + "$ref": "#/components/schemas/OnlineControlledCommandAckResponse" }, "trackId": { "type": "string", @@ -60373,46 +59558,33 @@ } } }, - "/api/platformCaptchaConfig/update": { + "/api/onlineLiveOpsDispatch/dispatch": { "post": { "tags": [ - "platformCaptchaConfig" + "onlineLiveOpsDispatch" ], - "summary": "保存平台图形验证码配置。每次保存原子递增版本,使旧验证码立即失效。\n采用乐观并发:以读取时的完整 !:SystemConfigEntity.Value 作为比较基准执行条件更新,\n受影响行数为 0 表示期间有并发写入,重读后重算版本并重试,保证版本号在并发下严格单调递增。", - "operationId": "PlatformCaptchaConfigUpdatePost", + "summary": "统一下发运营事件(五类来源单一入口)。校验序与来源路由表见类注释。", + "operationId": "OnlineLiveOpsDispatchDispatchPost", "requestBody": { + "description": "下发输入。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PlatformCaptchaConfigUpdateRequest" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PlatformCaptchaConfigUpdateRequest" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PlatformCaptchaConfigUpdateRequest" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/platformJwtConfig/detail": { - "post": { - "tags": [ - "platformJwtConfig" - ], - "summary": "获取平台 JWT 配置详情。签名密钥只返回掩码,不返回明文。", - "operationId": "PlatformJwtConfigDetailPost", "responses": { "200": { "description": "OK", @@ -60441,7 +59613,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformJwtConfigResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -60494,7 +59666,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformJwtConfigResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -60547,7 +59719,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformJwtConfigResponse" + "$ref": "#/components/schemas/OnlineLiveOpsDispatchResponse" }, "trackId": { "type": "string", @@ -60581,46 +59753,33 @@ } } }, - "/api/platformJwtConfig/update": { + "/api/onlineMatchQueueQuery/overview": { "post": { "tags": [ - "platformJwtConfig" + "onlineMatchQueueQuery" ], - "summary": "保存平台 JWT 配置。每次成功保存都会递增全局令牌版本,使所有旧 AccessToken 和 RefreshToken 立即失效。", - "operationId": "PlatformJwtConfigUpdatePost", + "summary": "匹配队列总览查询:按 Mode/Region 维度返回队列深度、平均等待、吞吐快照,并标注 Online 侧 ServerTime。", + "operationId": "OnlineMatchQueueQueryOverviewPost", "requestBody": { + "description": "作用域(必填)+ 匹配模式/地区过滤。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PlatformJwtConfigUpdateRequest" + "$ref": "#/components/schemas/OnlineMatchOverviewRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PlatformJwtConfigUpdateRequest" + "$ref": "#/components/schemas/OnlineMatchOverviewRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PlatformJwtConfigUpdateRequest" + "$ref": "#/components/schemas/OnlineMatchOverviewRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/platformLoggingConfig/detail": { - "post": { - "tags": [ - "platformLoggingConfig" - ], - "summary": "获取平台日志配置详情。ES ServerUris 元素统一掩码为 `\"***\"`,仅保留数量。", - "operationId": "PlatformLoggingConfigDetailPost", "responses": { "200": { "description": "OK", @@ -60649,7 +59808,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformLoggingConfigResponse" + "$ref": "#/components/schemas/OnlineMatchOverviewResponse" }, "trackId": { "type": "string", @@ -60702,7 +59861,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformLoggingConfigResponse" + "$ref": "#/components/schemas/OnlineMatchOverviewResponse" }, "trackId": { "type": "string", @@ -60755,7 +59914,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformLoggingConfigResponse" + "$ref": "#/components/schemas/OnlineMatchOverviewResponse" }, "trackId": { "type": "string", @@ -60789,46 +59948,33 @@ } } }, - "/api/platformLoggingConfig/update": { + "/api/onlineMatchTicketQuery/abnormalPage": { "post": { "tags": [ - "platformLoggingConfig" + "onlineMatchTicketQuery" ], - "summary": "保存平台日志配置。ES ServerUris 全为掩码占位时保留库内原值;CAS 乐观锁冲突重试;成功后刷新同 Host 快照。", - "operationId": "PlatformLoggingConfigUpdatePost", + "summary": "异常 Ticket 分页查询:按异常类别(长时间未分配/重复取消/孤儿)检索,游标翻页往返透传 Online。", + "operationId": "OnlineMatchTicketQueryAbnormalPagePost", "requestBody": { + "description": "作用域(必填)+ 异常类别 + 游标。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PlatformLoggingConfigUpdateRequest" + "$ref": "#/components/schemas/PageOnlineMatchAbnormalTicketRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PlatformLoggingConfigUpdateRequest" + "$ref": "#/components/schemas/PageOnlineMatchAbnormalTicketRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PlatformLoggingConfigUpdateRequest" + "$ref": "#/components/schemas/PageOnlineMatchAbnormalTicketRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/platformPasswordPolicyConfig/detail": { - "post": { - "tags": [ - "platformPasswordPolicyConfig" - ], - "summary": "获取平台密码策略配置详情。仅返回 strongPassword/passwordStrengthValidation/passwordStrengthValidationMsg,\n不包含任何 Cryptogram 密钥。", - "operationId": "PlatformPasswordPolicyConfigDetailPost", "responses": { "200": { "description": "OK", @@ -60857,7 +60003,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformPasswordPolicyConfigResponse" + "$ref": "#/components/schemas/OnlineMatchAbnormalTicketPageResponse" }, "trackId": { "type": "string", @@ -60910,7 +60056,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformPasswordPolicyConfigResponse" + "$ref": "#/components/schemas/OnlineMatchAbnormalTicketPageResponse" }, "trackId": { "type": "string", @@ -60963,7 +60109,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformPasswordPolicyConfigResponse" + "$ref": "#/components/schemas/OnlineMatchAbnormalTicketPageResponse" }, "trackId": { "type": "string", @@ -60997,46 +60143,33 @@ } } }, - "/api/platformPasswordPolicyConfig/update": { + "/api/onlineMatchTicketQuery/failurePage": { "post": { "tags": [ - "platformPasswordPolicyConfig" + "onlineMatchTicketQuery" ], - "summary": "保存平台密码策略配置。CAS 乐观锁冲突重试;成功后刷新同 Host 快照并镜像同步 CryptogramUtility 密码策略静态属性,\n后续 TenantUserService.ChangePwdAsync 立即按新规则校验。", - "operationId": "PlatformPasswordPolicyConfigUpdatePost", + "summary": "匹配失败原因分页查询:原因码/时间窗过滤 + 按原因码聚合摘要,游标翻页往返透传 Online。", + "operationId": "OnlineMatchTicketQueryFailurePagePost", "requestBody": { + "description": "作用域(必填)+ 原因码/时间窗过滤 + 游标。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PlatformPasswordPolicyConfigUpdateRequest" + "$ref": "#/components/schemas/PageOnlineMatchFailureRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PlatformPasswordPolicyConfigUpdateRequest" + "$ref": "#/components/schemas/PageOnlineMatchFailureRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PlatformPasswordPolicyConfigUpdateRequest" + "$ref": "#/components/schemas/PageOnlineMatchFailureRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/platformRateLimitConfig/detail": { - "post": { - "tags": [ - "platformRateLimitConfig" - ], - "summary": "获取平台限流配置详情。", - "operationId": "PlatformRateLimitConfigDetailPost", "responses": { "200": { "description": "OK", @@ -61065,7 +60198,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformRateLimitConfigResponse" + "$ref": "#/components/schemas/OnlineMatchFailurePageResponse" }, "trackId": { "type": "string", @@ -61118,7 +60251,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformRateLimitConfigResponse" + "$ref": "#/components/schemas/OnlineMatchFailurePageResponse" }, "trackId": { "type": "string", @@ -61171,7 +60304,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/PlatformRateLimitConfigResponse" + "$ref": "#/components/schemas/OnlineMatchFailurePageResponse" }, "trackId": { "type": "string", @@ -61205,61 +60338,29 @@ } } }, - "/api/platformRateLimitConfig/update": { - "post": { - "tags": [ - "platformRateLimitConfig" - ], - "summary": "保存平台限流配置。每次成功保存都会递增版本,使后续请求切换到新的 limiter 分区。", - "operationId": "PlatformRateLimitConfigUpdatePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlatformRateLimitConfigUpdateRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PlatformRateLimitConfigUpdateRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PlatformRateLimitConfigUpdateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/sessionKey/add": { + "/api/onlineMessageAuditQuery/page": { "post": { "tags": [ - "sessionKey" + "onlineMessageAuditQuery" ], - "summary": "新增会话密钥:服务端随机生成 Kid + AES 密钥明文,响应一次性回显。\n\n适合为同一应用并行放置多把 key(多版本客户端各持一把互不影响);多版本客户端共用主库密钥环。", - "operationId": "SessionKeyAddPost", + "summary": "消息审计分页查询:过滤条件透传 Online,游标分页往返,展示前集中脱敏。", + "operationId": "OnlineMessageAuditQueryPagePost", "requestBody": { + "description": "作用域(必填)+ 频道/参与者/关键词/时间窗过滤 + 游标。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionKeyAddRequest" + "$ref": "#/components/schemas/PageOnlineMessageAuditRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/SessionKeyAddRequest" + "$ref": "#/components/schemas/PageOnlineMessageAuditRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/SessionKeyAddRequest" + "$ref": "#/components/schemas/PageOnlineMessageAuditRequest" } } } @@ -61292,7 +60393,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyRevealResponse" + "$ref": "#/components/schemas/OnlineMessageAuditPageResponse" }, "trackId": { "type": "string", @@ -61345,7 +60446,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyRevealResponse" + "$ref": "#/components/schemas/OnlineMessageAuditPageResponse" }, "trackId": { "type": "string", @@ -61398,7 +60499,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyRevealResponse" + "$ref": "#/components/schemas/OnlineMessageAuditPageResponse" }, "trackId": { "type": "string", @@ -61432,59 +60533,33 @@ } } }, - "/api/sessionKey/delete": { + "/api/onlineOverviewQuery/snapshot": { "post": { "tags": [ - "sessionKey" + "onlineOverviewQuery" ], - "summary": "禁止删除会话密钥:历史 key 是在途加密信封与未升级客户端的解密依据,删除会直接打断存量流量;\n请改用禁用(立即拒用)或到期退场(租约自然排除)。", - "operationId": "SessionKeyDeletePost", + "summary": "在线总览快照查询:在线玩家数 / Session 数 / 匹配队列概况 / 进行中对局数 / 重连率 + Online 侧快照时间。\n\n缺快照字段即缺省呈现(Online 侧返回什么呈现什么),Admin 不做本地聚合或推断补齐。", + "operationId": "OnlineOverviewQuerySnapshotPost", "requestBody": { + "description": "作用域(必填)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/OnlineOverviewRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/OnlineOverviewRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" + "$ref": "#/components/schemas/OnlineOverviewRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/sessionKey/detail": { - "get": { - "tags": [ - "sessionKey" - ], - "summary": "查询单条会话密钥元数据(密钥脱敏 ******)。", - "operationId": "SessionKeyDetailGet", - "parameters": [ - { - "name": "Id", - "in": "query", - "required": true, - "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -61513,7 +60588,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyResponse" + "$ref": "#/components/schemas/OnlineOverviewResponse" }, "trackId": { "type": "string", @@ -61566,7 +60641,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyResponse" + "$ref": "#/components/schemas/OnlineOverviewResponse" }, "trackId": { "type": "string", @@ -61619,7 +60694,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyResponse" + "$ref": "#/components/schemas/OnlineOverviewResponse" }, "trackId": { "type": "string", @@ -61653,94 +60728,224 @@ } } }, - "/api/sessionKey/disable": { + "/api/onlinePenaltyLinkCommand/execute": { "post": { "tags": [ - "sessionKey" + "onlinePenaltyLinkCommand" ], - "summary": "禁用密钥:立即拒用该 key 的信封(60105),不影响同应用其余 key(单 key 失效不殃及全应用)。", - "operationId": "SessionKeyDisablePost", + "summary": "执行处罚联动命令(高危端点):按处罚事实源行推导作用域并下发 Online 命令。", + "operationId": "OnlinePenaltyLinkCommandExecutePost", "requestBody": { + "description": "处罚 Id + 联动命令(Kick / Ban / Mute 三值硬白名单)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/OnlinePenaltyLinkRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/OnlinePenaltyLinkRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "$ref": "#/components/schemas/OnlinePenaltyLinkRequest" } } } }, "responses": { "200": { - "description": "OK" - } - } - } - }, - "/api/sessionKey/enable": { - "post": { - "tags": [ - "sessionKey" - ], - "summary": "启用密钥。", - "operationId": "SessionKeyEnablePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseIdRequest" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } } } } - }, - "responses": { - "200": { - "description": "OK" - } } } }, - "/api/sessionKey/page": { + "/api/onlinePlayerTimelineQuery/query": { "post": { "tags": [ - "sessionKey" + "onlinePlayerTimelineQuery" ], - "summary": "分页查询会话密钥(元数据,密钥固定脱敏 ******,明文永不回显)。", - "operationId": "SessionKeyPagePost", + "summary": "玩家时间线查询:按 PlayerId 拉取跨域事件链(Session/匹配/对局/资产/社交/处罚),\n支持事件分组过滤 + 时间窗 + 游标翻页;事件行与游标原值往返透传 Online。", + "operationId": "OnlinePlayerTimelineQueryQueryPost", "requestBody": { + "description": "作用域(必填)+ 玩家 Id(必填)+ 分组过滤 + 时间窗 + 游标。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageTenantSessionKeyRequest" + "$ref": "#/components/schemas/OnlinePlayerTimelineRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageTenantSessionKeyRequest" + "$ref": "#/components/schemas/OnlinePlayerTimelineRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageTenantSessionKeyRequest" + "$ref": "#/components/schemas/OnlinePlayerTimelineRequest" } } } @@ -61773,7 +60978,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/OnlinePlayerTimelineResponse" }, "trackId": { "type": "string", @@ -61826,7 +61031,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/OnlinePlayerTimelineResponse" }, "trackId": { "type": "string", @@ -61879,7 +61084,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyResponseSqlSugarPagedList" + "$ref": "#/components/schemas/OnlinePlayerTimelineResponse" }, "trackId": { "type": "string", @@ -61913,61 +61118,29 @@ } } }, - "/api/sessionKey/renew": { - "post": { - "tags": [ - "sessionKey" - ], - "summary": "续租:仅更新到期时间(null = 改为永不过期),不产生新密钥、不改动 Kid 与明文。\n\n典型用途:RotateAsync 后客户端切换进度不及预期,延长旧 key 双活窗口。", - "operationId": "SessionKeyRenewPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionKeyRenewRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/SessionKeyRenewRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/SessionKeyRenewRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/sessionKey/rotate": { + "/api/onlineReportCase/handle": { "post": { "tags": [ - "sessionKey" + "onlineReportCase" ], - "summary": "轮换会话密钥(双活语义):新插一把立即生效的 key,旧 key 不禁用不删除 ——\n新旧在旧 key 到期/禁用前同时可解密,客户端可在双活窗口内任意时刻切换,切换零中断。\n\n当前最新生效 key 会被打 RotatedTime 标记(纯元数据,不影响解密);\n可选同时收窄旧 key 到期时间(OldKeyExpireTime)以控制双活窗口长度。", - "operationId": "SessionKeyRotatePost", + "summary": "处置举报案件:按决策分派三步流(事实源 → 联动 → 通知/回写),任一步失败不静默——落审计并在响应中呈现。\n\n决策语义:Dismiss(驳回,不写事实源)/ Warn(警告通知,不写事实源)/ Mute / Ban(写处罚事实源并联动 Online 运行时)/\nForwardPenalty(转交处罚流程人工跟进,案件转 Handling,不自动写事实源)。", + "operationId": "OnlineReportCaseHandlePost", "requestBody": { + "description": "案件作用域 + 决策 + 原因(+ Mute/Ban 时长与被举报人)。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SessionKeyRotateRequest" + "$ref": "#/components/schemas/OnlineReportHandleRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/SessionKeyRotateRequest" + "$ref": "#/components/schemas/OnlineReportHandleRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/SessionKeyRotateRequest" + "$ref": "#/components/schemas/OnlineReportHandleRequest" } } } @@ -62000,7 +61173,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyRevealResponse" + "$ref": "#/components/schemas/OnlineReportHandleResponse" }, "trackId": { "type": "string", @@ -62053,7 +61226,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyRevealResponse" + "$ref": "#/components/schemas/OnlineReportHandleResponse" }, "trackId": { "type": "string", @@ -62106,7 +61279,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SessionKeyRevealResponse" + "$ref": "#/components/schemas/OnlineReportHandleResponse" }, "trackId": { "type": "string", @@ -62140,65 +61313,32 @@ } } }, - "/api/systemAuth/captcha": { - "get": { - "tags": [ - "systemAuth" - ], - "summary": "获取验证码", - "operationId": "SystemAuthCaptchaGet", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/CaptchaResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CaptchaResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CaptchaResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/systemAuth/login": { + "/api/onlineReportCase/page": { "post": { "tags": [ - "systemAuth" + "onlineReportCase" ], - "summary": "账号密码登录", - "description": "用户名/密码:superadmin/密码首次安装时随机生成并打印于控制台", - "operationId": "SystemAuthLoginPost", + "summary": "举报案件分页查询:过滤条件透传 Online,游标分页往返。", + "operationId": "OnlineReportCasePagePost", "requestBody": { - "description": "", + "description": "作用域(必填)+ 案件过滤条件 + 游标。", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LoginRequest" + "$ref": "#/components/schemas/PageOnlineReportCaseRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/LoginRequest" + "$ref": "#/components/schemas/PageOnlineReportCaseRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/LoginRequest" + "$ref": "#/components/schemas/PageOnlineReportCaseRequest" } } - }, - "required": true + } }, "responses": { "200": { @@ -62228,7 +61368,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/OnlineReportCasePageResponse" }, "trackId": { "type": "string", @@ -62281,7 +61421,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/OnlineReportCasePageResponse" }, "trackId": { "type": "string", @@ -62334,7 +61474,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/OnlineReportCasePageResponse" }, "trackId": { "type": "string", @@ -62368,120 +61508,13 @@ } } }, - "/api/systemAuth/loginConfig": { - "get": { - "tags": [ - "systemAuth" - ], - "summary": "获取登录配置", - "operationId": "SystemAuthLoginConfigGet", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/LoginConfigResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginConfigResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/LoginConfigResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/systemAuth/logout": { - "post": { - "tags": [ - "systemAuth" - ], - "summary": "退出系统", - "operationId": "SystemAuthLogoutPost", - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemAuth/refreshToken": { - "get": { - "tags": [ - "systemAuth" - ], - "summary": "获取刷新Token", - "operationId": "SystemAuthRefreshTokenGet", - "parameters": [ - { - "name": "accessToken", - "in": "query", - "description": "", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/RefreshTokenResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefreshTokenResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/RefreshTokenResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/systemAuth/setupSuperAdminPassword": { + "/api/platformCaptchaConfig/detail": { "post": { "tags": [ - "systemAuth" + "platformCaptchaConfig" ], - "summary": "平台超管首装密码初始化:仅在密码未配置窗口内可用,设置成功即自动登录。\n\nfail-closed:密码一旦配置(向导设置或环境变量注入)该端点永久拒绝;\n条件更新(WHERE password_configured = false)保证并发竞速只有一票生效。", - "operationId": "SystemAuthSetupSuperAdminPasswordPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetupSuperAdminPasswordRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/SetupSuperAdminPasswordRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/SetupSuperAdminPasswordRequest" - } - } - }, - "required": true - }, + "summary": "获取平台图形验证码配置详情。", + "operationId": "PlatformCaptchaConfigDetailPost", "responses": { "200": { "description": "OK", @@ -62510,7 +61543,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/PlatformCaptchaConfigResponse" }, "trackId": { "type": "string", @@ -62563,7 +61596,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/PlatformCaptchaConfigResponse" }, "trackId": { "type": "string", @@ -62616,7 +61649,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginResponse" + "$ref": "#/components/schemas/PlatformCaptchaConfigResponse" }, "trackId": { "type": "string", @@ -62650,13 +61683,46 @@ } } }, - "/api/systemAuth/userInfo": { - "get": { + "/api/platformCaptchaConfig/update": { + "post": { "tags": [ - "systemAuth" + "platformCaptchaConfig" ], - "summary": "获取登录账号", - "operationId": "SystemAuthUserInfoGet", + "summary": "保存平台图形验证码配置。每次保存原子递增版本,使旧验证码立即失效。\n采用乐观并发:以读取时的完整 !:SystemConfigEntity.Value 作为比较基准执行条件更新,\n受影响行数为 0 表示期间有并发写入,重读后重算版本并重试,保证版本号在并发下严格单调递增。", + "operationId": "PlatformCaptchaConfigUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformCaptchaConfigUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PlatformCaptchaConfigUpdateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PlatformCaptchaConfigUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/platformJwtConfig/detail": { + "post": { + "tags": [ + "platformJwtConfig" + ], + "summary": "获取平台 JWT 配置详情。签名密钥只返回掩码,不返回明文。", + "operationId": "PlatformJwtConfigDetailPost", "responses": { "200": { "description": "OK", @@ -62685,7 +61751,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginUserResponse" + "$ref": "#/components/schemas/PlatformJwtConfigResponse" }, "trackId": { "type": "string", @@ -62738,60 +61804,60 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/LoginUserResponse" - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { - "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", - "format": "int32" - }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "$ref": "#/components/schemas/LoginUserResponse" + "$ref": "#/components/schemas/PlatformJwtConfigResponse" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/PlatformJwtConfigResponse" }, "trackId": { "type": "string", @@ -62825,54 +61891,46 @@ } } }, - "/api/systemAuth/watermarkConfig": { - "get": { + "/api/platformJwtConfig/update": { + "post": { "tags": [ - "systemAuth" + "platformJwtConfig" ], - "summary": "获取水印配置", - "operationId": "SystemAuthWatermarkConfigGet", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/WatermarkConfigResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/WatermarkConfigResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/WatermarkConfigResponseHttpJsonResultData" - } + "summary": "保存平台 JWT 配置。每次成功保存都会递增全局令牌版本,使所有旧 AccessToken 和 RefreshToken 立即失效。", + "operationId": "PlatformJwtConfigUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformJwtConfigUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PlatformJwtConfigUpdateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PlatformJwtConfigUpdateRequest" } } } + }, + "responses": { + "200": { + "description": "OK" + } } } }, - "/api/systemCache/delete": { + "/api/platformLoggingConfig/detail": { "post": { "tags": [ - "systemCache" - ], - "summary": "删除缓存", - "operationId": "SystemCacheDeletePost", - "parameters": [ - { - "name": "key", - "in": "query", - "description": "", - "schema": { - "type": "string" - } - } + "platformLoggingConfig" ], + "summary": "获取平台日志配置详情。ES ServerUris 元素统一掩码为 `\"***\"`,仅保留数量。", + "operationId": "PlatformLoggingConfigDetailPost", "responses": { "200": { "description": "OK", @@ -62901,8 +61959,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/PlatformLoggingConfigResponse" }, "trackId": { "type": "string", @@ -62955,8 +62012,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/PlatformLoggingConfigResponse" }, "trackId": { "type": "string", @@ -63009,8 +62065,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/PlatformLoggingConfigResponse" }, "trackId": { "type": "string", @@ -63044,23 +62099,46 @@ } } }, - "/api/systemCache/deleteByPreKey": { + "/api/platformLoggingConfig/update": { "post": { "tags": [ - "systemCache" + "platformLoggingConfig" ], - "summary": "根据键名前缀删除缓存", - "operationId": "SystemCacheDeleteByPreKeyPost", - "parameters": [ - { - "name": "prefixKey", - "in": "query", - "description": "键名前缀", - "schema": { - "type": "string" + "summary": "保存平台日志配置。ES ServerUris 全为掩码占位时保留库内原值;CAS 乐观锁冲突重试;成功后刷新同 Host 快照。", + "operationId": "PlatformLoggingConfigUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformLoggingConfigUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PlatformLoggingConfigUpdateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PlatformLoggingConfigUpdateRequest" + } } } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/platformPasswordPolicyConfig/detail": { + "post": { + "tags": [ + "platformPasswordPolicyConfig" ], + "summary": "获取平台密码策略配置详情。仅返回 strongPassword/passwordStrengthValidation/passwordStrengthValidationMsg,\n不包含任何 Cryptogram 密钥。", + "operationId": "PlatformPasswordPolicyConfigDetailPost", "responses": { "200": { "description": "OK", @@ -63089,8 +62167,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/PlatformPasswordPolicyConfigResponse" }, "trackId": { "type": "string", @@ -63143,8 +62220,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/PlatformPasswordPolicyConfigResponse" }, "trackId": { "type": "string", @@ -63197,8 +62273,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/PlatformPasswordPolicyConfigResponse" }, "trackId": { "type": "string", @@ -63232,13 +62307,46 @@ } } }, - "/api/systemCache/keyList": { - "get": { + "/api/platformPasswordPolicyConfig/update": { + "post": { "tags": [ - "systemCache" + "platformPasswordPolicyConfig" ], - "summary": "获取缓存键名集合", - "operationId": "SystemCacheKeyListGet", + "summary": "保存平台密码策略配置。CAS 乐观锁冲突重试;成功后刷新同 Host 快照并镜像同步 CryptogramUtility 密码策略静态属性,\n后续 UserService.ChangePwdAsync 立即按新规则校验。", + "operationId": "PlatformPasswordPolicyConfigUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformPasswordPolicyConfigUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PlatformPasswordPolicyConfigUpdateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PlatformPasswordPolicyConfigUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/platformRateLimitConfig/detail": { + "post": { + "tags": [ + "platformRateLimitConfig" + ], + "summary": "获取平台限流配置详情。", + "operationId": "PlatformRateLimitConfigDetailPost", "responses": { "200": { "description": "OK", @@ -63267,10 +62375,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PlatformRateLimitConfigResponse" }, "trackId": { "type": "string", @@ -63323,10 +62428,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PlatformRateLimitConfigResponse" }, "trackId": { "type": "string", @@ -63379,10 +62481,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PlatformRateLimitConfigResponse" }, "trackId": { "type": "string", @@ -63416,24 +62515,148 @@ } } }, - "/api/systemCache/keysByPrefixKey/{prefixKey}": { - "get": { + "/api/platformRateLimitConfig/update": { + "post": { "tags": [ - "systemCache" + "platformRateLimitConfig" ], - "summary": "根据键名前缀获取键名集合", - "operationId": "SystemCacheKeysByPrefixKeyGet", - "parameters": [ - { - "name": "prefixKey", - "in": "path", - "description": "键名前缀", - "required": true, - "schema": { - "type": "string" + "summary": "保存平台限流配置。每次成功保存都会递增版本,使后续请求切换到新的 limiter 分区。", + "operationId": "PlatformRateLimitConfigUpdatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformRateLimitConfigUpdateRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PlatformRateLimitConfigUpdateRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PlatformRateLimitConfigUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/role/add": { + "post": { + "tags": [ + "role" + ], + "summary": "增加角色", + "operationId": "RoleAddPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddRoleRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddRoleRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddRoleRequest" + } } } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/role/delete": { + "post": { + "tags": [ + "role" ], + "summary": "删除角色", + "operationId": "RoleDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteRoleRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteRoleRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteRoleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/role/grantMenu": { + "post": { + "tags": [ + "role" + ], + "summary": "授权角色菜单", + "operationId": "RoleGrantMenuPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleMenuRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleMenuRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RoleMenuRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/role/list": { + "get": { + "tags": [ + "role" + ], + "summary": "获取角色列表", + "operationId": "RoleListGet", "responses": { "200": { "description": "OK", @@ -63464,7 +62687,7 @@ "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RoleResponse" } }, "trackId": { @@ -63520,7 +62743,7 @@ "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RoleResponse" } }, "trackId": { @@ -63576,7 +62799,7 @@ "data": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/RoleResponse" } }, "trackId": { @@ -63611,153 +62834,22 @@ } } }, - "/api/systemCache/value/{key}": { + "/api/role/ownMenuList": { "get": { "tags": [ - "systemCache" + "role" ], - "summary": "获取缓存值", - "operationId": "SystemCacheValueGet", + "summary": "根据角色Id获取菜单Id集合", + "operationId": "RoleOwnMenuListGet", "parameters": [ { - "name": "key", - "in": "path", - "description": "", - "required": true, + "name": "IsEnabled", + "in": "query", + "description": "是否启用", "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemConfig/add": { - "post": { - "tags": [ - "systemConfig" - ], - "summary": "增加参数配置", - "operationId": "SystemConfigAddPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddConfigRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddConfigRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddConfigRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemConfig/batchDelete": { - "post": { - "tags": [ - "systemConfig" - ], - "summary": "批量删除参数配置", - "operationId": "SystemConfigBatchDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemConfig/delete": { - "post": { - "tags": [ - "systemConfig" - ], - "summary": "删除参数配置", - "operationId": "SystemConfigDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteConfigRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeleteConfigRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeleteConfigRequest" - } + "type": "boolean" } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemConfig/detail": { - "get": { - "tags": [ - "systemConfig" - ], - "summary": "获取参数配置详情", - "operationId": "SystemConfigDetailGet", - "parameters": [ + }, { "name": "Id", "in": "query", @@ -63798,7 +62890,11 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemConfigResponse" + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } }, "trackId": { "type": "string", @@ -63851,7 +62947,11 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemConfigResponse" + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } }, "trackId": { "type": "string", @@ -63904,7 +63004,11 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemConfigResponse" + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } }, "trackId": { "type": "string", @@ -63938,13 +63042,33 @@ } } }, - "/api/systemConfig/groupList": { - "get": { + "/api/role/page": { + "post": { "tags": [ - "systemConfig" + "role" ], - "summary": "获取分组列表", - "operationId": "SystemConfigGroupListGet", + "summary": "获取角色分页列表", + "operationId": "RolePagePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageRoleRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageRoleRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageRoleRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -63973,10 +63097,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/RoleResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -64029,10 +63150,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/RoleResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -64085,10 +63203,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/RoleResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -64122,13 +63237,33 @@ } } }, - "/api/systemConfig/list": { - "get": { + "/api/role/setStatus": { + "post": { "tags": [ - "systemConfig" + "role" ], - "summary": "获取参数配置列表", - "operationId": "SystemConfigListGet", + "summary": "设置角色状态", + "operationId": "RoleSetStatusPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RoleRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -64157,10 +63292,8 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemConfigResponse" - } + "type": "integer", + "format": "int32" }, "trackId": { "type": "string", @@ -64213,67 +63346,63 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemConfigResponse" - } - }, - "trackId": { - "type": "string", - "description": "链路追踪标识,未启用追踪时为 null", - "nullable": true - }, - "errorCode": { - "type": "string", - "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", - "nullable": true - }, - "type": { - "type": "string", - "description": "响应类型(success/warning/error)", - "nullable": true - }, - "time": { "type": "integer", - "description": "Unix 时间戳(秒)", - "format": "int64" - }, - "extras": { - "type": "object", - "nullable": true - } - } - } - }, - "text/json": { - "schema": { - "required": [ - "code", - "message", - "data", - "trackId", - "errorCode", - "type", - "time", - "extras" - ], - "type": "object", - "properties": { - "code": { - "type": "integer", - "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", "format": "int32" }, - "message": { - "type": "string", - "description": "错误或提示信息" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemConfigResponse" - } - }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "integer", + "format": "int32" + }, "trackId": { "type": "string", "description": "链路追踪标识,未启用追踪时为 null", @@ -64306,29 +63435,62 @@ } } }, - "/api/systemConfig/page": { + "/api/role/update": { "post": { "tags": [ - "systemConfig" + "role" ], - "summary": "获取参数配置分页列表", - "operationId": "SystemConfigPagePost", + "summary": "更新角色", + "operationId": "RoleUpdatePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageConfigRequest" + "$ref": "#/components/schemas/UpdateRoleRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PageConfigRequest" + "$ref": "#/components/schemas/UpdateRoleRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PageConfigRequest" + "$ref": "#/components/schemas/UpdateRoleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/sessionKey/add": { + "post": { + "tags": [ + "sessionKey" + ], + "summary": "新增会话密钥:服务端随机生成 Kid + AES 密钥明文,响应一次性回显。\n\n适合为同一应用并行放置多把 key(多版本客户端各持一把互不影响);多版本客户端共用主库密钥环。", + "operationId": "SessionKeyAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionKeyAddRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SessionKeyAddRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SessionKeyAddRequest" } } } @@ -64361,7 +63523,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/SessionKeyRevealResponse" }, "trackId": { "type": "string", @@ -64414,7 +63576,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/SessionKeyRevealResponse" }, "trackId": { "type": "string", @@ -64467,7 +63629,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemConfigResponseSqlSugarPagedList" + "$ref": "#/components/schemas/SessionKeyRevealResponse" }, "trackId": { "type": "string", @@ -64501,29 +63663,28 @@ } } }, - "/api/systemConfig/update": { + "/api/sessionKey/delete": { "post": { "tags": [ - "systemConfig" + "sessionKey" ], - "summary": "更新参数配置", - "operationId": "SystemConfigUpdatePost", + "summary": "禁止删除会话密钥:历史 key 是在途加密信封与未升级客户端的解密依据,删除会直接打断存量流量;\n请改用禁用(立即拒用)或到期退场(租约自然排除)。", + "operationId": "SessionKeyDeletePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateConfigRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateConfigRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateConfigRequest" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } @@ -64535,21 +63696,23 @@ } } }, - "/api/systemConst/data/{typeName}": { + "/api/sessionKey/detail": { "get": { "tags": [ - "systemConst" + "sessionKey" ], - "summary": "根据类名获取常量数据", - "operationId": "SystemConstDataGet", + "summary": "查询单条会话密钥元数据(密钥脱敏 ******)。", + "operationId": "SessionKeyDetailGet", "parameters": [ { - "name": "typeName", - "in": "path", - "description": "", + "name": "Id", + "in": "query", "required": true, "schema": { - "type": "string" + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" } } ], @@ -64581,10 +63744,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConstResponse" - } + "$ref": "#/components/schemas/SessionKeyResponse" }, "trackId": { "type": "string", @@ -64637,10 +63797,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConstResponse" - } + "$ref": "#/components/schemas/SessionKeyResponse" }, "trackId": { "type": "string", @@ -64693,10 +63850,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConstResponse" - } + "$ref": "#/components/schemas/SessionKeyResponse" }, "trackId": { "type": "string", @@ -64730,13 +63884,98 @@ } } }, - "/api/systemConst/list": { - "get": { + "/api/sessionKey/disable": { + "post": { "tags": [ - "systemConst" + "sessionKey" ], - "summary": "获取所有常量列表", - "operationId": "SystemConstListGet", + "summary": "禁用密钥:立即拒用该 key 的信封(60105),不影响同应用其余 key(单 key 失效不殃及全应用)。", + "operationId": "SessionKeyDisablePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/sessionKey/enable": { + "post": { + "tags": [ + "sessionKey" + ], + "summary": "启用密钥。", + "operationId": "SessionKeyEnablePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/BaseIdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/sessionKey/page": { + "post": { + "tags": [ + "sessionKey" + ], + "summary": "分页查询会话密钥(元数据,密钥固定脱敏 ******,明文永不回显)。", + "operationId": "SessionKeyPagePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageSessionKeyRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageSessionKeyRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageSessionKeyRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -64765,10 +64004,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConstResponse" - } + "$ref": "#/components/schemas/SessionKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -64821,10 +64057,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConstResponse" - } + "$ref": "#/components/schemas/SessionKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -64877,10 +64110,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConstResponse" - } + "$ref": "#/components/schemas/SessionKeyResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -64914,29 +64144,28 @@ } } }, - "/api/systemDatabase/addColumn": { + "/api/sessionKey/renew": { "post": { "tags": [ - "systemDatabase" + "sessionKey" ], - "summary": "增加列", - "operationId": "SystemDatabaseAddColumnPost", + "summary": "续租:仅更新到期时间(null = 改为永不过期),不产生新密钥、不改动 Kid 与明文。\n\n典型用途:RotateAsync 后客户端切换进度不及预期,延长旧 key 双活窗口。", + "operationId": "SessionKeyRenewPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DbColumnRequest" + "$ref": "#/components/schemas/SessionKeyRenewRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DbColumnRequest" + "$ref": "#/components/schemas/SessionKeyRenewRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DbColumnRequest" + "$ref": "#/components/schemas/SessionKeyRenewRequest" } } } @@ -64948,65 +64177,32 @@ } } }, - "/api/systemDatabase/addTable": { + "/api/sessionKey/rotate": { "post": { "tags": [ - "systemDatabase" + "sessionKey" ], - "summary": "增加表", - "operationId": "SystemDatabaseAddTablePost", + "summary": "轮换会话密钥(双活语义):新插一把立即生效的 key,旧 key 不禁用不删除 ——\n新旧在旧 key 到期/禁用前同时可解密,客户端可在双活窗口内任意时刻切换,切换零中断。\n\n当前最新生效 key 会被打 RotatedTime 标记(纯元数据,不影响解密);\n可选同时收窄旧 key 到期时间(OldKeyExpireTime)以控制双活窗口长度。", + "operationId": "SessionKeyRotatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DbTableRequest" + "$ref": "#/components/schemas/SessionKeyRotateRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DbTableRequest" + "$ref": "#/components/schemas/SessionKeyRotateRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DbTableRequest" + "$ref": "#/components/schemas/SessionKeyRotateRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemDatabase/columnList": { - "get": { - "tags": [ - "systemDatabase" - ], - "summary": "获取字段列表", - "operationId": "SystemDatabaseColumnListGet", - "parameters": [ - { - "name": "TableName", - "in": "query", - "description": "表名", - "schema": { - "type": "string" - } - }, - { - "name": "ConfigId", - "in": "query", - "description": "ConfigId,未传时默认主库", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "OK", @@ -65035,10 +64231,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DbColumnResponse" - } + "$ref": "#/components/schemas/SessionKeyRevealResponse" }, "trackId": { "type": "string", @@ -65091,10 +64284,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DbColumnResponse" - } + "$ref": "#/components/schemas/SessionKeyRevealResponse" }, "trackId": { "type": "string", @@ -65147,10 +64337,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DbColumnResponse" - } + "$ref": "#/components/schemas/SessionKeyRevealResponse" }, "trackId": { "type": "string", @@ -65184,25 +64371,66 @@ } } }, - "/api/systemDatabase/dbTypeList/{configId}": { + "/api/systemAuth/captcha": { "get": { "tags": [ - "systemDatabase" + "systemAuth" ], - "summary": "获取数据库数据类型列表", - "operationId": "SystemDatabaseDbTypeListGet", - "parameters": [ - { - "name": "configId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "string", - "default": "main" + "summary": "获取验证码", + "operationId": "SystemAuthCaptchaGet", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/CaptchaResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/CaptchaResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CaptchaResponseHttpJsonResultData" + } + } } } + } + } + }, + "/api/systemAuth/login": { + "post": { + "tags": [ + "systemAuth" ], + "summary": "账号密码登录", + "description": "用户名/密码:superadmin/密码首次安装时随机生成并打印于控制台", + "operationId": "SystemAuthLoginPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -65231,10 +64459,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/LoginResponse" }, "trackId": { "type": "string", @@ -65287,10 +64512,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/LoginResponse" }, "trackId": { "type": "string", @@ -65343,10 +64565,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/LoginResponse" }, "trackId": { "type": "string", @@ -65380,33 +64599,44 @@ } } }, - "/api/systemDatabase/deleteColumn": { - "post": { + "/api/systemAuth/loginConfig": { + "get": { "tags": [ - "systemDatabase" + "systemAuth" ], - "summary": "删除列", - "operationId": "SystemDatabaseDeleteColumnPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteDbColumnRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeleteDbColumnRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeleteDbColumnRequest" + "summary": "获取登录配置", + "operationId": "SystemAuthLoginConfigGet", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/LoginConfigResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginConfigResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/LoginConfigResponseHttpJsonResultData" + } } } } - }, + } + } + }, + "/api/systemAuth/logout": { + "post": { + "tags": [ + "systemAuth" + ], + "summary": "退出系统", + "operationId": "SystemAuthLogoutPost", "responses": { "200": { "description": "OK" @@ -65414,47 +64644,75 @@ } } }, - "/api/systemDatabase/deleteTable": { + "/api/systemAuth/refreshToken": { + "get": { + "tags": [ + "systemAuth" + ], + "summary": "获取刷新Token", + "operationId": "SystemAuthRefreshTokenGet", + "parameters": [ + { + "name": "accessToken", + "in": "query", + "description": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RefreshTokenResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshTokenResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RefreshTokenResponseHttpJsonResultData" + } + } + } + } + } + } + }, + "/api/systemAuth/setupSuperAdminPassword": { "post": { "tags": [ - "systemDatabase" + "systemAuth" ], - "summary": "删除表", - "operationId": "SystemDatabaseDeleteTablePost", + "summary": "平台超管首装密码初始化:仅在密码未配置窗口内可用,设置成功即自动登录。\n\nfail-closed:密码一旦配置(向导设置或环境变量注入)该端点永久拒绝;\n条件更新(WHERE password_configured = false)保证并发竞速只有一票生效。", + "operationId": "SystemAuthSetupSuperAdminPasswordPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteDbTableRequest" + "$ref": "#/components/schemas/SetupSuperAdminPasswordRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteDbTableRequest" + "$ref": "#/components/schemas/SetupSuperAdminPasswordRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteDbTableRequest" + "$ref": "#/components/schemas/SetupSuperAdminPasswordRequest" } } - } + }, + "required": true }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemDatabase/list": { - "get": { - "tags": [ - "systemDatabase" - ], - "summary": "获取库列表", - "operationId": "SystemDatabaseListGet", "responses": { "200": { "description": "OK", @@ -65483,10 +64741,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/LoginResponse" }, "trackId": { "type": "string", @@ -65539,10 +64794,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/LoginResponse" }, "trackId": { "type": "string", @@ -65595,10 +64847,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/LoginResponse" }, "trackId": { "type": "string", @@ -65632,25 +64881,13 @@ } } }, - "/api/systemDatabase/tableList/{configId}": { + "/api/systemAuth/userInfo": { "get": { "tags": [ - "systemDatabase" - ], - "summary": "获取表列表", - "operationId": "SystemDatabaseTableListGet", - "parameters": [ - { - "name": "configId", - "in": "path", - "description": "ConfigId", - "required": true, - "schema": { - "type": "string", - "default": "main" - } - } + "systemAuth" ], + "summary": "获取登录账号", + "operationId": "SystemAuthUserInfoGet", "responses": { "200": { "description": "OK", @@ -65679,10 +64916,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DbTableInfo" - } + "$ref": "#/components/schemas/LoginUserResponse" }, "trackId": { "type": "string", @@ -65735,10 +64969,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DbTableInfo" - } + "$ref": "#/components/schemas/LoginUserResponse" }, "trackId": { "type": "string", @@ -65791,10 +65022,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DbTableInfo" - } + "$ref": "#/components/schemas/LoginUserResponse" }, "trackId": { "type": "string", @@ -65828,100 +65056,54 @@ } } }, - "/api/systemDatabase/updateColumn": { - "post": { + "/api/systemAuth/watermarkConfig": { + "get": { "tags": [ - "systemDatabase" + "systemAuth" ], - "summary": "编辑列", - "operationId": "SystemDatabaseUpdateColumnPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDbColumnRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDbColumnRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateDbColumnRequest" - } - } - } - }, + "summary": "获取水印配置", + "operationId": "SystemAuthWatermarkConfigGet", "responses": { "200": { - "description": "OK" - } - } - } - }, - "/api/systemDatabase/updateTable": { - "post": { - "tags": [ - "systemDatabase" - ], - "summary": "编辑表", - "operationId": "SystemDatabaseUpdateTablePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDbTableRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDbTableRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateDbTableRequest" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/WatermarkConfigResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/WatermarkConfigResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/WatermarkConfigResponseHttpJsonResultData" + } } } } - }, - "responses": { - "200": { - "description": "OK" - } } } }, - "/api/systemEmailProvider/add": { + "/api/systemCache/delete": { "post": { "tags": [ - "systemEmailProvider" + "systemCache" ], - "summary": "新增平台系统邮件 Provider 配置。\n\n缺 Provider / 发件人邮箱 / Provider 必填凭据会直接拒绝;同一 Purpose 可保留多条配置并交给 Priority 决定选择顺序。", - "operationId": "SystemEmailProviderAddPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddSystemEmailProviderRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddSystemEmailProviderRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddSystemEmailProviderRequest" - } + "summary": "删除缓存", + "operationId": "SystemCacheDeletePost", + "parameters": [ + { + "name": "key", + "in": "query", + "description": "", + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", @@ -65950,7 +65132,8 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "type": "integer", + "format": "int32" }, "trackId": { "type": "string", @@ -66003,7 +65186,8 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "type": "integer", + "format": "int32" }, "trackId": { "type": "string", @@ -66056,7 +65240,8 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "type": "integer", + "format": "int32" }, "trackId": { "type": "string", @@ -66090,57 +65275,20 @@ } } }, - "/api/systemEmailProvider/delete": { + "/api/systemCache/deleteByPreKey": { "post": { "tags": [ - "systemEmailProvider" - ], - "summary": "删除", - "operationId": "SystemEmailProviderDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/BaseDeleteRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemEmailProvider/detail": { - "get": { - "tags": [ - "systemEmailProvider" + "systemCache" ], - "summary": "详情(敏感字段脱敏)。", - "operationId": "SystemEmailProviderDetailGet", + "summary": "根据键名前缀删除缓存", + "operationId": "SystemCacheDeleteByPreKeyPost", "parameters": [ { - "name": "Id", + "name": "prefixKey", "in": "query", - "required": true, + "description": "键名前缀", "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" + "type": "string" } } ], @@ -66172,7 +65320,8 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "type": "integer", + "format": "int32" }, "trackId": { "type": "string", @@ -66225,7 +65374,8 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "type": "integer", + "format": "int32" }, "trackId": { "type": "string", @@ -66278,7 +65428,8 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "type": "integer", + "format": "int32" }, "trackId": { "type": "string", @@ -66312,32 +65463,13 @@ } } }, - "/api/systemEmailProvider/page": { - "post": { + "/api/systemCache/keyList": { + "get": { "tags": [ - "systemEmailProvider" + "systemCache" ], - "summary": "分页查询(敏感字段脱敏)。", - "operationId": "SystemEmailProviderPagePost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageSystemEmailProviderRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageSystemEmailProviderRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageSystemEmailProviderRequest" - } - } - } - }, + "summary": "获取缓存键名集合", + "operationId": "SystemCacheKeyListGet", "responses": { "200": { "description": "OK", @@ -66366,7 +65498,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -66419,7 +65554,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -66472,7 +65610,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/SystemEmailProviderResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -66506,32 +65647,24 @@ } } }, - "/api/systemEmailProvider/sendTest": { - "post": { + "/api/systemCache/keysByPrefixKey/{prefixKey}": { + "get": { "tags": [ - "systemEmailProvider" + "systemCache" ], - "summary": "受权限控制的测试发送接口。\n\n按当前 `Id` 读取配置,缺凭据或发送失败返回明确错误,不向 API 输出敏感字段。", - "operationId": "SystemEmailProviderSendTestPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SystemEmailProviderTestSendRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/SystemEmailProviderTestSendRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/SystemEmailProviderTestSendRequest" - } + "summary": "根据键名前缀获取键名集合", + "operationId": "SystemCacheKeysByPrefixKeyGet", + "parameters": [ + { + "name": "prefixKey", + "in": "path", + "description": "键名前缀", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", @@ -66560,7 +65693,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -66613,7 +65749,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -66666,7 +65805,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -66700,28 +65842,54 @@ } } }, - "/api/systemEmailProvider/update": { + "/api/systemCache/value/{key}": { + "get": { + "tags": [ + "systemCache" + ], + "summary": "获取缓存值", + "operationId": "SystemCacheValueGet", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemConfig/add": { "post": { "tags": [ - "systemEmailProvider" + "systemConfig" ], - "summary": "更新平台系统邮件 Provider 配置。\n\n敏感字段回传 `******` 时保留数据库原值。", - "operationId": "SystemEmailProviderUpdatePost", + "summary": "增加参数配置", + "operationId": "SystemConfigAddPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateSystemEmailProviderRequest" + "$ref": "#/components/schemas/AddConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateSystemEmailProviderRequest" + "$ref": "#/components/schemas/AddConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateSystemEmailProviderRequest" + "$ref": "#/components/schemas/AddConfigRequest" } } } @@ -66733,24 +65901,104 @@ } } }, - "/api/systemEnum/enumDataList": { + "/api/systemConfig/batchDelete": { + "post": { + "tags": [ + "systemConfig" + ], + "summary": "批量删除参数配置", + "operationId": "SystemConfigBatchDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemConfig/delete": { + "post": { + "tags": [ + "systemConfig" + ], + "summary": "删除参数配置", + "operationId": "SystemConfigDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConfigRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteConfigRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemConfig/detail": { "get": { "tags": [ - "systemEnum" + "systemConfig" ], - "summary": "通过枚举类型获取枚举值集合。仅允许读取带 GameFrameX.Entity.Enum.AdminEnumAttribute 标记的枚举,\n未标记的枚举按 GameFrameX.Core.Enum.Errors.ProtocolErrorCode.NoEnumType 拒绝,避免按名绕过公开边界。", - "operationId": "SystemEnumEnumDataListGet", + "summary": "获取参数配置详情", + "operationId": "SystemConfigDetailGet", "parameters": [ { - "name": "EnumName", + "name": "Id", "in": "query", - "description": "枚举类型名称", "required": true, "schema": { - "type": "string", - "example": "AccountTypeEnum" - }, - "example": "AccountTypeEnum" + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -66781,10 +66029,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnumItem" - } + "$ref": "#/components/schemas/SystemConfigResponse" }, "trackId": { "type": "string", @@ -66837,10 +66082,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnumItem" - } + "$ref": "#/components/schemas/SystemConfigResponse" }, "trackId": { "type": "string", @@ -66893,10 +66135,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnumItem" - } + "$ref": "#/components/schemas/SystemConfigResponse" }, "trackId": { "type": "string", @@ -66930,37 +66169,13 @@ } } }, - "/api/systemEnum/enumDataListByField": { + "/api/systemConfig/groupList": { "get": { "tags": [ - "systemEnum" - ], - "summary": "通过实体的字段名获取相关枚举值集合(目前仅支持枚举类型)。\n字段枚举类型必须带 GameFrameX.Entity.Enum.AdminEnumAttribute 标记,否则按 GameFrameX.Core.Enum.Errors.ProtocolErrorCode.NoEnumType 拒绝。", - "operationId": "SystemEnumEnumDataListByFieldGet", - "parameters": [ - { - "name": "EntityName", - "in": "query", - "description": "实体名称", - "required": true, - "schema": { - "type": "string", - "example": "SystemUserEntity" - }, - "example": "SystemUserEntity" - }, - { - "name": "FieldName", - "in": "query", - "description": "字段名称", - "required": true, - "schema": { - "type": "string", - "example": "AccountType" - }, - "example": "AccountType" - } + "systemConfig" ], + "summary": "获取分组列表", + "operationId": "SystemConfigGroupListGet", "responses": { "200": { "description": "OK", @@ -66991,7 +66206,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EnumItem" + "type": "string" } }, "trackId": { @@ -67047,7 +66262,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EnumItem" + "type": "string" } }, "trackId": { @@ -67103,7 +66318,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EnumItem" + "type": "string" } }, "trackId": { @@ -67138,13 +66353,13 @@ } } }, - "/api/systemEnum/enumTypeList": { + "/api/systemConfig/list": { "get": { "tags": [ - "systemEnum" + "systemConfig" ], - "summary": "获取所有枚举类型(仅返回带 GameFrameX.Entity.Enum.AdminEnumAttribute 标记的枚举)。", - "operationId": "SystemEnumEnumTypeListGet", + "summary": "获取参数配置列表", + "operationId": "SystemConfigListGet", "responses": { "200": { "description": "OK", @@ -67175,7 +66390,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EnumTypeResponse" + "$ref": "#/components/schemas/SystemConfigResponse" } }, "trackId": { @@ -67231,7 +66446,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EnumTypeResponse" + "$ref": "#/components/schemas/SystemConfigResponse" } }, "trackId": { @@ -67287,7 +66502,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/EnumTypeResponse" + "$ref": "#/components/schemas/SystemConfigResponse" } }, "trackId": { @@ -67322,159 +66537,33 @@ } } }, - "/api/systemJob/addJobDetail": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "添加作业", - "operationId": "SystemJobAddJobDetailPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddJobDetailRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddJobDetailRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddJobDetailRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/addJobTrigger": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "添加触发器", - "operationId": "SystemJobAddJobTriggerPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddJobTriggerRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddJobTriggerRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddJobTriggerRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/cancelSleep": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "强制唤醒作业调度器", - "operationId": "SystemJobCancelSleepPost", - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/deleteJobDetail": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "删除作业", - "operationId": "SystemJobDeleteJobDetailPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteJobDetailRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeleteJobDetailRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeleteJobDetailRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/deleteJobTrigger": { + "/api/systemConfig/page": { "post": { "tags": [ - "systemJob" + "systemConfig" ], - "summary": "删除触发器", - "operationId": "SystemJobDeleteJobTriggerPost", + "summary": "获取参数配置分页列表", + "operationId": "SystemConfigPagePost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteJobTriggerRequest" + "$ref": "#/components/schemas/PageConfigRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteJobTriggerRequest" + "$ref": "#/components/schemas/PageConfigRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteJobTriggerRequest" + "$ref": "#/components/schemas/PageConfigRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/jobClusterList": { - "get": { - "tags": [ - "systemJob" - ], - "summary": "获取集群列表", - "operationId": "SystemJobJobClusterListGet", "responses": { "200": { "description": "OK", @@ -67503,10 +66592,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemJobClusterResponse" - } + "$ref": "#/components/schemas/SystemConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -67559,10 +66645,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemJobClusterResponse" - } + "$ref": "#/components/schemas/SystemConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -67615,10 +66698,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemJobClusterResponse" - } + "$ref": "#/components/schemas/SystemConfigResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -67652,18 +66732,53 @@ } } }, - "/api/systemJob/jobTriggerList": { + "/api/systemConfig/update": { + "post": { + "tags": [ + "systemConfig" + ], + "summary": "更新参数配置", + "operationId": "SystemConfigUpdatePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConfigRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConfigRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateConfigRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemConst/data/{typeName}": { "get": { "tags": [ - "systemJob" + "systemConst" ], - "summary": "获取触发器列表", - "operationId": "SystemJobJobTriggerListGet", + "summary": "根据类名获取常量数据", + "operationId": "SystemConstDataGet", "parameters": [ { - "name": "JobId", - "in": "query", - "description": "作业Id", + "name": "typeName", + "in": "path", + "description": "", + "required": true, "schema": { "type": "string" } @@ -67699,7 +66814,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SystemJobTriggerResponse" + "$ref": "#/components/schemas/ConstResponse" } }, "trackId": { @@ -67755,7 +66870,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SystemJobTriggerResponse" + "$ref": "#/components/schemas/ConstResponse" } }, "trackId": { @@ -67811,7 +66926,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/SystemJobTriggerResponse" + "$ref": "#/components/schemas/ConstResponse" } }, "trackId": { @@ -67846,32 +66961,13 @@ } } }, - "/api/systemJob/pageJobDetail": { - "post": { + "/api/systemConst/list": { + "get": { "tags": [ - "systemJob" + "systemConst" ], - "summary": "获取作业分页列表", - "operationId": "SystemJobPageJobDetailPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageJobRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageJobRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageJobRequest" - } - } - } - }, + "summary": "获取所有常量列表", + "operationId": "SystemConstListGet", "responses": { "200": { "description": "OK", @@ -67900,7 +66996,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/JobResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/ConstResponse" + } }, "trackId": { "type": "string", @@ -67953,7 +67052,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/JobResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/ConstResponse" + } }, "trackId": { "type": "string", @@ -68006,7 +67108,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/JobResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/ConstResponse" + } }, "trackId": { "type": "string", @@ -68040,269 +67145,29 @@ } } }, - "/api/systemJob/pauseAllJob": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "暂停所有作业", - "operationId": "SystemJobPauseAllJobPost", - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/pauseJob": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "暂停作业", - "operationId": "SystemJobPauseJobPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/pauseTrigger": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "暂停触发器", - "operationId": "SystemJobPauseTriggerPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobTriggerRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/JobTriggerRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/JobTriggerRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/persistAll": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "强制触发所有作业持久化", - "operationId": "SystemJobPersistAllPost", - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/runJob": { + "/api/systemDatabase/addColumn": { "post": { "tags": [ - "systemJob" + "systemDatabase" ], - "summary": "执行作业", - "operationId": "SystemJobRunJobPost", + "summary": "增加列", + "operationId": "SystemDatabaseAddColumnPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/startAllJob": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "启动所有作业", - "operationId": "SystemJobStartAllJobPost", - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/startJob": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "启动作业", - "operationId": "SystemJobStartJobPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/JobDetailRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/startTrigger": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "启动触发器", - "operationId": "SystemJobStartTriggerPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobTriggerRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/JobTriggerRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/JobTriggerRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/updateJobDetail": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "更新作业", - "operationId": "SystemJobUpdateJobDetailPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateJobDetailRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateJobDetailRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateJobDetailRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemJob/updateJobTrigger": { - "post": { - "tags": [ - "systemJob" - ], - "summary": "更新触发器", - "operationId": "SystemJobUpdateJobTriggerPost", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateJobTriggerRequest" + "$ref": "#/components/schemas/DbColumnRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateJobTriggerRequest" + "$ref": "#/components/schemas/DbColumnRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateJobTriggerRequest" + "$ref": "#/components/schemas/DbColumnRequest" } } } @@ -68314,29 +67179,29 @@ } } }, - "/api/systemMessage/sendAllUser": { + "/api/systemDatabase/addTable": { "post": { "tags": [ - "systemMessage" + "systemDatabase" ], - "summary": "发送消息给所有人", - "operationId": "SystemMessageSendAllUserPost", + "summary": "增加表", + "operationId": "SystemDatabaseAddTablePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MessageRequest" + "$ref": "#/components/schemas/DbTableRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageRequest" + "$ref": "#/components/schemas/DbTableRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/MessageRequest" + "$ref": "#/components/schemas/DbTableRequest" } } } @@ -68348,39 +67213,28 @@ } } }, - "/api/systemMessage/sendEmail": { - "post": { + "/api/systemDatabase/columnList": { + "get": { "tags": [ - "systemMessage" + "systemDatabase" ], - "summary": "发送平台系统邮件。\n\n从主库 `SystemEmailProviderEntity` 读取配置(按 `SystemEmailPurpose.PlatformOps` 默认);缺配置返回 `false`,禁止静默成功或 fallback 到租户玩家邮件。\n缺省收件人:使用当前命中的 `SystemEmailProviderEntity` 配置的 `DefaultToEmail`;若配置也未提供则发送失败。", - "operationId": "SystemMessageSendEmailPost", + "summary": "获取字段列表", + "operationId": "SystemDatabaseColumnListGet", "parameters": [ { - "name": "message", + "name": "TableName", "in": "query", - "description": "邮件正文。", - "required": true, + "description": "表名", "schema": { "type": "string" } }, { - "name": "title", - "in": "query", - "description": "邮件主题。", - "schema": { - "type": "string", - "default": "系统邮件" - } - }, - { - "name": "isHtml", + "name": "ConfigId", "in": "query", - "description": "是否 HTML 邮件;当前 `ISystemEmailSender` 实现按纯文本发送,HTML 标志位为预留扩展点。", + "description": "ConfigId,未传时默认主库", "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], @@ -68412,7 +67266,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/DbColumnResponse" + } }, "trackId": { "type": "string", @@ -68465,7 +67322,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/DbColumnResponse" + } }, "trackId": { "type": "string", @@ -68518,7 +67378,10 @@ "description": "错误或提示信息" }, "data": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/DbColumnResponse" + } }, "trackId": { "type": "string", @@ -68552,234 +67415,25 @@ } } }, - "/api/systemMessage/sendOtherUser": { - "post": { - "tags": [ - "systemMessage" - ], - "summary": "发送消息给除了发送人的其他人", - "operationId": "SystemMessageSendOtherUserPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemMessage/sendUser": { - "post": { - "tags": [ - "systemMessage" - ], - "summary": "发送消息给某个人", - "operationId": "SystemMessageSendUserPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemMessage/sendUsers": { - "post": { - "tags": [ - "systemMessage" - ], - "summary": "发送消息给某些人", - "operationId": "SystemMessageSendUsersPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/MessageRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemOpenAccess/add": { - "post": { + "/api/systemDatabase/dbTypeList/{configId}": { + "get": { "tags": [ - "systemOpenAccess" + "systemDatabase" ], - "summary": "增加开放接口身份", - "operationId": "SystemOpenAccessAddPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddOpenAccessRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddOpenAccessRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddOpenAccessRequest" - } + "summary": "获取数据库数据类型列表", + "operationId": "SystemDatabaseDbTypeListGet", + "parameters": [ + { + "name": "configId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "string", + "default": "main" } } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemOpenAccess/createSecret": { - "post": { - "tags": [ - "systemOpenAccess" ], - "summary": "创建密钥", - "operationId": "SystemOpenAccessCreateSecretPost", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/SecretCreateResponseHttpJsonResultData" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/SecretCreateResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/SecretCreateResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/systemOpenAccess/delete": { - "post": { - "tags": [ - "systemOpenAccess" - ], - "summary": "删除开放接口身份", - "operationId": "SystemOpenAccessDeletePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteOpenAccessRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeleteOpenAccessRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeleteOpenAccessRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/systemOpenAccess/page": { - "post": { - "tags": [ - "systemOpenAccess" - ], - "summary": "获取开放接口身份分页列表", - "operationId": "SystemOpenAccessPagePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageOpenAccessRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageOpenAccessRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageOpenAccessRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -68808,7 +67462,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OpenAccessResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -68861,7 +67518,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OpenAccessResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -68914,7 +67574,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/OpenAccessResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -68948,63 +67611,29 @@ } } }, - "/api/systemOpenAccess/update": { - "post": { - "tags": [ - "systemOpenAccess" - ], - "summary": "更新开放接口身份", - "operationId": "SystemOpenAccessUpdatePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOpenAccessRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOpenAccessRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateOpenAccessRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/tenantFile/delete": { + "/api/systemDatabase/deleteColumn": { "post": { "tags": [ - "tenantFile" + "systemDatabase" ], - "summary": "删除文件", - "operationId": "TenantFileDeletePost", + "summary": "删除列", + "operationId": "SystemDatabaseDeleteColumnPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteFileRequest" + "$ref": "#/components/schemas/DeleteDbColumnRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteFileRequest" + "$ref": "#/components/schemas/DeleteDbColumnRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteFileRequest" + "$ref": "#/components/schemas/DeleteDbColumnRequest" } } } @@ -69016,29 +67645,29 @@ } } }, - "/api/tenantFile/downloadFile": { + "/api/systemDatabase/deleteTable": { "post": { "tags": [ - "tenantFile" + "systemDatabase" ], - "summary": "根据文件Id或Url下载", - "operationId": "TenantFileDownloadFilePost", + "summary": "删除表", + "operationId": "SystemDatabaseDeleteTablePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FileRequest" + "$ref": "#/components/schemas/DeleteDbTableRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/FileRequest" + "$ref": "#/components/schemas/DeleteDbTableRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/FileRequest" + "$ref": "#/components/schemas/DeleteDbTableRequest" } } } @@ -69050,33 +67679,13 @@ } } }, - "/api/tenantFile/page": { - "post": { + "/api/systemDatabase/list": { + "get": { "tags": [ - "tenantFile" + "systemDatabase" ], - "summary": "获取文件分页列表", - "operationId": "TenantFilePagePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageFileRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageFileRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageFileRequest" - } - } - } - }, + "summary": "获取库列表", + "operationId": "SystemDatabaseListGet", "responses": { "200": { "description": "OK", @@ -69105,7 +67714,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantFileResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -69158,7 +67770,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantFileResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -69211,7 +67826,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantFileResponseSqlSugarPagedList" + "type": "array", + "items": { + "type": "string" + } }, "trackId": { "type": "string", @@ -69245,71 +67863,25 @@ } } }, - "/api/tenantFile/update": { - "post": { + "/api/systemDatabase/tableList/{configId}": { + "get": { "tags": [ - "tenantFile" + "systemDatabase" ], - "summary": "更新文件", - "operationId": "TenantFileUpdatePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/FileRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/FileRequest" - } + "summary": "获取表列表", + "operationId": "SystemDatabaseTableListGet", + "parameters": [ + { + "name": "configId", + "in": "path", + "description": "ConfigId", + "required": true, + "schema": { + "type": "string", + "default": "main" } } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/tenantFile/uploadAvatar": { - "post": { - "tags": [ - "tenantFile" ], - "summary": "上传头像", - "operationId": "TenantFileUploadAvatarPost", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "description": "", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } - } - } - } - }, "responses": { "200": { "description": "OK", @@ -69338,7 +67910,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/DbTableInfo" + } }, "trackId": { "type": "string", @@ -69391,7 +67966,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/DbTableInfo" + } }, "trackId": { "type": "string", @@ -69444,7 +68022,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/DbTableInfo" + } }, "trackId": { "type": "string", @@ -69478,43 +68059,96 @@ } } }, - "/api/tenantFile/uploadFile": { + "/api/systemDatabase/updateColumn": { "post": { "tags": [ - "tenantFile" + "systemDatabase" ], - "summary": "上传文件", - "operationId": "TenantFileUploadFilePost", - "parameters": [ - { - "name": "path", - "in": "query", - "description": "", - "schema": { - "type": "string" + "summary": "编辑列", + "operationId": "SystemDatabaseUpdateColumnPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDbColumnRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDbColumnRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateDbColumnRequest" + } } } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemDatabase/updateTable": { + "post": { + "tags": [ + "systemDatabase" ], + "summary": "编辑表", + "operationId": "SystemDatabaseUpdateTablePost", "requestBody": { + "description": "", "content": { - "multipart/form-data": { + "application/json": { "schema": { - "required": [ - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "description": "", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } + "$ref": "#/components/schemas/UpdateDbTableRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDbTableRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateDbTableRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemEmailProvider/add": { + "post": { + "tags": [ + "systemEmailProvider" + ], + "summary": "新增平台系统邮件 Provider 配置。\n\n缺 Provider / 发件人邮箱 / Provider 必填凭据会直接拒绝;同一 Purpose 可保留多条配置并交给 Priority 决定选择顺序。", + "operationId": "SystemEmailProviderAddPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddSystemEmailProviderRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddSystemEmailProviderRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddSystemEmailProviderRequest" } } } @@ -69547,7 +68181,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "trackId": { "type": "string", @@ -69600,7 +68234,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "trackId": { "type": "string", @@ -69653,7 +68287,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "trackId": { "type": "string", @@ -69687,33 +68321,60 @@ } } }, - "/api/tenantFile/uploadFileFromBase64": { + "/api/systemEmailProvider/delete": { "post": { "tags": [ - "tenantFile" + "systemEmailProvider" ], - "summary": "上传文件Base64", - "operationId": "TenantFileUploadFileFromBase64Post", + "summary": "删除", + "operationId": "SystemEmailProviderDeletePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UploadFileFromBase64Request" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UploadFileFromBase64Request" + "$ref": "#/components/schemas/BaseDeleteRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UploadFileFromBase64Request" + "$ref": "#/components/schemas/BaseDeleteRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemEmailProvider/detail": { + "get": { + "tags": [ + "systemEmailProvider" + ], + "summary": "详情(敏感字段脱敏)。", + "operationId": "SystemEmailProviderDetailGet", + "parameters": [ + { + "name": "Id", + "in": "query", + "required": true, + "schema": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", @@ -69742,7 +68403,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "trackId": { "type": "string", @@ -69795,7 +68456,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "trackId": { "type": "string", @@ -69848,7 +68509,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "trackId": { "type": "string", @@ -69882,36 +68543,28 @@ } } }, - "/api/tenantFile/uploadFiles": { + "/api/systemEmailProvider/page": { "post": { "tags": [ - "tenantFile" + "systemEmailProvider" ], - "summary": "上传多文件", - "operationId": "TenantFileUploadFilesPost", + "summary": "分页查询(敏感字段脱敏)。", + "operationId": "SystemEmailProviderPagePost", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "required": [ - "files" - ], - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - }, - "description": "" - } - } - }, - "encoding": { - "files": { - "style": "form" - } + "$ref": "#/components/schemas/PageSystemEmailProviderRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageSystemEmailProviderRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageSystemEmailProviderRequest" } } } @@ -69944,10 +68597,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileResponse" - } + "$ref": "#/components/schemas/SystemEmailProviderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -70000,10 +68650,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileResponse" - } + "$ref": "#/components/schemas/SystemEmailProviderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -70056,10 +68703,7 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileResponse" - } + "$ref": "#/components/schemas/SystemEmailProviderResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -70093,33 +68737,28 @@ } } }, - "/api/tenantFile/uploadSignature": { + "/api/systemEmailProvider/sendTest": { "post": { "tags": [ - "tenantFile" + "systemEmailProvider" ], - "summary": "上传电子签名", - "operationId": "TenantFileUploadSignaturePost", + "summary": "受权限控制的测试发送接口。\n\n按当前 `Id` 读取配置,缺凭据或发送失败返回明确错误,不向 API 输出敏感字段。", + "operationId": "SystemEmailProviderSendTestPost", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "required": [ - "file" - ], - "type": "object", - "properties": { - "file": { - "type": "string", - "description": "", - "format": "binary" - } - } - }, - "encoding": { - "file": { - "style": "form" - } + "$ref": "#/components/schemas/SystemEmailProviderTestSendRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SystemEmailProviderTestSendRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/SystemEmailProviderTestSendRequest" } } } @@ -70152,7 +68791,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -70205,7 +68844,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -70258,7 +68897,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/FileResponse" + "type": "boolean" }, "trackId": { "type": "string", @@ -70292,63 +68931,28 @@ } } }, - "/api/tenantRole/add": { - "post": { - "tags": [ - "tenantRole" - ], - "summary": "增加角色", - "operationId": "TenantRoleAddPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddRoleRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddRoleRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddRoleRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/tenantRole/delete": { + "/api/systemEmailProvider/update": { "post": { "tags": [ - "tenantRole" + "systemEmailProvider" ], - "summary": "删除角色", - "operationId": "TenantRoleDeletePost", + "summary": "更新平台系统邮件 Provider 配置。\n\n敏感字段回传 `******` 时保留数据库原值。", + "operationId": "SystemEmailProviderUpdatePost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteRoleRequest" + "$ref": "#/components/schemas/UpdateSystemEmailProviderRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteRoleRequest" + "$ref": "#/components/schemas/UpdateSystemEmailProviderRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteRoleRequest" + "$ref": "#/components/schemas/UpdateSystemEmailProviderRequest" } } } @@ -70360,47 +68964,26 @@ } } }, - "/api/tenantRole/grantMenu": { - "post": { + "/api/systemEnum/enumDataList": { + "get": { "tags": [ - "tenantRole" + "systemEnum" ], - "summary": "授权角色菜单", - "operationId": "TenantRoleGrantMenuPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RoleMenuRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/RoleMenuRequest" - } + "summary": "通过枚举类型获取枚举值集合。仅允许读取带 GameFrameX.Entity.Enum.AdminEnumAttribute 标记的枚举,\n未标记的枚举按 GameFrameX.Core.Enum.Errors.ProtocolErrorCode.NoEnumType 拒绝,避免按名绕过公开边界。", + "operationId": "SystemEnumEnumDataListGet", + "parameters": [ + { + "name": "EnumName", + "in": "query", + "description": "枚举类型名称", + "required": true, + "schema": { + "type": "string", + "example": "AccountTypeEnum" }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/RoleMenuRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK" + "example": "AccountTypeEnum" } - } - } - }, - "/api/tenantRole/list": { - "get": { - "tags": [ - "tenantRole" ], - "summary": "获取角色列表", - "operationId": "TenantRoleListGet", "responses": { "200": { "description": "OK", @@ -70431,7 +69014,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/RoleResponse" + "$ref": "#/components/schemas/EnumItem" } }, "trackId": { @@ -70487,7 +69070,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/RoleResponse" + "$ref": "#/components/schemas/EnumItem" } }, "trackId": { @@ -70543,7 +69126,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/RoleResponse" + "$ref": "#/components/schemas/EnumItem" } }, "trackId": { @@ -70578,32 +69161,35 @@ } } }, - "/api/tenantRole/ownMenuList": { + "/api/systemEnum/enumDataListByField": { "get": { "tags": [ - "tenantRole" + "systemEnum" ], - "summary": "根据角色Id获取菜单Id集合", - "operationId": "TenantRoleOwnMenuListGet", + "summary": "通过实体的字段名获取相关枚举值集合(目前仅支持枚举类型)。\n字段枚举类型必须带 GameFrameX.Entity.Enum.AdminEnumAttribute 标记,否则按 GameFrameX.Core.Enum.Errors.ProtocolErrorCode.NoEnumType 拒绝。", + "operationId": "SystemEnumEnumDataListByFieldGet", "parameters": [ { - "name": "IsEnabled", + "name": "EntityName", "in": "query", - "description": "是否启用", + "description": "实体名称", + "required": true, "schema": { - "type": "boolean" - } + "type": "string", + "example": "SystemUserEntity" + }, + "example": "SystemUserEntity" }, { - "name": "Id", + "name": "FieldName", "in": "query", + "description": "字段名称", "required": true, "schema": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "integer", - "format": "int64" - } + "type": "string", + "example": "AccountType" + }, + "example": "AccountType" } ], "responses": { @@ -70636,8 +69222,7 @@ "data": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/EnumItem" } }, "trackId": { @@ -70693,8 +69278,7 @@ "data": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/EnumItem" } }, "trackId": { @@ -70750,8 +69334,7 @@ "data": { "type": "array", "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/EnumItem" } }, "trackId": { @@ -70786,33 +69369,13 @@ } } }, - "/api/tenantRole/page": { - "post": { + "/api/systemEnum/enumTypeList": { + "get": { "tags": [ - "tenantRole" + "systemEnum" ], - "summary": "获取角色分页列表", - "operationId": "TenantRolePagePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageRoleRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageRoleRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageRoleRequest" - } - } - } - }, + "summary": "获取所有枚举类型(仅返回带 GameFrameX.Entity.Enum.AdminEnumAttribute 标记的枚举)。", + "operationId": "SystemEnumEnumTypeListGet", "responses": { "200": { "description": "OK", @@ -70841,7 +69404,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantRoleResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumTypeResponse" + } }, "trackId": { "type": "string", @@ -70894,7 +69460,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantRoleResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumTypeResponse" + } }, "trackId": { "type": "string", @@ -70947,7 +69516,10 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantRoleResponseSqlSugarPagedList" + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumTypeResponse" + } }, "trackId": { "type": "string", @@ -70981,33 +69553,159 @@ } } }, - "/api/tenantRole/setStatus": { + "/api/systemJob/addJobDetail": { "post": { "tags": [ - "tenantRole" + "systemJob" ], - "summary": "设置角色状态", - "operationId": "TenantRoleSetStatusPost", + "summary": "添加作业", + "operationId": "SystemJobAddJobDetailPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RoleRequest" + "$ref": "#/components/schemas/AddJobDetailRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/RoleRequest" + "$ref": "#/components/schemas/AddJobDetailRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/RoleRequest" + "$ref": "#/components/schemas/AddJobDetailRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/addJobTrigger": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "添加触发器", + "operationId": "SystemJobAddJobTriggerPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddJobTriggerRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddJobTriggerRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddJobTriggerRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/cancelSleep": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "强制唤醒作业调度器", + "operationId": "SystemJobCancelSleepPost", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/deleteJobDetail": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "删除作业", + "operationId": "SystemJobDeleteJobDetailPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteJobDetailRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteJobDetailRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteJobDetailRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/deleteJobTrigger": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "删除触发器", + "operationId": "SystemJobDeleteJobTriggerPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteJobTriggerRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteJobTriggerRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteJobTriggerRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/jobClusterList": { + "get": { + "tags": [ + "systemJob" + ], + "summary": "获取集群列表", + "operationId": "SystemJobJobClusterListGet", "responses": { "200": { "description": "OK", @@ -71036,8 +69734,10 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemJobClusterResponse" + } }, "trackId": { "type": "string", @@ -71090,8 +69790,10 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemJobClusterResponse" + } }, "trackId": { "type": "string", @@ -71144,8 +69846,10 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemJobClusterResponse" + } }, "trackId": { "type": "string", @@ -71179,67 +69883,23 @@ } } }, - "/api/tenantRole/update": { - "post": { + "/api/systemJob/jobTriggerList": { + "get": { "tags": [ - "tenantRole" + "systemJob" ], - "summary": "更新角色", - "operationId": "TenantRoleUpdatePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRoleRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateRoleRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateRoleRequest" - } + "summary": "获取触发器列表", + "operationId": "SystemJobJobTriggerListGet", + "parameters": [ + { + "name": "JobId", + "in": "query", + "description": "作业Id", + "schema": { + "type": "string" } } - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/tenantUser/add": { - "post": { - "tags": [ - "tenantUser" ], - "summary": "增加用户", - "operationId": "TenantUserAddPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddUserRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AddUserRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AddUserRequest" - } - } - } - }, "responses": { "200": { "description": "OK", @@ -71268,8 +69928,10 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int64" + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemJobTriggerResponse" + } }, "trackId": { "type": "string", @@ -71322,8 +69984,10 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int64" + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemJobTriggerResponse" + } }, "trackId": { "type": "string", @@ -71376,8 +70040,10 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int64" + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemJobTriggerResponse" + } }, "trackId": { "type": "string", @@ -71411,13 +70077,32 @@ } } }, - "/api/tenantUser/baseInfo": { - "get": { + "/api/systemJob/pageJobDetail": { + "post": { "tags": [ - "tenantUser" + "systemJob" ], - "summary": "查看用户基本信息", - "operationId": "TenantUserBaseInfoGet", + "summary": "获取作业分页列表", + "operationId": "SystemJobPageJobDetailPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageJobRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageJobRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageJobRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -71446,7 +70131,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantUserResponse" + "$ref": "#/components/schemas/JobResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -71499,7 +70184,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantUserResponse" + "$ref": "#/components/schemas/JobResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -71552,7 +70237,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantUserResponse" + "$ref": "#/components/schemas/JobResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -71584,32 +70269,352 @@ } } } - }, + } + }, + "/api/systemJob/pauseAllJob": { "post": { "tags": [ - "tenantUser" + "systemJob" ], - "summary": "更新用户基本信息", - "operationId": "TenantUserBaseInfoPost", + "summary": "暂停所有作业", + "operationId": "SystemJobPauseAllJobPost", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/pauseJob": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "暂停作业", + "operationId": "SystemJobPauseJobPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/pauseTrigger": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "暂停触发器", + "operationId": "SystemJobPauseTriggerPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobTriggerRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/JobTriggerRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/JobTriggerRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/persistAll": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "强制触发所有作业持久化", + "operationId": "SystemJobPersistAllPost", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/runJob": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "执行作业", + "operationId": "SystemJobRunJobPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/startAllJob": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "启动所有作业", + "operationId": "SystemJobStartAllJobPost", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/startJob": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "启动作业", + "operationId": "SystemJobStartJobPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/JobDetailRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/startTrigger": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "启动触发器", + "operationId": "SystemJobStartTriggerPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobTriggerRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/JobTriggerRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/JobTriggerRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/updateJobDetail": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "更新作业", + "operationId": "SystemJobUpdateJobDetailPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobDetailRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobDetailRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobDetailRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemJob/updateJobTrigger": { + "post": { + "tags": [ + "systemJob" + ], + "summary": "更新触发器", + "operationId": "SystemJobUpdateJobTriggerPost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobTriggerRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobTriggerRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateJobTriggerRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemMessage/sendAllUser": { + "post": { + "tags": [ + "systemMessage" + ], + "summary": "发送消息给所有人", + "operationId": "SystemMessageSendAllUserPost", "requestBody": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantUserEntity" + "$ref": "#/components/schemas/MessageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/TenantUserEntity" + "$ref": "#/components/schemas/MessageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/TenantUserEntity" + "$ref": "#/components/schemas/MessageRequest" } } } }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemMessage/sendEmail": { + "post": { + "tags": [ + "systemMessage" + ], + "summary": "发送平台系统邮件。\n\n从主库 `SystemEmailProviderEntity` 读取配置(按 `SystemEmailPurpose.PlatformOps` 默认);缺配置返回 `false`,禁止静默成功或 fallback 到租户玩家邮件。\n缺省收件人:使用当前命中的 `SystemEmailProviderEntity` 配置的 `DefaultToEmail`;若配置也未提供则发送失败。", + "operationId": "SystemMessageSendEmailPost", + "parameters": [ + { + "name": "message", + "in": "query", + "description": "邮件正文。", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "title", + "in": "query", + "description": "邮件主题。", + "schema": { + "type": "string", + "default": "系统邮件" + } + }, + { + "name": "isHtml", + "in": "query", + "description": "是否 HTML 邮件;当前 `ISystemEmailSender` 实现按纯文本发送,HTML 标志位为预留扩展点。", + "schema": { + "type": "boolean", + "default": false + } + } + ], "responses": { "200": { "description": "OK", @@ -71638,8 +70643,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "type": "boolean" }, "trackId": { "type": "string", @@ -71692,8 +70696,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "type": "boolean" }, "trackId": { "type": "string", @@ -71746,8 +70749,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "type": "boolean" }, "trackId": { "type": "string", @@ -71781,29 +70783,230 @@ } } }, - "/api/tenantUser/changePwd": { + "/api/systemMessage/sendOtherUser": { "post": { "tags": [ - "tenantUser" + "systemMessage" ], - "summary": "修改用户密码", - "operationId": "TenantUserChangePwdPost", + "summary": "发送消息给除了发送人的其他人", + "operationId": "SystemMessageSendOtherUserPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ChangePwdRequest" + "$ref": "#/components/schemas/MessageRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ChangePwdRequest" + "$ref": "#/components/schemas/MessageRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ChangePwdRequest" + "$ref": "#/components/schemas/MessageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemMessage/sendUser": { + "post": { + "tags": [ + "systemMessage" + ], + "summary": "发送消息给某个人", + "operationId": "SystemMessageSendUserPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/MessageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemMessage/sendUsers": { + "post": { + "tags": [ + "systemMessage" + ], + "summary": "发送消息给某些人", + "operationId": "SystemMessageSendUsersPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/MessageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemOpenAccess/add": { + "post": { + "tags": [ + "systemOpenAccess" + ], + "summary": "增加开放接口身份", + "operationId": "SystemOpenAccessAddPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddOpenAccessRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddOpenAccessRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddOpenAccessRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemOpenAccess/createSecret": { + "post": { + "tags": [ + "systemOpenAccess" + ], + "summary": "创建密钥", + "operationId": "SystemOpenAccessCreateSecretPost", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/SecretCreateResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecretCreateResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/SecretCreateResponseHttpJsonResultData" + } + } + } + } + } + } + }, + "/api/systemOpenAccess/delete": { + "post": { + "tags": [ + "systemOpenAccess" + ], + "summary": "删除开放接口身份", + "operationId": "SystemOpenAccessDeletePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteOpenAccessRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteOpenAccessRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteOpenAccessRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/systemOpenAccess/page": { + "post": { + "tags": [ + "systemOpenAccess" + ], + "summary": "获取开放接口身份分页列表", + "operationId": "SystemOpenAccessPagePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageOpenAccessRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageOpenAccessRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageOpenAccessRequest" } } } @@ -71836,8 +71039,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/OpenAccessResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -71890,8 +71092,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/OpenAccessResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -71944,8 +71145,7 @@ "description": "错误或提示信息" }, "data": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/OpenAccessResponseSqlSugarPagedList" }, "trackId": { "type": "string", @@ -71979,29 +71179,29 @@ } } }, - "/api/tenantUser/delete": { + "/api/systemOpenAccess/update": { "post": { "tags": [ - "tenantUser" + "systemOpenAccess" ], - "summary": "删除用户", - "operationId": "TenantUserDeletePost", + "summary": "更新开放接口身份", + "operationId": "SystemOpenAccessUpdatePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteUserRequest" + "$ref": "#/components/schemas/UpdateOpenAccessRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DeleteUserRequest" + "$ref": "#/components/schemas/UpdateOpenAccessRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/DeleteUserRequest" + "$ref": "#/components/schemas/UpdateOpenAccessRequest" } } } @@ -72013,59 +71213,33 @@ } } }, - "/api/tenantUser/grantRole": { + "/api/user/add": { "post": { "tags": [ - "tenantUser" + "user" ], - "summary": "授权用户角色", - "operationId": "TenantUserGrantRolePost", + "summary": "增加用户", + "operationId": "UserAddPost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserRoleRequest" + "$ref": "#/components/schemas/AddUserRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserRoleRequest" + "$ref": "#/components/schemas/AddUserRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UserRoleRequest" + "$ref": "#/components/schemas/AddUserRequest" } } } }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/tenantUser/ownRoleList/{userId}": { - "get": { - "tags": [ - "tenantUser" - ], - "summary": "获取用户拥有角色集合", - "operationId": "TenantUserOwnRoleListGet", - "parameters": [ - { - "name": "userId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], "responses": { "200": { "description": "OK", @@ -72094,11 +71268,8 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } + "type": "integer", + "format": "int64" }, "trackId": { "type": "string", @@ -72151,11 +71322,8 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } + "type": "integer", + "format": "int64" }, "trackId": { "type": "string", @@ -72208,11 +71376,8 @@ "description": "错误或提示信息" }, "data": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } + "type": "integer", + "format": "int64" }, "trackId": { "type": "string", @@ -72246,33 +71411,13 @@ } } }, - "/api/tenantUser/page": { - "post": { + "/api/user/baseInfo": { + "get": { "tags": [ - "tenantUser" + "user" ], - "summary": "获取用户分页列表", - "operationId": "TenantUserPagePost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageUserRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/PageUserRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/PageUserRequest" - } - } - } - }, + "summary": "查看用户基本信息", + "operationId": "UserBaseInfoGet", "responses": { "200": { "description": "OK", @@ -72301,7 +71446,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantUserResponseSqlSugarPagedList" + "$ref": "#/components/schemas/UserResponse" }, "trackId": { "type": "string", @@ -72354,7 +71499,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantUserResponseSqlSugarPagedList" + "$ref": "#/components/schemas/UserResponse" }, "trackId": { "type": "string", @@ -72407,7 +71552,7 @@ "description": "错误或提示信息" }, "data": { - "$ref": "#/components/schemas/TenantUserResponseSqlSugarPagedList" + "$ref": "#/components/schemas/UserResponse" }, "trackId": { "type": "string", @@ -72439,31 +71584,28 @@ } } } - } - }, - "/api/tenantUser/resetPwd": { + }, "post": { "tags": [ - "tenantUser" + "user" ], - "summary": "重置用户密码", - "operationId": "TenantUserResetPwdPost", + "summary": "更新用户基本信息", + "operationId": "UserBaseInfoPost", "requestBody": { - "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPwdUserRequest" + "$ref": "#/components/schemas/UserEntity" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ResetPwdUserRequest" + "$ref": "#/components/schemas/UserEntity" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ResetPwdUserRequest" + "$ref": "#/components/schemas/UserEntity" } } } @@ -72474,56 +71616,203 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ResetPwdResponseHttpJsonResultData" + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "integer", + "format": "int32" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPwdResponseHttpJsonResultData" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ResetPwdResponseHttpJsonResultData" - } - } - } - } - } - } - }, - "/api/tenantUser/setStatus": { - "post": { - "tags": [ - "tenantUser" - ], - "summary": "设置用户状态", - "operationId": "TenantUserSetStatusPost", - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserRequest" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UserRequest" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UserRequest" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "integer", + "format": "int32" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "integer", + "format": "int32" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } + } + } + } + }, + "/api/user/changePwd": { + "post": { + "tags": [ + "user" + ], + "summary": "修改用户密码", + "operationId": "UserChangePwdPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangePwdRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ChangePwdRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ChangePwdRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { "schema": { "required": [ "code", @@ -72690,29 +71979,29 @@ } } }, - "/api/tenantUser/update": { + "/api/user/delete": { "post": { "tags": [ - "tenantUser" + "user" ], - "summary": "更新用户", - "operationId": "TenantUserUpdatePost", + "summary": "删除用户", + "operationId": "UserDeletePost", "requestBody": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateUserRequest" + "$ref": "#/components/schemas/DeleteUserRequest" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UpdateUserRequest" + "$ref": "#/components/schemas/DeleteUserRequest" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UpdateUserRequest" + "$ref": "#/components/schemas/DeleteUserRequest" } } } @@ -72724,33 +72013,232 @@ } } }, - "/swagger/checkUrl": { + "/api/user/grantRole": { "post": { "tags": [ - "systemAuth" + "user" + ], + "summary": "授权用户角色", + "operationId": "UserGrantRolePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserRoleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/user/ownRoleList/{userId}": { + "get": { + "tags": [ + "user" + ], + "summary": "获取用户拥有角色集合", + "operationId": "UserOwnRoleListGet", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } ], - "summary": "Swagger登录检查", - "operationId": "SwaggerCheckUrlPost", "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { - "type": "integer", - "format": "int32" + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } } }, "application/json": { "schema": { - "type": "integer", - "format": "int32" + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } } }, "text/json": { "schema": { - "type": "integer", - "format": "int32" + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } } } } @@ -72758,34 +72246,29 @@ } } }, - "/swagger/submitUrl": { + "/api/user/page": { "post": { "tags": [ - "systemAuth" + "user" ], - "summary": "Swagger登录提交", - "operationId": "SwaggerSubmitUrlPost", + "summary": "获取用户分页列表", + "operationId": "UserPagePost", "requestBody": { + "description": "", "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "UserName": { - "type": "string" - }, - "Password": { - "type": "string" - } - } - }, - "encoding": { - "UserName": { - "style": "form" - }, - "Password": { - "style": "form" - } + "$ref": "#/components/schemas/PageUserRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PageUserRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/PageUserRequest" } } } @@ -72796,1101 +72279,1016 @@ "content": { "text/plain": { "schema": { - "type": "integer", - "format": "int32" + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/UserResponseSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } } }, "application/json": { "schema": { - "type": "integer", - "format": "int32" + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/UserResponseSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } } }, "text/json": { "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "AbnormalKind": { - "enum": [ - 1, - 2, - 3 - ], - "type": "integer", - "description": "异常 Ticket 检索类别(Admin 侧自有检索枚举,vault 无此概念;change C341 §3 A0)。\n\n定义在 Application.Platform(非 Core.Enum),不触碰 EnumContractTests SHA-256 契约锁。", - "format": "int32", - "x-enum-varnames": [ - "LongWaiting", - "RepeatedCancel", - "Orphan" - ], - "x-enum-descriptions": [ - "LongWaiting", - "RepeatedCancel", - "Orphan" - ] - }, - "AccountTypeEnum": { - "enum": [ - 666, - 777, - 888, - 999 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Member", - "NormalUser", - "SystemAdmin", - "SuperAdmin" - ], - "x-enum-descriptions": [ - "会员", - "普通账号", - "系统管理员", - "超级管理员" - ] - }, - "AddChannelDefinitionRequest": { - "required": [ - "Code", - "Name" - ], - "type": "object", - "properties": { - "Description": { - "type": "string", - "nullable": true - }, - "CreatedName": { - "type": "string", - "nullable": true - }, - "UpdatedName": { - "type": "string", - "nullable": true - }, - "Name": { - "minLength": 1, - "type": "string" - }, - "IsDefault": { - "type": "boolean" - }, - "Code": { - "maxLength": 256, - "minLength": 1, - "type": "string", - "description": "渠道编码" - }, - "Scope": { - "$ref": "#/components/schemas/ChannelScopeEnum" - }, - "PlatformCode": { - "maxLength": 256, - "type": "string", - "description": "适用平台编码", - "nullable": true - }, - "ChannelType": { - "$ref": "#/components/schemas/ChannelTypeEnum" - }, - "IsSystemLocked": { - "type": "boolean", - "description": "系统渠道是否锁定" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "$ref": "#/components/schemas/UserResponseSqlSugarPagedList" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } } - }, - "additionalProperties": false, - "description": "渠道增加输入参数" - }, - "AddConfigRequest": { - "required": [ - "Id" + } + } + }, + "/api/user/resetPwd": { + "post": { + "tags": [ + "user" ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - }, - "CreatedId": { - "type": "string", - "description": "创建人Id", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "maxLength": 512, - "type": "string", - "description": "创建人姓名", - "nullable": true - }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true - }, - "UpdatedId": { - "type": "string", - "description": "更新人Id", - "nullable": true - }, - "UpdatedName": { - "maxLength": 512, - "type": "string", - "description": "更新人姓名", - "nullable": true - }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", - "nullable": true - }, - "DeleteTime": { - "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true - }, - "DeletedId": { - "type": "string", - "description": "删除人Id", - "nullable": true - }, - "DeletedName": { - "maxLength": 512, - "type": "string", - "description": "删除人姓名", - "nullable": true - }, - "RowVersion": { - "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true - }, - "Name": { - "type": "string", - "nullable": true - }, - "Code": { - "type": "string", - "nullable": true - }, - "Value": { - "type": "string", - "nullable": true - }, - "SysFlag": { - "$ref": "#/components/schemas/YesNoEnum" - }, - "GroupCode": { - "type": "string", - "nullable": true - }, - "OrderNo": { - "type": "integer", - "format": "int32" - }, - "Remark": { - "type": "string", - "nullable": true + "summary": "重置用户密码", + "operationId": "UserResetPwdPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPwdUserRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPwdUserRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ResetPwdUserRequest" + } + } } }, - "additionalProperties": false - }, - "AddDictionaryDataRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - }, - "CreatedId": { - "type": "string", - "description": "创建人Id", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "maxLength": 512, - "type": "string", - "description": "创建人姓名", - "nullable": true - }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true - }, - "UpdatedId": { - "type": "string", - "description": "更新人Id", - "nullable": true - }, - "UpdatedName": { - "maxLength": 512, - "type": "string", - "description": "更新人姓名", - "nullable": true - }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", - "nullable": true - }, - "DeleteTime": { - "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true - }, - "DeletedId": { - "type": "string", - "description": "删除人Id", - "nullable": true - }, - "DeletedName": { - "maxLength": 512, - "type": "string", - "description": "删除人姓名", - "nullable": true - }, - "RowVersion": { - "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true - }, - "DictionaryTypeId": { - "type": "string" - }, - "DictionaryType": { - "$ref": "#/components/schemas/GlobalDictionaryTypeEntity" - }, - "Value": { - "type": "string", - "nullable": true - }, - "Code": { - "type": "string", - "nullable": true - }, - "TagType": { - "type": "string", - "nullable": true - }, - "StyleSetting": { - "type": "string", - "nullable": true - }, - "ClassSetting": { - "type": "string", - "nullable": true - }, - "OrderNo": { - "type": "integer", - "format": "int32" - }, - "Remark": { - "type": "string", - "nullable": true - }, - "ExtData": { - "type": "string", - "nullable": true + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ResetPwdResponseHttpJsonResultData" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPwdResponseHttpJsonResultData" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ResetPwdResponseHttpJsonResultData" + } + } + } } - }, - "additionalProperties": false - }, - "AddDictionaryTypeRequest": { - "required": [ - "Id" + } + } + }, + "/api/user/setStatus": { + "post": { + "tags": [ + "user" ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - }, - "CreatedId": { - "type": "string", - "description": "创建人Id", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "maxLength": 512, - "type": "string", - "description": "创建人姓名", - "nullable": true - }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true - }, - "UpdatedId": { - "type": "string", - "description": "更新人Id", - "nullable": true - }, - "UpdatedName": { - "maxLength": 512, - "type": "string", - "description": "更新人姓名", - "nullable": true - }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", - "nullable": true - }, - "DeleteTime": { - "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true - }, - "DeletedId": { - "type": "string", - "description": "删除人Id", - "nullable": true - }, - "DeletedName": { - "maxLength": 512, - "type": "string", - "description": "删除人姓名", - "nullable": true - }, - "RowVersion": { - "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true - }, - "Name": { - "type": "string", - "nullable": true - }, - "Code": { - "type": "string", - "nullable": true - }, - "OrderNo": { - "type": "integer", - "format": "int32" - }, - "Remark": { - "type": "string", - "nullable": true - }, - "Children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GlobalDictionaryDataEntity" + "summary": "设置用户状态", + "operationId": "UserSetStatusPost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRequest" + } }, - "nullable": true + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserRequest" + } + } } }, - "additionalProperties": false - }, - "AddGameAppAssetPackageRequest": { - "required": [ - "Description", - "Id", - "Name" - ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - }, - "Name": { - "minLength": 1, - "type": "string", - "description": "名称" - }, - "Description": { - "minLength": 1, - "type": "string", - "description": "详细描述" + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "integer", + "format": "int32" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "integer", + "format": "int32" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + }, + "text/json": { + "schema": { + "required": [ + "code", + "message", + "data", + "trackId", + "errorCode", + "type", + "time", + "extras" + ], + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表)", + "format": "int32" + }, + "message": { + "type": "string", + "description": "错误或提示信息" + }, + "data": { + "type": "integer", + "format": "int32" + }, + "trackId": { + "type": "string", + "description": "链路追踪标识,未启用追踪时为 null", + "nullable": true + }, + "errorCode": { + "type": "string", + "description": "已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段", + "nullable": true + }, + "type": { + "type": "string", + "description": "响应类型(success/warning/error)", + "nullable": true + }, + "time": { + "type": "integer", + "description": "Unix 时间戳(秒)", + "format": "int64" + }, + "extras": { + "type": "object", + "nullable": true + } + } + } + } + } } - }, - "additionalProperties": false, - "description": "资源包增加输入参数" - }, - "AddGameAppAssetPackageVersionHistoryRequest": { - "required": [ - "Id", - "OldVersion", - "ResourceVersion", - "VersionId" + } + } + }, + "/api/user/update": { + "post": { + "tags": [ + "user" ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - }, - "VersionId": { - "type": "string", - "description": "资源包版本Id" - }, - "OldVersion": { - "minLength": 1, - "type": "string", - "description": "旧资源版本" - }, - "ResourceVersion": { - "minLength": 1, - "type": "string", - "description": "新资源版本" + "summary": "更新用户", + "operationId": "UserUpdatePost", + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserRequest" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserRequest" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserRequest" + } + } } }, - "additionalProperties": false, - "description": "资源包版本记录增加输入参数" - }, - "AddGameAppAssetPackageVersionRequest": { - "required": [ - "AppVersion", - "AssetPackageName", - "Channel", - "Description", - "DeviceGroupId", - "Id", - "Language", - "Package", - "Platform", - "ResourceVersion", - "RootPath" + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/swagger/checkUrl": { + "post": { + "tags": [ + "systemAuth" ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - }, - "Channel": { - "minLength": 1, - "type": "string", - "description": "渠道名称" - }, - "Platform": { - "minLength": 1, - "type": "string", - "description": "平台" - }, - "AppVersion": { - "minLength": 1, - "type": "string", - "description": "游戏版本" - }, - "Package": { - "minLength": 1, - "type": "string", - "description": "包名" - }, - "Language": { - "minLength": 1, - "type": "string", - "description": "语言" - }, - "AssetPackageName": { - "minLength": 1, - "type": "string", - "description": "资源包名称" - }, - "RootPath": { - "minLength": 1, - "type": "string", - "description": "资源下载根路径" - }, - "ResourceVersion": { - "minLength": 1, - "type": "string", - "description": "资源版本" - }, - "Description": { - "minLength": 1, - "type": "string", - "description": "详细描述" - }, - "DeviceGroupId": { - "type": "string", - "description": "机器码不能为空" + "summary": "Swagger登录检查", + "operationId": "SwaggerCheckUrlPost", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } } - }, - "additionalProperties": false, - "description": "资源包版本增加输入参数" - }, - "AddGameAppFeatureSwitchRequest": { - "type": "object", - "properties": { - "SwitchKey": { - "type": "string", - "description": "开关键(相同投放维度组合内唯一)", - "nullable": true - }, - "DisplayName": { - "type": "string", - "description": "显示名称", - "nullable": true - }, - "Description": { - "type": "string", - "description": "详细描述", - "nullable": true - }, - "Audience": { - "type": "string", - "description": "消费方标记:client / server / both", - "nullable": true - }, - "ValueJson": { - "type": "string", - "description": "开关参数 JSON 原文(下发侧自行解析,服务端只校验其为合法 JSON)", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "生效开始时间(Unix 秒,UTC);null 表示该端不限", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "生效结束时间(Unix 秒,UTC);null 表示该端不限,区间左闭右开", - "format": "int64", - "nullable": true - }, - "Platform": { - "type": "string", - "description": "平台作用域;空 / default 表示不限", - "nullable": true - }, - "Package": { - "type": "string", - "description": "包名作用域;空 / default 表示不限", - "nullable": true - }, - "Language": { - "type": "string", - "description": "语言作用域;空 / default 表示不限", - "nullable": true - }, - "Channel": { - "type": "string", - "description": "渠道作用域;空 / default 表示不限", - "nullable": true - }, - "Priority": { - "type": "integer", - "description": "投放优先级。同一开关键下作用域评分相同时数值越大越优先", - "format": "int32" - }, - "RolloutPercent": { - "type": "integer", - "description": "灰度比例 0-100", - "format": "int32" - }, - "DeviceWhitelistJson": { - "type": "string", - "description": "设备白名单 JSON 数组;命中白名单的设备绕过灰度比例", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "启停标记;false 时投放解析不下发该行", - "nullable": true + } + } + }, + "/swagger/submitUrl": { + "post": { + "tags": [ + "systemAuth" + ], + "summary": "Swagger登录提交", + "operationId": "SwaggerSubmitUrlPost", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "UserName": { + "type": "string" + }, + "Password": { + "type": "string" + } + } + }, + "encoding": { + "UserName": { + "style": "form" + }, + "Password": { + "style": "form" + } + } + } } }, - "additionalProperties": false, - "description": "活动/功能开关管理增加输入参数" + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + }, + "text/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AbnormalKind": { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "description": "异常 Ticket 检索类别(Admin 侧自有检索枚举,vault 无此概念;change C341 §3 A0)。\n\n定义在 Application.Platform(非 Core.Enum),不触碰 EnumContractTests SHA-256 契约锁。", + "format": "int32", + "x-enum-varnames": [ + "LongWaiting", + "RepeatedCancel", + "Orphan" + ], + "x-enum-descriptions": [ + "LongWaiting", + "RepeatedCancel", + "Orphan" + ] }, - "AddGameAppPackageRequest": { + "AccountTypeEnum": { + "enum": [ + 666, + 777, + 888, + 999 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Member", + "NormalUser", + "SystemAdmin", + "SuperAdmin" + ], + "x-enum-descriptions": [ + "会员", + "普通账号", + "系统管理员", + "超级管理员" + ] + }, + "AddAdvertisementCallbackConfigRequest": { "required": [ - "Name", - "PackageName", - "PlatformCode" + "ConfigJson", + "Provider" ], "type": "object", "properties": { - "Name": { - "minLength": 1, - "type": "string", - "description": "分包名称" - }, - "PackageName": { - "minLength": 1, - "type": "string", - "description": "包名" - }, - "PlatformCode": { + "Provider": { "minLength": 1, "type": "string", - "description": "平台编码快照" + "description": "广告平台 Provider。当前首批配置支持 `TopOn`、`GoogleAdMob`、`Pangle`、`UnityAds`。" }, - "PlatformName": { + "CallbackUrl": { "type": "string", - "description": "平台名称快照", + "description": "广告平台后台配置的回调 URL。", "nullable": true }, - "ChannelId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "渠道Id" - }, - "ChannelName": { + "SigningSecret": { "type": "string", - "description": "渠道名称快照", + "description": "签名密钥或共享密钥。TopOn 对应 sec_key,Pangle 对应 security key,Unity Ads 对应 secret。", "nullable": true }, - "ParentPackageId": { + "VerificationKeys": { "type": "string", - "description": "母包Id", + "description": "验签公钥或验证材料。Google AdMob 可记录 key_id=base64key。", "nullable": true }, - "PackageKind": { - "$ref": "#/components/schemas/PackageKindEnum" - }, - "PlatformInheritanceMode": { - "$ref": "#/components/schemas/InheritanceModeEnum" + "ConfigJson": { + "minLength": 1, + "type": "string", + "description": "广告回调动态配置 JSON。字段由 Provider schema 决定。" }, - "PackageVersion": { + "ParameterPurposeJson": { "type": "string", - "description": "版本号", + "description": "参数作用说明 JSON。", "nullable": true }, - "IsDefault": { + "IsEnabled": { "type": "boolean", - "description": "是否默认分包" + "description": "是否启用。" }, "Remark": { "type": "string", - "description": "备注", + "description": "备注。", "nullable": true } }, "additionalProperties": false, - "description": "游戏应用分包新增输入参数" + "description": "租户广告回调配置新增输入参数" }, - "AddGameAppReleaseVersionRequest": { + "AddChannelDefinitionRequest": { "required": [ - "Announcement", - "AppVersion", - "Channel", - "DownloadUrl", - "IsForce", - "Language", - "OldVersion", - "Package", - "Platform", - "Title" + "Code", + "Name" ], "type": "object", "properties": { "Description": { "type": "string", - "description": "Description", "nullable": true }, "CreatedName": { "type": "string", - "description": "CreatedName", "nullable": true }, "UpdatedName": { "type": "string", - "description": "UpdatedName", "nullable": true }, - "Channel": { - "minLength": 1, - "type": "string", - "description": "Channel" - }, - "Title": { - "minLength": 1, - "type": "string", - "description": "公告标题" - }, - "Announcement": { + "Name": { "minLength": 1, - "type": "string", - "description": "Announcement" + "type": "string" }, - "OldVersion": { - "minLength": 1, - "type": "string", - "description": "OldVersion" + "IsDefault": { + "type": "boolean" }, - "DownloadUrl": { + "Code": { + "maxLength": 256, "minLength": 1, "type": "string", - "description": "DownloadUrl" + "description": "渠道编码" }, - "IsForce": { - "type": "boolean", - "description": "IsForce" + "Scope": { + "$ref": "#/components/schemas/ChannelScopeEnum" }, - "Platform": { - "minLength": 1, + "PlatformCode": { + "maxLength": 256, "type": "string", - "description": "Platform" + "description": "适用平台编码", + "nullable": true }, - "AppVersion": { - "minLength": 1, - "type": "string", - "description": "AppVersion" + "ChannelType": { + "$ref": "#/components/schemas/ChannelTypeEnum" }, - "Package": { - "minLength": 1, - "type": "string", - "description": "Package" + "IsSystemLocked": { + "type": "boolean", + "description": "系统渠道是否锁定" }, - "Language": { - "minLength": 1, - "type": "string", - "description": "Language" + "IsEnabled": { + "type": "boolean", + "description": "是否启用", + "nullable": true } }, "additionalProperties": false, - "description": "游戏版本管理增加输入参数" + "description": "渠道增加输入参数" }, - "AddGameAppRemoteConfigKeyRequest": { - "required": [ - "DisplayName", - "KeyName", - "ValueType" - ], + "AddClientApiPolicyRequest": { "type": "object", "properties": { - "ValueType": { - "minLength": 1, + "SignatureRequired": { + "type": "boolean", + "description": "是否要求请求签名。" + }, + "DeviceProofRequired": { + "type": "boolean", + "description": "是否要求设备证明。" + }, + "RiskPolicy": { "type": "string", - "description": "值类型:string、bool、long" + "description": "风险策略生效模式。", + "nullable": true }, - "Description": { + "SigningKey": { "type": "string", - "description": "描述", + "description": "访问令牌签名密钥。留空(null / 空白)时服务端自动生成 64-hex;该密钥纯服务端内部使用,不回显。", "nullable": true }, - "SortOrder": { + "LifetimeMinutes": { "type": "integer", - "description": "排序序号", + "description": "访问令牌有效期(分钟)。", "format": "int32" }, - "IsEnabled": { + "TicketExpireTime": { + "type": "integer", + "description": "票据固定到期时间(Unix 秒);0 表示永不过期,非 0 值必须晚于当前时间且不超过 30 天。", + "format": "int64" + }, + "EnableKeyAutoCreate": { "type": "boolean", - "description": "是否启用", - "nullable": true + "description": "是否允许首次签发时自动创建租户应用级 RSA key。" }, - "KeyName": { - "minLength": 1, - "type": "string", - "description": "JSON key 名称" + "EnableReturnHttpManager": { + "type": "boolean", + "description": "区服列表是否返回 HttpManagerUrl。" }, - "DisplayName": { - "minLength": 1, + "EnableSandBoxRecharge": { + "type": "boolean", + "description": "订单是否启用沙箱直发(测试充值)。" + }, + "Remark": { "type": "string", - "description": "显示名称" + "description": "备注。", + "nullable": true } }, "additionalProperties": false, - "description": "远程配置内容键定义增加输入参数" + "description": "租户 Client API 运行策略新增输入参数" }, - "AddGameAppRemoteConfigModeRequest": { + "AddConfigRequest": { "required": [ - "DisplayName", - "ModeCode" + "Id" ], "type": "object", "properties": { - "Description": { + "Id": { "type": "string", - "description": "描述", + "description": "主键Id" + }, + "CreatedId": { + "type": "string", + "description": "创建人Id", "nullable": true }, - "SortOrder": { + "CreatedTime": { "type": "integer", - "description": "排序序号", - "format": "int32" + "description": "创建时间", + "format": "int64" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", + "CreatedName": { + "maxLength": 512, + "type": "string", + "description": "创建人姓名", "nullable": true }, - "ModeCode": { - "minLength": 1, - "type": "string", - "description": "模式编码" + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true }, - "DisplayName": { - "minLength": 1, - "type": "string", - "description": "显示名称" - } - }, - "additionalProperties": false, - "description": "远程配置模式定义增加输入参数" - }, - "AddGameAppRemoteConfigRequest": { - "type": "object", - "properties": { - "Channel": { - "type": "string", - "description": "Channel", + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", "nullable": true }, - "Content": { + "UpdatedId": { "type": "string", - "description": "Content", + "description": "更新人Id", "nullable": true }, - "AotCodeList": { + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "AotCodeList", + "description": "更新人姓名", "nullable": true }, - "CheckResourceUrl": { - "type": "string", - "description": "CheckResourceUrl", + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", "nullable": true }, - "CheckAppVersionUrl": { - "type": "string", - "description": "CheckAppVersionUrl", + "DeleteTime": { + "type": "integer", + "description": "删除时间", + "format": "int64", "nullable": true }, - "Platform": { + "DeletedId": { "type": "string", - "description": "Platform", + "description": "删除人Id", "nullable": true }, - "AppVersion": { + "DeletedName": { + "maxLength": 512, "type": "string", - "description": "AppVersion", + "description": "删除人姓名", "nullable": true }, - "Package": { + "RowVersion": { "type": "string", - "description": "Package", + "description": "行版本号(用于乐观锁)", "nullable": true }, - "Language": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true + }, + "Name": { "type": "string", - "description": "Language", "nullable": true }, - "ModeContents": { + "Code": { "type": "string", - "description": "模式内容映射 JSON", "nullable": true }, - "ActiveModeCode": { + "Value": { "type": "string", - "description": "当前激活模式编码", "nullable": true }, - "Priority": { - "type": "integer", - "description": "投放优先级。同一请求命中多条远程配置记录时,数值越大越优先。", - "format": "int32" + "SysFlag": { + "$ref": "#/components/schemas/YesNoEnum" }, - "RolloutPercent": { + "GroupCode": { + "type": "string", + "nullable": true + }, + "OrderNo": { "type": "integer", - "description": "灰度比例 0-100。未命中设备白名单时,按稳定设备标识取模判断是否命中。", "format": "int32" }, - "DeviceWhitelistJson": { + "Remark": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AddDeviceGroupRequest": { + "type": "object", + "properties": { + "Name": { "type": "string", - "description": "设备白名单 JSON 数组。命中白名单的设备绕过灰度比例,直接命中该记录。", "nullable": true }, "Description": { "type": "string", - "description": "Description", "nullable": true }, "CreatedName": { "type": "string", - "description": "CreatedName", "nullable": true }, "UpdatedName": { "type": "string", - "description": "UpdatedName", + "nullable": true + }, + "DeviceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "机器码列表(必须与本分组同应用,跨应用设备由服务拒绝)", "nullable": true } }, "additionalProperties": false, - "description": "远程配置管理增加输入参数" + "description": "机器码分组增加输入参数" }, - "AddGameAppServerConfigRequest": { + "AddDictionaryDataRequest": { + "required": [ + "Id" + ], "type": "object", "properties": { - "Key": { + "Id": { "type": "string", - "description": "配置键(主库唯一)", + "description": "主键Id" + }, + "CreatedId": { + "type": "string", + "description": "创建人Id", "nullable": true }, - "Config": { + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" + }, + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "配置内容 JSON 原文(服务端保存时归一化重写)", + "description": "创建人姓名", "nullable": true }, - "Md5": { + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true + }, + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true + }, + "UpdatedId": { "type": "string", - "description": "内容版本号。服务端保存时强制重算,前端传入值一律被忽略;\n暴露为可写属性仅为复用通用 CRUD 的请求到实体映射,非契约输入", + "description": "更新人Id", "nullable": true }, - "Enabled": { + "UpdatedName": { + "maxLength": 512, + "type": "string", + "description": "更新人姓名", + "nullable": true + }, + "IsDeleted": { "type": "boolean", - "description": "键级启停:false 时登录 Config 不下发该键(客户端删除本地该键保持空态)" + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "nullable": true }, - "Description": { + "DeleteTime": { + "type": "integer", + "description": "删除时间", + "format": "int64", + "nullable": true + }, + "DeletedId": { "type": "string", - "description": "详细描述", + "description": "删除人Id", "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏运营配置管理增加输入参数" - }, - "AddGameAppVersionDefinitionRequest": { - "required": [ - "Name" - ], - "type": "object", - "properties": { - "Description": { + }, + "DeletedName": { + "maxLength": 512, + "type": "string", + "description": "删除人姓名", + "nullable": true + }, + "RowVersion": { + "type": "string", + "description": "行版本号(用于乐观锁)", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true + }, + "DictionaryTypeId": { + "type": "string" + }, + "DictionaryType": { + "$ref": "#/components/schemas/GlobalDictionaryTypeEntity" + }, + "Value": { "type": "string", "nullable": true }, - "CreatedName": { + "Code": { "type": "string", "nullable": true }, - "UpdatedName": { + "TagType": { "type": "string", "nullable": true }, - "Name": { - "minLength": 1, - "type": "string", - "description": "名称" - } - }, - "additionalProperties": false, - "description": "版本管理增加输入参数" - }, - "AddGamePaymentConfigRequest": { - "required": [ - "ConfigJson", - "PayChannel" - ], - "type": "object", - "properties": { - "PackageId": { + "StyleSetting": { "type": "string", - "description": "分包ID。空表示默认配置。", "nullable": true }, - "PayChannel": { - "minLength": 1, + "ClassSetting": { "type": "string", - "description": "支付渠道" + "nullable": true }, - "IsSandbox": { - "type": "boolean", - "description": "是否沙盒配置" + "OrderNo": { + "type": "integer", + "format": "int32" }, - "ConfigJson": { - "minLength": 1, + "Remark": { "type": "string", - "description": "支付配置JSON" + "nullable": true }, - "Remark": { + "ExtData": { "type": "string", - "description": "备注", "nullable": true } }, - "additionalProperties": false, - "description": "游戏支付配置新增输入参数" + "additionalProperties": false }, - "AddJobDetailRequest": { + "AddDictionaryTypeRequest": { "required": [ - "Id", - "JobId" + "Id" ], "type": "object", "properties": { @@ -73969,259 +73367,220 @@ "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "GroupName": { - "type": "string", - "nullable": true - }, - "JobType": { - "type": "string", - "nullable": true - }, - "AssemblyName": { - "type": "string", - "nullable": true - }, - "Description": { + "Name": { "type": "string", "nullable": true }, - "Concurrent": { - "type": "boolean" - }, - "IncludeAnnotations": { - "type": "boolean" - }, - "Properties": { + "Code": { "type": "string", "nullable": true }, - "UpdatedTime": { + "OrderNo": { "type": "integer", - "format": "int64", - "nullable": true - }, - "CreateType": { - "$ref": "#/components/schemas/JobCreateTypeEnum" + "format": "int32" }, - "ScriptCode": { + "Remark": { "type": "string", "nullable": true }, - "JobId": { - "minLength": 2, - "type": "string", - "description": "作业Id" + "Children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GlobalDictionaryDataEntity" + }, + "nullable": true } }, "additionalProperties": false }, - "AddJobTriggerRequest": { + "AddGameAdvertisementRewardEntityRequest": { + "type": "object", + "additionalProperties": false, + "description": "广告奖励发放账本新增输入参数。仅满足 GenericCrudService 的 TAddRequest 泛型约束;\nAddAsync 端点已由 OnAddingAsync 抛错关闭(账本由广告回调链路产生,不支持管理后台直接创建)。" + }, + "AddGameAnnouncementEntityRequest": { "required": [ - "JobId", - "TriggerId" + "Content", + "EndTime", + "IsActive", + "Priority", + "StartTime", + "Title" ], "type": "object", "properties": { - "Id": { - "type": "string", - "description": "主键Id(新增为 0,编辑由前端回填)" - }, - "RowVersion": { + "Language": { "type": "string", - "description": "乐观锁版本号", "nullable": true }, - "TriggerId": { - "minLength": 2, - "type": "string", - "description": "触发器Id" - }, - "JobId": { - "minLength": 2, - "type": "string", - "description": "作业Id" - }, - "TriggerType": { + "AreaId": { "type": "string", - "description": "触发器类型FullName", "nullable": true }, - "AssemblyName": { - "type": "string", - "description": "程序集名称", - "nullable": true + "Title": { + "minLength": 1, + "type": "string" }, - "Args": { + "TitleLocalizationKey": { "type": "string", - "description": "参数", "nullable": true }, - "Description": { + "Content": { + "minLength": 1, + "type": "string" + }, + "ContentLocalizationKey": { "type": "string", - "description": "描述信息", "nullable": true }, "StartTime": { "type": "integer", - "description": "起始时间", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", - "nullable": true - }, - "MaxNumberOfRuns": { - "type": "integer", - "description": "最大触发次数(0:不限制,n:N次)", "format": "int64" }, - "MaxNumberOfErrors": { + "EndTime": { "type": "integer", - "description": "最大出错次数(0:不限制,n:N次)", "format": "int64" }, - "NumRetries": { - "type": "integer", - "description": "重试次数", - "format": "int32" - }, - "RetryTimeout": { + "Priority": { "type": "integer", - "description": "重试间隔时间(ms)", "format": "int32" }, - "StartNow": { - "type": "boolean", - "description": "是否立即启动" - }, - "RunOnStart": { - "type": "boolean", - "description": "是否启动时执行一次" - }, - "ResetOnlyOnce": { - "type": "boolean", - "description": "是否在启动时重置最大触发次数等于一次的作业" + "IsActive": { + "type": "boolean" } }, "additionalProperties": false, - "description": "新增/编辑作业触发器输入参数。\n显式声明前端表单可填字段,不再继承 GameFrameX.Entity.System.SystemJobTriggerEntity,避免运行时状态(Status、NumberOfRuns、NumberOfErrors、LastRunTime、NextRunTime、UpdatedTime、AssemblyName)被前端批量赋值。" + "description": "游戏公告增加输入参数" }, - "AddMenuRequest": { + "AddGameAntiCheatEventRequest": { "required": [ - "Title" + "EvidenceSummary", + "IdempotencyKey", + "TargetId" ], "type": "object", "properties": { - "Id": { - "type": "string", - "description": "主键Id(新增为 0,编辑由前端回填)" + "Provider": { + "$ref": "#/components/schemas/AntiCheatProviderEnum" }, - "RowVersion": { + "ProviderName": { "type": "string", - "description": "乐观锁版本号", + "description": "Provider 名称。Provider=Custom 时必填;其它可空。", "nullable": true }, - "Pid": { + "ProviderEventId": { "type": "string", - "description": "父Id" + "description": "Provider 侧事件/交易 Id。可空。", + "nullable": true }, - "Type": { - "$ref": "#/components/schemas/MenuTypeEnum" + "TargetType": { + "$ref": "#/components/schemas/AntiCheatTargetTypeEnum" }, - "Key": { + "TargetId": { + "minLength": 1, "type": "string", - "description": "业务键(按钮类型用于唯一性校验;管理端新增可为空)", - "nullable": true + "description": "指向对象标识。" }, - "Title": { + "RiskLevel": { + "$ref": "#/components/schemas/RiskLevelEnum" + }, + "EvidenceSummary": { "minLength": 1, "type": "string", - "description": "菜单名称" + "description": "证据摘要(脱敏后的 Provider 原文摘要)。" }, - "TitleCode": { - "type": "string", - "description": "菜单名称国际化Key", - "nullable": true + "SuggestedAction": { + "$ref": "#/components/schemas/AntiCheatSuggestedActionEnum" }, - "Name": { + "SuggestedActionNote": { "type": "string", - "description": "路由名称", + "description": "建议补充说明。可空。", "nullable": true }, - "Path": { - "type": "string", - "description": "路由地址", - "nullable": true + "OccurredTime": { + "type": "integer", + "description": "事件发生时间(Provider 上报)。", + "format": "int64" }, - "Component": { + "IdempotencyKey": { + "minLength": 1, "type": "string", - "description": "组件路径", - "nullable": true - }, - "Redirect": { + "description": "幂等键。建议组成:{Provider}:{ProviderEventId}:{TargetType}:{TargetId}:{OccurredTime:O}。" + } + }, + "additionalProperties": false, + "description": "反作弊事件上报输入(SubmitAsync 接入)。不含复核相关字段——上报一律落 Pending,复核由 ReviewAsync 动作单独驱动。" + }, + "AddGameAppAssetPackageRequest": { + "required": [ + "Description", + "Id", + "Name" + ], + "type": "object", + "properties": { + "Id": { "type": "string", - "description": "重定向", - "nullable": true + "description": "主键Id" }, - "Permission": { + "Name": { + "minLength": 1, "type": "string", - "description": "权限标识", - "nullable": true + "description": "名称" }, - "Icon": { + "Description": { + "minLength": 1, "type": "string", - "description": "图标", - "nullable": true - }, - "OutLink": { + "description": "详细描述" + } + }, + "additionalProperties": false, + "description": "资源包增加输入参数" + }, + "AddGameAppAssetPackageVersionHistoryRequest": { + "required": [ + "Id", + "OldVersion", + "ResourceVersion", + "VersionId" + ], + "type": "object", + "properties": { + "Id": { "type": "string", - "description": "外链链接", - "nullable": true - }, - "OrderNo": { - "type": "integer", - "description": "排序", - "format": "int32" - }, - "IsHide": { - "type": "boolean", - "description": "是否隐藏" - }, - "IsKeepAlive": { - "type": "boolean", - "description": "是否缓存" - }, - "IsAffix": { - "type": "boolean", - "description": "是否固定" + "description": "主键Id" }, - "IsIframe": { - "type": "boolean", - "description": "是否内嵌" + "VersionId": { + "type": "string", + "description": "资源包版本Id" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "OldVersion": { + "minLength": 1, + "type": "string", + "description": "旧资源版本" }, - "Remark": { + "ResourceVersion": { + "minLength": 1, "type": "string", - "description": "备注", - "nullable": true + "description": "新资源版本" } }, "additionalProperties": false, - "description": "新增/编辑菜单输入参数。\n显式声明前端表单可填字段,不再继承 GameFrameX.Entity.Global.GlobalMenuEntity,避免种子安全元数据(SuperAdminOnly、AllowTenantWhenSuperAdminOnly、Key)与子节点导航属性被前端批量赋值。" + "description": "资源包版本记录增加输入参数" }, - "AddOpenAccessRequest": { + "AddGameAppAssetPackageVersionRequest": { "required": [ - "AccessKey", - "AccessSecret", - "BindUserId", - "Id" + "AppVersion", + "AssetPackageName", + "Channel", + "Description", + "DeviceGroupId", + "Id", + "Language", + "Package", + "Platform", + "ResourceVersion", + "RootPath" ], "type": "object", "properties": { @@ -74229,569 +73588,579 @@ "type": "string", "description": "主键Id" }, - "CreatedId": { + "Channel": { + "minLength": 1, "type": "string", - "description": "创建人Id", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" + "description": "渠道名称" }, - "CreatedName": { - "maxLength": 512, + "Platform": { + "minLength": 1, "type": "string", - "description": "创建人姓名", - "nullable": true - }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true + "description": "平台" }, - "UpdatedId": { + "AppVersion": { + "minLength": 1, "type": "string", - "description": "更新人Id", - "nullable": true + "description": "游戏版本" }, - "UpdatedName": { - "maxLength": 512, + "Package": { + "minLength": 1, "type": "string", - "description": "更新人姓名", - "nullable": true - }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", - "nullable": true - }, - "DeleteTime": { - "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true + "description": "包名" }, - "DeletedId": { + "Language": { + "minLength": 1, "type": "string", - "description": "删除人Id", - "nullable": true + "description": "语言" }, - "DeletedName": { - "maxLength": 512, + "AssetPackageName": { + "minLength": 1, "type": "string", - "description": "删除人姓名", - "nullable": true + "description": "资源包名称" }, - "RowVersion": { + "RootPath": { + "minLength": 1, "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true + "description": "资源下载根路径" }, - "AccessKey": { + "ResourceVersion": { "minLength": 1, "type": "string", - "description": "身份标识" + "description": "资源版本" }, - "AccessSecret": { + "Description": { "minLength": 1, "type": "string", - "description": "密钥" + "description": "详细描述" }, - "BindUserId": { + "DeviceGroupId": { "type": "string", - "description": "绑定用户Id" + "description": "机器码不能为空" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "资源包版本增加输入参数" }, - "AddRoleRequest": { + "AddGameAppDeviceRequest": { "required": [ - "Id", + "DeviceUniqueIdentifier", "Name" ], "type": "object", "properties": { - "Id": { + "Description": { "type": "string", - "description": "主键Id" + "nullable": true }, - "CreatedId": { + "CreatedName": { "type": "string", - "description": "创建人Id", "nullable": true }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "maxLength": 512, + "UpdatedName": { "type": "string", - "description": "创建人姓名", "nullable": true }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" + }, + "DeviceUniqueIdentifier": { + "minLength": 1, + "type": "string", + "description": "设备唯一标识" + } + }, + "additionalProperties": false, + "description": "机器码增加输入参数" + }, + "AddGameAppFeatureSwitchRequest": { + "type": "object", + "properties": { + "SwitchKey": { + "type": "string", + "description": "开关键(相同投放维度组合内唯一)", "nullable": true }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", + "DisplayName": { + "type": "string", + "description": "显示名称", "nullable": true }, - "UpdatedId": { + "Description": { "type": "string", - "description": "更新人Id", + "description": "详细描述", "nullable": true }, - "UpdatedName": { - "maxLength": 512, + "Audience": { "type": "string", - "description": "更新人姓名", + "description": "消费方标记:client / server / both", "nullable": true }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "ValueJson": { + "type": "string", + "description": "开关参数 JSON 原文(下发侧自行解析,服务端只校验其为合法 JSON)", "nullable": true }, - "DeleteTime": { + "StartTime": { "type": "integer", - "description": "删除时间", + "description": "生效开始时间(Unix 秒,UTC);null 表示该端不限", "format": "int64", "nullable": true }, - "DeletedId": { - "type": "string", - "description": "删除人Id", + "EndTime": { + "type": "integer", + "description": "生效结束时间(Unix 秒,UTC);null 表示该端不限,区间左闭右开", + "format": "int64", "nullable": true }, - "DeletedName": { - "maxLength": 512, + "Platform": { "type": "string", - "description": "删除人姓名", + "description": "平台作用域;空 / default 表示不限", "nullable": true }, - "RowVersion": { + "Package": { "type": "string", - "description": "行版本号(用于乐观锁)", + "description": "包名作用域;空 / default 表示不限", "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "Language": { + "type": "string", + "description": "语言作用域;空 / default 表示不限", "nullable": true }, - "Code": { + "Channel": { "type": "string", + "description": "渠道作用域;空 / default 表示不限", "nullable": true }, - "OrderNo": { + "Priority": { "type": "integer", + "description": "投放优先级。同一开关键下作用域评分相同时数值越大越优先", "format": "int32" }, - "DataScope": { - "$ref": "#/components/schemas/DataScopeEnum" + "RolloutPercent": { + "type": "integer", + "description": "灰度比例 0-100", + "format": "int32" }, - "Remark": { + "DeviceWhitelistJson": { "type": "string", + "description": "设备白名单 JSON 数组;命中白名单的设备绕过灰度比例", "nullable": true }, - "Name": { - "minLength": 1, - "type": "string", - "description": "名称" - }, - "MenuIdList": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "菜单Id集合", + "IsEnabled": { + "type": "boolean", + "description": "启停标记;false 时投放解析不下发该行", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "活动/功能开关管理增加输入参数" }, - "AddSystemEmailProviderRequest": { + "AddGameAppOpenAccessRequest": { "required": [ - "DefaultFromEmail", - "Provider" + "Purpose", + "Scenario", + "ScopesJson", + "SubjectName" ], "type": "object", "properties": { - "Purpose": { - "type": "integer", - "description": "平台系统邮件用途(`SystemEmailPurpose`)。0 表示默认系统邮件配置。", - "format": "int32" - }, - "Provider": { - "minLength": 1, + "BindUserId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "Provider 类型。当前支持 `TencentCloudSes` 和 `Smtp`。" + "description": "绑定的系统用户 Id。" }, - "Host": { + "Scenario": { + "maxLength": 256, + "minLength": 0, "type": "string", - "description": "SMTP 主机(Provider=Smtp 时必填)。", - "nullable": true - }, - "Port": { - "type": "integer", - "description": "SMTP 端口(Provider=Smtp 时必填)。", - "format": "int32", - "nullable": true - }, - "EnableSsl": { - "type": "boolean", - "description": "SMTP 启用 SSL。", - "nullable": true - }, - "UseDefaultCredentials": { - "type": "boolean", - "description": "SMTP 使用默认凭据。", - "nullable": true + "description": "责任场景编码。" }, - "UserName": { + "Purpose": { + "maxLength": 512, + "minLength": 0, "type": "string", - "description": "SMTP 用户名(敏感字段)。", - "nullable": true + "description": "使用目的。" }, - "Password": { + "SubjectName": { + "maxLength": 256, + "minLength": 0, "type": "string", - "description": "SMTP 密码(敏感字段)。", - "nullable": true + "description": "责任主体。" }, - "Region": { + "ScopesJson": { + "maxLength": 1024, + "minLength": 0, "type": "string", - "description": "Provider 区域。", - "nullable": true + "description": "接口范围(允许调用的路由前缀集合,JSON 数组字符串)。至少包含一个 scope,例如 [\"package-report\"]。" }, - "SecretId": { - "type": "string", - "description": "腾讯云 SecretId(敏感字段)。", + "ExpiresTime": { + "type": "integer", + "description": "过期时间,Unix 秒;为空表示不过期。", + "format": "int64", "nullable": true + } + }, + "additionalProperties": false, + "description": "新增应用开放访问凭证输入。AccessSecret 由服务端生成,仅签发响应中返回一次。" + }, + "AddGameAppPackageRequest": { + "required": [ + "Name", + "PackageName", + "PlatformCode" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string", + "description": "分包名称" }, - "SecretKey": { + "PackageName": { + "minLength": 1, "type": "string", - "description": "腾讯云 SecretKey(敏感字段)。", - "nullable": true + "description": "包名" }, - "DefaultFromEmail": { + "PlatformCode": { "minLength": 1, "type": "string", - "description": "默认发件人邮箱。" + "description": "平台编码快照" }, - "DefaultFromName": { + "PlatformName": { "type": "string", - "description": "默认发件人显示名。", + "description": "平台名称快照", "nullable": true }, - "DefaultToEmail": { + "ChannelId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "默认收件人邮箱。", - "nullable": true + "description": "渠道Id" }, - "TemplateId": { + "ChannelName": { "type": "string", - "description": "腾讯云 SES 模板 ID。Provider=TencentCloudSes 时必填。", + "description": "渠道名称快照", "nullable": true }, - "TemplateDataJson": { + "ParentPackageId": { "type": "string", - "description": "腾讯云 SES 模板变量 JSON。", + "description": "母包Id", "nullable": true }, - "Priority": { - "type": "integer", - "description": "配置选择优先级(数值越大越优先)。仅用于配置选择,不代表邮件投递队列优先级。", - "format": "int32" + "PackageKind": { + "$ref": "#/components/schemas/PackageKindEnum" }, - "IsEnabled": { + "PlatformInheritanceMode": { + "$ref": "#/components/schemas/InheritanceModeEnum" + }, + "PackageVersion": { + "type": "string", + "description": "版本号", + "nullable": true + }, + "IsDefault": { "type": "boolean", - "description": "是否启用。禁用配置不参与系统邮件选择和测试发送。" + "description": "是否默认分包" }, "Remark": { "type": "string", - "description": "备注。", + "description": "备注", "nullable": true } }, "additionalProperties": false, - "description": "平台系统邮件 Provider 配置新增输入参数。" + "description": "游戏应用分包新增输入参数" }, - "AddTenantAdvertisementCallbackConfigRequest": { + "AddGameAppReleaseVersionRequest": { "required": [ - "ConfigJson", - "Provider" + "Announcement", + "AppVersion", + "Channel", + "DownloadUrl", + "IsForce", + "Language", + "OldVersion", + "Package", + "Platform", + "Title" ], "type": "object", "properties": { - "Provider": { - "minLength": 1, + "Description": { "type": "string", - "description": "广告平台 Provider。当前首批配置支持 `TopOn`、`GoogleAdMob`、`Pangle`、`UnityAds`。" + "description": "Description", + "nullable": true }, - "CallbackUrl": { + "CreatedName": { "type": "string", - "description": "广告平台后台配置的回调 URL。", + "description": "CreatedName", "nullable": true }, - "SigningSecret": { + "UpdatedName": { "type": "string", - "description": "签名密钥或共享密钥。TopOn 对应 sec_key,Pangle 对应 security key,Unity Ads 对应 secret。", + "description": "UpdatedName", "nullable": true }, - "VerificationKeys": { + "Channel": { + "minLength": 1, "type": "string", - "description": "验签公钥或验证材料。Google AdMob 可记录 key_id=base64key。", - "nullable": true + "description": "Channel" }, - "ConfigJson": { + "Title": { "minLength": 1, "type": "string", - "description": "广告回调动态配置 JSON。字段由 Provider schema 决定。" + "description": "公告标题" }, - "ParameterPurposeJson": { + "Announcement": { + "minLength": 1, "type": "string", - "description": "参数作用说明 JSON。", - "nullable": true + "description": "Announcement" }, - "IsEnabled": { + "OldVersion": { + "minLength": 1, + "type": "string", + "description": "OldVersion" + }, + "DownloadUrl": { + "minLength": 1, + "type": "string", + "description": "DownloadUrl" + }, + "IsForce": { "type": "boolean", - "description": "是否启用。" + "description": "IsForce" }, - "Remark": { + "Platform": { + "minLength": 1, "type": "string", - "description": "备注。", - "nullable": true + "description": "Platform" + }, + "AppVersion": { + "minLength": 1, + "type": "string", + "description": "AppVersion" + }, + "Package": { + "minLength": 1, + "type": "string", + "description": "Package" + }, + "Language": { + "minLength": 1, + "type": "string", + "description": "Language" } }, "additionalProperties": false, - "description": "租户广告回调配置新增输入参数" + "description": "游戏版本管理增加输入参数" }, - "AddTenantClientApiPolicyRequest": { + "AddGameAppRemoteConfigKeyRequest": { + "required": [ + "DisplayName", + "KeyName", + "ValueType" + ], "type": "object", "properties": { - "SignatureRequired": { - "type": "boolean", - "description": "是否要求请求签名。" + "ValueType": { + "minLength": 1, + "type": "string", + "description": "值类型:string、bool、long" }, - "DeviceProofRequired": { + "Description": { + "type": "string", + "description": "描述", + "nullable": true + }, + "SortOrder": { + "type": "integer", + "description": "排序序号", + "format": "int32" + }, + "IsEnabled": { "type": "boolean", - "description": "是否要求设备证明。" + "description": "是否启用", + "nullable": true }, - "RiskPolicy": { + "KeyName": { + "minLength": 1, "type": "string", - "description": "风险策略生效模式。", - "nullable": true + "description": "JSON key 名称" }, - "SigningKey": { + "DisplayName": { + "minLength": 1, "type": "string", - "description": "访问令牌签名密钥。留空(null / 空白)时服务端自动生成 64-hex;该密钥纯服务端内部使用,不回显。", + "description": "显示名称" + } + }, + "additionalProperties": false, + "description": "远程配置内容键定义增加输入参数" + }, + "AddGameAppRemoteConfigModeRequest": { + "required": [ + "DisplayName", + "ModeCode" + ], + "type": "object", + "properties": { + "Description": { + "type": "string", + "description": "描述", "nullable": true }, - "LifetimeMinutes": { + "SortOrder": { "type": "integer", - "description": "访问令牌有效期(分钟)。", + "description": "排序序号", "format": "int32" }, - "TicketExpireTime": { - "type": "integer", - "description": "票据固定到期时间(Unix 秒);0 表示永不过期,非 0 值必须晚于当前时间且不超过 30 天。", - "format": "int64" - }, - "EnableKeyAutoCreate": { - "type": "boolean", - "description": "是否允许首次签发时自动创建租户应用级 RSA key。" - }, - "EnableReturnHttpManager": { + "IsEnabled": { "type": "boolean", - "description": "区服列表是否返回 HttpManagerUrl。" + "description": "是否启用", + "nullable": true }, - "EnableSandBoxRecharge": { - "type": "boolean", - "description": "订单是否启用沙箱直发(测试充值)。" + "ModeCode": { + "minLength": 1, + "type": "string", + "description": "模式编码" }, - "Remark": { + "DisplayName": { + "minLength": 1, "type": "string", - "description": "备注。", - "nullable": true + "description": "显示名称" } }, "additionalProperties": false, - "description": "租户 Client API 运行策略新增输入参数" + "description": "远程配置模式定义增加输入参数" }, - "AddTenantDeviceGroupRequest": { + "AddGameAppRemoteConfigRequest": { "type": "object", "properties": { - "Name": { + "Channel": { "type": "string", + "description": "Channel", "nullable": true }, - "Description": { + "Content": { "type": "string", + "description": "Content", "nullable": true }, - "CreatedName": { + "AotCodeList": { "type": "string", + "description": "AotCodeList", "nullable": true }, - "UpdatedName": { + "CheckResourceUrl": { "type": "string", + "description": "CheckResourceUrl", "nullable": true }, - "DeviceIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "机器码列表(必须与本分组同应用,跨应用设备由服务拒绝)", - "nullable": true - } - }, - "additionalProperties": false, - "description": "机器码分组增加输入参数" - }, - "AddTenantGameAdvertisementRewardEntityRequest": { - "type": "object", - "additionalProperties": false, - "description": "广告奖励发放账本新增输入参数。仅满足 GenericCrudService 的 TAddRequest 泛型约束;\nAddAsync 端点已由 OnAddingAsync 抛错关闭(账本由广告回调链路产生,不支持管理后台直接创建)。" - }, - "AddTenantGameAnnouncementEntityRequest": { - "required": [ - "Content", - "EndTime", - "IsActive", - "Priority", - "StartTime", - "Title" - ], - "type": "object", - "properties": { - "Language": { + "CheckAppVersionUrl": { "type": "string", + "description": "CheckAppVersionUrl", "nullable": true }, - "AreaId": { + "Platform": { "type": "string", + "description": "Platform", "nullable": true }, - "Title": { - "minLength": 1, - "type": "string" + "AppVersion": { + "type": "string", + "description": "AppVersion", + "nullable": true }, - "TitleLocalizationKey": { + "Package": { "type": "string", + "description": "Package", "nullable": true }, - "Content": { - "minLength": 1, - "type": "string" + "Language": { + "type": "string", + "description": "Language", + "nullable": true }, - "ContentLocalizationKey": { + "ModeContents": { "type": "string", + "description": "模式内容映射 JSON", "nullable": true }, - "StartTime": { - "type": "integer", - "format": "int64" + "ActiveModeCode": { + "type": "string", + "description": "当前激活模式编码", + "nullable": true }, - "EndTime": { + "Priority": { "type": "integer", - "format": "int64" + "description": "投放优先级。同一请求命中多条远程配置记录时,数值越大越优先。", + "format": "int32" }, - "Priority": { + "RolloutPercent": { "type": "integer", + "description": "灰度比例 0-100。未命中设备白名单时,按稳定设备标识取模判断是否命中。", "format": "int32" }, - "IsActive": { - "type": "boolean" + "DeviceWhitelistJson": { + "type": "string", + "description": "设备白名单 JSON 数组。命中白名单的设备绕过灰度比例,直接命中该记录。", + "nullable": true + }, + "Description": { + "type": "string", + "description": "Description", + "nullable": true + }, + "CreatedName": { + "type": "string", + "description": "CreatedName", + "nullable": true + }, + "UpdatedName": { + "type": "string", + "description": "UpdatedName", + "nullable": true } }, "additionalProperties": false, - "description": "游戏公告增加输入参数" + "description": "远程配置管理增加输入参数" }, - "AddTenantGameAntiCheatEventRequest": { - "required": [ - "EvidenceSummary", - "IdempotencyKey", - "TargetId" - ], + "AddGameAppServerConfigRequest": { "type": "object", "properties": { - "Provider": { - "$ref": "#/components/schemas/AntiCheatProviderEnum" - }, - "ProviderName": { + "Key": { "type": "string", - "description": "Provider 名称。Provider=Custom 时必填;其它可空。", + "description": "配置键(主库唯一)", "nullable": true }, - "ProviderEventId": { + "Config": { "type": "string", - "description": "Provider 侧事件/交易 Id。可空。", + "description": "配置内容 JSON 原文(服务端保存时归一化重写)", "nullable": true }, - "TargetType": { - "$ref": "#/components/schemas/AntiCheatTargetTypeEnum" - }, - "TargetId": { - "minLength": 1, - "type": "string", - "description": "指向对象标识。" - }, - "RiskLevel": { - "$ref": "#/components/schemas/RiskLevelEnum" - }, - "EvidenceSummary": { - "minLength": 1, - "type": "string", - "description": "证据摘要(脱敏后的 Provider 原文摘要)。" - }, - "SuggestedAction": { - "$ref": "#/components/schemas/AntiCheatSuggestedActionEnum" - }, - "SuggestedActionNote": { + "Md5": { "type": "string", - "description": "建议补充说明。可空。", + "description": "内容版本号。服务端保存时强制重算,前端传入值一律被忽略;\n暴露为可写属性仅为复用通用 CRUD 的请求到实体映射,非契约输入", "nullable": true }, - "OccurredTime": { - "type": "integer", - "description": "事件发生时间(Provider 上报)。", - "format": "int64" + "Enabled": { + "type": "boolean", + "description": "键级启停:false 时登录 Config 不下发该键(客户端删除本地该键保持空态)" }, - "IdempotencyKey": { - "minLength": 1, + "Description": { "type": "string", - "description": "幂等键。建议组成:{Provider}:{ProviderEventId}:{TargetType}:{TargetId}:{OccurredTime:O}。" + "description": "详细描述", + "nullable": true } }, "additionalProperties": false, - "description": "反作弊事件上报输入(SubmitAsync 接入)。不含复核相关字段——上报一律落 Pending,复核由 ReviewAsync 动作单独驱动。" + "description": "游戏运营配置管理增加输入参数" }, - "AddTenantGameAppDeviceRequest": { + "AddGameAppVersionDefinitionRequest": { "required": [ - "DeviceUniqueIdentifier", "Name" ], "type": "object", @@ -74812,66 +74181,12 @@ "minLength": 1, "type": "string", "description": "名称" - }, - "DeviceUniqueIdentifier": { - "minLength": 1, - "type": "string", - "description": "设备唯一标识" - } - }, - "additionalProperties": false, - "description": "机器码增加输入参数" - }, - "AddTenantGameAppOpenAccessRequest": { - "required": [ - "Purpose", - "Scenario", - "ScopesJson", - "SubjectName" - ], - "type": "object", - "properties": { - "BindUserId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "绑定的系统用户 Id。" - }, - "Scenario": { - "maxLength": 256, - "minLength": 0, - "type": "string", - "description": "责任场景编码。" - }, - "Purpose": { - "maxLength": 512, - "minLength": 0, - "type": "string", - "description": "使用目的。" - }, - "SubjectName": { - "maxLength": 256, - "minLength": 0, - "type": "string", - "description": "责任主体。" - }, - "ScopesJson": { - "maxLength": 1024, - "minLength": 0, - "type": "string", - "description": "接口范围(允许调用的路由前缀集合,JSON 数组字符串)。至少包含一个 scope,例如 [\"package-report\"]。" - }, - "ExpiresTime": { - "type": "integer", - "description": "过期时间,Unix 秒;为空表示不过期。", - "format": "int64", - "nullable": true } }, "additionalProperties": false, - "description": "新增应用开放访问凭证输入。AccessSecret 由服务端生成,仅签发响应中返回一次。" + "description": "版本管理增加输入参数" }, - "AddTenantGameAreaClassifyEntityRequest": { + "AddGameAreaClassifyEntityRequest": { "required": [ "Description", "Name" @@ -74937,7 +74252,7 @@ "additionalProperties": false, "description": "游戏大区分类增加输入参数" }, - "AddTenantGameAreaEntityRequest": { + "AddGameAreaEntityRequest": { "required": [ "Capacity", "ClassifyId", @@ -75063,60 +74378,517 @@ "description": "特定服务器举行的事件或活动信息", "nullable": true }, - "AccessControls": { + "AccessControls": { + "type": "string", + "description": "访问权限设置,控制哪些玩家可以访问服务器", + "nullable": true + }, + "ServerParams": { + "type": "string", + "description": "运行参数。此前 BaseRequest 缺此声明,Adapt 无来源导致实体 NOT NULL 列恒 23502。", + "nullable": true + }, + "ClientDispatchApiPrefix": { + "type": "string", + "description": "客户端转发 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\nClient API 代理玩家普通请求(建角、改名、查角色、创建订单等)的 Server HTTP 路由前缀,默认 `game/api`。", + "nullable": true + }, + "FulfillmentApiPrefix": { + "type": "string", + "description": "履约投递 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\n后台履约、发货、退款、邮件投递、广告奖励、Campaign 发布、后台运营操作等资产或运营投递的前缀,默认 `game/api`。", + "nullable": true + }, + "GmApiPrefix": { + "type": "string", + "description": "GM 命令 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造 GM URL。", + "nullable": true + }, + "ControlApiPrefix": { + "type": "string", + "description": "管理控制 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造控制 URL。", + "nullable": true + }, + "EnableClientGmApi": { + "type": "boolean", + "description": "是否允许客户端调试 GM 通道(来源 change C150 §3.2 / C175)。仅 Admin 配置标记,最终放行由 Game Server 启动参数与环境门禁决定,默认关闭。" + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用" + } + }, + "additionalProperties": false, + "description": "游戏区服增加输入参数" + }, + "AddGameBannerAnnouncementEntityRequest": { + "required": [ + "AreaId", + "Content", + "EndTime", + "Id", + "Interval", + "IsActive", + "Priority", + "RepeatCount", + "RowVersion", + "StartTime" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "AreaId": { + "type": "string", + "description": "区服ID" + }, + "Content": { + "minLength": 1, + "type": "string", + "description": "内容" + }, + "ContentLocalizationKey": { + "type": "string", + "description": "内容本地化Key。可空:空 = 直接展示 Content(服务端兜底空串,实体列 NOT NULL)。", + "nullable": true + }, + "Priority": { + "type": "integer", + "description": "优先级", + "format": "int32" + }, + "StartTime": { + "type": "integer", + "description": "开始时间", + "format": "int64" + }, + "EndTime": { + "type": "integer", + "description": "结束时间", + "format": "int64" + }, + "Interval": { + "type": "integer", + "description": "间隔时间", + "format": "int32" + }, + "RepeatCount": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "description": "重复次数", + "format": "int32" + }, + "IsActive": { + "type": "boolean", + "description": "是否激活" + } + }, + "additionalProperties": false, + "description": "游戏内横幅公告增加输入参数" + }, + "AddGameCommodityEntityRequest": { + "required": [ + "CategoryId", + "Cost", + "Number", + "Status" + ], + "type": "object", + "properties": { + "Status": { + "minLength": 1, + "type": "string", + "description": "状态" + }, + "CategoryId": { + "type": "string", + "description": "类别Id。引用 GameGoodsCatalogueEntity.Id;Id 后缀契约兼容数字/字符串提交。" + }, + "Cost": { + "type": "boolean", + "description": "多少rmb" + }, + "Number": { + "type": "integer", + "description": "数量", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "游戏商品交易增加输入参数" + }, + "AddGameDockerTagEntityRequest": { + "required": [ + "Description", + "Name" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" + }, + "Description": { + "minLength": 1, + "type": "string", + "description": "详细描述" + }, + "ServerVersion": { + "type": "string", + "description": "tag", + "nullable": true + } + }, + "additionalProperties": false, + "description": "游戏Docker标签增加输入参数" + }, + "AddGameGoodsCatalogueEntityRequest": { + "required": [ + "Description", + "Name" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" + }, + "Description": { + "minLength": 1, + "type": "string", + "description": "详细描述" + } + }, + "additionalProperties": false, + "description": "游戏道具分类增加输入参数" + }, + "AddGameGoodsEntityRequest": { + "required": [ + "ClassifyId", + "ConfigId", + "Description", + "Name" + ], + "type": "object", + "properties": { + "ConfigId": { + "type": "integer", + "description": "配置ID", + "format": "int32" + }, + "ClassifyId": { + "type": "string", + "description": "类别id" + }, + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" + }, + "Description": { + "minLength": 1, + "type": "string", + "description": "详细描述" + } + }, + "additionalProperties": false, + "description": "游戏资源增加输入参数" + }, + "AddGameMailCampaignEntityRequest": { + "required": [ + "AreaId", + "Id", + "Name", + "RowVersion", + "TitlesJson" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "AreaId": { + "type": "string", + "description": "区服Id。用于解析目标游戏服 HttpManageUrl 调用 Server 发布接口。" + }, + "Name": { + "minLength": 1, + "type": "string", + "description": "Campaign 名称(Admin 侧识别用)。" + }, + "TemplateId": { + "type": "string", + "description": "模板 Id(0 = 无模板,裸文案发布)。" + }, + "MailType": { + "$ref": "#/components/schemas/MailCampaignMailType" + }, + "TitlesJson": { + "minLength": 1, + "type": "string", + "description": "多语言标题 JSON(ListAsync)。" + }, + "ContentsJson": { + "type": "string", + "description": "多语言正文 JSON(ListAsync)。", + "nullable": true + }, + "SenderNamesJson": { + "type": "string", + "description": "多语言发件人名称 JSON(ListAsync)。", + "nullable": true + }, + "AttachmentsJson": { + "type": "string", + "description": "附件列表 JSON(ListAsync)。", + "nullable": true + }, + "ServerIdsJson": { + "type": "string", + "description": "服务器 Id 白名单 JSON(ListAsync)。", + "nullable": true + }, + "ChannelIdsJson": { + "type": "string", + "description": "渠道 Id 白名单 JSON(ListAsync)。", + "nullable": true + }, + "MinLevel": { + "type": "integer", + "description": "最低等级(含),0 表示不限。", + "format": "int32" + }, + "MaxLevel": { + "type": "integer", + "description": "最高等级(含),0 表示不限。", + "format": "int32" + }, + "ExpireAttachmentPolicy": { + "$ref": "#/components/schemas/MailCampaignExpirePolicy" + }, + "ExpireTime": { + "type": "integer", + "description": "过期时间(Unix 秒,UTC),0 表示永不过期。", + "format": "int64" + }, + "Remark": { + "type": "string", + "description": "备注。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "新增 Campaign 输入。" + }, + "AddGameMailEntityRequest": { + "required": [ + "AreaId", + "AttachmentsJson", + "Body", + "ExpirationTime", + "Id", + "IsAllPost", + "MailType", + "PlayerIdListJson", + "RowVersion", + "SubTitle", + "Title" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "Title": { + "minLength": 1, + "type": "string", + "description": "标题" + }, + "SubTitle": { + "minLength": 1, + "type": "string", + "description": "副标题" + }, + "Body": { + "minLength": 1, + "type": "string", + "description": "详细内容" + }, + "PlayerIdListJson": { + "minLength": 1, + "type": "string", + "description": "玩家ID列表" + }, + "IsAllPost": { + "type": "boolean", + "description": "是否发全部用户" + }, + "IsTranslate": { + "type": "boolean", + "description": "是否本地化" + }, + "AreaId": { + "minLength": 1, + "type": "string", + "description": "区服ID。此前仅 AddRequest 声明:update 提交的 areaId 被绑定丢弃,Adapt 后实体 0 值穿透\nIgnoreColumns(忽略 null) 不拦 0,导致编辑一次就把区服/类型/过期时间清零。" + }, + "AttachmentsJson": { + "minLength": 1, + "type": "string", + "description": "附件列表" + }, + "ExpirationTime": { + "type": "integer", + "description": "邮件的过期日期", + "format": "int64" + }, + "MailType": { + "$ref": "#/components/schemas/GameMailType" + } + }, + "additionalProperties": false, + "description": "游戏邮件增加输入参数" + }, + "AddGameMailTemplateCategoryEntityRequest": { + "required": [ + "Id", + "Name" + ], + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "主键Id" + }, + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" + }, + "Description": { + "type": "string", + "description": "详细描述", + "nullable": true + }, + "Icon": { + "type": "string", + "description": "图标", + "nullable": true + }, + "Sort": { + "type": "integer", + "description": "排序", + "format": "int32" + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true + } + }, + "additionalProperties": false, + "description": "邮件模板分类增加输入参数" + }, + "AddGameMailTemplateEntityRequest": { + "required": [ + "BodyTemplate", + "CategoryId", + "Id", + "Name", + "TitleTemplate" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" + }, + "Description": { + "type": "string", + "description": "详细描述", + "nullable": true + }, + "CategoryId": { "type": "string", - "description": "访问权限设置,控制哪些玩家可以访问服务器", - "nullable": true + "description": "分类Id" }, - "ServerParams": { + "TitleTemplate": { + "minLength": 1, "type": "string", - "description": "运行参数。此前 BaseRequest 缺此声明,Adapt 无来源导致实体 NOT NULL 列恒 23502。", - "nullable": true + "description": "标题模板" }, - "ClientDispatchApiPrefix": { + "SubTitleTemplate": { "type": "string", - "description": "客户端转发 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\nClient API 代理玩家普通请求(建角、改名、查角色、创建订单等)的 Server HTTP 路由前缀,默认 `game/api`。", + "description": "副标题模板", "nullable": true }, - "FulfillmentApiPrefix": { + "BodyTemplate": { + "minLength": 1, "type": "string", - "description": "履约投递 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\n后台履约、发货、退款、邮件投递、广告奖励、Campaign 发布、后台运营操作等资产或运营投递的前缀,默认 `game/api`。", - "nullable": true + "description": "内容模板" }, - "GmApiPrefix": { + "DefaultAttachmentsJson": { "type": "string", - "description": "GM 命令 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造 GM URL。", + "description": "默认附件JSON", "nullable": true }, - "ControlApiPrefix": { - "type": "string", - "description": "管理控制 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造控制 URL。", + "DefaultMailType": { + "$ref": "#/components/schemas/GameMailType" + }, + "DefaultExpirationDays": { + "type": "integer", + "description": "默认过期天数", + "format": "int32", "nullable": true }, - "EnableClientGmApi": { - "type": "boolean", - "description": "是否允许客户端调试 GM 通道(来源 change C150 §3.2 / C175)。仅 Admin 配置标记,最终放行由 Game Server 启动参数与环境门禁决定,默认关闭。" + "Sort": { + "type": "integer", + "description": "排序", + "format": "int32" }, "IsEnabled": { "type": "boolean", - "description": "是否启用" + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true + }, + "Id": { + "type": "string", + "description": "主键Id" } }, "additionalProperties": false, - "description": "游戏区服增加输入参数" + "description": "邮件模板增加输入参数" }, - "AddTenantGameBannerAnnouncementEntityRequest": { + "AddGameOnlinePlayerSegmentRequest": { "required": [ - "AreaId", - "Content", - "EndTime", "Id", - "Interval", - "IsActive", - "Priority", - "RepeatCount", - "RowVersion", - "StartTime" + "Name", + "RowVersion" ], "type": "object", "properties": { @@ -75130,150 +74902,162 @@ "minimum": 0, "type": "string" }, - "AreaId": { - "type": "string", - "description": "区服ID" - }, - "Content": { + "Name": { "minLength": 1, "type": "string", - "description": "内容" + "description": "分群名称。" }, - "ContentLocalizationKey": { + "Description": { "type": "string", - "description": "内容本地化Key。可空:空 = 直接展示 Content(服务端兜底空串,实体列 NOT NULL)。", + "description": "分群描述。", "nullable": true }, - "Priority": { - "type": "integer", - "description": "优先级", - "format": "int32" - }, - "StartTime": { - "type": "integer", - "description": "开始时间", - "format": "int64" - }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64" - }, - "Interval": { - "type": "integer", - "description": "间隔时间", - "format": "int32" - }, - "RepeatCount": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "description": "重复次数", - "format": "int32" - }, - "IsActive": { - "type": "boolean", - "description": "是否激活" + "ConditionsJson": { + "type": "string", + "description": "分群条件 JSON(List;空 = 不限条件)。", + "nullable": true } }, "additionalProperties": false, - "description": "游戏内横幅公告增加输入参数" + "description": "新增玩家分群输入。" }, - "AddTenantGameCommodityEntityRequest": { + "AddGameOrderEntityRequest": { "required": [ - "CategoryId", - "Cost", - "Number", - "Status" + "Id" ], "type": "object", "properties": { - "Status": { - "minLength": 1, + "Id": { "type": "string", - "description": "状态" + "description": "主键Id" + } + }, + "additionalProperties": false, + "description": "游戏支付订单增加输入参数" + }, + "AddGamePaymentConfigRequest": { + "required": [ + "ConfigJson", + "PayChannel" + ], + "type": "object", + "properties": { + "PackageId": { + "type": "string", + "description": "分包ID。空表示默认配置。", + "nullable": true }, - "CategoryId": { + "PayChannel": { + "minLength": 1, "type": "string", - "description": "类别Id。引用 TenantGameGoodsCatalogueEntity.Id;Id 后缀契约兼容数字/字符串提交。" + "description": "支付渠道" }, - "Cost": { + "IsSandbox": { "type": "boolean", - "description": "多少rmb" + "description": "是否沙盒配置" }, - "Number": { - "type": "integer", - "description": "数量", - "format": "int64" + "ConfigJson": { + "minLength": 1, + "type": "string", + "description": "支付配置JSON" + }, + "Remark": { + "type": "string", + "description": "备注", + "nullable": true } }, "additionalProperties": false, - "description": "游戏商品交易增加输入参数" + "description": "游戏支付配置新增输入参数" }, - "AddTenantGameDockerTagEntityRequest": { + "AddGamePenaltyAppealEntityRequest": { "required": [ - "Description", - "Name" + "AppellantId", + "PenaltyId", + "Reason" ], "type": "object", "properties": { - "Name": { - "minLength": 1, + "PenaltyId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "名称" + "description": "关联处罚 Id(必须为生效中处罚)。" }, - "Description": { - "minLength": 1, + "AppellantId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "详细描述" + "description": "申诉人 = 被处罚账号 UserId。" }, - "ServerVersion": { + "Reason": { + "maxLength": 2048, + "minLength": 1, "type": "string", - "description": "tag", - "nullable": true + "description": "申诉理由。" } }, "additionalProperties": false, - "description": "游戏Docker标签增加输入参数" + "description": "申诉新增输入参数。关联处罚由服务端验证。" }, - "AddTenantGameGoodsCatalogueEntityRequest": { + "AddGamePenaltyEntityRequest": { "required": [ - "Description", - "Name" + "ActionType", + "Reason", + "TargetId", + "TargetType" ], "type": "object", "properties": { - "Name": { + "AreaId": { + "type": "string", + "description": "区服作用域。null = 全区服生效。", + "nullable": true + }, + "TargetType": { + "$ref": "#/components/schemas/PenaltyTargetTypeEnum" + }, + "TargetId": { + "maxLength": 256, "minLength": 1, "type": "string", - "description": "名称" + "description": "对象标识(AccountId / RoleId / 设备标识 / IP)。" }, - "Description": { + "ActionType": { + "$ref": "#/components/schemas/PenaltyActionTypeEnum" + }, + "Reason": { + "maxLength": 2048, "minLength": 1, "type": "string", - "description": "详细描述" + "description": "处罚原因。" + }, + "ExpireTime": { + "type": "integer", + "description": "过期时间。null = 永久。", + "format": "int64", + "nullable": true + }, + "SourceReportId": { + "type": "string", + "description": "来源举报 Id(由举报触发时写)。", + "nullable": true } }, "additionalProperties": false, - "description": "游戏道具分类增加输入参数" + "description": "处罚新增输入参数。审计字段(Status / OperatorId / RevokeAsync*)由服务端强制写入,不在此暴露。" }, - "AddTenantGameGoodsEntityRequest": { + "AddGameRedeemCodeChannelEntityRequest": { "required": [ - "ClassifyId", - "ConfigId", "Description", + "Id", "Name" ], "type": "object", "properties": { - "ConfigId": { - "type": "integer", - "description": "配置ID", - "format": "int32" - }, - "ClassifyId": { + "Id": { "type": "string", - "description": "类别id" + "description": "主键Id" }, "Name": { "minLength": 1, @@ -75284,182 +75068,268 @@ "minLength": 1, "type": "string", "description": "详细描述" + }, + "RoleUsageLimit": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "description": "每角色可用次数(兑换码分组角色限制)。0 = 不限制,1 = 每角色一次,N = 每角色最多 N 次。", + "format": "int32" } }, "additionalProperties": false, - "description": "游戏资源增加输入参数" + "description": "兑换码渠道增加输入参数" }, - "AddTenantGameMailCampaignEntityRequest": { + "AddGameRedeemCodeEntityRequest": { "required": [ "AreaId", + "ChannelId", + "Code", + "Contents", + "Description", + "EndTime", "Id", - "Name", - "RowVersion", - "TitlesJson" + "IsActive", + "StartTime", + "UsageLimit", + "UsedCount" ], "type": "object", "properties": { "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "type": "string", + "description": "主键Id" }, "AreaId": { "type": "string", - "description": "区服Id。用于解析目标游戏服 HttpManageUrl 调用 Server 发布接口。" + "description": "区服ID" }, - "Name": { + "Code": { "minLength": 1, "type": "string", - "description": "Campaign 名称(Admin 侧识别用)。" - }, - "TemplateId": { - "type": "string", - "description": "模板 Id(0 = 无模板,裸文案发布)。" - }, - "MailType": { - "$ref": "#/components/schemas/MailCampaignMailType" + "description": "兑换码" }, - "TitlesJson": { + "Description": { "minLength": 1, "type": "string", - "description": "多语言标题 JSON(ListAsync)。" - }, - "ContentsJson": { - "type": "string", - "description": "多语言正文 JSON(ListAsync)。", - "nullable": true - }, - "SenderNamesJson": { - "type": "string", - "description": "多语言发件人名称 JSON(ListAsync)。", - "nullable": true - }, - "AttachmentsJson": { - "type": "string", - "description": "附件列表 JSON(ListAsync)。", - "nullable": true - }, - "ServerIdsJson": { - "type": "string", - "description": "服务器 Id 白名单 JSON(ListAsync)。", - "nullable": true + "description": "描述" }, - "ChannelIdsJson": { - "type": "string", - "description": "渠道 Id 白名单 JSON(ListAsync)。", - "nullable": true + "IsActive": { + "type": "boolean", + "description": "是否激活" }, - "MinLevel": { + "UsageLimit": { "type": "integer", - "description": "最低等级(含),0 表示不限。", + "description": "可使用次数", "format": "int32" }, - "MaxLevel": { + "UsedCount": { "type": "integer", - "description": "最高等级(含),0 表示不限。", + "description": "已使用次数", "format": "int32" }, - "ExpireAttachmentPolicy": { - "$ref": "#/components/schemas/MailCampaignExpirePolicy" + "StartTime": { + "type": "integer", + "description": "有效开始时间", + "format": "int64" }, - "ExpireTime": { + "EndTime": { "type": "integer", - "description": "过期时间(Unix 秒,UTC),0 表示永不过期。", + "description": "失效时间", "format": "int64" }, - "Remark": { + "Contents": { + "minLength": 1, "type": "string", - "description": "备注。", - "nullable": true + "description": "礼包内容" + }, + "ChannelId": { + "type": "string", + "description": "兑换码渠道ID" } }, "additionalProperties": false, - "description": "新增 Campaign 输入。" + "description": "兑换码增加输入参数" }, - "AddTenantGameMailEntityRequest": { + "AddGameRedeemCodeUseRecordEntityRequest": { "required": [ - "AreaId", - "AttachmentsJson", - "Body", - "ExpirationTime", - "Id", - "IsAllPost", - "MailType", - "PlayerIdListJson", - "RowVersion", - "SubTitle", - "Title" + "Id" ], "type": "object", "properties": { "Id": { + "type": "string", + "description": "主键Id" + } + }, + "additionalProperties": false, + "description": "兑换记录增加输入参数" + }, + "AddGameReportEntityRequest": { + "required": [ + "EvidenceJson", + "ReporterId", + "ReportType", + "TargetId", + "TargetType" + ], + "type": "object", + "properties": { + "ReporterId": { "maximum": 9.223372036854776E+18, "minimum": 1, - "type": "string" + "type": "string", + "description": "举报人 UserId。" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "TargetType": { + "$ref": "#/components/schemas/PenaltyTargetTypeEnum" }, - "Title": { + "TargetId": { + "maxLength": 256, "minLength": 1, "type": "string", - "description": "标题" + "description": "被举报对象标识。" }, - "SubTitle": { - "minLength": 1, + "ReportType": { + "$ref": "#/components/schemas/ReportTypeEnum" + }, + "Scene": { + "maxLength": 512, "type": "string", - "description": "副标题" + "description": "场景描述。", + "nullable": true }, - "Body": { + "EvidenceJson": { + "maxLength": 8192, "minLength": 1, "type": "string", - "description": "详细内容" + "description": "证据 JSON。" + } + }, + "additionalProperties": false, + "description": "举报新增输入参数。Status / HandlerId 服务端强制(Status=Pending,HandlerId=null)。" + }, + "AddGameRewardTemplateEntityRequest": { + "required": [ + "GroupId", + "Name", + "RewardItemsJson" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string", + "description": "名称。" }, - "PlayerIdListJson": { + "Description": { + "type": "string", + "description": "详细描述。", + "nullable": true + }, + "GroupId": { + "type": "string", + "description": "分组Id。" + }, + "RewardItemsJson": { "minLength": 1, "type": "string", - "description": "玩家ID列表" + "description": "奖励明细 JSON。" }, - "IsAllPost": { + "SnapshotSchemaVersion": { + "type": "integer", + "description": "快照结构版本。", + "format": "int32" + }, + "Sort": { + "type": "integer", + "description": "排序。", + "format": "int32" + }, + "IsEnabled": { "type": "boolean", - "description": "是否发全部用户" + "description": "是否启用。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "奖励模板增加输入参数。" + }, + "AddGameRewardTemplateGroupEntityRequest": { + "required": [ + "Name" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, + "type": "string", + "description": "名称。" }, - "IsTranslate": { + "Description": { + "type": "string", + "description": "详细描述。", + "nullable": true + }, + "Sort": { + "type": "integer", + "description": "排序。", + "format": "int32" + }, + "IsEnabled": { "type": "boolean", - "description": "是否本地化" + "description": "是否启用。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "奖励模板分组增加输入参数。" + }, + "AddGameRoleEntityRequest": { + "type": "object", + "properties": { + "RoleId": { + "type": "string", + "description": "角色Id", + "nullable": true + }, + "UserId": { + "type": "string", + "description": "用户ID" }, "AreaId": { - "minLength": 1, "type": "string", - "description": "区服ID。此前仅 AddRequest 声明:update 提交的 areaId 被绑定丢弃,Adapt 后实体 0 值穿透\nIgnoreColumns(忽略 null) 不拦 0,导致编辑一次就把区服/类型/过期时间清零。" + "description": "区服Id" }, - "AttachmentsJson": { - "minLength": 1, + "Name": { "type": "string", - "description": "附件列表" + "description": "名称", + "nullable": true }, - "ExpirationTime": { + "Description": { + "type": "string", + "description": "详细描述", + "nullable": true + }, + "Level": { "type": "integer", - "description": "邮件的过期日期", - "format": "int64" + "description": "角色当前的等级", + "format": "int64", + "nullable": true }, - "MailType": { - "$ref": "#/components/schemas/GameMailType" + "LastLoginTime": { + "type": "integer", + "description": "角色最后一次登录时间", + "format": "int64", + "nullable": true } }, "additionalProperties": false, - "description": "游戏邮件增加输入参数" + "description": "游戏角色增加输入参数" }, - "AddTenantGameMailTemplateCategoryEntityRequest": { + "AddGameTimeJobEntityRequest": { "required": [ + "Cron", "Id", "Name" ], @@ -75472,277 +75342,206 @@ "Name": { "minLength": 1, "type": "string", - "description": "名称" + "description": "名称。此前 AddRequest 缺此声明:表单提交的 name 被绑定丢弃,Adapt 后实体 Name=null,\n实体列 NOT NULL 导致 insert 500(cron 同因,报错先撞上 cron)。" }, "Description": { "type": "string", "description": "详细描述", "nullable": true }, - "Icon": { + "Cron": { + "minLength": 1, "type": "string", - "description": "图标", - "nullable": true - }, - "Sort": { - "type": "integer", - "description": "排序", - "format": "int32" + "description": "Cron 表达式(实体列 NOT NULL)" }, - "IsEnabled": { + "IsOnce": { "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "description": "是否一次性任务" + }, + "Source": { + "type": "string", + "description": "任务来源。系统标记非用户输入:手动新增由服务端固定写 \"Manual\"(实体列 NOT NULL)。", "nullable": true } }, "additionalProperties": false, - "description": "邮件模板分类增加输入参数" + "description": "游戏定时任务增加输入参数" }, - "AddTenantGameMailTemplateEntityRequest": { + "AddGameUserEntityByMailRequest": { "required": [ - "BodyTemplate", - "CategoryId", - "Id", - "Name", - "TitleTemplate" + "Email", + "EmailPassword", + "Status" ], "type": "object", "properties": { - "Name": { - "minLength": 1, + "UserName": { "type": "string", - "description": "名称" + "description": "账号", + "nullable": true }, - "Description": { + "Password": { "type": "string", - "description": "详细描述", + "description": "密码", "nullable": true }, - "CategoryId": { + "Description": { "type": "string", - "description": "分类Id" + "description": "描述", + "nullable": true }, - "TitleTemplate": { - "minLength": 1, + "CreatedName": { "type": "string", - "description": "标题模板" + "description": "创建人", + "nullable": true }, - "SubTitleTemplate": { + "UpdatedName": { "type": "string", - "description": "副标题模板", + "description": "最后更新人", "nullable": true }, - "BodyTemplate": { + "Email": { "minLength": 1, "type": "string", - "description": "内容模板" + "description": "账号" }, - "DefaultAttachmentsJson": { + "EmailPassword": { + "minLength": 1, "type": "string", - "description": "默认附件JSON", - "nullable": true - }, - "DefaultMailType": { - "$ref": "#/components/schemas/GameMailType" - }, - "DefaultExpirationDays": { - "type": "integer", - "description": "默认过期天数", - "format": "int32", - "nullable": true - }, - "Sort": { - "type": "integer", - "description": "排序", - "format": "int32" + "description": "密码" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "Name": { + "type": "string", + "description": "昵称", "nullable": true }, - "Id": { - "type": "string", - "description": "主键Id" + "Status": { + "$ref": "#/components/schemas/GameUserStatus" } }, "additionalProperties": false, - "description": "邮件模板增加输入参数" + "description": "根据邮箱添加账号" }, - "AddTenantGameOnlinePlayerSegmentRequest": { + "AddGameWebShopEntityRequest": { "required": [ - "Id", + "ItemJson", + "Logo", "Name", - "RowVersion" + "Price", + "RealPrice" ], "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - }, "Name": { "minLength": 1, "type": "string", - "description": "分群名称。" + "description": "商品名称" + }, + "Logo": { + "minLength": 1, + "type": "string", + "description": "商品图" }, "Description": { "type": "string", - "description": "分群描述。", + "description": "商品描述", "nullable": true }, - "ConditionsJson": { + "KeyWords": { "type": "string", - "description": "分群条件 JSON(List;空 = 不限条件)。", + "description": "商品关键词", "nullable": true - } - }, - "additionalProperties": false, - "description": "新增玩家分群输入。" - }, - "AddTenantGameOrderEntityRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - } - }, - "additionalProperties": false, - "description": "游戏支付订单增加输入参数" - }, - "AddTenantGamePenaltyAppealEntityRequest": { - "required": [ - "AppellantId", - "PenaltyId", - "Reason" - ], - "type": "object", - "properties": { - "PenaltyId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + }, + "Price": { + "minLength": 1, "type": "string", - "description": "关联处罚 Id(必须为生效中处罚)。" + "description": "零售价" }, - "AppellantId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + "RealPrice": { + "minLength": 1, "type": "string", - "description": "申诉人 = 被处罚账号 UserId。" + "description": "实际价格" }, - "Reason": { - "maxLength": 2048, + "ItemJson": { "minLength": 1, "type": "string", - "description": "申诉理由。" + "description": "道具列表" + }, + "IsUp": { + "type": "boolean", + "description": "是否上架" + }, + "Weight": { + "type": "integer", + "description": "权重", + "format": "int32" } }, "additionalProperties": false, - "description": "申诉新增输入参数。关联处罚由服务端验证。" + "description": "游戏商城实体新增输入参数" }, - "AddTenantGamePenaltyEntityRequest": { + "AddGameWebShopOrderEntityRequest": { "required": [ - "ActionType", - "Reason", - "TargetId", - "TargetType" + "ItemJson", + "Logo", + "Name", + "Price", + "RealPrice" ], "type": "object", "properties": { - "AreaId": { - "type": "string", - "description": "区服作用域。null = 全区服生效。", - "nullable": true - }, - "TargetType": { - "$ref": "#/components/schemas/PenaltyTargetTypeEnum" - }, - "TargetId": { - "maxLength": 256, + "Name": { "minLength": 1, "type": "string", - "description": "对象标识(AccountId / RoleId / 设备标识 / IP)。" - }, - "ActionType": { - "$ref": "#/components/schemas/PenaltyActionTypeEnum" + "description": "商品名称" }, - "Reason": { - "maxLength": 2048, + "Logo": { "minLength": 1, "type": "string", - "description": "处罚原因。" + "description": "商品图" }, - "ExpireTime": { - "type": "integer", - "description": "过期时间。null = 永久。", - "format": "int64", + "Description": { + "type": "string", + "description": "商品描述", "nullable": true }, - "SourceReportId": { + "KeyWords": { "type": "string", - "description": "来源举报 Id(由举报触发时写)。", + "description": "商品关键词", "nullable": true - } - }, - "additionalProperties": false, - "description": "处罚新增输入参数。审计字段(Status / OperatorId / RevokeAsync*)由服务端强制写入,不在此暴露。" - }, - "AddTenantGameRedeemCodeChannelEntityRequest": { - "required": [ - "Description", - "Id", - "Name" - ], - "type": "object", - "properties": { - "Id": { + }, + "Price": { + "minLength": 1, "type": "string", - "description": "主键Id" + "description": "零售价" }, - "Name": { + "RealPrice": { "minLength": 1, "type": "string", - "description": "名称" + "description": "实际价格" }, - "Description": { + "ItemJson": { "minLength": 1, "type": "string", - "description": "详细描述" + "description": "道具列表" }, - "RoleUsageLimit": { - "maximum": 2147483647, - "minimum": 0, + "IsUp": { + "type": "boolean", + "description": "是否上架" + }, + "Weight": { "type": "integer", - "description": "每角色可用次数(兑换码分组角色限制)。0 = 不限制,1 = 每角色一次,N = 每角色最多 N 次。", + "description": "权重", "format": "int32" } }, "additionalProperties": false, - "description": "兑换码渠道增加输入参数" + "description": "游戏商城订单实体新增输入参数" }, - "AddTenantGameRedeemCodeEntityRequest": { + "AddJobDetailRequest": { "required": [ - "AreaId", - "ChannelId", - "Code", - "Contents", - "Description", - "EndTime", "Id", - "IsActive", - "StartTime", - "UsageLimit", - "UsedCount" + "JobId" ], "type": "object", "properties": { @@ -75750,238 +75549,375 @@ "type": "string", "description": "主键Id" }, - "AreaId": { + "CreatedId": { "type": "string", - "description": "区服ID" + "description": "创建人Id", + "nullable": true }, - "Code": { - "minLength": 1, + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" + }, + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "兑换码" + "description": "创建人姓名", + "nullable": true }, - "Description": { - "minLength": 1, + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true + }, + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true + }, + "UpdatedId": { "type": "string", - "description": "描述" + "description": "更新人Id", + "nullable": true }, - "IsActive": { + "UpdatedName": { + "maxLength": 512, + "type": "string", + "description": "更新人姓名", + "nullable": true + }, + "IsDeleted": { "type": "boolean", - "description": "是否激活" + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "nullable": true }, - "UsageLimit": { + "DeleteTime": { "type": "integer", - "description": "可使用次数", - "format": "int32" + "description": "删除时间", + "format": "int64", + "nullable": true }, - "UsedCount": { - "type": "integer", - "description": "已使用次数", - "format": "int32" + "DeletedId": { + "type": "string", + "description": "删除人Id", + "nullable": true }, - "StartTime": { - "type": "integer", - "description": "有效开始时间", - "format": "int64" + "DeletedName": { + "maxLength": 512, + "type": "string", + "description": "删除人姓名", + "nullable": true }, - "EndTime": { + "RowVersion": { + "type": "string", + "description": "行版本号(用于乐观锁)", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true + }, + "GroupName": { + "type": "string", + "nullable": true + }, + "JobType": { + "type": "string", + "nullable": true + }, + "AssemblyName": { + "type": "string", + "nullable": true + }, + "Description": { + "type": "string", + "nullable": true + }, + "Concurrent": { + "type": "boolean" + }, + "IncludeAnnotations": { + "type": "boolean" + }, + "Properties": { + "type": "string", + "nullable": true + }, + "UpdatedTime": { "type": "integer", - "description": "失效时间", - "format": "int64" + "format": "int64", + "nullable": true }, - "Contents": { - "minLength": 1, + "CreateType": { + "$ref": "#/components/schemas/JobCreateTypeEnum" + }, + "ScriptCode": { "type": "string", - "description": "礼包内容" + "nullable": true }, - "ChannelId": { + "JobId": { + "minLength": 2, "type": "string", - "description": "兑换码渠道ID" + "description": "作业Id" } }, - "additionalProperties": false, - "description": "兑换码增加输入参数" + "additionalProperties": false }, - "AddTenantGameRedeemCodeUseRecordEntityRequest": { + "AddJobTriggerRequest": { "required": [ - "Id" + "JobId", + "TriggerId" ], "type": "object", "properties": { "Id": { "type": "string", - "description": "主键Id" - } - }, - "additionalProperties": false, - "description": "兑换记录增加输入参数" - }, - "AddTenantGameReportEntityRequest": { - "required": [ - "EvidenceJson", - "ReporterId", - "ReportType", - "TargetId", - "TargetType" - ], - "type": "object", - "properties": { - "ReporterId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + "description": "主键Id(新增为 0,编辑由前端回填)" + }, + "RowVersion": { "type": "string", - "description": "举报人 UserId。" + "description": "乐观锁版本号", + "nullable": true }, - "TargetType": { - "$ref": "#/components/schemas/PenaltyTargetTypeEnum" + "TriggerId": { + "minLength": 2, + "type": "string", + "description": "触发器Id" }, - "TargetId": { - "maxLength": 256, - "minLength": 1, + "JobId": { + "minLength": 2, "type": "string", - "description": "被举报对象标识。" + "description": "作业Id" }, - "ReportType": { - "$ref": "#/components/schemas/ReportTypeEnum" + "TriggerType": { + "type": "string", + "description": "触发器类型FullName", + "nullable": true }, - "Scene": { - "maxLength": 512, + "AssemblyName": { "type": "string", - "description": "场景描述。", + "description": "程序集名称", "nullable": true }, - "EvidenceJson": { - "maxLength": 8192, - "minLength": 1, + "Args": { "type": "string", - "description": "证据 JSON。" + "description": "参数", + "nullable": true + }, + "Description": { + "type": "string", + "description": "描述信息", + "nullable": true + }, + "StartTime": { + "type": "integer", + "description": "起始时间", + "format": "int64", + "nullable": true + }, + "EndTime": { + "type": "integer", + "description": "结束时间", + "format": "int64", + "nullable": true + }, + "MaxNumberOfRuns": { + "type": "integer", + "description": "最大触发次数(0:不限制,n:N次)", + "format": "int64" + }, + "MaxNumberOfErrors": { + "type": "integer", + "description": "最大出错次数(0:不限制,n:N次)", + "format": "int64" + }, + "NumRetries": { + "type": "integer", + "description": "重试次数", + "format": "int32" + }, + "RetryTimeout": { + "type": "integer", + "description": "重试间隔时间(ms)", + "format": "int32" + }, + "StartNow": { + "type": "boolean", + "description": "是否立即启动" + }, + "RunOnStart": { + "type": "boolean", + "description": "是否启动时执行一次" + }, + "ResetOnlyOnce": { + "type": "boolean", + "description": "是否在启动时重置最大触发次数等于一次的作业" } }, "additionalProperties": false, - "description": "举报新增输入参数。Status / HandlerId 服务端强制(Status=Pending,HandlerId=null)。" + "description": "新增/编辑作业触发器输入参数。\n显式声明前端表单可填字段,不再继承 GameFrameX.Entity.System.SystemJobTriggerEntity,避免运行时状态(Status、NumberOfRuns、NumberOfErrors、LastRunTime、NextRunTime、UpdatedTime、AssemblyName)被前端批量赋值。" }, - "AddTenantGameRewardTemplateEntityRequest": { + "AddMenuRequest": { "required": [ - "GroupId", - "Name", - "RewardItemsJson" + "Title" ], "type": "object", "properties": { - "Name": { - "minLength": 1, + "Id": { "type": "string", - "description": "名称。" + "description": "主键Id(新增为 0,编辑由前端回填)" }, - "Description": { + "RowVersion": { "type": "string", - "description": "详细描述。", + "description": "乐观锁版本号", "nullable": true }, - "GroupId": { + "Pid": { "type": "string", - "description": "分组Id。" + "description": "父Id" }, - "RewardItemsJson": { + "Type": { + "$ref": "#/components/schemas/MenuTypeEnum" + }, + "Key": { + "type": "string", + "description": "业务键(按钮类型用于唯一性校验;管理端新增可为空)", + "nullable": true + }, + "Title": { "minLength": 1, "type": "string", - "description": "奖励明细 JSON。" + "description": "菜单名称" }, - "SnapshotSchemaVersion": { - "type": "integer", - "description": "快照结构版本。", - "format": "int32" + "TitleCode": { + "type": "string", + "description": "菜单名称国际化Key", + "nullable": true }, - "Sort": { - "type": "integer", - "description": "排序。", - "format": "int32" + "Name": { + "type": "string", + "description": "路由名称", + "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。", + "Path": { + "type": "string", + "description": "路由地址", "nullable": true - } - }, - "additionalProperties": false, - "description": "奖励模板增加输入参数。" - }, - "AddTenantGameRewardTemplateGroupEntityRequest": { - "required": [ - "Name" - ], - "type": "object", - "properties": { - "Name": { - "minLength": 1, + }, + "Component": { "type": "string", - "description": "名称。" + "description": "组件路径", + "nullable": true }, - "Description": { + "Redirect": { "type": "string", - "description": "详细描述。", + "description": "重定向", "nullable": true }, - "Sort": { + "Permission": { + "type": "string", + "description": "权限标识", + "nullable": true + }, + "Icon": { + "type": "string", + "description": "图标", + "nullable": true + }, + "OutLink": { + "type": "string", + "description": "外链链接", + "nullable": true + }, + "OrderNo": { "type": "integer", - "description": "排序。", + "description": "排序", "format": "int32" }, + "IsHide": { + "type": "boolean", + "description": "是否隐藏" + }, + "IsKeepAlive": { + "type": "boolean", + "description": "是否缓存" + }, + "IsAffix": { + "type": "boolean", + "description": "是否固定" + }, + "IsIframe": { + "type": "boolean", + "description": "是否内嵌" + }, "IsEnabled": { "type": "boolean", - "description": "是否启用。", + "description": "是否启用", + "nullable": true + }, + "Remark": { + "type": "string", + "description": "备注", "nullable": true } }, "additionalProperties": false, - "description": "奖励模板分组增加输入参数。" + "description": "新增/编辑菜单输入参数。\n显式声明前端表单可填字段,不再继承 GameFrameX.Entity.Global.GlobalMenuEntity,避免种子安全元数据(SuperAdminOnly、AllowAdminWhenSuperAdminOnly、Key)与子节点导航属性被前端批量赋值。" }, - "AddTenantGameRoleEntityRequest": { + "AddObjectStorageConfigRequest": { "type": "object", "properties": { - "RoleId": { + "Provider": { "type": "string", - "description": "角色Id", + "description": "存储提供商名称(local / aliyun / tencent-cos / qiniu)。", "nullable": true }, - "UserId": { + "PathTemplate": { "type": "string", - "description": "用户ID" + "description": "对象键路径模板。", + "nullable": true }, - "AreaId": { - "type": "string", - "description": "区服Id" + "MaxFileSizeBytes": { + "type": "integer", + "description": "单文件最大字节数。", + "format": "int64" }, - "Name": { + "AllowedContentTypesJson": { "type": "string", - "description": "名称", + "description": "允许的内容类型 JSON 数组。", "nullable": true }, - "Description": { + "EnableMd5": { + "type": "boolean", + "description": "是否启用 MD5 去重。" + }, + "ConfigJson": { "type": "string", - "description": "详细描述", + "description": "提供商配置 JSON,敏感字段可用 ****** 表示沿用旧值(更新场景)。", "nullable": true }, - "Level": { - "type": "integer", - "description": "角色当前的等级", - "format": "int64", - "nullable": true + "IsEnabled": { + "type": "boolean", + "description": "是否启用。" }, - "LastLoginTime": { - "type": "integer", - "description": "角色最后一次登录时间", - "format": "int64", + "Remark": { + "type": "string", + "description": "备注。", "nullable": true } }, "additionalProperties": false, - "description": "游戏角色增加输入参数" + "description": "新增租户对象存储配置入参。" }, - "AddTenantGameTimeJobEntityRequest": { + "AddOpenAccessRequest": { "required": [ - "Cron", - "Id", - "Name" + "AccessKey", + "AccessSecret", + "BindUserId", + "Id" ], "type": "object", "properties": { @@ -75989,240 +75925,304 @@ "type": "string", "description": "主键Id" }, - "Name": { - "minLength": 1, + "CreatedId": { "type": "string", - "description": "名称。此前 AddRequest 缺此声明:表单提交的 name 被绑定丢弃,Adapt 后实体 Name=null,\n实体列 NOT NULL 导致 insert 500(cron 同因,报错先撞上 cron)。" + "description": "创建人Id", + "nullable": true }, - "Description": { + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" + }, + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "详细描述", + "description": "创建人姓名", "nullable": true }, - "Cron": { - "minLength": 1, - "type": "string", - "description": "Cron 表达式(实体列 NOT NULL)" + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true }, - "IsOnce": { - "type": "boolean", - "description": "是否一次性任务" + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true }, - "Source": { + "UpdatedId": { "type": "string", - "description": "任务来源。系统标记非用户输入:手动新增由服务端固定写 \"Manual\"(实体列 NOT NULL)。", + "description": "更新人Id", "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏定时任务增加输入参数" - }, - "AddTenantGameUserEntityByMailRequest": { - "required": [ - "Email", - "EmailPassword", - "Status" - ], - "type": "object", - "properties": { - "UserName": { + }, + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "账号", + "description": "更新人姓名", "nullable": true }, - "Password": { - "type": "string", - "description": "密码", + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", "nullable": true }, - "Description": { + "DeleteTime": { + "type": "integer", + "description": "删除时间", + "format": "int64", + "nullable": true + }, + "DeletedId": { "type": "string", - "description": "描述", + "description": "删除人Id", "nullable": true }, - "CreatedName": { + "DeletedName": { + "maxLength": 512, "type": "string", - "description": "创建人", + "description": "删除人姓名", "nullable": true }, - "UpdatedName": { + "RowVersion": { "type": "string", - "description": "最后更新人", + "description": "行版本号(用于乐观锁)", "nullable": true }, - "Email": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true + }, + "AccessKey": { "minLength": 1, "type": "string", - "description": "账号" + "description": "身份标识" }, - "EmailPassword": { + "AccessSecret": { "minLength": 1, "type": "string", - "description": "密码" + "description": "密钥" }, - "Name": { + "BindUserId": { "type": "string", - "description": "昵称", - "nullable": true - }, - "Status": { - "$ref": "#/components/schemas/GameUserStatus" + "description": "绑定用户Id" } }, - "additionalProperties": false, - "description": "根据邮箱添加账号" + "additionalProperties": false }, - "AddTenantGameWebShopEntityRequest": { + "AddRoleRequest": { "required": [ - "ItemJson", - "Logo", - "Name", - "Price", - "RealPrice" + "Id", + "Name" ], "type": "object", "properties": { - "Name": { - "minLength": 1, + "Id": { "type": "string", - "description": "商品名称" + "description": "主键Id" }, - "Logo": { - "minLength": 1, + "CreatedId": { "type": "string", - "description": "商品图" + "description": "创建人Id", + "nullable": true }, - "Description": { + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" + }, + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "商品描述", + "description": "创建人姓名", "nullable": true }, - "KeyWords": { + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true + }, + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true + }, + "UpdatedId": { "type": "string", - "description": "商品关键词", + "description": "更新人Id", "nullable": true }, - "Price": { - "minLength": 1, + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "零售价" + "description": "更新人姓名", + "nullable": true }, - "RealPrice": { - "minLength": 1, + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "nullable": true + }, + "DeleteTime": { + "type": "integer", + "description": "删除时间", + "format": "int64", + "nullable": true + }, + "DeletedId": { "type": "string", - "description": "实际价格" + "description": "删除人Id", + "nullable": true }, - "ItemJson": { - "minLength": 1, + "DeletedName": { + "maxLength": 512, "type": "string", - "description": "道具列表" + "description": "删除人姓名", + "nullable": true }, - "IsUp": { + "RowVersion": { + "type": "string", + "description": "行版本号(用于乐观锁)", + "nullable": true + }, + "IsEnabled": { "type": "boolean", - "description": "是否上架" + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true }, - "Weight": { + "Code": { + "type": "string", + "nullable": true + }, + "OrderNo": { "type": "integer", - "description": "权重", "format": "int32" + }, + "DataScope": { + "$ref": "#/components/schemas/DataScopeEnum" + }, + "Remark": { + "type": "string", + "nullable": true + }, + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" + }, + "MenuIdList": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "菜单Id集合", + "nullable": true } }, - "additionalProperties": false, - "description": "游戏商城实体新增输入参数" + "additionalProperties": false }, - "AddTenantGameWebShopOrderEntityRequest": { + "AddSystemEmailProviderRequest": { "required": [ - "ItemJson", - "Logo", - "Name", - "Price", - "RealPrice" + "DefaultFromEmail", + "Provider" ], "type": "object", "properties": { - "Name": { + "Purpose": { + "type": "integer", + "description": "平台系统邮件用途(`SystemEmailPurpose`)。0 表示默认系统邮件配置。", + "format": "int32" + }, + "Provider": { "minLength": 1, "type": "string", - "description": "商品名称" + "description": "Provider 类型。当前支持 `TencentCloudSes` 和 `Smtp`。" }, - "Logo": { - "minLength": 1, + "Host": { "type": "string", - "description": "商品图" + "description": "SMTP 主机(Provider=Smtp 时必填)。", + "nullable": true }, - "Description": { + "Port": { + "type": "integer", + "description": "SMTP 端口(Provider=Smtp 时必填)。", + "format": "int32", + "nullable": true + }, + "EnableSsl": { + "type": "boolean", + "description": "SMTP 启用 SSL。", + "nullable": true + }, + "UseDefaultCredentials": { + "type": "boolean", + "description": "SMTP 使用默认凭据。", + "nullable": true + }, + "UserName": { "type": "string", - "description": "商品描述", + "description": "SMTP 用户名(敏感字段)。", "nullable": true }, - "KeyWords": { + "Password": { "type": "string", - "description": "商品关键词", + "description": "SMTP 密码(敏感字段)。", "nullable": true }, - "Price": { - "minLength": 1, + "Region": { "type": "string", - "description": "零售价" + "description": "Provider 区域。", + "nullable": true }, - "RealPrice": { - "minLength": 1, + "SecretId": { "type": "string", - "description": "实际价格" + "description": "腾讯云 SecretId(敏感字段)。", + "nullable": true }, - "ItemJson": { - "minLength": 1, + "SecretKey": { "type": "string", - "description": "道具列表" + "description": "腾讯云 SecretKey(敏感字段)。", + "nullable": true }, - "IsUp": { - "type": "boolean", - "description": "是否上架" + "DefaultFromEmail": { + "minLength": 1, + "type": "string", + "description": "默认发件人邮箱。" }, - "Weight": { - "type": "integer", - "description": "权重", - "format": "int32" - } - }, - "additionalProperties": false, - "description": "游戏商城订单实体新增输入参数" - }, - "AddTenantObjectStorageConfigRequest": { - "type": "object", - "properties": { - "Provider": { + "DefaultFromName": { "type": "string", - "description": "存储提供商名称(local / aliyun / tencent-cos / qiniu)。", + "description": "默认发件人显示名。", "nullable": true }, - "PathTemplate": { + "DefaultToEmail": { "type": "string", - "description": "对象键路径模板。", + "description": "默认收件人邮箱。", "nullable": true }, - "MaxFileSizeBytes": { - "type": "integer", - "description": "单文件最大字节数。", - "format": "int64" - }, - "AllowedContentTypesJson": { + "TemplateId": { "type": "string", - "description": "允许的内容类型 JSON 数组。", + "description": "腾讯云 SES 模板 ID。Provider=TencentCloudSes 时必填。", "nullable": true }, - "EnableMd5": { - "type": "boolean", - "description": "是否启用 MD5 去重。" - }, - "ConfigJson": { + "TemplateDataJson": { "type": "string", - "description": "提供商配置 JSON,敏感字段可用 ****** 表示沿用旧值(更新场景)。", + "description": "腾讯云 SES 模板变量 JSON。", "nullable": true }, + "Priority": { + "type": "integer", + "description": "配置选择优先级(数值越大越优先)。仅用于配置选择,不代表邮件投递队列优先级。", + "format": "int32" + }, "IsEnabled": { "type": "boolean", - "description": "是否启用。" + "description": "是否启用。禁用配置不参与系统邮件选择和测试发送。" }, "Remark": { "type": "string", @@ -76231,7 +76231,7 @@ } }, "additionalProperties": false, - "description": "新增租户对象存储配置入参。" + "description": "平台系统邮件 Provider 配置新增输入参数。" }, "AddUserRequest": { "required": [ @@ -77299,7 +77299,7 @@ "format": "int32", "x-enum-varnames": [ "System", - "Tenant" + "Business" ], "x-enum-descriptions": [ "系统", @@ -77871,6 +77871,21 @@ }, "additionalProperties": false }, + "DeleteGameUserEntityRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + } + }, + "additionalProperties": false, + "description": "游戏账号删除输入参数" + }, "DeleteJobDetailRequest": { "type": "object", "properties": { @@ -77940,21 +77955,6 @@ }, "additionalProperties": false }, - "DeleteTenantGameUserEntityRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - } - }, - "additionalProperties": false, - "description": "游戏账号删除输入参数" - }, "DeleteUserRequest": { "required": [ "Id" @@ -78082,7 +78082,281 @@ "Items": { "type": "array", "items": { - "$ref": "#/components/schemas/DeviceGroupResponse" + "$ref": "#/components/schemas/DeviceGroupResponse" + }, + "nullable": true + }, + "HasPrevPage": { + "type": "boolean" + }, + "HasNextPage": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "DictionaryDataRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用" + } + }, + "additionalProperties": false + }, + "DictionaryTypeRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用" + } + }, + "additionalProperties": false + }, + "EndpointPermissionEntry": { + "type": "object", + "properties": { + "EndpointId": { + "type": "string", + "description": "端点代理 Id(稳定身份)。" + }, + "HttpMethod": { + "type": "string", + "description": "HTTP Method(对账键的一部分)。", + "nullable": true + }, + "RoutePath": { + "type": "string", + "description": "规范化路由(对账键,非授权令牌)。", + "nullable": true + }, + "IsPublic": { + "type": "boolean", + "description": "是否公开([AllowAnonymous])—— 请求期短路放行。" + }, + "IsAuthenticatedOnly": { + "type": "boolean", + "description": "是否仅需登录态(白名单)—— 请求期短路放行。" + }, + "BoundMenuIds": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "该端点绑定的按钮 MenuId 集(global_menu_endpoint)。OR 语义。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "请求期端点权限条目(U6/C42 缓存值):由 `ApiEndpointCatalogSync` 在启动时构建并预热,\nJwtHandler 请求期按 RoutePath 查得,做端点→绑定按钮→已授权 MenuId 反向鉴权。" + }, + "EnumItem": { + "type": "object", + "properties": { + "Describe": { + "type": "string", + "nullable": true + }, + "Name": { + "type": "string", + "nullable": true + }, + "Value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "EnumTypeResponse": { + "type": "object", + "properties": { + "TypeDescribe": { + "type": "string", + "description": "枚举类型描述", + "nullable": true + }, + "TypeName": { + "type": "string", + "description": "枚举类型名称", + "nullable": true + }, + "TypeRemark": { + "type": "string", + "description": "枚举类型备注", + "nullable": true + } + }, + "additionalProperties": false, + "description": "枚举类型输出参数" + }, + "ExecuteGameAreaMergePlanRequest": { + "required": [ + "BackupIdentifier" + ], + "type": "object", + "properties": { + "Id": { + "type": "string" + }, + "BackupIdentifier": { + "minLength": 1, + "type": "string" + }, + "BackupConfirmed": { + "type": "boolean" + } + }, + "additionalProperties": false, + "description": "合服流程数据。" + }, + "ExportColumnRequest": { + "type": "object", + "properties": { + "Field": { + "type": "string", + "description": "导出字段名,须与实体 Output DTO 的属性名匹配(忽略大小写)。", + "nullable": true + }, + "Header": { + "type": "string", + "description": "Excel 列标题;为空时回退为属性名。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "导出列定义。Field 为 TResponse 上的属性名,Header 为 Excel 列标题。" + }, + "ExportRangeEnum": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "description": "导出范围枚举。", + "format": "int32", + "x-enum-varnames": [ + "All", + "CurrentPage" + ], + "x-enum-descriptions": [ + "All", + "CurrentPage" + ] + }, + "FileRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "FileName": { + "type": "string", + "description": "文件名称", + "nullable": true + }, + "Url": { + "type": "string", + "description": "文件Url", + "nullable": true + } + }, + "additionalProperties": false + }, + "FileResponse": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Id" + }, + "Provider": { + "type": "string", + "description": "提供者", + "nullable": true + }, + "Name": { + "type": "string", + "description": "名称", + "nullable": true, + "readOnly": true + }, + "Url": { + "type": "string", + "description": "URL", + "nullable": true + }, + "SizeKb": { + "type": "string", + "description": "大小", + "nullable": true + }, + "Suffix": { + "type": "string", + "description": "后缀", + "nullable": true + }, + "FilePath": { + "type": "string", + "description": "路径", + "nullable": true + }, + "FileName": { + "type": "string", + "description": "文件名称", + "nullable": true + } + }, + "additionalProperties": false + }, + "FileResponseSqlSugarPagedList": { + "type": "object", + "properties": { + "Page": { + "type": "integer", + "format": "int32" + }, + "PageSize": { + "type": "integer", + "format": "int32" + }, + "Total": { + "type": "integer", + "format": "int32" + }, + "TotalPages": { + "type": "integer", + "format": "int32" + }, + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileResponse" }, "nullable": true }, @@ -78095,245 +78369,6 @@ }, "additionalProperties": false }, - "DictionaryDataRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用" - } - }, - "additionalProperties": false - }, - "DictionaryTypeRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用" - } - }, - "additionalProperties": false - }, - "EndpointPermissionEntry": { - "type": "object", - "properties": { - "EndpointId": { - "type": "string", - "description": "端点代理 Id(稳定身份)。" - }, - "HttpMethod": { - "type": "string", - "description": "HTTP Method(对账键的一部分)。", - "nullable": true - }, - "RoutePath": { - "type": "string", - "description": "规范化路由(对账键,非授权令牌)。", - "nullable": true - }, - "IsPublic": { - "type": "boolean", - "description": "是否公开([AllowAnonymous])—— 请求期短路放行。" - }, - "IsAuthenticatedOnly": { - "type": "boolean", - "description": "是否仅需登录态(白名单)—— 请求期短路放行。" - }, - "BoundMenuIds": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "该端点绑定的按钮 MenuId 集(global_menu_endpoint)。OR 语义。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "请求期端点权限条目(U6/C42 缓存值):由 `ApiEndpointCatalogSync` 在启动时构建并预热,\nJwtHandler 请求期按 RoutePath 查得,做端点→绑定按钮→已授权 MenuId 反向鉴权。" - }, - "EnumItem": { - "type": "object", - "properties": { - "Describe": { - "type": "string", - "nullable": true - }, - "Name": { - "type": "string", - "nullable": true - }, - "Value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "EnumTypeResponse": { - "type": "object", - "properties": { - "TypeDescribe": { - "type": "string", - "description": "枚举类型描述", - "nullable": true - }, - "TypeName": { - "type": "string", - "description": "枚举类型名称", - "nullable": true - }, - "TypeRemark": { - "type": "string", - "description": "枚举类型备注", - "nullable": true - } - }, - "additionalProperties": false, - "description": "枚举类型输出参数" - }, - "ExecuteGameAreaMergePlanRequest": { - "required": [ - "BackupIdentifier" - ], - "type": "object", - "properties": { - "Id": { - "type": "string" - }, - "BackupIdentifier": { - "minLength": 1, - "type": "string" - }, - "BackupConfirmed": { - "type": "boolean" - } - }, - "additionalProperties": false, - "description": "合服流程数据。" - }, - "ExportColumnRequest": { - "type": "object", - "properties": { - "Field": { - "type": "string", - "description": "导出字段名,须与实体 Output DTO 的属性名匹配(忽略大小写)。", - "nullable": true - }, - "Header": { - "type": "string", - "description": "Excel 列标题;为空时回退为属性名。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "导出列定义。Field 为 TResponse 上的属性名,Header 为 Excel 列标题。" - }, - "ExportRangeEnum": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "description": "导出范围枚举。", - "format": "int32", - "x-enum-varnames": [ - "All", - "CurrentPage" - ], - "x-enum-descriptions": [ - "All", - "CurrentPage" - ] - }, - "FileRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "FileName": { - "type": "string", - "description": "文件名称", - "nullable": true - }, - "Url": { - "type": "string", - "description": "文件Url", - "nullable": true - } - }, - "additionalProperties": false - }, - "FileResponse": { - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "Id" - }, - "Provider": { - "type": "string", - "description": "提供者", - "nullable": true - }, - "Name": { - "type": "string", - "description": "名称", - "nullable": true, - "readOnly": true - }, - "Url": { - "type": "string", - "description": "URL", - "nullable": true - }, - "SizeKb": { - "type": "string", - "description": "大小", - "nullable": true - }, - "Suffix": { - "type": "string", - "description": "后缀", - "nullable": true - }, - "FilePath": { - "type": "string", - "description": "路径", - "nullable": true - }, - "FileName": { - "type": "string", - "description": "文件名称", - "nullable": true - } - }, - "additionalProperties": false - }, "FulfillmentActionRequest": { "required": [ "Id" @@ -78434,7 +78469,7 @@ }, "RoleId": { "type": "string", - "description": "角色 Id。反查自 TenantGameRoleEntity。", + "description": "角色 Id。反查自 GameRoleEntity。", "nullable": true }, "UserId": { @@ -79546,7 +79581,7 @@ } }, "additionalProperties": false, - "description": "应用开放访问凭证输出。\n\n注意:GameFrameX.Entity.Tenant.Game.App.TenantGameAppOpenAccessEntity.AccessSecret 永不输出(明文仅签发 / 轮换时一次性返回)。\nOutput 不含 AccessSecret 字段,Service 投影时也不得引入。" + "description": "应用开放访问凭证输出。\n\n注意:GameFrameX.Entity.Business.Game.App.GameAppOpenAccessEntity.AccessSecret 永不输出(明文仅签发 / 轮换时一次性返回)。\nOutput 不含 AccessSecret 字段,Service 投影时也不得引入。" }, "GameAppOpenAccessResponseSqlSugarPagedList": { "type": "object", @@ -82882,7 +82917,7 @@ }, "OrderId": { "type": "string", - "description": "来源订单 Id(TenantGameOrderEntity.Id)。" + "description": "来源订单 Id(GameOrderEntity.Id)。" }, "PayChannel": { "type": "string", @@ -83421,7 +83456,7 @@ }, "PenaltyId": { "type": "string", - "description": "关联处罚 Id(TenantGamePenaltyEntity.Id)。" + "description": "关联处罚 Id(GamePenaltyEntity.Id)。" }, "AppellantId": { "type": "string", @@ -83933,12 +83968,12 @@ }, "ChannelId": { "type": "string", - "description": "兑换码渠道/分组ID(来自关联的 TenantGameRedeemCodeEntity.ChannelId)", + "description": "兑换码渠道/分组ID(来自关联的 GameRedeemCodeEntity.ChannelId)", "nullable": true }, "ChannelName": { "type": "string", - "description": "兑换码渠道/分组名称(来自关联的 TenantGameRedeemCodeChannelEntity.Name)", + "description": "兑换码渠道/分组名称(来自关联的 GameRedeemCodeChannelEntity.Name)", "nullable": true } }, @@ -85529,13 +85564,10 @@ "type": "boolean", "description": "是否仅超管可见(种子元数据,DB 驱动授权读取)" }, - "AllowTenantWhenSuperAdminOnly": { + "AllowAdminWhenSuperAdminOnly": { "type": "boolean", "description": "超管专属菜单下允许租户只读访问" }, - "AppScope": { - "$ref": "#/components/schemas/MenuAppScopeEnum" - }, "Children": { "type": "array", "items": { @@ -85696,7 +85728,7 @@ }, "additionalProperties": false }, - "LinkPenaltyTenantGameReportEntityRequest": { + "LinkPenaltyGameReportEntityRequest": { "required": [ "Id", "PenaltyId" @@ -85825,10 +85857,6 @@ "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "TenantId": { - "type": "string", - "nullable": true - }, "BeforeData": { "type": "string", "nullable": true @@ -86012,10 +86040,6 @@ "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "TenantId": { - "type": "string", - "nullable": true - }, "ControllerName": { "type": "string", "nullable": true @@ -86254,10 +86278,6 @@ "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "TenantId": { - "type": "string", - "nullable": true - }, "ControllerName": { "type": "string", "nullable": true @@ -86635,19 +86655,6 @@ "升级处理" ] }, - "MenuAppScopeEnum": { - "enum": [ - 0 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Console" - ], - "x-enum-descriptions": [ - "控制台" - ] - }, "MenuResponse": { "type": "object", "properties": { @@ -87569,7 +87576,7 @@ } }, "additionalProperties": false, - "description": "受控操作命令输入参数(高危端点;change C344 / vault:C9 S8.1)。\n\n高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 TenantAdmin),`Reason` 与\n`ReviewerOperatorId` 对全部四命令必填——双人复核字段落地 vault「审批(如需)」,不做通用审批流。\n目标标识按命令取值:CancelTicket → TicketId;EndAbnormalMatch → MatchId;SuspendResumePlayer / MatchIsolation → PlayerId。" + "description": "受控操作命令输入参数(高危端点;change C344 / vault:C9 S8.1)。\n\n高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 Admin),`Reason` 与\n`ReviewerOperatorId` 对全部四命令必填——双人复核字段落地 vault「审批(如需)」,不做通用审批流。\n目标标识按命令取值:CancelTicket → TicketId;EndAbnormalMatch → MatchId;SuspendResumePlayer / MatchIsolation → PlayerId。" }, "OnlineLiveOpsDispatchRequest": { "required": [ @@ -88140,7 +88147,7 @@ } }, "additionalProperties": false, - "description": "处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。\n\n作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。" + "description": "处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 Admin)。\n\n作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。" }, "OnlinePenaltyLinkResponse": { "type": "object", @@ -88531,469 +88538,225 @@ }, "ReportedPlayerId": { "maxLength": 256, - "minLength": 1, - "type": "string", - "description": "被举报玩家 Id(Mute / Ban 时写入事实源 TargetId;案件数据 Admin 不落镜像,由调用方随案件行携带)。" - }, - "Decision": { - "$ref": "#/components/schemas/OnlineReportDecisionKind" - }, - "Reason": { - "maxLength": 2048, - "minLength": 1, - "type": "string", - "description": "处置原因(必填,进入事实源 Reason 与审计)。" - }, - "DurationMinutes": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "description": "处罚时长(分钟)。Decision 为 Mute / Ban 时必填且大于 0;其余决策忽略。", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false, - "description": "举报案件处置输入参数(处置流:事实源写入 → 联动命令 → 当事人通知,三步状态落审计)。" - }, - "OnlineReportHandleResponse": { - "type": "object", - "properties": { - "CaseId": { - "type": "string", - "description": "案件 Id。", - "nullable": true - }, - "Decision": { - "$ref": "#/components/schemas/OnlineReportDecisionKind" - }, - "PenaltyId": { - "type": "string", - "description": "落账的处罚事实源行 Id(仅 Mute / Ban;其余决策为 null)。", - "nullable": true - }, - "LinkCommand": { - "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" - }, - "CaseUpdated": { - "type": "boolean", - "description": "案件状态是否已回写 Online(false 时见 CaseUpdateFailureReason;案件主状态仍以此回写为准,\nAdmin 不落镜像,回写失败须人工重查重处)。" - }, - "CaseUpdateFailureReason": { - "type": "string", - "description": "案件状态回写失败原因(回写成功时为 null)。", - "nullable": true - }, - "PlayerNotified": { - "type": "boolean", - "description": "当事人通知是否送达(通知失败不阻断处置,原因见 NotifiedFailureReason)。" - }, - "NotifiedFailureReason": { - "type": "string", - "description": "通知失败原因(送达时为 null)。", - "nullable": true - }, - "HandledAt": { - "type": "integer", - "description": "处置完成时间(Unix 秒)。", - "format": "int64" - } - }, - "additionalProperties": false, - "description": "举报案件处置响应(三步结果聚合:事实源写入 → 联动命令 → 当事人通知)。" - }, - "OpenAccessResponse": { - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "Id" - }, - "AccessKey": { - "type": "string", - "description": "身份标识", - "nullable": true - }, - "BindUserId": { - "type": "string", - "description": "绑定用户Id" - }, - "BindUserAccount": { - "type": "string", - "description": "绑定用户账号", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "type": "string", - "description": "创建人", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true - }, - "UpdatedName": { - "type": "string", - "description": "更新人", - "nullable": true - }, - "RowVersion": { - "type": "string", - "description": "行版本号(乐观锁)", - "nullable": true - } - }, - "additionalProperties": false, - "description": "开放接口身份输出参数" - }, - "OpenAccessResponseSqlSugarPagedList": { - "type": "object", - "properties": { - "Page": { - "type": "integer", - "format": "int32" - }, - "PageSize": { - "type": "integer", - "format": "int32" - }, - "Total": { - "type": "integer", - "format": "int32" - }, - "TotalPages": { - "type": "integer", - "format": "int32" - }, - "Items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OpenAccessResponse" - }, - "nullable": true - }, - "HasPrevPage": { - "type": "boolean" - }, - "HasNextPage": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "OrderStatusEnum": { - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Unpaid", - "NotShipped", - "Shipped", - "InitiateRefund", - "RefundRefused", - "RefundAgreement", - "Refunded", - "Completed", - "Voided" - ], - "x-enum-descriptions": [ - "未付款", - "未发货", - "已发货", - "发起退款", - "退款拒绝", - "同意退款", - "已退款", - "已完成", - "已作废" - ] - }, - "PackageKindEnum": { - "enum": [ - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Normal", - "Master", - "Derived" - ], - "x-enum-descriptions": [ - "普通", - "母包", - "子包" - ] - }, - "PageChannelDefinitionRequest": { - "type": "object", - "properties": { - "SearchKey": { - "type": "string", - "nullable": true - }, - "Page": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "OrderBy": { - "type": "string", - "nullable": true - }, - "IsDescending": { - "type": "boolean" - }, - "Code": { - "type": "string", - "description": "渠道编码", - "nullable": true - }, - "Scope": { - "$ref": "#/components/schemas/ChannelScopeEnum" - }, - "PlatformCode": { - "type": "string", - "description": "适用平台编码", - "nullable": true - }, - "ChannelType": { - "$ref": "#/components/schemas/ChannelTypeEnum" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true - } - }, - "additionalProperties": false, - "description": "渠道分页查询输入参数" - }, - "PageChannelDefinitionRequestDataExportRequest": { - "type": "object", - "properties": { - "Query": { - "$ref": "#/components/schemas/PageChannelDefinitionRequest" - }, - "Columns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ExportColumnRequest" - }, - "description": "可见列白名单。仅这些字段会被导出;非白名单或敏感字段一律不输出。", - "nullable": true - }, - "Range": { - "$ref": "#/components/schemas/ExportRangeEnum" - } - }, - "additionalProperties": false, - "description": "通用数据导出请求。实体标识由各业务 Service 的 Admin API 路由隐含\n(URL = 实体),本 DTO 不携带 tableName 或任意表直查参数,\n以规避「任意表 + 自由 SQL」的越权攻击面。" - }, - "PageConfigRequest": { - "type": "object", - "properties": { - "SearchKey": { - "type": "string", - "nullable": true - }, - "Page": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "OrderBy": { - "type": "string", - "nullable": true - }, - "IsDescending": { - "type": "boolean" - }, - "Name": { - "type": "string", - "description": "名称", - "nullable": true - }, - "Code": { + "minLength": 1, "type": "string", - "description": "编码", - "nullable": true + "description": "被举报玩家 Id(Mute / Ban 时写入事实源 TargetId;案件数据 Admin 不落镜像,由调用方随案件行携带)。" }, - "GroupCode": { + "Decision": { + "$ref": "#/components/schemas/OnlineReportDecisionKind" + }, + "Reason": { + "maxLength": 2048, + "minLength": 1, "type": "string", - "description": "分组编码", + "description": "处置原因(必填,进入事实源 Reason 与审计)。" + }, + "DurationMinutes": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "description": "处罚时长(分钟)。Decision 为 Mute / Ban 时必填且大于 0;其余决策忽略。", + "format": "int32", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "举报案件处置输入参数(处置流:事实源写入 → 联动命令 → 当事人通知,三步状态落审计)。" }, - "PageDictionaryDataRequest": { + "OnlineReportHandleResponse": { "type": "object", "properties": { - "SearchKey": { + "CaseId": { "type": "string", + "description": "案件 Id。", "nullable": true }, - "Page": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "format": "int32" + "Decision": { + "$ref": "#/components/schemas/OnlineReportDecisionKind" }, - "OrderBy": { + "PenaltyId": { "type": "string", + "description": "落账的处罚事实源行 Id(仅 Mute / Ban;其余决策为 null)。", "nullable": true }, - "IsDescending": { - "type": "boolean" + "LinkCommand": { + "$ref": "#/components/schemas/OnlinePenaltyLinkResponse" }, - "DictionaryTypeId": { - "type": "string", - "description": "字典类型Id" + "CaseUpdated": { + "type": "boolean", + "description": "案件状态是否已回写 Online(false 时见 CaseUpdateFailureReason;案件主状态仍以此回写为准,\nAdmin 不落镜像,回写失败须人工重查重处)。" }, - "Value": { + "CaseUpdateFailureReason": { "type": "string", - "description": "值", + "description": "案件状态回写失败原因(回写成功时为 null)。", "nullable": true }, - "Code": { + "PlayerNotified": { + "type": "boolean", + "description": "当事人通知是否送达(通知失败不阻断处置,原因见 NotifiedFailureReason)。" + }, + "NotifiedFailureReason": { "type": "string", - "description": "编码", + "description": "通知失败原因(送达时为 null)。", "nullable": true + }, + "HandledAt": { + "type": "integer", + "description": "处置完成时间(Unix 秒)。", + "format": "int64" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "举报案件处置响应(三步结果聚合:事实源写入 → 联动命令 → 当事人通知)。" }, - "PageDictionaryTypeRequest": { + "OpenAccessResponse": { "type": "object", "properties": { - "SearchKey": { + "Id": { + "type": "string", + "description": "Id" + }, + "AccessKey": { "type": "string", + "description": "身份标识", "nullable": true }, - "Page": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" + "BindUserId": { + "type": "string", + "description": "绑定用户Id" }, - "PageSize": { - "maximum": 100, - "minimum": 1, + "BindUserAccount": { + "type": "string", + "description": "绑定用户账号", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用", + "nullable": true + }, + "CreatedTime": { "type": "integer", - "format": "int32" + "description": "创建时间", + "format": "int64" }, - "OrderBy": { + "CreatedName": { "type": "string", + "description": "创建人", "nullable": true }, - "IsDescending": { - "type": "boolean" + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true }, - "Name": { + "UpdatedName": { "type": "string", - "description": "名称", + "description": "更新人", "nullable": true }, - "Code": { + "RowVersion": { "type": "string", - "description": "编码", + "description": "行版本号(乐观锁)", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "开放接口身份输出参数" }, - "PageFileRequest": { + "OpenAccessResponseSqlSugarPagedList": { "type": "object", "properties": { - "SearchKey": { - "type": "string", - "nullable": true - }, "Page": { - "maximum": 2147483647, - "minimum": 1, "type": "integer", "format": "int32" }, "PageSize": { - "maximum": 100, - "minimum": 1, "type": "integer", "format": "int32" }, - "OrderBy": { - "type": "string", - "nullable": true + "Total": { + "type": "integer", + "format": "int32" }, - "IsDescending": { - "type": "boolean" + "TotalPages": { + "type": "integer", + "format": "int32" }, - "FileName": { - "type": "string", - "description": "文件名称", + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OpenAccessResponse" + }, "nullable": true }, - "StartTime": { - "type": "integer", - "description": "开始时间", - "format": "int64", - "nullable": true + "HasPrevPage": { + "type": "boolean" }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", - "nullable": true + "HasNextPage": { + "type": "boolean" } }, "additionalProperties": false }, - "PageGameAppAssetPackageRequest": { + "OrderStatusEnum": { + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Unpaid", + "NotShipped", + "Shipped", + "InitiateRefund", + "RefundRefused", + "RefundAgreement", + "Refunded", + "Completed", + "Voided" + ], + "x-enum-descriptions": [ + "未付款", + "未发货", + "已发货", + "发起退款", + "退款拒绝", + "同意退款", + "已退款", + "已完成", + "已作废" + ] + }, + "PackageKindEnum": { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Normal", + "Master", + "Derived" + ], + "x-enum-descriptions": [ + "普通", + "母包", + "子包" + ] + }, + "PageAdvertisementCallbackConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -89019,16 +88782,20 @@ "IsDescending": { "type": "boolean" }, - "Name": { + "IsActive": { + "type": "boolean", + "nullable": true + }, + "Provider": { "type": "string", - "description": "名称", + "description": "广告平台 Provider。", "nullable": true } }, "additionalProperties": false, - "description": "资源包分页查询输入参数" + "description": "租户广告回调验签配置分页查询输入参数" }, - "PageGameAppAssetPackageVersionHistoryRequest": { + "PageAppSignatureKeyRequest": { "type": "object", "properties": { "SearchKey": { @@ -89054,16 +88821,15 @@ "IsDescending": { "type": "boolean" }, - "VersionId": { - "type": "string", - "description": "资源包版本Id", + "IsActive": { + "type": "boolean", "nullable": true } }, "additionalProperties": false, - "description": "资源包版本记录分页查询输入参数" + "description": "App 传输签名密钥分页查询输入参数。" }, - "PageGameAppAssetPackageVersionRequest": { + "PageChannelDefinitionRequest": { "type": "object", "properties": { "SearchKey": { @@ -89089,63 +88855,53 @@ "IsDescending": { "type": "boolean" }, - "Channel": { - "type": "string", - "nullable": true - }, - "Platform": { - "type": "string", - "nullable": true - }, - "AppVersion": { + "Code": { "type": "string", + "description": "渠道编码", "nullable": true }, - "Package": { - "type": "string", - "nullable": true + "Scope": { + "$ref": "#/components/schemas/ChannelScopeEnum" }, - "Language": { + "PlatformCode": { "type": "string", + "description": "适用平台编码", "nullable": true }, - "RootPath": { - "type": "string", - "description": "资源下载根路径", - "nullable": true + "ChannelType": { + "$ref": "#/components/schemas/ChannelTypeEnum" }, - "AssetPackageName": { - "type": "string", - "description": "资源包名称", + "IsEnabled": { + "type": "boolean", + "description": "是否启用", "nullable": true } }, "additionalProperties": false, - "description": "资源包版本分页查询输入参数" + "description": "渠道分页查询输入参数" }, - "PageGameAppAssetPackageVersionSelectRequest": { + "PageChannelDefinitionRequestDataExportRequest": { "type": "object", "properties": { - "SearchKey": { - "type": "string", - "nullable": true - }, - "PageSize": { - "maximum": 1000, - "minimum": 1, - "type": "integer", - "format": "int32" + "Query": { + "$ref": "#/components/schemas/PageChannelDefinitionRequest" }, - "AppPackageId": { - "type": "string", - "description": "分包Id", + "Columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportColumnRequest" + }, + "description": "可见列白名单。仅这些字段会被导出;非白名单或敏感字段一律不输出。", "nullable": true + }, + "Range": { + "$ref": "#/components/schemas/ExportRangeEnum" } }, "additionalProperties": false, - "description": "资源包版本选择器输入参数" + "description": "通用数据导出请求。实体标识由各业务 Service 的 Admin API 路由隐含\n(URL = 实体),本 DTO 不携带 tableName 或任意表直查参数,\n以规避「任意表 + 自由 SQL」的越权攻击面。" }, - "PageGameAppFeatureSwitchRequest": { + "PageClientApiPolicyRequest": { "type": "object", "properties": { "SearchKey": { @@ -89171,26 +88927,15 @@ "IsDescending": { "type": "boolean" }, - "SwitchKey": { - "type": "string", - "description": "开关键模糊筛选", - "nullable": true - }, - "IsEnabled": { + "IsActive": { "type": "boolean", - "description": "启停筛选", - "nullable": true - }, - "Audience": { - "type": "string", - "description": "消费方标记精确筛选:client / server / both", "nullable": true } }, "additionalProperties": false, - "description": "活动/功能开关管理分页查询输入参数" + "description": "租户 Client API 运行策略分页查询输入参数" }, - "PageGameAppPackageRequest": { + "PageConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -89218,34 +88963,23 @@ }, "Name": { "type": "string", - "description": "分包名称", - "nullable": true - }, - "PackageName": { - "type": "string", - "description": "包名", + "description": "名称", "nullable": true }, - "PackageVersion": { + "Code": { "type": "string", - "description": "分包版本号", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", + "description": "编码", "nullable": true }, - "ParentPackageId": { + "GroupCode": { "type": "string", - "description": "母包Id", + "description": "分组编码", "nullable": true } }, - "additionalProperties": false, - "description": "游戏应用分包分页查询输入参数" + "additionalProperties": false }, - "PageGameAppReleaseVersionRequest": { + "PageDictionaryDataRequest": { "type": "object", "properties": { "SearchKey": { @@ -89271,41 +89005,24 @@ "IsDescending": { "type": "boolean" }, - "Channel": { - "type": "string", - "nullable": true - }, - "Platform": { - "type": "string", - "nullable": true - }, - "AppVersion": { - "type": "string", - "nullable": true - }, - "Package": { - "type": "string", - "nullable": true - }, - "Language": { + "DictionaryTypeId": { "type": "string", - "nullable": true + "description": "字典类型Id" }, - "OldVersion": { + "Value": { "type": "string", - "description": "OldVersion", + "description": "值", "nullable": true }, - "Description": { + "Code": { "type": "string", - "description": "Description", + "description": "编码", "nullable": true } }, - "additionalProperties": false, - "description": "游戏版本管理分页查询输入参数" + "additionalProperties": false }, - "PageGameAppRemoteConfigKeyRequest": { + "PageDictionaryTypeRequest": { "type": "object", "properties": { "SearchKey": { @@ -89331,31 +89048,20 @@ "IsDescending": { "type": "boolean" }, - "KeyName": { - "type": "string", - "description": "JSON key 名称", - "nullable": true - }, - "DisplayName": { + "Name": { "type": "string", - "description": "显示名称", + "description": "名称", "nullable": true }, - "ValueType": { + "Code": { "type": "string", - "description": "值类型:string、bool、long", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", + "description": "编码", "nullable": true } }, - "additionalProperties": false, - "description": "远程配置内容键定义分页查询输入参数" + "additionalProperties": false }, - "PageGameAppRemoteConfigModeRequest": { + "PageFileRequest": { "type": "object", "properties": { "SearchKey": { @@ -89381,26 +89087,27 @@ "IsDescending": { "type": "boolean" }, - "ModeCode": { + "FileName": { "type": "string", - "description": "模式编码", + "description": "文件名称", "nullable": true }, - "DisplayName": { - "type": "string", - "description": "显示名称", + "StartTime": { + "type": "integer", + "description": "开始时间", + "format": "int64", "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", + "EndTime": { + "type": "integer", + "description": "结束时间", + "format": "int64", "nullable": true } }, - "additionalProperties": false, - "description": "远程配置模式定义分页查询输入参数" + "additionalProperties": false }, - "PageGameAppRemoteConfigRequest": { + "PageGameAdvertisementRewardEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -89426,61 +89133,53 @@ "IsDescending": { "type": "boolean" }, - "Channel": { - "type": "string", - "nullable": true - }, - "Platform": { - "type": "string", - "nullable": true - }, - "AppVersion": { - "type": "string", - "nullable": true - }, - "Package": { + "AreaId": { "type": "string", "nullable": true }, - "Language": { + "Provider": { "type": "string", + "description": "广告平台 Provider(等值匹配,标准化值 TopOn / GoogleAdMob / UnityAds)。", "nullable": true }, - "Content": { + "TransactionId": { "type": "string", - "description": "Content", + "description": "平台交易号(等值匹配)。", "nullable": true }, - "CheckResourceUrl": { + "RoleId": { "type": "string", - "description": "CheckResourceUrl", + "description": "角色 Id(等值匹配)。", "nullable": true }, - "CheckAppVersionUrl": { + "UserId": { "type": "string", - "description": "CheckAppVersionUrl", + "description": "用户 Id。", "nullable": true }, - "CreatedName": { + "AdvertisementUnit": { "type": "string", - "description": "CreatedName", + "description": "广告位/单元(模糊匹配)。", "nullable": true }, - "UpdatedName": { - "type": "string", - "description": "UpdatedName", - "nullable": true + "Status": { + "$ref": "#/components/schemas/AdvertisementRewardStatusEnum" }, - "Description": { - "type": "string", - "description": "Description", + "CreateTimeRange": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": "创建时间范围([0]=起始, [1]=结束)。", "nullable": true } }, "additionalProperties": false, - "description": "远程配置管理分页查询输入参数" + "description": "广告奖励发放账本分页/导出查询输入参数(C114 / GFX-111 后端跟进)。\n\n过滤字段对齐前端检索表单:Provider/Status/RoleId 常用 + TransactionId/AdvertisementUnit/AreaId/时间范围 高级。" }, - "PageGameAppServerConfigRequest": { + "PageGameAnnouncementEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -89506,41 +89205,57 @@ "IsDescending": { "type": "boolean" }, - "Channel": { + "AreaId": { "type": "string", "nullable": true }, - "Platform": { + "Language": { "type": "string", + "description": "语言", "nullable": true }, - "AppVersion": { + "Title": { "type": "string", + "description": "标题", "nullable": true }, - "Package": { - "type": "string", + "StartTime": { + "type": "integer", + "description": "开始时间", + "format": "int64", "nullable": true }, - "Language": { - "type": "string", + "StartTimeRange": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": "开始时间范围", "nullable": true }, - "Key": { - "type": "string", - "description": "配置键精确筛选", + "EndTime": { + "type": "integer", + "description": "结束时间", + "format": "int64", "nullable": true }, - "Enabled": { - "type": "boolean", - "description": "键级启停筛选", + "EndTimeRange": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": "结束时间范围", "nullable": true } }, "additionalProperties": false, - "description": "游戏运营配置管理分页查询输入参数" + "description": "游戏公告分页查询输入参数" }, - "PageGameAppVersionDefinitionRequest": { + "PageGameAntiCheatEventRequest": { "type": "object", "properties": { "SearchKey": { @@ -89565,12 +89280,29 @@ }, "IsDescending": { "type": "boolean" + }, + "Provider": { + "$ref": "#/components/schemas/AntiCheatProviderEnum" + }, + "RiskLevel": { + "$ref": "#/components/schemas/RiskLevelEnum" + }, + "ManualReviewState": { + "$ref": "#/components/schemas/ManualReviewStateEnum" + }, + "TargetType": { + "$ref": "#/components/schemas/AntiCheatTargetTypeEnum" + }, + "TargetId": { + "type": "string", + "description": "指向对象标识过滤(精确匹配)。可空。", + "nullable": true } }, "additionalProperties": false, - "description": "版本管理分页查询输入参数" + "description": "反作弊事件分页查询输入。" }, - "PageGamePaymentConfigRequest": { + "PageGameAppAssetPackageRequest": { "type": "object", "properties": { "SearchKey": { @@ -89596,30 +89328,16 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { - "type": "boolean", - "nullable": true - }, - "PackageId": { - "type": "string", - "description": "分包ID", - "nullable": true - }, - "PayChannel": { + "Name": { "type": "string", - "description": "支付渠道", - "nullable": true - }, - "IsSandbox": { - "type": "boolean", - "description": "是否沙盒配置", + "description": "名称", "nullable": true } }, "additionalProperties": false, - "description": "游戏支付配置分页查询输入参数" + "description": "资源包分页查询输入参数" }, - "PageJobRequest": { + "PageGameAppAssetPackageVersionHistoryRequest": { "type": "object", "properties": { "SearchKey": { @@ -89645,22 +89363,22 @@ "IsDescending": { "type": "boolean" }, - "JobId": { - "type": "string", - "description": "作业Id", - "nullable": true - }, - "Description": { + "VersionId": { "type": "string", - "description": "描述信息", + "description": "资源包版本Id", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "资源包版本记录分页查询输入参数" }, - "PageLogRequest": { + "PageGameAppAssetPackageVersionRequest": { "type": "object", "properties": { + "SearchKey": { + "type": "string", + "nullable": true + }, "Page": { "maximum": 2147483647, "minimum": 1, @@ -89680,398 +89398,108 @@ "IsDescending": { "type": "boolean" }, - "SearchKey": { + "Channel": { "type": "string", - "description": "关键字查询(不区分大小写,按各日志服务声明的 `SearchableTextColumns` 多列 OR 模糊匹配)。\n与时间范围条件 `AND` 叠加;为空/null 时行为与现状完全一致(不过滤)。\n继承自 GameFrameX.Core.BaseInputOutput.BasePageRequest,此处显式列出便于契约可读。", "nullable": true }, - "StartTime": { - "type": "integer", - "description": "开始时间", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "PageOnlineAssetAuditRequest": { - "required": [ - "ServerId" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "OperatorId": { - "maxLength": 256, + "Platform": { "type": "string", - "description": "操作者 Id 过滤(null = 不过滤)。", "nullable": true }, - "PlayerId": { - "maxLength": 256, + "AppVersion": { "type": "string", - "description": "目标玩家 Id 过滤(null = 不过滤)。", "nullable": true }, - "CommandType": { - "maxLength": 256, + "Package": { "type": "string", - "description": "命令类型过滤(grant / revoke 等;null = 不过滤)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "发生时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", "nullable": true }, - "Cursor": { + "Language": { "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "description": "页大小(1~100,默认 20)。", - "format": "int32" - } - }, - "additionalProperties": false, - "description": "资产审计分页查询输入参数(操作者/时间/作用域/命令类型 + 目标玩家;Cursor 翻页,vault:C2 S1.2)。\n\nServerId 必填;审计查询无跨区服聚合端点。" - }, - "PageOnlineAssetLedgerRequest": { - "required": [ - "PlayerId", - "ServerId" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "PlayerId": { - "maxLength": 256, - "minLength": 1, - "type": "string", - "description": "目标玩家 Id(必填;流水页按玩家查询)。" - }, - "CurrencyOrItemType": { - "maxLength": 256, + "RootPath": { "type": "string", - "description": "货币或道具类型过滤(null = 不过滤,返回该玩家全部资产维度流水)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "发生时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", + "description": "资源下载根路径", "nullable": true }, - "Cursor": { + "AssetPackageName": { "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", + "description": "资源包名称", "nullable": true - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "description": "页大小(1~100,默认 20)。", - "format": "int32" } }, "additionalProperties": false, - "description": "资产流水分页查询输入参数(vault:C4 LedgerEntry 查询;Cursor 翻页,vault:C2 S1.2 定稿)。\n\n查询实时透传 Online,Admin 不落资产镜像。" + "description": "资源包版本分页查询输入参数" }, - "PageOnlineAuditSearchRequest": { + "PageGameAppAssetPackageVersionSelectRequest": { "type": "object", "properties": { - "Operator": { - "maxLength": 256, - "type": "string", - "description": "操作者过滤(Admin 操作日志按账号/姓名匹配,Online/域命令按操作者 Id;null = 不过滤)。", - "nullable": true - }, - "TargetPlayerId": { - "maxLength": 256, - "type": "string", - "description": "目标对象过滤(玩家 Id 等;null = 不过滤。Admin 操作日志来源经 RequestParam 提取尽力匹配,提取不到的行不命中)。", - "nullable": true - }, - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域过滤(null = 全部区服;Online 审计事件来源提供时参与聚合)。", - "nullable": true - }, - "CommandKind": { - "maxLength": 256, - "type": "string", - "description": "命令类型过滤(substring 匹配,如 penalty / grant / rollout;null = 不过滤)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "发生时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "Cursor": { - "maxLength": 256, + "SearchKey": { "type": "string", - "description": "游标(上一页返回的 NextCursor = 末行 OccurredAt Unix 秒的时间倒序 keyset;首页不传)。", "nullable": true }, "PageSize": { - "maximum": 100, + "maximum": 1000, "minimum": 1, "type": "integer", - "description": "页大小(1~100,默认 20)。", "format": "int32" - } - }, - "additionalProperties": false, - "description": "统一审计检索分页输入参数(五维过滤:操作者/对象/作用域/命令类型/时间窗;change C344 / vault:C9 S8.2)。\n\n作用域维度(ServerId)在此是可选过滤而非调用前置:本地两来源(Admin 操作日志 / 域命令记录)\n支持无作用域全量检索;Online 审计事件来源仅在 ServerId 提供时参与聚合\n(区服上下文是每次 Online 调用的前置条件),未锚定时该来源静默跳过(三来源口径见 OnlineAuditSourceMap)。" - }, - "PageOnlineAuditSearchResponse": { - "type": "object", - "properties": { - "Items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OnlineAuditSearchEntryResponse" - }, - "description": "统一审计行(三来源归并,按 OccurredAt 倒序)。", - "nullable": true }, - "NextCursor": { + "AppPackageId": { "type": "string", - "description": "下一页游标(= 末行 OccurredAt Unix 秒的时间倒序 keyset;null = 没有更多)。", + "description": "分包Id", "nullable": true - }, - "HasMore": { - "type": "boolean", - "description": "是否还有更多(任一来源仍有剩余即为 true)。" } }, "additionalProperties": false, - "description": "统一审计检索分页响应(Admin 出参;change C344 / vault:C9 S8.2)。" + "description": "资源包版本选择器输入参数" }, - "PageOnlineMatchAbnormalTicketRequest": { - "required": [ - "AbnormalKind", - "ServerId" - ], + "PageGameAppFeatureSwitchRequest": { "type": "object", "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "AbnormalKind": { - "$ref": "#/components/schemas/AbnormalKind" - }, - "Cursor": { + "SearchKey": { "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true }, - "PageSize": { - "maximum": 100, + "Page": { + "maximum": 2147483647, "minimum": 1, "type": "integer", - "description": "页大小(1~100,默认 20)。", "format": "int32" - } - }, - "additionalProperties": false, - "description": "异常 Ticket 分页查询输入参数(change C341 §3;按异常类别检索,Cursor 翻页透传 Online)。" - }, - "PageOnlineMatchFailureRequest": { - "required": [ - "ServerId" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "ReasonCode": { - "maxLength": 256, - "type": "string", - "description": "失败原因码过滤(Online 原值:Timeout/CancelRace/RateLimited/DuplicateTicket;null = 不过滤)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "发生时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "Cursor": { - "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", - "nullable": true }, "PageSize": { "maximum": 100, "minimum": 1, "type": "integer", - "description": "页大小(1~100,默认 20)。", "format": "int32" - } - }, - "additionalProperties": false, - "description": "匹配失败原因分页查询输入参数(change C341 §3;Cursor 翻页透传 Online)。" - }, - "PageOnlineMessageAuditRequest": { - "required": [ - "ServerId" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "ChannelKind": { - "$ref": "#/components/schemas/OnlineChatChannelKind" - }, - "ParticipantPlayerId": { - "type": "string", - "description": "参与者玩家 Id 过滤(null = 不过滤)。", - "nullable": true }, - "Keyword": { - "type": "string", - "description": "内容关键词过滤(null = 不过滤)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "发生时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "Cursor": { + "OrderBy": { "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "description": "页大小(1~100,默认 20)。", - "format": "int32" - } - }, - "additionalProperties": false, - "description": "消息审计分页查询输入参数(vault:C7 四类频道;Cursor 翻页,vault:C2 S1.2 定稿)。\n\n查询实时透传 Online,Admin 不落消息镜像。" - }, - "PageOnlineReportCaseRequest": { - "required": [ - "ServerId" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "Status": { - "$ref": "#/components/schemas/OnlineReportCaseStatusKind" + "IsDescending": { + "type": "boolean" }, - "ReporterPlayerId": { + "SwitchKey": { "type": "string", - "description": "举报人玩家 Id 过滤(null = 不过滤)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "举报时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", + "description": "开关键模糊筛选", "nullable": true }, - "EndTime": { - "type": "integer", - "description": "举报时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", + "IsEnabled": { + "type": "boolean", + "description": "启停筛选", "nullable": true }, - "Cursor": { + "Audience": { "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", + "description": "消费方标记精确筛选:client / server / both", "nullable": true - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "description": "页大小(1~100,默认 20)。", - "format": "int32" } }, "additionalProperties": false, - "description": "举报案件分页查询输入参数(案件数据实时透传 Online,Admin 不落镜像;作用域必填,与消息审计页一致)。" + "description": "活动/功能开关管理分页查询输入参数" }, - "PageOpenAccessRequest": { + "PageGameAppOpenAccessRequest": { "type": "object", "properties": { "SearchKey": { @@ -90099,14 +89527,29 @@ }, "AccessKey": { "type": "string", - "description": "身份标识", + "description": "访问 Key 关键字。", + "nullable": true + }, + "Scenario": { + "type": "string", + "description": "责任场景编码。", + "nullable": true + }, + "SubjectName": { + "type": "string", + "description": "责任主体。", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "启用状态过滤(可空)。", "nullable": true } }, "additionalProperties": false, - "description": "开放接口身份输入参数" + "description": "应用开放访问凭证分页查询输入。" }, - "PageRoleRequest": { + "PageGameAppPackageRequest": { "type": "object", "properties": { "SearchKey": { @@ -90134,18 +89577,34 @@ }, "Name": { "type": "string", - "description": "名称", + "description": "分包名称", "nullable": true }, - "Code": { + "PackageName": { "type": "string", - "description": "编码", + "description": "包名", + "nullable": true + }, + "PackageVersion": { + "type": "string", + "description": "分包版本号", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用", + "nullable": true + }, + "ParentPackageId": { + "type": "string", + "description": "母包Id", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "游戏应用分包分页查询输入参数" }, - "PageSystemEmailProviderRequest": { + "PageGameAppReleaseVersionRequest": { "type": "object", "properties": { "SearchKey": { @@ -90171,27 +89630,41 @@ "IsDescending": { "type": "boolean" }, - "Purpose": { - "type": "integer", - "description": "平台系统邮件用途(精确过滤)。空表示不限。", - "format": "int32", + "Channel": { + "type": "string", "nullable": true }, - "Provider": { + "Platform": { "type": "string", - "description": "Provider 类型(精确过滤)。空表示不限。", "nullable": true }, - "IsActive": { - "type": "boolean", - "description": "是否启用。", + "AppVersion": { + "type": "string", + "nullable": true + }, + "Package": { + "type": "string", + "nullable": true + }, + "Language": { + "type": "string", + "nullable": true + }, + "OldVersion": { + "type": "string", + "description": "OldVersion", + "nullable": true + }, + "Description": { + "type": "string", + "description": "Description", "nullable": true } }, "additionalProperties": false, - "description": "平台系统邮件 Provider 配置分页查询输入参数。" + "description": "游戏版本管理分页查询输入参数" }, - "PageTenantAdvertisementCallbackConfigRequest": { + "PageGameAppRemoteConfigKeyRequest": { "type": "object", "properties": { "SearchKey": { @@ -90217,20 +89690,31 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { - "type": "boolean", + "KeyName": { + "type": "string", + "description": "JSON key 名称", "nullable": true }, - "Provider": { + "DisplayName": { "type": "string", - "description": "广告平台 Provider。", + "description": "显示名称", + "nullable": true + }, + "ValueType": { + "type": "string", + "description": "值类型:string、bool、long", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用", "nullable": true } }, "additionalProperties": false, - "description": "租户广告回调验签配置分页查询输入参数" + "description": "远程配置内容键定义分页查询输入参数" }, - "PageTenantAppSignatureKeyRequest": { + "PageGameAppRemoteConfigModeRequest": { "type": "object", "properties": { "SearchKey": { @@ -90256,15 +89740,26 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { + "ModeCode": { + "type": "string", + "description": "模式编码", + "nullable": true + }, + "DisplayName": { + "type": "string", + "description": "显示名称", + "nullable": true + }, + "IsEnabled": { "type": "boolean", + "description": "是否启用", "nullable": true } }, "additionalProperties": false, - "description": "App 传输签名密钥分页查询输入参数。" + "description": "远程配置模式定义分页查询输入参数" }, - "PageTenantClientApiPolicyRequest": { + "PageGameAppRemoteConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -90290,87 +89785,61 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false, - "description": "租户 Client API 运行策略分页查询输入参数" - }, - "PageTenantGameAdvertisementRewardEntityRequest": { - "type": "object", - "properties": { - "SearchKey": { + "Channel": { "type": "string", "nullable": true }, - "Page": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "OrderBy": { + "Platform": { "type": "string", "nullable": true }, - "IsDescending": { - "type": "boolean" + "AppVersion": { + "type": "string", + "nullable": true }, - "AreaId": { + "Package": { "type": "string", "nullable": true }, - "Provider": { + "Language": { "type": "string", - "description": "广告平台 Provider(等值匹配,标准化值 TopOn / GoogleAdMob / UnityAds)。", "nullable": true }, - "TransactionId": { + "Content": { "type": "string", - "description": "平台交易号(等值匹配)。", + "description": "Content", "nullable": true }, - "RoleId": { + "CheckResourceUrl": { "type": "string", - "description": "角色 Id(等值匹配)。", + "description": "CheckResourceUrl", "nullable": true }, - "UserId": { + "CheckAppVersionUrl": { "type": "string", - "description": "用户 Id。", + "description": "CheckAppVersionUrl", "nullable": true }, - "AdvertisementUnit": { + "CreatedName": { "type": "string", - "description": "广告位/单元(模糊匹配)。", + "description": "CreatedName", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/AdvertisementRewardStatusEnum" + "UpdatedName": { + "type": "string", + "description": "UpdatedName", + "nullable": true }, - "CreateTimeRange": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "description": "创建时间范围([0]=起始, [1]=结束)。", + "Description": { + "type": "string", + "description": "Description", "nullable": true } }, "additionalProperties": false, - "description": "广告奖励发放账本分页/导出查询输入参数(C114 / GFX-111 后端跟进)。\n\n过滤字段对齐前端检索表单:Provider/Status/RoleId 常用 + TransactionId/AdvertisementUnit/AreaId/时间范围 高级。" + "description": "远程配置管理分页查询输入参数" }, - "PageTenantGameAnnouncementEntityRequest": { + "PageGameAppServerConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -90396,104 +89865,41 @@ "IsDescending": { "type": "boolean" }, - "AreaId": { + "Channel": { "type": "string", "nullable": true }, - "Language": { + "Platform": { "type": "string", - "description": "语言", "nullable": true }, - "Title": { + "AppVersion": { "type": "string", - "description": "标题", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "开始时间", - "format": "int64", - "nullable": true - }, - "StartTimeRange": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "description": "开始时间范围", "nullable": true }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", + "Package": { + "type": "string", "nullable": true }, - "EndTimeRange": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "description": "结束时间范围", - "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏公告分页查询输入参数" - }, - "PageTenantGameAntiCheatEventRequest": { - "type": "object", - "properties": { - "SearchKey": { + "Language": { "type": "string", "nullable": true }, - "Page": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "OrderBy": { + "Key": { "type": "string", + "description": "配置键精确筛选", "nullable": true }, - "IsDescending": { - "type": "boolean" - }, - "Provider": { - "$ref": "#/components/schemas/AntiCheatProviderEnum" - }, - "RiskLevel": { - "$ref": "#/components/schemas/RiskLevelEnum" - }, - "ManualReviewState": { - "$ref": "#/components/schemas/ManualReviewStateEnum" - }, - "TargetType": { - "$ref": "#/components/schemas/AntiCheatTargetTypeEnum" - }, - "TargetId": { - "type": "string", - "description": "指向对象标识过滤(精确匹配)。可空。", + "Enabled": { + "type": "boolean", + "description": "键级启停筛选", "nullable": true } }, "additionalProperties": false, - "description": "反作弊事件分页查询输入。" + "description": "游戏运营配置管理分页查询输入参数" }, - "PageTenantGameAppOpenAccessRequest": { + "PageGameAppVersionDefinitionRequest": { "type": "object", "properties": { "SearchKey": { @@ -90518,32 +89924,12 @@ }, "IsDescending": { "type": "boolean" - }, - "AccessKey": { - "type": "string", - "description": "访问 Key 关键字。", - "nullable": true - }, - "Scenario": { - "type": "string", - "description": "责任场景编码。", - "nullable": true - }, - "SubjectName": { - "type": "string", - "description": "责任主体。", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "启用状态过滤(可空)。", - "nullable": true } }, "additionalProperties": false, - "description": "应用开放访问凭证分页查询输入。" + "description": "版本管理分页查询输入参数" }, - "PageTenantGameAreaClassifyEntityRequest": { + "PageGameAreaClassifyEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90578,7 +89964,7 @@ "additionalProperties": false, "description": "游戏大区分类分页查询输入参数" }, - "PageTenantGameAreaEntityRequest": { + "PageGameAreaEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90631,7 +90017,7 @@ "additionalProperties": false, "description": "游戏区服分页查询输入参数" }, - "PageTenantGameBannerAnnouncementEntityRequest": { + "PageGameBannerAnnouncementEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90725,7 +90111,7 @@ "additionalProperties": false, "description": "游戏内横幅公告分页查询输入参数" }, - "PageTenantGameCommodityEntityRequest": { + "PageGameCommodityEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90786,7 +90172,7 @@ "additionalProperties": false, "description": "游戏商品交易分页查询输入参数" }, - "PageTenantGameDockerTagEntityRequest": { + "PageGameDockerTagEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90821,7 +90207,7 @@ "additionalProperties": false, "description": "游戏大区分类分页查询输入参数" }, - "PageTenantGameGoodsCatalogueEntityRequest": { + "PageGameGoodsCatalogueEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90861,7 +90247,7 @@ "additionalProperties": false, "description": "游戏道具分类分页查询输入参数" }, - "PageTenantGameGoodsEntityRequest": { + "PageGameGoodsEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90902,7 +90288,7 @@ "additionalProperties": false, "description": "游戏资源分页查询输入参数" }, - "PageTenantGameLoginTicketKeyRequest": { + "PageGameLoginTicketKeyRequest": { "type": "object", "properties": { "SearchKey": { @@ -90936,7 +90322,7 @@ "additionalProperties": false, "description": "租户 Game 登录票据签名密钥分页查询输入参数。" }, - "PageTenantGameMailCampaignEntityRequest": { + "PageGameMailCampaignEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90992,7 +90378,7 @@ "additionalProperties": false, "description": "Campaign 分页查询输入。" }, - "PageTenantGameMailEntityRequest": { + "PageGameMailEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91042,7 +90428,7 @@ "additionalProperties": false, "description": "游戏邮件分页查询输入参数" }, - "PageTenantGameMailTemplateCategoryEntityRequest": { + "PageGameMailTemplateCategoryEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91082,7 +90468,7 @@ "additionalProperties": false, "description": "邮件模板分类分页查询输入参数" }, - "PageTenantGameMailTemplateEntityRequest": { + "PageGameMailTemplateEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91127,7 +90513,7 @@ "additionalProperties": false, "description": "邮件模板分页查询输入参数" }, - "PageTenantGameOnlineConfigRolloutRequest": { + "PageGameOnlineConfigRolloutRequest": { "type": "object", "properties": { "SearchKey": { @@ -91173,7 +90559,7 @@ "additionalProperties": false, "description": "配置灰度版本行分页查询输入(来源 change C343 / vault:C8 S7.7)。" }, - "PageTenantGameOnlinePlayerSegmentRequest": { + "PageGameOnlinePlayerSegmentRequest": { "type": "object", "properties": { "SearchKey": { @@ -91211,7 +90597,7 @@ "additionalProperties": false, "description": "玩家分群分页查询输入。" }, - "PageTenantGameOrderEntityRequest": { + "PageGameOrderEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91316,7 +90702,7 @@ "additionalProperties": false, "description": "游戏支付订单分页查询输入参数" }, - "PageTenantGameOrderFulfillmentEntityRequest": { + "PageGameOrderFulfillmentEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91402,7 +90788,56 @@ "additionalProperties": false, "description": "权益发货账本分页查询输入参数(C120)。过滤字段严格锁定见 change C120 §3 BuildPageQuery 表。" }, - "PageTenantGamePenaltyAppealEntityRequest": { + "PageGamePaymentConfigRequest": { + "type": "object", + "properties": { + "SearchKey": { + "type": "string", + "nullable": true + }, + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "OrderBy": { + "type": "string", + "nullable": true + }, + "IsDescending": { + "type": "boolean" + }, + "IsActive": { + "type": "boolean", + "nullable": true + }, + "PackageId": { + "type": "string", + "description": "分包ID", + "nullable": true + }, + "PayChannel": { + "type": "string", + "description": "支付渠道", + "nullable": true + }, + "IsSandbox": { + "type": "boolean", + "description": "是否沙盒配置", + "nullable": true + } + }, + "additionalProperties": false, + "description": "游戏支付配置分页查询输入参数" + }, + "PageGamePenaltyAppealEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91440,7 +90875,7 @@ "additionalProperties": false, "description": "申诉分页查询输入参数。" }, - "PageTenantGamePenaltyEntityRequest": { + "PageGamePenaltyEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91484,7 +90919,7 @@ "additionalProperties": false, "description": "处罚分页查询输入参数。" }, - "PageTenantGameRedeemCodeChannelEntityRequest": { + "PageGameRedeemCodeChannelEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91519,7 +90954,7 @@ "additionalProperties": false, "description": "兑换码渠道分页查询输入参数" }, - "PageTenantGameRedeemCodeEntityRequest": { + "PageGameRedeemCodeEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91580,7 +91015,7 @@ "additionalProperties": false, "description": "兑换码分页查询输入参数" }, - "PageTenantGameRedeemCodeUseRecordEntityRequest": { + "PageGameRedeemCodeUseRecordEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91622,14 +91057,14 @@ }, "ChannelId": { "type": "string", - "description": "兑换码渠道/分组ID(关联 TenantGameRedeemCodeEntity.ChannelId 过滤)", + "description": "兑换码渠道/分组ID(关联 GameRedeemCodeEntity.ChannelId 过滤)", "nullable": true } }, "additionalProperties": false, "description": "兑换记录分页查询输入参数" }, - "PageTenantGameReportEntityRequest": { + "PageGameReportEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91673,7 +91108,7 @@ "additionalProperties": false, "description": "举报分页查询输入参数。" }, - "PageTenantGameRewardTemplateEntityRequest": { + "PageGameRewardTemplateEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91718,7 +91153,7 @@ "additionalProperties": false, "description": "奖励模板分页查询输入参数。" }, - "PageTenantGameRewardTemplateGroupEntityRequest": { + "PageGameRewardTemplateGroupEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91758,7 +91193,7 @@ "additionalProperties": false, "description": "奖励模板分组分页查询输入参数。" }, - "PageTenantGameRoleEntityRequest": { + "PageGameRoleEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91848,7 +91283,7 @@ "additionalProperties": false, "description": "游戏角色分页查询输入参数" }, - "PageTenantGameTimeJobEntityRequest": { + "PageGameTimeJobEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91883,7 +91318,7 @@ "additionalProperties": false, "description": "游戏定时任务分页查询输入参数" }, - "PageTenantGameUserEntityRequest": { + "PageGameUserEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91931,7 +91366,7 @@ "additionalProperties": false, "description": "游戏账号分页查询输入参数" }, - "PageTenantGameWebShopEntityRequest": { + "PageGameWebShopEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91981,7 +91416,7 @@ "additionalProperties": false, "description": "游戏邮件分页查询输入参数" }, - "PageTenantGameWebShopOrderEntityRequest": { + "PageGameWebShopOrderEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -92031,7 +91466,7 @@ "additionalProperties": false, "description": "游戏邮件分页查询输入参数" }, - "PageTenantObjectStorageConfigRequest": { + "PageJobRequest": { "type": "object", "properties": { "SearchKey": { @@ -92057,27 +91492,22 @@ "IsDescending": { "type": "boolean" }, - "Provider": { + "JobId": { "type": "string", - "description": "按提供商过滤。", + "description": "作业Id", "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "按启用状态过滤。", + "Description": { + "type": "string", + "description": "描述信息", "nullable": true } }, - "additionalProperties": false, - "description": "租户对象存储配置分页查询入参。" + "additionalProperties": false }, - "PageTenantSessionKeyRequest": { + "PageLogRequest": { "type": "object", "properties": { - "SearchKey": { - "type": "string", - "nullable": true - }, "Page": { "maximum": 2147483647, "minimum": 1, @@ -92097,15 +91527,27 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { - "type": "boolean", + "SearchKey": { + "type": "string", + "description": "关键字查询(不区分大小写,按各日志服务声明的 `SearchableTextColumns` 多列 OR 模糊匹配)。\n与时间范围条件 `AND` 叠加;为空/null 时行为与现状完全一致(不过滤)。\n继承自 GameFrameX.Core.BaseInputOutput.BasePageRequest,此处显式列出便于契约可读。", + "nullable": true + }, + "StartTime": { + "type": "integer", + "description": "开始时间", + "format": "int64", + "nullable": true + }, + "EndTime": { + "type": "integer", + "description": "结束时间", + "format": "int64", "nullable": true } }, - "additionalProperties": false, - "description": "App 会话密钥分页查询输入参数。" + "additionalProperties": false }, - "PageUserRequest": { + "PageObjectStorageConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -92131,765 +91573,773 @@ "IsDescending": { "type": "boolean" }, - "Account": { - "type": "string", - "description": "账号", - "nullable": true - }, - "RealName": { + "Provider": { "type": "string", - "description": "姓名", + "description": "按提供商过滤。", "nullable": true }, - "Phone": { - "type": "string", - "description": "手机号", + "IsEnabled": { + "type": "boolean", + "description": "按启用状态过滤。", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "租户对象存储配置分页查询入参。" }, - "PaymentConfigChannel": { + "PageOnlineAssetAuditRequest": { + "required": [ + "ServerId" + ], "type": "object", "properties": { - "Value": { + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "nullable": true + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" }, - "Label": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PaymentConfigField": { - "type": "object", - "properties": { - "Key": { + "OperatorId": { + "maxLength": 256, "type": "string", + "description": "操作者 Id 过滤(null = 不过滤)。", "nullable": true }, - "Label": { + "PlayerId": { + "maxLength": 256, "type": "string", + "description": "目标玩家 Id 过滤(null = 不过滤)。", "nullable": true }, - "Type": { + "CommandType": { + "maxLength": 256, "type": "string", + "description": "命令类型过滤(grant / revoke 等;null = 不过滤)。", "nullable": true }, - "Required": { - "type": "boolean" - }, - "Help": { - "type": "string", + "StartTime": { + "type": "integer", + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", "nullable": true }, - "Default": { + "EndTime": { + "type": "integer", + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", "nullable": true }, - "Options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentConfigOption" - }, + "Cursor": { + "type": "string", + "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "资产审计分页查询输入参数(操作者/时间/作用域/命令类型 + 目标玩家;Cursor 翻页,vault:C2 S1.2)。\n\nServerId 必填;审计查询无跨区服聚合端点。" }, - "PaymentConfigOption": { + "PageOnlineAssetLedgerRequest": { + "required": [ + "PlayerId", + "ServerId" + ], "type": "object", "properties": { - "Value": { + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + }, + "PlayerId": { + "maxLength": 256, + "minLength": 1, + "type": "string", + "description": "目标玩家 Id(必填;流水页按玩家查询)。" + }, + "CurrencyOrItemType": { + "maxLength": 256, "type": "string", + "description": "货币或道具类型过滤(null = 不过滤,返回该玩家全部资产维度流水)。", "nullable": true }, - "Label": { + "StartTime": { + "type": "integer", + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true + }, + "EndTime": { + "type": "integer", + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true + }, + "Cursor": { "type": "string", + "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "资产流水分页查询输入参数(vault:C4 LedgerEntry 查询;Cursor 翻页,vault:C2 S1.2 定稿)。\n\n查询实时透传 Online,Admin 不落资产镜像。" }, - "PaymentConfigSchema": { + "PageOnlineAuditSearchRequest": { "type": "object", "properties": { - "Channel": { + "Operator": { + "maxLength": 256, "type": "string", + "description": "操作者过滤(Admin 操作日志按账号/姓名匹配,Online/域命令按操作者 Id;null = 不过滤)。", "nullable": true }, - "Label": { + "TargetPlayerId": { + "maxLength": 256, "type": "string", + "description": "目标对象过滤(玩家 Id 等;null = 不过滤。Admin 操作日志来源经 RequestParam 提取尽力匹配,提取不到的行不命中)。", "nullable": true }, - "Fields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentConfigField" - }, + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "区服作用域过滤(null = 全部区服;Online 审计事件来源提供时参与聚合)。", "nullable": true - } - }, - "additionalProperties": false - }, - "PenaltyActionTypeEnum": { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Ban", - "RestrictLogin", - "Mute", - "RestrictTrade", - "RestrictMatch" - ], - "x-enum-descriptions": [ - "封禁", - "限制登录", - "禁言", - "限制交易", - "限制匹配" - ] - }, - "PenaltyStatusEnum": { - "enum": [ - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Active", - "Revoked", - "Expired" - ], - "x-enum-descriptions": [ - "生效中", - "已撤销", - "已过期" - ] - }, - "PenaltyTargetTypeEnum": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Account", - "Role", - "Device", - "Ip" - ], - "x-enum-descriptions": [ - "账号", - "角色", - "设备", - "IP" - ] - }, - "PlatformCaptchaConfigResponse": { - "type": "object", - "properties": { - "IsEnabled": { - "type": "boolean", - "description": "是否启用登录图形验证码。" }, - "Version": { - "type": "integer", - "description": "配置版本。", - "format": "int64" - }, - "CaptchaType": { - "type": "integer", - "description": "验证码类型。", - "format": "int32" + "CommandKind": { + "maxLength": 256, + "type": "string", + "description": "命令类型过滤(substring 匹配,如 penalty / grant / rollout;null = 不过滤)。", + "nullable": true }, - "CodeLength": { + "StartTime": { "type": "integer", - "description": "验证码长度。", - "format": "int32" + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "ExpirySeconds": { + "EndTime": { "type": "integer", - "description": "过期秒数。", - "format": "int32" - }, - "IgnoreCase": { - "type": "boolean", - "description": "是否忽略大小写。" + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "ImageOption": { - "$ref": "#/components/schemas/PlatformCaptchaImageRequest" + "Cursor": { + "maxLength": 256, + "type": "string", + "description": "游标(上一页返回的 NextCursor = 末行 OccurredAt Unix 秒的时间倒序 keyset;首页不传)。", + "nullable": true }, - "UpdateTime": { + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", - "description": "最近更新时间。", - "format": "int64", - "nullable": true + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, "additionalProperties": false, - "description": "平台图形验证码配置输出。" + "description": "统一审计检索分页输入参数(五维过滤:操作者/对象/作用域/命令类型/时间窗;change C344 / vault:C9 S8.2)。\n\n作用域维度(ServerId)在此是可选过滤而非调用前置:本地两来源(Admin 操作日志 / 域命令记录)\n支持无作用域全量检索;Online 审计事件来源仅在 ServerId 提供时参与聚合\n(区服上下文是每次 Online 调用的前置条件),未锚定时该来源静默跳过(三来源口径见 OnlineAuditSourceMap)。" }, - "PlatformCaptchaConfigUpdateRequest": { - "required": [ - "ImageOption" - ], + "PageOnlineAuditSearchResponse": { "type": "object", "properties": { - "IsEnabled": { - "type": "boolean", - "description": "是否启用登录图形验证码。" - }, - "CaptchaType": { - "maximum": 11, - "minimum": 0, - "type": "integer", - "description": "验证码类型。", - "format": "int32" - }, - "CodeLength": { - "maximum": 8, - "minimum": 1, - "type": "integer", - "description": "验证码长度。", - "format": "int32" + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OnlineAuditSearchEntryResponse" + }, + "description": "统一审计行(三来源归并,按 OccurredAt 倒序)。", + "nullable": true }, - "ExpirySeconds": { - "maximum": 600, - "minimum": 10, - "type": "integer", - "description": "过期秒数。", - "format": "int32" + "NextCursor": { + "type": "string", + "description": "下一页游标(= 末行 OccurredAt Unix 秒的时间倒序 keyset;null = 没有更多)。", + "nullable": true }, - "IgnoreCase": { + "HasMore": { "type": "boolean", - "description": "是否忽略大小写。" - }, - "ImageOption": { - "$ref": "#/components/schemas/PlatformCaptchaImageRequest" + "description": "是否还有更多(任一来源仍有剩余即为 true)。" } }, "additionalProperties": false, - "description": "平台图形验证码配置更新输入。" + "description": "统一审计检索分页响应(Admin 出参;change C344 / vault:C9 S8.2)。" }, - "PlatformCaptchaImageRequest": { + "PageOnlineMatchAbnormalTicketRequest": { + "required": [ + "AbnormalKind", + "ServerId" + ], "type": "object", "properties": { - "Animation": { - "type": "boolean", - "description": "是否启用 GIF 动画。" - }, - "FontSize": { - "maximum": 96, - "minimum": 12, - "type": "number", - "description": "字号。", - "format": "float" - }, - "Width": { - "maximum": 400, - "minimum": 80, - "type": "integer", - "description": "宽度。", - "format": "int32" - }, - "Height": { - "maximum": 180, - "minimum": 30, - "type": "integer", - "description": "高度。", - "format": "int32" - }, - "BubbleMinRadius": { - "maximum": 40, - "minimum": 0, - "type": "integer", - "description": "气泡最小半径。", - "format": "int32" - }, - "BubbleMaxRadius": { - "maximum": 60, - "minimum": 0, - "type": "integer", - "description": "气泡最大半径。", - "format": "int32" + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" }, - "BubbleCount": { - "maximum": 30, - "minimum": 0, - "type": "integer", - "description": "气泡数量。", - "format": "int32" + "AbnormalKind": { + "$ref": "#/components/schemas/AbnormalKind" }, - "BubbleThickness": { - "maximum": 10, - "minimum": 0, - "type": "number", - "description": "气泡线条厚度。", - "format": "float" + "Cursor": { + "type": "string", + "description": "游标(上一页返回的 NextCursor;首页不传)。", + "nullable": true }, - "InterferenceLineCount": { - "maximum": 30, - "minimum": 0, + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", - "description": "干扰线数量。", + "description": "页大小(1~100,默认 20)。", "format": "int32" + } + }, + "additionalProperties": false, + "description": "异常 Ticket 分页查询输入参数(change C341 §3;按异常类别检索,Cursor 翻页透传 Online)。" + }, + "PageOnlineMatchFailureRequest": { + "required": [ + "ServerId" + ], + "type": "object", + "properties": { + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" }, - "FontFamily": { + "ReasonCode": { "maxLength": 256, "type": "string", - "description": "字体名称。", + "description": "失败原因码过滤(Online 原值:Timeout/CancelRace/RateLimited/DuplicateTicket;null = 不过滤)。", "nullable": true }, - "FrameDelay": { - "maximum": 2000, - "minimum": 50, + "StartTime": { "type": "integer", - "description": "动画帧延迟。", - "format": "int32" + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "BackgroundColor": { - "maxLength": 256, - "type": "string", - "description": "背景颜色。", + "EndTime": { + "type": "integer", + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", "nullable": true }, - "ForegroundColors": { - "maxLength": 256, + "Cursor": { "type": "string", - "description": "前景颜色,多个颜色用逗号分隔。", + "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true }, - "Quality": { + "PageSize": { "maximum": 100, "minimum": 1, "type": "integer", - "description": "图片质量。", + "description": "页大小(1~100,默认 20)。", "format": "int32" - }, - "TextBold": { - "type": "boolean", - "description": "是否粗体。" } }, "additionalProperties": false, - "description": "平台图形验证码图像配置输入。" + "description": "匹配失败原因分页查询输入参数(change C341 §3;Cursor 翻页透传 Online)。" }, - "PlatformJwtConfigResponse": { + "PageOnlineMessageAuditRequest": { + "required": [ + "ServerId" + ], "type": "object", "properties": { - "IssuerSigningKey": { + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "签名密钥掩码。", - "nullable": true + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" }, - "HasSigningKey": { - "type": "boolean", - "description": "是否已配置签名密钥。" + "ChannelKind": { + "$ref": "#/components/schemas/OnlineChatChannelKind" }, - "ValidIssuer": { + "ParticipantPlayerId": { "type": "string", - "description": "签发方。", + "description": "参与者玩家 Id 过滤(null = 不过滤)。", "nullable": true }, - "ValidAudience": { + "Keyword": { "type": "string", - "description": "签收方。", + "description": "内容关键词过滤(null = 不过滤)。", "nullable": true }, - "ClockSkew": { + "StartTime": { "type": "integer", - "description": "过期时间容错秒数。", - "format": "int64" - }, - "Algorithm": { - "type": "string", - "description": "签名算法。", + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", "nullable": true }, - "ValidateIssuerSigningKey": { - "type": "boolean", - "description": "验证签名密钥。" - }, - "ValidateIssuer": { - "type": "boolean", - "description": "验证签发方。" - }, - "ValidateAudience": { - "type": "boolean", - "description": "验证签收方。" - }, - "ValidateLifetime": { - "type": "boolean", - "description": "验证生命周期。" - }, - "TokenVersion": { - "type": "integer", - "description": "当前全局令牌版本。", - "format": "int64" - }, - "UpdateTime": { + "EndTime": { "type": "integer", - "description": "最近更新时间。", + "description": "发生时间窗终点(Unix 秒;null = 不限)。", "format": "int64", "nullable": true + }, + "Cursor": { + "type": "string", + "description": "游标(上一页返回的 NextCursor;首页不传)。", + "nullable": true + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, "additionalProperties": false, - "description": "平台 JWT 配置输出。" + "description": "消息审计分页查询输入参数(vault:C7 四类频道;Cursor 翻页,vault:C2 S1.2 定稿)。\n\n查询实时透传 Online,Admin 不落消息镜像。" }, - "PlatformJwtConfigUpdateRequest": { + "PageOnlineReportCaseRequest": { "required": [ - "ValidAudience", - "ValidIssuer" + "ServerId" ], "type": "object", "properties": { - "IssuerSigningKey": { + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "签名密钥。传入 ****** 表示保留当前密钥。", - "nullable": true + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" }, - "ValidIssuer": { - "minLength": 1, + "Status": { + "$ref": "#/components/schemas/OnlineReportCaseStatusKind" + }, + "ReporterPlayerId": { "type": "string", - "description": "签发方。" + "description": "举报人玩家 Id 过滤(null = 不过滤)。", + "nullable": true }, - "ValidAudience": { - "minLength": 1, + "StartTime": { + "type": "integer", + "description": "举报时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true + }, + "EndTime": { + "type": "integer", + "description": "举报时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true + }, + "Cursor": { "type": "string", - "description": "签收方。" + "description": "游标(上一页返回的 NextCursor;首页不传)。", + "nullable": true }, - "ClockSkew": { - "maximum": 300, - "minimum": 0, + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", - "description": "过期时间容错秒数。", - "format": "int64" + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, "additionalProperties": false, - "description": "平台 JWT 配置更新输入。" + "description": "举报案件分页查询输入参数(案件数据实时透传 Online,Admin 不落镜像;作用域必填,与消息审计页一致)。" }, - "PlatformLoggingConfigResponse": { + "PageOpenAccessRequest": { "type": "object", "properties": { - "File": { - "$ref": "#/components/schemas/PlatformLoggingFileResponse" + "SearchKey": { + "type": "string", + "nullable": true }, - "Database": { - "$ref": "#/components/schemas/PlatformLoggingDatabaseResponse" + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "ElasticSearch": { - "$ref": "#/components/schemas/PlatformLoggingElasticSearchResponse" + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "Monitor": { - "$ref": "#/components/schemas/PlatformLoggingMonitorResponse" + "OrderBy": { + "type": "string", + "nullable": true }, - "UpdateTime": { - "type": "integer", - "description": "最近更新时间(Unix 秒)。", - "format": "int64", + "IsDescending": { + "type": "boolean" + }, + "AccessKey": { + "type": "string", + "description": "身份标识", "nullable": true } }, "additionalProperties": false, - "description": "平台日志配置输出。ES !:ElasticSearchServerUris 经掩码处理,不回显明文 URI/凭据。" + "description": "开放接口身份输入参数" }, - "PlatformLoggingConfigUpdateRequest": { + "PageRoleRequest": { "type": "object", "properties": { - "File": { - "$ref": "#/components/schemas/PlatformLoggingFileUpdateRequest" + "SearchKey": { + "type": "string", + "nullable": true }, - "Database": { - "$ref": "#/components/schemas/PlatformLoggingDatabaseUpdateRequest" + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "ElasticSearch": { - "$ref": "#/components/schemas/PlatformLoggingElasticSearchUpdateRequest" + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "Monitor": { - "$ref": "#/components/schemas/PlatformLoggingMonitorUpdateRequest" - } - }, - "additionalProperties": false, - "description": "平台日志配置更新输入。\nES !:ElasticSearchServerUris:若全部为掩码占位 `\"***\"` 视为「未变更」,保留库内原值;\n含非占位项则按非占位项替换;空列表视为清空。" - }, - "PlatformLoggingDatabaseResponse": { - "type": "object", - "properties": { - "IsEnabled": { + "OrderBy": { + "type": "string", + "nullable": true + }, + "IsDescending": { "type": "boolean" }, - "MinimumLevel": { + "Name": { "type": "string", + "description": "名称", "nullable": true - } - }, - "additionalProperties": false - }, - "PlatformLoggingDatabaseUpdateRequest": { - "type": "object", - "properties": { - "IsEnabled": { - "type": "boolean" }, - "MinimumLevel": { + "Code": { "type": "string", + "description": "编码", "nullable": true } }, "additionalProperties": false }, - "PlatformLoggingElasticSearchResponse": { + "PageSessionKeyRequest": { "type": "object", "properties": { - "IsEnabled": { - "type": "boolean" - }, - "ServerUris": { - "type": "array", - "items": { - "type": "string" - }, + "SearchKey": { + "type": "string", "nullable": true }, - "DefaultIndex": { + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "OrderBy": { "type": "string", "nullable": true + }, + "IsDescending": { + "type": "boolean" + }, + "IsActive": { + "type": "boolean", + "nullable": true } }, "additionalProperties": false, - "description": "ES 日志输出。ServerUris 元素统一掩码为 `\"***\"`,仅保留数量,不回显明文。" + "description": "App 会话密钥分页查询输入参数。" }, - "PlatformLoggingElasticSearchUpdateRequest": { + "PageSystemEmailProviderRequest": { "type": "object", "properties": { - "IsEnabled": { + "SearchKey": { + "type": "string", + "nullable": true + }, + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "OrderBy": { + "type": "string", + "nullable": true + }, + "IsDescending": { "type": "boolean" }, - "ServerUris": { - "type": "array", - "items": { - "type": "string" - }, + "Purpose": { + "type": "integer", + "description": "平台系统邮件用途(精确过滤)。空表示不限。", + "format": "int32", "nullable": true }, - "DefaultIndex": { + "Provider": { "type": "string", + "description": "Provider 类型(精确过滤)。空表示不限。", + "nullable": true + }, + "IsActive": { + "type": "boolean", + "description": "是否启用。", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "平台系统邮件 Provider 配置分页查询输入参数。" }, - "PlatformLoggingFileResponse": { + "PageUserRequest": { "type": "object", "properties": { - "IsEnabled": { - "type": "boolean" - }, - "FileName": { + "SearchKey": { "type": "string", "nullable": true }, - "Append": { - "type": "boolean" - }, - "FileSizeLimitBytes": { + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "format": "int64" + "format": "int32" }, - "MaxRollingFiles": { + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", "format": "int32" + }, + "OrderBy": { + "type": "string", + "nullable": true + }, + "IsDescending": { + "type": "boolean" + }, + "Account": { + "type": "string", + "description": "账号", + "nullable": true + }, + "RealName": { + "type": "string", + "description": "姓名", + "nullable": true + }, + "Phone": { + "type": "string", + "description": "手机号", + "nullable": true } }, "additionalProperties": false }, - "PlatformLoggingFileUpdateRequest": { + "PaymentConfigChannel": { "type": "object", "properties": { - "IsEnabled": { - "type": "boolean" - }, - "FileName": { - "maximum": 4096, - "minimum": 1, + "Value": { "type": "string", "nullable": true }, - "Append": { - "type": "boolean" - }, - "FileSizeLimitBytes": { - "maximum": 1073741824, - "minimum": 1024, - "type": "integer", - "format": "int64" - }, - "MaxRollingFiles": { - "maximum": 365, - "minimum": 1, - "type": "integer", - "format": "int32" + "Label": { + "type": "string", + "nullable": true } }, "additionalProperties": false }, - "PlatformLoggingMonitorResponse": { + "PaymentConfigField": { "type": "object", "properties": { - "GlobalEnabled": { - "type": "boolean" + "Key": { + "type": "string", + "nullable": true }, - "BahLogLevel": { + "Label": { "type": "string", "nullable": true }, - "WithReturnValue": { - "type": "boolean" + "Type": { + "type": "string", + "nullable": true }, - "ReturnValueThreshold": { - "type": "integer", - "format": "int32" + "Required": { + "type": "boolean" }, - "JsonBehavior": { + "Help": { "type": "string", "nullable": true }, - "JsonIndented": { - "type": "boolean" + "Default": { + "nullable": true }, - "UseUtcTimestamp": { - "type": "boolean" + "Options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentConfigOption" + }, + "nullable": true } }, "additionalProperties": false }, - "PlatformLoggingMonitorUpdateRequest": { + "PaymentConfigOption": { "type": "object", "properties": { - "GlobalEnabled": { - "type": "boolean" - }, - "BahLogLevel": { + "Value": { "type": "string", "nullable": true }, - "WithReturnValue": { - "type": "boolean" - }, - "ReturnValueThreshold": { - "maximum": 100000, - "minimum": 0, - "type": "integer", - "format": "int32" - }, - "JsonBehavior": { + "Label": { "type": "string", "nullable": true - }, - "JsonIndented": { - "type": "boolean" - }, - "UseUtcTimestamp": { - "type": "boolean" } }, "additionalProperties": false }, - "PlatformPasswordPolicyConfigResponse": { + "PaymentConfigSchema": { "type": "object", "properties": { - "StrongPassword": { - "type": "boolean", - "description": "是否开启密码强度验证。" - }, - "PasswordStrengthValidation": { + "Channel": { "type": "string", - "description": "密码强度验证正则表达式。", "nullable": true }, - "PasswordStrengthValidationMsg": { + "Label": { "type": "string", - "description": "密码强度验证失败提示。", "nullable": true }, - "UpdateTime": { - "type": "integer", - "description": "最近更新时间(Unix 秒)。", - "format": "int64", + "Fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentConfigField" + }, "nullable": true } }, - "additionalProperties": false, - "description": "平台密码策略配置输出(C173)。仅暴露密码强度策略字段,绝不回显 Cryptogram 密钥(CryptoType/PublicKey/PrivateKey)。" + "additionalProperties": false + }, + "PenaltyActionTypeEnum": { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Ban", + "RestrictLogin", + "Mute", + "RestrictTrade", + "RestrictMatch" + ], + "x-enum-descriptions": [ + "封禁", + "限制登录", + "禁言", + "限制交易", + "限制匹配" + ] + }, + "PenaltyStatusEnum": { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Active", + "Revoked", + "Expired" + ], + "x-enum-descriptions": [ + "生效中", + "已撤销", + "已过期" + ] }, - "PlatformPasswordPolicyConfigUpdateRequest": { - "type": "object", - "properties": { - "StrongPassword": { - "type": "boolean", - "description": "是否开启密码强度验证。" - }, - "PasswordStrengthValidation": { - "maximum": 1024, - "minimum": 1, - "type": "string", - "description": "密码强度验证正则表达式(必须可编译)。", - "nullable": true - }, - "PasswordStrengthValidationMsg": { - "maximum": 1024, - "minimum": 1, - "type": "string", - "description": "密码强度验证失败提示。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "平台密码策略配置更新输入(SuperAdmin-only)。" + "PenaltyTargetTypeEnum": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Account", + "Role", + "Device", + "Ip" + ], + "x-enum-descriptions": [ + "账号", + "角色", + "设备", + "IP" + ] }, - "PlatformRateLimitConfigResponse": { + "PlatformCaptchaConfigResponse": { "type": "object", "properties": { "IsEnabled": { "type": "boolean", - "description": "是否启用全局 IP 固定窗口限流。" + "description": "是否启用登录图形验证码。" }, "Version": { "type": "integer", - "description": "当前配置版本。", + "description": "配置版本。", "format": "int64" }, - "PermitLimit": { + "CaptchaType": { "type": "integer", - "description": "单个固定窗口允许的请求数。", + "description": "验证码类型。", "format": "int32" }, - "WindowSeconds": { + "CodeLength": { "type": "integer", - "description": "固定窗口秒数。", + "description": "验证码长度。", "format": "int32" }, - "QueueLimit": { + "ExpirySeconds": { "type": "integer", - "description": "排队请求数量。", + "description": "过期秒数。", "format": "int32" }, + "IgnoreCase": { + "type": "boolean", + "description": "是否忽略大小写。" + }, + "ImageOption": { + "$ref": "#/components/schemas/PlatformCaptchaImageRequest" + }, "UpdateTime": { "type": "integer", "description": "最近更新时间。", @@ -92898,529 +92348,598 @@ } }, "additionalProperties": false, - "description": "平台限流配置输出。" + "description": "平台图形验证码配置输出。" }, - "PlatformRateLimitConfigUpdateRequest": { + "PlatformCaptchaConfigUpdateRequest": { + "required": [ + "ImageOption" + ], "type": "object", "properties": { "IsEnabled": { "type": "boolean", - "description": "是否启用全局 IP 固定窗口限流。" + "description": "是否启用登录图形验证码。" }, - "PermitLimit": { - "maximum": 100000, - "minimum": 1, + "CaptchaType": { + "maximum": 11, + "minimum": 0, "type": "integer", - "description": "单个固定窗口允许的请求数。", + "description": "验证码类型。", "format": "int32" }, - "WindowSeconds": { - "maximum": 3600, + "CodeLength": { + "maximum": 8, "minimum": 1, "type": "integer", - "description": "固定窗口秒数。", + "description": "验证码长度。", "format": "int32" }, - "QueueLimit": { - "maximum": 100000, - "minimum": 0, + "ExpirySeconds": { + "maximum": 600, + "minimum": 10, "type": "integer", - "description": "排队请求数量。", + "description": "过期秒数。", "format": "int32" + }, + "IgnoreCase": { + "type": "boolean", + "description": "是否忽略大小写。" + }, + "ImageOption": { + "$ref": "#/components/schemas/PlatformCaptchaImageRequest" } }, "additionalProperties": false, - "description": "平台限流配置更新输入。" - }, - "PreviewMailCampaignEntityRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - } - }, - "additionalProperties": false, - "description": "预览输入(Campaign Id)。" + "description": "平台图形验证码配置更新输入。" }, - "PreviewMailCampaignEntityResponse": { + "PlatformCaptchaImageRequest": { "type": "object", "properties": { - "Code": { - "$ref": "#/components/schemas/MailCampaignServerCode" + "Animation": { + "type": "boolean", + "description": "是否启用 GIF 动画。" }, - "EstimatedHitCount": { + "FontSize": { + "maximum": 96, + "minimum": 12, + "type": "number", + "description": "字号。", + "format": "float" + }, + "Width": { + "maximum": 400, + "minimum": 80, "type": "integer", - "description": "预估命中玩家数(一期 -1 = 未知)。", - "format": "int64" + "description": "宽度。", + "format": "int32" }, - "Message": { + "Height": { + "maximum": 180, + "minimum": 30, + "type": "integer", + "description": "高度。", + "format": "int32" + }, + "BubbleMinRadius": { + "maximum": 40, + "minimum": 0, + "type": "integer", + "description": "气泡最小半径。", + "format": "int32" + }, + "BubbleMaxRadius": { + "maximum": 60, + "minimum": 0, + "type": "integer", + "description": "气泡最大半径。", + "format": "int32" + }, + "BubbleCount": { + "maximum": 30, + "minimum": 0, + "type": "integer", + "description": "气泡数量。", + "format": "int32" + }, + "BubbleThickness": { + "maximum": 10, + "minimum": 0, + "type": "number", + "description": "气泡线条厚度。", + "format": "float" + }, + "InterferenceLineCount": { + "maximum": 30, + "minimum": 0, + "type": "integer", + "description": "干扰线数量。", + "format": "int32" + }, + "FontFamily": { + "maxLength": 256, "type": "string", - "description": "提示信息。", + "description": "字体名称。", "nullable": true - } - }, - "additionalProperties": false, - "description": "预览输出。" - }, - "PublishConfigRolloutRequest": { - "required": [ - "ConfigKey", - "ConfigKind", - "Percent", - "Reason", - "SegmentId", - "ServerId" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "目标区服Id(Online 作用域 ServerId)。" }, - "ConfigKind": { - "$ref": "#/components/schemas/OnlineConfigRolloutKind" + "FrameDelay": { + "maximum": 2000, + "minimum": 50, + "type": "integer", + "description": "动画帧延迟。", + "format": "int32" }, - "ConfigKey": { - "minLength": 1, + "BackgroundColor": { + "maxLength": 256, "type": "string", - "description": "配置业务键(所辖配置域实体 Id 的字符串形式)。" + "description": "背景颜色。", + "nullable": true }, - "SegmentId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + "ForegroundColors": { + "maxLength": 256, "type": "string", - "description": "灰度分群Id(必须为已同步 Online 的分群)。" + "description": "前景颜色,多个颜色用逗号分隔。", + "nullable": true }, - "Percent": { + "Quality": { "maximum": 100, "minimum": 1, "type": "integer", - "description": "灰度百分比(1-100:0 无意义即拒绝,100 = 分群内全量;语义边界见 OnlineRolloutSemanticMap)。", + "description": "图片质量。", "format": "int32" }, - "Reason": { - "minLength": 1, - "type": "string", - "description": "下发理由(必填,进审计)。" + "TextBold": { + "type": "boolean", + "description": "是否粗体。" } }, "additionalProperties": false, - "description": "灰度发布输入(来源 change C343 / vault:C8 S7.7)。Percent 边界常量直接引用 `OnlineRolloutSemanticMap`(禁内联第二套数值)。" + "description": "平台图形验证码图像配置输入。" }, - "PublishConfigRolloutResponse": { + "PlatformJwtConfigResponse": { "type": "object", "properties": { - "Id": { - "type": "string", - "description": "版本行Id。" - }, - "ServerId": { + "IssuerSigningKey": { "type": "string", - "description": "目标区服Id。" + "description": "签名密钥掩码。", + "nullable": true }, - "ConfigKind": { - "$ref": "#/components/schemas/OnlineConfigRolloutKind" + "HasSigningKey": { + "type": "boolean", + "description": "是否已配置签名密钥。" }, - "ConfigKey": { + "ValidIssuer": { "type": "string", - "description": "配置业务键(所辖配置域实体 Id 字符串)。", + "description": "签发方。", "nullable": true }, - "ConfigVersion": { - "type": "integer", - "description": "Admin 侧分配的下发版本号(同配置维度递增;发布与回滚共用序列)。", - "format": "int32" - }, - "SegmentId": { + "ValidAudience": { "type": "string", - "description": "灰度分群Id。" - }, - "Percent": { - "type": "integer", - "description": "灰度百分比(1-100,语义见 OnlineRolloutSemanticMap)。", - "format": "int32" - }, - "Status": { - "$ref": "#/components/schemas/OnlineConfigRolloutStatus" + "description": "签收方。", + "nullable": true }, - "TargetVersion": { + "ClockSkew": { "type": "integer", - "description": "回滚目标版本(仅回滚行有值,指向要恢复到的历史 ConfigVersion)。", - "format": "int32" + "description": "过期时间容错秒数。", + "format": "int64" }, - "Reason": { + "Algorithm": { "type": "string", - "description": "本次下发理由。", + "description": "签名算法。", "nullable": true }, - "OnlineConfirmVersion": { - "type": "string", - "description": "Online 确认版本回执(空 = 未取得回执)。", - "nullable": true + "ValidateIssuerSigningKey": { + "type": "boolean", + "description": "验证签名密钥。" }, - "DispatchOperator": { - "type": "string", - "description": "下发操作人。", - "nullable": true + "ValidateIssuer": { + "type": "boolean", + "description": "验证签发方。" }, - "PublishedTime": { + "ValidateAudience": { + "type": "boolean", + "description": "验证签收方。" + }, + "ValidateLifetime": { + "type": "boolean", + "description": "验证生命周期。" + }, + "TokenVersion": { "type": "integer", - "description": "下发时间(Unix 秒)。", + "description": "当前全局令牌版本。", "format": "int64" }, - "CreatedTime": { + "UpdateTime": { "type": "integer", - "description": "创建时间(Unix 秒)。", - "format": "int64" + "description": "最近更新时间。", + "format": "int64", + "nullable": true } }, "additionalProperties": false, - "description": "灰度发布输出(发布成功的版本行回显)。" + "description": "平台 JWT 配置输出。" }, - "PublishMailCampaignEntityRequest": { + "PlatformJwtConfigUpdateRequest": { "required": [ - "Id" + "ValidAudience", + "ValidIssuer" ], "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "IssuerSigningKey": { + "type": "string", + "description": "签名密钥。传入 ****** 表示保留当前密钥。", + "nullable": true + }, + "ValidIssuer": { + "minLength": 1, + "type": "string", + "description": "签发方。" + }, + "ValidAudience": { + "minLength": 1, + "type": "string", + "description": "签收方。" + }, + "ClockSkew": { + "maximum": 300, + "minimum": 0, + "type": "integer", + "description": "过期时间容错秒数。", + "format": "int64" } }, "additionalProperties": false, - "description": "发布输入(Campaign Id)。" + "description": "平台 JWT 配置更新输入。" }, - "PublishMailCampaignEntityResponse": { + "PlatformLoggingConfigResponse": { "type": "object", "properties": { - "Code": { - "$ref": "#/components/schemas/MailCampaignServerCode" + "File": { + "$ref": "#/components/schemas/PlatformLoggingFileResponse" }, - "CampaignId": { - "type": "string", - "description": "Server 分配的 CampaignId。" + "Database": { + "$ref": "#/components/schemas/PlatformLoggingDatabaseResponse" }, - "Version": { - "type": "integer", - "description": "版本号。", - "format": "int32" + "ElasticSearch": { + "$ref": "#/components/schemas/PlatformLoggingElasticSearchResponse" }, - "PublishedTime": { - "type": "integer", - "description": "发布时间(Unix 秒)。", - "format": "int64" + "Monitor": { + "$ref": "#/components/schemas/PlatformLoggingMonitorResponse" }, - "Message": { - "type": "string", - "description": "提示信息。", + "UpdateTime": { + "type": "integer", + "description": "最近更新时间(Unix 秒)。", + "format": "int64", "nullable": true } }, "additionalProperties": false, - "description": "发布输出。" + "description": "平台日志配置输出。ES !:ElasticSearchServerUris 经掩码处理,不回显明文 URI/凭据。" }, - "RefreshTokenResponse": { + "PlatformLoggingConfigUpdateRequest": { "type": "object", "properties": { - "RefreshToken": { - "type": "string", - "description": "刷新Token(一次性明文返回,仅本次响应可见,禁止落日志/缓存)", - "nullable": true + "File": { + "$ref": "#/components/schemas/PlatformLoggingFileUpdateRequest" + }, + "Database": { + "$ref": "#/components/schemas/PlatformLoggingDatabaseUpdateRequest" + }, + "ElasticSearch": { + "$ref": "#/components/schemas/PlatformLoggingElasticSearchUpdateRequest" + }, + "Monitor": { + "$ref": "#/components/schemas/PlatformLoggingMonitorUpdateRequest" } }, "additionalProperties": false, - "description": "获取刷新Token结果" + "description": "平台日志配置更新输入。\nES !:ElasticSearchServerUris:若全部为掩码占位 `\"***\"` 视为「未变更」,保留库内原值;\n含非占位项则按非占位项替换;空列表视为清空。" }, - "RefreshTokenResponseHttpJsonResultData": { + "PlatformLoggingDatabaseResponse": { "type": "object", "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/RefreshTokenResponse" - }, - "trackId": { - "type": "string", - "nullable": true - }, - "errorCode": { - "type": "string", - "nullable": true + "IsEnabled": { + "type": "boolean" }, - "type": { + "MinimumLevel": { "type": "string", "nullable": true - }, - "time": { - "type": "integer", - "format": "int64" - }, - "extras": { - "nullable": true } }, "additionalProperties": false }, - "ReportStatusEnum": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Pending", - "Investigating", - "Confirmed", - "Dismissed" - ], - "x-enum-descriptions": [ - "待处理", - "调查中", - "已坐实", - "已驳回" - ] - }, - "ReportTypeEnum": { - "enum": [ - 1, - 2, - 3, - 4, - 5 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Cheat", - "Abuse", - "Illegal", - "Spam", - "Other" - ], - "x-enum-descriptions": [ - "作弊外挂", - "辱骂骚扰", - "违规违法", - "刷屏广告", - "其他" - ] - }, - "ResetPwdResponse": { + "PlatformLoggingDatabaseUpdateRequest": { "type": "object", "properties": { - "NewPassword": { + "IsEnabled": { + "type": "boolean" + }, + "MinimumLevel": { "type": "string", - "description": "重置后的初始密码(取自系统密码配置;一次性明文返回,仅本次响应可见,禁止落日志/缓存)", "nullable": true } }, - "additionalProperties": false, - "description": "重置密码结果(平台用户与租户管理员重置共用)" + "additionalProperties": false }, - "ResetPwdResponseHttpJsonResultData": { + "PlatformLoggingElasticSearchResponse": { "type": "object", "properties": { - "code": { - "type": "integer", - "format": "int32" + "IsEnabled": { + "type": "boolean" }, - "message": { - "type": "string", + "ServerUris": { + "type": "array", + "items": { + "type": "string" + }, "nullable": true }, - "data": { - "$ref": "#/components/schemas/ResetPwdResponse" - }, - "trackId": { + "DefaultIndex": { "type": "string", "nullable": true + } + }, + "additionalProperties": false, + "description": "ES 日志输出。ServerUris 元素统一掩码为 `\"***\"`,仅保留数量,不回显明文。" + }, + "PlatformLoggingElasticSearchUpdateRequest": { + "type": "object", + "properties": { + "IsEnabled": { + "type": "boolean" + }, + "ServerUris": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true }, - "errorCode": { + "DefaultIndex": { "type": "string", "nullable": true + } + }, + "additionalProperties": false + }, + "PlatformLoggingFileResponse": { + "type": "object", + "properties": { + "IsEnabled": { + "type": "boolean" }, - "type": { + "FileName": { "type": "string", "nullable": true }, - "time": { + "Append": { + "type": "boolean" + }, + "FileSizeLimitBytes": { "type": "integer", "format": "int64" }, - "extras": { - "nullable": true + "MaxRollingFiles": { + "type": "integer", + "format": "int32" } }, "additionalProperties": false }, - "ResetPwdUserRequest": { - "required": [ - "Id" - ], + "PlatformLoggingFileUpdateRequest": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, + "IsEnabled": { + "type": "boolean" + }, + "FileName": { + "maximum": 4096, "minimum": 1, - "type": "string" + "type": "string", + "nullable": true + }, + "Append": { + "type": "boolean" + }, + "FileSizeLimitBytes": { + "maximum": 1073741824, + "minimum": 1024, + "type": "integer", + "format": "int64" + }, + "MaxRollingFiles": { + "maximum": 365, + "minimum": 1, + "type": "integer", + "format": "int32" } }, "additionalProperties": false }, - "ReviewTenantGamePenaltyAppealEntityRequest": { - "required": [ - "Approve", - "Id" - ], + "PlatformLoggingMonitorResponse": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + "GlobalEnabled": { + "type": "boolean" + }, + "BahLogLevel": { "type": "string", - "description": "申诉 Id。" + "nullable": true }, - "Approve": { - "type": "boolean", - "description": "是否通过。true=审核通过(撤销关联处罚);false=审核驳回。" + "WithReturnValue": { + "type": "boolean" }, - "Remark": { - "maxLength": 2048, + "ReturnValueThreshold": { + "type": "integer", + "format": "int32" + }, + "JsonBehavior": { "type": "string", - "description": "审核备注。", "nullable": true + }, + "JsonIndented": { + "type": "boolean" + }, + "UseUtcTimestamp": { + "type": "boolean" } }, - "additionalProperties": false, - "description": "申诉审核输入参数。Approve=true 通过(同步撤销关联处罚);Approve=false 驳回。" + "additionalProperties": false }, - "RevokeMailCampaignEntityRequest": { - "required": [ - "Id" - ], + "PlatformLoggingMonitorUpdateRequest": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "GlobalEnabled": { + "type": "boolean" + }, + "BahLogLevel": { + "type": "string", + "nullable": true + }, + "WithReturnValue": { + "type": "boolean" + }, + "ReturnValueThreshold": { + "maximum": 100000, + "minimum": 0, + "type": "integer", + "format": "int32" + }, + "JsonBehavior": { + "type": "string", + "nullable": true + }, + "JsonIndented": { + "type": "boolean" + }, + "UseUtcTimestamp": { + "type": "boolean" } }, - "additionalProperties": false, - "description": "撤回输入(Campaign Id)。" + "additionalProperties": false }, - "RevokeMailCampaignEntityResponse": { + "PlatformPasswordPolicyConfigResponse": { "type": "object", "properties": { - "Code": { - "$ref": "#/components/schemas/MailCampaignServerCode" + "StrongPassword": { + "type": "boolean", + "description": "是否开启密码强度验证。" }, - "CampaignId": { + "PasswordStrengthValidation": { "type": "string", - "description": "CampaignId。" - }, - "RevokedTime": { - "type": "integer", - "description": "撤回时间(Unix 秒)。", - "format": "int64" + "description": "密码强度验证正则表达式。", + "nullable": true }, - "Message": { + "PasswordStrengthValidationMsg": { "type": "string", - "description": "提示信息。", + "description": "密码强度验证失败提示。", + "nullable": true + }, + "UpdateTime": { + "type": "integer", + "description": "最近更新时间(Unix 秒)。", + "format": "int64", "nullable": true } }, "additionalProperties": false, - "description": "撤回输出。" + "description": "平台密码策略配置输出(C173)。仅暴露密码强度策略字段,绝不回显 Cryptogram 密钥(CryptoType/PublicKey/PrivateKey)。" }, - "RevokeTenantGamePenaltyEntityRequest": { - "required": [ - "Id", - "Reason" - ], + "PlatformPasswordPolicyConfigUpdateRequest": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, + "StrongPassword": { + "type": "boolean", + "description": "是否开启密码强度验证。" + }, + "PasswordStrengthValidation": { + "maximum": 1024, "minimum": 1, "type": "string", - "description": "处罚 Id。" + "description": "密码强度验证正则表达式(必须可编译)。", + "nullable": true }, - "Reason": { - "maxLength": 2048, - "minLength": 1, + "PasswordStrengthValidationMsg": { + "maximum": 1024, + "minimum": 1, "type": "string", - "description": "撤销原因。" + "description": "密码强度验证失败提示。", + "nullable": true } }, "additionalProperties": false, - "description": "撤销处罚输入参数。" + "description": "平台密码策略配置更新输入(SuperAdmin-only)。" }, - "RiskLevelEnum": { - "enum": [ - 1, - 2, - 3, - 4 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Low", - "Medium", - "High", - "Critical" - ], - "x-enum-descriptions": [ - "低风险", - "中风险", - "高风险", - "严重风险" - ] + "PlatformRateLimitConfigResponse": { + "type": "object", + "properties": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用全局 IP 固定窗口限流。" + }, + "Version": { + "type": "integer", + "description": "当前配置版本。", + "format": "int64" + }, + "PermitLimit": { + "type": "integer", + "description": "单个固定窗口允许的请求数。", + "format": "int32" + }, + "WindowSeconds": { + "type": "integer", + "description": "固定窗口秒数。", + "format": "int32" + }, + "QueueLimit": { + "type": "integer", + "description": "排队请求数量。", + "format": "int32" + }, + "UpdateTime": { + "type": "integer", + "description": "最近更新时间。", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false, + "description": "平台限流配置输出。" }, - "RoleMenuRequest": { - "required": [ - "Id" - ], + "PlatformRateLimitConfigUpdateRequest": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, + "IsEnabled": { + "type": "boolean", + "description": "是否启用全局 IP 固定窗口限流。" + }, + "PermitLimit": { + "maximum": 100000, "minimum": 1, - "type": "string" + "type": "integer", + "description": "单个固定窗口允许的请求数。", + "format": "int32" }, - "MenuIdList": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "菜单Id集合", - "nullable": true + "WindowSeconds": { + "maximum": 3600, + "minimum": 1, + "type": "integer", + "description": "固定窗口秒数。", + "format": "int32" + }, + "QueueLimit": { + "maximum": 100000, + "minimum": 0, + "type": "integer", + "description": "排队请求数量。", + "format": "int32" } }, "additionalProperties": false, - "description": "授权角色菜单" + "description": "平台限流配置更新输入。" }, - "RoleRequest": { + "PreviewMailCampaignEntityRequest": { "required": [ "Id" ], @@ -93430,42 +92949,39 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "预览输入(Campaign Id)。" }, - "RoleResponse": { + "PreviewMailCampaignEntityResponse": { "type": "object", "properties": { - "Id": { - "type": "string", - "description": "Id" + "Code": { + "$ref": "#/components/schemas/MailCampaignServerCode" }, - "Name": { - "type": "string", - "description": "名称", - "nullable": true + "EstimatedHitCount": { + "type": "integer", + "description": "预估命中玩家数(一期 -1 = 未知)。", + "format": "int64" }, - "Code": { + "Message": { "type": "string", - "description": "编码", + "description": "提示信息。", "nullable": true } }, "additionalProperties": false, - "description": "角色列表输出参数" + "description": "预览输出。" }, - "RollbackConfigRolloutRequest": { + "PublishConfigRolloutRequest": { "required": [ "ConfigKey", "ConfigKind", + "Percent", "Reason", - "ServerId", - "TargetVersion" + "SegmentId", + "ServerId" ], "type": "object", "properties": { @@ -93483,23 +92999,29 @@ "type": "string", "description": "配置业务键(所辖配置域实体 Id 的字符串形式)。" }, - "TargetVersion": { - "maximum": 2147483647, + "SegmentId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "灰度分群Id(必须为已同步 Online 的分群)。" + }, + "Percent": { + "maximum": 100, "minimum": 1, "type": "integer", - "description": "回滚目标版本(要恢复到的历史 ConfigVersion,必须已存在于该配置的版本序列)。", + "description": "灰度百分比(1-100:0 无意义即拒绝,100 = 分群内全量;语义边界见 OnlineRolloutSemanticMap)。", "format": "int32" }, "Reason": { "minLength": 1, "type": "string", - "description": "回滚理由(必填,进审计)。" + "description": "下发理由(必填,进审计)。" } }, "additionalProperties": false, - "description": "灰度回滚输入(来源 change C343 / vault:C8 S7.8 / VC-7.12)。回滚 = 版本化新下发:恢复目标版本的 SegmentId/Percent 语义,生成新 ConfigVersion 行。" + "description": "灰度发布输入(来源 change C343 / vault:C8 S7.7)。Percent 边界常量直接引用 `OnlineRolloutSemanticMap`(禁内联第二套数值)。" }, - "RollbackConfigRolloutResponse": { + "PublishConfigRolloutResponse": { "type": "object", "properties": { "Id": { @@ -93567,241 +93089,196 @@ } }, "additionalProperties": false, - "description": "灰度回滚输出(回滚生成的版本化新行回显,TargetVersion 指向恢复目标)。" - }, - "SecretCreateResponse": { - "type": "object", - "properties": { - "Secret": { - "type": "string", - "description": "新生成的开放接口密钥明文(Base64 编码的随机串)。\n\n安全语义:该明文仅在本次响应中一次性下发,用于拷贝到开放接口身份的 AccessSecret 字段;获取后请立即妥善保存,后续无法再次查询。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "开放接口密钥创建结果" - }, - "SecretCreateResponseHttpJsonResultData": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string", - "nullable": true - }, - "data": { - "$ref": "#/components/schemas/SecretCreateResponse" - }, - "trackId": { - "type": "string", - "nullable": true - }, - "errorCode": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - }, - "time": { - "type": "integer", - "format": "int64" - }, - "extras": { - "nullable": true - } - }, - "additionalProperties": false - }, - "SessionKeyAddRequest": { - "type": "object", - "properties": { - "NotBeforeTime": { - "type": "integer", - "description": "生效时间(Unix 秒);null 表示立即生效。", - "format": "int64", - "nullable": true - }, - "ExpireTime": { - "type": "integer", - "description": "过期时间(Unix 秒);null 表示永不过期。", - "format": "int64", - "nullable": true - }, - "Remark": { - "type": "string", - "description": "备注。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "新增 App 会话密钥输入参数。\n\n密钥明文由服务端随机生成(不允许外部提交,避免弱密钥入环),响应中一次性回显。" + "description": "灰度发布输出(发布成功的版本行回显)。" }, - "SessionKeyRenewRequest": { + "PublishMailCampaignEntityRequest": { "required": [ "Id" ], "type": "object", "properties": { "Id": { - "type": "string", - "description": "密钥主键 ID。" - }, - "ExpireTime": { - "type": "integer", - "description": "新的到期时间(Unix 秒);null 表示改为永不过期。必须晚于当前时间。", - "format": "int64", - "nullable": true + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" } }, "additionalProperties": false, - "description": "续租 App 会话密钥输入参数:仅更新到期时间,不产生新密钥。" + "description": "发布输入(Campaign Id)。" }, - "SessionKeyResponse": { + "PublishMailCampaignEntityResponse": { "type": "object", "properties": { - "Id": { - "type": "string", - "description": "主键 ID。" - }, - "Kid": { - "type": "string", - "description": "Key ID,信封 JSON kid 字段。", - "nullable": true + "Code": { + "$ref": "#/components/schemas/MailCampaignServerCode" }, - "Secret": { + "CampaignId": { "type": "string", - "description": "密钥脱敏占位(固定 ******),真实明文仅 AddAsync/RotateAsync 一次性回显。", - "nullable": true - }, - "NotBeforeTime": { - "type": "integer", - "description": "生效时间;null 表示无生效下限。", - "format": "int64", - "nullable": true + "description": "Server 分配的 CampaignId。" }, - "ExpireTime": { + "Version": { "type": "integer", - "description": "过期时间;null 表示永不过期。", - "format": "int64", - "nullable": true + "description": "版本号。", + "format": "int32" }, - "RotatedTime": { + "PublishedTime": { "type": "integer", - "description": "被轮换时间;null 表示从未被轮换。", - "format": "int64", - "nullable": true + "description": "发布时间(Unix 秒)。", + "format": "int64" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。", + "Message": { + "type": "string", + "description": "提示信息。", "nullable": true - }, - "Remark": { + } + }, + "additionalProperties": false, + "description": "发布输出。" + }, + "RefreshTokenResponse": { + "type": "object", + "properties": { + "RefreshToken": { "type": "string", - "description": "备注。", + "description": "刷新Token(一次性明文返回,仅本次响应可见,禁止落日志/缓存)", "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间。", - "format": "int64" } }, "additionalProperties": false, - "description": "App 会话密钥输出参数(列表/详情,密钥脱敏)。\n\nGameFrameX.Application.ClientDelivery.Security.SessionKey.Dto.SessionKeyResponse.Secret 为固定脱敏占位值 ******:AES-GCM 对称密钥解密必需明文落库(见实体注释),\n但任何列表/详情查询都不得回显明文;明文仅在 AddAsync/RotateAsync 响应(GameFrameX.Application.ClientDelivery.Security.SessionKey.Dto.SessionKeyRevealResponse)一次性回显。" + "description": "获取刷新Token结果" }, - "SessionKeyResponseSqlSugarPagedList": { + "RefreshTokenResponseHttpJsonResultData": { "type": "object", "properties": { - "Page": { + "code": { "type": "integer", "format": "int32" }, - "PageSize": { - "type": "integer", - "format": "int32" + "message": { + "type": "string", + "nullable": true }, - "Total": { - "type": "integer", - "format": "int32" + "data": { + "$ref": "#/components/schemas/RefreshTokenResponse" }, - "TotalPages": { - "type": "integer", - "format": "int32" + "trackId": { + "type": "string", + "nullable": true }, - "Items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionKeyResponse" - }, + "errorCode": { + "type": "string", "nullable": true }, - "HasPrevPage": { - "type": "boolean" + "type": { + "type": "string", + "nullable": true }, - "HasNextPage": { - "type": "boolean" + "time": { + "type": "integer", + "format": "int64" + }, + "extras": { + "nullable": true } }, "additionalProperties": false }, - "SessionKeyRevealResponse": { + "ReportStatusEnum": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Pending", + "Investigating", + "Confirmed", + "Dismissed" + ], + "x-enum-descriptions": [ + "待处理", + "调查中", + "已坐实", + "已驳回" + ] + }, + "ReportTypeEnum": { + "enum": [ + 1, + 2, + 3, + 4, + 5 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Cheat", + "Abuse", + "Illegal", + "Spam", + "Other" + ], + "x-enum-descriptions": [ + "作弊外挂", + "辱骂骚扰", + "违规违法", + "刷屏广告", + "其他" + ] + }, + "ResetPwdResponse": { "type": "object", "properties": { - "Id": { + "NewPassword": { "type": "string", - "description": "主键 ID。" + "description": "重置后的初始密码(取自系统密码配置;一次性明文返回,仅本次响应可见,禁止落日志/缓存)", + "nullable": true + } + }, + "additionalProperties": false, + "description": "重置密码结果(平台用户与管理员角色重置共用)" + }, + "ResetPwdResponseHttpJsonResultData": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" }, - "Kid": { + "message": { "type": "string", - "description": "Key ID,信封 JSON kid 字段。", "nullable": true }, - "Secret": { + "data": { + "$ref": "#/components/schemas/ResetPwdResponse" + }, + "trackId": { "type": "string", - "description": "会话密钥明文(64 位 hex,仅本次响应回显,请立即复制到客户端注入通道 / SessionKeyRing.SetSessionKey;不再二次提供)。", "nullable": true }, - "NotBeforeTime": { - "type": "integer", - "description": "生效时间;null 表示无生效下限。", - "format": "int64", + "errorCode": { + "type": "string", "nullable": true }, - "ExpireTime": { - "type": "integer", - "description": "过期时间;null 表示永不过期。", - "format": "int64", + "type": { + "type": "string", "nullable": true - } - }, - "additionalProperties": false, - "description": "App 会话密钥一次性明文回显输出(仅 AddAsync / RotateAsync 响应使用)。\n\n明文只在密钥生成的那一次响应中出现,前端展示后即失;此后任何接口不再提供明文\n(列表/详情均为 ****** 脱敏,实体禁删)。丢失明文只能通过 RotateAsync 再生成新 key。" - }, - "SessionKeyRotateRequest": { - "type": "object", - "properties": { - "OldKeyExpireTime": { + }, + "time": { "type": "integer", - "description": "旧密钥的新到期时间(Unix 秒):建议设为「双活窗口」结束时刻(客户端全量切换完成后);\nnull 表示不改动旧密钥租约(旧密钥按原到期时间或永久继续双活)。", - "format": "int64", - "nullable": true + "format": "int64" }, - "Remark": { - "type": "string", - "description": "备注。", + "extras": { "nullable": true } }, - "additionalProperties": false, - "description": "轮换 App 会话密钥输入参数:新插一把立即生效的 key(双活),旧 key 不动、按其租约自然退场。" + "additionalProperties": false }, - "SetGameAppPackageStatusRequest": { + "ResetPwdUserRequest": { "required": [ "Id" ], @@ -93811,40 +93288,13 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用" - } - }, - "additionalProperties": false, - "description": "游戏应用分包启停输入参数" - }, - "SetupSuperAdminPasswordRequest": { - "required": [ - "ConfirmPassword", - "Password" - ], - "type": "object", - "properties": { - "Password": { - "minLength": 6, - "type": "string", - "description": "登录密码", - "example": "Abc12345" - }, - "ConfirmPassword": { - "minLength": 6, - "type": "string", - "description": "确认密码", - "example": "Abc12345" } }, - "additionalProperties": false, - "description": "平台超管首装密码初始化参数" + "additionalProperties": false }, - "SyncOnlineRuntimeTenantGamePenaltyRequest": { + "ReviewGamePenaltyAppealEntityRequest": { "required": [ + "Approve", "Id" ], "type": "object", @@ -93853,317 +93303,170 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "处罚事实源行 Id(必须处于生效中)。" + "description": "申诉 Id。" + }, + "Approve": { + "type": "boolean", + "description": "是否通过。true=审核通过(撤销关联处罚);false=审核驳回。" + }, + "Remark": { + "maxLength": 2048, + "type": "string", + "description": "审核备注。", + "nullable": true } }, "additionalProperties": false, - "description": "处罚同步 Online 运行时输入参数(联动命令按 ActionType 服务端推导,不暴露给请求体)。" + "description": "申诉审核输入参数。Approve=true 通过(同步撤销关联处罚);Approve=false 驳回。" }, - "SyncPlayerSegmentOnlineRequest": { + "RevokeGamePenaltyEntityRequest": { "required": [ "Id", - "Reason", - "ServerId" + "Reason" ], "type": "object", "properties": { "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "ServerId": { "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "目标区服Id(Online 作用域 ServerId,经租户归属校验)。" + "description": "处罚 Id。" }, "Reason": { + "maxLength": 2048, "minLength": 1, "type": "string", - "description": "同步理由(必填,审计)。" + "description": "撤销原因。" } }, "additionalProperties": false, - "description": "分群同步 Online 输入(来源 change C343 / vault:C8 S7.6)。" + "description": "撤销处罚输入参数。" }, - "SyncPlayerSegmentOnlineResponse": { + "RevokeMailCampaignEntityRequest": { + "required": [ + "Id" + ], "type": "object", "properties": { "Id": { - "type": "string", - "description": "分群Id。" - }, - "SyncStatus": { - "$ref": "#/components/schemas/OnlinePlayerSegmentSyncStatus" - }, - "OnlineSegmentId": { - "type": "string", - "description": "Online 侧分群标识。" - }, - "ConfirmVersion": { - "type": "string", - "description": "Online 确认版本回执。", - "nullable": true - }, - "Message": { - "type": "string", - "description": "提示消息(Online 侧原文)。", - "nullable": true - }, - "SyncedTime": { - "type": "integer", - "description": "同步时间(Unix 秒,UTC)。", - "format": "int64" + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" } }, "additionalProperties": false, - "description": "分群同步 Online 输出。" + "description": "撤回输入(Campaign Id)。" }, - "SystemConfigResponse": { + "RevokeMailCampaignEntityResponse": { "type": "object", "properties": { - "Id": { - "type": "string", - "description": "Id" - }, - "Name": { - "type": "string", - "description": "名称", - "nullable": true - }, "Code": { - "type": "string", - "description": "编码", - "nullable": true - }, - "Value": { - "type": "string", - "description": "属性值", - "nullable": true - }, - "SysFlag": { - "$ref": "#/components/schemas/YesNoEnum" - }, - "GroupCode": { - "type": "string", - "description": "分组编码", - "nullable": true - }, - "OrderNo": { - "type": "integer", - "description": "排序", - "format": "int32" + "$ref": "#/components/schemas/MailCampaignServerCode" }, - "Remark": { + "CampaignId": { "type": "string", - "description": "备注", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "description": "CampaignId。" }, - "CreatedTime": { + "RevokedTime": { "type": "integer", - "description": "创建时间", + "description": "撤回时间(Unix 秒)。", "format": "int64" }, - "CreatedName": { - "type": "string", - "description": "创建人", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true - }, - "UpdatedName": { - "type": "string", - "description": "更新人", - "nullable": true - }, - "RowVersion": { + "Message": { "type": "string", - "description": "行版本号(乐观锁)", + "description": "提示信息。", "nullable": true } }, "additionalProperties": false, - "description": "平台参数配置输出参数" + "description": "撤回输出。" }, - "SystemConfigResponseSqlSugarPagedList": { + "RiskLevelEnum": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Low", + "Medium", + "High", + "Critical" + ], + "x-enum-descriptions": [ + "低风险", + "中风险", + "高风险", + "严重风险" + ] + }, + "RoleMenuRequest": { + "required": [ + "Id" + ], "type": "object", "properties": { - "Page": { - "type": "integer", - "format": "int32" - }, - "PageSize": { - "type": "integer", - "format": "int32" - }, - "Total": { - "type": "integer", - "format": "int32" - }, - "TotalPages": { - "type": "integer", - "format": "int32" + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "Items": { + "MenuIdList": { "type": "array", "items": { - "$ref": "#/components/schemas/SystemConfigResponse" + "type": "integer", + "format": "int64" }, + "description": "菜单Id集合", "nullable": true - }, - "HasPrevPage": { - "type": "boolean" - }, - "HasNextPage": { - "type": "boolean" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "授权角色菜单" }, - "SystemEmailProviderResponse": { + "RoleRequest": { + "required": [ + "Id" + ], "type": "object", "properties": { "Id": { - "type": "string", - "description": "Id" - }, - "Purpose": { - "type": "integer", - "description": "平台系统邮件用途(SystemEmailPurpose)。0 表示默认配置。", - "format": "int32" - }, - "Provider": { - "type": "string", - "description": "Provider 类型。当前支持 TencentCloudSes(腾讯云 SES)和 Smtp。", - "nullable": true - }, - "Host": { - "type": "string", - "description": "SMTP 主机。Provider=Smtp 时必填。", - "nullable": true - }, - "Port": { - "type": "integer", - "description": "SMTP 端口。Provider=Smtp 时必填。", - "format": "int32", - "nullable": true - }, - "EnableSsl": { - "type": "boolean", - "description": "SMTP 启用 SSL。Provider=Smtp 时使用。", - "nullable": true - }, - "UseDefaultCredentials": { - "type": "boolean", - "description": "SMTP 使用默认凭据。Provider=Smtp 时使用。", - "nullable": true - }, - "UserName": { - "type": "string", - "description": "SMTP 用户名(敏感字段,API 输出脱敏,日志禁止明文)。", - "nullable": true - }, - "Password": { - "type": "string", - "description": "SMTP 密码(敏感字段,API 输出脱敏,日志禁止明文)。", - "nullable": true - }, - "Region": { - "type": "string", - "description": "Provider 区域(如腾讯云 SES 区域 ap-hongkong)。", - "nullable": true - }, - "SecretId": { - "type": "string", - "description": "腾讯云 SES SecretId(敏感字段,API 输出脱敏,日志禁止明文)。", - "nullable": true - }, - "SecretKey": { - "type": "string", - "description": "腾讯云 SES SecretKey(敏感字段,API 输出脱敏,日志禁止明文)。", - "nullable": true - }, - "DefaultFromEmail": { - "type": "string", - "description": "平台默认发件人邮箱地址。", - "nullable": true - }, - "DefaultFromName": { - "type": "string", - "description": "平台默认发件人显示名称。", - "nullable": true - }, - "DefaultToEmail": { - "type": "string", - "description": "平台默认收件人邮箱;缺省时使用业务调用方传入的 receiver。", - "nullable": true - }, - "TemplateId": { - "type": "string", - "description": "腾讯云 SES 模板 ID。Provider=TencentCloudSes 时必填;SMTP 发送不使用。", - "nullable": true - }, - "TemplateDataJson": { - "type": "string", - "description": "腾讯云 SES 模板变量 JSON。Provider=TencentCloudSes 时写入 TemplateData;SMTP 发送不使用。", - "nullable": true - }, - "Priority": { - "type": "integer", - "description": "配置选择优先级。同一 Purpose 匹配层中按此值降序选择;数值越大越优先。", - "format": "int32" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "type": "string", - "description": "创建人", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "UpdatedName": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用" + } + }, + "additionalProperties": false + }, + "RoleResponse": { + "type": "object", + "properties": { + "Id": { "type": "string", - "description": "更新人", - "nullable": true + "description": "Id" }, - "RowVersion": { + "Name": { "type": "string", - "description": "行版本号(乐观锁)", + "description": "名称", "nullable": true }, - "Remark": { + "Code": { "type": "string", - "description": "备注", + "description": "编码", "nullable": true } }, "additionalProperties": false, - "description": "平台系统邮件 Provider 配置输出参数(敏感字段已脱敏)。" + "description": "角色列表输出参数" }, - "SystemEmailProviderResponseSqlSugarPagedList": { + "RoleResponseSqlSugarPagedList": { "type": "object", "properties": { "Page": { @@ -94185,7 +93488,7 @@ "Items": { "type": "array", "items": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "$ref": "#/components/schemas/RoleResponse" }, "nullable": true }, @@ -94198,227 +93501,189 @@ }, "additionalProperties": false }, - "SystemEmailProviderTestSendRequest": { + "RollbackConfigRolloutRequest": { "required": [ - "Body", - "Id", - "ReceiverEmail", - "Subject" + "ConfigKey", + "ConfigKind", + "Reason", + "ServerId", + "TargetVersion" ], "type": "object", "properties": { - "Id": { + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "配置 ID。测试发送必须指定当前要验证的 Provider 配置。" + "description": "目标区服Id(Online 作用域 ServerId)。" }, - "ReceiverEmail": { - "minLength": 1, - "type": "string", - "description": "目标收件人邮箱。", - "format": "email" + "ConfigKind": { + "$ref": "#/components/schemas/OnlineConfigRolloutKind" }, - "Subject": { + "ConfigKey": { "minLength": 1, "type": "string", - "description": "测试主题。" + "description": "配置业务键(所辖配置域实体 Id 的字符串形式)。" }, - "Body": { + "TargetVersion": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "description": "回滚目标版本(要恢复到的历史 ConfigVersion,必须已存在于该配置的版本序列)。", + "format": "int32" + }, + "Reason": { "minLength": 1, "type": "string", - "description": "测试正文。" + "description": "回滚理由(必填,进审计)。" } }, "additionalProperties": false, - "description": "测试发送输入参数。\n\n用于受权限控制的测试发送接口;调用方必须显式传入用途与目标邮箱;敏感字段不输出到 API/日志/前端。" + "description": "灰度回滚输入(来源 change C343 / vault:C8 S7.8 / VC-7.12)。回滚 = 版本化新下发:恢复目标版本的 SegmentId/Percent 语义,生成新 ConfigVersion 行。" }, - "SystemJobClusterResponse": { + "RollbackConfigRolloutResponse": { "type": "object", "properties": { "Id": { "type": "string", - "description": "Id" + "description": "版本行Id。" }, - "ClusterId": { + "ServerId": { "type": "string", - "description": "作业集群Id", - "nullable": true + "description": "目标区服Id。" }, - "Description": { + "ConfigKind": { + "$ref": "#/components/schemas/OnlineConfigRolloutKind" + }, + "ConfigKey": { "type": "string", - "description": "描述信息", + "description": "配置业务键(所辖配置域实体 Id 字符串)。", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/ClusterStatus" - }, - "UpdatedTime": { + "ConfigVersion": { "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true + "description": "Admin 侧分配的下发版本号(同配置维度递增;发布与回滚共用序列)。", + "format": "int32" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "SegmentId": { + "type": "string", + "description": "灰度分群Id。" }, - "CreatedTime": { + "Percent": { "type": "integer", - "description": "创建时间", - "format": "int64" + "description": "灰度百分比(1-100,语义见 OnlineRolloutSemanticMap)。", + "format": "int32" }, - "CreatedName": { - "type": "string", - "description": "创建人", - "nullable": true + "Status": { + "$ref": "#/components/schemas/OnlineConfigRolloutStatus" }, - "UpdateTime": { + "TargetVersion": { "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true + "description": "回滚目标版本(仅回滚行有值,指向要恢复到的历史 ConfigVersion)。", + "format": "int32" }, - "UpdatedName": { + "Reason": { "type": "string", - "description": "更新人", + "description": "本次下发理由。", "nullable": true }, - "RowVersion": { + "OnlineConfirmVersion": { "type": "string", - "description": "行版本号(乐观锁)", + "description": "Online 确认版本回执(空 = 未取得回执)。", "nullable": true - } - }, - "additionalProperties": false, - "description": "系统作业集群输出参数" - }, - "SystemJobDetailEntity": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" }, - "CreatedId": { + "DispatchOperator": { "type": "string", - "description": "创建人Id", + "description": "下发操作人。", "nullable": true }, - "CreatedTime": { + "PublishedTime": { "type": "integer", - "description": "创建时间", + "description": "下发时间(Unix 秒)。", "format": "int64" }, - "CreatedName": { - "maxLength": 512, - "type": "string", - "description": "创建人姓名", - "nullable": true - }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true - }, - "UpdateTime": { + "CreatedTime": { "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true - }, - "UpdatedId": { - "type": "string", - "description": "更新人Id", - "nullable": true - }, - "UpdatedName": { - "maxLength": 512, + "description": "创建时间(Unix 秒)。", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "灰度回滚输出(回滚生成的版本化新行回显,TargetVersion 指向恢复目标)。" + }, + "SecretCreateResponse": { + "type": "object", + "properties": { + "Secret": { "type": "string", - "description": "更新人姓名", - "nullable": true - }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "description": "新生成的开放接口密钥明文(Base64 编码的随机串)。\n\n安全语义:该明文仅在本次响应中一次性下发,用于拷贝到开放接口身份的 AccessSecret 字段;获取后请立即妥善保存,后续无法再次查询。", "nullable": true - }, - "DeleteTime": { + } + }, + "additionalProperties": false, + "description": "开放接口密钥创建结果" + }, + "SecretCreateResponseHttpJsonResultData": { + "type": "object", + "properties": { + "code": { "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true - }, - "DeletedId": { - "type": "string", - "description": "删除人Id", - "nullable": true - }, - "DeletedName": { - "maxLength": 512, - "type": "string", - "description": "删除人姓名", - "nullable": true + "format": "int32" }, - "RowVersion": { + "message": { "type": "string", - "description": "行版本号(用于乐观锁)", "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true + "data": { + "$ref": "#/components/schemas/SecretCreateResponse" }, - "JobId": { + "trackId": { "type": "string", "nullable": true }, - "GroupName": { + "errorCode": { "type": "string", "nullable": true }, - "JobType": { + "type": { "type": "string", "nullable": true }, - "AssemblyName": { - "type": "string", - "nullable": true + "time": { + "type": "integer", + "format": "int64" }, - "Description": { - "type": "string", + "extras": { "nullable": true - }, - "Concurrent": { - "type": "boolean" - }, - "IncludeAnnotations": { - "type": "boolean" - }, - "Properties": { - "type": "string", + } + }, + "additionalProperties": false + }, + "SessionKeyAddRequest": { + "type": "object", + "properties": { + "NotBeforeTime": { + "type": "integer", + "description": "生效时间(Unix 秒);null 表示立即生效。", + "format": "int64", "nullable": true }, - "UpdatedTime": { + "ExpireTime": { "type": "integer", + "description": "过期时间(Unix 秒);null 表示永不过期。", "format": "int64", "nullable": true }, - "CreateType": { - "$ref": "#/components/schemas/JobCreateTypeEnum" - }, - "ScriptCode": { + "Remark": { "type": "string", + "description": "备注。", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "新增 App 会话密钥输入参数。\n\n密钥明文由服务端随机生成(不允许外部提交,避免弱密钥入环),响应中一次性回显。" }, - "SystemJobTriggerEntity": { + "SessionKeyRenewRequest": { "required": [ "Id" ], @@ -94426,277 +93691,315 @@ "properties": { "Id": { "type": "string", - "description": "主键Id" - }, - "CreatedId": { - "type": "string", - "description": "创建人Id", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "maxLength": 512, - "type": "string", - "description": "创建人姓名", - "nullable": true - }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true + "description": "密钥主键 ID。" }, - "UpdateTime": { + "ExpireTime": { "type": "integer", - "description": "更新时间", + "description": "新的到期时间(Unix 秒);null 表示改为永不过期。必须晚于当前时间。", "format": "int64", "nullable": true - }, - "UpdatedId": { + } + }, + "additionalProperties": false, + "description": "续租 App 会话密钥输入参数:仅更新到期时间,不产生新密钥。" + }, + "SessionKeyResponse": { + "type": "object", + "properties": { + "Id": { "type": "string", - "description": "更新人Id", - "nullable": true + "description": "主键 ID。" }, - "UpdatedName": { - "maxLength": 512, + "Kid": { "type": "string", - "description": "更新人姓名", + "description": "Key ID,信封 JSON kid 字段。", "nullable": true }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "Secret": { + "type": "string", + "description": "密钥脱敏占位(固定 ******),真实明文仅 AddAsync/RotateAsync 一次性回显。", "nullable": true }, - "DeleteTime": { + "NotBeforeTime": { "type": "integer", - "description": "删除时间", + "description": "生效时间;null 表示无生效下限。", "format": "int64", "nullable": true }, - "DeletedId": { - "type": "string", - "description": "删除人Id", - "nullable": true - }, - "DeletedName": { - "maxLength": 512, - "type": "string", - "description": "删除人姓名", + "ExpireTime": { + "type": "integer", + "description": "过期时间;null 表示永不过期。", + "format": "int64", "nullable": true }, - "RowVersion": { - "type": "string", - "description": "行版本号(用于乐观锁)", + "RotatedTime": { + "type": "integer", + "description": "被轮换时间;null 表示从未被轮换。", + "format": "int64", "nullable": true }, "IsEnabled": { "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "description": "是否启用。", "nullable": true }, - "TriggerId": { + "Remark": { "type": "string", + "description": "备注。", "nullable": true }, - "JobId": { - "type": "string", - "nullable": true + "CreatedTime": { + "type": "integer", + "description": "创建时间。", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "App 会话密钥输出参数(列表/详情,密钥脱敏)。\n\nGameFrameX.Application.ClientDelivery.Security.SessionKey.Dto.SessionKeyResponse.Secret 为固定脱敏占位值 ******:AES-GCM 对称密钥解密必需明文落库(见实体注释),\n但任何列表/详情查询都不得回显明文;明文仅在 AddAsync/RotateAsync 响应(GameFrameX.Application.ClientDelivery.Security.SessionKey.Dto.SessionKeyRevealResponse)一次性回显。" + }, + "SessionKeyResponseSqlSugarPagedList": { + "type": "object", + "properties": { + "Page": { + "type": "integer", + "format": "int32" }, - "TriggerType": { - "type": "string", + "PageSize": { + "type": "integer", + "format": "int32" + }, + "Total": { + "type": "integer", + "format": "int32" + }, + "TotalPages": { + "type": "integer", + "format": "int32" + }, + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionKeyResponse" + }, "nullable": true }, - "AssemblyName": { + "HasPrevPage": { + "type": "boolean" + }, + "HasNextPage": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "SessionKeyRevealResponse": { + "type": "object", + "properties": { + "Id": { "type": "string", - "nullable": true + "description": "主键 ID。" }, - "Args": { + "Kid": { "type": "string", + "description": "Key ID,信封 JSON kid 字段。", "nullable": true }, - "Description": { + "Secret": { "type": "string", + "description": "会话密钥明文(64 位 hex,仅本次响应回显,请立即复制到客户端注入通道 / SessionKeyRing.SetSessionKey;不再二次提供)。", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/TriggerStatus" - }, - "StartTime": { + "NotBeforeTime": { "type": "integer", + "description": "生效时间;null 表示无生效下限。", "format": "int64", "nullable": true }, - "EndTime": { + "ExpireTime": { "type": "integer", + "description": "过期时间;null 表示永不过期。", "format": "int64", "nullable": true - }, - "LastRunTime": { + } + }, + "additionalProperties": false, + "description": "App 会话密钥一次性明文回显输出(仅 AddAsync / RotateAsync 响应使用)。\n\n明文只在密钥生成的那一次响应中出现,前端展示后即失;此后任何接口不再提供明文\n(列表/详情均为 ****** 脱敏,实体禁删)。丢失明文只能通过 RotateAsync 再生成新 key。" + }, + "SessionKeyRotateRequest": { + "type": "object", + "properties": { + "OldKeyExpireTime": { "type": "integer", + "description": "旧密钥的新到期时间(Unix 秒):建议设为「双活窗口」结束时刻(客户端全量切换完成后);\nnull 表示不改动旧密钥租约(旧密钥按原到期时间或永久继续双活)。", "format": "int64", "nullable": true }, - "NextRunTime": { - "type": "integer", - "format": "int64", + "Remark": { + "type": "string", + "description": "备注。", "nullable": true + } + }, + "additionalProperties": false, + "description": "轮换 App 会话密钥输入参数:新插一把立即生效的 key(双活),旧 key 不动、按其租约自然退场。" + }, + "SetGameAppPackageStatusRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "NumberOfRuns": { - "type": "integer", - "format": "int64" - }, - "MaxNumberOfRuns": { - "type": "integer", - "format": "int64" - }, - "NumberOfErrors": { - "type": "integer", - "format": "int64" - }, - "MaxNumberOfErrors": { - "type": "integer", - "format": "int64" - }, - "NumRetries": { - "type": "integer", - "format": "int32" - }, - "RetryTimeout": { - "type": "integer", - "format": "int32" - }, - "StartNow": { - "type": "boolean" - }, - "RunOnStart": { - "type": "boolean" - }, - "ResetOnlyOnce": { - "type": "boolean" + "IsEnabled": { + "type": "boolean", + "description": "是否启用" + } + }, + "additionalProperties": false, + "description": "游戏应用分包启停输入参数" + }, + "SetupSuperAdminPasswordRequest": { + "required": [ + "ConfirmPassword", + "Password" + ], + "type": "object", + "properties": { + "Password": { + "minLength": 6, + "type": "string", + "description": "登录密码", + "example": "Abc12345" }, - "UpdatedTime": { - "type": "integer", - "format": "int64", - "nullable": true + "ConfirmPassword": { + "minLength": 6, + "type": "string", + "description": "确认密码", + "example": "Abc12345" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "平台超管首装密码初始化参数" }, - "SystemJobTriggerResponse": { + "SyncOnlineRuntimeGamePenaltyRequest": { + "required": [ + "Id" + ], "type": "object", "properties": { "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "Id" + "description": "处罚事实源行 Id(必须处于生效中)。" + } + }, + "additionalProperties": false, + "description": "处罚同步 Online 运行时输入参数(联动命令按 ActionType 服务端推导,不暴露给请求体)。" + }, + "SyncPlayerSegmentOnlineRequest": { + "required": [ + "Id", + "Reason", + "ServerId" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "TriggerId": { + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "触发器Id", - "nullable": true + "description": "目标区服Id(Online 作用域 ServerId,经租户归属校验)。" }, - "JobId": { + "Reason": { + "minLength": 1, "type": "string", - "description": "作业Id", - "nullable": true - }, - "TriggerType": { + "description": "同步理由(必填,审计)。" + } + }, + "additionalProperties": false, + "description": "分群同步 Online 输入(来源 change C343 / vault:C8 S7.6)。" + }, + "SyncPlayerSegmentOnlineResponse": { + "type": "object", + "properties": { + "Id": { "type": "string", - "description": "触发器类型FullName", - "nullable": true + "description": "分群Id。" }, - "AssemblyName": { + "SyncStatus": { + "$ref": "#/components/schemas/OnlinePlayerSegmentSyncStatus" + }, + "OnlineSegmentId": { "type": "string", - "description": "程序集Name", - "nullable": true + "description": "Online 侧分群标识。" }, - "Args": { + "ConfirmVersion": { "type": "string", - "description": "参数", + "description": "Online 确认版本回执。", "nullable": true }, - "Description": { + "Message": { "type": "string", - "description": "描述信息", + "description": "提示消息(Online 侧原文)。", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/TriggerStatus" - }, - "StartTime": { + "SyncedTime": { "type": "integer", - "description": "起始时间", - "format": "int64", - "nullable": true + "description": "同步时间(Unix 秒,UTC)。", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "分群同步 Online 输出。" + }, + "SystemConfigResponse": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Id" }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", + "Name": { + "type": "string", + "description": "名称", "nullable": true }, - "LastRunTime": { - "type": "integer", - "description": "最近运行时间", - "format": "int64", + "Code": { + "type": "string", + "description": "编码", "nullable": true }, - "NextRunTime": { - "type": "integer", - "description": "下一次运行时间", - "format": "int64", + "Value": { + "type": "string", + "description": "属性值", "nullable": true }, - "NumberOfRuns": { - "type": "integer", - "description": "触发次数", - "format": "int64" - }, - "MaxNumberOfRuns": { - "type": "integer", - "description": "最大触发次数(0:不限制,n:N次)", - "format": "int64" - }, - "NumberOfErrors": { - "type": "integer", - "description": "出错次数", - "format": "int64" - }, - "MaxNumberOfErrors": { - "type": "integer", - "description": "最大出错次数(0:不限制,n:N次)", - "format": "int64" + "SysFlag": { + "$ref": "#/components/schemas/YesNoEnum" }, - "NumRetries": { - "type": "integer", - "description": "重试次数", - "format": "int32" + "GroupCode": { + "type": "string", + "description": "分组编码", + "nullable": true }, - "RetryTimeout": { + "OrderNo": { "type": "integer", - "description": "重试间隔时间(ms)", + "description": "排序", "format": "int32" }, - "StartNow": { - "type": "boolean", - "description": "是否立即启动" - }, - "RunOnStart": { - "type": "boolean", - "description": "是否启动时执行一次" - }, - "ResetOnlyOnce": { - "type": "boolean", - "description": "是否在启动时重置最大触发次数等于一次的作业" - }, - "UpdatedTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", + "Remark": { + "type": "string", + "description": "备注", "nullable": true }, "IsEnabled": { @@ -94732,118 +94035,136 @@ } }, "additionalProperties": false, - "description": "系统作业触发器输出参数" + "description": "平台参数配置输出参数" }, - "SystemMenuMetaResponse": { + "SystemConfigResponseSqlSugarPagedList": { "type": "object", "properties": { - "Title": { - "type": "string", - "description": "标题", - "nullable": true + "Page": { + "type": "integer", + "format": "int32" }, - "TitleCode": { - "type": "string", - "description": "标题国际化Key", - "nullable": true + "PageSize": { + "type": "integer", + "format": "int32" }, - "Icon": { - "type": "string", - "description": "图标", - "nullable": true + "Total": { + "type": "integer", + "format": "int32" }, - "IsIframe": { - "type": "boolean", - "description": "是否内嵌" + "TotalPages": { + "type": "integer", + "format": "int32" }, - "IsLink": { - "type": "string", - "description": "外链链接", + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SystemConfigResponse" + }, "nullable": true }, - "IsHide": { - "type": "boolean", - "description": "是否隐藏" - }, - "IsKeepAlive": { - "type": "boolean", - "description": "是否缓存" - }, - "IsAffix": { - "type": "boolean", - "description": "是否固定" - }, - "MenuContext": { - "type": "string", - "description": "菜单上下文:console。", - "nullable": true + "HasPrevPage": { + "type": "boolean" }, - "AppScope": { - "type": "string", - "description": "菜单作用域:console。", - "nullable": true + "HasNextPage": { + "type": "boolean" } }, - "additionalProperties": false, - "description": "菜单Meta配置" + "additionalProperties": false }, - "TenantFileResponse": { + "SystemEmailProviderResponse": { "type": "object", "properties": { "Id": { "type": "string", "description": "Id" }, + "Purpose": { + "type": "integer", + "description": "平台系统邮件用途(SystemEmailPurpose)。0 表示默认配置。", + "format": "int32" + }, "Provider": { "type": "string", - "description": "提供者", + "description": "Provider 类型。当前支持 TencentCloudSes(腾讯云 SES)和 Smtp。", + "nullable": true + }, + "Host": { + "type": "string", + "description": "SMTP 主机。Provider=Smtp 时必填。", + "nullable": true + }, + "Port": { + "type": "integer", + "description": "SMTP 端口。Provider=Smtp 时必填。", + "format": "int32", + "nullable": true + }, + "EnableSsl": { + "type": "boolean", + "description": "SMTP 启用 SSL。Provider=Smtp 时使用。", + "nullable": true + }, + "UseDefaultCredentials": { + "type": "boolean", + "description": "SMTP 使用默认凭据。Provider=Smtp 时使用。", "nullable": true }, - "StorageConfigId": { + "UserName": { "type": "string", - "description": "关联的租户对象存储配置 ID(TenantObjectStorageConfigEntity.Id)。\n新上传文件必填,用于按精确配置解析下载/删除路径;历史记录为 null 时按本地 legacy 行为兜底。", + "description": "SMTP 用户名(敏感字段,API 输出脱敏,日志禁止明文)。", "nullable": true }, - "BucketName": { + "Password": { "type": "string", - "description": "仓储名称", + "description": "SMTP 密码(敏感字段,API 输出脱敏,日志禁止明文)。", "nullable": true }, - "FileName": { + "Region": { "type": "string", - "description": "文件名称(源文件名)", + "description": "Provider 区域(如腾讯云 SES 区域 ap-hongkong)。", "nullable": true }, - "Suffix": { + "SecretId": { "type": "string", - "description": "文件后缀", + "description": "腾讯云 SES SecretId(敏感字段,API 输出脱敏,日志禁止明文)。", "nullable": true }, - "FilePath": { + "SecretKey": { "type": "string", - "description": "存储路径", + "description": "腾讯云 SES SecretKey(敏感字段,API 输出脱敏,日志禁止明文)。", "nullable": true }, - "SizeKb": { + "DefaultFromEmail": { "type": "string", - "description": "文件大小KB", + "description": "平台默认发件人邮箱地址。", "nullable": true }, - "SizeInfo": { + "DefaultFromName": { "type": "string", - "description": "文件大小信息-计算后的", + "description": "平台默认发件人显示名称。", "nullable": true }, - "Url": { + "DefaultToEmail": { + "type": "string", + "description": "平台默认收件人邮箱;缺省时使用业务调用方传入的 receiver。", + "nullable": true + }, + "TemplateId": { "type": "string", - "description": "外链地址-OSS上传后生成外链地址方便前端预览", + "description": "腾讯云 SES 模板 ID。Provider=TencentCloudSes 时必填;SMTP 发送不使用。", "nullable": true }, - "FileMd5": { + "TemplateDataJson": { "type": "string", - "description": "文件MD5", + "description": "腾讯云 SES 模板变量 JSON。Provider=TencentCloudSes 时写入 TemplateData;SMTP 发送不使用。", "nullable": true }, + "Priority": { + "type": "integer", + "description": "配置选择优先级。同一 Purpose 匹配层中按此值降序选择;数值越大越优先。", + "format": "int32" + }, "IsEnabled": { "type": "boolean", "description": "是否启用", @@ -94874,12 +94195,17 @@ "type": "string", "description": "行版本号(乐观锁)", "nullable": true + }, + "Remark": { + "type": "string", + "description": "备注", + "nullable": true } }, "additionalProperties": false, - "description": "系统文件输出参数" + "description": "平台系统邮件 Provider 配置输出参数(敏感字段已脱敏)。" }, - "TenantFileResponseSqlSugarPagedList": { + "SystemEmailProviderResponseSqlSugarPagedList": { "type": "object", "properties": { "Page": { @@ -94901,7 +94227,7 @@ "Items": { "type": "array", "items": { - "$ref": "#/components/schemas/TenantFileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "nullable": true }, @@ -94914,34 +94240,63 @@ }, "additionalProperties": false }, - "TenantRoleResponse": { + "SystemEmailProviderTestSendRequest": { + "required": [ + "Body", + "Id", + "ReceiverEmail", + "Subject" + ], + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "配置 ID。测试发送必须指定当前要验证的 Provider 配置。" + }, + "ReceiverEmail": { + "minLength": 1, + "type": "string", + "description": "目标收件人邮箱。", + "format": "email" + }, + "Subject": { + "minLength": 1, + "type": "string", + "description": "测试主题。" + }, + "Body": { + "minLength": 1, + "type": "string", + "description": "测试正文。" + } + }, + "additionalProperties": false, + "description": "测试发送输入参数。\n\n用于受权限控制的测试发送接口;调用方必须显式传入用途与目标邮箱;敏感字段不输出到 API/日志/前端。" + }, + "SystemJobClusterResponse": { "type": "object", "properties": { "Id": { "type": "string", "description": "Id" }, - "Name": { + "ClusterId": { "type": "string", - "description": "名称", + "description": "作业集群Id", "nullable": true }, - "Code": { + "Description": { "type": "string", - "description": "编码", + "description": "描述信息", "nullable": true }, - "OrderNo": { - "type": "integer", - "description": "排序", - "format": "int32" - }, - "DataScope": { - "$ref": "#/components/schemas/DataScopeEnum" + "Status": { + "$ref": "#/components/schemas/ClusterStatus" }, - "Remark": { - "type": "string", - "description": "备注", + "UpdatedTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", "nullable": true }, "IsEnabled": { @@ -94977,44 +94332,9 @@ } }, "additionalProperties": false, - "description": "系统角色输出参数" - }, - "TenantRoleResponseSqlSugarPagedList": { - "type": "object", - "properties": { - "Page": { - "type": "integer", - "format": "int32" - }, - "PageSize": { - "type": "integer", - "format": "int32" - }, - "Total": { - "type": "integer", - "format": "int32" - }, - "TotalPages": { - "type": "integer", - "format": "int32" - }, - "Items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantRoleResponse" - }, - "nullable": true - }, - "HasPrevPage": { - "type": "boolean" - }, - "HasNextPage": { - "type": "boolean" - } - }, - "additionalProperties": false + "description": "系统作业集群输出参数" }, - "TenantUserEntity": { + "SystemJobDetailEntity": { "required": [ "Id" ], @@ -95074,365 +94394,351 @@ "format": "int64", "nullable": true }, - "DeletedId": { - "type": "string", - "description": "删除人Id", - "nullable": true - }, - "DeletedName": { - "maxLength": 512, - "type": "string", - "description": "删除人姓名", - "nullable": true - }, - "RowVersion": { - "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true - }, - "Account": { - "type": "string", - "nullable": true - }, - "RealName": { - "type": "string", - "nullable": true - }, - "NickName": { - "type": "string", - "nullable": true - }, - "Avatar": { - "type": "string", - "nullable": true - }, - "Sex": { - "$ref": "#/components/schemas/GenderEnum" - }, - "Age": { - "type": "integer", - "format": "int32" - }, - "BirthdayTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "Nation": { - "type": "string", - "nullable": true - }, - "Phone": { - "type": "string", - "nullable": true - }, - "CardType": { - "$ref": "#/components/schemas/CardTypeEnum" - }, - "IdCardNum": { - "type": "string", - "nullable": true - }, - "Email": { - "type": "string", - "nullable": true - }, - "Address": { - "type": "string", - "nullable": true - }, - "CultureLevel": { - "$ref": "#/components/schemas/CultureLevelEnum" - }, - "PoliticalOutlook": { - "type": "string", - "nullable": true - }, - "College": { - "type": "string", - "nullable": true - }, - "OfficePhone": { - "type": "string", - "nullable": true - }, - "EmergencyContact": { - "type": "string", - "nullable": true - }, - "EmergencyPhone": { - "type": "string", - "nullable": true - }, - "EmergencyAddress": { - "type": "string", - "nullable": true - }, - "Introduction": { - "type": "string", - "nullable": true - }, - "OrderNo": { - "type": "integer", - "format": "int32" - }, - "Remark": { - "type": "string", - "nullable": true - }, - "AccountType": { - "$ref": "#/components/schemas/AccountTypeEnum" - }, - "ManagerUserId": { + "DeletedId": { "type": "string", + "description": "删除人Id", "nullable": true }, - "ManagerUser": { - "$ref": "#/components/schemas/TenantUserEntity" - }, - "JobNum": { + "DeletedName": { + "maxLength": 512, "type": "string", + "description": "删除人姓名", "nullable": true }, - "PosLevel": { + "RowVersion": { "type": "string", + "description": "行版本号(用于乐观锁)", "nullable": true }, - "PosTitle": { - "type": "string", + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "Expertise": { + "JobId": { "type": "string", "nullable": true }, - "OfficeZone": { + "GroupName": { "type": "string", "nullable": true }, - "Office": { + "JobType": { "type": "string", "nullable": true }, - "JoinTime": { - "type": "integer", - "format": "int64", + "AssemblyName": { + "type": "string", "nullable": true }, - "LastLoginIp": { + "Description": { "type": "string", "nullable": true }, - "LastLoginAddress": { + "Concurrent": { + "type": "boolean" + }, + "IncludeAnnotations": { + "type": "boolean" + }, + "Properties": { "type": "string", "nullable": true }, - "LastLoginTime": { + "UpdatedTime": { "type": "integer", "format": "int64", "nullable": true }, - "LastLoginDevice": { - "type": "string", - "nullable": true + "CreateType": { + "$ref": "#/components/schemas/JobCreateTypeEnum" }, - "Signature": { + "ScriptCode": { "type": "string", "nullable": true } }, "additionalProperties": false }, - "TenantUserResponse": { + "SystemJobTriggerEntity": { + "required": [ + "Id" + ], "type": "object", "properties": { "Id": { "type": "string", - "description": "Id" - }, - "Account": { - "type": "string", - "description": "账号", - "nullable": true + "description": "主键Id" }, - "RealName": { + "CreatedId": { "type": "string", - "description": "真实姓名", + "description": "创建人Id", "nullable": true }, - "NickName": { - "type": "string", - "description": "昵称", - "nullable": true + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" }, - "Avatar": { + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "头像", + "description": "创建人姓名", "nullable": true }, - "Sex": { - "$ref": "#/components/schemas/GenderEnum" - }, - "Age": { + "UpdateCount": { "type": "integer", - "description": "年龄", - "format": "int32" + "description": "更新次数", + "format": "int32", + "nullable": true }, - "BirthdayTime": { + "UpdateTime": { "type": "integer", - "description": "出生日期", + "description": "更新时间", "format": "int64", "nullable": true }, - "Nation": { + "UpdatedId": { "type": "string", - "description": "民族", + "description": "更新人Id", "nullable": true }, - "Phone": { + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "手机号码", + "description": "更新人姓名", "nullable": true }, - "CardType": { - "$ref": "#/components/schemas/CardTypeEnum" + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "nullable": true }, - "IdCardNum": { + "DeleteTime": { + "type": "integer", + "description": "删除时间", + "format": "int64", + "nullable": true + }, + "DeletedId": { "type": "string", - "description": "身份证号", + "description": "删除人Id", "nullable": true }, - "Email": { + "DeletedName": { + "maxLength": 512, "type": "string", - "description": "邮箱", + "description": "删除人姓名", "nullable": true }, - "Address": { + "RowVersion": { "type": "string", - "description": "地址", + "description": "行版本号(用于乐观锁)", "nullable": true }, - "CultureLevel": { - "$ref": "#/components/schemas/CultureLevelEnum" + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true }, - "PoliticalOutlook": { + "TriggerId": { "type": "string", - "description": "政治面貌", "nullable": true }, - "College": { + "JobId": { "type": "string", - "description": "毕业院校", "nullable": true }, - "OfficePhone": { + "TriggerType": { "type": "string", - "description": "办公电话", "nullable": true }, - "EmergencyContact": { + "AssemblyName": { "type": "string", - "description": "紧急联系人", "nullable": true }, - "EmergencyPhone": { + "Args": { "type": "string", - "description": "紧急联系人电话", "nullable": true }, - "EmergencyAddress": { + "Description": { "type": "string", - "description": "紧急联系人地址", "nullable": true }, - "Introduction": { - "type": "string", - "description": "个人简介", + "Status": { + "$ref": "#/components/schemas/TriggerStatus" + }, + "StartTime": { + "type": "integer", + "format": "int64", "nullable": true }, - "OrderNo": { + "EndTime": { "type": "integer", - "description": "排序", - "format": "int32" + "format": "int64", + "nullable": true }, - "Remark": { - "type": "string", - "description": "备注", + "LastRunTime": { + "type": "integer", + "format": "int64", "nullable": true }, - "AccountType": { - "$ref": "#/components/schemas/AccountTypeEnum" + "NextRunTime": { + "type": "integer", + "format": "int64", + "nullable": true }, - "ManagerUserId": { - "type": "string", - "description": "直属主管Id", + "NumberOfRuns": { + "type": "integer", + "format": "int64" + }, + "MaxNumberOfRuns": { + "type": "integer", + "format": "int64" + }, + "NumberOfErrors": { + "type": "integer", + "format": "int64" + }, + "MaxNumberOfErrors": { + "type": "integer", + "format": "int64" + }, + "NumRetries": { + "type": "integer", + "format": "int32" + }, + "RetryTimeout": { + "type": "integer", + "format": "int32" + }, + "StartNow": { + "type": "boolean" + }, + "RunOnStart": { + "type": "boolean" + }, + "ResetOnlyOnce": { + "type": "boolean" + }, + "UpdatedTime": { + "type": "integer", + "format": "int64", "nullable": true + } + }, + "additionalProperties": false + }, + "SystemJobTriggerResponse": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Id" }, - "JobNum": { + "TriggerId": { "type": "string", - "description": "工号", + "description": "触发器Id", "nullable": true }, - "PosLevel": { + "JobId": { "type": "string", - "description": "职级", + "description": "作业Id", "nullable": true }, - "PosTitle": { + "TriggerType": { "type": "string", - "description": "职称", + "description": "触发器类型FullName", "nullable": true }, - "Expertise": { + "AssemblyName": { "type": "string", - "description": "擅长领域", + "description": "程序集Name", "nullable": true }, - "OfficeZone": { + "Args": { "type": "string", - "description": "办公区域", + "description": "参数", "nullable": true }, - "Office": { + "Description": { "type": "string", - "description": "办公室", + "description": "描述信息", "nullable": true }, - "JoinTime": { + "Status": { + "$ref": "#/components/schemas/TriggerStatus" + }, + "StartTime": { "type": "integer", - "description": "入职日期", + "description": "起始时间", "format": "int64", "nullable": true }, - "LastLoginIp": { - "type": "string", - "description": "最新登录Ip", + "EndTime": { + "type": "integer", + "description": "结束时间", + "format": "int64", "nullable": true }, - "LastLoginAddress": { - "type": "string", - "description": "最新登录地点", + "LastRunTime": { + "type": "integer", + "description": "最近运行时间", + "format": "int64", "nullable": true }, - "LastLoginTime": { + "NextRunTime": { "type": "integer", - "description": "最新登录时间", + "description": "下一次运行时间", "format": "int64", "nullable": true }, - "LastLoginDevice": { - "type": "string", - "description": "最新登录设备", - "nullable": true + "NumberOfRuns": { + "type": "integer", + "description": "触发次数", + "format": "int64" }, - "Signature": { - "type": "string", - "description": "电子签名", + "MaxNumberOfRuns": { + "type": "integer", + "description": "最大触发次数(0:不限制,n:N次)", + "format": "int64" + }, + "NumberOfErrors": { + "type": "integer", + "description": "出错次数", + "format": "int64" + }, + "MaxNumberOfErrors": { + "type": "integer", + "description": "最大出错次数(0:不限制,n:N次)", + "format": "int64" + }, + "NumRetries": { + "type": "integer", + "description": "重试次数", + "format": "int32" + }, + "RetryTimeout": { + "type": "integer", + "description": "重试间隔时间(ms)", + "format": "int32" + }, + "StartNow": { + "type": "boolean", + "description": "是否立即启动" + }, + "RunOnStart": { + "type": "boolean", + "description": "是否启动时执行一次" + }, + "ResetOnlyOnce": { + "type": "boolean", + "description": "是否在启动时重置最大触发次数等于一次的作业" + }, + "UpdatedTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", "nullable": true }, "IsEnabled": { @@ -95468,42 +94774,55 @@ } }, "additionalProperties": false, - "description": "租户用户输出参数" + "description": "系统作业触发器输出参数" }, - "TenantUserResponseSqlSugarPagedList": { + "SystemMenuMetaResponse": { "type": "object", "properties": { - "Page": { - "type": "integer", - "format": "int32" + "Title": { + "type": "string", + "description": "标题", + "nullable": true }, - "PageSize": { - "type": "integer", - "format": "int32" + "TitleCode": { + "type": "string", + "description": "标题国际化Key", + "nullable": true }, - "Total": { - "type": "integer", - "format": "int32" + "Icon": { + "type": "string", + "description": "图标", + "nullable": true }, - "TotalPages": { - "type": "integer", - "format": "int32" + "IsIframe": { + "type": "boolean", + "description": "是否内嵌" }, - "Items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantUserResponse" - }, + "IsLink": { + "type": "string", + "description": "外链链接", "nullable": true }, - "HasPrevPage": { - "type": "boolean" + "IsHide": { + "type": "boolean", + "description": "是否隐藏" }, - "HasNextPage": { - "type": "boolean" + "IsKeepAlive": { + "type": "boolean", + "description": "是否缓存" + }, + "IsAffix": { + "type": "boolean", + "description": "是否固定" + }, + "MenuContext": { + "type": "string", + "description": "菜单上下文:console。", + "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "菜单Meta配置" }, "TriggerStatus": { "enum": [ @@ -95527,6 +94846,68 @@ "Completed" ] }, + "UpdateAdvertisementCallbackConfigRequest": { + "required": [ + "ConfigJson", + "Id", + "Provider", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "Provider": { + "minLength": 1, + "type": "string", + "description": "广告平台 Provider。当前首批配置支持 `TopOn`、`GoogleAdMob`、`Pangle`、`UnityAds`。" + }, + "CallbackUrl": { + "type": "string", + "description": "广告平台后台配置的回调 URL。", + "nullable": true + }, + "SigningSecret": { + "type": "string", + "description": "签名密钥或共享密钥。传 `******` 时保留原值。", + "nullable": true + }, + "VerificationKeys": { + "type": "string", + "description": "验签公钥或验证材料。传 `******` 时保留原值。", + "nullable": true + }, + "ConfigJson": { + "minLength": 1, + "type": "string", + "description": "广告回调动态配置 JSON。字段由 Provider schema 决定;敏感字段传 `******` 时保留原值。" + }, + "ParameterPurposeJson": { + "type": "string", + "description": "参数作用说明 JSON。", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用。" + }, + "Remark": { + "type": "string", + "description": "备注。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "租户广告回调配置更新输入参数。\n\n敏感字段提交 `******` 时表示保留原值。" + }, "UpdateChannelDefinitionRequest": { "required": [ "Code", @@ -95587,6 +94968,72 @@ "additionalProperties": false, "description": "渠道更新输入参数" }, + "UpdateClientApiPolicyRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "SignatureRequired": { + "type": "boolean", + "description": "是否要求请求签名。" + }, + "DeviceProofRequired": { + "type": "boolean", + "description": "是否要求设备证明。" + }, + "RiskPolicy": { + "type": "string", + "description": "风险策略生效模式。", + "nullable": true + }, + "SigningKey": { + "type": "string", + "description": "访问令牌签名密钥。回传 `******` 或留空均表示保留原值;提交新明文则替换。", + "nullable": true + }, + "LifetimeMinutes": { + "type": "integer", + "description": "访问令牌有效期(分钟)。", + "format": "int32" + }, + "TicketExpireTime": { + "type": "integer", + "description": "票据固定到期时间(Unix 秒);0 表示永不过期,非 0 值必须晚于当前时间且不超过 30 天。", + "format": "int64" + }, + "EnableKeyAutoCreate": { + "type": "boolean", + "description": "是否允许首次签发时自动创建租户应用级 RSA key。" + }, + "EnableReturnHttpManager": { + "type": "boolean", + "description": "区服列表是否返回 HttpManagerUrl。" + }, + "EnableSandBoxRecharge": { + "type": "boolean", + "description": "订单是否启用沙箱直发(测试充值)。" + }, + "Remark": { + "type": "string", + "description": "备注。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "租户 Client API 运行策略更新输入参数" + }, "UpdateConfigRequest": { "required": [ "Id" @@ -95746,6 +95193,52 @@ }, "additionalProperties": false }, + "UpdateDeviceGroupRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "Description": { + "type": "string", + "nullable": true + }, + "CreatedName": { + "type": "string", + "nullable": true + }, + "UpdatedName": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Id" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string", + "description": "客户端读取记录时的版本号,用于阻止过期数据覆盖较新的修改。" + }, + "DeviceIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "设备id列表(必须与本分组同应用,跨应用设备由服务拒绝)", + "nullable": true + } + }, + "additionalProperties": false, + "description": "机器码分组更新输入参数" + }, "UpdateDictionaryDataRequest": { "required": [ "Id" @@ -95975,6 +95468,125 @@ }, "additionalProperties": false }, + "UpdateGameAdvertisementRewardEntityRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + } + }, + "additionalProperties": false, + "description": "广告奖励发放账本更新输入参数。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束;\nUpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持管理后台修改)。" + }, + "UpdateGameAnnouncementEntityRequest": { + "required": [ + "Content", + "EndTime", + "Id", + "IsActive", + "Priority", + "RowVersion", + "StartTime", + "Title" + ], + "type": "object", + "properties": { + "Language": { + "type": "string", + "nullable": true + }, + "AreaId": { + "type": "string", + "nullable": true + }, + "Title": { + "minLength": 1, + "type": "string" + }, + "TitleLocalizationKey": { + "type": "string", + "nullable": true + }, + "Content": { + "minLength": 1, + "type": "string" + }, + "ContentLocalizationKey": { + "type": "string", + "nullable": true + }, + "StartTime": { + "type": "integer", + "format": "int64" + }, + "EndTime": { + "type": "integer", + "format": "int64" + }, + "Priority": { + "type": "integer", + "format": "int32" + }, + "IsActive": { + "type": "boolean" + }, + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "主键Id" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string", + "description": "客户端读取记录时的版本号,用于阻止过期数据覆盖较新的修改。" + } + }, + "additionalProperties": false, + "description": "游戏公告更新输入参数" + }, + "UpdateGameAntiCheatEventReviewRequest": { + "required": [ + "Id", + "ManualReviewState", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "ManualReviewState": { + "$ref": "#/components/schemas/ManualReviewStateEnum" + }, + "ReviewNote": { + "type": "string", + "description": "复核备注。可空。", + "nullable": true + } + }, + "additionalProperties": false, + "description": "反作弊事件人工复核输入(ReviewAsync 动作)。仅允许在 Pending 状态下迁移到 Approved/Rejected/Escalated。" + }, "UpdateGameAppAssetPackageRequest": { "required": [ "Description", @@ -96052,6 +95664,49 @@ "additionalProperties": false, "description": "资源包版本更新输入参数" }, + "UpdateGameAppDeviceRequest": { + "required": [ + "DeviceUniqueIdentifier", + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "Description": { + "type": "string", + "nullable": true + }, + "CreatedName": { + "type": "string", + "nullable": true + }, + "UpdatedName": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Id" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string", + "description": "客户端读取记录时的版本号,用于阻止过期数据覆盖较新的修改。" + }, + "DeviceUniqueIdentifier": { + "minLength": 1, + "type": "string", + "description": "设备唯一标识" + } + }, + "additionalProperties": false, + "description": "机器码更新输入参数" + }, "UpdateGameAppFeatureSwitchRequest": { "type": "object", "properties": { @@ -96145,6 +95800,67 @@ "additionalProperties": false, "description": "活动/功能开关管理更新输入参数" }, + "UpdateGameAppOpenAccessRequest": { + "required": [ + "Id", + "Purpose", + "RowVersion", + "Scenario", + "ScopesJson", + "SubjectName" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "BindUserId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "绑定的系统用户 Id。" + }, + "Scenario": { + "maxLength": 256, + "minLength": 0, + "type": "string", + "description": "责任场景编码。" + }, + "Purpose": { + "maxLength": 512, + "minLength": 0, + "type": "string", + "description": "使用目的。" + }, + "SubjectName": { + "maxLength": 256, + "minLength": 0, + "type": "string", + "description": "责任主体。" + }, + "ScopesJson": { + "maxLength": 1024, + "minLength": 0, + "type": "string", + "description": "接口范围(允许调用的路由前缀集合,JSON 数组字符串)。" + }, + "ExpiresTime": { + "type": "integer", + "description": "过期时间,Unix 秒;为空表示不过期。", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false, + "description": "更新应用开放访问凭证输入。绑定用户和接口范围由服务端校验。" + }, "UpdateGameAppPackageRequest": { "required": [ "Id", @@ -96575,11 +96291,11 @@ "additionalProperties": false, "description": "版本管理更新输入参数" }, - "UpdateGamePaymentConfigRequest": { + "UpdateGameAreaClassifyEntityRequest": { "required": [ - "ConfigJson", + "Description", "Id", - "PayChannel", + "Name", "RowVersion" ], "type": "object", @@ -96594,678 +96310,754 @@ "minimum": 0, "type": "string" }, - "PackageId": { - "type": "string", - "description": "分包ID。空表示默认配置。", - "nullable": true - }, - "PayChannel": { + "Name": { "minLength": 1, "type": "string", - "description": "支付渠道" - }, - "IsSandbox": { - "type": "boolean", - "description": "是否沙盒配置" + "description": "名称" }, - "ConfigJson": { + "Description": { "minLength": 1, "type": "string", - "description": "支付配置JSON。传 ****** 时保留原配置。" - }, - "Remark": { - "type": "string", - "description": "备注", - "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏支付配置更新输入参数" - }, - "UpdateJobDetailRequest": { - "required": [ - "Id", - "JobId" - ], - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "主键Id" - }, - "CreatedId": { - "type": "string", - "description": "创建人Id", - "nullable": true - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" - }, - "CreatedName": { - "maxLength": 512, - "type": "string", - "description": "创建人姓名", - "nullable": true - }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true - }, - "UpdatedId": { - "type": "string", - "description": "更新人Id", - "nullable": true - }, - "UpdatedName": { - "maxLength": 512, - "type": "string", - "description": "更新人姓名", - "nullable": true - }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", - "nullable": true - }, - "DeleteTime": { - "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true + "description": "详细描述" }, - "DeletedId": { + "LocalizationKey": { "type": "string", - "description": "删除人Id", + "description": "本地化Key", "nullable": true }, - "DeletedName": { - "maxLength": 512, + "HttpManagerUrl": { "type": "string", - "description": "删除人姓名", + "description": "大区服务器 HTTP管理器URL", "nullable": true }, - "RowVersion": { + "DockerRegister": { "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "description": "镜像仓库地址", "nullable": true }, - "GroupName": { + "DockerUserName": { "type": "string", + "description": "仓库用户名", "nullable": true }, - "JobType": { + "DockerPassword": { "type": "string", + "description": "仓库密码", "nullable": true }, - "AssemblyName": { + "ContainerNetName": { "type": "string", + "description": "容器网络名", "nullable": true }, - "Description": { + "ContainerSubnet": { "type": "string", + "description": "容器网络子网", "nullable": true }, - "Concurrent": { - "type": "boolean" - }, - "IncludeAnnotations": { - "type": "boolean" - }, - "Properties": { + "ContainerGateway": { "type": "string", + "description": "容器网络网关", "nullable": true }, - "UpdatedTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "CreateType": { - "$ref": "#/components/schemas/JobCreateTypeEnum" - }, - "ScriptCode": { + "ImageName": { "type": "string", + "description": "镜像源", "nullable": true - }, - "JobId": { - "minLength": 2, - "type": "string", - "description": "作业Id" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "游戏大区分类更新输入参数" }, - "UpdateJobTriggerRequest": { + "UpdateGameAreaEntityRequest": { "required": [ - "JobId", - "TriggerId" + "Capacity", + "ClassifyId", + "CreationTime", + "Description", + "HttpManageUrl", + "Id", + "IsDefault", + "IsRecommend", + "Language", + "LastMaintenanceTime", + "Name", + "RowVersion", + "ServerStatus", + "ServerType", + "ServerVersion", + "TcpSocketUrl", + "WebSocketUrl" ], "type": "object", "properties": { "Id": { - "type": "string", - "description": "主键Id(新增为 0,编辑由前端回填)" + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, "RowVersion": { - "type": "string", - "description": "乐观锁版本号", - "nullable": true - }, - "TriggerId": { - "minLength": 2, - "type": "string", - "description": "触发器Id" - }, - "JobId": { - "minLength": 2, - "type": "string", - "description": "作业Id" - }, - "TriggerType": { - "type": "string", - "description": "触发器类型FullName", - "nullable": true - }, - "AssemblyName": { - "type": "string", - "description": "程序集名称", - "nullable": true + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" }, - "Args": { + "Name": { + "minLength": 1, "type": "string", - "description": "参数", - "nullable": true + "description": "名称" }, "Description": { + "minLength": 1, "type": "string", - "description": "描述信息", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "起始时间", - "format": "int64", - "nullable": true + "description": "详细描述" }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", + "LocalizationKey": { + "type": "string", + "description": "本地化Key", "nullable": true }, - "MaxNumberOfRuns": { - "type": "integer", - "description": "最大触发次数(0:不限制,n:N次)", - "format": "int64" - }, - "MaxNumberOfErrors": { - "type": "integer", - "description": "最大出错次数(0:不限制,n:N次)", - "format": "int64" - }, - "NumRetries": { - "type": "integer", - "description": "重试次数", - "format": "int32" - }, - "RetryTimeout": { - "type": "integer", - "description": "重试间隔时间(ms)", - "format": "int32" - }, - "StartNow": { + "IsDefault": { "type": "boolean", - "description": "是否立即启动" + "description": "是否是默认" }, - "RunOnStart": { + "IsRecommend": { "type": "boolean", - "description": "是否启动时执行一次" + "description": "是否推荐" }, - "ResetOnlyOnce": { - "type": "boolean", - "description": "是否在启动时重置最大触发次数等于一次的作业" - } - }, - "additionalProperties": false - }, - "UpdateMenuRequest": { - "required": [ - "Title" - ], - "type": "object", - "properties": { - "Id": { + "ClassifyId": { "type": "string", - "description": "主键Id(新增为 0,编辑由前端回填)" + "description": "大区分类Id" }, - "RowVersion": { + "HttpManageUrl": { + "minLength": 1, + "type": "string", + "description": "Http 管理连接地址" + }, + "TcpSocketUrl": { + "minLength": 1, "type": "string", - "description": "乐观锁版本号", - "nullable": true + "description": "TcpSocket 连接地址" }, - "Pid": { + "WebSocketUrl": { + "minLength": 1, "type": "string", - "description": "父Id" + "description": "WebSocket连接地址" }, - "Type": { - "$ref": "#/components/schemas/MenuTypeEnum" + "Capacity": { + "type": "integer", + "description": "最大玩家数量", + "format": "int32" }, - "Key": { + "CreationTime": { + "type": "integer", + "description": "启用的日期", + "format": "int64" + }, + "LastMaintenanceTime": { + "type": "integer", + "description": "服务器最后一次维护或更新的日期", + "format": "int64" + }, + "ServerVersion": { + "minLength": 1, "type": "string", - "description": "业务键(按钮类型用于唯一性校验;管理端新增可为空)", + "description": "游戏版本号" + }, + "ServerContainerId": { + "type": "string", + "description": "服务器的 Docker 容器 ID", "nullable": true }, - "Title": { + "ServerType": { "minLength": 1, "type": "string", - "description": "菜单名称" + "description": "服务器的游戏模式类型" }, - "TitleCode": { + "Language": { + "$ref": "#/components/schemas/GameLanguage" + }, + "ServerStatus": { + "$ref": "#/components/schemas/GameServerStatus" + }, + "AppVersion": { "type": "string", - "description": "菜单名称国际化Key", + "description": "客户端版本", "nullable": true }, - "Name": { + "AllowedPlayerProfile": { "type": "string", - "description": "路由名称", + "description": "指定可以加入此服务器的玩家类型", "nullable": true }, - "Path": { + "ServerEvents": { "type": "string", - "description": "路由地址", + "description": "特定服务器举行的事件或活动信息", "nullable": true }, - "Component": { + "AccessControls": { "type": "string", - "description": "组件路径", + "description": "访问权限设置,控制哪些玩家可以访问服务器", "nullable": true }, - "Redirect": { + "ServerParams": { "type": "string", - "description": "重定向", + "description": "运行参数。此前 BaseRequest 缺此声明,Adapt 无来源导致实体 NOT NULL 列恒 23502。", "nullable": true }, - "Permission": { + "ClientDispatchApiPrefix": { "type": "string", - "description": "权限标识", + "description": "客户端转发 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\nClient API 代理玩家普通请求(建角、改名、查角色、创建订单等)的 Server HTTP 路由前缀,默认 `game/api`。", "nullable": true }, - "Icon": { + "FulfillmentApiPrefix": { "type": "string", - "description": "图标", + "description": "履约投递 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\n后台履约、发货、退款、邮件投递、广告奖励、Campaign 发布、后台运营操作等资产或运营投递的前缀,默认 `game/api`。", "nullable": true }, - "OutLink": { + "GmApiPrefix": { "type": "string", - "description": "外链链接", + "description": "GM 命令 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造 GM URL。", "nullable": true }, - "OrderNo": { - "type": "integer", - "description": "排序", - "format": "int32" - }, - "IsHide": { - "type": "boolean", - "description": "是否隐藏" + "ControlApiPrefix": { + "type": "string", + "description": "管理控制 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造控制 URL。", + "nullable": true }, - "IsKeepAlive": { + "EnableClientGmApi": { "type": "boolean", - "description": "是否缓存" + "description": "是否允许客户端调试 GM 通道(来源 change C150 §3.2 / C175)。仅 Admin 配置标记,最终放行由 Game Server 启动参数与环境门禁决定,默认关闭。" }, - "IsAffix": { + "IsEnabled": { "type": "boolean", - "description": "是否固定" + "description": "是否启用" }, - "IsIframe": { - "type": "boolean", - "description": "是否内嵌" + "ChannelId": { + "type": "string", + "description": "渠道id" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "PlatformId": { + "type": "string", + "description": "平台id" }, - "Remark": { + "PackageId": { "type": "string", - "description": "备注", - "nullable": true + "description": "包id" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "游戏区服更新输入参数" }, - "UpdateOpenAccessRequest": { + "UpdateGameBannerAnnouncementEntityRequest": { "required": [ - "AccessKey", - "AccessSecret", - "BindUserId", - "Id" + "AreaId", + "Content", + "EndTime", + "Id", + "Interval", + "IsActive", + "Priority", + "RepeatCount", + "RowVersion", + "StartTime" ], "type": "object", "properties": { "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "AreaId": { "type": "string", - "description": "主键Id" + "description": "区服ID" }, - "CreatedId": { + "Content": { + "minLength": 1, "type": "string", - "description": "创建人Id", + "description": "内容" + }, + "ContentLocalizationKey": { + "type": "string", + "description": "内容本地化Key。可空:空 = 直接展示 Content(服务端兜底空串,实体列 NOT NULL)。", "nullable": true }, - "CreatedTime": { + "Priority": { "type": "integer", - "description": "创建时间", + "description": "优先级", + "format": "int32" + }, + "StartTime": { + "type": "integer", + "description": "开始时间", "format": "int64" }, - "CreatedName": { - "maxLength": 512, - "type": "string", - "description": "创建人姓名", - "nullable": true + "EndTime": { + "type": "integer", + "description": "结束时间", + "format": "int64" }, - "UpdateCount": { + "Interval": { "type": "integer", - "description": "更新次数", - "format": "int32", - "nullable": true + "description": "间隔时间", + "format": "int32" }, - "UpdateTime": { + "RepeatCount": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "更新时间", - "format": "int64", - "nullable": true + "description": "重复次数", + "format": "int32" }, - "UpdatedId": { + "IsActive": { + "type": "boolean", + "description": "是否激活" + } + }, + "additionalProperties": false, + "description": "游戏内横幅公告更新输入参数" + }, + "UpdateGameCommodityEntityRequest": { + "required": [ + "CreatedName", + "Id", + "RowVersion", + "UpdatedName" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "CreatedName": { + "minLength": 1, "type": "string", - "description": "更新人Id", - "nullable": true + "description": "创建者姓名" }, "UpdatedName": { - "maxLength": 512, + "minLength": 1, "type": "string", - "description": "更新人姓名", - "nullable": true + "description": "修改者姓名" + } + }, + "additionalProperties": false, + "description": "游戏商品交易更新输入参数" + }, + "UpdateGameDockerTagEntityRequest": { + "required": [ + "Description", + "Id", + "Name", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", - "nullable": true + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" }, - "DeleteTime": { - "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" }, - "DeletedId": { + "Description": { + "minLength": 1, "type": "string", - "description": "删除人Id", - "nullable": true + "description": "详细描述" }, - "DeletedName": { - "maxLength": 512, + "ServerVersion": { "type": "string", - "description": "删除人姓名", + "description": "tag", "nullable": true + } + }, + "additionalProperties": false, + "description": "游戏Docker标签更新输入参数" + }, + "UpdateGameGoodsCatalogueEntityRequest": { + "required": [ + "Description", + "Id", + "Name", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, "RowVersion": { - "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true + "Name": { + "minLength": 1, + "type": "string", + "description": "名称" }, - "AccessKey": { + "Description": { "minLength": 1, "type": "string", - "description": "身份标识" + "description": "详细描述" + } + }, + "additionalProperties": false, + "description": "游戏道具分类更新输入参数" + }, + "UpdateGameGoodsEntityRequest": { + "required": [ + "ClassifyId", + "ConfigId", + "Description", + "Id", + "Name", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "AccessSecret": { + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "ConfigId": { + "type": "integer", + "description": "配置ID", + "format": "int32" + }, + "ClassifyId": { + "type": "string", + "description": "类别id" + }, + "Name": { "minLength": 1, "type": "string", - "description": "密钥" + "description": "名称" }, - "BindUserId": { + "Description": { + "minLength": 1, "type": "string", - "description": "绑定用户Id" + "description": "详细描述" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "游戏资源更新输入参数" }, - "UpdateRoleRequest": { + "UpdateGameMailCampaignEntityRequest": { "required": [ + "AreaId", "Id", - "Name" + "Name", + "RowVersion", + "TitlesJson" ], "type": "object", "properties": { "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "AreaId": { "type": "string", - "description": "主键Id" + "description": "区服Id。用于解析目标游戏服 HttpManageUrl 调用 Server 发布接口。" }, - "CreatedId": { + "Name": { + "minLength": 1, "type": "string", - "description": "创建人Id", - "nullable": true + "description": "Campaign 名称(Admin 侧识别用)。" }, - "CreatedTime": { - "type": "integer", - "description": "创建时间", - "format": "int64" + "TemplateId": { + "type": "string", + "description": "模板 Id(0 = 无模板,裸文案发布)。" }, - "CreatedName": { - "maxLength": 512, + "MailType": { + "$ref": "#/components/schemas/MailCampaignMailType" + }, + "TitlesJson": { + "minLength": 1, "type": "string", - "description": "创建人姓名", - "nullable": true + "description": "多语言标题 JSON(ListAsync)。" }, - "UpdateCount": { - "type": "integer", - "description": "更新次数", - "format": "int32", + "ContentsJson": { + "type": "string", + "description": "多语言正文 JSON(ListAsync)。", "nullable": true }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", + "SenderNamesJson": { + "type": "string", + "description": "多语言发件人名称 JSON(ListAsync)。", "nullable": true }, - "UpdatedId": { + "AttachmentsJson": { "type": "string", - "description": "更新人Id", + "description": "附件列表 JSON(ListAsync)。", "nullable": true }, - "UpdatedName": { - "maxLength": 512, + "ServerIdsJson": { "type": "string", - "description": "更新人姓名", + "description": "服务器 Id 白名单 JSON(ListAsync)。", "nullable": true }, - "IsDeleted": { - "type": "boolean", - "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "ChannelIdsJson": { + "type": "string", + "description": "渠道 Id 白名单 JSON(ListAsync)。", "nullable": true }, - "DeleteTime": { + "MinLevel": { "type": "integer", - "description": "删除时间", - "format": "int64", - "nullable": true + "description": "最低等级(含),0 表示不限。", + "format": "int32" }, - "DeletedId": { + "MaxLevel": { + "type": "integer", + "description": "最高等级(含),0 表示不限。", + "format": "int32" + }, + "ExpireAttachmentPolicy": { + "$ref": "#/components/schemas/MailCampaignExpirePolicy" + }, + "ExpireTime": { + "type": "integer", + "description": "过期时间(Unix 秒,UTC),0 表示永不过期。", + "format": "int64" + }, + "Remark": { "type": "string", - "description": "删除人Id", + "description": "备注。", "nullable": true }, - "DeletedName": { - "maxLength": 512, + "PublishStatus": { + "$ref": "#/components/schemas/MailCampaignPublishStatus" + }, + "LastServerCode": { + "$ref": "#/components/schemas/MailCampaignServerCode" + }, + "LastServerMessage": { "type": "string", - "description": "删除人姓名", "nullable": true + } + }, + "additionalProperties": false, + "description": "更新 Campaign 输入。仅 Draft 可更新(Published/Revoked 主体不可变 B1)。" + }, + "UpdateGameMailEntityRequest": { + "required": [ + "AreaId", + "AttachmentsJson", + "Body", + "ExpirationTime", + "Id", + "IsAllPost", + "MailType", + "PlayerIdListJson", + "RowVersion", + "SubTitle", + "Title" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "Title": { + "minLength": 1, "type": "string", - "description": "行版本号(用于乐观锁)", - "nullable": true + "description": "标题" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", - "nullable": true + "SubTitle": { + "minLength": 1, + "type": "string", + "description": "副标题" }, - "Code": { + "Body": { + "minLength": 1, "type": "string", - "nullable": true + "description": "详细内容" }, - "OrderNo": { - "type": "integer", - "format": "int32" + "PlayerIdListJson": { + "minLength": 1, + "type": "string", + "description": "玩家ID列表" }, - "DataScope": { - "$ref": "#/components/schemas/DataScopeEnum" + "IsAllPost": { + "type": "boolean", + "description": "是否发全部用户" + }, + "IsTranslate": { + "type": "boolean", + "description": "是否本地化" }, - "Remark": { + "AreaId": { + "minLength": 1, "type": "string", - "nullable": true + "description": "区服ID。此前仅 AddRequest 声明:update 提交的 areaId 被绑定丢弃,Adapt 后实体 0 值穿透\nIgnoreColumns(忽略 null) 不拦 0,导致编辑一次就把区服/类型/过期时间清零。" }, - "Name": { + "AttachmentsJson": { "minLength": 1, "type": "string", - "description": "名称" + "description": "附件列表" }, - "MenuIdList": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "菜单Id集合", - "nullable": true + "ExpirationTime": { + "type": "integer", + "description": "邮件的过期日期", + "format": "int64" + }, + "MailType": { + "$ref": "#/components/schemas/GameMailType" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "游戏邮件更新输入参数" }, - "UpdateSystemEmailProviderRequest": { + "UpdateGameMailTemplateCategoryEntityRequest": { "required": [ - "DefaultFromEmail", "Id", - "Provider", + "Name", "RowVersion" ], "type": "object", "properties": { - "Purpose": { - "type": "integer", - "description": "平台系统邮件用途(`SystemEmailPurpose`)。0 表示默认系统邮件配置。", - "format": "int32" + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "Provider": { + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "Name": { "minLength": 1, "type": "string", - "description": "Provider 类型。当前支持 `TencentCloudSes` 和 `Smtp`。" + "description": "名称" }, - "Host": { + "Description": { "type": "string", - "description": "SMTP 主机(Provider=Smtp 时必填)。", + "description": "详细描述", "nullable": true }, - "Port": { - "type": "integer", - "description": "SMTP 端口(Provider=Smtp 时必填)。", - "format": "int32", + "Icon": { + "type": "string", + "description": "图标", "nullable": true }, - "EnableSsl": { - "type": "boolean", - "description": "SMTP 启用 SSL。", - "nullable": true + "Sort": { + "type": "integer", + "description": "排序", + "format": "int32" }, - "UseDefaultCredentials": { + "IsEnabled": { "type": "boolean", - "description": "SMTP 使用默认凭据。", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true - }, - "UserName": { + } + }, + "additionalProperties": false, + "description": "邮件模板分类更新输入参数" + }, + "UpdateGameMailTemplateEntityRequest": { + "required": [ + "BodyTemplate", + "CategoryId", + "Id", + "Name", + "RowVersion", + "TitleTemplate" + ], + "type": "object", + "properties": { + "Name": { + "minLength": 1, "type": "string", - "description": "SMTP 用户名(敏感字段)。", - "nullable": true + "description": "名称" }, - "Password": { + "Description": { "type": "string", - "description": "SMTP 密码(敏感字段)。", + "description": "详细描述", "nullable": true }, - "Region": { + "CategoryId": { "type": "string", - "description": "Provider 区域。", - "nullable": true + "description": "分类Id" }, - "SecretId": { + "TitleTemplate": { + "minLength": 1, "type": "string", - "description": "腾讯云 SecretId(敏感字段)。", - "nullable": true + "description": "标题模板" }, - "SecretKey": { + "SubTitleTemplate": { "type": "string", - "description": "腾讯云 SecretKey(敏感字段)。", + "description": "副标题模板", "nullable": true }, - "DefaultFromEmail": { + "BodyTemplate": { "minLength": 1, "type": "string", - "description": "默认发件人邮箱。" - }, - "DefaultFromName": { - "type": "string", - "description": "默认发件人显示名。", - "nullable": true + "description": "内容模板" }, - "DefaultToEmail": { + "DefaultAttachmentsJson": { "type": "string", - "description": "默认收件人邮箱。", + "description": "默认附件JSON", "nullable": true }, - "TemplateId": { - "type": "string", - "description": "腾讯云 SES 模板 ID。Provider=TencentCloudSes 时必填。", - "nullable": true + "DefaultMailType": { + "$ref": "#/components/schemas/GameMailType" }, - "TemplateDataJson": { - "type": "string", - "description": "腾讯云 SES 模板变量 JSON。", + "DefaultExpirationDays": { + "type": "integer", + "description": "默认过期天数", + "format": "int32", "nullable": true }, - "Priority": { + "Sort": { "type": "integer", - "description": "配置选择优先级(数值越大越优先)。仅用于配置选择,不代表邮件投递队列优先级。", + "description": "排序", "format": "int32" }, "IsEnabled": { "type": "boolean", - "description": "是否启用。禁用配置不参与系统邮件选择和测试发送。" - }, - "Remark": { - "type": "string", - "description": "备注。", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, "Id": { @@ -97282,13 +97074,12 @@ } }, "additionalProperties": false, - "description": "平台系统邮件 Provider 配置更新输入参数。\n\n敏感字段(UserName / Password / SecretId / SecretKey)回传 `******` 时保留数据库原值,避免脱敏回写覆盖真实凭据。" + "description": "邮件模板更新输入参数" }, - "UpdateTenantAdvertisementCallbackConfigRequest": { + "UpdateGameOnlinePlayerSegmentRequest": { "required": [ - "ConfigJson", "Id", - "Provider", + "Name", "RowVersion" ], "type": "object", @@ -97303,50 +97094,52 @@ "minimum": 0, "type": "string" }, - "Provider": { + "Name": { "minLength": 1, "type": "string", - "description": "广告平台 Provider。当前首批配置支持 `TopOn`、`GoogleAdMob`、`Pangle`、`UnityAds`。" + "description": "分群名称。" }, - "CallbackUrl": { + "Description": { "type": "string", - "description": "广告平台后台配置的回调 URL。", + "description": "分群描述。", "nullable": true }, - "SigningSecret": { + "ConditionsJson": { "type": "string", - "description": "签名密钥或共享密钥。传 `******` 时保留原值。", + "description": "分群条件 JSON(List;空 = 不限条件)。", "nullable": true }, - "VerificationKeys": { - "type": "string", - "description": "验签公钥或验证材料。传 `******` 时保留原值。", - "nullable": true + "SyncStatus": { + "$ref": "#/components/schemas/OnlinePlayerSegmentSyncStatus" }, - "ConfigJson": { - "minLength": 1, + "LastSyncTime": { + "type": "integer", + "description": "最近同步时间(Unix 秒;服务端回填)。", + "format": "int64" + }, + "LastSyncServerId": { "type": "string", - "description": "广告回调动态配置 JSON。字段由 Provider schema 决定;敏感字段传 `******` 时保留原值。" + "description": "最近同步区服Id(服务端回填)。" }, - "ParameterPurposeJson": { + "LastOnlineSegmentId": { "type": "string", - "description": "参数作用说明 JSON。", - "nullable": true + "description": "Online 侧分群标识(服务端回填)。" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。" + "LastServerCode": { + "type": "integer", + "description": "最近同步结果码(服务端回填)。", + "format": "int32" }, - "Remark": { + "LastServerMessage": { "type": "string", - "description": "备注。", + "description": "最近同步消息(服务端回填)。", "nullable": true } }, "additionalProperties": false, - "description": "租户广告回调配置更新输入参数。\n\n敏感字段提交 `******` 时表示保留原值。" + "description": "更新玩家分群输入(编辑定义后须重新 syncOnline 生效)。" }, - "UpdateTenantClientApiPolicyRequest": { + "UpdateGameOrderEntityRequest": { "required": [ "Id", "RowVersion" @@ -97362,105 +97155,292 @@ "maximum": 9.223372036854776E+18, "minimum": 0, "type": "string" + } + }, + "additionalProperties": false, + "description": "游戏支付订单更新输入参数" + }, + "UpdateGameOrderFulfillmentEntityRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "SignatureRequired": { - "type": "boolean", - "description": "是否要求请求签名。" + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + } + }, + "additionalProperties": false, + "description": "权益发货账本更新输入参数(C120)。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束;\nUpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持修改)。" + }, + "UpdateGamePaymentConfigRequest": { + "required": [ + "ConfigJson", + "Id", + "PayChannel", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "DeviceProofRequired": { - "type": "boolean", - "description": "是否要求设备证明。" + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" }, - "RiskPolicy": { + "PackageId": { "type": "string", - "description": "风险策略生效模式。", + "description": "分包ID。空表示默认配置。", "nullable": true }, - "SigningKey": { + "PayChannel": { + "minLength": 1, "type": "string", - "description": "访问令牌签名密钥。回传 `******` 或留空均表示保留原值;提交新明文则替换。", - "nullable": true - }, - "LifetimeMinutes": { - "type": "integer", - "description": "访问令牌有效期(分钟)。", - "format": "int32" - }, - "TicketExpireTime": { - "type": "integer", - "description": "票据固定到期时间(Unix 秒);0 表示永不过期,非 0 值必须晚于当前时间且不超过 30 天。", - "format": "int64" - }, - "EnableKeyAutoCreate": { - "type": "boolean", - "description": "是否允许首次签发时自动创建租户应用级 RSA key。" + "description": "支付渠道" }, - "EnableReturnHttpManager": { + "IsSandbox": { "type": "boolean", - "description": "区服列表是否返回 HttpManagerUrl。" + "description": "是否沙盒配置" }, - "EnableSandBoxRecharge": { - "type": "boolean", - "description": "订单是否启用沙箱直发(测试充值)。" + "ConfigJson": { + "minLength": 1, + "type": "string", + "description": "支付配置JSON。传 ****** 时保留原配置。" }, "Remark": { "type": "string", - "description": "备注。", + "description": "备注", "nullable": true } }, "additionalProperties": false, - "description": "租户 Client API 运行策略更新输入参数" + "description": "游戏支付配置更新输入参数" + }, + "UpdateGamePenaltyAppealEntityRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + } + }, + "additionalProperties": false, + "description": "申诉更新输入参数。申诉为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。" + }, + "UpdateGamePenaltyEntityRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + } + }, + "additionalProperties": false, + "description": "处罚更新输入参数。处罚为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。" }, - "UpdateTenantDeviceGroupRequest": { + "UpdateGameRedeemCodeChannelEntityRequest": { "required": [ + "Description", "Id", + "Name", "RowVersion" ], "type": "object", "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, "Name": { + "minLength": 1, "type": "string", - "nullable": true + "description": "名称。此前 UpdateRequest 缺此声明:编辑提交的 name 被绑定丢弃,Adapt 后实体 Name=null,\n又被 IgnoreColumns(true)(忽略 null 列)跳过 —— update 200 但名称静默不更新。" }, "Description": { + "minLength": 1, "type": "string", - "nullable": true + "description": "详细描述" }, - "CreatedName": { - "type": "string", - "nullable": true + "RoleUsageLimit": { + "maximum": 2147483647, + "minimum": 0, + "type": "integer", + "description": "每角色可用次数(兑换码分组角色限制)。0 = 不限制,1 = 每角色一次,N = 每角色最多 N 次。", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "兑换码渠道更新输入参数" + }, + "UpdateGameRedeemCodeEntityRequest": { + "required": [ + "Description", + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "UpdatedName": { + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + }, + "Description": { + "minLength": 1, "type": "string", - "nullable": true + "description": "描述" + } + }, + "additionalProperties": false, + "description": "兑换码更新输入参数" + }, + "UpdateGameRedeemCodeUseRecordEntityRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + } + }, + "additionalProperties": false, + "description": "兑换记录更新输入参数" + }, + "UpdateGameReportEntityRequest": { + "required": [ + "Id", + "RowVersion" + ], + "type": "object", + "properties": { "Id": { - "type": "string", - "description": "Id" + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + }, + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" + } + }, + "additionalProperties": false, + "description": "举报更新输入参数。举报为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。" + }, + "UpdateGameRewardTemplateEntityRequest": { + "required": [ + "GroupId", + "Id", + "Name", + "RewardItemsJson", + "RowVersion" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, "RowVersion": { "maximum": 9.223372036854776E+18, "minimum": 0, + "type": "string" + }, + "Name": { + "minLength": 1, "type": "string", - "description": "客户端读取记录时的版本号,用于阻止过期数据覆盖较新的修改。" + "description": "名称。" }, - "DeviceIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "设备id列表(必须与本分组同应用,跨应用设备由服务拒绝)", + "Description": { + "type": "string", + "description": "详细描述。", + "nullable": true + }, + "GroupId": { + "type": "string", + "description": "分组Id。" + }, + "RewardItemsJson": { + "minLength": 1, + "type": "string", + "description": "奖励明细 JSON。" + }, + "SnapshotSchemaVersion": { + "type": "integer", + "description": "快照结构版本。", + "format": "int32" + }, + "Sort": { + "type": "integer", + "description": "排序。", + "format": "int32" + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用。", "nullable": true } }, "additionalProperties": false, - "description": "机器码分组更新输入参数" + "description": "奖励模板更新输入参数。" }, - "UpdateTenantGameAdvertisementRewardEntityRequest": { + "UpdateGameRewardTemplateGroupEntityRequest": { "required": [ "Id", + "Name", "RowVersion" ], "type": "object", @@ -97474,66 +97454,69 @@ "maximum": 9.223372036854776E+18, "minimum": 0, "type": "string" + }, + "Name": { + "minLength": 1, + "type": "string", + "description": "名称。" + }, + "Description": { + "type": "string", + "description": "详细描述。", + "nullable": true + }, + "Sort": { + "type": "integer", + "description": "排序。", + "format": "int32" + }, + "IsEnabled": { + "type": "boolean", + "description": "是否启用。", + "nullable": true } }, "additionalProperties": false, - "description": "广告奖励发放账本更新输入参数。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束;\nUpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持管理后台修改)。" + "description": "奖励模板分组更新输入参数。" }, - "UpdateTenantGameAnnouncementEntityRequest": { + "UpdateGameRoleEntityRequest": { "required": [ - "Content", - "EndTime", "Id", - "IsActive", - "Priority", - "RowVersion", - "StartTime", - "Title" + "RowVersion" ], "type": "object", "properties": { - "Language": { + "UserId": { "type": "string", - "nullable": true + "description": "用户ID" }, "AreaId": { "type": "string", - "nullable": true - }, - "Title": { - "minLength": 1, - "type": "string" + "description": "区服Id" }, - "TitleLocalizationKey": { + "Name": { "type": "string", + "description": "名称", "nullable": true }, - "Content": { - "minLength": 1, - "type": "string" - }, - "ContentLocalizationKey": { + "Description": { "type": "string", + "description": "详细描述", "nullable": true }, - "StartTime": { - "type": "integer", - "format": "int64" - }, - "EndTime": { + "Level": { "type": "integer", - "format": "int64" + "description": "角色当前的等级", + "format": "int64", + "nullable": true }, - "Priority": { + "LastLoginTime": { "type": "integer", - "format": "int32" - }, - "IsActive": { - "type": "boolean" + "description": "角色最后一次登录时间", + "format": "int64", + "nullable": true }, "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, "type": "string", "description": "主键Id" }, @@ -97541,16 +97524,22 @@ "maximum": 9.223372036854776E+18, "minimum": 0, "type": "string", - "description": "客户端读取记录时的版本号,用于阻止过期数据覆盖较新的修改。" + "description": "客户端读取记录时的版本号。" + }, + "RoleId": { + "type": "string", + "description": "角色Id", + "nullable": true } }, "additionalProperties": false, - "description": "游戏公告更新输入参数" + "description": "游戏角色更新输入参数" }, - "UpdateTenantGameAntiCheatEventReviewRequest": { + "UpdateGameTimeJobEntityRequest": { "required": [ + "Cron", "Id", - "ManualReviewState", + "Name", "RowVersion" ], "type": "object", @@ -97565,69 +97554,74 @@ "minimum": 0, "type": "string" }, - "ManualReviewState": { - "$ref": "#/components/schemas/ManualReviewStateEnum" + "Name": { + "minLength": 1, + "type": "string", + "description": "名称。此前 UpdateRequest 缺此声明:编辑提交的 name 被绑定丢弃,Adapt 后实体 Name=null,\n又被 IgnoreColumns(true)(忽略 null 列)跳过 —— update 200 但名称静默不更新(与兑换码渠道问题同模式)。" }, - "ReviewNote": { + "Description": { "type": "string", - "description": "复核备注。可空。", + "description": "详细描述", "nullable": true + }, + "Cron": { + "minLength": 1, + "type": "string", + "description": "Cron 表达式" + }, + "IsOnce": { + "type": "boolean", + "description": "是否一次性任务" } }, "additionalProperties": false, - "description": "反作弊事件人工复核输入(ReviewAsync 动作)。仅允许在 Pending 状态下迁移到 Approved/Rejected/Escalated。" + "description": "游戏定时任务更新输入参数" }, - "UpdateTenantGameAppDeviceRequest": { + "UpdateGameUserEntityRequest": { "required": [ - "DeviceUniqueIdentifier", "Id", "RowVersion" ], "type": "object", "properties": { - "Name": { - "type": "string", - "nullable": true + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "Description": { - "type": "string", - "nullable": true + "RowVersion": { + "maximum": 9.223372036854776E+18, + "minimum": 0, + "type": "string" }, - "CreatedName": { + "UserName": { "type": "string", "nullable": true }, - "UpdatedName": { + "Password": { "type": "string", "nullable": true }, - "Id": { - "type": "string", - "description": "Id" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string", - "description": "客户端读取记录时的版本号,用于阻止过期数据覆盖较新的修改。" + "Status": { + "$ref": "#/components/schemas/GameUserStatus" }, - "DeviceUniqueIdentifier": { - "minLength": 1, + "Description": { "type": "string", - "description": "设备唯一标识" + "nullable": true } }, "additionalProperties": false, - "description": "机器码更新输入参数" + "description": "游戏账号更新输入参数" }, - "UpdateTenantGameAppOpenAccessRequest": { + "UpdateGameWebShopEntityRequest": { "required": [ "Id", - "Purpose", - "RowVersion", - "Scenario", - "ScopesJson", - "SubjectName" + "ItemJson", + "Logo", + "Name", + "Price", + "RealPrice", + "RowVersion" ], "type": "object", "properties": { @@ -97641,51 +97635,62 @@ "minimum": 0, "type": "string" }, - "BindUserId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + "Name": { + "minLength": 1, "type": "string", - "description": "绑定的系统用户 Id。" + "description": "商品名称" }, - "Scenario": { - "maxLength": 256, - "minLength": 0, + "Logo": { + "minLength": 1, "type": "string", - "description": "责任场景编码。" + "description": "商品图" }, - "Purpose": { - "maxLength": 512, - "minLength": 0, + "Description": { "type": "string", - "description": "使用目的。" + "description": "商品描述", + "nullable": true }, - "SubjectName": { - "maxLength": 256, - "minLength": 0, + "KeyWords": { "type": "string", - "description": "责任主体。" + "description": "商品关键词", + "nullable": true }, - "ScopesJson": { - "maxLength": 1024, - "minLength": 0, + "Price": { + "minLength": 1, "type": "string", - "description": "接口范围(允许调用的路由前缀集合,JSON 数组字符串)。" + "description": "零售价" }, - "ExpiresTime": { + "RealPrice": { + "minLength": 1, + "type": "string", + "description": "实际价格" + }, + "ItemJson": { + "minLength": 1, + "type": "string", + "description": "道具列表" + }, + "IsUp": { + "type": "boolean", + "description": "是否上架" + }, + "Weight": { "type": "integer", - "description": "过期时间,Unix 秒;为空表示不过期。", - "format": "int64", - "nullable": true + "description": "权重", + "format": "int32" } }, "additionalProperties": false, - "description": "更新应用开放访问凭证输入。绑定用户和接口范围由服务端校验。" + "description": "游戏商城实体更新输入参数" }, - "UpdateTenantGameAreaClassifyEntityRequest": { + "UpdateGameWebShopOrderEntityRequest": { "required": [ - "Description", "Id", + "ItemJson", + "Logo", "Name", + "Price", + "RealPrice", "RowVersion" ], "type": "object", @@ -97703,253 +97708,382 @@ "Name": { "minLength": 1, "type": "string", - "description": "名称" + "description": "商品名称" + }, + "Logo": { + "minLength": 1, + "type": "string", + "description": "商品图" }, "Description": { + "type": "string", + "description": "商品描述", + "nullable": true + }, + "KeyWords": { + "type": "string", + "description": "商品关键词", + "nullable": true + }, + "Price": { "minLength": 1, "type": "string", - "description": "详细描述" + "description": "零售价" }, - "LocalizationKey": { + "RealPrice": { + "minLength": 1, "type": "string", - "description": "本地化Key", + "description": "实际价格" + }, + "ItemJson": { + "minLength": 1, + "type": "string", + "description": "道具列表" + }, + "IsUp": { + "type": "boolean", + "description": "是否上架" + }, + "Weight": { + "type": "integer", + "description": "权重", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "游戏商城订单实体更新输入参数" + }, + "UpdateJobDetailRequest": { + "required": [ + "Id", + "JobId" + ], + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "主键Id" + }, + "CreatedId": { + "type": "string", + "description": "创建人Id", "nullable": true }, - "HttpManagerUrl": { + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" + }, + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "大区服务器 HTTP管理器URL", + "description": "创建人姓名", "nullable": true }, - "DockerRegister": { + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true + }, + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true + }, + "UpdatedId": { "type": "string", - "description": "镜像仓库地址", + "description": "更新人Id", "nullable": true }, - "DockerUserName": { + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "仓库用户名", + "description": "更新人姓名", "nullable": true }, - "DockerPassword": { + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "nullable": true + }, + "DeleteTime": { + "type": "integer", + "description": "删除时间", + "format": "int64", + "nullable": true + }, + "DeletedId": { "type": "string", - "description": "仓库密码", + "description": "删除人Id", "nullable": true }, - "ContainerNetName": { + "DeletedName": { + "maxLength": 512, "type": "string", - "description": "容器网络名", + "description": "删除人姓名", "nullable": true }, - "ContainerSubnet": { + "RowVersion": { "type": "string", - "description": "容器网络子网", + "description": "行版本号(用于乐观锁)", "nullable": true }, - "ContainerGateway": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true + }, + "GroupName": { "type": "string", - "description": "容器网络网关", "nullable": true }, - "ImageName": { + "JobType": { + "type": "string", + "nullable": true + }, + "AssemblyName": { + "type": "string", + "nullable": true + }, + "Description": { + "type": "string", + "nullable": true + }, + "Concurrent": { + "type": "boolean" + }, + "IncludeAnnotations": { + "type": "boolean" + }, + "Properties": { + "type": "string", + "nullable": true + }, + "UpdatedTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "CreateType": { + "$ref": "#/components/schemas/JobCreateTypeEnum" + }, + "ScriptCode": { "type": "string", - "description": "镜像源", "nullable": true + }, + "JobId": { + "minLength": 2, + "type": "string", + "description": "作业Id" } }, - "additionalProperties": false, - "description": "游戏大区分类更新输入参数" + "additionalProperties": false }, - "UpdateTenantGameAreaEntityRequest": { + "UpdateJobTriggerRequest": { "required": [ - "Capacity", - "ClassifyId", - "CreationTime", - "Description", - "HttpManageUrl", - "Id", - "IsDefault", - "IsRecommend", - "Language", - "LastMaintenanceTime", - "Name", - "RowVersion", - "ServerStatus", - "ServerType", - "ServerVersion", - "TcpSocketUrl", - "WebSocketUrl" + "JobId", + "TriggerId" ], "type": "object", "properties": { "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "type": "string", + "description": "主键Id(新增为 0,编辑由前端回填)" }, "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "type": "string", + "description": "乐观锁版本号", + "nullable": true }, - "Name": { - "minLength": 1, + "TriggerId": { + "minLength": 2, "type": "string", - "description": "名称" + "description": "触发器Id" }, - "Description": { - "minLength": 1, + "JobId": { + "minLength": 2, "type": "string", - "description": "详细描述" + "description": "作业Id" }, - "LocalizationKey": { + "TriggerType": { "type": "string", - "description": "本地化Key", + "description": "触发器类型FullName", "nullable": true }, - "IsDefault": { - "type": "boolean", - "description": "是否是默认" - }, - "IsRecommend": { - "type": "boolean", - "description": "是否推荐" - }, - "ClassifyId": { + "AssemblyName": { "type": "string", - "description": "大区分类Id" + "description": "程序集名称", + "nullable": true }, - "HttpManageUrl": { - "minLength": 1, + "Args": { "type": "string", - "description": "Http 管理连接地址" + "description": "参数", + "nullable": true }, - "TcpSocketUrl": { - "minLength": 1, + "Description": { "type": "string", - "description": "TcpSocket 连接地址" + "description": "描述信息", + "nullable": true }, - "WebSocketUrl": { - "minLength": 1, - "type": "string", - "description": "WebSocket连接地址" + "StartTime": { + "type": "integer", + "description": "起始时间", + "format": "int64", + "nullable": true }, - "Capacity": { + "EndTime": { "type": "integer", - "description": "最大玩家数量", - "format": "int32" + "description": "结束时间", + "format": "int64", + "nullable": true }, - "CreationTime": { + "MaxNumberOfRuns": { "type": "integer", - "description": "启用的日期", + "description": "最大触发次数(0:不限制,n:N次)", "format": "int64" }, - "LastMaintenanceTime": { + "MaxNumberOfErrors": { "type": "integer", - "description": "服务器最后一次维护或更新的日期", + "description": "最大出错次数(0:不限制,n:N次)", "format": "int64" }, - "ServerVersion": { - "minLength": 1, + "NumRetries": { + "type": "integer", + "description": "重试次数", + "format": "int32" + }, + "RetryTimeout": { + "type": "integer", + "description": "重试间隔时间(ms)", + "format": "int32" + }, + "StartNow": { + "type": "boolean", + "description": "是否立即启动" + }, + "RunOnStart": { + "type": "boolean", + "description": "是否启动时执行一次" + }, + "ResetOnlyOnce": { + "type": "boolean", + "description": "是否在启动时重置最大触发次数等于一次的作业" + } + }, + "additionalProperties": false + }, + "UpdateMenuRequest": { + "required": [ + "Title" + ], + "type": "object", + "properties": { + "Id": { "type": "string", - "description": "游戏版本号" + "description": "主键Id(新增为 0,编辑由前端回填)" }, - "ServerContainerId": { + "RowVersion": { "type": "string", - "description": "服务器的 Docker 容器 ID", + "description": "乐观锁版本号", "nullable": true }, - "ServerType": { - "minLength": 1, + "Pid": { "type": "string", - "description": "服务器的游戏模式类型" - }, - "Language": { - "$ref": "#/components/schemas/GameLanguage" + "description": "父Id" }, - "ServerStatus": { - "$ref": "#/components/schemas/GameServerStatus" + "Type": { + "$ref": "#/components/schemas/MenuTypeEnum" }, - "AppVersion": { + "Key": { "type": "string", - "description": "客户端版本", + "description": "业务键(按钮类型用于唯一性校验;管理端新增可为空)", "nullable": true }, - "AllowedPlayerProfile": { + "Title": { + "minLength": 1, "type": "string", - "description": "指定可以加入此服务器的玩家类型", + "description": "菜单名称" + }, + "TitleCode": { + "type": "string", + "description": "菜单名称国际化Key", "nullable": true }, - "ServerEvents": { + "Name": { "type": "string", - "description": "特定服务器举行的事件或活动信息", + "description": "路由名称", "nullable": true }, - "AccessControls": { + "Path": { "type": "string", - "description": "访问权限设置,控制哪些玩家可以访问服务器", + "description": "路由地址", "nullable": true }, - "ServerParams": { + "Component": { "type": "string", - "description": "运行参数。此前 BaseRequest 缺此声明,Adapt 无来源导致实体 NOT NULL 列恒 23502。", + "description": "组件路径", "nullable": true }, - "ClientDispatchApiPrefix": { + "Redirect": { "type": "string", - "description": "客户端转发 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\nClient API 代理玩家普通请求(建角、改名、查角色、创建订单等)的 Server HTTP 路由前缀,默认 `game/api`。", + "description": "重定向", "nullable": true }, - "FulfillmentApiPrefix": { + "Permission": { "type": "string", - "description": "履约投递 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。\n\n后台履约、发货、退款、邮件投递、广告奖励、Campaign 发布、后台运营操作等资产或运营投递的前缀,默认 `game/api`。", + "description": "权限标识", "nullable": true }, - "GmApiPrefix": { + "Icon": { "type": "string", - "description": "GM 命令 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造 GM URL。", + "description": "图标", "nullable": true }, - "ControlApiPrefix": { + "OutLink": { "type": "string", - "description": "管理控制 Server HTTP 路由前缀(来源 change C150 §3.2 / C175)。默认空,空表示 Admin 不构造控制 URL。", + "description": "外链链接", "nullable": true }, - "EnableClientGmApi": { + "OrderNo": { + "type": "integer", + "description": "排序", + "format": "int32" + }, + "IsHide": { "type": "boolean", - "description": "是否允许客户端调试 GM 通道(来源 change C150 §3.2 / C175)。仅 Admin 配置标记,最终放行由 Game Server 启动参数与环境门禁决定,默认关闭。" + "description": "是否隐藏" }, - "IsEnabled": { + "IsKeepAlive": { "type": "boolean", - "description": "是否启用" + "description": "是否缓存" }, - "ChannelId": { - "type": "string", - "description": "渠道id" + "IsAffix": { + "type": "boolean", + "description": "是否固定" }, - "PlatformId": { - "type": "string", - "description": "平台id" + "IsIframe": { + "type": "boolean", + "description": "是否内嵌" }, - "PackageId": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用", + "nullable": true + }, + "Remark": { "type": "string", - "description": "包id" + "description": "备注", + "nullable": true } }, - "additionalProperties": false, - "description": "游戏区服更新输入参数" + "additionalProperties": false }, - "UpdateTenantGameBannerAnnouncementEntityRequest": { + "UpdateObjectStorageConfigRequest": { "required": [ - "AreaId", - "Content", - "EndTime", "Id", - "Interval", - "IsActive", - "Priority", - "RepeatCount", - "RowVersion", - "StartTime" + "RowVersion" ], "type": "object", "properties": { @@ -97963,491 +98097,365 @@ "minimum": 0, "type": "string" }, - "AreaId": { - "type": "string", - "description": "区服ID" - }, - "Content": { - "minLength": 1, + "Provider": { "type": "string", - "description": "内容" + "description": "存储提供商名称(必须等于既有记录的 Provider)。", + "nullable": true }, - "ContentLocalizationKey": { + "PathTemplate": { "type": "string", - "description": "内容本地化Key。可空:空 = 直接展示 Content(服务端兜底空串,实体列 NOT NULL)。", + "description": "对象键路径模板。", "nullable": true }, - "Priority": { - "type": "integer", - "description": "优先级", - "format": "int32" - }, - "StartTime": { + "MaxFileSizeBytes": { "type": "integer", - "description": "开始时间", + "description": "单文件最大字节数。", "format": "int64" }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64" + "AllowedContentTypesJson": { + "type": "string", + "description": "允许的内容类型 JSON 数组。", + "nullable": true }, - "Interval": { - "type": "integer", - "description": "间隔时间", - "format": "int32" + "EnableMd5": { + "type": "boolean", + "description": "是否启用 MD5 去重。" }, - "RepeatCount": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "description": "重复次数", - "format": "int32" + "ConfigJson": { + "type": "string", + "description": "提供商配置 JSON,敏感字段为 ****** 时沿用既有值。", + "nullable": true }, - "IsActive": { + "IsEnabled": { "type": "boolean", - "description": "是否激活" + "description": "是否启用。" + }, + "Remark": { + "type": "string", + "description": "备注。", + "nullable": true } }, "additionalProperties": false, - "description": "游戏内横幅公告更新输入参数" + "description": "更新租户对象存储配置入参。Provider 必须与既有记录一致。" }, - "UpdateTenantGameCommodityEntityRequest": { + "UpdateOpenAccessRequest": { "required": [ - "CreatedName", - "Id", - "RowVersion", - "UpdatedName" + "AccessKey", + "AccessSecret", + "BindUserId", + "Id" ], "type": "object", "properties": { "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "type": "string", + "description": "主键Id" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "CreatedId": { + "type": "string", + "description": "创建人Id", + "nullable": true + }, + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" }, "CreatedName": { - "minLength": 1, + "maxLength": 512, "type": "string", - "description": "创建者姓名" + "description": "创建人姓名", + "nullable": true }, - "UpdatedName": { - "minLength": 1, - "type": "string", - "description": "修改者姓名" - } - }, - "additionalProperties": false, - "description": "游戏商品交易更新输入参数" - }, - "UpdateTenantGameDockerTagEntityRequest": { - "required": [ - "Description", - "Id", - "Name", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true }, - "Name": { - "minLength": 1, + "UpdatedId": { "type": "string", - "description": "名称" + "description": "更新人Id", + "nullable": true }, - "Description": { - "minLength": 1, + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "详细描述" + "description": "更新人姓名", + "nullable": true }, - "ServerVersion": { - "type": "string", - "description": "tag", + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏Docker标签更新输入参数" - }, - "UpdateTenantGameGoodsCatalogueEntityRequest": { - "required": [ - "Description", - "Id", - "Name", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "DeleteTime": { + "type": "integer", + "description": "删除时间", + "format": "int64", + "nullable": true }, - "Name": { - "minLength": 1, + "DeletedId": { "type": "string", - "description": "名称" + "description": "删除人Id", + "nullable": true }, - "Description": { - "minLength": 1, + "DeletedName": { + "maxLength": 512, "type": "string", - "description": "详细描述" - } - }, - "additionalProperties": false, - "description": "游戏道具分类更新输入参数" - }, - "UpdateTenantGameGoodsEntityRequest": { - "required": [ - "ClassifyId", - "ConfigId", - "Description", - "Id", - "Name", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "description": "删除人姓名", + "nullable": true }, "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "type": "string", + "description": "行版本号(用于乐观锁)", + "nullable": true }, - "ConfigId": { - "type": "integer", - "description": "配置ID", - "format": "int32" + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true }, - "ClassifyId": { + "AccessKey": { + "minLength": 1, "type": "string", - "description": "类别id" + "description": "身份标识" }, - "Name": { + "AccessSecret": { "minLength": 1, "type": "string", - "description": "名称" + "description": "密钥" }, - "Description": { - "minLength": 1, + "BindUserId": { "type": "string", - "description": "详细描述" + "description": "绑定用户Id" } }, - "additionalProperties": false, - "description": "游戏资源更新输入参数" + "additionalProperties": false }, - "UpdateTenantGameMailCampaignEntityRequest": { + "UpdateRoleRequest": { "required": [ - "AreaId", "Id", - "Name", - "RowVersion", - "TitlesJson" + "Name" ], "type": "object", "properties": { "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - }, - "AreaId": { "type": "string", - "description": "区服Id。用于解析目标游戏服 HttpManageUrl 调用 Server 发布接口。" - }, - "Name": { - "minLength": 1, - "type": "string", - "description": "Campaign 名称(Admin 侧识别用)。" + "description": "主键Id" }, - "TemplateId": { + "CreatedId": { "type": "string", - "description": "模板 Id(0 = 无模板,裸文案发布)。" - }, - "MailType": { - "$ref": "#/components/schemas/MailCampaignMailType" + "description": "创建人Id", + "nullable": true }, - "TitlesJson": { - "minLength": 1, - "type": "string", - "description": "多语言标题 JSON(ListAsync)。" + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" }, - "ContentsJson": { + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "多语言正文 JSON(ListAsync)。", + "description": "创建人姓名", "nullable": true }, - "SenderNamesJson": { - "type": "string", - "description": "多语言发件人名称 JSON(ListAsync)。", + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", "nullable": true }, - "AttachmentsJson": { - "type": "string", - "description": "附件列表 JSON(ListAsync)。", + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", "nullable": true }, - "ServerIdsJson": { + "UpdatedId": { "type": "string", - "description": "服务器 Id 白名单 JSON(ListAsync)。", + "description": "更新人Id", "nullable": true }, - "ChannelIdsJson": { + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "渠道 Id 白名单 JSON(ListAsync)。", + "description": "更新人姓名", "nullable": true }, - "MinLevel": { - "type": "integer", - "description": "最低等级(含),0 表示不限。", - "format": "int32" - }, - "MaxLevel": { - "type": "integer", - "description": "最高等级(含),0 表示不限。", - "format": "int32" - }, - "ExpireAttachmentPolicy": { - "$ref": "#/components/schemas/MailCampaignExpirePolicy" + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", + "nullable": true }, - "ExpireTime": { + "DeleteTime": { "type": "integer", - "description": "过期时间(Unix 秒,UTC),0 表示永不过期。", - "format": "int64" + "description": "删除时间", + "format": "int64", + "nullable": true }, - "Remark": { + "DeletedId": { "type": "string", - "description": "备注。", + "description": "删除人Id", "nullable": true }, - "PublishStatus": { - "$ref": "#/components/schemas/MailCampaignPublishStatus" - }, - "LastServerCode": { - "$ref": "#/components/schemas/MailCampaignServerCode" - }, - "LastServerMessage": { + "DeletedName": { + "maxLength": 512, "type": "string", + "description": "删除人姓名", "nullable": true - } - }, - "additionalProperties": false, - "description": "更新 Campaign 输入。仅 Draft 可更新(Published/Revoked 主体不可变 B1)。" - }, - "UpdateTenantGameMailEntityRequest": { - "required": [ - "AreaId", - "AttachmentsJson", - "Body", - "ExpirationTime", - "Id", - "IsAllPost", - "MailType", - "PlayerIdListJson", - "RowVersion", - "SubTitle", - "Title" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" }, "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - }, - "Title": { - "minLength": 1, - "type": "string", - "description": "标题" - }, - "SubTitle": { - "minLength": 1, "type": "string", - "description": "副标题" + "description": "行版本号(用于乐观锁)", + "nullable": true }, - "Body": { - "minLength": 1, - "type": "string", - "description": "详细内容" + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true }, - "PlayerIdListJson": { - "minLength": 1, + "Code": { "type": "string", - "description": "玩家ID列表" + "nullable": true }, - "IsAllPost": { - "type": "boolean", - "description": "是否发全部用户" + "OrderNo": { + "type": "integer", + "format": "int32" }, - "IsTranslate": { - "type": "boolean", - "description": "是否本地化" + "DataScope": { + "$ref": "#/components/schemas/DataScopeEnum" }, - "AreaId": { - "minLength": 1, + "Remark": { "type": "string", - "description": "区服ID。此前仅 AddRequest 声明:update 提交的 areaId 被绑定丢弃,Adapt 后实体 0 值穿透\nIgnoreColumns(忽略 null) 不拦 0,导致编辑一次就把区服/类型/过期时间清零。" + "nullable": true }, - "AttachmentsJson": { + "Name": { "minLength": 1, "type": "string", - "description": "附件列表" - }, - "ExpirationTime": { - "type": "integer", - "description": "邮件的过期日期", - "format": "int64" + "description": "名称" }, - "MailType": { - "$ref": "#/components/schemas/GameMailType" + "MenuIdList": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "菜单Id集合", + "nullable": true } }, - "additionalProperties": false, - "description": "游戏邮件更新输入参数" + "additionalProperties": false }, - "UpdateTenantGameMailTemplateCategoryEntityRequest": { + "UpdateSystemEmailProviderRequest": { "required": [ + "DefaultFromEmail", "Id", - "Name", + "Provider", "RowVersion" ], "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "Purpose": { + "type": "integer", + "description": "平台系统邮件用途(`SystemEmailPurpose`)。0 表示默认系统邮件配置。", + "format": "int32" }, - "Name": { + "Provider": { "minLength": 1, "type": "string", - "description": "名称" + "description": "Provider 类型。当前支持 `TencentCloudSes` 和 `Smtp`。" }, - "Description": { + "Host": { "type": "string", - "description": "详细描述", + "description": "SMTP 主机(Provider=Smtp 时必填)。", "nullable": true }, - "Icon": { - "type": "string", - "description": "图标", + "Port": { + "type": "integer", + "description": "SMTP 端口(Provider=Smtp 时必填)。", + "format": "int32", "nullable": true }, - "Sort": { - "type": "integer", - "description": "排序", - "format": "int32" + "EnableSsl": { + "type": "boolean", + "description": "SMTP 启用 SSL。", + "nullable": true }, - "IsEnabled": { + "UseDefaultCredentials": { "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "description": "SMTP 使用默认凭据。", "nullable": true - } - }, - "additionalProperties": false, - "description": "邮件模板分类更新输入参数" - }, - "UpdateTenantGameMailTemplateEntityRequest": { - "required": [ - "BodyTemplate", - "CategoryId", - "Id", - "Name", - "RowVersion", - "TitleTemplate" - ], - "type": "object", - "properties": { - "Name": { - "minLength": 1, + }, + "UserName": { "type": "string", - "description": "名称" + "description": "SMTP 用户名(敏感字段)。", + "nullable": true }, - "Description": { + "Password": { "type": "string", - "description": "详细描述", + "description": "SMTP 密码(敏感字段)。", "nullable": true }, - "CategoryId": { + "Region": { "type": "string", - "description": "分类Id" + "description": "Provider 区域。", + "nullable": true }, - "TitleTemplate": { - "minLength": 1, + "SecretId": { "type": "string", - "description": "标题模板" + "description": "腾讯云 SecretId(敏感字段)。", + "nullable": true }, - "SubTitleTemplate": { + "SecretKey": { "type": "string", - "description": "副标题模板", + "description": "腾讯云 SecretKey(敏感字段)。", "nullable": true }, - "BodyTemplate": { + "DefaultFromEmail": { "minLength": 1, "type": "string", - "description": "内容模板" + "description": "默认发件人邮箱。" }, - "DefaultAttachmentsJson": { + "DefaultFromName": { "type": "string", - "description": "默认附件JSON", + "description": "默认发件人显示名。", "nullable": true }, - "DefaultMailType": { - "$ref": "#/components/schemas/GameMailType" + "DefaultToEmail": { + "type": "string", + "description": "默认收件人邮箱。", + "nullable": true }, - "DefaultExpirationDays": { - "type": "integer", - "description": "默认过期天数", - "format": "int32", + "TemplateId": { + "type": "string", + "description": "腾讯云 SES 模板 ID。Provider=TencentCloudSes 时必填。", "nullable": true }, - "Sort": { + "TemplateDataJson": { + "type": "string", + "description": "腾讯云 SES 模板变量 JSON。", + "nullable": true + }, + "Priority": { "type": "integer", - "description": "排序", + "description": "配置选择优先级(数值越大越优先)。仅用于配置选择,不代表邮件投递队列优先级。", "format": "int32" }, "IsEnabled": { "type": "boolean", - "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "description": "是否启用。禁用配置不参与系统邮件选择和测试发送。" + }, + "Remark": { + "type": "string", + "description": "备注。", "nullable": true }, "Id": { @@ -98464,722 +98472,449 @@ } }, "additionalProperties": false, - "description": "邮件模板更新输入参数" + "description": "平台系统邮件 Provider 配置更新输入参数。\n\n敏感字段(UserName / Password / SecretId / SecretKey)回传 `******` 时保留数据库原值,避免脱敏回写覆盖真实凭据。" }, - "UpdateTenantGameOnlinePlayerSegmentRequest": { + "UpdateUserRequest": { "required": [ - "Id", - "Name", - "RowVersion" + "Account", + "RealName" ], "type": "object", "properties": { "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "type": "string", + "description": "主键Id(新增为 0,编辑由前端回填)" }, "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "type": "string", + "description": "乐观锁版本号", + "nullable": true }, - "Name": { + "Account": { "minLength": 1, "type": "string", - "description": "分群名称。" + "description": "账号" }, - "Description": { + "RealName": { + "minLength": 1, "type": "string", - "description": "分群描述。", + "description": "真实姓名" + }, + "NickName": { + "type": "string", + "description": "昵称", "nullable": true }, - "ConditionsJson": { + "Avatar": { "type": "string", - "description": "分群条件 JSON(List;空 = 不限条件)。", + "description": "头像", "nullable": true }, - "SyncStatus": { - "$ref": "#/components/schemas/OnlinePlayerSegmentSyncStatus" + "Sex": { + "$ref": "#/components/schemas/GenderEnum" }, - "LastSyncTime": { + "Age": { "type": "integer", - "description": "最近同步时间(Unix 秒;服务端回填)。", - "format": "int64" + "description": "年龄", + "format": "int32" }, - "LastSyncServerId": { + "BirthdayTime": { + "type": "integer", + "description": "出生日期", + "format": "int64", + "nullable": true + }, + "Nation": { "type": "string", - "description": "最近同步区服Id(服务端回填)。" + "description": "民族", + "nullable": true }, - "LastOnlineSegmentId": { + "Phone": { "type": "string", - "description": "Online 侧分群标识(服务端回填)。" + "description": "手机号码", + "nullable": true }, - "LastServerCode": { - "type": "integer", - "description": "最近同步结果码(服务端回填)。", - "format": "int32" + "CardType": { + "$ref": "#/components/schemas/CardTypeEnum" }, - "LastServerMessage": { + "IdCardNum": { "type": "string", - "description": "最近同步消息(服务端回填)。", + "description": "身份证号", "nullable": true - } - }, - "additionalProperties": false, - "description": "更新玩家分群输入(编辑定义后须重新 syncOnline 生效)。" - }, - "UpdateTenantGameOrderEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - } - }, - "additionalProperties": false, - "description": "游戏支付订单更新输入参数" - }, - "UpdateTenantGameOrderFulfillmentEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "Email": { + "type": "string", + "description": "邮箱", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - } - }, - "additionalProperties": false, - "description": "权益发货账本更新输入参数(C120)。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束;\nUpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持修改)。" - }, - "UpdateTenantGamePenaltyAppealEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "Address": { + "type": "string", + "description": "地址", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - } - }, - "additionalProperties": false, - "description": "申诉更新输入参数。申诉为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。" - }, - "UpdateTenantGamePenaltyEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "CultureLevel": { + "$ref": "#/components/schemas/CultureLevelEnum" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - } - }, - "additionalProperties": false, - "description": "处罚更新输入参数。处罚为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。" - }, - "UpdateTenantGameRedeemCodeChannelEntityRequest": { - "required": [ - "Description", - "Id", - "Name", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "PoliticalOutlook": { + "type": "string", + "description": "政治面貌", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "College": { + "type": "string", + "description": "毕业院校", + "nullable": true }, - "Name": { - "minLength": 1, + "OfficePhone": { "type": "string", - "description": "名称。此前 UpdateRequest 缺此声明:编辑提交的 name 被绑定丢弃,Adapt 后实体 Name=null,\n又被 IgnoreColumns(true)(忽略 null 列)跳过 —— update 200 但名称静默不更新。" + "description": "办公电话", + "nullable": true }, - "Description": { - "minLength": 1, + "EmergencyContact": { "type": "string", - "description": "详细描述" + "description": "紧急联系人", + "nullable": true }, - "RoleUsageLimit": { - "maximum": 2147483647, - "minimum": 0, + "EmergencyPhone": { + "type": "string", + "description": "紧急联系人电话", + "nullable": true + }, + "EmergencyAddress": { + "type": "string", + "description": "紧急联系人地址", + "nullable": true + }, + "OrderNo": { "type": "integer", - "description": "每角色可用次数(兑换码分组角色限制)。0 = 不限制,1 = 每角色一次,N = 每角色最多 N 次。", + "description": "排序", "format": "int32" - } - }, - "additionalProperties": false, - "description": "兑换码渠道更新输入参数" - }, - "UpdateTenantGameRedeemCodeEntityRequest": { - "required": [ - "Description", - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "Remark": { + "type": "string", + "description": "备注", + "nullable": true }, - "Description": { - "minLength": 1, + "AccountType": { + "$ref": "#/components/schemas/AccountTypeEnum" + }, + "JobNum": { "type": "string", - "description": "描述" - } - }, - "additionalProperties": false, - "description": "兑换码更新输入参数" - }, - "UpdateTenantGameRedeemCodeUseRecordEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "description": "工号", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - } - }, - "additionalProperties": false, - "description": "兑换记录更新输入参数" - }, - "UpdateTenantGameReportEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "JoinTime": { + "type": "integer", + "description": "入职日期", + "format": "int64", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "RoleIdList": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "角色集合", + "nullable": true } }, - "additionalProperties": false, - "description": "举报更新输入参数。举报为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。" + "additionalProperties": false }, - "UpdateTenantGameRewardTemplateEntityRequest": { - "required": [ - "GroupId", - "Id", - "Name", - "RewardItemsJson", - "RowVersion" - ], + "UploadFileFromBase64Request": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - }, - "Name": { - "minLength": 1, + "FileDataBase64": { "type": "string", - "description": "名称。" + "description": "文件内容", + "nullable": true }, - "Description": { + "ContentType": { "type": "string", - "description": "详细描述。", + "description": "文件类型( \"image/jpeg\",)", "nullable": true }, - "GroupId": { + "FileName": { "type": "string", - "description": "分组Id。" + "description": "文件名称", + "nullable": true }, - "RewardItemsJson": { - "minLength": 1, + "Path": { "type": "string", - "description": "奖励明细 JSON。" - }, - "SnapshotSchemaVersion": { - "type": "integer", - "description": "快照结构版本。", - "format": "int32" - }, - "Sort": { - "type": "integer", - "description": "排序。", - "format": "int32" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。", + "description": "保存路径", "nullable": true } }, - "additionalProperties": false, - "description": "奖励模板更新输入参数。" + "additionalProperties": false }, - "UpdateTenantGameRewardTemplateGroupEntityRequest": { + "UserEntity": { "required": [ - "Id", - "Name", - "RowVersion" + "Id" ], "type": "object", "properties": { "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - }, - "Name": { - "minLength": 1, "type": "string", - "description": "名称。" + "description": "主键Id" }, - "Description": { + "CreatedId": { "type": "string", - "description": "详细描述。", + "description": "创建人Id", "nullable": true }, - "Sort": { + "CreatedTime": { "type": "integer", - "description": "排序。", - "format": "int32" + "description": "创建时间", + "format": "int64" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "奖励模板分组更新输入参数。" - }, - "UpdateTenantGameRoleEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "UserId": { + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "用户ID" + "description": "创建人姓名", + "nullable": true + }, + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true }, - "AreaId": { - "type": "string", - "description": "区服Id" + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true }, - "Name": { + "UpdatedId": { "type": "string", - "description": "名称", + "description": "更新人Id", "nullable": true }, - "Description": { + "UpdatedName": { + "maxLength": 512, "type": "string", - "description": "详细描述", + "description": "更新人姓名", "nullable": true }, - "Level": { - "type": "integer", - "description": "角色当前的等级", - "format": "int64", + "IsDeleted": { + "type": "boolean", + "description": "软删除标记,true:删除,false:未删除,null:未设置(未删除)", "nullable": true }, - "LastLoginTime": { + "DeleteTime": { "type": "integer", - "description": "角色最后一次登录时间", + "description": "删除时间", "format": "int64", "nullable": true }, - "Id": { + "DeletedId": { "type": "string", - "description": "主键Id" + "description": "删除人Id", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, + "DeletedName": { + "maxLength": 512, "type": "string", - "description": "客户端读取记录时的版本号。" + "description": "删除人姓名", + "nullable": true }, - "RoleId": { + "RowVersion": { "type": "string", - "description": "角色Id", + "description": "行版本号(用于乐观锁)", "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏角色更新输入参数" - }, - "UpdateTenantGameTimeJobEntityRequest": { - "required": [ - "Cron", - "Id", - "Name", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "IsEnabled": { + "type": "boolean", + "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", + "nullable": true }, - "Name": { - "minLength": 1, + "Account": { "type": "string", - "description": "名称。此前 UpdateRequest 缺此声明:编辑提交的 name 被绑定丢弃,Adapt 后实体 Name=null,\n又被 IgnoreColumns(true)(忽略 null 列)跳过 —— update 200 但名称静默不更新(与兑换码渠道问题同模式)。" + "nullable": true }, - "Description": { + "RealName": { "type": "string", - "description": "详细描述", "nullable": true }, - "Cron": { - "minLength": 1, + "NickName": { "type": "string", - "description": "Cron 表达式" + "nullable": true }, - "IsOnce": { - "type": "boolean", - "description": "是否一次性任务" - } - }, - "additionalProperties": false, - "description": "游戏定时任务更新输入参数" - }, - "UpdateTenantGameUserEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "Avatar": { + "type": "string", + "nullable": true }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "Sex": { + "$ref": "#/components/schemas/GenderEnum" }, - "UserName": { + "Age": { + "type": "integer", + "format": "int32" + }, + "BirthdayTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "Nation": { "type": "string", "nullable": true }, - "Password": { + "Phone": { "type": "string", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/GameUserStatus" + "CardType": { + "$ref": "#/components/schemas/CardTypeEnum" }, - "Description": { + "IdCardNum": { "type": "string", "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏账号更新输入参数" - }, - "UpdateTenantGameWebShopEntityRequest": { - "required": [ - "Id", - "ItemJson", - "Logo", - "Name", - "Price", - "RealPrice", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "Email": { + "type": "string", + "nullable": true }, - "Name": { - "minLength": 1, + "Address": { "type": "string", - "description": "商品名称" + "nullable": true }, - "Logo": { - "minLength": 1, + "CultureLevel": { + "$ref": "#/components/schemas/CultureLevelEnum" + }, + "PoliticalOutlook": { "type": "string", - "description": "商品图" + "nullable": true }, - "Description": { + "College": { "type": "string", - "description": "商品描述", "nullable": true }, - "KeyWords": { + "OfficePhone": { "type": "string", - "description": "商品关键词", "nullable": true }, - "Price": { - "minLength": 1, + "EmergencyContact": { "type": "string", - "description": "零售价" + "nullable": true }, - "RealPrice": { - "minLength": 1, + "EmergencyPhone": { "type": "string", - "description": "实际价格" + "nullable": true }, - "ItemJson": { - "minLength": 1, + "EmergencyAddress": { "type": "string", - "description": "道具列表" + "nullable": true }, - "IsUp": { - "type": "boolean", - "description": "是否上架" + "Introduction": { + "type": "string", + "nullable": true }, - "Weight": { + "OrderNo": { "type": "integer", - "description": "权重", "format": "int32" - } - }, - "additionalProperties": false, - "description": "游戏商城实体更新输入参数" - }, - "UpdateTenantGameWebShopOrderEntityRequest": { - "required": [ - "Id", - "ItemJson", - "Logo", - "Name", - "Price", - "RealPrice", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" - }, - "Name": { - "minLength": 1, + "Remark": { "type": "string", - "description": "商品名称" + "nullable": true }, - "Logo": { - "minLength": 1, + "AccountType": { + "$ref": "#/components/schemas/AccountTypeEnum" + }, + "ManagerUserId": { "type": "string", - "description": "商品图" + "nullable": true }, - "Description": { + "ManagerUser": { + "$ref": "#/components/schemas/UserEntity" + }, + "JobNum": { "type": "string", - "description": "商品描述", "nullable": true }, - "KeyWords": { + "PosLevel": { "type": "string", - "description": "商品关键词", "nullable": true }, - "Price": { - "minLength": 1, + "PosTitle": { "type": "string", - "description": "零售价" + "nullable": true }, - "RealPrice": { - "minLength": 1, + "Expertise": { "type": "string", - "description": "实际价格" + "nullable": true }, - "ItemJson": { - "minLength": 1, + "OfficeZone": { "type": "string", - "description": "道具列表" + "nullable": true }, - "IsUp": { - "type": "boolean", - "description": "是否上架" + "Office": { + "type": "string", + "nullable": true }, - "Weight": { + "JoinTime": { "type": "integer", - "description": "权重", - "format": "int32" - } - }, - "additionalProperties": false, - "description": "游戏商城订单实体更新输入参数" - }, - "UpdateTenantObjectStorageConfigRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, - "RowVersion": { - "maximum": 9.223372036854776E+18, - "minimum": 0, - "type": "string" + "format": "int64", + "nullable": true }, - "Provider": { + "LastLoginIp": { "type": "string", - "description": "存储提供商名称(必须等于既有记录的 Provider)。", "nullable": true }, - "PathTemplate": { + "LastLoginAddress": { "type": "string", - "description": "对象键路径模板。", "nullable": true }, - "MaxFileSizeBytes": { + "LastLoginTime": { "type": "integer", - "description": "单文件最大字节数。", - "format": "int64" - }, - "AllowedContentTypesJson": { - "type": "string", - "description": "允许的内容类型 JSON 数组。", + "format": "int64", "nullable": true }, - "EnableMd5": { - "type": "boolean", - "description": "是否启用 MD5 去重。" - }, - "ConfigJson": { + "LastLoginDevice": { "type": "string", - "description": "提供商配置 JSON,敏感字段为 ****** 时沿用既有值。", "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。" - }, - "Remark": { + "Signature": { "type": "string", - "description": "备注。", "nullable": true } }, - "additionalProperties": false, - "description": "更新租户对象存储配置入参。Provider 必须与既有记录一致。" + "additionalProperties": false }, - "UpdateUserRequest": { + "UserRequest": { "required": [ - "Account", - "RealName" + "Id" ], "type": "object", "properties": { "Id": { - "type": "string", - "description": "主键Id(新增为 0,编辑由前端回填)" + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "RowVersion": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用" + } + }, + "additionalProperties": false + }, + "UserResponse": { + "type": "object", + "properties": { + "Id": { "type": "string", - "description": "乐观锁版本号", - "nullable": true + "description": "Id" }, "Account": { - "minLength": 1, "type": "string", - "description": "账号" + "description": "账号", + "nullable": true }, "RealName": { - "minLength": 1, "type": "string", - "description": "真实姓名" + "description": "真实姓名", + "nullable": true }, "NickName": { "type": "string", @@ -99266,6 +99001,11 @@ "description": "紧急联系人地址", "nullable": true }, + "Introduction": { + "type": "string", + "description": "个人简介", + "nullable": true + }, "OrderNo": { "type": "integer", "description": "排序", @@ -99279,69 +99019,139 @@ "AccountType": { "$ref": "#/components/schemas/AccountTypeEnum" }, + "ManagerUserId": { + "type": "string", + "description": "直属主管Id", + "nullable": true + }, "JobNum": { "type": "string", "description": "工号", "nullable": true }, + "PosLevel": { + "type": "string", + "description": "职级", + "nullable": true + }, + "PosTitle": { + "type": "string", + "description": "职称", + "nullable": true + }, + "Expertise": { + "type": "string", + "description": "擅长领域", + "nullable": true + }, + "OfficeZone": { + "type": "string", + "description": "办公区域", + "nullable": true + }, + "Office": { + "type": "string", + "description": "办公室", + "nullable": true + }, "JoinTime": { "type": "integer", "description": "入职日期", "format": "int64", "nullable": true }, - "RoleIdList": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "角色集合", + "LastLoginIp": { + "type": "string", + "description": "最新登录Ip", "nullable": true - } - }, - "additionalProperties": false - }, - "UploadFileFromBase64Request": { - "type": "object", - "properties": { - "FileDataBase64": { + }, + "LastLoginAddress": { "type": "string", - "description": "文件内容", + "description": "最新登录地点", "nullable": true }, - "ContentType": { + "LastLoginTime": { + "type": "integer", + "description": "最新登录时间", + "format": "int64", + "nullable": true + }, + "LastLoginDevice": { "type": "string", - "description": "文件类型( \"image/jpeg\",)", + "description": "最新登录设备", "nullable": true }, - "FileName": { + "Signature": { "type": "string", - "description": "文件名称", + "description": "电子签名", "nullable": true }, - "Path": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用", + "nullable": true + }, + "CreatedTime": { + "type": "integer", + "description": "创建时间", + "format": "int64" + }, + "CreatedName": { "type": "string", - "description": "保存路径", + "description": "创建人", + "nullable": true + }, + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true + }, + "UpdatedName": { + "type": "string", + "description": "更新人", + "nullable": true + }, + "RowVersion": { + "type": "string", + "description": "行版本号(乐观锁)", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "租户用户输出参数" }, - "UserRequest": { - "required": [ - "Id" - ], + "UserResponseSqlSugarPagedList": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "Page": { + "type": "integer", + "format": "int32" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用" + "PageSize": { + "type": "integer", + "format": "int32" + }, + "Total": { + "type": "integer", + "format": "int32" + }, + "TotalPages": { + "type": "integer", + "format": "int32" + }, + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "nullable": true + }, + "HasPrevPage": { + "type": "boolean" + }, + "HasNextPage": { + "type": "boolean" } }, "additionalProperties": false @@ -99438,7 +99248,7 @@ }, { "name": "appSignatureKey", - "description": "App 传输签名密钥环管理服务(change C2 sig-keyring-server)。\n\n密钥明文仅服务端随机生成(不接受外部提交,避免弱密钥入环),仅 AddAsync/RotateAsync 响应一次性回显;\n列表/详情一律脱敏 ******;实体禁删(历史 key 是在途请求与多版本客户端的验签依据),退场走 DisableAsync 或租约到期。\n作用域:主库。路由前缀 /api/tenantAppSignatureKeyEntity(动态路由规则:去 Service 后缀 + lowerCamelCase)。" + "description": "App 传输签名密钥环管理服务(change C2 sig-keyring-server)。\n\n密钥明文仅服务端随机生成(不接受外部提交,避免弱密钥入环),仅 AddAsync/RotateAsync 响应一次性回显;\n列表/详情一律脱敏 ******;实体禁删(历史 key 是在途请求与多版本客户端的验签依据),退场走 DisableAsync 或租约到期。\n作用域:主库。路由前缀 /api/appSignatureKeyEntity(动态路由规则:去 Service 后缀 + lowerCamelCase)。" }, { "name": "channelDefinition", @@ -99446,15 +99256,19 @@ }, { "name": "clientApiPolicy", - "description": "租户 Client API 运行策略管理服务(C378 四表合一:Token / 登录票据 / 区服输出 / 订单策略单页管理)。\n\n主库保存唯一运行策略,所有请求读取同一行。\n敏感字段(SigningKey)承载 C368 空值防护语义:新增空白自动生成 64-hex、更新空白与 `******` 同义保留原值;\n输出恒为脱敏占位;该密钥纯服务端内部使用,任何响应均不回显明文。\n签名密钥以 GameFrameX.Core.Service.Tenant.TenantSecretCrypto 密文落库(C371):PreserveIfMasked 先换回库中原值(密文形态),\nEncrypt 幂等跳过已密文值,新明文在落库前加密。" + "description": "租户 Client API 运行策略管理服务(C378 四表合一:Token / 登录票据 / 区服输出 / 订单策略单页管理)。\n\n主库保存唯一运行策略,所有请求读取同一行。\n敏感字段(SigningKey)承载 C368 空值防护语义:新增空白自动生成 64-hex、更新空白与 `******` 同义保留原值;\n输出恒为脱敏占位;该密钥纯服务端内部使用,任何响应均不回显明文。\n签名密钥以 GameFrameX.Core.Service.Business.SecretCrypto 密文落库(C371):PreserveIfMasked 先换回库中原值(密文形态),\nEncrypt 幂等跳过已密文值,新明文在落库前加密。" }, { "name": "deviceGroup", "description": "设备码分组服务。\n\n分组绑定主库中真实存在的设备。" }, + { + "name": "file", + "description": "系统文件服务。\n\n上传/下载/删除全部经由 GameFrameX.ObjectStorage.Abstract.IObjectStorageAdapterFactory 解析当前租户的对象存储配置。\n业务规则:上传必须命中当前租户唯一启用的配置;未启用任何配置时直接报错,不做隐式 fallback。下载/删除按文件记录的 GameFrameX.Entity.Business.FileEntity.StorageConfigId 精确解析(即使该配置已被禁用)。GameFrameX.Entity.Business.FileEntity.StorageConfigId 为 null 的历史记录按本地 legacy 行为兜底(wwwroot 下原 FilePath)。大小限额直接按字节比较 GameFrameX.Entity.Business.ObjectStorage.ObjectStorageConfigEntity.MaxFileSizeBytes。MD5 去重 key 收紧为 StorageConfigId + FileMd5 + SizeKb。上传 Provider 失败 → 不写文件记录;删除 Provider 失败 → 保留记录并记录日志。" + }, { "name": "gameAdvertisementReward", - "description": "广告奖励发放账本 Admin 查询服务(C114 / GFX-110 事实源的管理面跟进,MENU-P2-03 欠账清理)。\n\n只读:PageAsync(继承基类)/ GetAsync 详情(继承基类)/ ExportAsync 导出当前过滤列表(上限 1000 行,文件化由前端处理)。\n事实数据铁律:OnAddingAsync / OnUpdatingAsync 抛错关闭默认 AddAsync/UpdateAsync 端点,无 DeleteAsync 端点。\n高风险动作 RetryAsync / MarkProcessedAsync 涉及 C114 幂等状态机(同 IdempotencyKey 复用账本行从 Failed 翻回),\n留待单独 change 落地;前端对应按钮已由 tenantGameAdRewardEntity:retry / :markProcessed 权限码门控,未种码即隐藏。" + "description": "广告奖励发放账本 Admin 查询服务(C114 / GFX-110 事实源的管理面跟进,MENU-P2-03 欠账清理)。\n\n只读:PageAsync(继承基类)/ GetAsync 详情(继承基类)/ ExportAsync 导出当前过滤列表(上限 1000 行,文件化由前端处理)。\n事实数据铁律:OnAddingAsync / OnUpdatingAsync 抛错关闭默认 AddAsync/UpdateAsync 端点,无 DeleteAsync 端点。\n高风险动作 RetryAsync / MarkProcessedAsync 涉及 C114 幂等状态机(同 IdempotencyKey 复用账本行从 Failed 翻回),\n留待单独 change 落地;前端对应按钮已由 gameAdRewardEntity:retry / :markProcessed 权限码门控,未种码即隐藏。" }, { "name": "gameAnnouncement", @@ -99566,7 +99380,7 @@ }, { "name": "gameMailCampaign", - "description": "运营邮件 Campaign 草稿/发布/撤回管理服务。路由前缀 /api/tenantGameMailCampaignEntity(历史框架 去后缀 + lowerCamelCase)。\n\n状态机 B1/B3/B4:Draft 可自由增删改与发布重试;Published/Revoked 主体不可编辑/删除(B1),仅 Published 可撤回(撤回不可逆 B3);Server 拒绝落 Failed。\n与既有 `GameMailService`(直发 post_mail)是两套独立系统,不合并。" + "description": "运营邮件 Campaign 草稿/发布/撤回管理服务。路由前缀 /api/gameMailCampaignEntity(历史框架 去后缀 + lowerCamelCase)。\n\n状态机 B1/B3/B4:Draft 可自由增删改与发布重试;Published/Revoked 主体不可编辑/删除(B1),仅 Published 可撤回(撤回不可逆 B3);Server 拒绝落 Failed。\n与既有 `GameMailService`(直发 post_mail)是两套独立系统,不合并。" }, { "name": "gameMailTemplate", @@ -99578,11 +99392,11 @@ }, { "name": "gameOnlineConfigRollout", - "description": "配置灰度发布(Rollout)版本行管理服务(来源 change C343 / vault:C8 S7.7-S7.8)。路由前缀 /api/tenantGameOnlineConfigRollout(去后缀 + lowerCamelCase)。\n\n版本化铁律:版本行只由 publish / rollback 两个动作追加,历史行不可修改不可删除(无 add/update/delete action);\n`ConfigVersion` 按 ConfigKind + ConfigKey 维度递增分配(发布与回滚共用序列);\n回滚 = 版本化新下发(新行 + TargetVersion 指向恢复目标,语义对照见 `OnlineRolloutSemanticMap`),\n生效/被替代由 Status 表达(Published=生效中,RolledBack=已被替代的历史版本)。\n下发经 GameFrameX.Application.GmCenter.LiveOps.Dispatch.IOnlineLiveOpsDispatchService 单一入口(publishConfigRollout / rollbackConfigRollout 通道);\nAdmin 只编排不解释(分群命中与百分比桶展开在 Online 侧)。" + "description": "配置灰度发布(Rollout)版本行管理服务(来源 change C343 / vault:C8 S7.7-S7.8)。路由前缀 /api/gameOnlineConfigRollout(去后缀 + lowerCamelCase)。\n\n版本化铁律:版本行只由 publish / rollback 两个动作追加,历史行不可修改不可删除(无 add/update/delete action);\n`ConfigVersion` 按 ConfigKind + ConfigKey 维度递增分配(发布与回滚共用序列);\n回滚 = 版本化新下发(新行 + TargetVersion 指向恢复目标,语义对照见 `OnlineRolloutSemanticMap`),\n生效/被替代由 Status 表达(Published=生效中,RolledBack=已被替代的历史版本)。\n下发经 GameFrameX.Application.GmCenter.LiveOps.Dispatch.IOnlineLiveOpsDispatchService 单一入口(publishConfigRollout / rollbackConfigRollout 通道);\nAdmin 只编排不解释(分群命中与百分比桶展开在 Online 侧)。" }, { "name": "gameOnlinePlayerSegment", - "description": "玩家分群管理服务(来源 change C343 / vault:C8 S7.5)。路由前缀 /api/tenantGameOnlinePlayerSegment(去后缀 + lowerCamelCase)。\n\nAdmin 只编排分群定义(名称 + 条件白名单校验),不解释、不复算命中(语义解释在 Online 侧,对照见 `OnlineRolloutSemanticMap`);\n定义生效须经 `syncOnline` 经统一下发入口同步 Online(Online 分配分群标识回写 LastOnlineSegmentId);\n编辑定义不会自动重同步,须再次 syncOnline(显式生效,避免隐式半生效状态)。" + "description": "玩家分群管理服务(来源 change C343 / vault:C8 S7.5)。路由前缀 /api/gameOnlinePlayerSegment(去后缀 + lowerCamelCase)。\n\nAdmin 只编排分群定义(名称 + 条件白名单校验),不解释、不复算命中(语义解释在 Online 侧,对照见 `OnlineRolloutSemanticMap`);\n定义生效须经 `syncOnline` 经统一下发入口同步 Online(Online 分配分群标识回写 LastOnlineSegmentId);\n编辑定义不会自动重同步,须再次 syncOnline(显式生效,避免隐式半生效状态)。" }, { "name": "gameOrder", @@ -99598,11 +99412,11 @@ }, { "name": "gamePenalty", - "description": "处罚事实源管理服务。路由前缀 /api/tenantGamePenaltyEntity(历史框架 去后缀 + lowerCamelCase)。\n\nAddAsync:服务端强制 Status=Active、OperatorId=当前操作人,忽略请求体审计字段(防越权)。\nRevokeAsync:撤销生效中处罚,写 RevokeOperatorId / RevokeReason / RevokeTime 审计。\nSyncOnlineRuntimeAsync:把生效中处罚同步到 Online 运行时(经 OnlinePenaltyLinkCommandService 唯一联动入口,change C350)。" + "description": "处罚事实源管理服务。路由前缀 /api/gamePenaltyEntity(历史框架 去后缀 + lowerCamelCase)。\n\nAddAsync:服务端强制 Status=Active、OperatorId=当前操作人,忽略请求体审计字段(防越权)。\nRevokeAsync:撤销生效中处罚,写 RevokeOperatorId / RevokeReason / RevokeTime 审计。\nSyncOnlineRuntimeAsync:把生效中处罚同步到 Online 运行时(经 OnlinePenaltyLinkCommandService 唯一联动入口,change C350)。" }, { "name": "gamePenaltyAppeal", - "description": "申诉事实源管理服务。路由前缀 /api/tenantGamePenaltyAppealEntity。\n\nAddAsync:校验关联处罚生效中 + 同一处罚不存在待审申诉;服务端强制 Status=Pending。\nReviewAsync:通过→同步撤销关联处罚(写 RevokeAsync* + SourceAppealId 审计链);驳回→写 Rejected。同一申诉不可重复 ReviewAsync。" + "description": "申诉事实源管理服务。路由前缀 /api/gamePenaltyAppealEntity。\n\nAddAsync:校验关联处罚生效中 + 同一处罚不存在待审申诉;服务端强制 Status=Pending。\nReviewAsync:通过→同步撤销关联处罚(写 RevokeAsync* + SourceAppealId 审计链);驳回→写 Rejected。同一申诉不可重复 ReviewAsync。" }, { "name": "gameRedeemCode", @@ -99618,7 +99432,7 @@ }, { "name": "gameReport", - "description": "举报事实源管理服务。路由前缀 /api/tenantGameReportEntity。\n\nAddAsync:服务端强制 Status=Pending、HandlerId=null。\nLinkPenaltyAsync:仅 Confirmed 举报可关联已存在处罚;写 ResultPenaltyId + HandlerId,不自动创建处罚。" + "description": "举报事实源管理服务。路由前缀 /api/gameReportEntity。\n\nAddAsync:服务端强制 Status=Pending、HandlerId=null。\nLinkPenaltyAsync:仅 Confirmed 举报可关联已存在处罚;写 ResultPenaltyId + HandlerId,不自动创建处罚。" }, { "name": "gameRewardTemplate", @@ -99674,7 +99488,7 @@ }, { "name": "logDiff", - "description": "系统差异日志服务。C156 起:SuperAdmin 查询主库 system_log_diff,普通租户查询当前租户库 tenant_log_diff。" + "description": "系统差异日志服务。C156 起:SuperAdmin 查询主库 system_log_diff,普通租户查询当前租户库 log_diff。" }, { "name": "logException", @@ -99686,7 +99500,7 @@ }, { "name": "logVisit", - "description": "系统访问日志服务。C156 起:SuperAdmin 查询主库 system_log_visit,普通租户查询当前租户库 tenant_log_visit。" + "description": "系统访问日志服务。C156 起:SuperAdmin 查询主库 system_log_visit,普通租户查询当前租户库 log_visit。" }, { "name": "objectStorageConfig", @@ -99694,11 +99508,11 @@ }, { "name": "onlineAssetAuditQuery", - "description": "Online 资产审计查询服务。路由前缀 /api/onlineAssetAuditQuery(change C340 / vault:C4 S3.7)。\n\n命令审计行(操作者/命令类型/目标玩家/时间窗)实时透传 Online;Admin 侧审计另有\nMonitorLogging 全 action 自动落库(TenantLogOperationEntity),本服务覆盖「按 Online 命令语义反查」的展示半边。" + "description": "Online 资产审计查询服务。路由前缀 /api/onlineAssetAuditQuery(change C340 / vault:C4 S3.7)。\n\n命令审计行(操作者/命令类型/目标玩家/时间窗)实时透传 Online;Admin 侧审计另有\nMonitorLogging 全 action 自动落库(LogOperationEntity),本服务覆盖「按 Online 命令语义反查」的展示半边。" }, { "name": "onlineAssetGrantCommand", - "description": "Online 资产人工发放/撤销受限命令服务(高危;权限码 onlineAssetGrantCommand:grant / :revoke 仅同步 TenantAdmin)。\n\n路由前缀 /api/onlineAssetGrantCommand(change C340 / vault:C4 S3.6「Admin 人工发放或撤销」六类来源之一)。\n经 GameFrameX.Application.ServerCenter.Online.IOnlineServerClient 调 Online Grant API——Admin 侧零直写(守护测试 OnlineAssetCommandWhitelistTests);\n`Reason` 必填进审计;幂等键由服务端按业务单号规则生成(见 M:GameFrameX.Application.GmCenter.Asset.OnlineAssetGrantCommandService.ResolveBusinessOrderNumber(System.String,System.String))。" + "description": "Online 资产人工发放/撤销受限命令服务(高危;权限码 onlineAssetGrantCommand:grant / :revoke 仅同步 Admin)。\n\n路由前缀 /api/onlineAssetGrantCommand(change C340 / vault:C4 S3.6「Admin 人工发放或撤销」六类来源之一)。\n经 GameFrameX.Application.ServerCenter.Online.IOnlineServerClient 调 Online Grant API——Admin 侧零直写(守护测试 OnlineAssetCommandWhitelistTests);\n`Reason` 必填进审计;幂等键由服务端按业务单号规则生成(见 M:GameFrameX.Application.GmCenter.Asset.OnlineAssetGrantCommandService.ResolveBusinessOrderNumber(System.String,System.String))。" }, { "name": "onlineAssetLedgerQuery", @@ -99710,11 +99524,11 @@ }, { "name": "onlineAuditSearch", - "description": "Online 控制台统一审计检索服务。路由前缀 /api/onlineAuditSearch(change C344 / vault:C9 S8.2)。\n\n三来源实时归并(Admin 侧零事件镜像、零落地表):Admin 操作日志(GameFrameX.Entity.Log.TenantLogOperationEntity,\nMonitorLogging 全 action 自动落库)+ Online 审计事件(IOnlineServerClient 实时透传)+ 各域命令事实源表\n(处罚落账 GameFrameX.Entity.Tenant.Game.TenantGamePenaltyEntity / 配置灰度 GameFrameX.Entity.Tenant.Game.Online.TenantGameOnlineConfigRolloutEntity)。\n三来源 → 五维统一字段的映射唯一来源是 GameFrameX.Application.GmCenter.Console.OnlineAuditSourceMap,本 Service 不散落第二套映射。\nOnlineAuditEvent 来源需要区服上下文,ServerId 提供时才\n查询该来源,否则静默跳过(本地两来源仍支持无作用域全量检索);该来源查询失败按异常原样透传,不软化降级——\n审计检索宁可失败不可静默缺源。" + "description": "Online 控制台统一审计检索服务。路由前缀 /api/onlineAuditSearch(change C344 / vault:C9 S8.2)。\n\n三来源实时归并(Admin 侧零事件镜像、零落地表):Admin 操作日志(GameFrameX.Entity.Log.LogOperationEntity,\nMonitorLogging 全 action 自动落库)+ Online 审计事件(IOnlineServerClient 实时透传)+ 各域命令事实源表\n(处罚落账 GameFrameX.Entity.Business.Game.GamePenaltyEntity / 配置灰度 GameFrameX.Entity.Business.Game.Online.GameOnlineConfigRolloutEntity)。\n三来源 → 五维统一字段的映射唯一来源是 GameFrameX.Application.GmCenter.Console.OnlineAuditSourceMap,本 Service 不散落第二套映射。\nOnlineAuditEvent 来源需要区服上下文,ServerId 提供时才\n查询该来源,否则静默跳过(本地两来源仍支持无作用域全量检索);该来源查询失败按异常原样透传,不软化降级——\n审计检索宁可失败不可静默缺源。" }, { "name": "onlineControlledCommand", - "description": "Online 控制台受控操作命令服务(高危;权限码 onlineControlledCommand:execute 仅同步 TenantAdmin)。\n\n路由前缀 /api/onlineControlledCommand(change C344 / vault:C9 S8.1)。\n只承载四条新命令(GameFrameX.Application.GmCenter.Console.Dto.OnlineControlledCommandKind 严格四值),经 GameFrameX.Application.ServerCenter.Online.IOnlineServerClient\n直调 Online 显式命令接口;命令 action 名唯一实现点集中本文件(守护测试 OnlineOverviewIsolationTests)。\n受控操作复用矩阵(禁平行实现):踢下线/封禁/禁言经 C342 后端半边落地的\n`OnlinePenaltyLinkCommandService`(/api/onlinePenaltyLinkCommand/execute,承载 C350 处罚联动域),\n发放/撤销资产经 C340 `OnlineAssetGrantCommandService`(/api/onlineAssetGrantCommand/grant|revoke)\n——控制台操作面板直调上述既有端点,本服务不转发、不重新实现;\nOnline/Console 源码出现既有命令 token 即为违规(守护测试 + 既有白名单测试全域拦截)。\n高危复核口径:本端点整体高危——`Reason` 与 `ReviewerOperatorId` 对全部四命令必填(双人复核字段),\n审计经 MonitorLogging 全 action 自动落库 + Online 侧审计事件双通道留痕。" + "description": "Online 控制台受控操作命令服务(高危;权限码 onlineControlledCommand:execute 仅同步 Admin)。\n\n路由前缀 /api/onlineControlledCommand(change C344 / vault:C9 S8.1)。\n只承载四条新命令(GameFrameX.Application.GmCenter.Console.Dto.OnlineControlledCommandKind 严格四值),经 GameFrameX.Application.ServerCenter.Online.IOnlineServerClient\n直调 Online 显式命令接口;命令 action 名唯一实现点集中本文件(守护测试 OnlineOverviewIsolationTests)。\n受控操作复用矩阵(禁平行实现):踢下线/封禁/禁言经 C342 后端半边落地的\n`OnlinePenaltyLinkCommandService`(/api/onlinePenaltyLinkCommand/execute,承载 C350 处罚联动域),\n发放/撤销资产经 C340 `OnlineAssetGrantCommandService`(/api/onlineAssetGrantCommand/grant|revoke)\n——控制台操作面板直调上述既有端点,本服务不转发、不重新实现;\nOnline/Console 源码出现既有命令 token 即为违规(守护测试 + 既有白名单测试全域拦截)。\n高危复核口径:本端点整体高危——`Reason` 与 `ReviewerOperatorId` 对全部四命令必填(双人复核字段),\n审计经 MonitorLogging 全 action 自动落库 + Online 侧审计事件双通道留痕。" }, { "name": "onlineLiveOpsDispatch", @@ -99738,7 +99552,7 @@ }, { "name": "onlinePenaltyLinkCommand", - "description": "Online 处罚联动命令服务(高危;权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。\n\n路由前缀 /api/onlinePenaltyLinkCommand(change C350 / vault:C7、vault:C2 S1.4)。\n经 GameFrameX.Application.ServerCenter.Online.IOnlineServerClient 调 Online 显式命令接口(踢下线 / 吊销 Token / 禁言,三命令硬白名单,X3 红线);\n联动命令调用点唯一——处置流(OnlineReportCaseService)与既有页面增量(GamePenaltyService.SyncOnlineRuntimeAsync)\n一律经 M:GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService.ExecuteLinkAsync(System.Int64,GameFrameX.Entity.Enum.OnlinePenaltyCommandKind),不得绕过本服务直调 Online 命令接口(守护测试 OnlineSocialCommandWhitelistTests)。\n语义契约:Admin 侧处罚事实仍以 `TenantGamePenaltyEntity` 为唯一事实源,本服务只把「已生效的事实」同步到 Online 运行时\n(事实源先行);联动失败不回滚事实源,可按 IdempotencyKey 重试(见 M:GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService.BuildLinkCommandIdempotencyKey(System.Int64,GameFrameX.Entity.Enum.OnlinePenaltyCommandKind,System.Int64))。" + "description": "Online 处罚联动命令服务(高危;权限码 onlinePenaltyLinkCommand:execute 仅同步 Admin)。\n\n路由前缀 /api/onlinePenaltyLinkCommand(change C350 / vault:C7、vault:C2 S1.4)。\n经 GameFrameX.Application.ServerCenter.Online.IOnlineServerClient 调 Online 显式命令接口(踢下线 / 吊销 Token / 禁言,三命令硬白名单,X3 红线);\n联动命令调用点唯一——处置流(OnlineReportCaseService)与既有页面增量(GamePenaltyService.SyncOnlineRuntimeAsync)\n一律经 M:GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService.ExecuteLinkAsync(System.Int64,GameFrameX.Entity.Enum.OnlinePenaltyCommandKind),不得绕过本服务直调 Online 命令接口(守护测试 OnlineSocialCommandWhitelistTests)。\n语义契约:Admin 侧处罚事实仍以 `GamePenaltyEntity` 为唯一事实源,本服务只把「已生效的事实」同步到 Online 运行时\n(事实源先行);联动失败不回滚事实源,可按 IdempotencyKey 重试(见 M:GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService.BuildLinkCommandIdempotencyKey(System.Int64,GameFrameX.Entity.Enum.OnlinePenaltyCommandKind,System.Int64))。" }, { "name": "onlinePlayerTimelineQuery", @@ -99746,7 +99560,7 @@ }, { "name": "onlineReportCase", - "description": "Online 举报案件处置服务。路由前缀 /api/onlineReportCase(change C350 / vault:C7)。\n\n案件数据实时透传 Online(Admin 不落镜像);处置流三步:事实源写入(Mute/Ban 落 TenantGamePenaltyEntity)\n→ 联动命令(经 GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService,失败不回滚事实源、可重试)→ 当事人通知 + 案件状态回写\n(失败不阻断处置,原因分别落响应字段)。三步状态经 MonitorLogging 自动落租户操作审计。" + "description": "Online 举报案件处置服务。路由前缀 /api/onlineReportCase(change C350 / vault:C7)。\n\n案件数据实时透传 Online(Admin 不落镜像);处置流三步:事实源写入(Mute/Ban 落 GamePenaltyEntity)\n→ 联动命令(经 GameFrameX.Application.GmCenter.Social.OnlinePenaltyLinkCommandService,失败不回滚事实源、可重试)→ 当事人通知 + 案件状态回写\n(失败不阻断处置,原因分别落响应字段)。三步状态经 MonitorLogging 自动落租户操作审计。" }, { "name": "platformCaptchaConfig", @@ -99768,9 +99582,13 @@ "name": "platformRateLimitConfig", "description": "平台限流配置服务。\n\n宿主表说明(GFX-706):本服务不持有独立宿主表,共享主库 SystemConfigEntity(system_config 表),以 Code 分区行 `platform_rate_limit_config`(PlatformRateLimitConfigConstants.ConfigCode)存储本域配置 JSON。Platform* 前缀指平台级配置域,名实相符保留类名。" }, + { + "name": "role", + "description": "系统角色服务" + }, { "name": "sessionKey", - "description": "App 会话密钥环管理服务(change C5 server-envelope-middleware;C7 登录自动签发见 Client.Api 的 ClientApiSessionKeyIssuer)。\n\n密钥明文仅服务端随机生成(不接受外部提交,避免弱密钥入环),仅 AddAsync/RotateAsync 响应一次性回显;\n列表/详情一律脱敏 ******;实体禁删(历史 key 是在途加密信封的解密依据),退场走 DisableAsync 或租约到期。\n作用域:主库。路由前缀 /api/tenantSessionKeyEntity。" + "description": "App 会话密钥环管理服务(change C5 server-envelope-middleware;C7 登录自动签发见 Client.Api 的 ClientApiSessionKeyIssuer)。\n\n密钥明文仅服务端随机生成(不接受外部提交,避免弱密钥入环),仅 AddAsync/RotateAsync 响应一次性回显;\n列表/详情一律脱敏 ******;实体禁删(历史 key 是在途加密信封的解密依据),退场走 DisableAsync 或租约到期。\n作用域:主库。路由前缀 /api/sessionKeyEntity。" }, { "name": "systemAuth", @@ -99794,7 +99612,7 @@ }, { "name": "systemEmailProvider", - "description": "平台系统邮件 Provider 配置管理服务。\n\n主库 / SuperAdmin-only;与租户业务邮件(`TenantEmailConfigEntity`)分域,禁止互相 fallback。\n敏感字段(UserName / Password / SecretId / SecretKey)输出脱敏 `******`;更新时回传 `******` 保留原值。\n调用方必须显式传入 `SystemEmailPurpose`;缺配置时 M:GameFrameX.Application.Platform.Email.SystemEmailProviderService.SendTestEmailAsync(GameFrameX.Application.Platform.Email.Dto.SystemEmailProviderTestSendRequest) 与 `SystemMessageService.SendEmailAsync` 均返回明确错误,禁止静默成功。" + "description": "平台系统邮件 Provider 配置管理服务。\n\n主库 / SuperAdmin-only;与租户业务邮件(`EmailConfigEntity`)分域,禁止互相 fallback。\n敏感字段(UserName / Password / SecretId / SecretKey)输出脱敏 `******`;更新时回传 `******` 保留原值。\n调用方必须显式传入 `SystemEmailPurpose`;缺配置时 M:GameFrameX.Application.Platform.Email.SystemEmailProviderService.SendTestEmailAsync(GameFrameX.Application.Platform.Email.Dto.SystemEmailProviderTestSendRequest) 与 `SystemMessageService.SendEmailAsync` 均返回明确错误,禁止静默成功。" }, { "name": "systemEnum", @@ -99813,15 +99631,7 @@ "description": "开放接口身份服务" }, { - "name": "tenantFile", - "description": "系统文件服务。\n\n上传/下载/删除全部经由 GameFrameX.ObjectStorage.Abstract.IObjectStorageAdapterFactory 解析当前租户的对象存储配置。\n业务规则:上传必须命中当前租户唯一启用的配置;未启用任何配置时直接报错,不做隐式 fallback。下载/删除按文件记录的 GameFrameX.Entity.Tenant.TenantFileEntity.StorageConfigId 精确解析(即使该配置已被禁用)。GameFrameX.Entity.Tenant.TenantFileEntity.StorageConfigId 为 null 的历史记录按本地 legacy 行为兜底(wwwroot 下原 FilePath)。大小限额直接按字节比较 GameFrameX.Entity.Tenant.ObjectStorage.TenantObjectStorageConfigEntity.MaxFileSizeBytes。MD5 去重 key 收紧为 StorageConfigId + FileMd5 + SizeKb。上传 Provider 失败 → 不写文件记录;删除 Provider 失败 → 保留记录并记录日志。" - }, - { - "name": "tenantRole", - "description": "系统角色服务" - }, - { - "name": "tenantUser", + "name": "user", "description": "租户用户服务" } ] diff --git a/GameFrameX.Admin.Unified.Vue/src/api/_shared/data-contracts.ts b/GameFrameX.Admin.Unified.Vue/src/api/_shared/data-contracts.ts index a90abfcd..5d4e7804 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/_shared/data-contracts.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/_shared/data-contracts.ts @@ -110,7 +110,7 @@ export enum ChannelScopeEnum { /** 系统 */ System = 1, /** 租户 */ - Tenant = 2, + Business = 2, } /** @format int32 */ @@ -476,7 +476,6 @@ export interface LogOperationFields { rowVersion?: string | null; /** 是否启用,true:启用,false:禁用,null:未设置(启用) */ isEnabled?: boolean | null; - tenantId?: string | null; controllerName?: string | null; actionName?: string | null; displayTitle?: string | null; @@ -729,6 +728,7 @@ export * from "../appSignatureKey/types"; export * from "../channelDefinition/types"; export * from "../clientApiPolicy/types"; export * from "../deviceGroup/types"; +export * from "../file/types"; export * from "../gameAdvertisementReward/types"; export * from "../gameAnnouncement/types"; export * from "../gameAntiCheatEvent/types"; @@ -808,6 +808,7 @@ export * from "../platformJwtConfig/types"; export * from "../platformLoggingConfig/types"; export * from "../platformPasswordPolicyConfig/types"; export * from "../platformRateLimitConfig/types"; +export * from "../role/types"; export * from "../sessionKey/types"; export * from "../systemAuth/types"; export * from "../systemCache/types"; @@ -819,6 +820,4 @@ export * from "../systemEnum/types"; export * from "../systemJob/types"; export * from "../systemMessage/types"; export * from "../systemOpenAccess/types"; -export * from "../tenantFile/types"; -export * from "../tenantRole/types"; -export * from "../tenantUser/types"; +export * from "../user/types"; diff --git a/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/index.ts index d76a6cd5..c3fd6b07 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantAdvertisementCallbackConfigRequest, + AddAdvertisementCallbackConfigRequest, AdvertisementCallbackConfigAddPostData, AdvertisementCallbackConfigDeletePostData, AdvertisementCallbackConfigDetailGetData, @@ -18,8 +18,8 @@ import { AdvertisementCallbackConfigProvidersGetData, AdvertisementCallbackConfigSchemaGetData, AdvertisementCallbackConfigUpdatePostData, - PageTenantAdvertisementCallbackConfigRequest, - UpdateTenantAdvertisementCallbackConfigRequest, + PageAdvertisementCallbackConfigRequest, + UpdateAdvertisementCallbackConfigRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class AdvertisementCallbackConfig { * @request POST:/api/advertisementCallbackConfig/add */ advertisementCallbackConfigAddPost = ( - data: AddTenantAdvertisementCallbackConfigRequest, + data: AddAdvertisementCallbackConfigRequest, params: RequestParams = {}, ) => this.http.request({ @@ -108,7 +108,7 @@ export class AdvertisementCallbackConfig { * @request POST:/api/advertisementCallbackConfig/page */ advertisementCallbackConfigPagePost = ( - data: PageTenantAdvertisementCallbackConfigRequest, + data: PageAdvertisementCallbackConfigRequest, params: RequestParams = {}, ) => this.http.request({ @@ -164,7 +164,7 @@ export class AdvertisementCallbackConfig { * @request POST:/api/advertisementCallbackConfig/update */ advertisementCallbackConfigUpdatePost = ( - data: UpdateTenantAdvertisementCallbackConfigRequest, + data: UpdateAdvertisementCallbackConfigRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/types.ts index 8e51e172..a03aa6af 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/types.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /** 租户广告回调配置新增输入参数 */ -export interface AddTenantAdvertisementCallbackConfigRequest { +export interface AddAdvertisementCallbackConfigRequest { /** * 广告平台 Provider。当前首批配置支持 `TopOn`、`GoogleAdMob`、`Pangle`、`UnityAds`。 * @minLength 1 @@ -107,7 +107,7 @@ export interface AdvertisementCallbackProviderItem { } /** 租户广告回调验签配置分页查询输入参数 */ -export interface PageTenantAdvertisementCallbackConfigRequest { +export interface PageAdvertisementCallbackConfigRequest { searchKey?: string | null; /** * @format int32 @@ -133,7 +133,7 @@ export interface PageTenantAdvertisementCallbackConfigRequest { * * 敏感字段提交 `******` 时表示保留原值。 */ -export interface UpdateTenantAdvertisementCallbackConfigRequest { +export interface UpdateAdvertisementCallbackConfigRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/index.ts index c5bc6d0c..1420fa41 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/index.ts @@ -20,7 +20,7 @@ import { AppSignatureKeyRenewRequest, AppSignatureKeyRotatePostData, AppSignatureKeyRotateRequest, - PageTenantAppSignatureKeyRequest, + PageAppSignatureKeyRequest, } from "./types"; import { BaseDeleteRequest, @@ -122,7 +122,7 @@ export class AppSignatureKey { * @request POST:/api/appSignatureKey/page */ appSignatureKeyPagePost = ( - data: PageTenantAppSignatureKeyRequest, + data: PageAppSignatureKeyRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/types.ts index 782be93b..d6adc407 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/appSignatureKey/types.ts @@ -123,7 +123,7 @@ export interface AppSignatureKeyRotateRequest { } /** App 传输签名密钥分页查询输入参数。 */ -export interface PageTenantAppSignatureKeyRequest { +export interface PageAppSignatureKeyRequest { searchKey?: string | null; /** * @format int32 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/index.ts index 3e58b9a7..8dcbfa91 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/index.ts @@ -10,15 +10,15 @@ */ import { - AddTenantClientApiPolicyRequest, + AddClientApiPolicyRequest, ClientApiPolicyAddPostData, ClientApiPolicyDeletePostData, ClientApiPolicyDetailGetData, ClientApiPolicyPagePostData, ClientApiPolicyRotatePostData, ClientApiPolicyUpdatePostData, - PageTenantClientApiPolicyRequest, - UpdateTenantClientApiPolicyRequest, + PageClientApiPolicyRequest, + UpdateClientApiPolicyRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class ClientApiPolicy { * @request POST:/api/clientApiPolicy/add */ clientApiPolicyAddPost = ( - data: AddTenantClientApiPolicyRequest, + data: AddClientApiPolicyRequest, params: RequestParams = {}, ) => this.http.request({ @@ -108,7 +108,7 @@ export class ClientApiPolicy { * @request POST:/api/clientApiPolicy/page */ clientApiPolicyPagePost = ( - data: PageTenantClientApiPolicyRequest, + data: PageClientApiPolicyRequest, params: RequestParams = {}, ) => this.http.request({ @@ -147,7 +147,7 @@ export class ClientApiPolicy { * @request POST:/api/clientApiPolicy/update */ clientApiPolicyUpdatePost = ( - data: UpdateTenantClientApiPolicyRequest, + data: UpdateClientApiPolicyRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/types.ts index a543c006..580fdf2d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/types.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /** 租户 Client API 运行策略新增输入参数 */ -export interface AddTenantClientApiPolicyRequest { +export interface AddClientApiPolicyRequest { /** 是否要求请求签名。 */ signatureRequired?: boolean; /** 是否要求设备证明。 */ @@ -96,7 +96,7 @@ export interface ClientApiPolicyResponseSqlSugarPagedList { } /** 租户 Client API 运行策略分页查询输入参数 */ -export interface PageTenantClientApiPolicyRequest { +export interface PageClientApiPolicyRequest { searchKey?: string | null; /** * @format int32 @@ -116,7 +116,7 @@ export interface PageTenantClientApiPolicyRequest { } /** 租户 Client API 运行策略更新输入参数 */ -export interface UpdateTenantClientApiPolicyRequest { +export interface UpdateClientApiPolicyRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/index.ts index d00717c0..7446ea2c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantDeviceGroupRequest, + AddDeviceGroupRequest, DeviceGroupAddPostData, DeviceGroupDeletePostData, DeviceGroupDetailGetData, @@ -19,7 +19,7 @@ import { DeviceGroupSelectPostData, DeviceGroupSelectStringPostData, DeviceGroupUpdatePostData, - UpdateTenantDeviceGroupRequest, + UpdateDeviceGroupRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class DeviceGroup { * @request POST:/api/deviceGroup/add */ deviceGroupAddPost = ( - data: AddTenantDeviceGroupRequest, + data: AddDeviceGroupRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class DeviceGroup { * @request POST:/api/deviceGroup/update */ deviceGroupUpdatePost = ( - data: UpdateTenantDeviceGroupRequest, + data: UpdateDeviceGroupRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/types.ts index dc43f944..c38c68c6 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/deviceGroup/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 机器码分组增加输入参数 */ -export interface AddTenantDeviceGroupRequest { +export interface AddDeviceGroupRequest { name?: string | null; description?: string | null; createdName?: string | null; @@ -77,7 +77,7 @@ export interface DeviceGroupResponseSqlSugarPagedList { } /** 机器码分组更新输入参数 */ -export interface UpdateTenantDeviceGroupRequest { +export interface UpdateDeviceGroupRequest { name?: string | null; description?: string | null; createdName?: string | null; diff --git a/GameFrameX.Admin.Unified.Vue/src/api/file/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/file/index.ts new file mode 100644 index 00000000..76f3f2a3 --- /dev/null +++ b/GameFrameX.Admin.Unified.Vue/src/api/file/index.ts @@ -0,0 +1,220 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { + DeleteFileRequest, + FileDeletePostData, + FileDownloadFilePostData, + FilePagePostData, + FileRequest, + FileUpdatePostData, + FileUploadAvatarPostData, + FileUploadAvatarPostPayload, + FileUploadFileFromBase64PostData, + FileUploadFilePostData, + FileUploadFilePostPayload, + FileUploadFilesPostData, + FileUploadFilesPostPayload, + FileUploadSignaturePostData, + FileUploadSignaturePostPayload, + PageFileRequest, + UploadFileFromBase64Request, +} from "./types"; +import { ContentType, HttpClient, RequestParams } from "../_shared/http-client"; +import {getAPI} from "../../utils/axiosUtils"; + +export class File { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags file + * @name FileDeletePost + * @summary 删除文件 + * @request POST:/api/file/delete + */ + fileDeletePost = (data: DeleteFileRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/file/delete`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags file + * @name FileDownloadFilePost + * @summary 根据文件Id或Url下载 + * @request POST:/api/file/downloadFile + */ + fileDownloadFilePost = (data: FileRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/file/downloadFile`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags file + * @name FilePagePost + * @summary 获取文件分页列表 + * @request POST:/api/file/page + */ + filePagePost = (data: PageFileRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/file/page`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags file + * @name FileUpdatePost + * @summary 更新文件 + * @request POST:/api/file/update + */ + fileUpdatePost = (data: FileRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/file/update`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags file + * @name FileUploadAvatarPost + * @summary 上传头像 + * @request POST:/api/file/uploadAvatar + */ + fileUploadAvatarPost = ( + data: FileUploadAvatarPostPayload, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/file/uploadAvatar`, + method: "POST", + body: data, + type: ContentType.FormData, + format: "json", + ...params, + }); + /** + * No description + * + * @tags file + * @name FileUploadFilePost + * @summary 上传文件 + * @request POST:/api/file/uploadFile + */ + fileUploadFilePost = ( + data: FileUploadFilePostPayload, + query?: { + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/file/uploadFile`, + method: "POST", + query: query, + body: data, + type: ContentType.FormData, + format: "json", + ...params, + }); + /** + * No description + * + * @tags file + * @name FileUploadFileFromBase64Post + * @summary 上传文件Base64 + * @request POST:/api/file/uploadFileFromBase64 + */ + fileUploadFileFromBase64Post = ( + data: UploadFileFromBase64Request, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/file/uploadFileFromBase64`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags file + * @name FileUploadFilesPost + * @summary 上传多文件 + * @request POST:/api/file/uploadFiles + */ + fileUploadFilesPost = ( + data: FileUploadFilesPostPayload, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/file/uploadFiles`, + method: "POST", + body: data, + type: ContentType.FormData, + format: "json", + ...params, + }); + /** + * No description + * + * @tags file + * @name FileUploadSignaturePost + * @summary 上传电子签名 + * @request POST:/api/file/uploadSignature + */ + fileUploadSignaturePost = ( + data: FileUploadSignaturePostPayload, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/file/uploadSignature`, + method: "POST", + body: data, + type: ContentType.FormData, + format: "json", + ...params, + }); +} + +export const fileDeletePost = (...args: Parameters['fileDeletePost']>) => getAPI(File).fileDeletePost(...args); +export const fileDownloadFilePost = (...args: Parameters['fileDownloadFilePost']>) => getAPI(File).fileDownloadFilePost(...args); +export const filePagePost = (...args: Parameters['filePagePost']>) => getAPI(File).filePagePost(...args); +export const fileUpdatePost = (...args: Parameters['fileUpdatePost']>) => getAPI(File).fileUpdatePost(...args); +export const fileUploadAvatarPost = (...args: Parameters['fileUploadAvatarPost']>) => getAPI(File).fileUploadAvatarPost(...args); +export const fileUploadFilePost = (...args: Parameters['fileUploadFilePost']>) => getAPI(File).fileUploadFilePost(...args); +export const fileUploadFileFromBase64Post = (...args: Parameters['fileUploadFileFromBase64Post']>) => getAPI(File).fileUploadFileFromBase64Post(...args); +export const fileUploadFilesPost = (...args: Parameters['fileUploadFilesPost']>) => getAPI(File).fileUploadFilesPost(...args); +export const fileUploadSignaturePost = (...args: Parameters['fileUploadSignaturePost']>) => getAPI(File).fileUploadSignaturePost(...args); diff --git a/GameFrameX.Admin.Unified.Vue/src/api/tenantFile/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/file/types.ts similarity index 74% rename from GameFrameX.Admin.Unified.Vue/src/api/tenantFile/types.ts rename to GameFrameX.Admin.Unified.Vue/src/api/file/types.ts index 7f3f5aa7..deb5d244 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/tenantFile/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/file/types.ts @@ -40,6 +40,20 @@ export interface FileResponse { fileName?: string | null; } +export interface FileResponseSqlSugarPagedList { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + /** @format int32 */ + total?: number; + /** @format int32 */ + totalPages?: number; + items?: FileResponse[] | null; + hasPrevPage?: boolean; + hasNextPage?: boolean; +} + export interface PageFileRequest { searchKey?: string | null; /** @@ -70,67 +84,6 @@ export interface PageFileRequest { endTime?: number | null; } -/** 系统文件输出参数 */ -export interface TenantFileResponse { - /** Id */ - id?: string; - /** 提供者 */ - provider?: string | null; - /** - * 关联的租户对象存储配置 ID(TenantObjectStorageConfigEntity.Id)。 - * 新上传文件必填,用于按精确配置解析下载/删除路径;历史记录为 null 时按本地 legacy 行为兜底。 - */ - storageConfigId?: string | null; - /** 仓储名称 */ - bucketName?: string | null; - /** 文件名称(源文件名) */ - fileName?: string | null; - /** 文件后缀 */ - suffix?: string | null; - /** 存储路径 */ - filePath?: string | null; - /** 文件大小KB */ - sizeKb?: string | null; - /** 文件大小信息-计算后的 */ - sizeInfo?: string | null; - /** 外链地址-OSS上传后生成外链地址方便前端预览 */ - url?: string | null; - /** 文件MD5 */ - fileMd5?: string | null; - /** 是否启用 */ - isEnabled?: boolean | null; - /** - * 创建时间 - * @format int64 - */ - createdTime?: number; - /** 创建人 */ - createdName?: string | null; - /** - * 更新时间 - * @format int64 - */ - updateTime?: number | null; - /** 更新人 */ - updatedName?: string | null; - /** 行版本号(乐观锁) */ - rowVersion?: string | null; -} - -export interface TenantFileResponseSqlSugarPagedList { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - /** @format int32 */ - total?: number; - /** @format int32 */ - totalPages?: number; - items?: TenantFileResponse[] | null; - hasPrevPage?: boolean; - hasNextPage?: boolean; -} - export interface UploadFileFromBase64Request { /** 文件内容 */ fileDataBase64?: string | null; @@ -142,11 +95,11 @@ export interface UploadFileFromBase64Request { path?: string | null; } -export type TenantFileDeletePostData = any; +export type FileDeletePostData = any; -export type TenantFileDownloadFilePostData = any; +export type FileDownloadFilePostData = any; -export interface TenantFilePagePostData { +export interface FilePagePostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -154,7 +107,7 @@ export interface TenantFilePagePostData { code: number; /** 错误或提示信息 */ message: string; - data: TenantFileResponseSqlSugarPagedList; + data: FileResponseSqlSugarPagedList; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; /** 已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段 */ @@ -169,14 +122,14 @@ export interface TenantFilePagePostData { extras: object | null; } -export type TenantFileUpdatePostData = any; +export type FileUpdatePostData = any; -export interface TenantFileUploadAvatarPostPayload { +export interface FileUploadAvatarPostPayload { /** @format binary */ file: File; } -export interface TenantFileUploadAvatarPostData { +export interface FileUploadAvatarPostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -199,12 +152,12 @@ export interface TenantFileUploadAvatarPostData { extras: object | null; } -export interface TenantFileUploadFilePostPayload { +export interface FileUploadFilePostPayload { /** @format binary */ file: File; } -export interface TenantFileUploadFilePostData { +export interface FileUploadFilePostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -227,7 +180,7 @@ export interface TenantFileUploadFilePostData { extras: object | null; } -export interface TenantFileUploadFileFromBase64PostData { +export interface FileUploadFileFromBase64PostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -250,11 +203,11 @@ export interface TenantFileUploadFileFromBase64PostData { extras: object | null; } -export interface TenantFileUploadFilesPostPayload { +export interface FileUploadFilesPostPayload { files: File[]; } -export interface TenantFileUploadFilesPostData { +export interface FileUploadFilesPostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -277,12 +230,12 @@ export interface TenantFileUploadFilesPostData { extras: object | null; } -export interface TenantFileUploadSignaturePostPayload { +export interface FileUploadSignaturePostPayload { /** @format binary */ file: File; } -export interface TenantFileUploadSignaturePostData { +export interface FileUploadSignaturePostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/index.ts index d5cb465a..d8bb4a06 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/index.ts @@ -10,15 +10,15 @@ */ import { - AddTenantGameAdvertisementRewardEntityRequest, + AddGameAdvertisementRewardEntityRequest, GameAdvertisementRewardAddPostData, GameAdvertisementRewardDeletePostData, GameAdvertisementRewardDetailGetData, GameAdvertisementRewardExportPostData, GameAdvertisementRewardPagePostData, GameAdvertisementRewardUpdatePostData, - PageTenantGameAdvertisementRewardEntityRequest, - UpdateTenantGameAdvertisementRewardEntityRequest, + PageGameAdvertisementRewardEntityRequest, + UpdateGameAdvertisementRewardEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -42,7 +42,7 @@ export class GameAdvertisementReward { * @request POST:/api/gameAdvertisementReward/add */ gameAdvertisementRewardAddPost = ( - data: AddTenantGameAdvertisementRewardEntityRequest, + data: AddGameAdvertisementRewardEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -107,7 +107,7 @@ export class GameAdvertisementReward { * @request POST:/api/gameAdvertisementReward/export */ gameAdvertisementRewardExportPost = ( - data: PageTenantGameAdvertisementRewardEntityRequest, + data: PageGameAdvertisementRewardEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -127,7 +127,7 @@ export class GameAdvertisementReward { * @request POST:/api/gameAdvertisementReward/page */ gameAdvertisementRewardPagePost = ( - data: PageTenantGameAdvertisementRewardEntityRequest, + data: PageGameAdvertisementRewardEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -147,7 +147,7 @@ export class GameAdvertisementReward { * @request POST:/api/gameAdvertisementReward/update */ gameAdvertisementRewardUpdatePost = ( - data: UpdateTenantGameAdvertisementRewardEntityRequest, + data: UpdateGameAdvertisementRewardEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/types.ts index 29ff07a4..9fc1a728 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAdvertisementReward/types.ts @@ -15,7 +15,7 @@ export enum AdvertisementRewardStatusEnum { * 广告奖励发放账本新增输入参数。仅满足 GenericCrudService 的 TAddRequest 泛型约束; * AddAsync 端点已由 OnAddingAsync 抛错关闭(账本由广告回调链路产生,不支持管理后台直接创建)。 */ -export type AddTenantGameAdvertisementRewardEntityRequest = object; +export type AddGameAdvertisementRewardEntityRequest = object; /** * 广告奖励发放账本输出参数(C114 / GFX-111 后端跟进)。投影暴露实体全字段: @@ -30,7 +30,7 @@ export interface GameAdvertisementRewardResponse { transactionId?: string | null; /** 广告位/单元。UnityAds 无则空。 */ advertisementUnit?: string | null; - /** 角色 Id。反查自 TenantGameRoleEntity。 */ + /** 角色 Id。反查自 GameRoleEntity。 */ roleId?: string | null; /** 用户 Id。来自平台 userId 参数。 */ userId?: string; @@ -84,7 +84,7 @@ export interface GameAdvertisementRewardResponseSqlSugarPagedList { * * 过滤字段对齐前端检索表单:Provider/Status/RoleId 常用 + TransactionId/AdvertisementUnit/AreaId/时间范围 高级。 */ -export interface PageTenantGameAdvertisementRewardEntityRequest { +export interface PageGameAdvertisementRewardEntityRequest { searchKey?: string | null; /** * @format int32 @@ -120,7 +120,7 @@ export interface PageTenantGameAdvertisementRewardEntityRequest { * 广告奖励发放账本更新输入参数。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束; * UpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持管理后台修改)。 */ -export interface UpdateTenantGameAdvertisementRewardEntityRequest { +export interface UpdateGameAdvertisementRewardEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/index.ts index fcc13b02..929786a0 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/index.ts @@ -10,15 +10,15 @@ */ import { - AddTenantGameAnnouncementEntityRequest, + AddGameAnnouncementEntityRequest, GameAnnouncementAddPostData, GameAnnouncementDeletePostData, GameAnnouncementDetailGetData, GameAnnouncementDispatchOnlinePostData, GameAnnouncementPagePostData, GameAnnouncementUpdatePostData, - PageTenantGameAnnouncementEntityRequest, - UpdateTenantGameAnnouncementEntityRequest, + PageGameAnnouncementEntityRequest, + UpdateGameAnnouncementEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class GameAnnouncement { * @request POST:/api/gameAnnouncement/add */ gameAnnouncementAddPost = ( - data: AddTenantGameAnnouncementEntityRequest, + data: AddGameAnnouncementEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -128,7 +128,7 @@ export class GameAnnouncement { * @request POST:/api/gameAnnouncement/page */ gameAnnouncementPagePost = ( - data: PageTenantGameAnnouncementEntityRequest, + data: PageGameAnnouncementEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -148,7 +148,7 @@ export class GameAnnouncement { * @request POST:/api/gameAnnouncement/update */ gameAnnouncementUpdatePost = ( - data: UpdateTenantGameAnnouncementEntityRequest, + data: UpdateGameAnnouncementEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/types.ts index 83e869c4..9119cd3c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAnnouncement/types.ts @@ -4,7 +4,7 @@ import type { OnlineLiveOpsDispatchResponse } from "../_shared/data-contracts"; /** 游戏公告增加输入参数 */ -export interface AddTenantGameAnnouncementEntityRequest { +export interface AddGameAnnouncementEntityRequest { language?: string | null; areaId?: string | null; /** @minLength 1 */ @@ -103,7 +103,7 @@ export interface GameAnnouncementResponseSqlSugarPagedList { } /** 游戏公告分页查询输入参数 */ -export interface PageTenantGameAnnouncementEntityRequest { +export interface PageGameAnnouncementEntityRequest { searchKey?: string | null; /** * @format int32 @@ -141,7 +141,7 @@ export interface PageTenantGameAnnouncementEntityRequest { } /** 游戏公告更新输入参数 */ -export interface UpdateTenantGameAnnouncementEntityRequest { +export interface UpdateGameAnnouncementEntityRequest { language?: string | null; areaId?: string | null; /** @minLength 1 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/index.ts index 85a342ff..5fa95489 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/index.ts @@ -10,14 +10,14 @@ */ import { - AddTenantGameAntiCheatEventRequest, + AddGameAntiCheatEventRequest, GameAntiCheatEventDeletePostData, GameAntiCheatEventDetailGetData, GameAntiCheatEventPagePostData, GameAntiCheatEventReviewPostData, GameAntiCheatEventSubmitPostData, - PageTenantGameAntiCheatEventRequest, - UpdateTenantGameAntiCheatEventReviewRequest, + PageGameAntiCheatEventRequest, + UpdateGameAntiCheatEventReviewRequest, } from "./types"; import { BaseDeleteRequest, @@ -86,7 +86,7 @@ export class GameAntiCheatEvent { * @request POST:/api/gameAntiCheatEvent/page */ gameAntiCheatEventPagePost = ( - data: PageTenantGameAntiCheatEventRequest, + data: PageGameAntiCheatEventRequest, params: RequestParams = {}, ) => this.http.request({ @@ -106,7 +106,7 @@ export class GameAntiCheatEvent { * @request POST:/api/gameAntiCheatEvent/review */ gameAntiCheatEventReviewPost = ( - data: UpdateTenantGameAntiCheatEventReviewRequest, + data: UpdateGameAntiCheatEventReviewRequest, params: RequestParams = {}, ) => this.http.request({ @@ -125,7 +125,7 @@ export class GameAntiCheatEvent { * @request POST:/api/gameAntiCheatEvent/submit */ gameAntiCheatEventSubmitPost = ( - data: AddTenantGameAntiCheatEventRequest, + data: AddGameAntiCheatEventRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/types.ts index 737c731b..b485ce69 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAntiCheatEvent/types.ts @@ -62,7 +62,7 @@ export enum AntiCheatProviderEnum { } /** 反作弊事件上报输入(SubmitAsync 接入)。不含复核相关字段——上报一律落 Pending,复核由 ReviewAsync 动作单独驱动。 */ -export interface AddTenantGameAntiCheatEventRequest { +export interface AddGameAntiCheatEventRequest { provider?: AntiCheatProviderEnum; /** Provider 名称。Provider=Custom 时必填;其它可空。 */ providerName?: string | null; @@ -138,7 +138,7 @@ export interface GameAntiCheatEventResponseSqlSugarPagedList { } /** 反作弊事件分页查询输入。 */ -export interface PageTenantGameAntiCheatEventRequest { +export interface PageGameAntiCheatEventRequest { searchKey?: string | null; /** * @format int32 @@ -163,7 +163,7 @@ export interface PageTenantGameAntiCheatEventRequest { } /** 反作弊事件人工复核输入(ReviewAsync 动作)。仅允许在 Pending 状态下迁移到 Approved/Rejected/Escalated。 */ -export interface UpdateTenantGameAntiCheatEventReviewRequest { +export interface UpdateGameAntiCheatEventReviewRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/index.ts index cb7cf049..5ffa8497 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameAppDeviceRequest, + AddGameAppDeviceRequest, GameAppDeviceAddPostData, GameAppDeviceDeletePostData, GameAppDeviceDetailGetData, @@ -19,7 +19,7 @@ import { GameAppDeviceSelectPostData, GameAppDeviceSelectStringPostData, GameAppDeviceUpdatePostData, - UpdateTenantGameAppDeviceRequest, + UpdateGameAppDeviceRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameAppDevice { * @request POST:/api/gameAppDevice/add */ gameAppDeviceAddPost = ( - data: AddTenantGameAppDeviceRequest, + data: AddGameAppDeviceRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameAppDevice { * @request POST:/api/gameAppDevice/update */ gameAppDeviceUpdatePost = ( - data: UpdateTenantGameAppDeviceRequest, + data: UpdateGameAppDeviceRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/types.ts index 5b0723df..16db85f2 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAppDevice/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 机器码增加输入参数 */ -export interface AddTenantGameAppDeviceRequest { +export interface AddGameAppDeviceRequest { description?: string | null; createdName?: string | null; updatedName?: string | null; @@ -86,7 +86,7 @@ export interface GameAppDeviceResponseSqlSugarPagedList { } /** 机器码更新输入参数 */ -export interface UpdateTenantGameAppDeviceRequest { +export interface UpdateGameAppDeviceRequest { name?: string | null; description?: string | null; createdName?: string | null; diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/index.ts index 581c362d..cbac52e4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameAppOpenAccessRequest, + AddGameAppOpenAccessRequest, GameAppOpenAccessActionRequest, GameAppOpenAccessAddPostData, GameAppOpenAccessDeletePostData, @@ -20,8 +20,8 @@ import { GameAppOpenAccessRefreshPostData, GameAppOpenAccessRevokePostData, GameAppOpenAccessUpdatePostData, - PageTenantGameAppOpenAccessRequest, - UpdateTenantGameAppOpenAccessRequest, + PageGameAppOpenAccessRequest, + UpdateGameAppOpenAccessRequest, } from "./types"; import { ContentType, HttpClient, RequestParams } from "../_shared/http-client"; import {getAPI} from "../../utils/axiosUtils"; @@ -42,7 +42,7 @@ export class GameAppOpenAccess { * @request POST:/api/gameAppOpenAccess/add */ gameAppOpenAccessAddPost = ( - data: AddTenantGameAppOpenAccessRequest, + data: AddGameAppOpenAccessRequest, params: RequestParams = {}, ) => this.http.request({ @@ -119,7 +119,7 @@ export class GameAppOpenAccess { * @request POST:/api/gameAppOpenAccess/page */ gameAppOpenAccessPagePost = ( - data: PageTenantGameAppOpenAccessRequest, + data: PageGameAppOpenAccessRequest, params: RequestParams = {}, ) => this.http.request({ @@ -178,7 +178,7 @@ export class GameAppOpenAccess { * @request POST:/api/gameAppOpenAccess/update */ gameAppOpenAccessUpdatePost = ( - data: UpdateTenantGameAppOpenAccessRequest, + data: UpdateGameAppOpenAccessRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/types.ts index 14972c40..2898289e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAppOpenAccess/types.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /** 新增应用开放访问凭证输入。AccessSecret 由服务端生成,仅签发响应中返回一次。 */ -export interface AddTenantGameAppOpenAccessRequest { +export interface AddGameAppOpenAccessRequest { /** * 绑定的系统用户 Id。 * @min 1 @@ -63,7 +63,7 @@ export interface GameAppOpenAccessActionRequest { /** * 应用开放访问凭证输出。 * - * 注意:GameFrameX.Entity.Tenant.Game.App.TenantGameAppOpenAccessEntity.AccessSecret 永不输出(明文仅签发 / 轮换时一次性返回)。 + * 注意:GameFrameX.Entity.Business.Game.App.GameAppOpenAccessEntity.AccessSecret 永不输出(明文仅签发 / 轮换时一次性返回)。 * Output 不含 AccessSecret 字段,Service 投影时也不得引入。 */ export interface GameAppOpenAccessResponse { @@ -148,7 +148,7 @@ export interface GameAppOpenAccessSecretResponse { } /** 应用开放访问凭证分页查询输入。 */ -export interface PageTenantGameAppOpenAccessRequest { +export interface PageGameAppOpenAccessRequest { searchKey?: string | null; /** * @format int32 @@ -175,7 +175,7 @@ export interface PageTenantGameAppOpenAccessRequest { } /** 更新应用开放访问凭证输入。绑定用户和接口范围由服务端校验。 */ -export interface UpdateTenantGameAppOpenAccessRequest { +export interface UpdateGameAppOpenAccessRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameArea/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameArea/index.ts index 2c74406f..87413eca 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameArea/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameArea/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameAreaEntityRequest, + AddGameAreaEntityRequest, GameAreaAddPostData, GameAreaDeletePostData, GameAreaDetailGetData, @@ -22,8 +22,8 @@ import { GameAreaSelectStringPostData, GameAreaStopPostData, GameAreaUpdatePostData, - PageTenantGameAreaEntityRequest, - UpdateTenantGameAreaEntityRequest, + PageGameAreaEntityRequest, + UpdateGameAreaEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -49,7 +49,7 @@ export class GameArea { * @request POST:/api/gameArea/add */ gameAreaAddPost = ( - data: AddTenantGameAreaEntityRequest, + data: AddGameAreaEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -146,7 +146,7 @@ export class GameArea { * @request POST:/api/gameArea/page */ gameAreaPagePost = ( - data: PageTenantGameAreaEntityRequest, + data: PageGameAreaEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -238,7 +238,7 @@ export class GameArea { * @request POST:/api/gameArea/update */ gameAreaUpdatePost = ( - data: UpdateTenantGameAreaEntityRequest, + data: UpdateGameAreaEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameArea/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameArea/types.ts index f2434f4c..e6a9c6cc 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameArea/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameArea/types.ts @@ -128,7 +128,7 @@ export enum GameLanguage { } /** 游戏区服增加输入参数 */ -export interface AddTenantGameAreaEntityRequest { +export interface AddGameAreaEntityRequest { /** * @min 1 * @max 9223372036854776000 @@ -348,7 +348,7 @@ export interface GameAreaResponseSqlSugarPagedList { } /** 游戏区服分页查询输入参数 */ -export interface PageTenantGameAreaEntityRequest { +export interface PageGameAreaEntityRequest { searchKey?: string | null; /** * @format int32 @@ -376,7 +376,7 @@ export interface PageTenantGameAreaEntityRequest { } /** 游戏区服更新输入参数 */ -export interface UpdateTenantGameAreaEntityRequest { +export interface UpdateGameAreaEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/index.ts index 14b84f73..b05b5132 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameAreaClassifyEntityRequest, + AddGameAreaClassifyEntityRequest, GameAreaClassifyAddPostData, GameAreaClassifyDeletePostData, GameAreaClassifyDetailGetData, @@ -18,8 +18,8 @@ import { GameAreaClassifySelectPostData, GameAreaClassifySelectStringPostData, GameAreaClassifyUpdatePostData, - PageTenantGameAreaClassifyEntityRequest, - UpdateTenantGameAreaClassifyEntityRequest, + PageGameAreaClassifyEntityRequest, + UpdateGameAreaClassifyEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameAreaClassify { * @request POST:/api/gameAreaClassify/add */ gameAreaClassifyAddPost = ( - data: AddTenantGameAreaClassifyEntityRequest, + data: AddGameAreaClassifyEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameAreaClassify { * @request POST:/api/gameAreaClassify/page */ gameAreaClassifyPagePost = ( - data: PageTenantGameAreaClassifyEntityRequest, + data: PageGameAreaClassifyEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameAreaClassify { * @request POST:/api/gameAreaClassify/update */ gameAreaClassifyUpdatePost = ( - data: UpdateTenantGameAreaClassifyEntityRequest, + data: UpdateGameAreaClassifyEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/types.ts index 91cb5616..e632154e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameAreaClassify/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 游戏大区分类增加输入参数 */ -export interface AddTenantGameAreaClassifyEntityRequest { +export interface AddGameAreaClassifyEntityRequest { /** * 名称 * @minLength 1 @@ -94,7 +94,7 @@ export interface GameAreaClassifyResponseSqlSugarPagedList { } /** 游戏大区分类分页查询输入参数 */ -export interface PageTenantGameAreaClassifyEntityRequest { +export interface PageGameAreaClassifyEntityRequest { searchKey?: string | null; /** * @format int32 @@ -115,7 +115,7 @@ export interface PageTenantGameAreaClassifyEntityRequest { } /** 游戏大区分类更新输入参数 */ -export interface UpdateTenantGameAreaClassifyEntityRequest { +export interface UpdateGameAreaClassifyEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/index.ts index a6bbb90a..d749a36e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/index.ts @@ -10,14 +10,14 @@ */ import { - AddTenantGameBannerAnnouncementEntityRequest, + AddGameBannerAnnouncementEntityRequest, GameBannerAnnouncementAddPostData, GameBannerAnnouncementDeletePostData, GameBannerAnnouncementDetailGetData, GameBannerAnnouncementPagePostData, GameBannerAnnouncementUpdatePostData, - PageTenantGameBannerAnnouncementEntityRequest, - UpdateTenantGameBannerAnnouncementEntityRequest, + PageGameBannerAnnouncementEntityRequest, + UpdateGameBannerAnnouncementEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -41,7 +41,7 @@ export class GameBannerAnnouncement { * @request POST:/api/gameBannerAnnouncement/add */ gameBannerAnnouncementAddPost = ( - data: AddTenantGameBannerAnnouncementEntityRequest, + data: AddGameBannerAnnouncementEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -106,7 +106,7 @@ export class GameBannerAnnouncement { * @request POST:/api/gameBannerAnnouncement/page */ gameBannerAnnouncementPagePost = ( - data: PageTenantGameBannerAnnouncementEntityRequest, + data: PageGameBannerAnnouncementEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -126,7 +126,7 @@ export class GameBannerAnnouncement { * @request POST:/api/gameBannerAnnouncement/update */ gameBannerAnnouncementUpdatePost = ( - data: UpdateTenantGameBannerAnnouncementEntityRequest, + data: UpdateGameBannerAnnouncementEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/types.ts index cdba600b..2ae6eedb 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameBannerAnnouncement/types.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /** 游戏内横幅公告增加输入参数 */ -export interface AddTenantGameBannerAnnouncementEntityRequest { +export interface AddGameBannerAnnouncementEntityRequest { /** * @min 1 * @max 9223372036854776000 @@ -125,7 +125,7 @@ export interface GameBannerAnnouncementResponseSqlSugarPagedList { } /** 游戏内横幅公告分页查询输入参数 */ -export interface PageTenantGameBannerAnnouncementEntityRequest { +export interface PageGameBannerAnnouncementEntityRequest { searchKey?: string | null; /** * @format int32 @@ -178,7 +178,7 @@ export interface PageTenantGameBannerAnnouncementEntityRequest { } /** 游戏内横幅公告更新输入参数 */ -export interface UpdateTenantGameBannerAnnouncementEntityRequest { +export interface UpdateGameBannerAnnouncementEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/index.ts index 818fbd4b..2c8e395f 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/index.ts @@ -10,14 +10,14 @@ */ import { - AddTenantGameCommodityEntityRequest, + AddGameCommodityEntityRequest, GameCommodityAddPostData, GameCommodityDeletePostData, GameCommodityDetailGetData, GameCommodityPagePostData, GameCommodityUpdatePostData, - PageTenantGameCommodityEntityRequest, - UpdateTenantGameCommodityEntityRequest, + PageGameCommodityEntityRequest, + UpdateGameCommodityEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -41,7 +41,7 @@ export class GameCommodity { * @request POST:/api/gameCommodity/add */ gameCommodityAddPost = ( - data: AddTenantGameCommodityEntityRequest, + data: AddGameCommodityEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -106,7 +106,7 @@ export class GameCommodity { * @request POST:/api/gameCommodity/page */ gameCommodityPagePost = ( - data: PageTenantGameCommodityEntityRequest, + data: PageGameCommodityEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -126,7 +126,7 @@ export class GameCommodity { * @request POST:/api/gameCommodity/update */ gameCommodityUpdatePost = ( - data: UpdateTenantGameCommodityEntityRequest, + data: UpdateGameCommodityEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/types.ts index be2790d1..7b9a158b 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameCommodity/types.ts @@ -2,13 +2,13 @@ /* tslint:disable */ /** 游戏商品交易增加输入参数 */ -export interface AddTenantGameCommodityEntityRequest { +export interface AddGameCommodityEntityRequest { /** * 状态 * @minLength 1 */ status: string; - /** 类别Id。引用 TenantGameGoodsCatalogueEntity.Id;Id 后缀契约兼容数字/字符串提交。 */ + /** 类别Id。引用 GameGoodsCatalogueEntity.Id;Id 后缀契约兼容数字/字符串提交。 */ categoryId: string; /** 多少rmb */ cost: boolean; @@ -69,7 +69,7 @@ export interface GameCommodityResponseSqlSugarPagedList { } /** 游戏商品交易分页查询输入参数 */ -export interface PageTenantGameCommodityEntityRequest { +export interface PageGameCommodityEntityRequest { searchKey?: string | null; /** * @format int32 @@ -103,7 +103,7 @@ export interface PageTenantGameCommodityEntityRequest { } /** 游戏商品交易更新输入参数 */ -export interface UpdateTenantGameCommodityEntityRequest { +export interface UpdateGameCommodityEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/index.ts index 58563c71..dcf74185 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameDockerTagEntityRequest, + AddGameDockerTagEntityRequest, GameDockerTagAddPostData, GameDockerTagDeletePostData, GameDockerTagDetailGetData, @@ -18,8 +18,8 @@ import { GameDockerTagSelectPostData, GameDockerTagSelectStringPostData, GameDockerTagUpdatePostData, - PageTenantGameDockerTagEntityRequest, - UpdateTenantGameDockerTagEntityRequest, + PageGameDockerTagEntityRequest, + UpdateGameDockerTagEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameDockerTag { * @request POST:/api/gameDockerTag/add */ gameDockerTagAddPost = ( - data: AddTenantGameDockerTagEntityRequest, + data: AddGameDockerTagEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameDockerTag { * @request POST:/api/gameDockerTag/page */ gameDockerTagPagePost = ( - data: PageTenantGameDockerTagEntityRequest, + data: PageGameDockerTagEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameDockerTag { * @request POST:/api/gameDockerTag/update */ gameDockerTagUpdatePost = ( - data: UpdateTenantGameDockerTagEntityRequest, + data: UpdateGameDockerTagEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/types.ts index 041cd1f2..1f71c08e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameDockerTag/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 游戏Docker标签增加输入参数 */ -export interface AddTenantGameDockerTagEntityRequest { +export interface AddGameDockerTagEntityRequest { /** * 名称 * @minLength 1 @@ -66,7 +66,7 @@ export interface GameDockerTagResponseSqlSugarPagedList { } /** 游戏大区分类分页查询输入参数 */ -export interface PageTenantGameDockerTagEntityRequest { +export interface PageGameDockerTagEntityRequest { searchKey?: string | null; /** * @format int32 @@ -87,7 +87,7 @@ export interface PageTenantGameDockerTagEntityRequest { } /** 游戏Docker标签更新输入参数 */ -export interface UpdateTenantGameDockerTagEntityRequest { +export interface UpdateGameDockerTagEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/index.ts index 4e3f75b9..774ad266 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameGoodsEntityRequest, + AddGameGoodsEntityRequest, GameGoodsAddPostData, GameGoodsDeletePostData, GameGoodsDetailGetData, @@ -18,8 +18,8 @@ import { GameGoodsSelectPostData, GameGoodsSelectStringPostData, GameGoodsUpdatePostData, - PageTenantGameGoodsEntityRequest, - UpdateTenantGameGoodsEntityRequest, + PageGameGoodsEntityRequest, + UpdateGameGoodsEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameGoods { * @request POST:/api/gameGoods/add */ gameGoodsAddPost = ( - data: AddTenantGameGoodsEntityRequest, + data: AddGameGoodsEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -106,7 +106,7 @@ export class GameGoods { * @request POST:/api/gameGoods/page */ gameGoodsPagePost = ( - data: PageTenantGameGoodsEntityRequest, + data: PageGameGoodsEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -166,7 +166,7 @@ export class GameGoods { * @request POST:/api/gameGoods/update */ gameGoodsUpdatePost = ( - data: UpdateTenantGameGoodsEntityRequest, + data: UpdateGameGoodsEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/types.ts index 2d68a31b..91f7347c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameGoods/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 游戏资源增加输入参数 */ -export interface AddTenantGameGoodsEntityRequest { +export interface AddGameGoodsEntityRequest { /** * 配置ID * @format int32 @@ -76,7 +76,7 @@ export interface GameGoodsResponseSqlSugarPagedList { } /** 游戏资源分页查询输入参数 */ -export interface PageTenantGameGoodsEntityRequest { +export interface PageGameGoodsEntityRequest { searchKey?: string | null; /** * @format int32 @@ -102,7 +102,7 @@ export interface PageTenantGameGoodsEntityRequest { } /** 游戏资源更新输入参数 */ -export interface UpdateTenantGameGoodsEntityRequest { +export interface UpdateGameGoodsEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/index.ts index d16b3aca..b809afa1 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameGoodsCatalogueEntityRequest, + AddGameGoodsCatalogueEntityRequest, GameGoodsCatalogueAddPostData, GameGoodsCatalogueDeletePostData, GameGoodsCatalogueDetailGetData, @@ -18,8 +18,8 @@ import { GameGoodsCatalogueSelectPostData, GameGoodsCatalogueSelectStringPostData, GameGoodsCatalogueUpdatePostData, - PageTenantGameGoodsCatalogueEntityRequest, - UpdateTenantGameGoodsCatalogueEntityRequest, + PageGameGoodsCatalogueEntityRequest, + UpdateGameGoodsCatalogueEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameGoodsCatalogue { * @request POST:/api/gameGoodsCatalogue/add */ gameGoodsCatalogueAddPost = ( - data: AddTenantGameGoodsCatalogueEntityRequest, + data: AddGameGoodsCatalogueEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameGoodsCatalogue { * @request POST:/api/gameGoodsCatalogue/page */ gameGoodsCataloguePagePost = ( - data: PageTenantGameGoodsCatalogueEntityRequest, + data: PageGameGoodsCatalogueEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameGoodsCatalogue { * @request POST:/api/gameGoodsCatalogue/update */ gameGoodsCatalogueUpdatePost = ( - data: UpdateTenantGameGoodsCatalogueEntityRequest, + data: UpdateGameGoodsCatalogueEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/types.ts index 6cd70a5e..a3243737 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameGoodsCatalogue/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 游戏道具分类增加输入参数 */ -export interface AddTenantGameGoodsCatalogueEntityRequest { +export interface AddGameGoodsCatalogueEntityRequest { /** * 名称 * @minLength 1 @@ -60,7 +60,7 @@ export interface GameGoodsCatalogueResponseSqlSugarPagedList { } /** 游戏道具分类分页查询输入参数 */ -export interface PageTenantGameGoodsCatalogueEntityRequest { +export interface PageGameGoodsCatalogueEntityRequest { searchKey?: string | null; /** * @format int32 @@ -83,7 +83,7 @@ export interface PageTenantGameGoodsCatalogueEntityRequest { } /** 游戏道具分类更新输入参数 */ -export interface UpdateTenantGameGoodsCatalogueEntityRequest { +export interface UpdateGameGoodsCatalogueEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/index.ts index 4fdff5f5..7364d21e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/index.ts @@ -17,7 +17,7 @@ import { GameLoginTicketKeyPagePostData, GameLoginTicketKeyRotatePostData, GameLoginTicketKeyRotateRequest, - PageTenantGameLoginTicketKeyRequest, + PageGameLoginTicketKeyRequest, } from "./types"; import { BaseDeleteRequest, @@ -125,7 +125,7 @@ export class GameLoginTicketKey { * @request POST:/api/gameLoginTicketKey/page */ gameLoginTicketKeyPagePost = ( - data: PageTenantGameLoginTicketKeyRequest, + data: PageGameLoginTicketKeyRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/types.ts index c48f1ceb..b742d43c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/types.ts @@ -69,7 +69,7 @@ export interface GameLoginTicketKeyRotateRequest { } /** 租户 Game 登录票据签名密钥分页查询输入参数。 */ -export interface PageTenantGameLoginTicketKeyRequest { +export interface PageGameLoginTicketKeyRequest { searchKey?: string | null; /** * @format int32 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMail/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMail/index.ts index c7c41910..85069925 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMail/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMail/index.ts @@ -10,15 +10,15 @@ */ import { - AddTenantGameMailEntityRequest, + AddGameMailEntityRequest, GameMailAddPostData, GameMailDeletePostData, GameMailDetailGetData, GameMailPagePostData, GameMailSendPostData, GameMailUpdatePostData, - PageTenantGameMailEntityRequest, - UpdateTenantGameMailEntityRequest, + PageGameMailEntityRequest, + UpdateGameMailEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class GameMail { * @request POST:/api/gameMail/add */ gameMailAddPost = ( - data: AddTenantGameMailEntityRequest, + data: AddGameMailEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -105,7 +105,7 @@ export class GameMail { * @request POST:/api/gameMail/page */ gameMailPagePost = ( - data: PageTenantGameMailEntityRequest, + data: PageGameMailEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -141,7 +141,7 @@ export class GameMail { * @request POST:/api/gameMail/update */ gameMailUpdatePost = ( - data: UpdateTenantGameMailEntityRequest, + data: UpdateGameMailEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMail/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMail/types.ts index 652ca40f..c43fcc05 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMail/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMail/types.ts @@ -4,7 +4,7 @@ import type { GameMailStatus, GameMailType } from "../_shared/data-contracts"; /** 游戏邮件增加输入参数 */ -export interface AddTenantGameMailEntityRequest { +export interface AddGameMailEntityRequest { /** * @min 1 * @max 9223372036854776000 @@ -120,7 +120,7 @@ export interface GameMailResponseSqlSugarPagedList { } /** 游戏邮件分页查询输入参数 */ -export interface PageTenantGameMailEntityRequest { +export interface PageGameMailEntityRequest { searchKey?: string | null; /** * @format int32 @@ -146,7 +146,7 @@ export interface PageTenantGameMailEntityRequest { } /** 游戏邮件更新输入参数 */ -export interface UpdateTenantGameMailEntityRequest { +export interface UpdateGameMailEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/index.ts index 67e7238d..c8f8f637 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameMailCampaignEntityRequest, + AddGameMailCampaignEntityRequest, GameMailCampaignAddPostData, GameMailCampaignDeletePostData, GameMailCampaignDetailGetData, @@ -20,11 +20,11 @@ import { GameMailCampaignPublishPostData, GameMailCampaignRevokePostData, GameMailCampaignUpdatePostData, - PageTenantGameMailCampaignEntityRequest, + PageGameMailCampaignEntityRequest, PreviewMailCampaignEntityRequest, PublishMailCampaignEntityRequest, RevokeMailCampaignEntityRequest, - UpdateTenantGameMailCampaignEntityRequest, + UpdateGameMailCampaignEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -49,7 +49,7 @@ export class GameMailCampaign { * @request POST:/api/gameMailCampaign/add */ gameMailCampaignAddPost = ( - data: AddTenantGameMailCampaignEntityRequest, + data: AddGameMailCampaignEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -134,7 +134,7 @@ export class GameMailCampaign { * @request POST:/api/gameMailCampaign/page */ gameMailCampaignPagePost = ( - data: PageTenantGameMailCampaignEntityRequest, + data: PageGameMailCampaignEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -214,7 +214,7 @@ export class GameMailCampaign { * @request POST:/api/gameMailCampaign/update */ gameMailCampaignUpdatePost = ( - data: UpdateTenantGameMailCampaignEntityRequest, + data: UpdateGameMailCampaignEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/types.ts index a5055c44..db4e8dc8 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMailCampaign/types.ts @@ -56,7 +56,7 @@ export enum MailCampaignExpirePolicy { } /** 新增 Campaign 输入。 */ -export interface AddTenantGameMailCampaignEntityRequest { +export interface AddGameMailCampaignEntityRequest { /** * @min 1 * @max 9223372036854776000 @@ -202,7 +202,7 @@ export interface GameMailCampaignResponseSqlSugarPagedList { } /** Campaign 分页查询输入。 */ -export interface PageTenantGameMailCampaignEntityRequest { +export interface PageGameMailCampaignEntityRequest { searchKey?: string | null; /** * @format int32 @@ -303,7 +303,7 @@ export interface RevokeMailCampaignEntityResponse { } /** 更新 Campaign 输入。仅 Draft 可更新(Published/Revoked 主体不可变 B1)。 */ -export interface UpdateTenantGameMailCampaignEntityRequest { +export interface UpdateGameMailCampaignEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/index.ts index 82c5a26a..dec1c1fa 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameMailTemplateEntityRequest, + AddGameMailTemplateEntityRequest, GameMailTemplateAddPostData, GameMailTemplateDeletePostData, GameMailTemplateDetailGetData, @@ -18,8 +18,8 @@ import { GameMailTemplateSelectPostData, GameMailTemplateSelectStringPostData, GameMailTemplateUpdatePostData, - PageTenantGameMailTemplateEntityRequest, - UpdateTenantGameMailTemplateEntityRequest, + PageGameMailTemplateEntityRequest, + UpdateGameMailTemplateEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameMailTemplate { * @request POST:/api/gameMailTemplate/add */ gameMailTemplateAddPost = ( - data: AddTenantGameMailTemplateEntityRequest, + data: AddGameMailTemplateEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameMailTemplate { * @request POST:/api/gameMailTemplate/page */ gameMailTemplatePagePost = ( - data: PageTenantGameMailTemplateEntityRequest, + data: PageGameMailTemplateEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameMailTemplate { * @request POST:/api/gameMailTemplate/update */ gameMailTemplateUpdatePost = ( - data: UpdateTenantGameMailTemplateEntityRequest, + data: UpdateGameMailTemplateEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/types.ts index f91366ba..2ca1988c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplate/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse, GameMailType } from "../_shared/data-contracts"; /** 邮件模板增加输入参数 */ -export interface AddTenantGameMailTemplateEntityRequest { +export interface AddGameMailTemplateEntityRequest { /** * 名称 * @minLength 1 @@ -111,7 +111,7 @@ export interface GameMailTemplateResponseSqlSugarPagedList { } /** 邮件模板分页查询输入参数 */ -export interface PageTenantGameMailTemplateEntityRequest { +export interface PageGameMailTemplateEntityRequest { searchKey?: string | null; /** * @format int32 @@ -136,7 +136,7 @@ export interface PageTenantGameMailTemplateEntityRequest { } /** 邮件模板更新输入参数 */ -export interface UpdateTenantGameMailTemplateEntityRequest { +export interface UpdateGameMailTemplateEntityRequest { /** * 名称 * @minLength 1 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/index.ts index b8742506..038001e6 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameMailTemplateCategoryEntityRequest, + AddGameMailTemplateCategoryEntityRequest, GameMailTemplateCategoryAddPostData, GameMailTemplateCategoryDeletePostData, GameMailTemplateCategoryDetailGetData, @@ -18,8 +18,8 @@ import { GameMailTemplateCategorySelectPostData, GameMailTemplateCategorySelectStringPostData, GameMailTemplateCategoryUpdatePostData, - PageTenantGameMailTemplateCategoryEntityRequest, - UpdateTenantGameMailTemplateCategoryEntityRequest, + PageGameMailTemplateCategoryEntityRequest, + UpdateGameMailTemplateCategoryEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameMailTemplateCategory { * @request POST:/api/gameMailTemplateCategory/add */ gameMailTemplateCategoryAddPost = ( - data: AddTenantGameMailTemplateCategoryEntityRequest, + data: AddGameMailTemplateCategoryEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameMailTemplateCategory { * @request POST:/api/gameMailTemplateCategory/page */ gameMailTemplateCategoryPagePost = ( - data: PageTenantGameMailTemplateCategoryEntityRequest, + data: PageGameMailTemplateCategoryEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameMailTemplateCategory { * @request POST:/api/gameMailTemplateCategory/update */ gameMailTemplateCategoryUpdatePost = ( - data: UpdateTenantGameMailTemplateCategoryEntityRequest, + data: UpdateGameMailTemplateCategoryEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/types.ts index b13e9ac9..300555a4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameMailTemplateCategory/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 邮件模板分类增加输入参数 */ -export interface AddTenantGameMailTemplateCategoryEntityRequest { +export interface AddGameMailTemplateCategoryEntityRequest { /** 主键Id */ id: string; /** @@ -75,7 +75,7 @@ export interface GameMailTemplateCategoryResponseSqlSugarPagedList { } /** 邮件模板分类分页查询输入参数 */ -export interface PageTenantGameMailTemplateCategoryEntityRequest { +export interface PageGameMailTemplateCategoryEntityRequest { searchKey?: string | null; /** * @format int32 @@ -98,7 +98,7 @@ export interface PageTenantGameMailTemplateCategoryEntityRequest { } /** 邮件模板分类更新输入参数 */ -export interface UpdateTenantGameMailTemplateCategoryEntityRequest { +export interface UpdateGameMailTemplateCategoryEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/index.ts index 0786ea80..e1d29fba 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/index.ts @@ -13,7 +13,7 @@ import { GameOnlineConfigRolloutPagePostData, GameOnlineConfigRolloutPublishPostData, GameOnlineConfigRolloutRollbackPostData, - PageTenantGameOnlineConfigRolloutRequest, + PageGameOnlineConfigRolloutRequest, PublishConfigRolloutRequest, RollbackConfigRolloutRequest, } from "./types"; @@ -36,7 +36,7 @@ export class GameOnlineConfigRollout { * @request POST:/api/gameOnlineConfigRollout/page */ gameOnlineConfigRolloutPagePost = ( - data: PageTenantGameOnlineConfigRolloutRequest, + data: PageGameOnlineConfigRolloutRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/types.ts index 16c3248e..e1b27882 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlineConfigRollout/types.ts @@ -81,7 +81,7 @@ export interface GameOnlineConfigRolloutResponseSqlSugarPagedList { } /** 配置灰度版本行分页查询输入(来源 change C343 / vault:C8 S7.7)。 */ -export interface PageTenantGameOnlineConfigRolloutRequest { +export interface PageGameOnlineConfigRolloutRequest { searchKey?: string | null; /** * @format int32 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/index.ts index 0da71d13..b6dba907 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/index.ts @@ -10,16 +10,16 @@ */ import { - AddTenantGameOnlinePlayerSegmentRequest, + AddGameOnlinePlayerSegmentRequest, GameOnlinePlayerSegmentAddPostData, GameOnlinePlayerSegmentDeletePostData, GameOnlinePlayerSegmentDetailGetData, GameOnlinePlayerSegmentPagePostData, GameOnlinePlayerSegmentSyncOnlinePostData, GameOnlinePlayerSegmentUpdatePostData, - PageTenantGameOnlinePlayerSegmentRequest, + PageGameOnlinePlayerSegmentRequest, SyncPlayerSegmentOnlineRequest, - UpdateTenantGameOnlinePlayerSegmentRequest, + UpdateGameOnlinePlayerSegmentRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class GameOnlinePlayerSegment { * @request POST:/api/gameOnlinePlayerSegment/add */ gameOnlinePlayerSegmentAddPost = ( - data: AddTenantGameOnlinePlayerSegmentRequest, + data: AddGameOnlinePlayerSegmentRequest, params: RequestParams = {}, ) => this.http.request({ @@ -108,7 +108,7 @@ export class GameOnlinePlayerSegment { * @request POST:/api/gameOnlinePlayerSegment/page */ gameOnlinePlayerSegmentPagePost = ( - data: PageTenantGameOnlinePlayerSegmentRequest, + data: PageGameOnlinePlayerSegmentRequest, params: RequestParams = {}, ) => this.http.request({ @@ -148,7 +148,7 @@ export class GameOnlinePlayerSegment { * @request POST:/api/gameOnlinePlayerSegment/update */ gameOnlinePlayerSegmentUpdatePost = ( - data: UpdateTenantGameOnlinePlayerSegmentRequest, + data: UpdateGameOnlinePlayerSegmentRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/types.ts index 083da55d..dd62e21a 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOnlinePlayerSegment/types.ts @@ -12,7 +12,7 @@ export enum OnlinePlayerSegmentSyncStatus { } /** 新增玩家分群输入。 */ -export interface AddTenantGameOnlinePlayerSegmentRequest { +export interface AddGameOnlinePlayerSegmentRequest { /** * @min 1 * @max 9223372036854776000 @@ -90,7 +90,7 @@ export interface GameOnlinePlayerSegmentResponseSqlSugarPagedList { } /** 玩家分群分页查询输入。 */ -export interface PageTenantGameOnlinePlayerSegmentRequest { +export interface PageGameOnlinePlayerSegmentRequest { searchKey?: string | null; /** * @format int32 @@ -150,7 +150,7 @@ export interface SyncPlayerSegmentOnlineResponse { } /** 更新玩家分群输入(编辑定义后须重新 syncOnline 生效)。 */ -export interface UpdateTenantGameOnlinePlayerSegmentRequest { +export interface UpdateGameOnlinePlayerSegmentRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/index.ts index 3942c100..0afe9c58 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameOrderEntityRequest, + AddGameOrderEntityRequest, GameOrderAddPostData, GameOrderDeletePostData, GameOrderDetailGetData, @@ -18,8 +18,8 @@ import { GameOrderSendPostData, GameOrderSummaryPostData, GameOrderUpdatePostData, - PageTenantGameOrderEntityRequest, - UpdateTenantGameOrderEntityRequest, + PageGameOrderEntityRequest, + UpdateGameOrderEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class GameOrder { * @request POST:/api/gameOrder/add */ gameOrderAddPost = ( - data: AddTenantGameOrderEntityRequest, + data: AddGameOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -105,7 +105,7 @@ export class GameOrder { * @request POST:/api/gameOrder/page */ gameOrderPagePost = ( - data: PageTenantGameOrderEntityRequest, + data: PageGameOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -125,7 +125,7 @@ export class GameOrder { * @request POST:/api/gameOrder/send */ gameOrderSendPost = ( - data: AddTenantGameOrderEntityRequest, + data: AddGameOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -144,7 +144,7 @@ export class GameOrder { * @request POST:/api/gameOrder/summary */ gameOrderSummaryPost = ( - data: PageTenantGameOrderEntityRequest, + data: PageGameOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -164,7 +164,7 @@ export class GameOrder { * @request POST:/api/gameOrder/update */ gameOrderUpdatePost = ( - data: UpdateTenantGameOrderEntityRequest, + data: UpdateGameOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/types.ts index eb422362..de13750c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOrder/types.ts @@ -24,7 +24,7 @@ export enum OrderStatusEnum { } /** 游戏支付订单增加输入参数 */ -export interface AddTenantGameOrderEntityRequest { +export interface AddGameOrderEntityRequest { /** 主键Id */ id: string; } @@ -176,7 +176,7 @@ export interface GameOrderSummaryResponse { } /** 游戏支付订单分页查询输入参数 */ -export interface PageTenantGameOrderEntityRequest { +export interface PageGameOrderEntityRequest { searchKey?: string | null; /** * @format int32 @@ -230,7 +230,7 @@ export interface PageTenantGameOrderEntityRequest { } /** 游戏支付订单更新输入参数 */ -export interface UpdateTenantGameOrderEntityRequest { +export interface UpdateGameOrderEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/index.ts index 287c1aab..587cac17 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/index.ts @@ -20,8 +20,8 @@ import { GameOrderFulfillmentRefundPostData, GameOrderFulfillmentResendPostData, GameOrderFulfillmentUpdatePostData, - PageTenantGameOrderFulfillmentEntityRequest, - UpdateTenantGameOrderFulfillmentEntityRequest, + PageGameOrderFulfillmentEntityRequest, + UpdateGameOrderFulfillmentEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -130,7 +130,7 @@ export class GameOrderFulfillment { * @request POST:/api/gameOrderFulfillment/export */ gameOrderFulfillmentExportPost = ( - data: PageTenantGameOrderFulfillmentEntityRequest, + data: PageGameOrderFulfillmentEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -150,7 +150,7 @@ export class GameOrderFulfillment { * @request POST:/api/gameOrderFulfillment/page */ gameOrderFulfillmentPagePost = ( - data: PageTenantGameOrderFulfillmentEntityRequest, + data: PageGameOrderFulfillmentEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -210,7 +210,7 @@ export class GameOrderFulfillment { * @request POST:/api/gameOrderFulfillment/update */ gameOrderFulfillmentUpdatePost = ( - data: UpdateTenantGameOrderFulfillmentEntityRequest, + data: UpdateGameOrderFulfillmentEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/types.ts index 1fff939e..99af781a 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameOrderFulfillment/types.ts @@ -55,7 +55,7 @@ export interface FulfillmentActionResponse { export interface GameOrderFulfillmentResponse { /** Id */ id?: string; - /** 来源订单 Id(TenantGameOrderEntity.Id)。 */ + /** 来源订单 Id(GameOrderEntity.Id)。 */ orderId?: string; /** 支付渠道/Provider(alipay/apple/google/xsolla),来自订单。 */ payChannel?: string | null; @@ -122,7 +122,7 @@ export interface GameOrderFulfillmentResponseSqlSugarPagedList { } /** 权益发货账本分页查询输入参数(C120)。过滤字段严格锁定见 change C120 §3 BuildPageQuery 表。 */ -export interface PageTenantGameOrderFulfillmentEntityRequest { +export interface PageGameOrderFulfillmentEntityRequest { searchKey?: string | null; /** * @format int32 @@ -166,7 +166,7 @@ export interface PageTenantGameOrderFulfillmentEntityRequest { * 权益发货账本更新输入参数(C120)。仅满足 GenericCrudService 的 TUpdateRequest 泛型约束; * UpdateAsync 端点已由 OnUpdatingAsync 抛错关闭(账本为事实数据,不支持修改)。 */ -export interface UpdateTenantGameOrderFulfillmentEntityRequest { +export interface UpdateGameOrderFulfillmentEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/index.ts index d406cac6..68ca4acf 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGamePenaltyEntityRequest, + AddGamePenaltyEntityRequest, GamePenaltyAddPostData, GamePenaltyDeletePostData, GamePenaltyDetailGetData, @@ -18,10 +18,10 @@ import { GamePenaltyRevokePostData, GamePenaltySyncOnlineRuntimePostData, GamePenaltyUpdatePostData, - PageTenantGamePenaltyEntityRequest, - RevokeTenantGamePenaltyEntityRequest, - SyncOnlineRuntimeTenantGamePenaltyRequest, - UpdateTenantGamePenaltyEntityRequest, + PageGamePenaltyEntityRequest, + RevokeGamePenaltyEntityRequest, + SyncOnlineRuntimeGamePenaltyRequest, + UpdateGamePenaltyEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -45,7 +45,7 @@ export class GamePenalty { * @request POST:/api/gamePenalty/add */ gamePenaltyAddPost = ( - data: AddTenantGamePenaltyEntityRequest, + data: AddGamePenaltyEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -110,7 +110,7 @@ export class GamePenalty { * @request POST:/api/gamePenalty/page */ gamePenaltyPagePost = ( - data: PageTenantGamePenaltyEntityRequest, + data: PageGamePenaltyEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -130,7 +130,7 @@ export class GamePenalty { * @request POST:/api/gamePenalty/revoke */ gamePenaltyRevokePost = ( - data: RevokeTenantGamePenaltyEntityRequest, + data: RevokeGamePenaltyEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -149,7 +149,7 @@ export class GamePenalty { * @request POST:/api/gamePenalty/syncOnlineRuntime */ gamePenaltySyncOnlineRuntimePost = ( - data: SyncOnlineRuntimeTenantGamePenaltyRequest, + data: SyncOnlineRuntimeGamePenaltyRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GamePenalty { * @request POST:/api/gamePenalty/update */ gamePenaltyUpdatePost = ( - data: UpdateTenantGamePenaltyEntityRequest, + data: UpdateGamePenaltyEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/types.ts index 9203e48d..d523c0f2 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gamePenalty/types.ts @@ -28,7 +28,7 @@ export enum PenaltyActionTypeEnum { } /** 处罚新增输入参数。审计字段(Status / OperatorId / RevokeAsync*)由服务端强制写入,不在此暴露。 */ -export interface AddTenantGamePenaltyEntityRequest { +export interface AddGamePenaltyEntityRequest { /** 区服作用域。null = 全区服生效。 */ areaId?: string | null; targetType: PenaltyTargetTypeEnum; @@ -122,7 +122,7 @@ export interface GamePenaltyResponseSqlSugarPagedList { } /** 处罚分页查询输入参数。 */ -export interface PageTenantGamePenaltyEntityRequest { +export interface PageGamePenaltyEntityRequest { searchKey?: string | null; /** * @format int32 @@ -146,7 +146,7 @@ export interface PageTenantGamePenaltyEntityRequest { } /** 撤销处罚输入参数。 */ -export interface RevokeTenantGamePenaltyEntityRequest { +export interface RevokeGamePenaltyEntityRequest { /** * 处罚 Id。 * @min 1 @@ -162,7 +162,7 @@ export interface RevokeTenantGamePenaltyEntityRequest { } /** 处罚同步 Online 运行时输入参数(联动命令按 ActionType 服务端推导,不暴露给请求体)。 */ -export interface SyncOnlineRuntimeTenantGamePenaltyRequest { +export interface SyncOnlineRuntimeGamePenaltyRequest { /** * 处罚事实源行 Id(必须处于生效中)。 * @min 1 @@ -172,7 +172,7 @@ export interface SyncOnlineRuntimeTenantGamePenaltyRequest { } /** 处罚更新输入参数。处罚为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。 */ -export interface UpdateTenantGamePenaltyEntityRequest { +export interface UpdateGamePenaltyEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/index.ts index 52a0e5c5..be66ac18 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/index.ts @@ -10,16 +10,16 @@ */ import { - AddTenantGamePenaltyAppealEntityRequest, + AddGamePenaltyAppealEntityRequest, GamePenaltyAppealAddPostData, GamePenaltyAppealDeletePostData, GamePenaltyAppealDetailGetData, GamePenaltyAppealPagePostData, GamePenaltyAppealReviewPostData, GamePenaltyAppealUpdatePostData, - PageTenantGamePenaltyAppealEntityRequest, - ReviewTenantGamePenaltyAppealEntityRequest, - UpdateTenantGamePenaltyAppealEntityRequest, + PageGamePenaltyAppealEntityRequest, + ReviewGamePenaltyAppealEntityRequest, + UpdateGamePenaltyAppealEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class GamePenaltyAppeal { * @request POST:/api/gamePenaltyAppeal/add */ gamePenaltyAppealAddPost = ( - data: AddTenantGamePenaltyAppealEntityRequest, + data: AddGamePenaltyAppealEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -108,7 +108,7 @@ export class GamePenaltyAppeal { * @request POST:/api/gamePenaltyAppeal/page */ gamePenaltyAppealPagePost = ( - data: PageTenantGamePenaltyAppealEntityRequest, + data: PageGamePenaltyAppealEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -128,7 +128,7 @@ export class GamePenaltyAppeal { * @request POST:/api/gamePenaltyAppeal/review */ gamePenaltyAppealReviewPost = ( - data: ReviewTenantGamePenaltyAppealEntityRequest, + data: ReviewGamePenaltyAppealEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -147,7 +147,7 @@ export class GamePenaltyAppeal { * @request POST:/api/gamePenaltyAppeal/update */ gamePenaltyAppealUpdatePost = ( - data: UpdateTenantGamePenaltyAppealEntityRequest, + data: UpdateGamePenaltyAppealEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/types.ts index a07cb6cf..ecb50ef4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gamePenaltyAppeal/types.ts @@ -12,7 +12,7 @@ export enum AppealStatusEnum { } /** 申诉新增输入参数。关联处罚由服务端验证。 */ -export interface AddTenantGamePenaltyAppealEntityRequest { +export interface AddGamePenaltyAppealEntityRequest { /** * 关联处罚 Id(必须为生效中处罚)。 * @min 1 @@ -37,7 +37,7 @@ export interface AddTenantGamePenaltyAppealEntityRequest { export interface GamePenaltyAppealResponse { /** Id */ id?: string; - /** 关联处罚 Id(TenantGamePenaltyEntity.Id)。 */ + /** 关联处罚 Id(GamePenaltyEntity.Id)。 */ penaltyId?: string; /** 申诉人 = 被处罚账号 UserId。 */ appellantId?: string; @@ -88,7 +88,7 @@ export interface GamePenaltyAppealResponseSqlSugarPagedList { } /** 申诉分页查询输入参数。 */ -export interface PageTenantGamePenaltyAppealEntityRequest { +export interface PageGamePenaltyAppealEntityRequest { searchKey?: string | null; /** * @format int32 @@ -110,7 +110,7 @@ export interface PageTenantGamePenaltyAppealEntityRequest { } /** 申诉审核输入参数。Approve=true 通过(同步撤销关联处罚);Approve=false 驳回。 */ -export interface ReviewTenantGamePenaltyAppealEntityRequest { +export interface ReviewGamePenaltyAppealEntityRequest { /** * 申诉 Id。 * @min 1 @@ -127,7 +127,7 @@ export interface ReviewTenantGamePenaltyAppealEntityRequest { } /** 申诉更新输入参数。申诉为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。 */ -export interface UpdateTenantGamePenaltyAppealEntityRequest { +export interface UpdateGamePenaltyAppealEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/index.ts index 91c043e8..d3e0e8fd 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/index.ts @@ -10,14 +10,14 @@ */ import { - AddTenantGameRedeemCodeEntityRequest, + AddGameRedeemCodeEntityRequest, GameRedeemCodeAddPostData, GameRedeemCodeDeletePostData, GameRedeemCodeDetailGetData, GameRedeemCodePagePostData, GameRedeemCodeUpdatePostData, - PageTenantGameRedeemCodeEntityRequest, - UpdateTenantGameRedeemCodeEntityRequest, + PageGameRedeemCodeEntityRequest, + UpdateGameRedeemCodeEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -41,7 +41,7 @@ export class GameRedeemCode { * @request POST:/api/gameRedeemCode/add */ gameRedeemCodeAddPost = ( - data: AddTenantGameRedeemCodeEntityRequest, + data: AddGameRedeemCodeEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -106,7 +106,7 @@ export class GameRedeemCode { * @request POST:/api/gameRedeemCode/page */ gameRedeemCodePagePost = ( - data: PageTenantGameRedeemCodeEntityRequest, + data: PageGameRedeemCodeEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -126,7 +126,7 @@ export class GameRedeemCode { * @request POST:/api/gameRedeemCode/update */ gameRedeemCodeUpdatePost = ( - data: UpdateTenantGameRedeemCodeEntityRequest, + data: UpdateGameRedeemCodeEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/types.ts index 26e9326a..d6a91254 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCode/types.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /** 兑换码增加输入参数 */ -export interface AddTenantGameRedeemCodeEntityRequest { +export interface AddGameRedeemCodeEntityRequest { /** 主键Id */ id: string; /** 区服ID */ @@ -119,7 +119,7 @@ export interface GameRedeemCodeResponseSqlSugarPagedList { } /** 兑换码分页查询输入参数 */ -export interface PageTenantGameRedeemCodeEntityRequest { +export interface PageGameRedeemCodeEntityRequest { searchKey?: string | null; /** * @format int32 @@ -155,7 +155,7 @@ export interface PageTenantGameRedeemCodeEntityRequest { } /** 兑换码更新输入参数 */ -export interface UpdateTenantGameRedeemCodeEntityRequest { +export interface UpdateGameRedeemCodeEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/index.ts index c4fc3c7a..e06dba59 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameRedeemCodeChannelEntityRequest, + AddGameRedeemCodeChannelEntityRequest, GameRedeemCodeChannelAddPostData, GameRedeemCodeChannelDeletePostData, GameRedeemCodeChannelDetailGetData, @@ -18,8 +18,8 @@ import { GameRedeemCodeChannelSelectPostData, GameRedeemCodeChannelSelectStringPostData, GameRedeemCodeChannelUpdatePostData, - PageTenantGameRedeemCodeChannelEntityRequest, - UpdateTenantGameRedeemCodeChannelEntityRequest, + PageGameRedeemCodeChannelEntityRequest, + UpdateGameRedeemCodeChannelEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameRedeemCodeChannel { * @request POST:/api/gameRedeemCodeChannel/add */ gameRedeemCodeChannelAddPost = ( - data: AddTenantGameRedeemCodeChannelEntityRequest, + data: AddGameRedeemCodeChannelEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameRedeemCodeChannel { * @request POST:/api/gameRedeemCodeChannel/page */ gameRedeemCodeChannelPagePost = ( - data: PageTenantGameRedeemCodeChannelEntityRequest, + data: PageGameRedeemCodeChannelEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameRedeemCodeChannel { * @request POST:/api/gameRedeemCodeChannel/update */ gameRedeemCodeChannelUpdatePost = ( - data: UpdateTenantGameRedeemCodeChannelEntityRequest, + data: UpdateGameRedeemCodeChannelEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/types.ts index a3d557c8..15e210b3 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeChannel/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 兑换码渠道增加输入参数 */ -export interface AddTenantGameRedeemCodeChannelEntityRequest { +export interface AddGameRedeemCodeChannelEntityRequest { /** 主键Id */ id: string; /** @@ -74,7 +74,7 @@ export interface GameRedeemCodeChannelResponseSqlSugarPagedList { } /** 兑换码渠道分页查询输入参数 */ -export interface PageTenantGameRedeemCodeChannelEntityRequest { +export interface PageGameRedeemCodeChannelEntityRequest { searchKey?: string | null; /** * @format int32 @@ -95,7 +95,7 @@ export interface PageTenantGameRedeemCodeChannelEntityRequest { } /** 兑换码渠道更新输入参数 */ -export interface UpdateTenantGameRedeemCodeChannelEntityRequest { +export interface UpdateGameRedeemCodeChannelEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/index.ts index d6e608bf..b68d09f2 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/index.ts @@ -10,15 +10,15 @@ */ import { - AddTenantGameRedeemCodeUseRecordEntityRequest, + AddGameRedeemCodeUseRecordEntityRequest, GameRedeemCodeUseRecordAddPostData, GameRedeemCodeUseRecordDeletePostData, GameRedeemCodeUseRecordDetailGetData, + GameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGetData, GameRedeemCodeUseRecordPagePostData, - GameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGetData, GameRedeemCodeUseRecordUpdatePostData, - PageTenantGameRedeemCodeUseRecordEntityRequest, - UpdateTenantGameRedeemCodeUseRecordEntityRequest, + PageGameRedeemCodeUseRecordEntityRequest, + UpdateGameRedeemCodeUseRecordEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -42,7 +42,7 @@ export class GameRedeemCodeUseRecord { * @request POST:/api/gameRedeemCodeUseRecord/add */ gameRedeemCodeUseRecordAddPost = ( - data: AddTenantGameRedeemCodeUseRecordEntityRequest, + data: AddGameRedeemCodeUseRecordEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -102,19 +102,19 @@ export class GameRedeemCodeUseRecord { * No description * * @tags gameRedeemCodeUseRecord - * @name GameRedeemCodeUseRecordPagePost - * @summary 分页查询 - * @request POST:/api/gameRedeemCodeUseRecord/page + * @name GameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGet + * @summary 获取区服下拉列表(AreaId 外键关联) + * @request GET:/api/gameRedeemCodeUseRecord/gameAreaEntityAreaIdDropdown */ - gameRedeemCodeUseRecordPagePost = ( - data: PageTenantGameRedeemCodeUseRecordEntityRequest, + gameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGet = ( params: RequestParams = {}, ) => - this.http.request({ - path: `/api/gameRedeemCodeUseRecord/page`, - method: "POST", - body: data, - type: ContentType.Json, + this.http.request< + GameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGetData, + any + >({ + path: `/api/gameRedeemCodeUseRecord/gameAreaEntityAreaIdDropdown`, + method: "GET", format: "json", ...params, }); @@ -122,19 +122,19 @@ export class GameRedeemCodeUseRecord { * No description * * @tags gameRedeemCodeUseRecord - * @name GameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGet - * @summary 获取区服下拉列表(AreaId 外键关联) - * @request GET:/api/gameRedeemCodeUseRecord/tenantGameAreaEntityAreaIdDropdown + * @name GameRedeemCodeUseRecordPagePost + * @summary 分页查询 + * @request POST:/api/gameRedeemCodeUseRecord/page */ - gameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGet = ( + gameRedeemCodeUseRecordPagePost = ( + data: PageGameRedeemCodeUseRecordEntityRequest, params: RequestParams = {}, ) => - this.http.request< - GameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGetData, - any - >({ - path: `/api/gameRedeemCodeUseRecord/tenantGameAreaEntityAreaIdDropdown`, - method: "GET", + this.http.request({ + path: `/api/gameRedeemCodeUseRecord/page`, + method: "POST", + body: data, + type: ContentType.Json, format: "json", ...params, }); @@ -147,7 +147,7 @@ export class GameRedeemCodeUseRecord { * @request POST:/api/gameRedeemCodeUseRecord/update */ gameRedeemCodeUseRecordUpdatePost = ( - data: UpdateTenantGameRedeemCodeUseRecordEntityRequest, + data: UpdateGameRedeemCodeUseRecordEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -162,6 +162,6 @@ export class GameRedeemCodeUseRecord { export const gameRedeemCodeUseRecordAddPost = (...args: Parameters['gameRedeemCodeUseRecordAddPost']>) => getAPI(GameRedeemCodeUseRecord).gameRedeemCodeUseRecordAddPost(...args); export const gameRedeemCodeUseRecordDeletePost = (...args: Parameters['gameRedeemCodeUseRecordDeletePost']>) => getAPI(GameRedeemCodeUseRecord).gameRedeemCodeUseRecordDeletePost(...args); export const gameRedeemCodeUseRecordDetailGet = (...args: Parameters['gameRedeemCodeUseRecordDetailGet']>) => getAPI(GameRedeemCodeUseRecord).gameRedeemCodeUseRecordDetailGet(...args); +export const gameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGet = (...args: Parameters['gameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGet']>) => getAPI(GameRedeemCodeUseRecord).gameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGet(...args); export const gameRedeemCodeUseRecordPagePost = (...args: Parameters['gameRedeemCodeUseRecordPagePost']>) => getAPI(GameRedeemCodeUseRecord).gameRedeemCodeUseRecordPagePost(...args); -export const gameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGet = (...args: Parameters['gameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGet']>) => getAPI(GameRedeemCodeUseRecord).gameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGet(...args); export const gameRedeemCodeUseRecordUpdatePost = (...args: Parameters['gameRedeemCodeUseRecordUpdatePost']>) => getAPI(GameRedeemCodeUseRecord).gameRedeemCodeUseRecordUpdatePost(...args); diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/types.ts index b32290b6..8bc5421c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRedeemCodeUseRecord/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse } from "../_shared/data-contracts"; /** 兑换记录增加输入参数 */ -export interface AddTenantGameRedeemCodeUseRecordEntityRequest { +export interface AddGameRedeemCodeUseRecordEntityRequest { /** 主键Id */ id: string; } @@ -39,9 +39,9 @@ export interface GameRedeemCodeUseRecordResponse { rowVersion?: string | null; /** 角色ID */ playerIdString?: string | null; - /** 兑换码渠道/分组ID(来自关联的 TenantGameRedeemCodeEntity.ChannelId) */ + /** 兑换码渠道/分组ID(来自关联的 GameRedeemCodeEntity.ChannelId) */ channelId?: string | null; - /** 兑换码渠道/分组名称(来自关联的 TenantGameRedeemCodeChannelEntity.Name) */ + /** 兑换码渠道/分组名称(来自关联的 GameRedeemCodeChannelEntity.Name) */ channelName?: string | null; } @@ -60,7 +60,7 @@ export interface GameRedeemCodeUseRecordResponseSqlSugarPagedList { } /** 兑换记录分页查询输入参数 */ -export interface PageTenantGameRedeemCodeUseRecordEntityRequest { +export interface PageGameRedeemCodeUseRecordEntityRequest { searchKey?: string | null; /** * @format int32 @@ -81,12 +81,12 @@ export interface PageTenantGameRedeemCodeUseRecordEntityRequest { code?: string | null; /** 角色ID */ playerId?: string | null; - /** 兑换码渠道/分组ID(关联 TenantGameRedeemCodeEntity.ChannelId 过滤) */ + /** 兑换码渠道/分组ID(关联 GameRedeemCodeEntity.ChannelId 过滤) */ channelId?: string | null; } /** 兑换记录更新输入参数 */ -export interface UpdateTenantGameRedeemCodeUseRecordEntityRequest { +export interface UpdateGameRedeemCodeUseRecordEntityRequest { /** * @min 1 * @max 9223372036854776000 @@ -149,7 +149,7 @@ export interface GameRedeemCodeUseRecordDetailGetData { extras: object | null; } -export interface GameRedeemCodeUseRecordPagePostData { +export interface GameRedeemCodeUseRecordGameAreaEntityAreaIdDropdownGetData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -157,7 +157,7 @@ export interface GameRedeemCodeUseRecordPagePostData { code: number; /** 错误或提示信息 */ message: string; - data: GameRedeemCodeUseRecordResponseSqlSugarPagedList; + data: BaseSelectPageResponse[]; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; /** 已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段 */ @@ -172,7 +172,7 @@ export interface GameRedeemCodeUseRecordPagePostData { extras: object | null; } -export interface GameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGetData { +export interface GameRedeemCodeUseRecordPagePostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -180,7 +180,7 @@ export interface GameRedeemCodeUseRecordTenantGameAreaEntityAreaIdDropdownGetDat code: number; /** 错误或提示信息 */ message: string; - data: BaseSelectPageResponse[]; + data: GameRedeemCodeUseRecordResponseSqlSugarPagedList; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; /** 已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameReport/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameReport/index.ts index 5bab14c3..112c5698 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameReport/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameReport/index.ts @@ -10,16 +10,16 @@ */ import { - AddTenantGameReportEntityRequest, + AddGameReportEntityRequest, GameReportAddPostData, GameReportDeletePostData, GameReportDetailGetData, GameReportLinkPenaltyPostData, GameReportPagePostData, GameReportUpdatePostData, - LinkPenaltyTenantGameReportEntityRequest, - PageTenantGameReportEntityRequest, - UpdateTenantGameReportEntityRequest, + LinkPenaltyGameReportEntityRequest, + PageGameReportEntityRequest, + UpdateGameReportEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -43,7 +43,7 @@ export class GameReport { * @request POST:/api/gameReport/add */ gameReportAddPost = ( - data: AddTenantGameReportEntityRequest, + data: AddGameReportEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -108,7 +108,7 @@ export class GameReport { * @request POST:/api/gameReport/linkPenalty */ gameReportLinkPenaltyPost = ( - data: LinkPenaltyTenantGameReportEntityRequest, + data: LinkPenaltyGameReportEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -127,7 +127,7 @@ export class GameReport { * @request POST:/api/gameReport/page */ gameReportPagePost = ( - data: PageTenantGameReportEntityRequest, + data: PageGameReportEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -147,7 +147,7 @@ export class GameReport { * @request POST:/api/gameReport/update */ gameReportUpdatePost = ( - data: UpdateTenantGameReportEntityRequest, + data: UpdateGameReportEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameReport/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameReport/types.ts index bcd56052..ba9e13a9 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameReport/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameReport/types.ts @@ -30,7 +30,7 @@ export enum ReportStatusEnum { } /** 举报新增输入参数。Status / HandlerId 服务端强制(Status=Pending,HandlerId=null)。 */ -export interface AddTenantGameReportEntityRequest { +export interface AddGameReportEntityRequest { /** * 举报人 UserId。 * @min 1 @@ -112,7 +112,7 @@ export interface GameReportResponseSqlSugarPagedList { } /** 举报关联处罚输入参数。仅 Confirmed 举报可关联;不自动创建处罚(创建走 GamePenaltyService.AddAsync)。 */ -export interface LinkPenaltyTenantGameReportEntityRequest { +export interface LinkPenaltyGameReportEntityRequest { /** * 举报 Id。 * @min 1 @@ -128,7 +128,7 @@ export interface LinkPenaltyTenantGameReportEntityRequest { } /** 举报分页查询输入参数。 */ -export interface PageTenantGameReportEntityRequest { +export interface PageGameReportEntityRequest { searchKey?: string | null; /** * @format int32 @@ -152,7 +152,7 @@ export interface PageTenantGameReportEntityRequest { } /** 举报更新输入参数。举报为事实源,不支持直接编辑;保留此类型仅为满足通用 CRUD 基类泛型约束。 */ -export interface UpdateTenantGameReportEntityRequest { +export interface UpdateGameReportEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/index.ts index 4c52ce83..ed97c992 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameRewardTemplateEntityRequest, + AddGameRewardTemplateEntityRequest, GameRewardTemplateAddPostData, GameRewardTemplateCopySnapshotPostData, GameRewardTemplateDeletePostData, @@ -20,8 +20,8 @@ import { GameRewardTemplateSelectStringPostData, GameRewardTemplateSnapshotRequest, GameRewardTemplateUpdatePostData, - PageTenantGameRewardTemplateEntityRequest, - UpdateTenantGameRewardTemplateEntityRequest, + PageGameRewardTemplateEntityRequest, + UpdateGameRewardTemplateEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -46,7 +46,7 @@ export class GameRewardTemplate { * @request POST:/api/gameRewardTemplate/add */ gameRewardTemplateAddPost = ( - data: AddTenantGameRewardTemplateEntityRequest, + data: AddGameRewardTemplateEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -131,7 +131,7 @@ export class GameRewardTemplate { * @request POST:/api/gameRewardTemplate/page */ gameRewardTemplatePagePost = ( - data: PageTenantGameRewardTemplateEntityRequest, + data: PageGameRewardTemplateEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -191,7 +191,7 @@ export class GameRewardTemplate { * @request POST:/api/gameRewardTemplate/update */ gameRewardTemplateUpdatePost = ( - data: UpdateTenantGameRewardTemplateEntityRequest, + data: UpdateGameRewardTemplateEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/types.ts index fe1d7f5c..a106ac6c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplate/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 奖励模板增加输入参数。 */ -export interface AddTenantGameRewardTemplateEntityRequest { +export interface AddGameRewardTemplateEntityRequest { /** * 名称。 * @minLength 1 @@ -118,7 +118,7 @@ export interface GameRewardTemplateSnapshotResponse { } /** 奖励模板分页查询输入参数。 */ -export interface PageTenantGameRewardTemplateEntityRequest { +export interface PageGameRewardTemplateEntityRequest { searchKey?: string | null; /** * @format int32 @@ -143,7 +143,7 @@ export interface PageTenantGameRewardTemplateEntityRequest { } /** 奖励模板更新输入参数。 */ -export interface UpdateTenantGameRewardTemplateEntityRequest { +export interface UpdateGameRewardTemplateEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/index.ts index 3ba1b2ab..ed259944 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameRewardTemplateGroupEntityRequest, + AddGameRewardTemplateGroupEntityRequest, GameRewardTemplateGroupAddPostData, GameRewardTemplateGroupDeletePostData, GameRewardTemplateGroupDetailGetData, @@ -18,8 +18,8 @@ import { GameRewardTemplateGroupSelectPostData, GameRewardTemplateGroupSelectStringPostData, GameRewardTemplateGroupUpdatePostData, - PageTenantGameRewardTemplateGroupEntityRequest, - UpdateTenantGameRewardTemplateGroupEntityRequest, + PageGameRewardTemplateGroupEntityRequest, + UpdateGameRewardTemplateGroupEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameRewardTemplateGroup { * @request POST:/api/gameRewardTemplateGroup/add */ gameRewardTemplateGroupAddPost = ( - data: AddTenantGameRewardTemplateGroupEntityRequest, + data: AddGameRewardTemplateGroupEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameRewardTemplateGroup { * @request POST:/api/gameRewardTemplateGroup/page */ gameRewardTemplateGroupPagePost = ( - data: PageTenantGameRewardTemplateGroupEntityRequest, + data: PageGameRewardTemplateGroupEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameRewardTemplateGroup { * @request POST:/api/gameRewardTemplateGroup/update */ gameRewardTemplateGroupUpdatePost = ( - data: UpdateTenantGameRewardTemplateGroupEntityRequest, + data: UpdateGameRewardTemplateGroupEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/types.ts index 425d5436..137b40b2 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRewardTemplateGroup/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 奖励模板分组增加输入参数。 */ -export interface AddTenantGameRewardTemplateGroupEntityRequest { +export interface AddGameRewardTemplateGroupEntityRequest { /** * 名称。 * @minLength 1 @@ -69,7 +69,7 @@ export interface GameRewardTemplateGroupResponseSqlSugarPagedList { } /** 奖励模板分组分页查询输入参数。 */ -export interface PageTenantGameRewardTemplateGroupEntityRequest { +export interface PageGameRewardTemplateGroupEntityRequest { searchKey?: string | null; /** * @format int32 @@ -92,7 +92,7 @@ export interface PageTenantGameRewardTemplateGroupEntityRequest { } /** 奖励模板分组更新输入参数。 */ -export interface UpdateTenantGameRewardTemplateGroupEntityRequest { +export interface UpdateGameRewardTemplateGroupEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRole/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRole/index.ts index d7208348..0c414ee5 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRole/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRole/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameRoleEntityRequest, + AddGameRoleEntityRequest, GameRoleAddPostData, GameRoleDeletePostData, GameRoleDetailGetData, @@ -21,8 +21,8 @@ import { GameRoleUpdatePostData, GameRoleUpdateToSandBoxPostData, GameRoleUpdateToUnSandBoxPostData, - PageTenantGameRoleEntityRequest, - UpdateTenantGameRoleEntityRequest, + PageGameRoleEntityRequest, + UpdateGameRoleEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -47,7 +47,7 @@ export class GameRole { * @request POST:/api/gameRole/add */ gameRoleAddPost = ( - data: AddTenantGameRoleEntityRequest, + data: AddGameRoleEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameRole { * @request POST:/api/gameRole/page */ gameRolePagePost = ( - data: PageTenantGameRoleEntityRequest, + data: PageGameRoleEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameRole { * @request POST:/api/gameRole/sync */ gameRoleSyncPost = ( - data: UpdateTenantGameRoleEntityRequest, + data: UpdateGameRoleEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -188,7 +188,7 @@ export class GameRole { * @request POST:/api/gameRole/update */ gameRoleUpdatePost = ( - data: UpdateTenantGameRoleEntityRequest, + data: UpdateGameRoleEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -207,7 +207,7 @@ export class GameRole { * @request POST:/api/gameRole/updateToSandBox */ gameRoleUpdateToSandBoxPost = ( - data: UpdateTenantGameRoleEntityRequest, + data: UpdateGameRoleEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -226,7 +226,7 @@ export class GameRole { * @request POST:/api/gameRole/updateToUnSandBox */ gameRoleUpdateToUnSandBoxPost = ( - data: UpdateTenantGameRoleEntityRequest, + data: UpdateGameRoleEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameRole/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameRole/types.ts index 3790face..dc4358c9 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameRole/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameRole/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 游戏角色增加输入参数 */ -export interface AddTenantGameRoleEntityRequest { +export interface AddGameRoleEntityRequest { /** 角色Id */ roleId?: string | null; /** 用户ID */ @@ -97,7 +97,7 @@ export interface GameRoleResponseSqlSugarPagedList { } /** 游戏角色分页查询输入参数 */ -export interface PageTenantGameRoleEntityRequest { +export interface PageGameRoleEntityRequest { searchKey?: string | null; /** * @format int32 @@ -144,7 +144,7 @@ export interface PageTenantGameRoleEntityRequest { } /** 游戏角色更新输入参数 */ -export interface UpdateTenantGameRoleEntityRequest { +export interface UpdateGameRoleEntityRequest { /** 用户ID */ userId?: string; /** 区服Id */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/index.ts index 79f5398d..d25aafd0 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameTimeJobEntityRequest, + AddGameTimeJobEntityRequest, GameTimeJobAddPostData, GameTimeJobDeletePostData, GameTimeJobDetailGetData, @@ -18,8 +18,8 @@ import { GameTimeJobSelectPostData, GameTimeJobSelectStringPostData, GameTimeJobUpdatePostData, - PageTenantGameTimeJobEntityRequest, - UpdateTenantGameTimeJobEntityRequest, + PageGameTimeJobEntityRequest, + UpdateGameTimeJobEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameTimeJob { * @request POST:/api/gameTimeJob/add */ gameTimeJobAddPost = ( - data: AddTenantGameTimeJobEntityRequest, + data: AddGameTimeJobEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameTimeJob { * @request POST:/api/gameTimeJob/page */ gameTimeJobPagePost = ( - data: PageTenantGameTimeJobEntityRequest, + data: PageGameTimeJobEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameTimeJob { * @request POST:/api/gameTimeJob/update */ gameTimeJobUpdatePost = ( - data: UpdateTenantGameTimeJobEntityRequest, + data: UpdateGameTimeJobEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/types.ts index 82c06554..3b86700d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameTimeJob/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse } from "../_shared/data-contracts"; /** 游戏定时任务增加输入参数 */ -export interface AddTenantGameTimeJobEntityRequest { +export interface AddGameTimeJobEntityRequest { /** 主键Id */ id: string; /** @@ -77,7 +77,7 @@ export interface GameTimeJobResponseSqlSugarPagedList { } /** 游戏定时任务分页查询输入参数 */ -export interface PageTenantGameTimeJobEntityRequest { +export interface PageGameTimeJobEntityRequest { searchKey?: string | null; /** * @format int32 @@ -98,7 +98,7 @@ export interface PageTenantGameTimeJobEntityRequest { } /** 游戏定时任务更新输入参数 */ -export interface UpdateTenantGameTimeJobEntityRequest { +export interface UpdateGameTimeJobEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameUser/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameUser/index.ts index 4a849d3a..711b952c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameUser/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameUser/index.ts @@ -10,8 +10,8 @@ */ import { - AddTenantGameUserEntityByMailRequest, - DeleteTenantGameUserEntityRequest, + AddGameUserEntityByMailRequest, + DeleteGameUserEntityRequest, GameUserAddByMailPostData, GameUserAddPostData, GameUserBanPostData, @@ -22,8 +22,8 @@ import { GameUserSelectStringPostData, GameUserUnsealPostData, GameUserUpdatePostData, - PageTenantGameUserEntityRequest, - UpdateTenantGameUserEntityRequest, + PageGameUserEntityRequest, + UpdateGameUserEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -48,7 +48,7 @@ export class GameUser { * @request POST:/api/gameUser/add */ gameUserAddPost = ( - data: AddTenantGameUserEntityByMailRequest, + data: AddGameUserEntityByMailRequest, params: RequestParams = {}, ) => this.http.request({ @@ -68,7 +68,7 @@ export class GameUser { * @request POST:/api/gameUser/addByMail */ gameUserAddByMailPost = ( - data: AddTenantGameUserEntityByMailRequest, + data: AddGameUserEntityByMailRequest, params: RequestParams = {}, ) => this.http.request({ @@ -88,7 +88,7 @@ export class GameUser { * @request POST:/api/gameUser/ban */ gameUserBanPost = ( - data: DeleteTenantGameUserEntityRequest, + data: DeleteGameUserEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -149,7 +149,7 @@ export class GameUser { * @request POST:/api/gameUser/page */ gameUserPagePost = ( - data: PageTenantGameUserEntityRequest, + data: PageGameUserEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -209,7 +209,7 @@ export class GameUser { * @request POST:/api/gameUser/unseal */ gameUserUnsealPost = ( - data: DeleteTenantGameUserEntityRequest, + data: DeleteGameUserEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -228,7 +228,7 @@ export class GameUser { * @request POST:/api/gameUser/update */ gameUserUpdatePost = ( - data: UpdateTenantGameUserEntityRequest, + data: UpdateGameUserEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameUser/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameUser/types.ts index 176ec27d..2aad2ce6 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameUser/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameUser/types.ts @@ -26,7 +26,7 @@ export enum GameUserStatus { } /** 根据邮箱添加账号 */ -export interface AddTenantGameUserEntityByMailRequest { +export interface AddGameUserEntityByMailRequest { /** 账号 */ userName?: string | null; /** 密码 */ @@ -53,7 +53,7 @@ export interface AddTenantGameUserEntityByMailRequest { } /** 游戏账号删除输入参数 */ -export interface DeleteTenantGameUserEntityRequest { +export interface DeleteGameUserEntityRequest { /** * @min 1 * @max 9223372036854776000 @@ -102,7 +102,7 @@ export interface GameUserResponseSqlSugarPagedList { } /** 游戏账号分页查询输入参数 */ -export interface PageTenantGameUserEntityRequest { +export interface PageGameUserEntityRequest { searchKey?: string | null; /** * @format int32 @@ -128,7 +128,7 @@ export interface PageTenantGameUserEntityRequest { } /** 游戏账号更新输入参数 */ -export interface UpdateTenantGameUserEntityRequest { +export interface UpdateGameUserEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/index.ts index 4178586b..6ce77139 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameWebShopEntityRequest, + AddGameWebShopEntityRequest, GameWebShopAddPostData, GameWebShopDeletePostData, GameWebShopDetailGetData, @@ -18,8 +18,8 @@ import { GameWebShopSelectPostData, GameWebShopSelectStringPostData, GameWebShopUpdatePostData, - PageTenantGameWebShopEntityRequest, - UpdateTenantGameWebShopEntityRequest, + PageGameWebShopEntityRequest, + UpdateGameWebShopEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class GameWebShop { * @request POST:/api/gameWebShop/add */ gameWebShopAddPost = ( - data: AddTenantGameWebShopEntityRequest, + data: AddGameWebShopEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class GameWebShop { * @request POST:/api/gameWebShop/page */ gameWebShopPagePost = ( - data: PageTenantGameWebShopEntityRequest, + data: PageGameWebShopEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -169,7 +169,7 @@ export class GameWebShop { * @request POST:/api/gameWebShop/update */ gameWebShopUpdatePost = ( - data: UpdateTenantGameWebShopEntityRequest, + data: UpdateGameWebShopEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/types.ts index c726a17c..a8d93a8c 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShop/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse, GameMailStatus, GameMailType } from "../_shared/data-contracts"; /** 游戏商城实体新增输入参数 */ -export interface AddTenantGameWebShopEntityRequest { +export interface AddGameWebShopEntityRequest { /** * 商品名称 * @minLength 1 @@ -108,7 +108,7 @@ export interface GameWebShopResponseSqlSugarPagedList { } /** 游戏邮件分页查询输入参数 */ -export interface PageTenantGameWebShopEntityRequest { +export interface PageGameWebShopEntityRequest { searchKey?: string | null; /** * @format int32 @@ -134,7 +134,7 @@ export interface PageTenantGameWebShopEntityRequest { } /** 游戏商城实体更新输入参数 */ -export interface UpdateTenantGameWebShopEntityRequest { +export interface UpdateGameWebShopEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/index.ts index 3d3afcaa..102b3f69 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantGameWebShopOrderEntityRequest, + AddGameWebShopOrderEntityRequest, GameWebShopOrderAddPostData, GameWebShopOrderDeletePostData, GameWebShopOrderDetailGetData, @@ -19,8 +19,8 @@ import { GameWebShopOrderSelectPostData, GameWebShopOrderSelectStringPostData, GameWebShopOrderUpdatePostData, - PageTenantGameWebShopOrderEntityRequest, - UpdateTenantGameWebShopOrderEntityRequest, + PageGameWebShopOrderEntityRequest, + UpdateGameWebShopOrderEntityRequest, } from "./types"; import { BaseDeleteRequest, @@ -46,7 +46,7 @@ export class GameWebShopOrder { * @request POST:/api/gameWebShopOrder/add */ gameWebShopOrderAddPost = ( - data: AddTenantGameWebShopOrderEntityRequest, + data: AddGameWebShopOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -111,7 +111,7 @@ export class GameWebShopOrder { * @request POST:/api/gameWebShopOrder/page */ gameWebShopOrderPagePost = ( - data: PageTenantGameWebShopOrderEntityRequest, + data: PageGameWebShopOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ @@ -190,7 +190,7 @@ export class GameWebShopOrder { * @request POST:/api/gameWebShopOrder/update */ gameWebShopOrderUpdatePost = ( - data: UpdateTenantGameWebShopOrderEntityRequest, + data: UpdateGameWebShopOrderEntityRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/types.ts index 64ecc909..c8063812 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameWebShopOrder/types.ts @@ -4,7 +4,7 @@ import type { BaseSelectPageResponse, BaseSelectPageStringResponse, GameMailStatus, GameMailType } from "../_shared/data-contracts"; /** 游戏商城订单实体新增输入参数 */ -export interface AddTenantGameWebShopOrderEntityRequest { +export interface AddGameWebShopOrderEntityRequest { /** * 商品名称 * @minLength 1 @@ -98,7 +98,7 @@ export interface GameWebShopOrderResponseSqlSugarPagedList { } /** 游戏邮件分页查询输入参数 */ -export interface PageTenantGameWebShopOrderEntityRequest { +export interface PageGameWebShopOrderEntityRequest { searchKey?: string | null; /** * @format int32 @@ -124,7 +124,7 @@ export interface PageTenantGameWebShopOrderEntityRequest { } /** 游戏商城订单实体更新输入参数 */ -export interface UpdateTenantGameWebShopOrderEntityRequest { +export interface UpdateGameWebShopOrderEntityRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/index.ts index 0c9d800d..54330f89 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/index.ts @@ -142,7 +142,7 @@ export class GlobalMenu { * * @tags globalMenu * @name GlobalMenuOwnMenuIdListGet - * @summary 获取当前用户已授权的菜单Id集合(缓存,含目录/菜单/按钮,来自 TenantRoleMenuEntity)。 供基于稳定身份(Key)的鉴权使用:M:GameFrameX.Core.Const.MenuSeed.StableSeedId.Menu(System.String) 由 Key 派生的 Id 与本集合比对。 + * @summary 获取当前用户已授权的菜单Id集合(缓存,含目录/菜单/按钮,来自 RoleMenuEntity)。 供基于稳定身份(Key)的鉴权使用:M:GameFrameX.Core.Const.MenuSeed.StableSeedId.Menu(System.String) 由 Key 派生的 Id 与本集合比对。 * @request GET:/api/globalMenu/ownMenuIdList */ globalMenuOwnMenuIdListGet = (params: RequestParams = {}) => diff --git a/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/types.ts index 7849421f..3fe210ad 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/globalMenu/types.ts @@ -11,15 +11,9 @@ export enum MenuTypeEnum { Button = 3, } -/** @format int32 */ -export enum MenuAppScopeEnum { - /** 控制台 */ - Console = 0, -} - /** * 新增/编辑菜单输入参数。 - * 显式声明前端表单可填字段,不再继承 GameFrameX.Entity.Global.GlobalMenuEntity,避免种子安全元数据(SuperAdminOnly、AllowTenantWhenSuperAdminOnly、Key)与子节点导航属性被前端批量赋值。 + * 显式声明前端表单可填字段,不再继承 GameFrameX.Entity.Global.GlobalMenuEntity,避免种子安全元数据(SuperAdminOnly、AllowAdminWhenSuperAdminOnly、Key)与子节点导航属性被前端批量赋值。 */ export interface AddMenuRequest { /** 主键Id(新增为 0,编辑由前端回填) */ @@ -146,8 +140,7 @@ export interface GlobalMenuResponse { /** 是否仅超管可见(种子元数据,DB 驱动授权读取) */ superAdminOnly?: boolean; /** 超管专属菜单下允许租户只读访问 */ - allowTenantWhenSuperAdminOnly?: boolean; - appScope?: MenuAppScopeEnum; + allowAdminWhenSuperAdminOnly?: boolean; /** 菜单子项 */ children?: GlobalMenuResponse[] | null; /** 是否启用 */ @@ -224,8 +217,6 @@ export interface SystemMenuMetaResponse { isAffix?: boolean; /** 菜单上下文:console。 */ menuContext?: string | null; - /** 菜单作用域:console。 */ - appScope?: string | null; } export interface UpdateMenuRequest { diff --git a/GameFrameX.Admin.Unified.Vue/src/api/logDiff/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/logDiff/types.ts index f3e793fb..4630a792 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/logDiff/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/logDiff/types.ts @@ -51,7 +51,6 @@ export interface LogDiffFields { rowVersion?: string | null; /** 是否启用,true:启用,false:禁用,null:未设置(启用) */ isEnabled?: boolean | null; - tenantId?: string | null; beforeData?: string | null; afterData?: string | null; snapshot?: string | null; diff --git a/GameFrameX.Admin.Unified.Vue/src/api/logVisit/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/logVisit/types.ts index ad07f5e2..95f19052 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/logVisit/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/logVisit/types.ts @@ -53,7 +53,6 @@ export interface LogVisitFields { rowVersion?: string | null; /** 是否启用,true:启用,false:禁用,null:未设置(启用) */ isEnabled?: boolean | null; - tenantId?: string | null; controllerName?: string | null; actionName?: string | null; displayTitle?: string | null; diff --git a/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/index.ts index 86ea3f27..2a1bf7dc 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/index.ts @@ -10,7 +10,7 @@ */ import { - AddTenantObjectStorageConfigRequest, + AddObjectStorageConfigRequest, ObjectStorageConfigAddPostData, ObjectStorageConfigDeletePostData, ObjectStorageConfigDetailGetData, @@ -19,8 +19,8 @@ import { ObjectStorageConfigSchemaGetData, ObjectStorageConfigTestConnectionGetData, ObjectStorageConfigUpdatePostData, - PageTenantObjectStorageConfigRequest, - UpdateTenantObjectStorageConfigRequest, + PageObjectStorageConfigRequest, + UpdateObjectStorageConfigRequest, } from "./types"; import { BaseDeleteRequest, @@ -44,7 +44,7 @@ export class ObjectStorageConfig { * @request POST:/api/objectStorageConfig/add */ objectStorageConfigAddPost = ( - data: AddTenantObjectStorageConfigRequest, + data: AddObjectStorageConfigRequest, params: RequestParams = {}, ) => this.http.request({ @@ -109,7 +109,7 @@ export class ObjectStorageConfig { * @request POST:/api/objectStorageConfig/page */ objectStorageConfigPagePost = ( - data: PageTenantObjectStorageConfigRequest, + data: PageObjectStorageConfigRequest, params: RequestParams = {}, ) => this.http.request({ @@ -191,7 +191,7 @@ export class ObjectStorageConfig { * @request POST:/api/objectStorageConfig/update */ objectStorageConfigUpdatePost = ( - data: UpdateTenantObjectStorageConfigRequest, + data: UpdateObjectStorageConfigRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/types.ts index 059d0971..6a73baec 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/types.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /** 新增租户对象存储配置入参。 */ -export interface AddTenantObjectStorageConfigRequest { +export interface AddObjectStorageConfigRequest { /** 存储提供商名称(local / aliyun / tencent-cos / qiniu)。 */ provider?: string | null; /** 对象键路径模板。 */ @@ -92,7 +92,7 @@ export interface ObjectStorageProviderItem { } /** 租户对象存储配置分页查询入参。 */ -export interface PageTenantObjectStorageConfigRequest { +export interface PageObjectStorageConfigRequest { searchKey?: string | null; /** * @format int32 @@ -115,7 +115,7 @@ export interface PageTenantObjectStorageConfigRequest { } /** 更新租户对象存储配置入参。Provider 必须与既有记录一致。 */ -export interface UpdateTenantObjectStorageConfigRequest { +export interface UpdateObjectStorageConfigRequest { /** * @min 1 * @max 9223372036854776000 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineControlledCommand/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineControlledCommand/types.ts index 1ac10fe1..f8461133 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineControlledCommand/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineControlledCommand/types.ts @@ -62,7 +62,7 @@ export interface OnlineControlledCommandAckResponse { /** * 受控操作命令输入参数(高危端点;change C344 / vault:C9 S8.1)。 * - * 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 TenantAdmin),`Reason` 与 + * 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 Admin),`Reason` 与 * `ReviewerOperatorId` 对全部四命令必填——双人复核字段落地 vault「审批(如需)」,不做通用审批流。 * 目标标识按命令取值:CancelTicket → TicketId;EndAbnormalMatch → MatchId;SuspendResumePlayer / MatchIsolation → PlayerId。 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlinePenaltyLinkCommand/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlinePenaltyLinkCommand/types.ts index 8fb7e518..57f5cdda 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlinePenaltyLinkCommand/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlinePenaltyLinkCommand/types.ts @@ -4,7 +4,7 @@ import type { OnlinePenaltyCommandKind, OnlinePenaltyLinkResponse } from "../_shared/data-contracts"; /** - * 处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。 + * 处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 Admin)。 * * 作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/platformPasswordPolicyConfig/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/platformPasswordPolicyConfig/index.ts index 8f9f897e..64d15b75 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/platformPasswordPolicyConfig/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/platformPasswordPolicyConfig/index.ts @@ -44,7 +44,7 @@ export class PlatformPasswordPolicyConfig { * * @tags platformPasswordPolicyConfig * @name PlatformPasswordPolicyConfigUpdatePost - * @summary 保存平台密码策略配置。CAS 乐观锁冲突重试;成功后刷新同 Host 快照并镜像同步 CryptogramUtility 密码策略静态属性, 后续 TenantUserService.ChangePwdAsync 立即按新规则校验。 + * @summary 保存平台密码策略配置。CAS 乐观锁冲突重试;成功后刷新同 Host 快照并镜像同步 CryptogramUtility 密码策略静态属性, 后续 UserService.ChangePwdAsync 立即按新规则校验。 * @request POST:/api/platformPasswordPolicyConfig/update */ platformPasswordPolicyConfigUpdatePost = ( diff --git a/GameFrameX.Admin.Unified.Vue/src/api/role/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/role/index.ts new file mode 100644 index 00000000..b82d7d48 --- /dev/null +++ b/GameFrameX.Admin.Unified.Vue/src/api/role/index.ts @@ -0,0 +1,188 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { + AddRoleRequest, + DeleteRoleRequest, + PageRoleRequest, + RoleAddPostData, + RoleDeletePostData, + RoleGrantMenuPostData, + RoleListGetData, + RoleMenuRequest, + RoleOwnMenuListGetData, + RolePagePostData, + RoleRequest, + RoleSetStatusPostData, + RoleUpdatePostData, + UpdateRoleRequest, +} from "./types"; +import { ContentType, HttpClient, RequestParams } from "../_shared/http-client"; +import {getAPI} from "../../utils/axiosUtils"; + +export class Role { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags role + * @name RoleAddPost + * @summary 增加角色 + * @request POST:/api/role/add + */ + roleAddPost = (data: AddRoleRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/role/add`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags role + * @name RoleDeletePost + * @summary 删除角色 + * @request POST:/api/role/delete + */ + roleDeletePost = (data: DeleteRoleRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/role/delete`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags role + * @name RoleGrantMenuPost + * @summary 授权角色菜单 + * @request POST:/api/role/grantMenu + */ + roleGrantMenuPost = (data: RoleMenuRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/role/grantMenu`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags role + * @name RoleListGet + * @summary 获取角色列表 + * @request GET:/api/role/list + */ + roleListGet = (params: RequestParams = {}) => + this.http.request({ + path: `/api/role/list`, + method: "GET", + format: "json", + ...params, + }); + /** + * No description + * + * @tags role + * @name RoleOwnMenuListGet + * @summary 根据角色Id获取菜单Id集合 + * @request GET:/api/role/ownMenuList + */ + roleOwnMenuListGet = ( + query: { + /** 是否启用 */ + isEnabled?: boolean; + /** + * @format int64 + * @min 1 + * @max 9223372036854776000 + */ + id: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/role/ownMenuList`, + method: "GET", + query: query, + format: "json", + ...params, + }); + /** + * No description + * + * @tags role + * @name RolePagePost + * @summary 获取角色分页列表 + * @request POST:/api/role/page + */ + rolePagePost = (data: PageRoleRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/role/page`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags role + * @name RoleSetStatusPost + * @summary 设置角色状态 + * @request POST:/api/role/setStatus + */ + roleSetStatusPost = (data: RoleRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/role/setStatus`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags role + * @name RoleUpdatePost + * @summary 更新角色 + * @request POST:/api/role/update + */ + roleUpdatePost = (data: UpdateRoleRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/role/update`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); +} + +export const roleAddPost = (...args: Parameters['roleAddPost']>) => getAPI(Role).roleAddPost(...args); +export const roleDeletePost = (...args: Parameters['roleDeletePost']>) => getAPI(Role).roleDeletePost(...args); +export const roleGrantMenuPost = (...args: Parameters['roleGrantMenuPost']>) => getAPI(Role).roleGrantMenuPost(...args); +export const roleListGet = (...args: Parameters['roleListGet']>) => getAPI(Role).roleListGet(...args); +export const roleOwnMenuListGet = (...args: Parameters['roleOwnMenuListGet']>) => getAPI(Role).roleOwnMenuListGet(...args); +export const rolePagePost = (...args: Parameters['rolePagePost']>) => getAPI(Role).rolePagePost(...args); +export const roleSetStatusPost = (...args: Parameters['roleSetStatusPost']>) => getAPI(Role).roleSetStatusPost(...args); +export const roleUpdatePost = (...args: Parameters['roleUpdatePost']>) => getAPI(Role).roleUpdatePost(...args); diff --git a/GameFrameX.Admin.Unified.Vue/src/api/tenantRole/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/role/types.ts similarity index 85% rename from GameFrameX.Admin.Unified.Vue/src/api/tenantRole/types.ts rename to GameFrameX.Admin.Unified.Vue/src/api/role/types.ts index 0dc7b6bf..5a639e5b 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/tenantRole/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/role/types.ts @@ -140,43 +140,7 @@ export interface RoleResponse { code?: string | null; } -/** 系统角色输出参数 */ -export interface TenantRoleResponse { - /** Id */ - id?: string; - /** 名称 */ - name?: string | null; - /** 编码 */ - code?: string | null; - /** - * 排序 - * @format int32 - */ - orderNo?: number; - dataScope?: DataScopeEnum; - /** 备注 */ - remark?: string | null; - /** 是否启用 */ - isEnabled?: boolean | null; - /** - * 创建时间 - * @format int64 - */ - createdTime?: number; - /** 创建人 */ - createdName?: string | null; - /** - * 更新时间 - * @format int64 - */ - updateTime?: number | null; - /** 更新人 */ - updatedName?: string | null; - /** 行版本号(乐观锁) */ - rowVersion?: string | null; -} - -export interface TenantRoleResponseSqlSugarPagedList { +export interface RoleResponseSqlSugarPagedList { /** @format int32 */ page?: number; /** @format int32 */ @@ -185,7 +149,7 @@ export interface TenantRoleResponseSqlSugarPagedList { total?: number; /** @format int32 */ totalPages?: number; - items?: TenantRoleResponse[] | null; + items?: RoleResponse[] | null; hasPrevPage?: boolean; hasNextPage?: boolean; } @@ -254,13 +218,13 @@ export interface UpdateRoleRequest { menuIdList?: number[] | null; } -export type TenantRoleAddPostData = any; +export type RoleAddPostData = any; -export type TenantRoleDeletePostData = any; +export type RoleDeletePostData = any; -export type TenantRoleGrantMenuPostData = any; +export type RoleGrantMenuPostData = any; -export interface TenantRoleListGetData { +export interface RoleListGetData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -283,7 +247,7 @@ export interface TenantRoleListGetData { extras: object | null; } -export interface TenantRoleOwnMenuListGetData { +export interface RoleOwnMenuListGetData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -306,7 +270,7 @@ export interface TenantRoleOwnMenuListGetData { extras: object | null; } -export interface TenantRolePagePostData { +export interface RolePagePostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -314,7 +278,7 @@ export interface TenantRolePagePostData { code: number; /** 错误或提示信息 */ message: string; - data: TenantRoleResponseSqlSugarPagedList; + data: RoleResponseSqlSugarPagedList; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; /** 已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段 */ @@ -329,7 +293,7 @@ export interface TenantRolePagePostData { extras: object | null; } -export interface TenantRoleSetStatusPostData { +export interface RoleSetStatusPostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -353,4 +317,4 @@ export interface TenantRoleSetStatusPostData { extras: object | null; } -export type TenantRoleUpdatePostData = any; +export type RoleUpdatePostData = any; diff --git a/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/index.ts index 87c46e41..3b0f5ae4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/index.ts @@ -10,7 +10,7 @@ */ import { - PageTenantSessionKeyRequest, + PageSessionKeyRequest, SessionKeyAddPostData, SessionKeyAddRequest, SessionKeyDeletePostData, @@ -143,7 +143,7 @@ export class SessionKey { * @request POST:/api/sessionKey/page */ sessionKeyPagePost = ( - data: PageTenantSessionKeyRequest, + data: PageSessionKeyRequest, params: RequestParams = {}, ) => this.http.request({ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/types.ts index dd1a57f7..a2069813 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/sessionKey/types.ts @@ -2,7 +2,7 @@ /* tslint:disable */ /** App 会话密钥分页查询输入参数。 */ -export interface PageTenantSessionKeyRequest { +export interface PageSessionKeyRequest { searchKey?: string | null; /** * @format int32 diff --git a/GameFrameX.Admin.Unified.Vue/src/api/tenantFile/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/tenantFile/index.ts deleted file mode 100644 index 2f9a25cc..00000000 --- a/GameFrameX.Admin.Unified.Vue/src/api/tenantFile/index.ts +++ /dev/null @@ -1,226 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -import { - DeleteFileRequest, - FileRequest, - PageFileRequest, - TenantFileDeletePostData, - TenantFileDownloadFilePostData, - TenantFilePagePostData, - TenantFileUpdatePostData, - TenantFileUploadAvatarPostData, - TenantFileUploadAvatarPostPayload, - TenantFileUploadFileFromBase64PostData, - TenantFileUploadFilePostData, - TenantFileUploadFilePostPayload, - TenantFileUploadFilesPostData, - TenantFileUploadFilesPostPayload, - TenantFileUploadSignaturePostData, - TenantFileUploadSignaturePostPayload, - UploadFileFromBase64Request, -} from "./types"; -import { ContentType, HttpClient, RequestParams } from "../_shared/http-client"; -import {getAPI} from "../../utils/axiosUtils"; - -export class TenantFile { - http: HttpClient; - - constructor(http: HttpClient) { - this.http = http; - } - - /** - * No description - * - * @tags tenantFile - * @name TenantFileDeletePost - * @summary 删除文件 - * @request POST:/api/tenantFile/delete - */ - tenantFileDeletePost = ( - data: DeleteFileRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantFile/delete`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFileDownloadFilePost - * @summary 根据文件Id或Url下载 - * @request POST:/api/tenantFile/downloadFile - */ - tenantFileDownloadFilePost = ( - data: FileRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantFile/downloadFile`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFilePagePost - * @summary 获取文件分页列表 - * @request POST:/api/tenantFile/page - */ - tenantFilePagePost = (data: PageFileRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantFile/page`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFileUpdatePost - * @summary 更新文件 - * @request POST:/api/tenantFile/update - */ - tenantFileUpdatePost = (data: FileRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantFile/update`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFileUploadAvatarPost - * @summary 上传头像 - * @request POST:/api/tenantFile/uploadAvatar - */ - tenantFileUploadAvatarPost = ( - data: TenantFileUploadAvatarPostPayload, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantFile/uploadAvatar`, - method: "POST", - body: data, - type: ContentType.FormData, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFileUploadFilePost - * @summary 上传文件 - * @request POST:/api/tenantFile/uploadFile - */ - tenantFileUploadFilePost = ( - data: TenantFileUploadFilePostPayload, - query?: { - path?: string; - }, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantFile/uploadFile`, - method: "POST", - query: query, - body: data, - type: ContentType.FormData, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFileUploadFileFromBase64Post - * @summary 上传文件Base64 - * @request POST:/api/tenantFile/uploadFileFromBase64 - */ - tenantFileUploadFileFromBase64Post = ( - data: UploadFileFromBase64Request, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantFile/uploadFileFromBase64`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFileUploadFilesPost - * @summary 上传多文件 - * @request POST:/api/tenantFile/uploadFiles - */ - tenantFileUploadFilesPost = ( - data: TenantFileUploadFilesPostPayload, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantFile/uploadFiles`, - method: "POST", - body: data, - type: ContentType.FormData, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantFile - * @name TenantFileUploadSignaturePost - * @summary 上传电子签名 - * @request POST:/api/tenantFile/uploadSignature - */ - tenantFileUploadSignaturePost = ( - data: TenantFileUploadSignaturePostPayload, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantFile/uploadSignature`, - method: "POST", - body: data, - type: ContentType.FormData, - format: "json", - ...params, - }); -} - -export const tenantFileDeletePost = (...args: Parameters['tenantFileDeletePost']>) => getAPI(TenantFile).tenantFileDeletePost(...args); -export const tenantFileDownloadFilePost = (...args: Parameters['tenantFileDownloadFilePost']>) => getAPI(TenantFile).tenantFileDownloadFilePost(...args); -export const tenantFilePagePost = (...args: Parameters['tenantFilePagePost']>) => getAPI(TenantFile).tenantFilePagePost(...args); -export const tenantFileUpdatePost = (...args: Parameters['tenantFileUpdatePost']>) => getAPI(TenantFile).tenantFileUpdatePost(...args); -export const tenantFileUploadAvatarPost = (...args: Parameters['tenantFileUploadAvatarPost']>) => getAPI(TenantFile).tenantFileUploadAvatarPost(...args); -export const tenantFileUploadFilePost = (...args: Parameters['tenantFileUploadFilePost']>) => getAPI(TenantFile).tenantFileUploadFilePost(...args); -export const tenantFileUploadFileFromBase64Post = (...args: Parameters['tenantFileUploadFileFromBase64Post']>) => getAPI(TenantFile).tenantFileUploadFileFromBase64Post(...args); -export const tenantFileUploadFilesPost = (...args: Parameters['tenantFileUploadFilesPost']>) => getAPI(TenantFile).tenantFileUploadFilesPost(...args); -export const tenantFileUploadSignaturePost = (...args: Parameters['tenantFileUploadSignaturePost']>) => getAPI(TenantFile).tenantFileUploadSignaturePost(...args); diff --git a/GameFrameX.Admin.Unified.Vue/src/api/tenantRole/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/tenantRole/index.ts deleted file mode 100644 index 60b5ca20..00000000 --- a/GameFrameX.Admin.Unified.Vue/src/api/tenantRole/index.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -import { - AddRoleRequest, - DeleteRoleRequest, - PageRoleRequest, - RoleMenuRequest, - RoleRequest, - TenantRoleAddPostData, - TenantRoleDeletePostData, - TenantRoleGrantMenuPostData, - TenantRoleListGetData, - TenantRoleOwnMenuListGetData, - TenantRolePagePostData, - TenantRoleSetStatusPostData, - TenantRoleUpdatePostData, - UpdateRoleRequest, -} from "./types"; -import { ContentType, HttpClient, RequestParams } from "../_shared/http-client"; -import {getAPI} from "../../utils/axiosUtils"; - -export class TenantRole { - http: HttpClient; - - constructor(http: HttpClient) { - this.http = http; - } - - /** - * No description - * - * @tags tenantRole - * @name TenantRoleAddPost - * @summary 增加角色 - * @request POST:/api/tenantRole/add - */ - tenantRoleAddPost = (data: AddRoleRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantRole/add`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantRole - * @name TenantRoleDeletePost - * @summary 删除角色 - * @request POST:/api/tenantRole/delete - */ - tenantRoleDeletePost = ( - data: DeleteRoleRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantRole/delete`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantRole - * @name TenantRoleGrantMenuPost - * @summary 授权角色菜单 - * @request POST:/api/tenantRole/grantMenu - */ - tenantRoleGrantMenuPost = ( - data: RoleMenuRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantRole/grantMenu`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantRole - * @name TenantRoleListGet - * @summary 获取角色列表 - * @request GET:/api/tenantRole/list - */ - tenantRoleListGet = (params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantRole/list`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantRole - * @name TenantRoleOwnMenuListGet - * @summary 根据角色Id获取菜单Id集合 - * @request GET:/api/tenantRole/ownMenuList - */ - tenantRoleOwnMenuListGet = ( - query: { - /** 是否启用 */ - isEnabled?: boolean; - /** - * @format int64 - * @min 1 - * @max 9223372036854776000 - */ - id: number; - }, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantRole/ownMenuList`, - method: "GET", - query: query, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantRole - * @name TenantRolePagePost - * @summary 获取角色分页列表 - * @request POST:/api/tenantRole/page - */ - tenantRolePagePost = (data: PageRoleRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantRole/page`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantRole - * @name TenantRoleSetStatusPost - * @summary 设置角色状态 - * @request POST:/api/tenantRole/setStatus - */ - tenantRoleSetStatusPost = (data: RoleRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantRole/setStatus`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantRole - * @name TenantRoleUpdatePost - * @summary 更新角色 - * @request POST:/api/tenantRole/update - */ - tenantRoleUpdatePost = ( - data: UpdateRoleRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantRole/update`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); -} - -export const tenantRoleAddPost = (...args: Parameters['tenantRoleAddPost']>) => getAPI(TenantRole).tenantRoleAddPost(...args); -export const tenantRoleDeletePost = (...args: Parameters['tenantRoleDeletePost']>) => getAPI(TenantRole).tenantRoleDeletePost(...args); -export const tenantRoleGrantMenuPost = (...args: Parameters['tenantRoleGrantMenuPost']>) => getAPI(TenantRole).tenantRoleGrantMenuPost(...args); -export const tenantRoleListGet = (...args: Parameters['tenantRoleListGet']>) => getAPI(TenantRole).tenantRoleListGet(...args); -export const tenantRoleOwnMenuListGet = (...args: Parameters['tenantRoleOwnMenuListGet']>) => getAPI(TenantRole).tenantRoleOwnMenuListGet(...args); -export const tenantRolePagePost = (...args: Parameters['tenantRolePagePost']>) => getAPI(TenantRole).tenantRolePagePost(...args); -export const tenantRoleSetStatusPost = (...args: Parameters['tenantRoleSetStatusPost']>) => getAPI(TenantRole).tenantRoleSetStatusPost(...args); -export const tenantRoleUpdatePost = (...args: Parameters['tenantRoleUpdatePost']>) => getAPI(TenantRole).tenantRoleUpdatePost(...args); diff --git a/GameFrameX.Admin.Unified.Vue/src/api/tenantUser/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/tenantUser/index.ts deleted file mode 100644 index 7d165ca6..00000000 --- a/GameFrameX.Admin.Unified.Vue/src/api/tenantUser/index.ts +++ /dev/null @@ -1,254 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -import { - AddUserRequest, - ChangePwdRequest, - DeleteUserRequest, - PageUserRequest, - ResetPwdUserRequest, - TenantUserAddPostData, - TenantUserBaseInfoGetData, - TenantUserBaseInfoPostData, - TenantUserChangePwdPostData, - TenantUserDeletePostData, - TenantUserEntity, - TenantUserGrantRolePostData, - TenantUserOwnRoleListGetData, - TenantUserPagePostData, - TenantUserResetPwdPostData, - TenantUserSetStatusPostData, - TenantUserUpdatePostData, - UpdateUserRequest, - UserRequest, - UserRoleRequest, -} from "./types"; -import { ContentType, HttpClient, RequestParams } from "../_shared/http-client"; -import {getAPI} from "../../utils/axiosUtils"; - -export class TenantUser { - http: HttpClient; - - constructor(http: HttpClient) { - this.http = http; - } - - /** - * No description - * - * @tags tenantUser - * @name TenantUserAddPost - * @summary 增加用户 - * @request POST:/api/tenantUser/add - */ - tenantUserAddPost = (data: AddUserRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantUser/add`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserBaseInfoGet - * @summary 查看用户基本信息 - * @request GET:/api/tenantUser/baseInfo - */ - tenantUserBaseInfoGet = (params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantUser/baseInfo`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserBaseInfoPost - * @summary 更新用户基本信息 - * @request POST:/api/tenantUser/baseInfo - */ - tenantUserBaseInfoPost = ( - data: TenantUserEntity, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantUser/baseInfo`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserChangePwdPost - * @summary 修改用户密码 - * @request POST:/api/tenantUser/changePwd - */ - tenantUserChangePwdPost = ( - data: ChangePwdRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantUser/changePwd`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserDeletePost - * @summary 删除用户 - * @request POST:/api/tenantUser/delete - */ - tenantUserDeletePost = ( - data: DeleteUserRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantUser/delete`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserGrantRolePost - * @summary 授权用户角色 - * @request POST:/api/tenantUser/grantRole - */ - tenantUserGrantRolePost = ( - data: UserRoleRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantUser/grantRole`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserOwnRoleListGet - * @summary 获取用户拥有角色集合 - * @request GET:/api/tenantUser/ownRoleList/{userId} - */ - tenantUserOwnRoleListGet = (userId: number, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantUser/ownRoleList/${userId}`, - method: "GET", - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserPagePost - * @summary 获取用户分页列表 - * @request POST:/api/tenantUser/page - */ - tenantUserPagePost = (data: PageUserRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantUser/page`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserResetPwdPost - * @summary 重置用户密码 - * @request POST:/api/tenantUser/resetPwd - */ - tenantUserResetPwdPost = ( - data: ResetPwdUserRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantUser/resetPwd`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserSetStatusPost - * @summary 设置用户状态 - * @request POST:/api/tenantUser/setStatus - */ - tenantUserSetStatusPost = (data: UserRequest, params: RequestParams = {}) => - this.http.request({ - path: `/api/tenantUser/setStatus`, - method: "POST", - body: data, - type: ContentType.Json, - format: "json", - ...params, - }); - /** - * No description - * - * @tags tenantUser - * @name TenantUserUpdatePost - * @summary 更新用户 - * @request POST:/api/tenantUser/update - */ - tenantUserUpdatePost = ( - data: UpdateUserRequest, - params: RequestParams = {}, - ) => - this.http.request({ - path: `/api/tenantUser/update`, - method: "POST", - body: data, - type: ContentType.Json, - ...params, - }); -} - -export const tenantUserAddPost = (...args: Parameters['tenantUserAddPost']>) => getAPI(TenantUser).tenantUserAddPost(...args); -export const tenantUserBaseInfoGet = (...args: Parameters['tenantUserBaseInfoGet']>) => getAPI(TenantUser).tenantUserBaseInfoGet(...args); -export const tenantUserBaseInfoPost = (...args: Parameters['tenantUserBaseInfoPost']>) => getAPI(TenantUser).tenantUserBaseInfoPost(...args); -export const tenantUserChangePwdPost = (...args: Parameters['tenantUserChangePwdPost']>) => getAPI(TenantUser).tenantUserChangePwdPost(...args); -export const tenantUserDeletePost = (...args: Parameters['tenantUserDeletePost']>) => getAPI(TenantUser).tenantUserDeletePost(...args); -export const tenantUserGrantRolePost = (...args: Parameters['tenantUserGrantRolePost']>) => getAPI(TenantUser).tenantUserGrantRolePost(...args); -export const tenantUserOwnRoleListGet = (...args: Parameters['tenantUserOwnRoleListGet']>) => getAPI(TenantUser).tenantUserOwnRoleListGet(...args); -export const tenantUserPagePost = (...args: Parameters['tenantUserPagePost']>) => getAPI(TenantUser).tenantUserPagePost(...args); -export const tenantUserResetPwdPost = (...args: Parameters['tenantUserResetPwdPost']>) => getAPI(TenantUser).tenantUserResetPwdPost(...args); -export const tenantUserSetStatusPost = (...args: Parameters['tenantUserSetStatusPost']>) => getAPI(TenantUser).tenantUserSetStatusPost(...args); -export const tenantUserUpdatePost = (...args: Parameters['tenantUserUpdatePost']>) => getAPI(TenantUser).tenantUserUpdatePost(...args); diff --git a/GameFrameX.Admin.Unified.Vue/src/api/user/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/user/index.ts new file mode 100644 index 00000000..d975b3e7 --- /dev/null +++ b/GameFrameX.Admin.Unified.Vue/src/api/user/index.ts @@ -0,0 +1,236 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { + AddUserRequest, + ChangePwdRequest, + DeleteUserRequest, + PageUserRequest, + ResetPwdUserRequest, + UpdateUserRequest, + UserAddPostData, + UserBaseInfoGetData, + UserBaseInfoPostData, + UserChangePwdPostData, + UserDeletePostData, + UserEntity, + UserGrantRolePostData, + UserOwnRoleListGetData, + UserPagePostData, + UserRequest, + UserResetPwdPostData, + UserRoleRequest, + UserSetStatusPostData, + UserUpdatePostData, +} from "./types"; +import { ContentType, HttpClient, RequestParams } from "../_shared/http-client"; +import {getAPI} from "../../utils/axiosUtils"; + +export class User { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags user + * @name UserAddPost + * @summary 增加用户 + * @request POST:/api/user/add + */ + userAddPost = (data: AddUserRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/add`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserBaseInfoGet + * @summary 查看用户基本信息 + * @request GET:/api/user/baseInfo + */ + userBaseInfoGet = (params: RequestParams = {}) => + this.http.request({ + path: `/api/user/baseInfo`, + method: "GET", + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserBaseInfoPost + * @summary 更新用户基本信息 + * @request POST:/api/user/baseInfo + */ + userBaseInfoPost = (data: UserEntity, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/baseInfo`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserChangePwdPost + * @summary 修改用户密码 + * @request POST:/api/user/changePwd + */ + userChangePwdPost = (data: ChangePwdRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/changePwd`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserDeletePost + * @summary 删除用户 + * @request POST:/api/user/delete + */ + userDeletePost = (data: DeleteUserRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/delete`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags user + * @name UserGrantRolePost + * @summary 授权用户角色 + * @request POST:/api/user/grantRole + */ + userGrantRolePost = (data: UserRoleRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/grantRole`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags user + * @name UserOwnRoleListGet + * @summary 获取用户拥有角色集合 + * @request GET:/api/user/ownRoleList/{userId} + */ + userOwnRoleListGet = (userId: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/ownRoleList/${userId}`, + method: "GET", + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserPagePost + * @summary 获取用户分页列表 + * @request POST:/api/user/page + */ + userPagePost = (data: PageUserRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/page`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserResetPwdPost + * @summary 重置用户密码 + * @request POST:/api/user/resetPwd + */ + userResetPwdPost = (data: ResetPwdUserRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/resetPwd`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserSetStatusPost + * @summary 设置用户状态 + * @request POST:/api/user/setStatus + */ + userSetStatusPost = (data: UserRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/setStatus`, + method: "POST", + body: data, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags user + * @name UserUpdatePost + * @summary 更新用户 + * @request POST:/api/user/update + */ + userUpdatePost = (data: UpdateUserRequest, params: RequestParams = {}) => + this.http.request({ + path: `/api/user/update`, + method: "POST", + body: data, + type: ContentType.Json, + ...params, + }); +} + +export const userAddPost = (...args: Parameters['userAddPost']>) => getAPI(User).userAddPost(...args); +export const userBaseInfoGet = (...args: Parameters['userBaseInfoGet']>) => getAPI(User).userBaseInfoGet(...args); +export const userBaseInfoPost = (...args: Parameters['userBaseInfoPost']>) => getAPI(User).userBaseInfoPost(...args); +export const userChangePwdPost = (...args: Parameters['userChangePwdPost']>) => getAPI(User).userChangePwdPost(...args); +export const userDeletePost = (...args: Parameters['userDeletePost']>) => getAPI(User).userDeletePost(...args); +export const userGrantRolePost = (...args: Parameters['userGrantRolePost']>) => getAPI(User).userGrantRolePost(...args); +export const userOwnRoleListGet = (...args: Parameters['userOwnRoleListGet']>) => getAPI(User).userOwnRoleListGet(...args); +export const userPagePost = (...args: Parameters['userPagePost']>) => getAPI(User).userPagePost(...args); +export const userResetPwdPost = (...args: Parameters['userResetPwdPost']>) => getAPI(User).userResetPwdPost(...args); +export const userSetStatusPost = (...args: Parameters['userSetStatusPost']>) => getAPI(User).userSetStatusPost(...args); +export const userUpdatePost = (...args: Parameters['userUpdatePost']>) => getAPI(User).userUpdatePost(...args); diff --git a/GameFrameX.Admin.Unified.Vue/src/api/tenantUser/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/user/types.ts similarity index 94% rename from GameFrameX.Admin.Unified.Vue/src/api/tenantUser/types.ts rename to GameFrameX.Admin.Unified.Vue/src/api/user/types.ts index 54f960cf..2bff2b5b 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/tenantUser/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/user/types.ts @@ -180,7 +180,7 @@ export interface PageUserRequest { phone?: string | null; } -/** 重置密码结果(平台用户与租户管理员重置共用) */ +/** 重置密码结果(平台用户与管理员角色重置共用) */ export interface ResetPwdResponse { /** 重置后的初始密码(取自系统密码配置;一次性明文返回,仅本次响应可见,禁止落日志/缓存) */ newPassword?: string | null; @@ -190,7 +190,7 @@ export interface ResetPwdResponseHttpJsonResultData { /** @format int32 */ code?: number; message?: string | null; - /** 重置密码结果(平台用户与租户管理员重置共用) */ + /** 重置密码结果(平台用户与管理员角色重置共用) */ data?: ResetPwdResponse; trackId?: string | null; errorCode?: string | null; @@ -208,7 +208,80 @@ export interface ResetPwdUserRequest { id: string; } -export interface TenantUserEntity { +export interface UpdateUserRequest { + /** 主键Id(新增为 0,编辑由前端回填) */ + id?: string; + /** 乐观锁版本号 */ + rowVersion?: string | null; + /** + * 账号 + * @minLength 1 + */ + account: string; + /** + * 真实姓名 + * @minLength 1 + */ + realName: string; + /** 昵称 */ + nickName?: string | null; + /** 头像 */ + avatar?: string | null; + sex?: GenderEnum; + /** + * 年龄 + * @format int32 + */ + age?: number; + /** + * 出生日期 + * @format int64 + */ + birthdayTime?: number | null; + /** 民族 */ + nation?: string | null; + /** 手机号码 */ + phone?: string | null; + cardType?: CardTypeEnum; + /** 身份证号 */ + idCardNum?: string | null; + /** 邮箱 */ + email?: string | null; + /** 地址 */ + address?: string | null; + cultureLevel?: CultureLevelEnum; + /** 政治面貌 */ + politicalOutlook?: string | null; + /** 毕业院校 */ + college?: string | null; + /** 办公电话 */ + officePhone?: string | null; + /** 紧急联系人 */ + emergencyContact?: string | null; + /** 紧急联系人电话 */ + emergencyPhone?: string | null; + /** 紧急联系人地址 */ + emergencyAddress?: string | null; + /** + * 排序 + * @format int32 + */ + orderNo?: number; + /** 备注 */ + remark?: string | null; + accountType?: AccountTypeEnum; + /** 工号 */ + jobNum?: string | null; + /** + * 入职日期 + * @format int64 + */ + joinTime?: number | null; + /** 角色集合 */ + roleIdList?: number[] | null; +} + +export interface UserEntity { /** 主键Id */ id: string; /** 创建人Id */ @@ -286,7 +359,7 @@ export interface TenantUserEntity { remark?: string | null; accountType?: AccountTypeEnum; managerUserId?: string | null; - managerUser?: TenantUserEntity; + managerUser?: UserEntity; jobNum?: string | null; posLevel?: string | null; posTitle?: string | null; @@ -303,8 +376,18 @@ export interface TenantUserEntity { signature?: string | null; } +export interface UserRequest { + /** + * @min 1 + * @max 9223372036854776000 + */ + id: string; + /** 是否启用 */ + isEnabled?: boolean; +} + /** 租户用户输出参数 */ -export interface TenantUserResponse { +export interface UserResponse { /** Id */ id?: string; /** 账号 */ @@ -412,7 +495,7 @@ export interface TenantUserResponse { rowVersion?: string | null; } -export interface TenantUserResponseSqlSugarPagedList { +export interface UserResponseSqlSugarPagedList { /** @format int32 */ page?: number; /** @format int32 */ @@ -421,94 +504,11 @@ export interface TenantUserResponseSqlSugarPagedList { total?: number; /** @format int32 */ totalPages?: number; - items?: TenantUserResponse[] | null; + items?: UserResponse[] | null; hasPrevPage?: boolean; hasNextPage?: boolean; } -export interface UpdateUserRequest { - /** 主键Id(新增为 0,编辑由前端回填) */ - id?: string; - /** 乐观锁版本号 */ - rowVersion?: string | null; - /** - * 账号 - * @minLength 1 - */ - account: string; - /** - * 真实姓名 - * @minLength 1 - */ - realName: string; - /** 昵称 */ - nickName?: string | null; - /** 头像 */ - avatar?: string | null; - sex?: GenderEnum; - /** - * 年龄 - * @format int32 - */ - age?: number; - /** - * 出生日期 - * @format int64 - */ - birthdayTime?: number | null; - /** 民族 */ - nation?: string | null; - /** 手机号码 */ - phone?: string | null; - cardType?: CardTypeEnum; - /** 身份证号 */ - idCardNum?: string | null; - /** 邮箱 */ - email?: string | null; - /** 地址 */ - address?: string | null; - cultureLevel?: CultureLevelEnum; - /** 政治面貌 */ - politicalOutlook?: string | null; - /** 毕业院校 */ - college?: string | null; - /** 办公电话 */ - officePhone?: string | null; - /** 紧急联系人 */ - emergencyContact?: string | null; - /** 紧急联系人电话 */ - emergencyPhone?: string | null; - /** 紧急联系人地址 */ - emergencyAddress?: string | null; - /** - * 排序 - * @format int32 - */ - orderNo?: number; - /** 备注 */ - remark?: string | null; - accountType?: AccountTypeEnum; - /** 工号 */ - jobNum?: string | null; - /** - * 入职日期 - * @format int64 - */ - joinTime?: number | null; - /** 角色集合 */ - roleIdList?: number[] | null; -} - -export interface UserRequest { - /** - * @min 1 - * @max 9223372036854776000 - */ - id: string; - /** 是否启用 */ - isEnabled?: boolean; -} - /** 授权用户角色 */ export interface UserRoleRequest { /** 用户Id */ @@ -517,7 +517,7 @@ export interface UserRoleRequest { roleIdList?: number[] | null; } -export interface TenantUserAddPostData { +export interface UserAddPostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -541,7 +541,7 @@ export interface TenantUserAddPostData { extras: object | null; } -export interface TenantUserBaseInfoGetData { +export interface UserBaseInfoGetData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -550,7 +550,7 @@ export interface TenantUserBaseInfoGetData { /** 错误或提示信息 */ message: string; /** 租户用户输出参数 */ - data: TenantUserResponse; + data: UserResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; /** 已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段 */ @@ -565,7 +565,7 @@ export interface TenantUserBaseInfoGetData { extras: object | null; } -export interface TenantUserBaseInfoPostData { +export interface UserBaseInfoPostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -589,7 +589,7 @@ export interface TenantUserBaseInfoPostData { extras: object | null; } -export interface TenantUserChangePwdPostData { +export interface UserChangePwdPostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -613,11 +613,11 @@ export interface TenantUserChangePwdPostData { extras: object | null; } -export type TenantUserDeletePostData = any; +export type UserDeletePostData = any; -export type TenantUserGrantRolePostData = any; +export type UserGrantRolePostData = any; -export interface TenantUserOwnRoleListGetData { +export interface UserOwnRoleListGetData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -640,7 +640,7 @@ export interface TenantUserOwnRoleListGetData { extras: object | null; } -export interface TenantUserPagePostData { +export interface UserPagePostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -648,7 +648,7 @@ export interface TenantUserPagePostData { code: number; /** 错误或提示信息 */ message: string; - data: TenantUserResponseSqlSugarPagedList; + data: UserResponseSqlSugarPagedList; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; /** 已退役字段:统一错误码体系(C265)下恒为 null,数字业务错误码承载在 code 字段 */ @@ -663,9 +663,9 @@ export interface TenantUserPagePostData { extras: object | null; } -export type TenantUserResetPwdPostData = ResetPwdResponseHttpJsonResultData; +export type UserResetPwdPostData = ResetPwdResponseHttpJsonResultData; -export interface TenantUserSetStatusPostData { +export interface UserSetStatusPostData { /** * 响应码,0 表示成功,失败时承载统一数字业务错误码(模块枚举 8 位数值,见 GameFrameX.Core/Enum/Errors 与 error-codes.json 码表) * @format int32 @@ -689,4 +689,4 @@ export interface TenantUserSetStatusPostData { extras: object | null; } -export type TenantUserUpdatePostData = any; +export type UserUpdatePostData = any; From 86a728355baaae5cbffa8b3d0c690297a8c4104a Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:10:55 +0800 Subject: [PATCH 21/86] =?UTF-8?q?test:=20=E4=BF=AE=E5=A4=8D=20C406=20?= =?UTF-8?q?=E6=94=B9=E5=90=8D=E4=B8=8E=20D3/D5/D10=20=E5=90=8E=E7=9A=84?= =?UTF-8?q?=E5=AE=88=E6=8A=A4=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重算 EnumContractTests 哈希;重生成端点金标(仅命名空间段变化,路由条数不变); 边界测试改业务表无前缀口径;删除 TenantId/AppScope 主题消失的断言; 修正 defaultRow 关键字撞名与 GFX741 清理顺序期望。 Linear: GFX-1232 --- .../AppManagement/ChannelDefinitionNamingTests.cs | 1 - .../Architecture/AdminEndpointGolden.baseline.txt | 2 +- .../GameFrameX.Core.Tests/Enum/EnumContractTests.cs | 2 +- .../FeatureSwitchDeliveryResolverTests.cs | 2 +- .../Logging/MonitorLoggingPipelineTests.cs | 2 -- .../SqlSugar/EntityTableNameAlignmentTests.cs | 5 +++-- .../SqlSugar/GameRoleAdvertisementEntityTests.cs | 13 +------------ .../SqlSugar/PhysicalTableNamespaceBoundaryTests.cs | 6 +++--- .../LongIdentifierStringSchemaFilterTests.cs | 4 ---- .../System/MenuSeedStaleRowCleanerTests.cs | 2 +- .../Utility/JsonSerializerOptionsProviderTests.cs | 3 +-- 11 files changed, 12 insertions(+), 30 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs index e0e0d86d..ab948fc1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs @@ -43,6 +43,5 @@ public void ChannelDefinition_ManagementServices_AreSplitByScope() Assert.NotNull(assembly.GetType("GameFrameX.Application.ClientDelivery.ChannelDefinition.GlobalChannelDefinitionService")); Assert.NotNull(assembly.GetType("GameFrameX.Application.ClientDelivery.ChannelDefinition.ChannelDefinitionService")); - Assert.Null(assembly.GetType("GameFrameX.Application.ClientDelivery.ChannelDefinition.ChannelDefinitionService")); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt index afe73300..d1fd0cf7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointGolden.baseline.txt @@ -210,8 +210,8 @@ GameFrameX.Application.CommerceCenter.GameRedeemCodeChannel.GameRedeemCodeChanne GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/add|POST GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/delete|POST GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/detail|GET -GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/page|POST GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/gameAreaEntityAreaIdDropdown|GET +GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/page|POST GameFrameX.Application.CommerceCenter.GameRedeemCodeUseRecord.GameRedeemCodeUseRecordService|api/gameRedeemCodeUseRecord/update|POST GameFrameX.Application.CommerceCenter.GameWebShop.GameWebShopService|api/gameWebShop/add|POST GameFrameX.Application.CommerceCenter.GameWebShop.GameWebShopService|api/gameWebShop/delete|POST diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/EnumContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/EnumContractTests.cs index 00b16389..37826446 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/EnumContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/EnumContractTests.cs @@ -12,7 +12,7 @@ namespace GameFrameX.Core.Tests.Enum; public class EnumContractTests { private const string ExpectedContractSha256 = - "7A1927B59751B3F16E2AD7789EA3179212F0FF1949AA4FB536D562B5F75F113F"; + "D294D85EE2EA7555952C00E443692F587896043B7B8A068199AB7891440ADAC4"; private static readonly JsonSerializerOptions StringEnumOptions = new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs index ac031194..ba3cd97c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs @@ -46,7 +46,7 @@ public void Resolve_NewerRowWinsRegardlessOfLegacyApplication() var defaultRow = Row("login.banner", id: 1, appId: null, valueJson: "{\"v\":\"base\"}"); var appRow = Row("login.banner", id: 2, appId: App100, valueJson: "{\"v\":\"app\"}"); - var result = FeatureSwitchDeliveryResolver.Resolve(new[] { default, appRow, }, Query()); + var result = FeatureSwitchDeliveryResolver.Resolve(new[] { defaultRow, appRow, }, Query()); var item = Assert.Single(result.Switches); Assert.Equal("{\"v\":\"app\"}", item.ValueJson); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs index f52a0ca2..7b3c5da4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Logging/MonitorLoggingPipelineTests.cs @@ -174,7 +174,6 @@ public async Task Page_WithUserIdentity_WritesOperationRowToMainDatabase() .ToListAsync(); var row = Assert.Single(rows); - Assert.Null(row.Id); Assert.Equal("admin", row.Account); Assert.Equal("GetPage", row.ActionName); Assert.Contains("query", row.RequestParam); @@ -234,7 +233,6 @@ public async Task UserInfoAndLogout_WriteVisitRowsOnly() var db = _db.GetConnectionScope(MainConfigId); var visitRows = await db.Queryable().Where(u => u.ActionName == "GetUserInfo").ToListAsync(); Assert.Single(visitRows); - Assert.Null(visitRows[0].Id); Assert.Equal("admin", visitRows[0].Account); var mainDb = _db.GetConnectionScope(MainConfigId); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs index b4ccc5dd..caa09daf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/EntityTableNameAlignmentTests.cs @@ -79,7 +79,7 @@ public void AllEntities_ClassNamePrefixMatchesBoundaryOwnership() item.ClassName, ExpectedPrefix = ClassExpectedPrefix(item.Ownership), }) - .Where(item => !item.ClassName.StartsWith(item.ExpectedPrefix, StringComparison.Ordinal)) + .Where(item => item.ExpectedPrefix.Length > 0 && !item.ClassName.StartsWith(item.ExpectedPrefix, StringComparison.Ordinal)) .Select(item => $"{item.ClassName}|ownership={item.Ownership}|expectedPrefix={item.ExpectedPrefix}") .ToList(); @@ -120,7 +120,8 @@ private static string ClassExpectedPrefix(DatabaseOwnership ownership) { DatabaseOwnership.System => "System", DatabaseOwnership.Global => "Global", - DatabaseOwnership.Business => "Business", + // D3/C406:业务表无物理前缀,类名不再要求 Business 前缀(如 UserEntity、LogOperationEntity)。 + DatabaseOwnership.Business => string.Empty, _ => string.Empty, }; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs index f6a8a4fd..f4a6431f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs @@ -1,4 +1,3 @@ -using System.Reflection; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Business.Game; using SqlSugar; @@ -22,23 +21,13 @@ public GameRoleAdvertisementEntityTests() _db = new SqlSugarScope(config); } - [Fact] - public void TenantGameRoleAdvertisement_HasNoTenantScope() - { - var id = typeof(GameRoleAdvertisementEntity).GetProperty( - "Id", - BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy); - - Assert.Null(id); - } - [Fact] public void InitTables_AcceptsBusinessIndexesWithoutTenantScope() { _db.CodeFirst.InitTables(typeof(GameRoleAdvertisementEntity)); var columns = _db.EntityMaintenance.GetEntityInfo().Columns; - Assert.DoesNotContain(columns, c => c.PropertyName is "Id" or "AppId"); + Assert.DoesNotContain(columns, c => c.PropertyName is "AppId"); } public void Dispose() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs index f511adb2..1574115d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs @@ -175,8 +175,8 @@ private static bool HasJsonRenameAttribute(PropertyInfo property) private static bool HasAllowedPrefix(string tableName) { - return tableName.StartsWith("system_", StringComparison.Ordinal) - || tableName.StartsWith("tenant_", StringComparison.Ordinal) - || tableName.StartsWith("global_", StringComparison.Ordinal); + // D3:业务表不带前缀;system_/global_ 为保留前缀;tenant_ 前缀已随 C406 退场,禁止再现。 + return !tableName.StartsWith("tenant_", StringComparison.Ordinal) + && !tableName.StartsWith("system_sys_", StringComparison.Ordinal); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs index 03da187f..b47af178 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Swagger/LongIdentifierStringSchemaFilterTests.cs @@ -22,14 +22,10 @@ public void Apply_ConvertsInt64IdentifierPropertiesToString() var schema = ApplyFilter(new Dictionary { ["id"] = new OpenApiSchema { Type = JsonSchemaType.Integer, Format = "int64", }, - ["id"] = new OpenApiSchema { Type = JsonSchemaType.Integer | JsonSchemaType.Null, Format = "int64", }, }); Assert.Equal(JsonSchemaType.String, schema.Properties["id"].Type); Assert.Null(schema.Properties["id"].Format); - // 可空标志保留(String | Null),仅数值位替换 - Assert.Equal(JsonSchemaType.String | JsonSchemaType.Null, schema.Properties["id"].Type); - Assert.Null(schema.Properties["id"].Format); } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs index dc19bef3..528d7645 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedStaleRowCleanerTests.cs @@ -144,7 +144,7 @@ public void Clean_ThenLoadFromDb_HealsLegacyDuplicatePermissionRows_GFX741() Assert.Contains("global_menu.Permission 重复: advertisementCallbackConfig:page", before.Message); var removedKeys = MenuSeedStaleRowCleaner.RemoveStaleRows(db, seedIdsByKey); - Assert.Equal(new[] { "route:adCallbackConfigEntity", "adCallbackConfigEntity:page", }, removedKeys.OrderBy(u => u, StringComparer.Ordinal).ToArray()); + Assert.Equal(new[] { "adCallbackConfigEntity:page", "route:adCallbackConfigEntity", }, removedKeys.OrderBy(u => u, StringComparer.Ordinal).ToArray()); // 清理后加载通过,且该 Permission 只剩一条有效定义(种子全称 Key 行) MenuSeedCatalog.LoadFromDb(db); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs index 595c7a59..ec92e168 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/JsonSerializerOptionsProviderTests.cs @@ -51,12 +51,11 @@ public void Configure_WritesIdentifierLongsAsStringsAndReadsThemBack() Assert.Contains("\"CreatedTime\":1784073600", json); var value = JsonSerializer.Deserialize( - "{\"Id\":\"4664278385747429000\",\"Id\":\"1300000000001\",\"CreatedTime\":1784073600}", + "{\"Id\":\"4664278385747429000\",\"CreatedTime\":1784073600}", options); Assert.NotNull(value); Assert.Equal(4664278385747429000, value.Id); - Assert.Equal(1300000000001, value.Id); Assert.Equal(1784073600, value.CreatedTime); } From 5d3c0f5a54e61a166c6b547180efedec6c32d803 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:20:55 +0800 Subject: [PATCH 22/86] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8D=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E7=99=BB=E5=BD=95=E8=BA=AB=E4=BB=BD=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 恢复 userId 与 accountId 身份覆盖字段的拒绝逻辑,忽略租户和应用旧字段并验证刷新请求线缆。\n\nLinear: GFX-1232 --- .../GameRole/GameRoleController.cs | 17 ++++++ .../ClientApi/ClientApiRoleEndpointTests.cs | 54 +++++++++++++++++-- 2 files changed, 67 insertions(+), 4 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs index 3ea2b3c0..4dab15a8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs @@ -18,6 +18,8 @@ namespace GameFrameX.Client.Api.GameRole; /// public class GameRoleController : BaseController { + private static readonly string[] IdentityOverrideFieldNames = { "userId", "accountId", }; + private readonly HttpClient _httpClientFactory; private readonly ClientApiTokenIssuer _clientApiTokenIssuer; private readonly GameLoginTicketIssuer _gameLoginTicketIssuer; @@ -222,6 +224,11 @@ public async Task>> GetList([FromBody] [ProducesResponseType(200, Type = typeof(GameLoginTicketResponse))] public async Task> Login([FromBody] GamePlayerLoginRequest input) { + if (HasForbiddenIdentityOverrideField(input)) + { + return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "请求体不能包含身份覆盖字段"); + } + var tokenValidation = await _clientApiTokenIssuer.ValidateAsync(input.AccessToken); if (!tokenValidation.IsValid) { @@ -354,6 +361,16 @@ private bool TryGetContextLong(string key, out long value) return long.TryParse(item.ToString(), out value); } + private static bool HasForbiddenIdentityOverrideField(GamePlayerLoginRequest input) + { + if (input.ExtraFields == null) + { + return false; + } + + return input.ExtraFields.Keys.Any(key => IdentityOverrideFieldNames.Contains(key, StringComparer.OrdinalIgnoreCase)); + } + private static string BuildRouteTarget(TenantGameAreaEntity area) { if (area.WebSocketUrl.IsNotNullOrEmpty()) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs index c915a8a5..5846f186 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs @@ -189,7 +189,8 @@ public async Task GameRole_Login_IgnoresUnknownLegacyContextFields() db.InitTenantTables(typeof(TenantGameUserEntity)); var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); - var controller = CreateController(db, ClientApiRecordingHttpHandler.WithGameServerDefaults(), issuer); + var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(); + var controller = CreateController(db, handler, issuer); db.AttachContext(controller); var result = await controller.Login(new GamePlayerLoginRequest @@ -199,14 +200,59 @@ public async Task GameRole_Login_IgnoresUnknownLegacyContextFields() AccessToken = accessToken.Token, ExtraFields = new Dictionary { - ["tenantId"] = JsonDocument.Parse("10").RootElement.Clone(), - ["appId"] = JsonDocument.Parse("20").RootElement.Clone(), - ["gameAppId"] = JsonDocument.Parse("30").RootElement.Clone(), + ["tenantId"] = JsonDocument.Parse("10").RootElement.Clone(), // c406-keep + ["appId"] = JsonDocument.Parse("20").RootElement.Clone(), // c406-keep + ["gameAppId"] = JsonDocument.Parse("30").RootElement.Clone(), // c406-keep }, }); var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); + Assert.Single(handler.RequestBodies); + using (var body = JsonDocument.Parse(handler.RequestBodies.Single())) + { + Assert.DoesNotContain("tenantId", body.RootElement.EnumerateObject().Select(property => property.Name), StringComparer.OrdinalIgnoreCase); // c406-keep + Assert.DoesNotContain("appId", body.RootElement.EnumerateObject().Select(property => property.Name), StringComparer.OrdinalIgnoreCase); // c406-keep + Assert.DoesNotContain("gameAppId", body.RootElement.EnumerateObject().Select(property => property.Name), StringComparer.OrdinalIgnoreCase); // c406-keep + } + + Assert.DoesNotContain(handler.RequestPaths, path => path.Contains("tenantId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(handler.RequestPaths, path => path.Contains("appId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(handler.RequestPaths, path => path.Contains("gameAppId", StringComparison.OrdinalIgnoreCase)); // c406-keep + } + + [Fact] + public async Task GameRole_Login_RejectsIdentityOverrideUserId() + { + using (var db = new ClientApiTestDb()) + { + db.SeedUser(1001, "identity-override-user"); + db.SeedAreaClassify(10); + db.SeedArea(2001, 10); + db.SeedRole(3001, 1001, 2001); + db.InitTenantTables(typeof(TenantGameUserEntity)); + var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); + var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(user => user.Id == 1001), "Guest"); + var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(); + var controller = CreateController(db, handler, issuer); + db.AttachContext(controller); + + var result = await controller.Login(new GamePlayerLoginRequest + { + PlayerId = 3001, + AreaId = 2001, + AccessToken = accessToken.Token, + ExtraFields = new Dictionary + { + ["userId"] = JsonDocument.Parse("9999").RootElement.Clone(), // c406-keep + }, + }); + + var root = ClientApiResultReader.Read(result); + Assert.Equal((int)AuthErrorCode.AuthorizeInvalid, ClientApiResultReader.Code(root)); + Assert.Equal("请求体不能包含身份覆盖字段", ClientApiResultReader.Message(root)); + Assert.Empty(handler.RequestBodies); + } } [Fact] From 4b271ef27e7dafbfe40cd61b1e6d77b0a0c6b87c Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:21:14 +0800 Subject: [PATCH 23/86] =?UTF-8?q?fix:=20=E6=94=B6=E7=B4=A7=E6=97=A7?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E8=B7=AF=E5=BE=84=E8=B4=9F=E5=90=91=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将旧回调路由测试改为只验证三段路径 404 与旧上下文字段不解析,移除已经失去主题的正向租户路由用例。\n\nLinear: GFX-1232 --- ...PublicCallbackLegacyRouteRejectionTests.cs | 73 ++++++ .../PublicCallbackTenantRoutingTests.cs | 209 ------------------ 2 files changed, 73 insertions(+), 209 deletions(-) create mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs delete mode 100644 GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs new file mode 100644 index 00000000..488d62e1 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs @@ -0,0 +1,73 @@ +using GameFrameX.Client.Api.Integrations.Advertisement; +using GameFrameX.Client.Api.Middleware; +using GameFrameX.Client.Api.Services.PublicCallback; +using GameFrameX.Core.Middleware; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.TestHost; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace GameFrameX.Core.Tests.ClientApi; + +public sealed class PublicCallbackLegacyRouteRejectionTests +{ + [Fact] + public async Task AdvertisementCallback_LegacyThreeSegmentRoute_ReturnsNotFound() + { + using (var host = await new HostBuilder() + .ConfigureWebHost(webBuilder => + { + webBuilder.UseTestServer(); + webBuilder.ConfigureServices(services => + { + services.AddRouting(); + services.AddControllers().AddApplicationPart(typeof(GameAdWebHookController).Assembly); + }); + webBuilder.Configure(app => + { + app.UseRouting(); + app.UseEndpoints(endpoints => endpoints.MapControllers()); + }); + }) + .StartAsync()) + { + using (var client = host.GetTestClient()) + { + var response = await client.GetAsync("/api/GameAdWebHook/TopOnNotify/100/200/300"); // c406-keep + + Assert.Equal(StatusCodes.Status404NotFound, (int)response.StatusCode); + } + } + } + + [Fact] + public async Task Middleware_LegacyContextFieldsAreIgnored() + { + using (var database = new ClientApiTestDb()) + { + var context = new DefaultHttpContext(); + context.SetEndpoint(new Endpoint(_ => Task.CompletedTask, + new EndpointMetadataCollection(new PublicCallbackEndpointAttribute("pangle", "ad")), "callback")); + context.Request.RouteValues["tenantId"] = 999; // c406-keep + context.Request.RouteValues["appId"] = 888; // c406-keep + context.Request.RouteValues["gameAppId"] = 777; // c406-keep + var invoked = false; + var middleware = new PublicCallbackTenantResolutionMiddleware(request => + { + invoked = true; + Assert.Single(request.Items); + Assert.Equal(new PublicCallbackRouteContext("pangle", "ad", null), request.Items[PublicCallbackRouteContext.ItemKey]); + Assert.DoesNotContain(request.Items.Keys, key => string.Equals(key?.ToString(), "TenantId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(request.Items.Keys, key => string.Equals(key?.ToString(), "AppId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(request.Items.Keys, key => string.Equals(key?.ToString(), "GameAppId", StringComparison.OrdinalIgnoreCase)); // c406-keep + return Task.CompletedTask; + }); + + await middleware.InvokeAsync(context, new PublicCallbackRouteResolver(database.MainDb)); + + Assert.True(invoked); + } + } +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs deleted file mode 100644 index 17e935e4..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackTenantRoutingTests.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System.Text.Json; -using GameFrameX.Client.Api.Integrations.Payment; -using GameFrameX.Client.Api.Middleware; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; -using GameFrameX.Client.Api.Services.PublicCallback; -using GameFrameX.Core.Middleware; -using GameFrameX.Entity.Tenant.ClientApiConfig; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Payment.AliPay; -using Microsoft.AspNetCore.Http; -using SqlSugar; - -namespace GameFrameX.Core.Tests.ClientApi; - -public sealed class PublicCallbackTenantRoutingTests -{ - [Fact] - public async Task Middleware_WithPackageRouteParameter_EstablishesCallbackContextBeforeNext() - { - const long packageId = 1900000000201; - using (var fixture = CreateFixture(packageId)) - { - var context = new DefaultHttpContext(); - SetPublicCallbackEndpoint(context, "alipay", "payment"); - context.Request.RouteValues["packageId"] = packageId; - var nextCalled = false; - var middleware = new PublicCallbackTenantResolutionMiddleware(current => - { - nextCalled = true; - Assert.False(current.Items.ContainsKey("TenantId")); - Assert.False(current.Items.ContainsKey("AppId")); - Assert.IsType(current.Items[PublicCallbackRouteContext.ItemKey]); - Assert.Equal(packageId, current.Items[PaymentOptionSettingProvider.PackageIdKey]); - return Task.CompletedTask; - }); - await middleware.InvokeAsync(context, new PublicCallbackRouteResolver(fixture.MainDb)); - Assert.True(nextCalled); - Assert.Equal(200, context.Response.StatusCode); - } - } - - [Fact] - public async Task Middleware_WithoutPackageRouteParameter_EstablishesCallbackContext() - { - using (var fixture = CreateFixture()) - { - var context = new DefaultHttpContext(); - SetPublicCallbackEndpoint(context, "alipay", "payment"); - var middleware = new PublicCallbackTenantResolutionMiddleware(current => - { - Assert.IsType(current.Items[PublicCallbackRouteContext.ItemKey]); - return Task.CompletedTask; - }); - await middleware.InvokeAsync(context, new PublicCallbackRouteResolver(fixture.MainDb)); - Assert.Equal(200, context.Response.StatusCode); - Assert.False(context.Items.ContainsKey("TenantId")); - } - } - - [Fact] - public void PaymentProvider_BareQueryScopeDoesNotChangeMainConfiguration() - { - using (var fixture = CreateFixture()) - { - InsertAliPayConfig(fixture.MainDb, false); - var context = new DefaultHttpContext(); - context.Request.QueryString = new QueryString("?tenantId=999&appId=888&env=prod"); - context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("alipay", "payment", null); - var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); - var setting = Assert.Single(provider.GetOptionSettings("alipay")); - Assert.Equal("2026000000000000", setting.AliPayAppId); - } - } - - [Fact] - public void PaymentProvider_AppendsPackageRouteSegmentToConfiguredCallbackUrl() - { - const long packageId = 1900000003201; - using (var fixture = CreateFixture(packageId)) - { - InsertAliPayConfig(fixture.MainDb, true); - var context = new DefaultHttpContext(); - context.Items[PaymentOptionSettingProvider.PackageIdKey] = packageId; - context.Items[PaymentOptionSettingProvider.PaymentIsSandboxKey] = true; - var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); - var setting = provider.GetOptionSetting("alipay"); - // 完整新路由地址 + 当前分包上下文:回调地址带上分包段,网关回调按分包解析回同一租户 - Assert.NotNull(setting); - Assert.Equal("https://client.example.com/api/GameOrder/NotifyAliPay/1900000003201", setting.AliPayNotifyUrl); - } - } - - [Fact] - public void PaymentProvider_BuildsCallbackUrlFromSiteRootWithoutPackageContext() - { - using (var fixture = CreateFixture()) - { - InsertAliPayConfig(fixture.MainDb, false, "https://client.example.com"); - var context = new DefaultHttpContext(); - var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); - var setting = provider.GetOptionSetting("alipay"); - // 站点根地址自动补全路由段;无分包上下文时不带分包段(主库配置) - Assert.NotNull(setting); - Assert.Equal("https://client.example.com/api/GameOrder/NotifyAliPay", setting.AliPayNotifyUrl); - } - } - - [Fact] - public void PaymentProvider_RejectsLegacyThreeSegmentCallbackUrl() - { - using (var fixture = CreateFixture()) - { - InsertAliPayConfig(fixture.MainDb, false, "https://client.example.com/api/GameOrder/NotifyAliPay/999/888/777"); - var context = new DefaultHttpContext(); - var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); - var setting = provider.GetOptionSetting("alipay"); - // 旧三段地址不再去段重建,避免静默兼容已退场的作用域路由 - Assert.NotNull(setting); - Assert.Equal(string.Empty, setting.AliPayNotifyUrl); - } - } - - [Fact] - public void PaymentProvider_RejectsUnmappableCallbackUrl() - { - using (var fixture = CreateFixture()) - { - InsertAliPayConfig(fixture.MainDb, false, "https://client.example.com/pay/notify"); - var context = new DefaultHttpContext(); - var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); - var setting = provider.GetOptionSetting("alipay"); - // 无法识别的地址置空:处理器按「通知地址未配置」拒绝下单 - Assert.NotNull(setting); - Assert.Equal(string.Empty, setting.AliPayNotifyUrl); - } - } - - [Fact] - public async Task AdvertisementOptionsProvider_PicksPangleConfigFromPublicCallbackContext() - { - using (var fixture = CreateFixture()) - { - fixture.MainDb.Insertable(new[] - { - new TenantAdvertisementCallbackConfigEntity - { - Id = 1900000004201, Provider = "TopOn", - ConfigJson = JsonSerializer.Serialize(new { callbackUrl = "https://client.example.com/topon", signingSecret = "topon-secret" }), - IsEnabled = true, - }, - new TenantAdvertisementCallbackConfigEntity - { - Id = 1900000004202, Provider = "Pangle", - ConfigJson = JsonSerializer.Serialize(new { callbackUrl = "https://client.example.com/pangle", signingSecret = "pangle-secret" }), - IsEnabled = true, - }, - }).ExecuteCommand(); - var context = new DefaultHttpContext(); - context.Items["TenantId"] = 999L; - context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("pangle", "ad", null); - var provider = new ClientApiTenantOptionsProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); - var options = await provider.GetAdvertisementCallbackOptionsAsync(); - Assert.NotNull(options); - Assert.Equal("Pangle", options.Provider); - Assert.Equal("pangle-secret", options.PangleSecurityKey); - } - } - - private static ClientApiTestDb CreateFixture(long? packageId = null) - { - var fixture = new ClientApiTestDb().InitTenantTables(typeof(TenantGameAppPackageEntity), typeof(TenantGamePaymentConfigEntity), typeof(TenantAdvertisementCallbackConfigEntity)); - if (packageId.HasValue) - { - fixture.MainDb.Insertable(new TenantGameAppPackageEntity - { - Id = packageId.Value, Name = "主库测试分包", PackageName = "com.gameframex.callback", - PlatformCode = "ios", PlatformName = "iOS", ChannelCode = "default", ChannelName = "Default", IsEnabled = true, - }).ExecuteCommand(); - } - - return fixture; - } - - private static void SetPublicCallbackEndpoint(DefaultHttpContext context, string provider, string callbackKind) - { - context.SetEndpoint(new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(new PublicCallbackEndpointAttribute(provider, callbackKind)), provider + "-" + callbackKind)); - } - - private static void InsertAliPayConfig(ISqlSugarClient database, bool isSandbox, string notifyUrl = "https://client.example.com/api/GameOrder/NotifyAliPay") - { - database.Insertable(new TenantGamePaymentConfigEntity - { - Id = 1900000004201, - PackageIdNormalized = 0, - PayChannel = "alipay", - IsSandbox = isSandbox, - IsEnabled = true, - ConfigJson = JsonSerializer.Serialize(new AliPayOptionSetting - { - AliPayAppId = "2026000000000000", - AliPayMerchantPrivateKey = "private-key", - AliPayPublicKey = "public-key", - AliPayNotifyUrl = notifyUrl, - AliPayReturnUrl = "https://client.example.com/pay/return", - }), - }).ExecuteCommand(); - } -} From 67a5615935fde95dbf3a0511e24415f9d5c5ba8b Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:21:36 +0800 Subject: [PATCH 24/86] =?UTF-8?q?test:=20=E6=A0=87=E6=B3=A8=E6=97=A7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=B4=9F=E5=90=91=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为改名脚本保留公开回调、登录令牌、商城和游戏服线缆测试中的旧字段断言。\n\nLinear: GFX-1232 --- .../ClientApiEndpointCoverageTests.cs | 6 +++--- .../ClientApi/ClientApiTokenIssuerTests.cs | 18 +++++++++--------- .../ClientApi/ClientApiWebShopEndpointTests.cs | 2 +- .../ClientApi/PublicCallbackSingleMainTests.cs | 8 ++++---- .../Online/OnlineServerClientTests.cs | 12 ++++++------ 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs index 068957e2..8ebee977 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs @@ -61,8 +61,8 @@ public void PublicCallbackEndpoints_DeclareOptionalPackageBoundary() foreach (var endpoint in callbacks) { Assert.Contains("invalid-route", endpoint.FailureCases); - Assert.DoesNotContain("{tenantId:long}", endpoint.Route); - Assert.DoesNotContain("{appId:long}", endpoint.Route); + Assert.DoesNotContain("{tenantId:long}", endpoint.Route); // c406-keep + Assert.DoesNotContain("{appId:long}", endpoint.Route); // c406-keep Assert.False(endpoint.RequiresTenant); Assert.False(endpoint.RequiresApp); } @@ -100,7 +100,7 @@ public async Task AdvertisementCallback_LegacyThreeSegmentRoute_ReturnsNotFound( .StartAsync(); using var client = host.GetTestClient(); - var response = await client.GetAsync("/api/GameAdWebHook/TopOnNotify/100/200/300"); + var response = await client.GetAsync("/api/GameAdWebHook/TopOnNotify/100/200/300"); // c406-keep Assert.Equal(StatusCodes.Status404NotFound, (int)response.StatusCode); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs index f02573a3..4d70f334 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs @@ -60,8 +60,8 @@ public async Task GameLoginTicket_ContainsRequiredClaims() Assert.Equal(ClientApiPlatformDefaults.GameLoginTicketAudience, jwt.Audiences.Single()); Assert.Equal(keyResolver.Kid, jwt.Kid); Assert.Equal(keyResolver.Kid, ticket.Kid); - Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "tenantId"); - Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "appId"); + Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "tenantId"); // c406-keep + Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "appId"); // c406-keep Assert.Equal("30", jwt.Claims.Single(c => c.Type == "userId").Value); Assert.Equal("40", jwt.Claims.Single(c => c.Type == "playerId").Value); Assert.Equal("50", jwt.Claims.Single(c => c.Type == "areaId").Value); @@ -149,17 +149,17 @@ public void GamePlayerLoginInput_CapturesForbiddenContextFields() + "\"PlayerId\":40," + "\"AreaId\":50," + "\"AccessToken\":\"token\"," - + "\"UserId\":30," - + "\"tenantId\":10," - + "\"appId\":20" + + "\"UserId\":30," // c406-keep + + "\"tenantId\":10," // c406-keep + + "\"appId\":20" // c406-keep + "}"; var input = JsonSerializer.Deserialize(payload); Assert.NotNull(input); - Assert.Contains(input!.ExtraFields.Keys, key => string.Equals(key, "UserId", StringComparison.OrdinalIgnoreCase)); - Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "tenantId", StringComparison.OrdinalIgnoreCase)); - Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "appId", StringComparison.OrdinalIgnoreCase)); + Assert.Contains(input!.ExtraFields.Keys, key => string.Equals(key, "UserId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "tenantId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "appId", StringComparison.OrdinalIgnoreCase)); // c406-keep } private sealed class TestGameLoginTicketKeyResolver : IGameLoginTicketKeyResolver @@ -199,4 +199,4 @@ public Task> GetPublicKeysAsync() return Task.FromResult(keys); } } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs index ed3274b7..4f0dbf2d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs @@ -69,7 +69,7 @@ public async Task GameWebShop_Buy_RejectsLegacyThreeSegmentCallbackUrl() db.SeedArea(2001, 10); db.SeedRole(3001, 1001, 2001); db.SeedWebShop(5001, "6.50", ItemJson()); - db.SeedSystemConfig("web_shop_params", WebShopConfigJson("https://client.example.test/api/GameWebShop/NotifyWebShop/123/456/7001")); + db.SeedSystemConfig("web_shop_params", WebShopConfigJson("https://client.example.test/api/GameWebShop/NotifyWebShop/123/456/7001")); // c406-keep var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(); var controller = CreateController(db, handler); controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(true, true, 7001), }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs index 2c38691c..a1e35e5e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs @@ -18,7 +18,7 @@ public sealed class PublicCallbackSingleMainTests public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string channel) { // 出站下单通知地址经 PaymentOptionSettingProvider 真实构造:站点根地址自动补全新回调路由段 - //(旧 tenantId/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 + //(旧 tenantId/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 // c406-keep using (var database = new ClientApiTestDb()) { database.InitTenantTables(typeof(TenantGamePaymentConfigEntity)); @@ -36,7 +36,7 @@ public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string ch }).ExecuteCommand(); var context = new DefaultHttpContext(); - context.Request.QueryString = new QueryString("?tenantId=123&appId=456"); + context.Request.QueryString = new QueryString("?tenantId=123&appId=456"); // c406-keep var provider = new PaymentOptionSettingProvider(database.TenantDbProvider, new HttpContextAccessor { HttpContext = context }); var expectedRoute = channel == "alipay" ? "api/GameOrder/NotifyAliPay" : "api/GameOrder/NotifyWeChatPay"; @@ -55,8 +55,8 @@ public async Task IncomingCallback_OldRouteSegments_DoNotCreateScopeContext() var context = new DefaultHttpContext(); context.SetEndpoint(new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(new PublicCallbackEndpointAttribute("pangle", "ad")), "callback")); - context.Request.RouteValues["tenantId"] = 999; - context.Request.RouteValues["appId"] = 888; + context.Request.RouteValues["tenantId"] = 999; // c406-keep + context.Request.RouteValues["appId"] = 888; // c406-keep var invoked = false; var middleware = new PublicCallbackTenantResolutionMiddleware(request => { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs index d8f40512..126e618c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs @@ -104,14 +104,14 @@ public async Task PostAsync_MergesScopeIntoPayload_OverridingClientScopeFields() var handler = new FakeHandler(SuccessEnvelope(new OnlineDemoData { PlayerId = "p-1", })); var client = CreateClient(handler); - await client.PostAsync("kick_player", new { tenantId = 999L, appId = 888L, gameAppId = 777L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, UnknownField = "drop-me", }, await CreateScopeAsync()); + await client.PostAsync("kick_player", new { tenantId = 999L, appId = 888L, gameAppId = 777L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, UnknownField = "drop-me", }, await CreateScopeAsync()); // c406-keep var body = handler.LastRequestBodyJson; - Assert.False(body.ContainsKey("TenantId")); - Assert.False(body.ContainsKey("AppId")); - Assert.False(body.ContainsKey("tenantId")); - Assert.False(body.ContainsKey("appId")); - Assert.False(body.ContainsKey("gameAppId")); + Assert.False(body.ContainsKey("TenantId")); // c406-keep + Assert.False(body.ContainsKey("AppId")); // c406-keep + Assert.False(body.ContainsKey("tenantId")); // c406-keep + Assert.False(body.ContainsKey("appId")); // c406-keep + Assert.False(body.ContainsKey("gameAppId")); // c406-keep Assert.False(body.ContainsKey("UnknownField")); Assert.Equal(Area1001, Convert.ToInt64(body["ServerId"]?.ToString())); Assert.Equal("request-1", body["RequestId"]?.ToString()); From 0f43d7a30e293f38f53ee32f74b37e3897129f2f Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:25:54 +0800 Subject: [PATCH 25/86] =?UTF-8?q?test:=20=E6=A0=87=E6=B3=A8=E5=AE=BF?= =?UTF-8?q?=E4=B8=BB=E5=AE=89=E5=85=A8=E8=B4=9F=E5=90=91=E6=A0=B7=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为 Hub HMAC、解密、配置响应和旧上下文安全测试标记有意保留的旧字段样本。\n\nLinear: GFX-1232 --- .../ClientApi/ClientApiConfigEndpointTests.cs | 6 +++--- .../ClientApi/CryptoEnvelopeMiddlewareTests.cs | 4 ++-- ...TenantGameAppOpenAccessAuthMiddlewareTests.cs | 16 ++++++++-------- ...TenantGameAppOpenAccessDecryptClosureTests.cs | 2 +- .../Online/OnlineScopeContextFactoryTests.cs | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs index ffb89162..df1f5600 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs @@ -222,8 +222,8 @@ public async Task GameLoginTicketKey_PublicKeys_WithoutRequestScope_ReturnsKeys( var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); var key = ClientApiResultReader.Data(root)[0]; - Assert.False(key.TryGetProperty("TenantId", out _)); - Assert.False(key.TryGetProperty("AppId", out _)); + Assert.False(key.TryGetProperty("TenantId", out _)); // c406-keep + Assert.False(key.TryGetProperty("AppId", out _)); // c406-keep } [Fact] @@ -266,4 +266,4 @@ public Task> GetPublicKeysAsync() return Task.FromResult(keys); } } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs index d35c492d..10d8f221 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs @@ -591,7 +591,7 @@ await InvokeAsync(context, CreateOptions(true), () => [Fact] public async Task LegacyTenantContext_DoesNotBypassDecryption() { - var context = CreateEnvelopeContext("{}", tenantId: 999); + var context = CreateEnvelopeContext("{}", tenantId: 999); // c406-keep var nextCalled = false; await InvokeAsync(context, CreateOptions(true), () => { @@ -717,4 +717,4 @@ public Task ResolveAsync(string kid) return Task.FromResult(new SessionKeyLookup(result, kid, result == SessionKeyLookupResult.Active ? entity.Secret : null)); } } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs index d28b629f..e279399b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs @@ -38,7 +38,7 @@ private static byte[] ClientSign(string method, string path, string canonicalQue [Fact] public void TryParseSignatureHeader_ValidV2Header_ParsesAllSegments() { - var signatureBase64 = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", Encoding.UTF8.GetBytes(Body)); + var signatureBase64 = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", Encoding.UTF8.GetBytes(Body)); // c406-keep var header = "v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";" + Convert.ToBase64String(signatureBase64); var parsed = TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(header, out var accessKey, out var timestamp, out var nonce, out var provided); @@ -68,10 +68,10 @@ public void TryParseSignatureHeader_LegacyOrMalformed_Rejected() public void VerifySignature_ClientCanonicalMessage_Passes() { var body = Encoding.UTF8.GetBytes(Body); - var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", body); + var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", body); // c406-keep var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); + Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); // c406-keep Assert.True(verified); } @@ -81,10 +81,10 @@ public void VerifySignature_TamperedBody_Rejected() { // body 入签(C267 前规范 B 不把 body 进签 —— 这是本迁移的关键收紧点):篡改 body 后原签名必失效 var body = Encoding.UTF8.GetBytes(Body); - var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9", body); + var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9", body); // c406-keep var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9", Ts, Nonce, + Credential(), "POST", "/api/PackageBuildReport", "appId=9", Ts, Nonce, // c406-keep Encoding.UTF8.GetBytes("{\"package\":\"pkg-1001\",\"status\":\"tampered\"}"), provided); Assert.False(verified); @@ -96,13 +96,13 @@ public void VerifySignature_RawOrderSignedClient_Rejected() // 客户端按「原始乱序 query 串」拼消息签名(未按 canonical 排序)→ 拒绝, // 证明 Hub 侧同样强制 canonical query(与 SignatureValidationMiddleware 同一规范) var body = Encoding.UTF8.GetBytes(Body); - var rawOrderMessage = "v2\nPOST\n/api/PackageBuildReport\nchannel=ios&appId=9\n" + AccessKey + "\n" + Ts + "\n" + Nonce + "\n" + var rawOrderMessage = "v2\nPOST\n/api/PackageBuildReport\nchannel=ios&appId=9\n" + AccessKey + "\n" + Ts + "\n" + Nonce + "\n" // c406-keep + CanonicalRequestBuilder.BodyHashHex(body); var provided = CanonicalRequestBuilder.HmacSha256(Encoding.UTF8.GetBytes(AccessSecret), rawOrderMessage); var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); + Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); // c406-keep Assert.False(verified); } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs index 646773e6..2e0e63cd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs @@ -134,7 +134,7 @@ public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoTenantC { nextCount++; Assert.Equal("7801", context.User.FindFirst(GameFrameX.Core.Const.ClaimConst.UserId)?.Value); - Assert.Null(context.User.FindFirst("TenantId")); + Assert.Null(context.User.FindFirst("TenantId")); // c406-keep return Task.CompletedTask; }); await middleware.InvokeAsync(first, cache); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs index e5435449..943fe292 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs @@ -119,7 +119,7 @@ public async Task RejectedScope_IsAuditableInTenantOperationLog() } Assert.Contains("Online 作用域越界", persistedMessage); // ErrorLocalizer 本地化文案完整落库往返 - Assert.Contains("9999", persistedMessage); // errors JSON 透出的越界 appId 可检索 + Assert.Contains("9999", persistedMessage); // errors JSON 透出的越界 appId 可检索 // c406-keep } [Fact] From 84350812d8556c9bca6143b86f65b908c36a18b2 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:29:57 +0800 Subject: [PATCH 26/86] =?UTF-8?q?refactor:=20=E4=BB=A5=E6=94=B9=E5=90=8D?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=20v2=20=E4=BF=AE=E6=AD=A3=20v1=20=E6=B3=9B?= =?UTF-8?q?=E5=8C=96=E8=AF=8D=E6=8D=9F=E4=BC=A4=EF=BC=88R1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2 按 R1 a-f:泛化词守卫(TenantId/tenantDb/KeyTenant 等剩余部分为泛化词的 token 不改并登记 semantic-residue.tsv)、循环删除并转移大小写、token 边界 精确覆盖、c406-keep 与 keep-paths 豁免、小写裸词只报不改、双跑幂等。 经临时基点 worktree(689ceda8 + v2 = T2)构造 v1→v2 修正补丁三方应用, 9 个冲突文件取本分支版本(D10 已删的日志字段与已改写的测试); 重新删除撞名死代码 TenantFileResponse/TenantRoleResponse,清理 .gitignore 迁移目录反排除残留。生产语义残留(tenantDb/TenantId 等)移交 H/C 处理。 Linear: GFX-1232 --- GameFrameX.Admin.Unified.Api/.gitignore | 6 +-- .../GameAppPackage/GameAppPackageService.cs | 6 +-- .../GameHome/GameHomeOnlineCounter.cs | 6 +-- .../Dashboard/GameHome/GameHomeService.cs | 34 ++++++------- .../OnlineRolloutSemanticMap.cs | 2 +- .../Platform/Job/GameHomeOnlineSampleJob.cs | 8 +-- .../OpenAccess/SystemOpenAccessService.cs | 12 ++--- .../PlayerCenter/GameUser/GameUserService.cs | 8 +-- .../System/ChannelDefinitionSeedData.cs | 2 +- .../ServerCenter/Online/OnlineServerClient.cs | 2 +- .../GameRole/GameRoleController.cs | 10 ++-- .../GameUser/GameUserController.cs | 50 +++++++++---------- .../Advertisement/GameAdWebHookController.cs | 8 +-- .../Payment/GameOrderController.ApplePay.cs | 2 +- .../Payment/PaymentOptionSettingProvider.cs | 10 ++-- .../ClientApiOptionsProvider.cs | 10 ++-- .../GameLoginTicketKeyResolver.cs | 8 +-- .../PackageVersion/GameAppPackageResolver.cs | 6 +-- .../PublicCallbackNotifyUrlBuilder.cs | 2 +- ...dminEndpointParameterShapeContractTests.cs | 2 +- .../CredentialWritePathCryptoTests.cs | 8 +-- .../Business/ReadActionClassifierTests.cs | 2 +- .../ClientApiAccountEndpointTests.cs | 4 +- .../ClientApi/ClientApiConfigEndpointTests.cs | 10 ++-- .../ClientApiEndpointCoverageMatrix.cs | 8 +-- .../ClientApiEndpointCoverageTests.cs | 2 +- .../ClientApiFeatureSwitchEndpointTests.cs | 2 +- ...ientApiGameUserDeviceLoginEndpointTests.cs | 4 +- .../ClientApi/ClientApiOrderCreateTests.cs | 6 +-- .../ClientApiPaymentCallbackEndpointTests.cs | 14 +++--- .../ClientApiPenaltyEnforcementTests.cs | 2 +- .../ClientApiRedeemCodeEndpointTests.cs | 22 ++++---- .../ClientApi/ClientApiRoleEndpointTests.cs | 12 ++--- .../ClientApiSessionKeyIssuerTests.cs | 6 +-- .../ClientApi/ClientApiTestDb.cs | 48 +++++++++--------- .../ClientApi/ClientApiTokenIssuerTests.cs | 6 +-- .../ClientApiWeChatPayCallbackTests.cs | 12 ++--- .../ClientApiWebShopEndpointTests.cs | 44 ++++++++-------- .../CryptoEnvelopeMiddlewareTests.cs | 8 +-- .../GameAdvertisementRewardServiceTests.cs | 18 +++---- .../GameAppPackageResolverInheritanceTests.cs | 16 +++--- .../ClientApi/PublicCallbackRoutingTests.cs | 8 +-- .../PublicCallbackSingleMainTests.cs | 8 +-- .../RuntimeCredentialDecryptClosureTests.cs | 22 ++++---- .../BusinessTableIdempotencyStoreTests.cs | 12 ++--- .../GameApi/GameUserMiscTests.cs | 2 +- .../GameApi/GameUserPayTests.cs | 24 ++++----- .../GameApi/GameUserRankTests.cs | 14 +++--- .../GameApi/GameUserSessionTests.cs | 6 +-- .../FeatureSwitchDeliveryResolverTests.cs | 2 +- .../FeatureSwitchSyncControllerTests.cs | 28 +++++------ .../GameAppOpenAccessDecryptClosureTests.cs | 6 +-- ...jectStorageActiveConfigConcurrencyTests.cs | 22 ++++---- .../Online/Asset/OnlineAssetMenuSeedTests.cs | 2 +- .../Online/Asset/OnlineAssetTestSupport.cs | 6 +-- .../Console/OnlineConsoleMenuSeedTests.cs | 2 +- .../GameOnlineConfigRolloutServiceTests.cs | 10 ++-- .../GameOnlinePlayerSegmentServiceTests.cs | 2 +- .../OnlineLiveOpsDispatchServiceTests.cs | 8 +-- .../OnlinePenaltyLinkCommandServiceTests.cs | 8 +-- .../Social/OnlineReportCaseServiceTests.cs | 8 +-- ...PaymentOptionSettingDecryptClosureTests.cs | 14 +++--- .../Online/OnlineScopeContextFactoryTests.cs | 2 +- .../Online/OnlineServerClientTests.cs | 6 +-- ...nnelDefinitionSoftDeleteVisibilityTests.cs | 6 +-- .../SqlSugar/ClientApiPolicyServiceTests.cs | 8 +-- .../SqlSugar/SeedInsertOnlyTests.cs | 16 +++--- .../SqlSugarDatabaseInitializationTests.cs | 6 +-- .../System/AuthTestHost.cs | 14 +++--- .../System/FakeDbConnectionProvider.cs | 10 ++-- .../System/GameHomeServiceTests.cs | 18 +++---- .../System/LogFieldSerializationGuardTests.cs | 2 +- .../System/LogQueryIsolationTests.cs | 6 +-- .../Tenant/KeyLifecycleRotateTests.cs | 16 +++--- .../GameFrameX.Core/Const/CacheConst.cs | 2 +- .../GameFrameX.Core/Enum/Errors/ErrorCode.cs | 2 +- .../Middleware/MiddlewareResponseWriter.cs | 2 +- .../Middleware/SessionKeyResolver.cs | 6 +-- .../Middleware/SignatureKeyResolver.cs | 8 +-- .../Service/User/UserService.cs | 48 +++++++++--------- 80 files changed, 419 insertions(+), 421 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/.gitignore b/GameFrameX.Admin.Unified.Api/.gitignore index 5a7950b7..50616acf 100644 --- a/GameFrameX.Admin.Unified.Api/.gitignore +++ b/GameFrameX.Admin.Unified.Api/.gitignore @@ -16,10 +16,8 @@ GameFrameX.Client.Api/Google/*.json error-codes.json # 本地零配置 SQLite 数据目录(DataSource=./db/...,仓根执行 dotnet run 时生成) -# db/* 而非 db/:db/ 会整目录排除导致 !db/tenant-isolation/ 反排除失效(git 不进入被排除目录) -db/* -!db/tenant-isolation/ -!db/single-main/ +# db/ 本地 SQLite 运行目录整体排除 +db/ *.db .sonarqube postgres-data diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs index 372e8ede..4cc73f61 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/GameAppPackage/GameAppPackageService.cs @@ -18,7 +18,7 @@ public class GameAppPackageService { private readonly SqlSugarRepository _globalPlatformRepository; private readonly SqlSugarRepository _globalChannelDefinitionRepository; - private readonly SqlSugarRepository _tenantChannelDefinitionRepository; + private readonly SqlSugarRepository _channelDefinitionRepository; public GameAppPackageService( SqlSugarRepository repository, @@ -29,7 +29,7 @@ public GameAppPackageService( { _globalPlatformRepository = globalPlatformRepository; _globalChannelDefinitionRepository = globalChannelDefinitionRepository; - _tenantChannelDefinitionRepository = channelDefinitionRepository; + _channelDefinitionRepository = channelDefinitionRepository; } protected override ISugarQueryable BuildPageQuery(PageGameAppPackageRequest input) @@ -395,7 +395,7 @@ private async Task FillSnapshotsAsync(GameAppPackageEntity entity) return globalChannel; } - return await _tenantChannelDefinitionRepository.AsQueryable() + return await _channelDefinitionRepository.AsQueryable() .Filter(null, true) .Where(u => u.IsDeleted == false) .Where(u => (u.IsEnabled == true || u.IsEnabled == null)) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs index 29f4af34..d1cace31 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs @@ -14,12 +14,12 @@ public static class GameHomeOnlineCounter /// /// 按指定租户库连接聚合全服在线人数。无可用区服时返回 0。 /// - /// 租户业务库连接(必须已路由到目标租户库)。 + /// 租户业务库连接(必须已路由到目标租户库)。 /// HTTP 客户端工厂。 /// 启用区服在线人数之和。 - public static async Task GetTotalOnlineAsync(ISqlSugarClient db, IHttpClientFactory httpClientFactory) + public static async Task GetTotalOnlineAsync(ISqlSugarClient tenantDb, IHttpClientFactory httpClientFactory) { - var areas = await db.Queryable() + var areas = await tenantDb.Queryable() .Where(u => u.IsEnabled == true && u.HttpManageUrl != null && u.HttpManageUrl != "") .ToListAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs index 35f3f202..a2f54fd1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs @@ -15,12 +15,12 @@ namespace GameFrameX.Application.Dashboard.GameHome; public class GameHomeService : IAdminApiController { private readonly IHttpClientFactory _httpClientFactory; - private readonly ISqlSugarClient _tenantDbConnectionProvider; + private readonly ISqlSugarClient _dbConnectionProvider; public GameHomeService(IHttpClientFactory httpClientFactory, ISqlSugarClient dbConnectionProvider) { _httpClientFactory = httpClientFactory; - _tenantDbConnectionProvider = dbConnectionProvider; + _dbConnectionProvider = dbConnectionProvider; } /// @@ -35,8 +35,8 @@ public async Task> GetOnlineAsync() // C175:从全局 GameServerOptions.HttpRootUrl 改为区服级聚合。仅统计启用且配置了管理地址的区服, // 每个区服按 Control 能力前缀调用 GetOnlinePlayer,求和返回全服在线人数。 // C321:区服表是租户库表,经租户库连接路由查询;平台面(无租户上下文)返回明确业务错误而非裸 500。 - var db = ResolveDb("首页在线人数"); - var total = await GameHomeOnlineCounter.GetTotalOnlineAsync(db, _httpClientFactory); + var tenantDb = ResolveDb("首页在线人数"); + var total = await GameHomeOnlineCounter.GetTotalOnlineAsync(tenantDb, _httpClientFactory); return HttpJsonResultData.Success(new GameHomeOnlineResponse { OnlineCount = total, }); } @@ -49,31 +49,31 @@ public async Task> GetOnlineAsync() [DisplayName("首页运营驾驶舱聚合读数")] public async Task> OverviewAsync() { - var db = ResolveDb("首页运营驾驶舱聚合读数"); + var tenantDb = ResolveDb("首页运营驾驶舱聚合读数"); // 今日 0 点(服务器本地时区,运营视角)转 Unix 秒;CreatedTime 审计列为 Unix 秒,同为绝对时间可直接比较 var todayStart = new DateTimeOffset(DateTime.Now.Date).ToUnixTimeSeconds(); // 订单读数:今日订单数 + 待办细分(待发货/退款中为全量待办视角,不限下单日期) - var todayOrderCount = await db.Queryable() + var todayOrderCount = await tenantDb.Queryable() .Where(u => u.CreatedTime >= todayStart) .CountAsync(); - var pendingShipmentCount = await db.Queryable() + var pendingShipmentCount = await tenantDb.Queryable() .Where(u => u.Status == OrderStatusEnum.NotShipped) .CountAsync(); - var refundingCount = await db.Queryable() + var refundingCount = await tenantDb.Queryable() .Where(u => u.Status == OrderStatusEnum.InitiateRefund || u.Status == OrderStatusEnum.RefundAgreement) .CountAsync(); // 玩家读数:总数 + 今日新增(CreatedTime 索引见实体 SugarIndex) - var playerTotalCount = await db.Queryable() + var playerTotalCount = await tenantDb.Queryable() .CountAsync(); - var playerTodayNewCount = await db.Queryable() + var playerTodayNewCount = await tenantDb.Queryable() .Where(u => u.CreatedTime >= todayStart) .CountAsync(); // 区服读数:按 ServerStatus 分组计数(全局 ISafeEnabledFilter 已隐藏禁用区服,AreaTotalCount 即启用区服总数) - var areaStatusCounts = await db.Queryable() + var areaStatusCounts = await tenantDb.Queryable() .GroupBy(u => u.ServerStatus) .Select(u => new { ServerStatus = u.ServerStatus, Count = SqlFunc.AggregateCount(u.Id), }) .ToListAsync(); @@ -93,7 +93,7 @@ public async Task> OverviewAsync() } } - var onlineCount = await GameHomeOnlineCounter.GetTotalOnlineAsync(db, _httpClientFactory); + var onlineCount = await GameHomeOnlineCounter.GetTotalOnlineAsync(tenantDb, _httpClientFactory); return HttpJsonResultData.Success(new GameHomeOverviewResponse { @@ -118,14 +118,14 @@ public async Task> OverviewAsync() [DisplayName("首页 24h 在线人数时序")] public async Task> OnlineTrendAsync() { - var db = ResolveDb("首页在线趋势"); + var tenantDb = ResolveDb("首页在线趋势"); // 当前整点桶(Unix 秒整点值与时区无关)往前共 24 个桶,含当前进行中桶 var currentBucket = DateTimeOffset.UtcNow.ToUnixTimeSeconds() / 3600 * 3600; var earliestBucket = currentBucket - 23 * 3600; // 一次回读窗口内全部采样,内存中按桶归并取每桶最后采样 - var samples = await db.Queryable() + var samples = await tenantDb.Queryable() .Where(u => u.SampleTime >= earliestBucket && u.SampleTime < currentBucket + 3600) .OrderBy(u => u.SampleTime) .ToListAsync(); @@ -157,12 +157,12 @@ public async Task> OnlineTrendAs /// private ISqlSugarClient ResolveDb(string operationName) { - var db = _tenantDbConnectionProvider; - if (db == null) + var tenantDb = _dbConnectionProvider; + if (tenantDb == null) { throw BusinessError.Oh(GameHomeErrorCode.DbUnavailable); } - return db; + return tenantDb; } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs index 1037c9af..4af8b72d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/RolloutSemanticMap/OnlineRolloutSemanticMap.cs @@ -12,7 +12,7 @@ namespace GameFrameX.Application.GmCenter.RolloutSemanticMap; /// 灰度维度SegmentId(玩家分群行)+ Percent玩家 / 事件数据维度命中 + 百分比桶稳定展开,命中记录可查(VC-7.11)设备维度(deviceId) /// 百分比语义PublishPercentMin=1 ~ PublishPercentMax=100(发布语义:0 无意义即拒绝,100 全量)桶序 < percent 即命中,分群未命中直接不生效记录级 RolloutPercent 0-100:0=关闭、100=全量(Math.Clamp 防漂移) /// 短路优先级不设白名单(Admin 不编排个体豁免)分群命中是前置条件,百分比只在分群内展开DeviceWhitelistJson 白名单命中即生效(先于百分比) -/// 稳定性依据不承诺(Admin 不计算桶)同一玩家对同一版本的桶归属稳定(重复判定结果一致,可回溯命中记录)稳定桶 = SHA256(id:appId:deviceId:recordId) % 100,同键恒定 +/// 稳定性依据不承诺(Admin 不计算桶)同一玩家对同一版本的桶归属稳定(重复判定结果一致,可回溯命中记录)稳定桶 = SHA256(tenantId:appId:deviceId:recordId) % 100,同键恒定 /// 回滚语义回滚 = 版本化新下发(新 ConfigVersion 行 + TargetVersion 指向目标历史版本;旧行置 RolledBack 不可变)按新版本命令生效,Online 侧确认版本回执(VC-7.12:回滚后行为恢复 + 审计完整)无版本概念(记录级覆盖),不适用于本对照行 /// /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs index 1caaa30e..6c5ca69f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs @@ -41,19 +41,19 @@ public async Task ExecuteAsync(JobExecutingContext context, CancellationToken st /// 采样落表(桶起点唯一)。 /// 用普通 Insertable/Updateable 而非 DiffLog 变体(lesson:2026-07-13-sqlsugar-insertwithdifflog-prefix-loss)。 /// - private static async Task UpsertSampleAsync(ISqlSugarClient db, long bucketTime, int onlineCount, CancellationToken stoppingToken) + private static async Task UpsertSampleAsync(ISqlSugarClient tenantDb, long bucketTime, int onlineCount, CancellationToken stoppingToken) { - var existing = await db.Queryable() + var existing = await tenantDb.Queryable() .Where(u => u.SampleTime == bucketTime) .FirstAsync(stoppingToken); if (existing != null) { existing.OnlineCount = onlineCount; - await db.Updateable(existing).ExecuteCommandAsync(stoppingToken); + await tenantDb.Updateable(existing).ExecuteCommandAsync(stoppingToken); return; } - await db.Insertable(new Entity.Business.Game.GameHomeOnlineSampleEntity + await tenantDb.Insertable(new Entity.Business.Game.GameHomeOnlineSampleEntity { SampleTime = bucketTime, OnlineCount = onlineCount, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs index c49d46fc..82e852c7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs @@ -14,7 +14,7 @@ public class SystemOpenAccessService : IAdminApiController { private readonly SqlSugarRepository _systemOpenAccessRepository; private readonly SystemCacheService _systemCacheService; - private readonly ISqlSugarClient _tenantDbConnectionProvider; + private readonly ISqlSugarClient _dbConnectionProvider; /// /// 开放接口身份服务构造函数 @@ -25,7 +25,7 @@ public SystemOpenAccessService(SqlSugarRepository system { _systemOpenAccessRepository = systemOpenAccessRepository; _systemCacheService = systemCacheService; - _tenantDbConnectionProvider = dbConnectionProvider; + _dbConnectionProvider = dbConnectionProvider; } /// @@ -153,11 +153,11 @@ public Task GetByKeyAsync([FromQuery] string accessKey) [NonAction] public BoundUser GetBoundUser(SystemOpenAccessEntity openAccess) { - var db = _tenantDbConnectionProvider; - db.QueryFilter.ClearAndBackup(); + var tenantDb = _dbConnectionProvider; + tenantDb.QueryFilter.ClearAndBackup(); try { - var user = db.Queryable().First(u => u.Id == openAccess.BindUserId); + var user = tenantDb.Queryable().First(u => u.Id == openAccess.BindUserId); if (user == null) { throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); @@ -167,7 +167,7 @@ public BoundUser GetBoundUser(SystemOpenAccessEntity openAccess) } finally { - db.QueryFilter.Restore(); + tenantDb.QueryFilter.Restore(); } } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs index 081a8195..86bc7d9e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/PlayerCenter/GameUser/GameUserService.cs @@ -12,12 +12,12 @@ namespace GameFrameX.Application.PlayerCenter.GameUser; [ApiDescriptionSettings(GameConst.GroupName, Order = 111)] public class GameUserService : GenericCrudSelectService { - private readonly GameUserPasswordService _tenantGameUserPasswordService; + private readonly GameUserPasswordService _gameUserPasswordService; public GameUserService(SqlSugarRepository repository, GameUserPasswordService gameUserPasswordService) : base(repository) { - _tenantGameUserPasswordService = gameUserPasswordService; + _gameUserPasswordService = gameUserPasswordService; } /// @@ -50,9 +50,9 @@ public async Task AddByMailAsync(AddGameUserEntityByMailReques } entity = input.Adapt(); - entity.EmailPassword = _tenantGameUserPasswordService.Hash(input.EmailPassword); + entity.EmailPassword = _gameUserPasswordService.Hash(input.EmailPassword); entity.UserName = input.Email; - entity.Password = _tenantGameUserPasswordService.Hash(input.Password); + entity.Password = _gameUserPasswordService.Hash(input.Password); await Repository.InsertAsync(entity); return entity.Adapt(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs index 83accdac..de45aa37 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/SeedData/System/ChannelDefinitionSeedData.cs @@ -16,7 +16,7 @@ public class ChannelDefinitionSeedData : ISqlSugarEntitySeedData public IEnumerable HasData() { - // 字段顺序约定:Code / Name / Description / Scope(1=System) / Id(0=系统) / PlatformCode / ChannelType(1=Official,2=Store,3=Ad,4=Custom) / IsSystemLocked / CreatedTime / UpdateTime / CreatedId / CreatedName / IsDeleted / IsDefault / Id + // 字段顺序约定:Code / Name / Description / Scope(1=System) / TenantId(0=系统) / PlatformCode / ChannelType(1=Official,2=Store,3=Ad,4=Custom) / IsSystemLocked / CreatedTime / UpdateTime / CreatedId / CreatedName / IsDeleted / IsDefault / Id // 分组(每段之间空行):缺省 / 官方 / 商店-iOS / 商店-Android 海外 / 商店-Android 国内厂商 / 商店-Android 国内第三方 / 商店-鸿蒙 / 商店-PC 桌面 / 商店-主机 / 商店-游戏聚合 / 商店-小游戏平台 / 广告-国内 / 广告-海外 / 广告-游戏广告网络 var records = new List { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs index 87823668..990e5e97 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs @@ -104,7 +104,7 @@ private static TResponse Unwrap(string content, string url) where TRe { foreach (var property in payload.EnumerateObject()) { - if (string.Equals(property.Name, "Id", StringComparison.OrdinalIgnoreCase) + if (string.Equals(property.Name, "TenantId", StringComparison.OrdinalIgnoreCase) || string.Equals(property.Name, "AppId", StringComparison.OrdinalIgnoreCase) || string.Equals(property.Name, "ServerId", StringComparison.OrdinalIgnoreCase)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs index c1dc3469..2f34dc0e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs @@ -22,7 +22,7 @@ public class GameRoleController : BaseController private readonly ClientApiTokenIssuer _clientApiTokenIssuer; private readonly GameLoginTicketIssuer _gameLoginTicketIssuer; private readonly Repository _areaService; - private readonly IGamePenaltyEnforcementService _tenantGamePenaltyEnforcementService; + private readonly IGamePenaltyEnforcementService _gamePenaltyEnforcementService; /// /// @@ -43,7 +43,7 @@ public GameRoleController(HttpClient httpClientFactory, _clientApiTokenIssuer = clientApiTokenIssuer; _gameLoginTicketIssuer = gameLoginTicketIssuer; _areaService = areaService; - _tenantGamePenaltyEnforcementService = gamePenaltyEnforcementService; + _gamePenaltyEnforcementService = gamePenaltyEnforcementService; } /// @@ -253,7 +253,7 @@ public async Task> Login([FromBody] } // 处罚事实源登录阻断漏斗:账号级封禁/限制登录命中即拦截 - var accountBlocking = await _tenantGamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, user.Id.ToString()); + var accountBlocking = await _gamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, user.Id.ToString()); if (accountBlocking != null) { _gameLoginTicketIssuer.AuditRejected(user.Id, input.PlayerId, input.AreaId, "account_banned"); @@ -291,7 +291,7 @@ public async Task> Login([FromBody] } // 处罚事实源登录阻断漏斗:角色级封禁/限制登录命中即拦截(按区服作用域过滤) - var roleBlocking = await _tenantGamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Role, entity.Id.ToString(), input.AreaId); + var roleBlocking = await _gamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Role, entity.Id.ToString(), input.AreaId); if (roleBlocking != null) { _gameLoginTicketIssuer.AuditRejected(user.Id, input.PlayerId, input.AreaId, "role_banned"); @@ -367,7 +367,7 @@ private static bool HasForbiddenContextField(GamePlayerLoginRequest input) } return input.ExtraFields.Keys.Any(k => - string.Equals(k, "id", StringComparison.OrdinalIgnoreCase) || + string.Equals(k, "tenantId", StringComparison.OrdinalIgnoreCase) || string.Equals(k, "appId", StringComparison.OrdinalIgnoreCase) || string.Equals(k, "userId", StringComparison.OrdinalIgnoreCase)); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs index 937f62c7..2b916c8f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameUser/GameUserController.cs @@ -24,8 +24,8 @@ public class GameUserController : BaseController private readonly ClientApiTokenIssuer _clientApiTokenIssuer; private readonly ClientApiSessionKeyIssuer _clientApiSessionKeyIssuer; private readonly Repository _gameUserEmailService; - private readonly IGamePenaltyEnforcementService _tenantGamePenaltyEnforcementService; - private readonly GameUserPasswordService _tenantGameUserPasswordService; + private readonly IGamePenaltyEnforcementService _gamePenaltyEnforcementService; + private readonly GameUserPasswordService _gameUserPasswordService; /*private readonly GoogleOAuth2Service _googleOAuth2Service;*/ @@ -50,8 +50,8 @@ GameUserPasswordService gameUserPasswordService _clientApiTokenIssuer = clientApiTokenIssuer; _clientApiSessionKeyIssuer = clientApiSessionKeyIssuer; _gameUserEmailService = gameUserEmailService; - _tenantGamePenaltyEnforcementService = gamePenaltyEnforcementService; - _tenantGameUserPasswordService = gameUserPasswordService; + _gamePenaltyEnforcementService = gamePenaltyEnforcementService; + _gameUserPasswordService = gameUserPasswordService; /*_googleOAuth2Service = googleOAuth2Service;*/ } @@ -73,7 +73,7 @@ public async Task> WeChatLogin([Fr entity.Name = input.WeChatName ?? ""; entity.UserName = input.WeChatName ?? string.Empty; entity.Status = GameUserStatus.Active; - entity.Password = _tenantGameUserPasswordService.Hash(entity.Id.ToString()); + entity.Password = _gameUserPasswordService.Hash(entity.Id.ToString()); entity.WeChatId = input.WeChatId; EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); @@ -162,7 +162,7 @@ public async Task> UnbindWeChatGam // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } @@ -205,7 +205,7 @@ public async Task> QQLogin([FromBo entity.Name = input.QQName ?? ""; entity.UserName = input.QQName ?? string.Empty; entity.Status = GameUserStatus.Active; - entity.Password = _tenantGameUserPasswordService.Hash(entity.Id.ToString()); + entity.Password = _gameUserPasswordService.Hash(entity.Id.ToString()); entity.QqId = input.QQId; EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); @@ -295,7 +295,7 @@ public async Task> UnbindQQGameUse // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } @@ -338,7 +338,7 @@ public async Task> FacebookLogin([ entity.Name = input.FacebookName ?? ""; entity.UserName = input.FacebookName ?? string.Empty; entity.Status = GameUserStatus.Active; - entity.Password = _tenantGameUserPasswordService.Hash(entity.Id.ToString()); + entity.Password = _gameUserPasswordService.Hash(entity.Id.ToString()); entity.FacebookId = input.FacebookId; EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); @@ -428,7 +428,7 @@ public async Task> UnbindFacebookG // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } @@ -476,7 +476,7 @@ public async Task> EmailReset([From return GameApiResult.Error(AccountErrorCode.EmailCodeNotFoundOrExpired, "验证码错误或已过期,请重新获取验证码。"); } - gameUserEntity.EmailPassword = _tenantGameUserPasswordService.Hash(input.Password); + gameUserEntity.EmailPassword = _gameUserPasswordService.Hash(input.Password); var updateRows = await PRepository.Context.UpdateWithOptimisticLockAsync(gameUserEntity); if (updateRows > 0) { @@ -514,7 +514,7 @@ public async Task> EmailRegister([ entity.Name = input.UserName ?? string.Empty; entity.Email = input.UserName ?? string.Empty; entity.Status = GameUserStatus.Active; - entity.EmailPassword = _tenantGameUserPasswordService.Hash(input.Password); + entity.EmailPassword = _gameUserPasswordService.Hash(input.Password); EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); if (insertAsync) @@ -539,11 +539,11 @@ public async Task> EmailLogin([Fro if (entity == null) { // 账号不存在:执行一次假 Verify 抵御账号枚举(耗时与密码错误路径一致),统一返回账号或密码错误,不泄露账号是否存在 - _tenantGameUserPasswordService.Verify(input.Password, GameUserPasswordService.EnumerationDecoyHash); + _gameUserPasswordService.Verify(input.Password, GameUserPasswordService.EnumerationDecoyHash); return GameApiResult.Error(AccountErrorCode.AccountOrPasswordByEmailError, "账号或密码错误"); } - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordByEmailError, "账号或密码错误"); } @@ -595,7 +595,7 @@ public async Task> BindEmail([From // 更新用户的邮箱账号信息 entity.Email = input.Email; - entity.EmailPassword = _tenantGameUserPasswordService.Hash(input.Password); + entity.EmailPassword = _gameUserPasswordService.Hash(input.Password); var executeCommandAsync = await PRepository.AsUpdateable(entity).UpdateColumns(u => new { u.Email, u.EmailPassword, }).ExecuteCommandWithOptLockAsync(true); if (executeCommandAsync > 0) @@ -636,7 +636,7 @@ public async Task> UnbindEmailGame // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.Verify(input.Password, entity.EmailPassword)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } @@ -679,7 +679,7 @@ public async Task> Register([FromB var entity = input.Adapt(); entity.Name = input.UserName; entity.Status = GameUserStatus.Active; - entity.Password = _tenantGameUserPasswordService.Hash(input.Password); + entity.Password = _gameUserPasswordService.Hash(input.Password); EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); if (insertAsync) @@ -704,11 +704,11 @@ public async Task> Login([FromBody if (entity == null) { // 账号不存在:执行一次假 Verify 抵御账号枚举(耗时与密码错误路径一致),统一返回账号或密码错误,不泄露账号是否存在 - _tenantGameUserPasswordService.Verify(input.Password, GameUserPasswordService.EnumerationDecoyHash); + _gameUserPasswordService.Verify(input.Password, GameUserPasswordService.EnumerationDecoyHash); return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "账号或密码错误"); } - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) + if (!_gameUserPasswordService.Verify(input.Password, entity.Password)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "账号或密码错误"); } @@ -748,7 +748,7 @@ public async Task> DeviceLogin([Fr Name = "device:" + input.DeviceId, DeviceId = input.DeviceId, Status = GameUserStatus.Active, - Password = _tenantGameUserPasswordService.Hash(Guid.NewGuid().ToString("N")) + Password = _gameUserPasswordService.Hash(Guid.NewGuid().ToString("N")) }; EnsureUserStringDefaults(entity); // ponytail: DeviceId 无唯一索引,并发首登可能建重号;客户端按 Token 归属使用 @@ -874,7 +874,7 @@ public async Task> AppleLogin([Fro entity.Name = input.AppleName ?? ""; entity.UserName = input.AppleName ?? string.Empty; entity.Status = GameUserStatus.Active; - entity.Password = _tenantGameUserPasswordService.Hash(entity.Id.ToString()); + entity.Password = _gameUserPasswordService.Hash(entity.Id.ToString()); entity.AppleId = input.AppleId; EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); @@ -923,7 +923,7 @@ public async Task> UnbindAppleGame // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) + if (!_gameUserPasswordService.Verify(input.Password, entity.Password)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } @@ -1006,7 +1006,7 @@ public async Task> GoogleLogin([Fr entity.Name = input.GoogleName ?? ""; entity.UserName = input.GoogleName ?? string.Empty; entity.Status = GameUserStatus.Active; - entity.Password = _tenantGameUserPasswordService.Hash(entity.Id.ToString()); + entity.Password = _gameUserPasswordService.Hash(entity.Id.ToString()); entity.GoogleId = input.GoogleId; EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); @@ -1055,7 +1055,7 @@ public async Task> UnbindGoogleGam // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) + if (!_gameUserPasswordService.Verify(input.Password, entity.Password)) { return GameApiResult.Error(AccountErrorCode.AccountOrPasswordError, "密码错误"); } @@ -1227,7 +1227,7 @@ private static void EnsureUserStringDefaults(GameUserEntity entity) private async Task CreateLoginOutputAsync(GameUserEntity entity, string provider) { // 处罚事实源登录阻断漏斗:账号级封禁/限制登录命中即拦截 Token 签发 - var blocking = await _tenantGamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, entity.Id.ToString()); + var blocking = await _gamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, entity.Id.ToString()); if (blocking != null) { throw new PenaltyLoginBlockedException((int)AccountErrorCode.AccountBanned, $"账号已被封禁:{blocking.Reason}"); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs index 3cb2780b..1b19353a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs @@ -41,7 +41,7 @@ public GameAdWebHookController(SqlSugarRepository s /// 验签 + 幂等账本 + 发奖由 处理;本端点仅保留 C59 公开回调路由与 HTTP 形状。 /// [PublicCallbackEndpoint("topon", "ad")] - [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] public async Task TopOnNotify() { var result = await _advertisementRewardService.ReceiveTopOnAsync(); @@ -54,7 +54,7 @@ public async Task TopOnNotify() /// 租户身份只来自公开回调 URL 路由上下文;验签走 (仅验签,不进发奖链路),签名通过后才允许查询广告发放记录。 /// [PublicCallbackEndpoint("pangle", "ad")] - [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] public async Task PangleGlobalNotify([FromQuery] AdvertisementPangleGlobalGameEntityRequest input) { var advertisementOptions = await _optionsProvider.GetAdvertisementCallbackOptionsAsync(); @@ -86,7 +86,7 @@ public async Task PangleGlobalNotify([FromQuery] AdvertisementPangle /// 发放成功后保留对 的写入(C75/C91 应用作用域事实,范围外不动)。 /// [PublicCallbackEndpoint("admob", "ad")] - [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] public async Task AdMobNotify([FromQuery] AdMobCallbackRequest input) { var result = await _advertisementRewardService.ReceiveAdMobAsync(); @@ -107,7 +107,7 @@ public async Task AdMobNotify([FromQuery] AdMobCallbackRequest input /// 验签 + 幂等账本 + 发奖由 处理(C114 新增端点)。 /// [PublicCallbackEndpoint("unityads", "ad")] - [HttpGet("{id:long}/{appId:long}/{packageId:long?}")] + [HttpGet("{tenantId:long}/{appId:long}/{packageId:long?}")] public async Task UnityAdsNotify([FromQuery] AdvertisementUnityAdsCallbackRequest input) { var result = await _advertisementRewardService.ReceiveUnityAdsAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs index 2d22dc21..138a2624 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs @@ -100,7 +100,7 @@ public async Task> NotifyApple() if (applePaymentOptionSetting == null || applePayNotificationPayload == null || string.IsNullOrWhiteSpace(transactionPayloadJson)) { - LogHelper.Error("Apple支付配置未找到或 JWS 签名验证失败。请检查 id/appId/env 对应的后台支付配置"); + LogHelper.Error("Apple支付配置未找到或 JWS 签名验证失败。请检查 tenantId/appId/env 对应的后台支付配置"); Response.StatusCode = 400; return HttpJsonResultData.ValidationError(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs index 0747360e..b4f86d33 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs @@ -36,7 +36,7 @@ public class PaymentOptionSettingProvider : IPaymentOptionSettingProvider PropertyNameCaseInsensitive = true, }; - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _dbProvider; private readonly IHttpContextAccessor _httpContextAccessor; /// @@ -44,7 +44,7 @@ public class PaymentOptionSettingProvider : IPaymentOptionSettingProvider /// public PaymentOptionSettingProvider(ISqlSugarClient dbProvider, IHttpContextAccessor httpContextAccessor) { - _tenantDbProvider = dbProvider; + _dbProvider = dbProvider; _httpContextAccessor = httpContextAccessor; } @@ -74,7 +74,7 @@ public IEnumerable GetOptionSettings(string channelName) } var context = _httpContextAccessor.HttpContext; - var packageId = ResolveCurrentPackageId(context, _tenantDbProvider); + var packageId = ResolveCurrentPackageId(context, _dbProvider); return GetPaymentConfigs(normalizedChannel, packageId) .Where(config => !string.IsNullOrWhiteSpace(config.ConfigJson)) // C372(GFX-838):支付配置读取边界字段级解密(C371 起库内敏感字段密文; @@ -120,7 +120,7 @@ public IEnumerable GetOptionSettings(string channelName) where T : class, private List GetPaymentConfigs(string channelName, long? packageId) { var context = _httpContextAccessor.HttpContext; - var db = _tenantDbProvider; + var db = _dbProvider; var environments = GetRequestedEnvironments(context); var hasPackageId = packageId.HasValue; var packageIdValue = packageId.GetValueOrDefault(); @@ -163,7 +163,7 @@ private List GetPaymentConfigs(string channelName, long /// /// 按公开回调路由规范化支付渠道的回调通知地址(C401,GFX-1213):站点根地址自动补全路由段 - /// (含当前分包段),旧「回调/{id}/{appId}/{packageId}」三段地址自动去段重建; + /// (含当前分包段),旧「回调/{tenantId}/{appId}/{packageId}」三段地址自动去段重建; /// 无法识别的地址置空并由支付处理器按「通知地址未配置」拒绝下单,避免网关回调打在无法命中的地址上 /// 导致已付款订单不发货。其余渠道地址原样透传。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs index 38a6840f..19fddb3a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs @@ -14,7 +14,7 @@ namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// public sealed class ClientApiOptionsProvider : IClientApiOptionsProvider { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _dbProvider; private readonly IHttpContextAccessor _httpContextAccessor; private ClientApiPolicyEntity? _effectivePolicyRow; @@ -22,7 +22,7 @@ public sealed class ClientApiOptionsProvider : IClientApiOptionsProvider public ClientApiOptionsProvider(ISqlSugarClient database, IHttpContextAccessor httpContextAccessor) { - _tenantDbProvider = database; + _dbProvider = database; _httpContextAccessor = httpContextAccessor; } @@ -30,7 +30,7 @@ public ClientApiOptionsProvider(ISqlSugarClient database, IHttpContextAccessor h #pragma warning disable CS8603 // 接口 IClientApiOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake public async Task GetEmailOptionsAsync() { - var db = _tenantDbProvider; + var db = _dbProvider; var entity = await EmailConfigSelector.SelectAsync(db, 0); return entity == null ? null @@ -84,7 +84,7 @@ public async Task GetAdvertisementCallbackOptionsA private async Task PickAdvertisementCallbackConfigAsync() { - var db = _tenantDbProvider; + var db = _dbProvider; var provider = ResolvePublicCallbackProvider(_httpContextAccessor.HttpContext); var query = db.Queryable() .Where(c => c.IsEnabled == true); @@ -151,7 +151,7 @@ public async Task GetAreaPolicyAsync() { if (!_effectivePolicyRowFetched) { - _effectivePolicyRow = await _tenantDbProvider.Queryable() + _effectivePolicyRow = await _dbProvider.Queryable() .Where(c => c.IsEnabled == true) .OrderByDescending(c => c.Id) .FirstAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs index 344c15d1..e01555b1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs @@ -12,12 +12,12 @@ namespace GameFrameX.Client.Api.Services.GameLoginTicket; /// public sealed class GameLoginTicketKeyResolver : IGameLoginTicketKeyResolver { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _dbProvider; private readonly IClientApiOptionsProvider _optionsProvider; public GameLoginTicketKeyResolver(ISqlSugarClient dbProvider, IClientApiOptionsProvider optionsProvider) { - _tenantDbProvider = dbProvider; + _dbProvider = dbProvider; _optionsProvider = optionsProvider; } @@ -65,7 +65,7 @@ public async Task> GetPublicKeysAs /// private async Task> GetActiveKeyEntitiesAsync(long now) { - var db = _tenantDbProvider; + var db = _dbProvider; return await db.Queryable() .Where(x => x.IsEnabled != false && x.Algorithm == GameLoginTicketSigningKey.AlgorithmRs256 && @@ -81,7 +81,7 @@ private async Task> GetActiveKeyEntitiesAsync(lon /// private async Task CreateRsaKeyEntityAsync(long now) { - var db = _tenantDbProvider; + var db = _dbProvider; using (var rsa = RSA.Create(2048)) { var entity = new GameLoginTicketKeyEntity diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs index 71c07020..0d459a94 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs @@ -21,11 +21,11 @@ namespace GameFrameX.Client.Api.Services.PackageVersion; public class GameAppPackageResolver { private PackageCache? _cache; - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _dbProvider; public GameAppPackageResolver(ISqlSugarClient dbProvider) { - _tenantDbProvider = dbProvider; + _dbProvider = dbProvider; } /// @@ -62,7 +62,7 @@ public string Resolve(string sourcePackageName) /// private PackageCache RefreshCacheIfChanged() { - var db = _tenantDbProvider; + var db = _dbProvider; var signal = GetSignal(db); if (_cache is { } existing && existing.Signal == signal) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs index f6da4671..4eaa7ce2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackNotifyUrlBuilder.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Client.Api.Services.PublicCallback; /// /// 公开回调通知地址构造器。 /// 管理员配置可能是:站点根地址(含反向代理前缀)、完整的新回调路由地址、或路由升级前遗留的 -/// 旧「回调/{id}/{appId}/{packageId}」三段地址。本构造器统一规范化为能命中当前公开回调端点 +/// 旧「回调/{tenantId}/{appId}/{packageId}」三段地址。本构造器统一规范化为能命中当前公开回调端点 /// ({packageId} 可选路由模板)的完整地址:路由段之后遗留的纯数字尾段(至多 3 段)一律剥除后 /// 按当前上下文重建,分包段以当前下单上下文的分包标识为准(无则生成不带分包段的主库地址)。 /// 无法识别的路径返回 null,由调用方在下单前拒绝,避免网关回调打在无法命中的地址上导致已付款订单不发货。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs index 65ea7fe4..2ba6b6b9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/AdminEndpointParameterShapeContractTests.cs @@ -16,7 +16,7 @@ namespace GameFrameX.Core.Tests.Architecture; // 单 Request DTO(类型名以 Request/Input 结尾;泛型取泛型定义名,如 DataExportRequest) // 违规形状 —— 参数 ≥ 2(散参数 / body+query 混合绑定); // 入参为 object/dynamic/ExpandoObject/IDynamicMetaObjectProvider(动态参数零容忍); -// 入参为 *Entity(Entity 直传:Id/IsDeleted 等系统字段进入请求契约构成越权攻击面,C228 入参侧对偶) +// 入参为 *Entity(Entity 直传:TenantId/IsDeleted 等系统字段进入请求契约构成越权攻击面,C228 入参侧对偶) // 扫描范围:三程序集(Application.Platform / Application.Platform / Core.Service)全部 concrete IAdminApiController 实现, // 方法枚举含继承链(覆盖 GenericCrudService<,,,,> 泛型族基类 action 的实例化入参), // 过滤 [NonAction] / IsSpecialName / object 声明;违规按声明类名归因(泛型取泛型定义名)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs index 46bc0d01..20b640bc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs @@ -45,12 +45,12 @@ public async Task SignatureKey_AddAndRotate_RevealPlaintextOnce_StoreCipherOnly( new Repository(_db.MainDb)); var added = await service.AddAsync(new AppSignatureKeyAddRequest { Remark = "unit-add", }); - var storedAdded = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); + var storedAdded = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); Assert.StartsWith(SecretCrypto.EncryptedPrefix, storedAdded.Secret, StringComparison.Ordinal); Assert.Equal(added.Secret, SecretCrypto.Decrypt(storedAdded.Secret)); var rotated = await service.RotateAsync(new AppSignatureKeyRotateRequest { }); - var storedRotated = _db.Db.Queryable().Filter(null, true).First(u => u.Id == rotated.Id); + var storedRotated = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == rotated.Id); Assert.StartsWith(SecretCrypto.EncryptedPrefix, storedRotated.Secret, StringComparison.Ordinal); Assert.Equal(rotated.Secret, SecretCrypto.Decrypt(storedRotated.Secret)); Assert.NotEqual(storedAdded.Secret, storedRotated.Secret); @@ -74,7 +74,7 @@ public async Task AdvertisementConfig_AddEncryptsColumnsAndSensitiveJsonFields_M ConfigJson = configJson, }); - var stored = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); + var stored = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); Assert.StartsWith(SecretCrypto.EncryptedPrefix, stored.SigningSecret, StringComparison.Ordinal); Assert.Equal("ad-plain-secret", SecretCrypto.Decrypt(stored.SigningSecret)); @@ -98,7 +98,7 @@ await service.UpdateAsync(new UpdateAdvertisementCallbackConfigRequest ConfigJson = "{\"callbackUrl\":\"https://cb.example.com/hook\",\"signingSecret\":\"******\"}", RowVersion = stored.RowVersion, }); - stored = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); + stored = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); Assert.Equal(cipherJsonBefore, stored.ConfigJson); Assert.StartsWith(SecretCrypto.EncryptedPrefix, stored.SigningSecret, StringComparison.Ordinal); Assert.Equal("ad-plain-secret", SecretCrypto.Decrypt(stored.SigningSecret)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ReadActionClassifierTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ReadActionClassifierTests.cs index 56241c0d..2445b42d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ReadActionClassifierTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/ReadActionClassifierTests.cs @@ -25,7 +25,7 @@ public class ReadActionClassifierTests [InlineData("Count", true)] [InlineData("Exist", true)] [InlineData("Add", false)] - [InlineData("Add", false)] + [InlineData("AddTenant", false)] [InlineData("Update", false)] [InlineData("Update", false)] [InlineData("Delete", false)] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs index 131b3f5c..263eacf7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiAccountEndpointTests.cs @@ -26,7 +26,7 @@ public async Task GameUser_Register_ReturnsPascalCaseAccessTokenAndPersistsActiv var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); - var saved = await db.Db.Queryable().FirstAsync(u => u.UserName == "guest-c108"); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.UserName == "guest-c108"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.False(string.IsNullOrWhiteSpace(data.GetProperty("AccessToken").GetString())); Assert.Equal("Guest", data.GetProperty("Provider").GetString()); @@ -110,7 +110,7 @@ public async Task GameUser_LogOff_WithValidTokenMarksAccountDeleting() }); var root = ClientApiResultReader.Read(result); - var saved = await db.Db.Queryable().FirstAsync(u => u.Id == user.Id); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == user.Id); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(GameUserStatus.Deleted, saved.Status); Assert.NotNull(saved.DeletedTime); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs index e529301a..771f2973 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs @@ -80,7 +80,7 @@ public async Task GameAssetPackageVersion_GetInfo_BuildsPascalCaseAssetPathWitho var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); // GFX-706:GetInfo 纯只读——设备注册副作用已拆至 RegisterDevice,携带标识调用也不写设备表 - var deviceCount = await db.Db.Queryable().CountAsync(); + var deviceCount = await db.TenantDb.Queryable().CountAsync(); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(0, deviceCount); Assert.Equal("2026.07.18", data.GetProperty("Version").GetString()); @@ -111,7 +111,7 @@ public async Task GameAssetPackageVersion_RegisterDevice_IdempotentByIdentifier( var firstRoot = ClientApiResultReader.Read(first); var secondRoot = ClientApiResultReader.Read(second); - var deviceCount = await db.Db.Queryable().CountAsync(); + var deviceCount = await db.TenantDb.Queryable().CountAsync(); Assert.Equal(0, ClientApiResultReader.Code(firstRoot)); Assert.Equal(0, ClientApiResultReader.Code(secondRoot)); // 幂等:两次注册仅落一行,DeviceId 一致 @@ -222,7 +222,7 @@ public async Task GameLoginTicketKey_PublicKeys_WithoutRequestScope_ReturnsKeys( var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); var key = ClientApiResultReader.Data(root)[0]; - Assert.False(key.TryGetProperty("Id", out _)); + Assert.False(key.TryGetProperty("TenantId", out _)); Assert.False(key.TryGetProperty("AppId", out _)); } @@ -236,12 +236,12 @@ public async Task GameLoginTicketKeyResolver_PublicKeys_DoesNotAutoCreateSigning var publicKeys = await resolver.GetPublicKeysAsync(); Assert.Empty(publicKeys); - Assert.Equal(0, await db.Db.Queryable().CountAsync()); + Assert.Equal(0, await db.TenantDb.Queryable().CountAsync()); var signingKey = await resolver.ResolveSigningKeyAsync(); Assert.False(string.IsNullOrWhiteSpace(signingKey.Kid)); - Assert.Equal(1, await db.Db.Queryable().CountAsync()); + Assert.Equal(1, await db.TenantDb.Queryable().CountAsync()); Assert.Single(await resolver.GetPublicKeysAsync()); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs index 4bee0f30..91a63685 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs @@ -6,10 +6,10 @@ internal static class ClientApiEndpointCoverageMatrix { private static readonly ClientApiEndpointCoverage[] Endpoints = { - Endpoint("GameAdWebHook.TopOnNotify", "GET", "api/GameAdWebHook/TopOnNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid TopOn callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), - Endpoint("GameAdWebHook.PangleGlobalNotify", "GET", "api/GameAdWebHook/PangleGlobalNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid Pangle callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-app"), - Endpoint("GameAdWebHook.AdMobNotify", "GET", "api/GameAdWebHook/AdMobNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid AdMob callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-tenant"), - Endpoint("GameAdWebHook.UnityAdsNotify", "GET", "api/GameAdWebHook/UnityAdsNotify/{id:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid UnityAds callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback"), + Endpoint("GameAdWebHook.TopOnNotify", "GET", "api/GameAdWebHook/TopOnNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid TopOn callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-package"), + Endpoint("GameAdWebHook.PangleGlobalNotify", "GET", "api/GameAdWebHook/PangleGlobalNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid Pangle callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-app"), + Endpoint("GameAdWebHook.AdMobNotify", "GET", "api/GameAdWebHook/AdMobNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid AdMob callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback", "cross-tenant"), + Endpoint("GameAdWebHook.UnityAdsNotify", "GET", "api/GameAdWebHook/UnityAdsNotify/{tenantId:long}/{appId:long}/{packageId:long?}", "ad-callback", true, true, false, true, "valid UnityAds callback grants reward once", "invalid-route", "signature-failed", "duplicate-callback"), Endpoint("GameAnnouncement.List", "GET", "api/GameAnnouncementService/List", "announcement", true, true, false, false, "lists enabled announcements by language", "missing-tenant", "disabled-record-hidden"), Endpoint("GameAnnouncement.ListByAreaId", "POST", "api/GameAnnouncementService/ListByAreaId", "announcement", true, true, false, false, "lists enabled area announcements", "missing-tenant", "area-not-found"), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs index b7374e53..a906d7b7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs @@ -54,7 +54,7 @@ public void PublicCallbackEndpoints_DeclareOptionalPackageBoundary() foreach (var endpoint in callbacks) { Assert.Contains("invalid-route", endpoint.FailureCases); - Assert.DoesNotContain("{id:long}", endpoint.Route); + Assert.DoesNotContain("{tenantId:long}", endpoint.Route); Assert.DoesNotContain("{appId:long}", endpoint.Route); Assert.False(endpoint.Requires); Assert.False(endpoint.RequiresApp); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs index d9cc3624..fc1c5ba0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs @@ -137,7 +137,7 @@ public async Task GetInfo_AfterConfigChange_VersionChangesAndReturnsFullList() var oldVersion = first.GetProperty("Version").GetString(); row.ValueJson = "{\"v\":2}"; - db.Db.Updateable(row).ExecuteCommand(); + db.TenantDb.Updateable(row).ExecuteCommand(); var second = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.GetInfo(Request(version: oldVersion)))); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs index decbd77e..20417629 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiGameUserDeviceLoginEndpointTests.cs @@ -31,7 +31,7 @@ public async Task GameUser_DeviceLogin_FirstLoginCreatesAccountWithIsNewRegister var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); - var saved = await db.Db.Queryable().FirstAsync(u => u.DeviceId == "device-c320-a1"); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.DeviceId == "device-c320-a1"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.True(data.GetProperty("IsNewRegister").GetBoolean()); Assert.Equal("Device", data.GetProperty("Provider").GetString()); @@ -62,7 +62,7 @@ public async Task GameUser_DeviceLogin_SecondLoginFindsAccountWithoutReRegister( var secondRoot = ClientApiResultReader.Read(second); var firstData = ClientApiResultReader.Data(firstRoot); var secondData = ClientApiResultReader.Data(secondRoot); - var count = await db.Db.Queryable().CountAsync(u => u.DeviceId == "device-c320-a2"); + var count = await db.TenantDb.Queryable().CountAsync(u => u.DeviceId == "device-c320-a2"); Assert.Equal(0, ClientApiResultReader.Code(secondRoot)); // 二次登录找号复用既有账号:IsNewRegister=false 且不重复建号 Assert.True(firstData.GetProperty("IsNewRegister").GetBoolean()); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs index 8df584ba..e2e6086c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiOrderCreateTests.cs @@ -39,7 +39,7 @@ public async Task GameOrder_Create_PersistsTrustedOrderWhenPaymentChannelSucceed var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); - var saved = await db.Db.Queryable().FirstAsync(u => u.RoleId == "3001"); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.RoleId == "3001"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal("provider-order-1", data.GetProperty("OrderId").GetString()); Assert.Equal(OrderStatusEnum.Unpaid, saved.Status); @@ -93,7 +93,7 @@ public async Task GameOrder_Create_RejectsUnsupportedPayChannel() }); var root = ClientApiResultReader.Read(result); - var orderCount = await db.Db.Queryable().CountAsync(); + var orderCount = await db.TenantDb.Queryable().CountAsync(); Assert.Equal((int)PaymentErrorCode.PayChannelNotSupported, ClientApiResultReader.Code(root)); Assert.Equal("不支持的支付渠道", ClientApiResultReader.Message(root)); Assert.Equal(0, orderCount); @@ -107,7 +107,7 @@ private static GameOrderController CreateController(ClientApiTestDb db, IPayment FakeOptionsProvider.WithAreaPolicy(false), db.Repository(), new HttpClient(ClientApiRecordingHttpHandler.WithGameServerDefaults(), false), - new GameOrderShipService(db.Db, new ClientApiTestHttpClientFactory(ClientApiRecordingHttpHandler.WithGameServerDefaults())), + new GameOrderShipService(db.TenantDb, new ClientApiTestHttpClientFactory(ClientApiRecordingHttpHandler.WithGameServerDefaults())), factory, new TestGooglePubSubPushAuthenticator(), new TestGooglePlayPurchaseService()); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs index 0737623e..0bad1536 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPaymentCallbackEndpointTests.cs @@ -39,8 +39,8 @@ public async Task GameOrder_NotifyAliPay_ValidSignatureShipsOrderOnce() var result = await controller.NotifyAliPay(); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -62,7 +62,7 @@ public async Task GameOrder_NotifyAliPay_RejectsInvalidSignature() var result = await controller.NotifyAliPay(); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal((int)AuthErrorCode.SignatureVerifyFailed, ClientApiResultReader.Code(root)); Assert.Equal("签名验证失败", ClientApiResultReader.Message(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); @@ -88,7 +88,7 @@ public async Task GameOrder_NotifyXsolla_ValidSignatureShipsOrderOnce() var result = await controller.NotifyXsolla(); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal("9007001", order.ProviderTransactionId); @@ -141,7 +141,7 @@ public async Task GameOrder_NotifyGoogle_ValidAuthenticatedPushShipsOrderOnce() var result = await controller.NotifyGoogle(); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal("google-provider-order-1", order.ProviderTransactionId); @@ -201,7 +201,7 @@ public async Task GameOrder_NotifyApple_ValidJwsShipsOrderOnce() var result = await controller.NotifyApple(); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal("apple-transaction-1", order.AppleTransactionId); @@ -235,7 +235,7 @@ private static GameOrderController CreateController( FakeOptionsProvider.WithAreaPolicy(false), db.Repository(), new HttpClient(handler, false), - new GameOrderShipService(db.Db, new ClientApiTestHttpClientFactory(handler)), + new GameOrderShipService(db.TenantDb, new ClientApiTestHttpClientFactory(handler)), factory, authenticator ?? new TestGooglePubSubPushAuthenticator(false), googlePurchaseService ?? new TestGooglePlayPurchaseService(null)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs index 4b655e0a..edeb3894 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiPenaltyEnforcementTests.cs @@ -130,6 +130,6 @@ private static void SeedPenalty( ExpireTime = expiresAt?.ToUnixTimeSeconds(), OperatorId = 1, }; - db.Db.Insertable(entity).ExecuteCommand(); + db.TenantDb.Insertable(entity).ExecuteCommand(); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs index 6acd6275..217f1fb7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs @@ -30,8 +30,8 @@ public async Task GameRedeemCode_Consume_AppliesRewardsAndWritesUseRecord() }); var root = ClientApiResultReader.Read(result); - var usedRecordCount = await db.Db.Queryable().CountAsync(); - var code = await db.Db.Queryable().FirstAsync(u => u.Code == "C108-REDEEM"); + var usedRecordCount = await db.TenantDb.Queryable().CountAsync(); + var code = await db.TenantDb.Queryable().FirstAsync(u => u.Code == "C108-REDEEM"); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(1, usedRecordCount); Assert.Equal(1, code.UsedCount); @@ -89,7 +89,7 @@ public async Task GameRedeemCode_Consume_RejectsAlreadyUsedCode() new PropertyItemResponse { Id = 11, ItemId = 11, Count = 2, }, })); db.InitBusinessTables(typeof(GameRedeemCodeUseRecordEntity)); - await db.Db.Insertable(new GameRedeemCodeUseRecordEntity + await db.TenantDb.Insertable(new GameRedeemCodeUseRecordEntity { Id = 9001, AreaId = 2001, @@ -154,7 +154,7 @@ public async Task GameRedeemCode_Consume_AllowsWithoutChannelLimit() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usageCount = await db.Db.Queryable().CountAsync(); + var usageCount = await db.TenantDb.Queryable().CountAsync(); Assert.Equal(0, usageCount); } @@ -182,7 +182,7 @@ public async Task GameRedeemCode_Consume_AllowsWhenChannelRoleUsageLimitZero() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usageCount = await db.Db.Queryable().CountAsync(); + var usageCount = await db.TenantDb.Queryable().CountAsync(); Assert.Equal(0, usageCount); } @@ -204,7 +204,7 @@ public async Task GameRedeemCode_Consume_RejectsWhenChannelRoleLimitReached() new PropertyItemResponse { Id = 12, ItemId = 12, Count = 1, }, }), channelId: 5001); db.InitBusinessTables(typeof(GameRedeemCodeChannelRoleUsageEntity)); - await db.Db.Insertable(new GameRedeemCodeChannelRoleUsageEntity + await db.TenantDb.Insertable(new GameRedeemCodeChannelRoleUsageEntity { Id = 9001, ChannelId = 5001, @@ -253,7 +253,7 @@ public async Task GameRedeemCode_Consume_AccumulatesChannelRoleUsageOnSuccess() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usage = await db.Db.Queryable() + var usage = await db.TenantDb.Queryable() .Where(u => u.ChannelId == 5001 && u.RoleId == 3001).FirstAsync(); Assert.NotNull(usage); Assert.Equal(1, usage.UsedCount); @@ -278,7 +278,7 @@ public async Task GameRedeemCode_Consume_IncrementsExistingChannelRoleUsage() new PropertyItemResponse { Id = 12, ItemId = 12, Count = 1, }, }), channelId: 5001); db.InitBusinessTables(typeof(GameRedeemCodeChannelRoleUsageEntity)); - await db.Db.Insertable(new GameRedeemCodeChannelRoleUsageEntity + await db.TenantDb.Insertable(new GameRedeemCodeChannelRoleUsageEntity { Id = 9001, ChannelId = 5001, @@ -299,7 +299,7 @@ await db.Db.Insertable(new GameRedeemCodeChannelRoleUsageEntity var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - var usage = await db.Db.Queryable() + var usage = await db.TenantDb.Queryable() .Where(u => u.ChannelId == 5001 && u.RoleId == 3001).FirstAsync(); Assert.Equal(2, usage.UsedCount); Assert.Equal("C108-INC-B", usage.LastCode); @@ -340,9 +340,9 @@ public async Task GameRedeemCode_Consume_DifferentChannelsDoNotShareQuota() Assert.Equal(0, ClientApiResultReader.Code(ClientApiResultReader.Read(first))); Assert.Equal(0, ClientApiResultReader.Code(ClientApiResultReader.Read(second))); - var countA = await db.Db.Queryable() + var countA = await db.TenantDb.Queryable() .Where(u => u.ChannelId == 5001 && u.RoleId == 3001).CountAsync(); - var countB = await db.Db.Queryable() + var countB = await db.TenantDb.Queryable() .Where(u => u.ChannelId == 5002 && u.RoleId == 3001).CountAsync(); Assert.Equal(1, countA); Assert.Equal(1, countB); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs index d7f357a7..57aafaaa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs @@ -33,7 +33,7 @@ public async Task GameRole_Add_CreatesRoleWithoutAppContext() }); var root = ClientApiResultReader.Read(result); - var saved = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(1001, saved.UserId); Assert.Equal(1, handler.Count("/game/api/req_player_create")); @@ -67,7 +67,7 @@ public async Task GameRole_ChangePlayerName_UpdatesNameAfterGameServerAccepts() var result = await controller.ChangePlayerName(new GamePlayerChangeNameRequest { PlayerId = 3001, AreaId = 2001, Name = "New", }); var root = ClientApiResultReader.Read(result); - var saved = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal("New", saved.Name); } @@ -146,7 +146,7 @@ public async Task GameRole_Delete_FakeDeletesExistingRole() var result = await controller.Delete(new DeleteGameRoleEntityRequest { Id = 3001, }); var root = ClientApiResultReader.Read(result); - var saved = await db.Db.Queryable().Filter(null, true).FirstAsync(u => u.Id == 3001); + var saved = await db.TenantDb.Queryable().Filter(null, true).FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.True(saved.IsDeleted); } @@ -160,7 +160,7 @@ public async Task GameRole_Login_IssuesGameTicketForOwnedRole() db.SeedArea(2001, 10); db.SeedRole(3001, 1001, 2001); var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); - var accessToken = await issuer.IssueAsync(await db.Db.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); + var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); var controller = CreateController(db, ClientApiRecordingHttpHandler.WithGameServerDefaults(), issuer); db.AttachContext(controller); @@ -192,7 +192,7 @@ public async Task GameRole_Login_RejectsBodyContextOverrideFields() AccessToken = "token", ExtraFields = new Dictionary { - ["id"] = JsonDocument.Parse("10").RootElement.Clone(), + ["tenantId"] = JsonDocument.Parse("10").RootElement.Clone(), }, }); @@ -207,7 +207,7 @@ public async Task GameRole_Update_PropagatesOptimisticLockConflict() using var db = new ClientApiTestDb(); var role = db.SeedRole(3001, 1001, 2001, name: "Old"); role.RowVersion = 7; - await db.Db.Updateable(role).ExecuteCommandAsync(); + await db.TenantDb.Updateable(role).ExecuteCommandAsync(); var controller = CreateController(db); db.AttachContext(controller); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs index 6d8b6d94..b8b88a45 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs @@ -29,7 +29,7 @@ public async Task Issue_PersistsKeyWithLeaseAlignedToExpire() Assert.Matches("^[0-9a-f]{64}$", result.Secret); Assert.Equal(expireAt, result.ExpireTime); - var saved = await db.Db.Queryable().FirstAsync(e => e.Kid == result.Kid); + var saved = await db.TenantDb.Queryable().FirstAsync(e => e.Kid == result.Kid); Assert.NotNull(saved); Assert.Equal(result.Secret, saved.Secret); Assert.Equal(expireAt, saved.ExpireTime); @@ -45,7 +45,7 @@ public async Task Issue_DeletesExpiredKeysFromMainDatabase_KeepsLiveKeys() using var db = new ClientApiTestDb(); db.InitBusinessTables(typeof(SessionKeyEntity)); var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - db.Db.Insertable(new[] + db.TenantDb.Insertable(new[] { Seed(db.AppId, "sess-app-1-expired", now - 10), Seed(db.AppId, "sess-app-1-live", now + 3600), @@ -55,7 +55,7 @@ public async Task Issue_DeletesExpiredKeysFromMainDatabase_KeepsLiveKeys() var issuer = new ClientApiSessionKeyIssuer(db.Repository()); await issuer.IssueAsync(now + 120); - var kids = await db.Db.Queryable().Select(e => e.Kid).ToListAsync(); + var kids = await db.TenantDb.Queryable().Select(e => e.Kid).ToListAsync(); Assert.DoesNotContain("sess-app-1-expired", kids); Assert.Contains("sess-app-1-live", kids); Assert.DoesNotContain("sess-app-2-expired", kids); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs index d296fb3f..7a23662b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTestDb.cs @@ -28,25 +28,25 @@ internal sealed class ClientApiTestDb : IDisposable { private readonly List _dbPaths = new(); - public ClientApiTestDb(long id = 1080001, long appId = 1081001) + public ClientApiTestDb(long tenantId = 1080001, long appId = 1081001) { - Id = id; + TenantId = tenantId; AppId = appId; MainDb = CreateScope("main"); DbPath = CreateDatabasePath("tenant"); DbProvider = MainDb; - Db = DbProvider; + TenantDb = DbProvider; } - public long Id { get; } + public long TenantId { get; } public long AppId { get; } public SqlSugarScope MainDb { get; } - public ISqlSugarClient Db { get; } + public ISqlSugarClient TenantDb { get; } public string DbPath { get; } @@ -60,7 +60,7 @@ public ClientApiTestDb(long id = 1080001, long appId = 1081001) public ClientApiTestDb InitBusinessTables(params Type[] tableTypes) { - Db.CodeFirst.InitTables(tableTypes); + TenantDb.CodeFirst.InitTables(tableTypes); return this; } @@ -74,7 +74,7 @@ public DefaultHttpContext CreateHttpContext(bool include, bool includeApp, long? var context = new DefaultHttpContext(); if (include) { - context.Items["Id"] = Id; + context.Items["TenantId"] = TenantId; } if (packageId.HasValue) @@ -105,7 +105,7 @@ public GameAppPackageEntity SeedPackage(long packageId, string packageName) IsEnabled = true, IsDeleted = false, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -127,7 +127,7 @@ public GameAreaClassifyEntity SeedAreaClassify(long classifyId) IsEnabled = true, IsDeleted = false, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -161,7 +161,7 @@ public GameAreaEntity SeedArea(long areaId, long classifyId, bool isEnabled = tr AppVersion = "1.0.0", }); entity.IsEnabled = isEnabled; - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -169,7 +169,7 @@ public GameAppFeatureSwitchEntity SeedFeatureSwitch(GameAppFeatureSwitchEntity e { InitBusinessTables(typeof(GameAppFeatureSwitchEntity)); WithBasic(entity); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -192,7 +192,7 @@ public GameAppRemoteConfigEntity SeedRemoteConfig(long id, string packageName, s RolloutPercent = 100, Description = "C108 global info", }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -214,7 +214,7 @@ public GameAppReleaseVersionEntity SeedAppVersion(long id, string packageName) Announcement = "Upgrade now", Description = "C108 app version", }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -234,7 +234,7 @@ public GameAppAssetPackageVersionEntity SeedAssetPackageVersion(long id, string ResourceVersion = "2026.07.18", Description = "C108 asset package", }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -255,7 +255,7 @@ public GameAnnouncementEntity SeedAnnouncement(long id, long? areaId, string lan IsEnabled = true, IsDeleted = false, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -290,7 +290,7 @@ public GameUserEntity SeedUser( IsEnabled = true, IsDeleted = false, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -316,7 +316,7 @@ public GameRoleEntity SeedRole(long roleId, long userId, long areaId, long appId AllRecharge = 0, OnlineTime = 0, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -334,7 +334,7 @@ public GameGoodsEntity SeedGoods(long goodsId, long classifyId = 1, int configId IsEnabled = isEnabled, IsDeleted = false, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -355,7 +355,7 @@ public GameWebShopEntity SeedWebShop(long shopId, string realPrice, string itemJ Sales = 0, Weight = weight, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -395,7 +395,7 @@ public GameOrderEntity SeedOrder(long orderId, long roleId, long areaId, string AppleVerifiedTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), ProviderTransactionId = providerTransactionId ?? string.Empty, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -416,7 +416,7 @@ public GameRedeemCodeEntity SeedRedeemCode(long codeId, string code, long areaId EndTime = endTime != null ? new DateTimeOffset(endTime.Value).ToUnixTimeSeconds() : DateTimeOffset.Now.AddHours(1).ToUnixTimeSeconds(), Contents = contents, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -429,7 +429,7 @@ public GameRedeemCodeChannelEntity SeedChannel(long channelId, string name, int Name = name, RoleUsageLimit = roleUsageLimit, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -446,7 +446,7 @@ public GameWebShopOrderEntity SeedWebShopOrder(long orderId, long roleId, long a OrderStatus = orderStatus, OrderId = $"webshop-{orderId}", }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -483,7 +483,7 @@ public GameUserEmailEntity SeedEmailCode(long id, string email, string code, boo IsEnabled = true, IsDeleted = false, }); - Db.Insertable(entity).ExecuteCommand(); + TenantDb.Insertable(entity).ExecuteCommand(); return entity; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs index e70e4769..e11d62cc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs @@ -60,7 +60,7 @@ public async Task GameLoginTicket_ContainsRequiredClaims() Assert.Equal(ClientApiPlatformDefaults.GameLoginTicketAudience, jwt.Audiences.Single()); Assert.Equal(keyResolver.Kid, jwt.Kid); Assert.Equal(keyResolver.Kid, ticket.Kid); - Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "id"); + Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "tenantId"); Assert.DoesNotContain(jwt.Claims, claim => claim.Type == "appId"); Assert.Equal("30", jwt.Claims.Single(c => c.Type == "userId").Value); Assert.Equal("40", jwt.Claims.Single(c => c.Type == "playerId").Value); @@ -150,7 +150,7 @@ public void GamePlayerLoginInput_CapturesForbiddenContextFields() + "\"AreaId\":50," + "\"AccessToken\":\"token\"," + "\"UserId\":30," - + "\"id\":10," + + "\"tenantId\":10," + "\"appId\":20" + "}"; @@ -158,7 +158,7 @@ public void GamePlayerLoginInput_CapturesForbiddenContextFields() Assert.NotNull(input); Assert.Contains(input!.ExtraFields.Keys, key => string.Equals(key, "UserId", StringComparison.OrdinalIgnoreCase)); - Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "id", StringComparison.OrdinalIgnoreCase)); + Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "tenantId", StringComparison.OrdinalIgnoreCase)); Assert.Contains(input.ExtraFields.Keys, key => string.Equals(key, "appId", StringComparison.OrdinalIgnoreCase)); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs index a0f5b246..141bb973 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs @@ -54,8 +54,8 @@ public async Task GameOrder_NotifyWeChatPay_ValidSignatureShipsOrderOnce() var contentResult = Assert.IsType(result); Assert.Equal(200, contentResult.StatusCode); Assert.Contains("\"code\":\"SUCCESS\"", contentResult.Content); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7101); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7101); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(TestTransactionId, order.ProviderTransactionId); Assert.Equal(650, role.AllRecharge); @@ -80,7 +80,7 @@ public async Task GameOrder_NotifyWeChatPay_RejectsInvalidSignature() var contentResult = Assert.IsType(result); Assert.Equal(500, contentResult.StatusCode); Assert.Contains("\"code\":\"FAIL\"", contentResult.Content); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7101); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7101); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); } @@ -100,7 +100,7 @@ public async Task GameOrder_NotifyWeChatPay_RejectsMismatchedAmount() var contentResult = Assert.IsType(result); Assert.Equal(500, contentResult.StatusCode); Assert.Contains("\"code\":\"FAIL\"", contentResult.Content); - var order = await db.Db.Queryable().FirstAsync(u => u.Id == 7101); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 7101); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); } @@ -123,7 +123,7 @@ public async Task GameOrder_NotifyWeChatPay_RepeatedNotificationShipsOnce() // 微信重试通知:两次均 200 SUCCESS(避免继续重试),但发货与累充恰一次(ShipAsync 幂等 + 状态前置守卫) Assert.Contains("\"code\":\"SUCCESS\"", Assert.IsType(first).Content); Assert.Contains("\"code\":\"SUCCESS\"", Assert.IsType(second).Content); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(650, role.AllRecharge); Assert.Equal(1, handler.Count("/game/api/req_player_send_item")); } @@ -140,7 +140,7 @@ private static GameOrderController CreateController( FakeOptionsProvider.WithAreaPolicy(false), db.Repository(), new HttpClient(handler, false), - new GameOrderShipService(db.Db, new ClientApiTestHttpClientFactory(handler)), + new GameOrderShipService(db.TenantDb, new ClientApiTestHttpClientFactory(handler)), new WechatCallbackPaymentFactory(setting), new TestGooglePubSubPushAuthenticator(false), new TestGooglePlayPurchaseService(null)); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs index 3fca514c..8374d238 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs @@ -187,8 +187,8 @@ public async Task GameWebShop_NotifyWebShop_CreatesShippedOrderAndSendsMail() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -215,9 +215,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsForgedSign() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret", "forged-sign")); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.Db.Queryable().ToListAsync(); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.TenantDb.Queryable().ToListAsync(); // 验签缺省强制:伪造签名一律拒绝且不发货(不再有 log 灰度放行) Assert.Equal((int)AuthErrorCode.SignatureVerifyFailed, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); @@ -247,8 +247,8 @@ public async Task GameWebShop_NotifyWebShop_ShipsFromOrderSnapshotWhenShopChange var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -276,9 +276,9 @@ public async Task GameWebShop_NotifyWebShop_MailFailureKeepsOrderRetryableThenSu var outTradeNo = await SeedUnpaidOrderAsync(db); var failed = ClientApiResultReader.Read(await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret"))); - var orderAfterFailure = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var roleAfterFailure = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); - var failedRows = await db.Db.Queryable().ToListAsync(); + var orderAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedRows = await db.TenantDb.Queryable().ToListAsync(); // 发货失败:订单不能停在已完成,保留 NotShipped 可重试状态,累充不增加 Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(failed)); Assert.Equal(OrderStatusEnum.NotShipped, orderAfterFailure.Status); @@ -289,8 +289,8 @@ public async Task GameWebShop_NotifyWebShop_MailFailureKeepsOrderRetryableThenSu handler.SetJson("/game/api/post_mail", HttpJsonResultData.Success(JsonHelper.Serialize(new GameWebShpBuySendMailResponse { ErrorCode = 0, })).ToString()); var retried = ClientApiResultReader.Read(await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret"))); - var orderAfterRetry = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var roleAfterRetry = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var orderAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(retried)); Assert.Equal(OrderStatusEnum.Shipped, orderAfterRetry.Status); Assert.Equal(650, roleAfterRetry.AllRecharge); @@ -316,8 +316,8 @@ public async Task GameWebShop_NotifyWebShop_ReplaySameOutTradeNo_ShipsOnlyOnce() var first = ClientApiResultReader.Read(await controller.NotifyWebShop(request)); var second = ClientApiResultReader.Read(await controller.NotifyWebShop(request)); - var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(first)); Assert.Equal(0, ClientApiResultReader.Code(second)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); @@ -345,8 +345,8 @@ public async Task GameWebShop_NotifyWebShop_TerminalStatusOrder_DoesNotShip(Orde var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(status, order.Status); Assert.Equal(0, role.AllRecharge); @@ -371,9 +371,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsAmountMismatch() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 1.00m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.Db.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.Db.Queryable().ToListAsync(); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.TenantDb.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyAmountMismatch, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); Assert.Equal(0, role.AllRecharge); @@ -399,9 +399,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsUnknownOrder() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest("999999999999999999", 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var orderCount = await db.Db.Queryable().CountAsync(u => u.OrderId == "999999999999999999"); - var role = await db.Db.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.Db.Queryable().ToListAsync(); + var orderCount = await db.TenantDb.Queryable().CountAsync(u => u.OrderId == "999999999999999999"); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.TenantDb.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyOrderNotFound, ClientApiResultReader.Code(root)); Assert.Equal(0, orderCount); Assert.Equal(0, role.AllRecharge); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs index 01c3bb16..2511d8c0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs @@ -72,7 +72,7 @@ private static CryptoEnvelopeOptions CreateOptions(bool enabled) }; } - private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, string path = E1Path, string? query = "?op=BLLogin&userid=10086", string? cryptoHeader = "1", long? appId = TestAppId, long? id = null) + private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, string path = E1Path, string? query = "?op=BLLogin&userid=10086", string? cryptoHeader = "1", long? appId = TestAppId, long? tenantId = null) { var context = new DefaultHttpContext(); context.Response.Body = new MemoryStream(); @@ -94,9 +94,9 @@ private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, str context.Request.Headers["GameFrameX-App-Id"] = appId.Value.ToString(); } - if (id.HasValue) + if (tenantId.HasValue) { - context.Items["Id"] = id.Value; + context.Items["TenantId"] = tenantId.Value; } return context; @@ -591,7 +591,7 @@ await InvokeAsync(context, CreateOptions(true), () => [Fact] public async Task LegacyTenantContext_DoesNotBypassDecryption() { - var context = CreateEnvelopeContext("{}", id: 999); + var context = CreateEnvelopeContext("{}", tenantId: 999); var nextCalled = false; await InvokeAsync(context, CreateOptions(true), () => { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs index 11302438..e9f9c41b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAdvertisementRewardServiceTests.cs @@ -45,7 +45,7 @@ public async Task TopOn_ValidSignature_DispatchesOnce_And_WritesSuccessLedger() Assert.Equal(AdvertisementRewardStatusEnum.Success, result.Status); Assert.Equal("adreward:topon:TX-1001", result.IdempotencyKey); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.Db.Queryable().ToListAsync(); + var rows = await db.TenantDb.Queryable().ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Success, rows[0].Status); } @@ -67,7 +67,7 @@ public async Task TopOn_InvalidSignature_FailsClosed_NoLedger_NoDispatch() Assert.False(result.IsValid); Assert.Equal(601, result.Code); Assert.Equal(0, handler.Count(DispatchPath)); - var rows = await db.Db.Queryable().ToListAsync(); + var rows = await db.TenantDb.Queryable().ToListAsync(); Assert.Empty(rows); } @@ -88,7 +88,7 @@ public async Task TopOn_Replay_IsIdempotent_NoSecondDispatch() Assert.True(second.IsValid); Assert.Equal(AdvertisementRewardStatusEnum.Success, second.Status); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.Db.Queryable().ToListAsync(); + var rows = await db.TenantDb.Queryable().ToListAsync(); Assert.Single(rows); } @@ -142,7 +142,7 @@ public async Task AdMob_ValidSignature_Dispatches_And_WritesSuccessLedger() Assert.Equal(AdvertisementRewardStatusEnum.Success, result.Status); Assert.Equal("adreward:admob:AD-5005", result.IdempotencyKey); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.Db.Queryable().ToListAsync(); + var rows = await db.TenantDb.Queryable().ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Success, rows[0].Status); } @@ -168,7 +168,7 @@ public async Task AdMob_InvalidSignature_FailsClosed_NoLedger() Assert.False(result.IsValid); Assert.Equal(601, result.Code); Assert.Equal(0, handler.Count(DispatchPath)); - var rows = await db.Db.Queryable().ToListAsync(); + var rows = await db.TenantDb.Queryable().ToListAsync(); Assert.Empty(rows); } @@ -193,7 +193,7 @@ public async Task UnityAds_ValidSignature_Dispatches_And_WritesSuccessLedger() Assert.Equal(AdvertisementRewardStatusEnum.Success, result.Status); Assert.Equal("adreward:unityads:OID-7007", result.IdempotencyKey); Assert.Equal(1, handler.Count(DispatchPath)); - var rows = await db.Db.Queryable().ToListAsync(); + var rows = await db.TenantDb.Queryable().ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Success, rows[0].Status); } @@ -218,7 +218,7 @@ public async Task UnityAds_InvalidSignature_FailsClosed_NoLedger() Assert.False(result.IsValid); Assert.Equal(601, result.Code); Assert.Equal(0, handler.Count(DispatchPath)); - var rows = await db.Db.Queryable().ToListAsync(); + var rows = await db.TenantDb.Queryable().ToListAsync(); Assert.Empty(rows); } @@ -236,7 +236,7 @@ public async Task TopOn_DispatchFailure_MarksFailed_Then_Retry_MarksSuccess_Reus Assert.False(first.IsValid); Assert.Equal(AdvertisementRewardStatusEnum.Failed, first.Status); Assert.NotNull(first.Message); - var rowsAfterFirst = await db.Db.Queryable().ToListAsync(); + var rowsAfterFirst = await db.TenantDb.Queryable().ToListAsync(); Assert.Single(rowsAfterFirst); Assert.Equal(AdvertisementRewardStatusEnum.Failed, rowsAfterFirst[0].Status); var firstLedgerId = rowsAfterFirst[0].Id; @@ -246,7 +246,7 @@ public async Task TopOn_DispatchFailure_MarksFailed_Then_Retry_MarksSuccess_Reus var second = await CreateService(db, option, handler, query).ReceiveTopOnAsync(); Assert.True(second.IsValid); Assert.Equal(AdvertisementRewardStatusEnum.Success, second.Status); - var rowsAfterSecond = await db.Db.Queryable().ToListAsync(); + var rowsAfterSecond = await db.TenantDb.Queryable().ToListAsync(); Assert.Single(rowsAfterSecond); Assert.Equal(firstLedgerId, rowsAfterSecond[0].Id); Assert.Equal(AdvertisementRewardStatusEnum.Success, rowsAfterSecond[0].Status); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs index 1c704533..7224d976 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/GameAppPackageResolverInheritanceTests.cs @@ -129,17 +129,17 @@ public void CacheRefresh_ParentReassign_SwitchesMaster() Assert.Equal("com.test.master.b", fixture.Resolver.Resolve("com.test.child")); } - private ResolverFixture BuildFixture(long id) + private ResolverFixture BuildFixture(long tenantId) { var mainConfig = CreateConfig("main"); - var config = CreateConfig(id.ToString()); + var tenantConfig = CreateConfig(tenantId.ToString()); var scope = new SqlSugarScope(mainConfig); var provider = scope; - var db = provider; - db.CodeFirst.InitTables(typeof(GameAppPackageEntity)); + var tenantDb = provider; + tenantDb.CodeFirst.InitTables(typeof(GameAppPackageEntity)); - return new ResolverFixture(scope, provider, db, id); + return new ResolverFixture(scope, provider, tenantDb, tenantId); } private ConnectionConfig CreateConfig(string configId) @@ -175,11 +175,11 @@ private sealed class ResolverFixture private readonly ISqlSugarClient _tenantDb; private readonly long _tenantId; - public ResolverFixture(SqlSugarScope scope, ISqlSugarClient provider, ISqlSugarClient db, long id) + public ResolverFixture(SqlSugarScope scope, ISqlSugarClient provider, ISqlSugarClient tenantDb, long tenantId) { _scope = scope; - _tenantDb = db; - _tenantId = id; + _tenantDb = tenantDb; + _tenantId = tenantId; Resolver = new GameAppPackageResolver(provider); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackRoutingTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackRoutingTests.cs index c0f28a94..bea57c22 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackRoutingTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackRoutingTests.cs @@ -28,7 +28,7 @@ public async Task Middleware_WithPackageRouteParameter_EstablishesCallbackContex var middleware = new PublicCallbackResolutionMiddleware(current => { nextCalled = true; - Assert.False(current.Items.ContainsKey("Id")); + Assert.False(current.Items.ContainsKey("TenantId")); Assert.False(current.Items.ContainsKey("AppId")); Assert.IsType(current.Items[PublicCallbackRouteContext.ItemKey]); Assert.Equal(packageId, current.Items[PaymentOptionSettingProvider.PackageIdKey]); @@ -54,7 +54,7 @@ public async Task Middleware_WithoutPackageRouteParameter_EstablishesCallbackCon }); await middleware.InvokeAsync(context, new PublicCallbackRouteResolver(fixture.MainDb)); Assert.Equal(200, context.Response.StatusCode); - Assert.False(context.Items.ContainsKey("Id")); + Assert.False(context.Items.ContainsKey("TenantId")); } } @@ -65,7 +65,7 @@ public void PaymentProvider_BareQueryScopeDoesNotChangeMainConfiguration() { InsertAliPayConfig(fixture.MainDb, false); var context = new DefaultHttpContext(); - context.Request.QueryString = new QueryString("?id=999&appId=888&env=prod"); + context.Request.QueryString = new QueryString("?tenantId=999&appId=888&env=prod"); context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("alipay", "payment", null); var provider = new PaymentOptionSettingProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); var setting = Assert.Single(provider.GetOptionSettings("alipay")); @@ -157,7 +157,7 @@ public async Task AdvertisementOptionsProvider_PicksPangleConfigFromPublicCallba }, }).ExecuteCommand(); var context = new DefaultHttpContext(); - context.Items["Id"] = 999L; + context.Items["TenantId"] = 999L; context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("pangle", "ad", null); var provider = new ClientApiOptionsProvider(fixture.MainDb, new HttpContextAccessor { HttpContext = context }); var options = await provider.GetAdvertisementCallbackOptionsAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs index 7432d869..5d647d6d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs @@ -18,14 +18,14 @@ public sealed class PublicCallbackSingleMainTests public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string channel) { // 出站下单通知地址经 PaymentOptionSettingProvider 真实构造:站点根地址自动补全新回调路由段 - //(旧 id/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 + //(旧 tenantId/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 using (var database = new ClientApiTestDb()) { database.InitBusinessTables(typeof(GamePaymentConfigEntity)); var configJson = channel == "alipay" ? JsonSerializer.Serialize(new AliPayOptionSetting { AliPayNotifyUrl = "https://example.test", }) : JsonSerializer.Serialize(new WechatPayOptionSetting { WechatPayNotifyUrl = "https://example.test", }); - database.Db.Insertable(new GamePaymentConfigEntity + database.TenantDb.Insertable(new GamePaymentConfigEntity { Id = 1900000005101, PackageIdNormalized = 0, @@ -36,7 +36,7 @@ public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string ch }).ExecuteCommand(); var context = new DefaultHttpContext(); - context.Request.QueryString = new QueryString("?id=123&appId=456"); + context.Request.QueryString = new QueryString("?tenantId=123&appId=456"); var provider = new PaymentOptionSettingProvider(database.DbProvider, new HttpContextAccessor { HttpContext = context }); var expectedRoute = channel == "alipay" ? "api/GameOrder/NotifyAliPay" : "api/GameOrder/NotifyWeChatPay"; @@ -55,7 +55,7 @@ public async Task IncomingCallback_OldRouteSegments_DoNotCreateScopeContext() var context = new DefaultHttpContext(); context.SetEndpoint(new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(new PublicCallbackEndpointAttribute("pangle", "ad")), "callback")); - context.Request.RouteValues["id"] = 999; + context.Request.RouteValues["tenantId"] = 999; context.Request.RouteValues["appId"] = 888; var invoked = false; var middleware = new PublicCallbackResolutionMiddleware(request => diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs index 0a76b844..b271459a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs @@ -42,11 +42,11 @@ public void Dispose() public async Task SignatureKeyResolver_MixedRows_ResolvesPlaintextForBoth() { _db.InitBusinessTables(typeof(AppSignatureKeyEntity)); - _db.Db.Insertable(new AppSignatureKeyEntity + _db.TenantDb.Insertable(new AppSignatureKeyEntity { Id = 7101, Kid = "kid-plain", Secret = "sig-plain", IsEnabled = true, }).ExecuteCommand(); - _db.Db.Insertable(new AppSignatureKeyEntity + _db.TenantDb.Insertable(new AppSignatureKeyEntity { Id = 7102, Kid = "kid-cipher", Secret = SecretCrypto.Encrypt("sig-cipher")!, IsEnabled = true, }).ExecuteCommand(); @@ -67,11 +67,11 @@ public async Task SignatureKeyResolver_MixedRows_ResolvesPlaintextForBoth() public async Task SessionKeyResolver_MixedRows_ResolvesPlaintextForBoth() { _db.InitBusinessTables(typeof(SessionKeyEntity)); - _db.Db.Insertable(new SessionKeyEntity + _db.TenantDb.Insertable(new SessionKeyEntity { Id = 7201, Kid = "kid-plain", Secret = "session-plain", IsEnabled = true, }).ExecuteCommand(); - _db.Db.Insertable(new SessionKeyEntity + _db.TenantDb.Insertable(new SessionKeyEntity { Id = 7202, Kid = "kid-cipher", Secret = SecretCrypto.Encrypt("session-cipher")!, IsEnabled = true, }).ExecuteCommand(); @@ -91,7 +91,7 @@ public async Task LoginTicketKeyResolver_EncryptedPrivateKey_ResolvesUsableRsaKe _db.InitBusinessTables(typeof(GameLoginTicketKeyEntity)); using (var rsa = RSA.Create(2048)) { - _db.Db.Insertable(new GameLoginTicketKeyEntity + _db.TenantDb.Insertable(new GameLoginTicketKeyEntity { Id = 7301, Kid = "kid-ticket", Algorithm = GameLoginTicketSigningKey.AlgorithmRs256, @@ -114,7 +114,7 @@ public async Task LoginTicketKeyResolver_EncryptedPrivateKey_ResolvesUsableRsaKe public async Task OptionsProvider_TokenPolicy_SigningKeyDecrypts() { _db.InitBusinessTables(typeof(ClientApiPolicyEntity)); - _db.Db.Insertable(new ClientApiPolicyEntity + _db.TenantDb.Insertable(new ClientApiPolicyEntity { Id = 7401, SigningKey = SecretCrypto.Encrypt("policy-signing-key")!, IsEnabled = true, }).ExecuteCommand(); @@ -132,7 +132,7 @@ public async Task OptionsProvider_Advertisement_JsonSensitiveFieldDecrypts() _db.InitBusinessTables(typeof(AdvertisementCallbackConfigEntity)); var configJson = AdvertisementCallbackConfigCrypto.EncryptConfigJson("Pangle", "{\"callbackUrl\":\"https://cb.example.com/hook\",\"signingSecret\":\"ad-json-secret\"}"); - _db.Db.Insertable(new AdvertisementCallbackConfigEntity + _db.TenantDb.Insertable(new AdvertisementCallbackConfigEntity { Id = 7501, Provider = "Pangle", SigningSecret = SecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, @@ -155,7 +155,7 @@ public async Task OptionsProvider_Advertisement_MissingRequiredSecretKey_Throws( { _db.InitBusinessTables(typeof(AdvertisementCallbackConfigEntity)); // ConfigJson 是验签材料唯一来源:Pangle 缺 signingSecret 直接 fail-closed,不再回落汇总列 - _db.Db.Insertable(new AdvertisementCallbackConfigEntity + _db.TenantDb.Insertable(new AdvertisementCallbackConfigEntity { Id = 7511, Provider = "Pangle", SigningSecret = SecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, @@ -173,7 +173,7 @@ public async Task OptionsProvider_Advertisement_AdMobRequiresVerificationKeys() { _db.InitBusinessTables(typeof(AdvertisementCallbackConfigEntity)); // AdMob 行必填 verificationKeys;signingSecret 缺失不影响(AdMob 用 verificationKeys 验签) - _db.Db.Insertable(new AdvertisementCallbackConfigEntity + _db.TenantDb.Insertable(new AdvertisementCallbackConfigEntity { Id = 7512, Provider = "GoogleAdMob", ConfigJson = "{\"callbackUrl\":\"https://cb.example.com/admob\",\"verificationKeys\":\"k1=base64key\"}", IsEnabled = true, @@ -192,7 +192,7 @@ public async Task OptionsProvider_Advertisement_AdMobRequiresVerificationKeys() public async Task OptionsProvider_Email_SecretIdKeyDecrypts() { _db.InitBusinessTables(typeof(EmailConfigEntity)); - _db.Db.Insertable(new EmailConfigEntity + _db.TenantDb.Insertable(new EmailConfigEntity { Id = 7601, FromEmailAddress = "noreply@example.com", FromEmailSecretId = SecretCrypto.Encrypt("email-plain-id")!, @@ -216,7 +216,7 @@ public void PaymentProvider_Sqlite_MainDatabaseQuery_ReturnsDecryptedOption() _db.InitBusinessTables(typeof(GamePaymentConfigEntity)); var configJson = PaymentConfigCrypto.EncryptConfigJson("alipay", "{\"AliPayAppId\":\"2021001\",\"AliPayMerchantPrivateKey\":\"plain-merchant-key\",\"AliPayGatewayUrl\":\"https://openapi.alipay.com/gateway.do\"}"); - _db.Db.Insertable(new GamePaymentConfigEntity + _db.TenantDb.Insertable(new GamePaymentConfigEntity { Id = 7701, PayChannel = "alipay", ConfigJson = configJson, IsEnabled = true, }).ExecuteCommand(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs index 021b0a00..a30fb34a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/FoundationIdempotency/BusinessTableIdempotencyStoreTests.cs @@ -34,7 +34,7 @@ public async Task AntiCheatStore_RepeatedOccupation_ExactlyOneSucceeds() } Assert.Single(results, succeeded => succeeded); - var rows = await _db.Db.Queryable().Where(u => u.IdempotencyKey == "anticheat-key-concurrent").ToListAsync(); + var rows = await _db.TenantDb.Queryable().Where(u => u.IdempotencyKey == "anticheat-key-concurrent").ToListAsync(); Assert.Single(rows); } @@ -94,7 +94,7 @@ public async Task AdvertisementRewardStore_FailedRow_AllowsLegalReOccupation() // 法定覆盖:存量 Failed 重试复用同一行(翻回 Pending) Assert.True(await store.TryBeginProcessingAsync(BuildRecord(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, "adreward-key-retry"))); - var rows = await _db.Db.Queryable().Where(u => u.IdempotencyKey == "adreward-key-retry").ToListAsync(); + var rows = await _db.TenantDb.Queryable().Where(u => u.IdempotencyKey == "adreward-key-retry").ToListAsync(); Assert.Single(rows); Assert.Equal(AdvertisementRewardStatusEnum.Pending, rows[0].Status); } @@ -131,7 +131,7 @@ public async Task FulfillmentStore_ClaimsPendingRow_FailedReOccupation_AndVoided { _db.InitBusinessTables(typeof(GameOrderFulfillmentEntity)); - var store = new FulfillmentLedgerIdempotencyStore(_db.Db, BuildFulfillmentTemplate("fulfillment-key-claim")); + var store = new FulfillmentLedgerIdempotencyStore(_db.TenantDb, BuildFulfillmentTemplate("fulfillment-key-claim")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(FulfillmentLedgerIdempotencyStore.OrderShipIdempotencyScope, "fulfillment-key-claim"))); // Pending 占用中:占位失败(协调器等待后回忙碌) @@ -141,7 +141,7 @@ public async Task FulfillmentStore_ClaimsPendingRow_FailedReOccupation_AndVoided var identifier = new IdempotencyRecordIdentifier(FulfillmentLedgerIdempotencyStore.OrderShipIdempotencyScope, "fulfillment-key-claim"); await store.FailAsync(new IdempotencyFailureRequest(identifier, 0)); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(identifier.IdempotencyScope, identifier.IdempotencyKey))); - var rows = await _db.Db.Queryable().Where(u => u.IdempotencyKey == "fulfillment-key-claim").ToListAsync(); + var rows = await _db.TenantDb.Queryable().Where(u => u.IdempotencyKey == "fulfillment-key-claim").ToListAsync(); Assert.Single(rows); Assert.Equal(FulfillmentStatusEnum.Pending, rows[0].Status); @@ -157,11 +157,11 @@ public async Task FulfillmentStore_VoidedTerminal_MapsCompleted_AndBlocksReOccup { _db.InitBusinessTables(typeof(GameOrderFulfillmentEntity)); - var store = new FulfillmentLedgerIdempotencyStore(_db.Db, BuildFulfillmentTemplate("fulfillment-key-voided")); + var store = new FulfillmentLedgerIdempotencyStore(_db.TenantDb, BuildFulfillmentTemplate("fulfillment-key-voided")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(FulfillmentLedgerIdempotencyStore.OrderRefundIdempotencyScope, "fulfillment-key-voided"))); // 作废为业务终态:服务侧落 Voided 后 Complete 做存在性校验(不抛错) - await _db.Db.Updateable() + await _db.TenantDb.Updateable() .SetColumns(u => u.Status == FulfillmentStatusEnum.Voided) .Where(u => u.IdempotencyKey == "fulfillment-key-voided") .ExecuteCommandAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs index b8f27c2c..f027c800 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserMiscTests.cs @@ -26,7 +26,7 @@ public async Task MarkLogout_PersistsRecord() var data = ClientApiResultReader.Data(ClientApiResultReader.Read(result)); Assert.Equal(0, data.GetProperty("Rcode").GetInt64()); - var records = db.Db.Queryable().Where(x => x.UserId == 4001).ToList(); + var records = db.TenantDb.Queryable().Where(x => x.UserId == 4001).ToList(); Assert.Single(records); Assert.Equal("1.0.0", records[0].ClientVersion); Assert.True(records[0].LogoutTime > 0); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs index c84fe4f2..43502e58 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserPayTests.cs @@ -38,7 +38,7 @@ public async Task Create_RealPay_PersistsUnpaidOrder_NeedPayTrue() Assert.Equal("sku.gold", data.GetProperty("Sku").GetString()); Assert.Equal(990, data.GetProperty("Amount").GetInt64()); - var row = db.Db.Queryable().Single(x => x.OrderId == orderId); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == orderId); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Equal("7001", row.AccountId); Assert.Equal("sku.gold", row.ProductId); @@ -65,7 +65,7 @@ public async Task Create_SandboxPolicy_IssuesShippedOrder_NeedPayFalse_ClosedLoo var orderId = data.GetProperty("OrderId").GetString() ?? string.Empty; // 沙箱直发闭环:落库即 Shipped,免支付免验真,Query 直接 Paid - var row = db.Db.Queryable().Single(x => x.OrderId == orderId); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == orderId); Assert.Equal(OrderStatusEnum.Shipped, row.Status); var query = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.Query( @@ -94,7 +94,7 @@ public async Task Create_MainPolicyChange_ControlsSandboxRecharge() Assert.True(first.GetProperty("IsNeedPay").GetBoolean()); // 更新策略后重建请求级 provider,验证开启沙箱直发。 - var appRow = db.Db.Queryable().Single(); + var appRow = db.TenantDb.Queryable().Single(); appRow.EnableSandBoxRecharge = true; await policyRepository.UpdateAsync(appRow); var secondController = CreateController(db, new FakePayReceiptVerifier(), true); @@ -136,7 +136,7 @@ public async Task Verify_Success_MarksShipped_FillsProviderTransactionId() Assert.Equal("sku.gold", data.GetProperty("ProductId").GetString()); Assert.Equal(1, verifier.CallCount); - var row = db.Db.Queryable().Single(x => x.OrderId == "pay_seed_v1"); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_seed_v1"); Assert.Equal(OrderStatusEnum.Shipped, row.Status); Assert.Equal("txn_apple_1", row.ProviderTransactionId); Assert.Equal("{\"status\":0}", row.ReceiptJson); @@ -180,7 +180,7 @@ public async Task Verify_Pending_ReturnsRcode7_StatusUnchanged() new GameUserPayVerifyRequest { UserId = 7103, OrderId = "pay_seed_v3", PayChannel = 7, PurchaseToken = "tok", }))); Assert.Equal(7, data.GetProperty("Rcode").GetInt64()); - var row = db.Db.Queryable().Single(x => x.OrderId == "pay_seed_v3"); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_seed_v3"); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Null(row.ProviderTransactionId); } @@ -219,7 +219,7 @@ public async Task Verify_Rejected_ReturnsExplicitEnvelopeError_DoesNotCredit() Assert.NotEqual(0, ClientApiResultReader.Code(root)); Assert.Equal(1, verifier.CallCount); - var row = db.Db.Queryable().Single(x => x.OrderId == "pay_seed_v4"); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_seed_v4"); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); } } @@ -248,7 +248,7 @@ public async Task Verify_TransactionIdBoundToOtherOrder_RejectsWithoutDoubleShip Assert.Equal((int)PaymentErrorCode.PayChannelNotSupported, ClientApiResultReader.Code(root)); Assert.Equal(0, verifier.CallCount); - var row = db.Db.Queryable().Single(x => x.OrderId == "pay_dup_b"); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_dup_b"); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Null(row.ProviderTransactionId); } @@ -347,7 +347,7 @@ public async Task Report_RecordsIntoExistingOrder_DoesNotAdvanceStatus() // 契约:Report 响应 data 为 null Assert.Equal(JsonValueKind.Null, ClientApiResultReader.Data(root).ValueKind); - var row = db.Db.Queryable().Single(x => x.OrderId == "pay_r1"); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_r1"); Assert.Equal(990, row.RealMoney); Assert.Equal("USD", row.Currency); Assert.Equal(12, row.Level); @@ -355,7 +355,7 @@ public async Task Report_RecordsIntoExistingOrder_DoesNotAdvanceStatus() // 纯记账:订单状态与渠道字段不被推进 Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Equal("100", row.PayChannel); - Assert.Equal(1, db.Db.Queryable().Count(x => x.OrderId == "pay_r1")); + Assert.Equal(1, db.TenantDb.Queryable().Count(x => x.OrderId == "pay_r1")); } } @@ -370,7 +370,7 @@ public async Task Report_UnknownOrder_ToleratedAndRecorded() MakeReport(7302, "pay_unknown", 199))); Assert.Equal(0, ClientApiResultReader.Code(root)); - var row = db.Db.Queryable().Single(x => x.OrderId == "pay_unknown"); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_unknown"); Assert.Equal("7302", row.AccountId); Assert.Equal("sku.gem", row.ProductId); Assert.Equal(199, row.RealMoney); @@ -392,8 +392,8 @@ public async Task Report_IdempotentOverwrite_SameOrderIdSingleRow() await controller.Report(MakeReport(7303, "pay_r2", 990)); await controller.Report(MakeReport(7303, "pay_r2", 880)); - Assert.Equal(1, db.Db.Queryable().Count(x => x.OrderId == "pay_r2")); - var row = db.Db.Queryable().Single(x => x.OrderId == "pay_r2"); + Assert.Equal(1, db.TenantDb.Queryable().Count(x => x.OrderId == "pay_r2")); + var row = db.TenantDb.Queryable().Single(x => x.OrderId == "pay_r2"); Assert.Equal(880, row.RealMoney); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs index 48bbb8ad..8a4e5069 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserRankTests.cs @@ -58,7 +58,7 @@ public async Task Get_EnrollsPlayerIntoNewGroup_PadsRobotsToBoardSize() Assert.Equal("badge5001", own.GetProperty("Badge").GetString()); Assert.Equal(100, own.GetProperty("Score").GetInt64()); - var rows = db.Db.Queryable().Where(x => x.GroupId == groupId).ToList(); + var rows = db.TenantDb.Queryable().Where(x => x.GroupId == groupId).ToList(); Assert.Equal(GameUserRankController.BoardSize, rows.Count); var ownEntity = rows.Single(x => x.UserId == 5001); Assert.Equal(1, ownEntity.RankType); @@ -81,14 +81,14 @@ public async Task Get_SameTokenSharesGroup_DifferentTokenOpensNewGroup() Assert.Equal(first.GetProperty("GroupId").GetString(), second.GetProperty("GroupId").GetString()); // 同组第二人后不再补机器人(已到榜单规模) var sharedGroupId = first.GetProperty("GroupId").GetString(); - var sharedRows = db.Db.Queryable().Where(x => x.GroupId == sharedGroupId).ToList(); + var sharedRows = db.TenantDb.Queryable().Where(x => x.GroupId == sharedGroupId).ToList(); Assert.Equal(GameUserRankController.BoardSize + 1, sharedRows.Count); // token 变化(活动代币增长)= 新一轮次令牌 → 开新组 var third = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.JoinRank(MakeJoin(5003, 200)))); var newGroupId = third.GetProperty("GroupId").GetString(); Assert.NotEqual(sharedGroupId, newGroupId); - var ownEntity = db.Db.Queryable().Single(x => x.UserId == 5003); + var ownEntity = db.TenantDb.Queryable().Single(x => x.UserId == 5003); Assert.Equal(200, ownEntity.RoundToken); Assert.Equal(200, ownEntity.Score); } @@ -111,7 +111,7 @@ public async Task Get_FullGroup_OpensNewGroup() var groupId = data.GetProperty("GroupId").GetString(); Assert.NotEqual("g_seed", groupId); // 新组 = 本人 + 机器人凑满榜单规模 - var rows = db.Db.Queryable().Where(x => x.GroupId == groupId).ToList(); + var rows = db.TenantDb.Queryable().Where(x => x.GroupId == groupId).ToList(); Assert.Equal(GameUserRankController.BoardSize, rows.Count); Assert.Contains(rows, x => x.UserId == 5201); } @@ -141,7 +141,7 @@ public async Task Query_ReturnsWholeGroup_WithRecomputedRanks() Assert.Equal(3, ranks[2].GetProperty("Rank").GetInt64()); // 分数变化后重算(心跳推进 7001 反超) - var row7001 = db.Db.Queryable().Single(x => x.UserId == 7001); + var row7001 = db.TenantDb.Queryable().Single(x => x.UserId == 7001); row7001.Score = 999; await repository.UpdateAsync(row7001); var replay = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.Query( @@ -183,10 +183,10 @@ public async Task HeartBeat_UpdatesFourBoardScores_MissingBoardRankZero() Assert.Equal(0, data.GetProperty("MultiRank").GetInt64()); Assert.Equal(0, data.GetProperty("Weekly2Rank").GetInt64()); - var bakeout = db.Db.Queryable().Single(x => x.UserId == 8001 && x.RankType == 1); + var bakeout = db.TenantDb.Queryable().Single(x => x.UserId == 8001 && x.RankType == 1); Assert.Equal(120, bakeout.Score); Assert.Equal(2, bakeout.Rank); - var weekly1 = db.Db.Queryable().Single(x => x.UserId == 8001 && x.RankType == 3); + var weekly1 = db.TenantDb.Queryable().Single(x => x.UserId == 8001 && x.RankType == 3); Assert.Equal(5, weekly1.Score); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs index c46704de..ce9a8a5d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameApi/GameUserSessionTests.cs @@ -37,7 +37,7 @@ public async Task Login_WithArchive_EchoesSyncFields_WritesSessionColumns() Assert.Equal("uuid-a", data.GetProperty("InstallationId").GetString()); Assert.Equal("iPhone13", data.GetProperty("UpdateDeviceModel").GetString()); // P0-2:会话列成对写回存档行(SessionId == 下发 Session) - var row = db.Db.Queryable().Single(x => x.UserId == 8001); + var row = db.TenantDb.Queryable().Single(x => x.UserId == 8001); Assert.Equal(data.GetProperty("Session").GetInt64(), row.SessionId); Assert.Equal("SM-G991B", row.SessionDeviceModel); // 常量回显与请求回显 @@ -63,7 +63,7 @@ public async Task Login_FirstLogin_NoArchive_DoesNotCreateRow() Assert.Equal(string.Empty, data.GetProperty("UpdateDeviceModel").GetString()); Assert.True(data.GetProperty("Session").GetInt64() > 0); // 存档行由 C8 存档链路负责建行,登录不代建 - Assert.Equal(0, db.Db.Queryable().Count(x => x.UserId == 8002)); + Assert.Equal(0, db.TenantDb.Queryable().Count(x => x.UserId == 8002)); } } @@ -81,7 +81,7 @@ public async Task Login_SecondDevice_SessionOverwritten() Assert.NotEqual(first.GetProperty("Session").GetInt64(), second.GetProperty("Session").GetInt64()); // ponytail: 单副本起步——后登录覆盖(顶号),不保留历史会话 - var row = db.Db.Queryable().Single(x => x.UserId == 8003); + var row = db.TenantDb.Queryable().Single(x => x.UserId == 8003); Assert.Equal(second.GetProperty("Session").GetInt64(), row.SessionId); Assert.Equal("device-B", row.SessionDeviceModel); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs index ba3cd97c..fff4c3a4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/FeatureSwitchDeliveryResolverTests.cs @@ -15,7 +15,7 @@ namespace GameFrameX.Core.Tests.GameBusiness; /// public sealed class FeatureSwitchDeliveryResolverTests : IDisposable { - private const long Id = 1001; + private const long TenantId = 1001; private const long App100 = 100; private const long App200 = 200; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs index 242e64f9..df2f3d8e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/FeatureSwitchSyncControllerTests.cs @@ -28,11 +28,11 @@ namespace GameFrameX.Core.Tests.HubApi; /// public sealed class FeatureSwitchSyncControllerTests : IDisposable { - private const long Id = 2090001; + private const long TenantId = 2090001; private const long CredentialAppId = 2091001; private readonly string _mainDbPath = Path.Combine(Path.GetTempPath(), $"gfx_hub_switch_main_{Guid.NewGuid():N}.db"); - private readonly string _tenantDbPath = Path.Combine(Path.GetTempPath(), $"gfx_hub_switch_{Guid.NewGuid():N}.db"); + private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"gfx_hub_switch_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _mainDb; public FeatureSwitchSyncControllerTests() @@ -49,11 +49,11 @@ public FeatureSwitchSyncControllerTests() provider.CodeFirst.InitTables(typeof(GameAppFeatureSwitchEntity)); } - private FeatureSwitchSyncController CreateController(out ISqlSugarClient db, bool includeContext = true) + private FeatureSwitchSyncController CreateController(out ISqlSugarClient tenantDb, bool includeContext = true) { var provider = _mainDb; var repository = new Repository(_mainDb); - db = provider; + tenantDb = provider; var controller = new FeatureSwitchSyncController(new FeatureSwitchDeliveryResolver(repository)); var context = new DefaultHttpContext(); controller.ControllerContext = new ControllerContext { HttpContext = context, }; @@ -93,8 +93,8 @@ private static GameAppFeatureSwitchEntity Row( [Fact] public async Task Sync_FiltersByAudienceFromMainDatabase() { - var controller = CreateController(out var db); - db.Insertable(new[] + var controller = CreateController(out var tenantDb); + tenantDb.Insertable(new[] { Row(1, "economy.drop_rate", "{\"rate\":2}", audience: FeatureSwitchAudienceValues.Server), Row(2, "login.banner", "{\"v\":1}", audience: FeatureSwitchAudienceValues.Both), @@ -120,8 +120,8 @@ public async Task Sync_FiltersByAudienceFromMainDatabase() [Fact] public async Task Sync_WithoutDimensionContext_OnlyDefaultSentinelRowsDelivered() { - var controller = CreateController(out var db); - db.Insertable(new[] + var controller = CreateController(out var tenantDb); + tenantDb.Insertable(new[] { Row(1, "activity.android_only", "{\"v\":1}", platform: "android"), Row(2, "activity.everyone", "{\"v\":2}"), @@ -140,8 +140,8 @@ public async Task Sync_WithoutDimensionContext_OnlyDefaultSentinelRowsDelivered( [Fact] public async Task Sync_ServerChannel_IgnoresDeviceRollout() { - var controller = CreateController(out var db); - db.Insertable(new[] + var controller = CreateController(out var tenantDb); + tenantDb.Insertable(new[] { Row(1, "economy.zero_rollout", "{\"rate\":5}", rolloutPercent: 0), }).ExecuteCommand(); @@ -159,9 +159,9 @@ public async Task Sync_ServerChannel_IgnoresDeviceRollout() [Fact] public async Task Sync_VersionProtocol_FirstPullUnchangedShortCircuitAndChange() { - var controller = CreateController(out var db); + var controller = CreateController(out var tenantDb); var row = Row(1, "economy.drop_rate", "{\"rate\":1}"); - db.Insertable(row).ExecuteCommand(); + tenantDb.Insertable(row).ExecuteCommand(); var firstResult = await controller.Sync(new FeatureSwitchSyncRequest()); var first = ClientApiResultReader.Data(ClientApiResultReader.Read(firstResult)); @@ -177,7 +177,7 @@ public async Task Sync_VersionProtocol_FirstPullUnchangedShortCircuitAndChange() Assert.Equal(0, unchanged.GetProperty("Switches").GetArrayLength()); row.ValueJson = "{\"rate\":9}"; - db.Updateable(row).ExecuteCommand(); + tenantDb.Updateable(row).ExecuteCommand(); var changedResult = await controller.Sync(new FeatureSwitchSyncRequest { Version = version, }); var changed = ClientApiResultReader.Data(ClientApiResultReader.Read(changedResult)); Assert.False(changed.GetProperty("Unchanged").GetBoolean()); @@ -238,7 +238,7 @@ public void OpenAccessSignature_V2CanonicalMessage_VerifiesForFeatureSwitchSync( public void Dispose() { _mainDb.Dispose(); - foreach (var path in new[] { _mainDbPath, _tenantDbPath, }) + foreach (var path in new[] { _mainDbPath, _dbPath, }) { if (File.Exists(path)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs index 9de4d563..2ec9b15e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs @@ -134,7 +134,7 @@ public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoTenantC { nextCount++; Assert.Equal("7801", context.User.FindFirst(GameFrameX.Core.Const.ClaimConst.UserId)?.Value); - Assert.Null(context.User.FindFirst("Id")); + Assert.Null(context.User.FindFirst("TenantId")); return Task.CompletedTask; }); await middleware.InvokeAsync(first, cache); @@ -153,8 +153,8 @@ private void SeedCredential(string storedAccessSecret) Id = 7801, Account = "ci-user", RealName = "CI", Password = "not-a-real-password", }; UserService.NormalizeNewUser(bindUser); // 补齐 NOT NULL 字符串列默认值 - _db.Db.Insertable(bindUser).ExecuteCommand(); - _db.Db.Insertable(new GameAppOpenAccessEntity + _db.TenantDb.Insertable(bindUser).ExecuteCommand(); + _db.TenantDb.Insertable(new GameAppOpenAccessEntity { Id = 7802, BindUserId = 7801, Scenario = "ci", Purpose = "unit-test", SubjectName = "unit-test", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs index 0f3f0fce..f701d1ef 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs @@ -25,8 +25,8 @@ public ObjectStorageActiveConfigConcurrencyTests() [Fact] public async Task ConcurrentEnableTransitions_WithSerialLock_LeaveExactlyOneEnabled() { - var id = 1300000000001L; - var db = OpenDb(id); + var tenantId = 1300000000001L; + var db = OpenDb(tenantId); // 预置 1 条启用配置 var seed = DefaultDatabaseSeeder.BuildDefaultObjectStorageConfig(); @@ -67,8 +67,8 @@ public async Task ConcurrentEnableTransitions_WithSerialLock_LeaveExactlyOneEnab [Fact] public void DeactivateOthers_Mechanism_LeavesOnlyCurrentEnabled() { - var id = 1300000000002L; - var db = OpenDb(id); + var tenantId = 1300000000002L; + var db = OpenDb(tenantId); var first = DefaultDatabaseSeeder.BuildDefaultObjectStorageConfig(); db.Insertable(first).ExecuteCommand(); @@ -89,22 +89,22 @@ public void DeactivateOthers_Mechanism_LeavesOnlyCurrentEnabled() Assert.False(firstEnabled == true); } - private ISqlSugarClient OpenDb(long id) + private ISqlSugarClient OpenDb(long tenantId) { - var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_active_config_{id}_{Guid.NewGuid():N}.db"); + var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_active_config_{tenantId}_{Guid.NewGuid():N}.db"); _dbPaths.Add(dbPath); - var config = new DbConnectionConfig + var tenantConfig = new DbConnectionConfig { - ConfigId = id.ToString(), + ConfigId = tenantId.ToString(), DbType = DbType.Sqlite, ConnectionString = $"DataSource={dbPath}", DbSettings = new DbSettings { EnableInitDb = true, }, TableSettings = new TableSettings { EnableInitTable = true, EnableIncreTable = false, }, SeedSettings = new SeedSettings { EnableInitSeed = false, EnableIncreSeed = false, }, }; - SqlSugarUnifiedConfig.ConfigureBaseSettings(config); - var scope = new SqlSugarScope(config); - var db = scope.GetConnectionScope(id.ToString()); + SqlSugarUnifiedConfig.ConfigureBaseSettings(tenantConfig); + var scope = new SqlSugarScope(tenantConfig); + var db = scope.GetConnectionScope(tenantId.ToString()); db.CodeFirst.InitTables(typeof(ObjectStorageConfigEntity)); return db; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs index 27891b78..d1b76640 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetMenuSeedTests.cs @@ -47,7 +47,7 @@ public void OnlineAssetMenus_Pages_UseOnlineOperationsPathsAndMatchLedgerSpec( } [Fact] - public void OnlineAssetMenus_HighRiskButtons_AreAdminOnly() + public void OnlineAssetMenus_HighRiskButtons_AreTenantAdminOnly() { var menus = GlobalMenuSeedData.BuildData(); var grant = Assert.Single(menus, m => m.Key == "onlineWalletLedger:grant"); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs index bc48723b..7ce143b1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Asset/OnlineAssetTestSupport.cs @@ -16,7 +16,7 @@ namespace GameFrameX.Core.Tests.Online.Asset; // IOnlineServerClient fake 与 OnlineCall 记录类都内嵌为私有嵌套类型,避免平级多类型破规。 internal static class OnlineAssetTestSupport { - public const long A = 4001; + public const long TenantA = 4001; public const long App100 = 100; public const long Area1001 = 2001; public const long Area1002 = 2002; @@ -63,10 +63,10 @@ internal sealed record OnlineCall(string Action, object Request, long ServerId); return new SqlSugarRepository { Context = db, }; } - public static CurrentUserContext CreateUserContext(long id = A) + public static CurrentUserContext CreateUserContext(long tenantId = TenantA) { var identity = new global::System.Security.Claims.ClaimsIdentity("TestAuth"); - identity.AddClaim(new global::System.Security.Claims.Claim("Id", id.ToString())); + identity.AddClaim(new global::System.Security.Claims.Claim("TenantId", tenantId.ToString())); var httpContext = new DefaultHttpContext { User = new global::System.Security.Claims.ClaimsPrincipal(identity), }; var accessor = new HttpContextAccessor { HttpContext = httpContext, }; return new CurrentUserContext(accessor); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs index a915ed9a..8f0020a1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Console/OnlineConsoleMenuSeedTests.cs @@ -65,7 +65,7 @@ public void OnlineConsoleMenus_QueryButtons_CarryPermissionMatching_EndpointConv } [Fact] - public void OnlineConsoleMenus_ExecuteButton_IsAdminOnly() + public void OnlineConsoleMenus_ExecuteButton_IsTenantAdminOnly() { var menus = GlobalMenuSeedData.BuildData(); var execute = Assert.Single(menus, m => m.Key == "onlinePlayerTimeline:execute"); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs index eeee90ca..594bd5af 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlineConfigRolloutServiceTests.cs @@ -23,7 +23,7 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 回滚目标不存在拒绝、下发失败删行重抛(不留半生效审计行)。 public sealed class GameOnlineConfigRolloutServiceTests : IDisposable { - private const long A = 1001; + private const long TenantA = 1001; private const long App100 = 100; private const long Area1001 = 2001; private const long SegmentSynced = 7001; @@ -220,15 +220,15 @@ private GameOnlineConfigRolloutService CreateService() Repository(), Repository(), _dispatch, - CreateUserContext(A)); + CreateUserContext(TenantA)); } - private static CurrentUserContext CreateUserContext(long? id) + private static CurrentUserContext CreateUserContext(long? tenantId) { var identity = new ClaimsIdentity("TestAuth"); - if (id.HasValue) + if (tenantId.HasValue) { - identity.AddClaim(new Claim("Id", id.Value.ToString())); + identity.AddClaim(new Claim("TenantId", tenantId.Value.ToString())); } var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs index 75f65426..4dbf1a46 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/GameOnlinePlayerSegmentServiceTests.cs @@ -21,7 +21,7 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 被灰度版本行引用的分群不可删除。 public sealed class GameOnlinePlayerSegmentServiceTests : IDisposable { - private const long A = 1001; + private const long TenantA = 1001; private const long App100 = 100; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"online_segment_{Guid.NewGuid():N}.db"); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs index b95c5953..d322986e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/LiveOps/OnlineLiveOpsDispatchServiceTests.cs @@ -28,7 +28,7 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 分群同步通道回执映射。作用域走真实 OnlineScopeContextFactory(含租户归属校验)。 public sealed class OnlineLiveOpsDispatchServiceTests : IDisposable { - private const long A = 1001; + private const long TenantA = 1001; private const long App100 = 100; private const long App200 = 200; private const long Area1001 = 2001; // 归属 App100 @@ -237,12 +237,12 @@ private OnlineLiveOpsDispatchService CreateService() Repository()); } - private static CurrentUserContext CreateUserContext(long? id) + private static CurrentUserContext CreateUserContext(long? tenantId) { var identity = new ClaimsIdentity("TestAuth"); - if (id.HasValue) + if (tenantId.HasValue) { - identity.AddClaim(new Claim("Id", id.Value.ToString())); + identity.AddClaim(new Claim("TenantId", tenantId.Value.ToString())); } var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs index 19be5365..1a83b46f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlinePenaltyLinkCommandServiceTests.cs @@ -24,7 +24,7 @@ namespace GameFrameX.Core.Tests.Online.Social; // 单区服失败(Online 业务码 / 传输层)不抛不回滚事实源、非 Active / 纯落账动作 / 全区服无目标拒绝。 public sealed class OnlinePenaltyLinkCommandServiceTests : IDisposable { - private const long A = 3001; + private const long TenantA = 3001; private const long App100 = 100; private const long Area1001 = 2001; private const long Area1002 = 2002; @@ -220,7 +220,7 @@ public async Task ExecuteLinkAsync_RejectsGlobalPenaltyWithoutTargetServers() private OnlinePenaltyLinkCommandService CreateService(IOnlineServerClient onlineServerClient) { - var userContext = CreateUserContext(A); + var userContext = CreateUserContext(TenantA); var factory = new OnlineScopeContextFactory(Repository()); return new OnlinePenaltyLinkCommandService( Repository(), @@ -291,10 +291,10 @@ private static GameAreaEntity NewArea(long id, long now) return new SqlSugarRepository { Context = _db, }; } - private static CurrentUserContext CreateUserContext(long id) + private static CurrentUserContext CreateUserContext(long tenantId) { var identity = new ClaimsIdentity("TestAuth"); - identity.AddClaim(new Claim("Id", id.ToString())); + identity.AddClaim(new Claim("TenantId", tenantId.ToString())); var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; var accessor = new HttpContextAccessor { HttpContext = httpContext, }; return new CurrentUserContext(accessor); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs index b9b16ddb..aa4ff7ae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Online/Social/OnlineReportCaseServiceTests.cs @@ -24,7 +24,7 @@ namespace GameFrameX.Core.Tests.Online.Social; // 案件回写失败落响应原因不阻断;Mute 缺时长服务端兜底拒绝;Page 过滤透传与游标往返。 public sealed class OnlineReportCaseServiceTests : IDisposable { - private const long A = 4001; + private const long TenantA = 4001; private const long App100 = 100; private const long Area1001 = 2001; private const long OperatorUserId = 77; @@ -265,7 +265,7 @@ public async Task PageAsync_PassesThroughFiltersAndCursor() private OnlineReportCaseService CreateService(IOnlineServerClient onlineServerClient) { - var userContext = CreateUserContext(A, OperatorUserId); + var userContext = CreateUserContext(TenantA, OperatorUserId); var factory = new OnlineScopeContextFactory(Repository()); var linkService = new OnlinePenaltyLinkCommandService( Repository(), @@ -313,10 +313,10 @@ await _db.Insertable(new GameAreaEntity return new SqlSugarRepository { Context = _db, }; } - private static CurrentUserContext CreateUserContext(long id, long userId) + private static CurrentUserContext CreateUserContext(long tenantId, long userId) { var identity = new ClaimsIdentity("TestAuth"); - identity.AddClaim(new Claim("Id", id.ToString())); + identity.AddClaim(new Claim("TenantId", tenantId.ToString())); identity.AddClaim(new Claim(ClaimConst.UserId, userId.ToString())); var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; var accessor = new HttpContextAccessor { HttpContext = httpContext, }; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs index b2ce0905..66ced6a3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs @@ -26,17 +26,17 @@ public sealed class PaymentOptionSettingDecryptClosureTests [PostgreSqlFact] public void GetOptionSetting_SensitiveJsonFieldDecrypts() { - const long id = 1900000004001; + const long tenantId = 1900000004001; const long appId = 1900000004101; var originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); _ = Assembly.Load("GameFrameX.Payment.AliPay"); try { - using var fixture = new PostgresPaymentFixture(id, appId); + using var fixture = new PostgresPaymentFixture(tenantId, appId); var configJson = PaymentConfigCrypto.EncryptConfigJson("alipay", "{\"AliPayAppId\":\"2021001\",\"AliPayMerchantPrivateKey\":\"plain-merchant-key\",\"AliPayGatewayUrl\":\"https://openapi.alipay.com/gateway.do\"}"); - fixture.Db.Insertable(new GamePaymentConfigEntity + fixture.TenantDb.Insertable(new GamePaymentConfigEntity { Id = 1900000004201, IsEnabled = true, PayChannel = "alipay", ConfigJson = configJson, }).ExecuteCommand(); @@ -65,7 +65,7 @@ private sealed class PostgresPaymentFixture : IDisposable { private readonly string _databaseName; - public PostgresPaymentFixture(long id, long appId) + public PostgresPaymentFixture(long tenantId, long appId) { _databaseName = ("gfx_c372_pay_" + Guid.NewGuid().ToString("N")).ToLowerInvariant(); ExecuteAdminCommand($"CREATE DATABASE \"{_databaseName}\""); @@ -75,14 +75,14 @@ public PostgresPaymentFixture(long id, long appId) DbProvider = MainDb; - Db = DbProvider; - Db.CodeFirst.InitTables(typeof(GamePaymentConfigEntity)); + TenantDb = DbProvider; + TenantDb.CodeFirst.InitTables(typeof(GamePaymentConfigEntity)); _ = appId; } public SqlSugarScope MainDb { get; } - public ISqlSugarClient Db { get; } + public ISqlSugarClient TenantDb { get; } public ISqlSugarClient DbProvider { get; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs index 62a118d0..961ac12a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs @@ -19,7 +19,7 @@ namespace GameFrameX.Core.Tests.ServerManager.Online; // S3/C401 断链修复点 public sealed class OnlineScopeContextFactoryTests : IDisposable { - private const long A = 1001; + private const long TenantA = 1001; private const long App100 = 100; private const long App200 = 200; private const long Area1001 = 2001; // 归属 App100 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs index 08698268..ca9afdf9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs @@ -27,7 +27,7 @@ namespace GameFrameX.Core.Tests.ServerManager.Online; // 作用域构造后区服被删的时序漂移拒绝。 public sealed class OnlineServerClientTests : IDisposable { - private const long A = 1001; + private const long TenantA = 1001; private const long App100 = 100; private const long Area1001 = 2001; @@ -105,10 +105,10 @@ public async Task PostAsync_MergesScopeIntoPayload_OverridingClientScopeFields() var handler = new FakeHandler(SuccessEnvelope(new OnlineDemoData { PlayerId = "p-1", })); var client = CreateClient(handler); - await client.PostAsync("kick_player", new { Id = 999L, AppId = 888L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, }, await CreateScopeAsync()); + await client.PostAsync("kick_player", new { TenantId = 999L, AppId = 888L, ServerId = 777L, RequestId = "request-1", IdempotencyKey = "key-1", Reason = 3, }, await CreateScopeAsync()); var body = handler.LastRequestBodyJson; - Assert.False(body.ContainsKey("Id")); + Assert.False(body.ContainsKey("TenantId")); Assert.False(body.ContainsKey("AppId")); Assert.Equal(Area1001, Convert.ToInt64(body["ServerId"]?.ToString())); Assert.Equal("request-1", body["RequestId"]?.ToString()); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs index e22aa82b..edef1a50 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ChannelDefinitionSoftDeleteVisibilityTests.cs @@ -78,7 +78,7 @@ public async Task GlobalSoftDeleteFilter_StillHidesSoftDeletedRow() // 锁定过滤器装配真实生效:不绕过过滤器时软删行被 ISafeDeletedFilter 隐藏 // (防止「过滤器未装上导致前两个测试恒绿」假阳性)。 - var rows = await _db.Db.Queryable() + var rows = await _db.TenantDb.Queryable() .Where(u => u.Code.StartsWith("GFX_919")) .ToListAsync(); var codes = rows.Select(u => u.Code).ToList(); @@ -88,7 +88,7 @@ public async Task GlobalSoftDeleteFilter_StillHidesSoftDeletedRow() private void SeedChannel(long id, string code, bool isEnabled, bool isDeleted) { - _db.Db.Insertable(new ChannelDefinitionEntity + _db.TenantDb.Insertable(new ChannelDefinitionEntity { Id = id, Code = code, @@ -105,7 +105,7 @@ private void SeedChannel(long id, string code, bool isEnabled, bool isDeleted) private ChannelDefinitionService CreateService() { // 复刻 Admin host DI 形态:Repository 按实体边界路由——租户表经 DbProvider 走租户库 - // (生产过滤器 + Id 填充 AOP 已装配),全局表落主库连接。 + // (生产过滤器 + TenantId 填充 AOP 已装配),全局表落主库连接。 var currentUserContext = new CurrentUserContext(new HttpContextAccessor()); return new ChannelDefinitionService( diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs index d2fdff4f..dcf8e577 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/ClientApiPolicyServiceTests.cs @@ -10,7 +10,7 @@ namespace GameFrameX.Core.Tests.SqlSugar; // C378(GFX-838)+ C368/C371 组合:合并表写路径语义。 // change:gfx-doc/dev/game-business/changes/C378-client-api-policy-merge/change.md -// AddAsync 空白 SigningKey → 服务端生成 64-hex;(Id, AppId) 作用域唯一; +// AddAsync 空白 SigningKey → 服务端生成 64-hex;(TenantId, AppId) 作用域唯一; // 票据固定到期时间 30 天上限(C142);UpdateAsync ****** 与空白同义保留原值(C368)。 public sealed class ClientApiPolicyServiceTests : IDisposable { @@ -45,7 +45,7 @@ await service.AddAsync(new AddClientApiPolicyRequest TicketExpireTime = 0, }); - var row = _db.Db.Queryable().Single(); + var row = _db.TenantDb.Queryable().Single(); Assert.Matches("^[0-9a-f]{64}$", row.SigningKey); } @@ -86,7 +86,7 @@ await service.UpdateAsync(new UpdateClientApiPolicyRequest RowVersion = 0, }); - var row = _db.Db.Queryable().Single(); + var row = _db.TenantDb.Queryable().Single(); Assert.Equal("original-key", row.SigningKey); Assert.Equal(90, row.LifetimeMinutes); } @@ -107,7 +107,7 @@ await service.UpdateAsync(new UpdateClientApiPolicyRequest RowVersion = 0, }); - var row = _db.Db.Queryable().Single(); + var row = _db.TenantDb.Queryable().Single(); Assert.Equal("original-key", row.SigningKey); Assert.Equal(120, row.LifetimeMinutes); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs index e9add7ae..c837affd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SeedInsertOnlyTests.cs @@ -116,26 +116,26 @@ public void InitDatabase_EnableIncreSeedTrue_RunsAuthoritativeSeedsOnly() [Fact] public void DefaultTenantSeeder_Upsert_InsertsMissingRowsOnly() { - using (var scope = CreateScope("2001")) + using (var scope = CreateScope("tenant_2001")) { - var config = CreateConfig("2001"); - SqlSugarSetup.InitDatabase(scope, config, new[] { typeof(RoleEntity), }); + var tenantConfig = CreateConfig("tenant_2001"); + SqlSugarSetup.InitDatabase(scope, tenantConfig, new[] { typeof(RoleEntity), }); - var db = scope.GetConnectionScope("2001"); + var tenantDb = scope.GetConnectionScope("tenant_2001"); var role = new RoleEntity { Id = 99001, Name = "初始角色", Code = "init_role", }; - DefaultDatabaseSeeder.Upsert(db, new[] { role, }); + DefaultDatabaseSeeder.Upsert(tenantDb, new[] { role, }); // 模拟用户在管理端改名 - db.Updateable() + tenantDb.Updateable() .SetColumns(u => u.Name == "用户改过") .Where(u => u.Id == 99001) .ExecuteCommand(); // 二次 seed(如默认租户库重复初始化):同名主键行不再覆盖 var seedAgain = new RoleEntity { Id = 99001, Name = "seed 新值", Code = "init_role", }; - DefaultDatabaseSeeder.Upsert(db, new[] { seedAgain, }); + DefaultDatabaseSeeder.Upsert(tenantDb, new[] { seedAgain, }); - var name = db.Queryable().First(u => u.Id == 99001).Name; + var name = tenantDb.Queryable().First(u => u.Id == 99001).Name; Assert.Equal("用户改过", name); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs index 58da31c1..6378e9a7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDatabaseInitializationTests.cs @@ -269,10 +269,10 @@ public void MenuSeedCatalog_LoadFromDb_KeepsRuntimeAutoPermissionMenusAsDbSource [Fact] public void ProjectionDto_InheritingEntity_DoesNotRequirePhysicalOwnership() { - using var scope = CreateScope("1003"); - var db = scope.GetConnectionScope("1003"); + using var scope = CreateScope("tenant_1003"); + var tenantDb = scope.GetConnectionScope("tenant_1003"); - var sql = db.Queryable() + var sql = tenantDb.Queryable() .Select() .ToSql(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs index 140559fb..ec60169d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs @@ -41,8 +41,8 @@ public AuthTestHost() { SqlSugarCache.Configure(new FakeCache()); var mainConfig = CreateConfig(MainConfigId); - var config = CreateConfig(ConfigId); - _client = new SqlSugarScope(new List { mainConfig, config, }); + var tenantConfig = CreateConfig(ConfigId); + _client = new SqlSugarScope(new List { mainConfig, tenantConfig, }); SqlSugarSetup.InitDatabase(_client, mainConfig, new[] { typeof(SystemUserEntity), @@ -50,7 +50,7 @@ public AuthTestHost() typeof(UserEntity), }); _client.GetConnectionScope(MainConfigId).CodeFirst.InitTables(); - SqlSugarSetup.InitDatabase(_client, config, new[] + SqlSugarSetup.InitDatabase(_client, tenantConfig, new[] { typeof(UserEntity), }); @@ -124,13 +124,13 @@ public async Task SeedSuperAdminAsync(string account, string password, bool? isE /// /// 在租户库 seed 一条 (AccountType=NormalUser,IsEnabled=true,以通过冻结检查进入租户禁用分支)。 /// - public async Task SeedUserAsync(long id, string account, string password) + public async Task SeedUserAsync(long tenantId, string account, string password) { var user = BuildUser(UserId, account, password, AccountTypeEnum.NormalUser); user.IsEnabled = true; - var db = _client.GetConnectionScope(MainConfigId); - await db.Insertable(user).ExecuteCommandAsync(); + var tenantDb = _client.GetConnectionScope(MainConfigId); + await tenantDb.Insertable(user).ExecuteCommandAsync(); } public void Dispose() @@ -145,7 +145,7 @@ public void Dispose() } /// - /// 填充 共享字段(system_user / user 通用),调用方再按需覆盖 Id/Id/IsEnabled/AccountType。 + /// 填充 共享字段(system_user / user 通用),调用方再按需覆盖 Id/TenantId/IsEnabled/AccountType。 /// private static T BuildUser(long id, string account, string password, AccountTypeEnum accountType) where T : SystemUserBase, new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs index a2be6bd2..04048598 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs @@ -6,18 +6,18 @@ namespace GameFrameX.Core.Tests.System; internal sealed class FakeDbConnectionProvider { private readonly SqlSugarScope _client; - private readonly string _tenantConfigId; + private readonly string _configId; public FakeDbConnectionProvider(SqlSugarScope client, string configId) { _client = client; - _tenantConfigId = configId; + _configId = configId; } - public ISqlSugarClient Database => _client.GetConnectionScope(_tenantConfigId); + public ISqlSugarClient Database => _client.GetConnectionScope(_configId); - public SqlSugarScopeProvider GetDbConnectionScope(long id) + public SqlSugarScopeProvider GetDbConnectionScope(long tenantId) { - return _client.GetConnectionScope(_tenantConfigId); + return _client.GetConnectionScope(_configId); } } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs index 0ae6c26d..3f54ba46 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs @@ -16,12 +16,12 @@ namespace GameFrameX.Core.Tests.System; // 用 Sqlite 双库 SqlSugarScope 种子数据,伪造 HttpMessageHandler 验证聚合、降级、计数与趋势桶行为。 public class GameHomeServiceTests : IDisposable { - private const long Id = 1001L; + private const long TenantId = 1001L; private const string ConfigId = "1001"; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"game_home_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _db; - private readonly FakeDbConnectionProvider _tenantDbProvider; + private readonly FakeDbConnectionProvider _dbProvider; public GameHomeServiceTests() { @@ -41,18 +41,18 @@ public GameHomeServiceTests() }; SqlSugarSetup.SetDbConfig(config); _db = new SqlSugarScope(new List { config, }); - var scope = _db.GetConnectionScope(ConfigId); - scope.CodeFirst.InitTables(); - scope.CodeFirst.InitTables(); - scope.CodeFirst.InitTables(); - scope.CodeFirst.InitTables(); - _tenantDbProvider = new FakeDbConnectionProvider(_db, ConfigId); + var tenantScope = _db.GetConnectionScope(ConfigId); + tenantScope.CodeFirst.InitTables(); + tenantScope.CodeFirst.InitTables(); + tenantScope.CodeFirst.InitTables(); + tenantScope.CodeFirst.InitTables(); + _dbProvider = new FakeDbConnectionProvider(_db, ConfigId); } private GameHomeService CreateService(HttpClient? httpClient = null) { var client = httpClient ?? new HttpClient(new StubHandler(_ => throw new InvalidOperationException("should not call"))); - return new GameHomeService(new StubHttpClientFactory(client), _tenantDbProvider.Database); + return new GameHomeService(new StubHttpClientFactory(client), _dbProvider.Database); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs index 0108d6ed..76ca2f57 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogFieldSerializationGuardTests.cs @@ -31,7 +31,7 @@ public class LogFieldSerializationGuardTests ""parameters"": [ { ""name"": ""input"", - ""value"": { ""account"": ""admin"", ""password"": ""secret"", ""id"": 1300000000001 } + ""value"": { ""account"": ""admin"", ""password"": ""secret"", ""tenantId"": 1300000000001 } } ], ""returnInformation"": { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs index ca41b394..43021d7f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Core.Tests.System; /// /// C156 日志边界隔离测试。日志不再集中到独立日志库,平台日志(SystemLog*)归属主库 system_log_*, -/// 租户日志(Log*)归属当前租户库 log_*。隔离由实体归属 + 物理库边界共同保证: +/// 租户日志(TenantLog*)归属当前租户库 log_*。隔离由实体归属 + 物理库边界共同保证: /// 平台与租户日志为不同 CLR 类型,分别路由到不同数据库(路由/catalog 验收见 SqlSugarDatabaseInitializationTests)。 /// public class LogQueryIsolationTests @@ -85,8 +85,8 @@ public void TryReadLoginScope_LoginParameters_ReturnsAccount() value = new { account = "admin", - id = 1300000000001, - host = (string?)null, + tenantId = 1300000000001, + tenantHost = (string?)null, }, }, }); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs index a6d8977a..86a021fe 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs @@ -68,8 +68,8 @@ private GameLoginTicketKeyEntity SeedActiveTicketKey() IsEnabled = true, Remark = "seed", }; - _db.Db.Insertable(oldKey).ExecuteCommand(); - return _db.Db.Queryable().First(u => u.Kid == "kid-old-active"); + _db.TenantDb.Insertable(oldKey).ExecuteCommand(); + return _db.TenantDb.Queryable().First(u => u.Kid == "kid-old-active"); } [Fact] @@ -81,14 +81,14 @@ public async Task TicketKeyRotate_DefaultOldKeyExpiresIn7Days() await CreateTicketKeyService().RotateAsync(new GameLoginTicketKeyRotateRequest { }); var after = TimerHelper.UnixTimeSeconds(); - var storedOld = _db.Db.Queryable().First(u => u.Id == oldKey.Id); + var storedOld = _db.TenantDb.Queryable().First(u => u.Id == oldKey.Id); Assert.NotNull(storedOld.RotatedTime); Assert.InRange(storedOld.RotatedTime.Value, before, after); Assert.InRange(storedOld.ExpireTime!.Value, before + GameLoginTicketKeyService.OldKeyDefaultExpireSeconds, after + GameLoginTicketKeyService.OldKeyDefaultExpireSeconds); // 新钥立即生效(NotBefore ∈ [before, after]),且未被标记轮换 - var newKey = _db.Db.Queryable().First(u => u.Kid != "kid-old-active"); + var newKey = _db.TenantDb.Queryable().First(u => u.Kid != "kid-old-active"); Assert.InRange(newKey.NotBeforeTime!.Value, before, after); Assert.Null(newKey.RotatedTime); } @@ -102,7 +102,7 @@ public async Task TicketKeyRotate_ExplicitOldKeyExpireWithin30Days_Applied() await CreateTicketKeyService().RotateAsync(new GameLoginTicketKeyRotateRequest { OldKeyExpireTime = explicitExpire, }); - var storedOld = _db.Db.Queryable().First(u => u.Id == oldKey.Id); + var storedOld = _db.TenantDb.Queryable().First(u => u.Id == oldKey.Id); Assert.Equal(explicitExpire, storedOld.ExpireTime); Assert.NotNull(storedOld.RotatedTime); } @@ -139,7 +139,7 @@ public async Task TicketKeyRotate_NoActiveOldKey_IsNoop() // 无旧钥场景(首把密钥轮换):仅生成新钥,不抛错 await CreateTicketKeyService().RotateAsync(new GameLoginTicketKeyRotateRequest { }); - var count = _db.Db.Queryable().Count(); + var count = _db.TenantDb.Queryable().Count(); Assert.Equal(1, count); } @@ -152,7 +152,7 @@ public async Task PolicyRotate_GeneratesNewCipher_OldValueRevokedImmediately() LifetimeMinutes = 30, TicketExpireTime = 0, }); - var cipherBefore = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id).SigningKey; + var cipherBefore = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id).SigningKey; var plainBefore = SecretCrypto.Decrypt(cipherBefore); Assert.StartsWith(SecretCrypto.EncryptedPrefix, cipherBefore, StringComparison.Ordinal); @@ -160,7 +160,7 @@ public async Task PolicyRotate_GeneratesNewCipher_OldValueRevokedImmediately() await CreatePolicyService().RotateAsync(new BaseIdRequest { Id = added.Id, }); var after = TimerHelper.UnixTimeSeconds(); - var stored = _db.Db.Queryable().Filter(null, true).First(u => u.Id == added.Id); + var stored = _db.TenantDb.Queryable().Filter(null, true).First(u => u.Id == added.Id); // 新密文 ≠ 旧密文(旧值即刻作废),仍为密文形态且可解密为新 64-hex Assert.NotEqual(cipherBefore, stored.SigningKey); Assert.StartsWith(SecretCrypto.EncryptedPrefix, stored.SigningKey, StringComparison.Ordinal); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs index 381da7f7..22ff97b2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs @@ -43,7 +43,7 @@ public sealed class CacheConst /// /// 租户缓存 /// - public const string Key = "cache:tenant"; + public const string KeyTenant = "cache:tenant"; /// /// 常量下拉框 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorCode.cs index 096a7888..a5f859c6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorCode.cs @@ -44,7 +44,7 @@ public enum ErrorCode /// /// 普通租户禁止使用ID隔离 /// - [ErrorText("普通租户禁止使用ID隔离", "ID isolation is forbidden for normal s")] + [ErrorText("普通租户禁止使用ID隔离", "ID isolation is forbidden for normal tenants")] IdIsolationForbiddenForNormal = 30600007, /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs index e6dfbe60..dc1b2450 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Core.Middleware; /// 两种 wire 形态(历史契约并存,不可合并为单一形态): /// /// :PascalCase {Code, Message},未传 errorCode 时 Code 回退 HTTP 状态码 —— -/// Client.Api(AppResolution / PublicCallbackResolution / Expiration)与 Hub.Api(Hub / GameAppOpenAccessAuth) +/// Client.Api(AppResolution / PublicCallbackResolution / Expiration)与 Hub.Api(HubTenant / GameAppOpenAccessAuth) /// 的拒绝出口;errorCode 参数直接消费 C262 统一错误码枚举数值(如 ErrorCode.Disabled)。 /// :camelCase {code, message},601xx 信封码 /// (签名 60101-60103 / 加密信封 60104-60106)—— 与 MVC 主信封 camelCase 一致、客户端 Lua 读 tbErr.code 的双端冻结契约。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs index e59c4fe9..3b3161cc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs @@ -8,11 +8,11 @@ namespace GameFrameX.Core.Middleware; /// public sealed class SessionKeyResolver : ISessionKeyResolver { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _dbProvider; public SessionKeyResolver(ISqlSugarClient dbProvider) { - _tenantDbProvider = dbProvider; + _dbProvider = dbProvider; } /// @@ -56,7 +56,7 @@ internal static SessionKeyLookupResult Judge(SessionKeyEntity key, long now) private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _tenantDbProvider.Queryable().ClearFilter() + return await _dbProvider.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs index b2eb1ef3..71107f1a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs @@ -8,11 +8,11 @@ namespace GameFrameX.Core.Middleware; /// public sealed class SignatureKeyResolver : ISignatureKeyResolver { - private readonly ISqlSugarClient _tenantDbProvider; + private readonly ISqlSugarClient _dbProvider; public SignatureKeyResolver(ISqlSugarClient dbProvider) { - _tenantDbProvider = dbProvider; + _dbProvider = dbProvider; } /// @@ -32,7 +32,7 @@ public async Task ResolveAsync(string kid) public async Task> GetActiveKeysAsync() { var now = TimerHelper.UnixTimeSeconds(); - var keys = await _tenantDbProvider.Queryable().ClearFilter() + var keys = await _dbProvider.Queryable().ClearFilter() .Where(key => key.IsDeleted == false && key.IsEnabled == true && (key.NotBeforeTime == null || key.NotBeforeTime <= now) && (key.ExpireTime == null || key.ExpireTime > now)).ToListAsync(); @@ -71,7 +71,7 @@ internal static SignatureKeyLookupResult Judge(AppSignatureKeyEntity key, long n private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _tenantDbProvider.Queryable().ClearFilter() + return await _dbProvider.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs index be080f9c..81e79410 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs @@ -11,8 +11,8 @@ namespace GameFrameX.Core.Service.User; [ApiDescriptionSettings(Order = 490)] public class UserService : BaseSystemService { - private readonly SqlSugarRepository _tenantUserRepository; - private readonly UserRoleService _tenantUserRoleService; + private readonly SqlSugarRepository _userRepository; + private readonly UserRoleService _userRoleService; private readonly SystemConfigService _systemConfigService; public UserService( @@ -22,8 +22,8 @@ public UserService( SystemConfigService systemConfigService) : base(currentUserContext) { - _tenantUserRepository = userRepository; - _tenantUserRoleService = userRoleService; + _userRepository = userRepository; + _userRoleService = userRoleService; _systemConfigService = systemConfigService; } @@ -47,7 +47,7 @@ internal static void NormalizeNewUser(UserEntity user) [ApiDescriptionSettings(Name = "Page")] public async Task> PageAsync(PageUserRequest input) { - return await _tenantUserRepository.AsQueryable() + return await _userRepository.AsQueryable() .Where(u => u.AccountType != AccountTypeEnum.SuperAdmin) .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account.Contains(input.Account)) .WhereIF(!string.IsNullOrWhiteSpace(input.RealName), u => u.RealName.Contains(input.RealName)) @@ -68,7 +68,7 @@ public async Task> PageAsync(PageUserRequest inp [DisplayName("增加用户")] public async Task AddUserAsync(AddUserRequest input) { - var isExist = await _tenantUserRepository.AsQueryable().Filter(null, true).AnyAsync(u => u.Account == input.Account); + var isExist = await _userRepository.AsQueryable().Filter(null, true).AnyAsync(u => u.Account == input.Account); if (isExist) { throw BusinessError.Oh(SystemUserErrorCode.AccountAlreadyExists); @@ -79,7 +79,7 @@ public async Task AddUserAsync(AddUserRequest input) var user = input.Adapt(); NormalizeNewUser(user); user.Password = CryptogramUtility.HashPassword(password); - var newUser = await _tenantUserRepository.AsInsertable(user).ExecuteReturnEntityAsync(); + var newUser = await _userRepository.AsInsertable(user).ExecuteReturnEntityAsync(); input.Id = newUser.Id; await UpdateUserRolesAsync(input); @@ -97,12 +97,12 @@ public async Task AddUserAsync(AddUserRequest input) [DisplayName("更新用户")] public async Task UpdateUserAsync(UpdateUserRequest input) { - if (await _tenantUserRepository.AsQueryable().Filter(null, true).AnyAsync(u => u.Account == input.Account && u.Id != input.Id)) + if (await _userRepository.AsQueryable().Filter(null, true).AnyAsync(u => u.Account == input.Account && u.Id != input.Id)) { throw BusinessError.Oh(SystemUserErrorCode.AccountAlreadyExists); } - await _tenantUserRepository.AsUpdateable(input.Adapt()).IgnoreColumns(true) + await _userRepository.AsUpdateable(input.Adapt()).IgnoreColumns(true) .IgnoreColumns(u => new { u.Password, u.IsEnabled, }).ExecuteCommandAsync(); await UpdateUserRolesAsync(input); @@ -131,7 +131,7 @@ private async Task UpdateUserRolesAsync(AddUserRequest input) [DisplayName("删除用户")] public async Task DeleteUserAsync(DeleteUserRequest input) { - var user = await _tenantUserRepository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); + var user = await _userRepository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); if (user.AccountType == AccountTypeEnum.SuperAdmin) { throw BusinessError.Oh(SystemUserErrorCode.DeleteSuperAdminForbidden); @@ -142,10 +142,10 @@ public async Task DeleteUserAsync(DeleteUserRequest input) throw BusinessError.Oh(SystemUserErrorCode.DeleteSelfForbidden); } - await _tenantUserRepository.DeleteAsync(user); + await _userRepository.DeleteAsync(user); // 删除用户角色 - await _tenantUserRoleService.DeleteUserRoleByUserIdAsync(input.Id); + await _userRoleService.DeleteUserRoleByUserIdAsync(input.Id); } @@ -157,7 +157,7 @@ public async Task DeleteUserAsync(DeleteUserRequest input) [ApiDescriptionSettings(Name = "GetBaseInfo")] public async Task GetBaseInfoAsync() { - var user = await _tenantUserRepository.GetFirstAsync(u => u.Id == CurrentUserContext.UserId); + var user = await _userRepository.GetFirstAsync(u => u.Id == CurrentUserContext.UserId); #pragma warning disable CS8603 // 查询未命中时返回 null 是既有 API 契约(前端按 null 判断 not-found) return user?.Adapt(); #pragma warning restore CS8603 @@ -172,7 +172,7 @@ public async Task GetBaseInfoAsync() [DisplayName("更新用户基本信息")] public async Task UpdateBaseInfoAsync(UserEntity user) { - return await _tenantUserRepository.AsUpdateable(user) + return await _userRepository.AsUpdateable(user) .IgnoreColumns(u => new { u.CreatedTime, u.Account, u.Password, u.AccountType, }).ExecuteCommandAsync(); } @@ -185,14 +185,14 @@ public async Task UpdateBaseInfoAsync(UserEntity user) [ApiDescriptionSettings(Name = "SetStatus")] public async Task SetStatusAsync(UserRequest input) { - var user = await _tenantUserRepository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); + var user = await _userRepository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); if (user.AccountType == AccountTypeEnum.SuperAdmin) { throw BusinessError.Oh(SystemUserErrorCode.ModifySuperAdminStatusForbidden); } user.IsEnabled = input.IsEnabled; - return await _tenantUserRepository.AsUpdateable(user).UpdateColumns(u => new { u.IsEnabled, }).ExecuteCommandAsync(); + return await _userRepository.AsUpdateable(user).UpdateColumns(u => new { u.IsEnabled, }).ExecuteCommandAsync(); } /// @@ -204,12 +204,12 @@ public async Task SetStatusAsync(UserRequest input) [ApiDescriptionSettings(Name = "GrantRole")] public async Task GrantRoleAsync(UserRoleRequest input) { - //var user = await _tenantUserRepository.GetFirstAsync(u => u.Id == input.UserId) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); + //var user = await _userRepository.GetFirstAsync(u => u.Id == input.UserId) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); //if (user.AccountType == AccountTypeEnum.SuperAdmin) // throw BusinessError.Oh(SystemUserErrorCode.AssignRoleToSuperAdminForbidden); - await _tenantUserRoleService.GrantUserRoleAsync(input); - SqlSugarFilter.ClearUserDataScopeCache(input.UserId, _tenantUserRepository.Context.CurrentConnectionConfig.ConfigId?.ToString() ?? string.Empty); + await _userRoleService.GrantUserRoleAsync(input); + SqlSugarFilter.ClearUserDataScopeCache(input.UserId, _userRepository.Context.CurrentConnectionConfig.ConfigId?.ToString() ?? string.Empty); } /// @@ -221,7 +221,7 @@ public async Task GrantRoleAsync(UserRoleRequest input) [ApiDescriptionSettings(Name = "ChangePwd")] public async Task ChangePwdAsync(ChangePwdRequest input) { - var user = await _tenantUserRepository.GetFirstAsync(u => u.Id == CurrentUserContext.UserId) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); + var user = await _userRepository.GetFirstAsync(u => u.Id == CurrentUserContext.UserId) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); if (!CryptogramUtility.VerifyPassword(input.PasswordOld, user.Password)) { throw BusinessError.Oh(SystemUserErrorCode.OldPasswordMismatch); @@ -239,7 +239,7 @@ public async Task ChangePwdAsync(ChangePwdRequest input) user.Password = CryptogramUtility.HashPassword(input.PasswordNew); } - return await _tenantUserRepository.AsUpdateable(user).UpdateColumns(u => u.Password).ExecuteCommandAsync(); + return await _userRepository.AsUpdateable(user).UpdateColumns(u => u.Password).ExecuteCommandAsync(); } /// @@ -251,10 +251,10 @@ public async Task ChangePwdAsync(ChangePwdRequest input) [ApiDescriptionSettings(Name = "ResetPwd")] public async Task> ResetPwdAsync(ResetPwdUserRequest input) { - var user = await _tenantUserRepository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); + var user = await _userRepository.GetFirstAsync(u => u.Id == input.Id) ?? throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); var password = await _systemConfigService.GetConfigValueAsync(CommonConst.SysPassword); user.Password = CryptogramUtility.HashPassword(password); - await _tenantUserRepository.AsUpdateable(user).UpdateColumns(u => u.Password).ExecuteCommandAsync(); + await _userRepository.AsUpdateable(user).UpdateColumns(u => u.Password).ExecuteCommandAsync(); return HttpJsonResultData.Success(new ResetPwdResponse { NewPassword = password, @@ -270,7 +270,7 @@ public async Task> ResetPwdAsync(ResetPwdUs [ApiDescriptionSettings(Name = "GetOwnRoleList")] public async Task> GetOwnRoleListAsync(long userId) { - return await _tenantUserRoleService.GetUserRoleIdListAsync(userId); + return await _userRoleService.GetUserRoleIdListAsync(userId); } } \ No newline at end of file From ed0072c17c2a2ef19b7d7f3105acd6fd248d961e Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:34:12 +0800 Subject: [PATCH 27/86] =?UTF-8?q?refactor:=20P0=20=E5=A4=84=E7=BD=AE?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=20residue=EF=BC=88tenantDb=20=E5=B1=80?= =?UTF-8?q?=E9=83=A8=E5=8F=98=E9=87=8F=E6=B6=88=E6=AD=A7=E4=B8=8E=E8=BE=B9?= =?UTF-8?q?=E7=95=8C=E6=96=87=E6=A1=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Application 四个文件的 tenantDb 局部变量改为 mainDb(R1-a 泛化词守卫命中项, P0 按归属消歧);SystemDatabaseService 边界错误文案改为无前缀业务表口径。 Linear: GFX-1232 --- .../GameHome/GameHomeOnlineCounter.cs | 6 ++-- .../Dashboard/GameHome/GameHomeService.cs | 30 +++++++++---------- .../DataBase/SystemDatabaseService.cs | 2 +- .../Platform/Job/GameHomeOnlineSampleJob.cs | 8 ++--- .../OpenAccess/SystemOpenAccessService.cs | 8 ++--- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs index d1cace31..27500eeb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs @@ -14,12 +14,12 @@ public static class GameHomeOnlineCounter /// /// 按指定租户库连接聚合全服在线人数。无可用区服时返回 0。 /// - /// 租户业务库连接(必须已路由到目标租户库)。 + /// 租户业务库连接(必须已路由到目标租户库)。 /// HTTP 客户端工厂。 /// 启用区服在线人数之和。 - public static async Task GetTotalOnlineAsync(ISqlSugarClient tenantDb, IHttpClientFactory httpClientFactory) + public static async Task GetTotalOnlineAsync(ISqlSugarClient mainDb, IHttpClientFactory httpClientFactory) { - var areas = await tenantDb.Queryable() + var areas = await mainDb.Queryable() .Where(u => u.IsEnabled == true && u.HttpManageUrl != null && u.HttpManageUrl != "") .ToListAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs index a2f54fd1..4e51f4ea 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeService.cs @@ -35,8 +35,8 @@ public async Task> GetOnlineAsync() // C175:从全局 GameServerOptions.HttpRootUrl 改为区服级聚合。仅统计启用且配置了管理地址的区服, // 每个区服按 Control 能力前缀调用 GetOnlinePlayer,求和返回全服在线人数。 // C321:区服表是租户库表,经租户库连接路由查询;平台面(无租户上下文)返回明确业务错误而非裸 500。 - var tenantDb = ResolveDb("首页在线人数"); - var total = await GameHomeOnlineCounter.GetTotalOnlineAsync(tenantDb, _httpClientFactory); + var mainDb = ResolveDb("首页在线人数"); + var total = await GameHomeOnlineCounter.GetTotalOnlineAsync(mainDb, _httpClientFactory); return HttpJsonResultData.Success(new GameHomeOnlineResponse { OnlineCount = total, }); } @@ -49,31 +49,31 @@ public async Task> GetOnlineAsync() [DisplayName("首页运营驾驶舱聚合读数")] public async Task> OverviewAsync() { - var tenantDb = ResolveDb("首页运营驾驶舱聚合读数"); + var mainDb = ResolveDb("首页运营驾驶舱聚合读数"); // 今日 0 点(服务器本地时区,运营视角)转 Unix 秒;CreatedTime 审计列为 Unix 秒,同为绝对时间可直接比较 var todayStart = new DateTimeOffset(DateTime.Now.Date).ToUnixTimeSeconds(); // 订单读数:今日订单数 + 待办细分(待发货/退款中为全量待办视角,不限下单日期) - var todayOrderCount = await tenantDb.Queryable() + var todayOrderCount = await mainDb.Queryable() .Where(u => u.CreatedTime >= todayStart) .CountAsync(); - var pendingShipmentCount = await tenantDb.Queryable() + var pendingShipmentCount = await mainDb.Queryable() .Where(u => u.Status == OrderStatusEnum.NotShipped) .CountAsync(); - var refundingCount = await tenantDb.Queryable() + var refundingCount = await mainDb.Queryable() .Where(u => u.Status == OrderStatusEnum.InitiateRefund || u.Status == OrderStatusEnum.RefundAgreement) .CountAsync(); // 玩家读数:总数 + 今日新增(CreatedTime 索引见实体 SugarIndex) - var playerTotalCount = await tenantDb.Queryable() + var playerTotalCount = await mainDb.Queryable() .CountAsync(); - var playerTodayNewCount = await tenantDb.Queryable() + var playerTodayNewCount = await mainDb.Queryable() .Where(u => u.CreatedTime >= todayStart) .CountAsync(); // 区服读数:按 ServerStatus 分组计数(全局 ISafeEnabledFilter 已隐藏禁用区服,AreaTotalCount 即启用区服总数) - var areaStatusCounts = await tenantDb.Queryable() + var areaStatusCounts = await mainDb.Queryable() .GroupBy(u => u.ServerStatus) .Select(u => new { ServerStatus = u.ServerStatus, Count = SqlFunc.AggregateCount(u.Id), }) .ToListAsync(); @@ -93,7 +93,7 @@ public async Task> OverviewAsync() } } - var onlineCount = await GameHomeOnlineCounter.GetTotalOnlineAsync(tenantDb, _httpClientFactory); + var onlineCount = await GameHomeOnlineCounter.GetTotalOnlineAsync(mainDb, _httpClientFactory); return HttpJsonResultData.Success(new GameHomeOverviewResponse { @@ -118,14 +118,14 @@ public async Task> OverviewAsync() [DisplayName("首页 24h 在线人数时序")] public async Task> OnlineTrendAsync() { - var tenantDb = ResolveDb("首页在线趋势"); + var mainDb = ResolveDb("首页在线趋势"); // 当前整点桶(Unix 秒整点值与时区无关)往前共 24 个桶,含当前进行中桶 var currentBucket = DateTimeOffset.UtcNow.ToUnixTimeSeconds() / 3600 * 3600; var earliestBucket = currentBucket - 23 * 3600; // 一次回读窗口内全部采样,内存中按桶归并取每桶最后采样 - var samples = await tenantDb.Queryable() + var samples = await mainDb.Queryable() .Where(u => u.SampleTime >= earliestBucket && u.SampleTime < currentBucket + 3600) .OrderBy(u => u.SampleTime) .ToListAsync(); @@ -157,12 +157,12 @@ public async Task> OnlineTrendAs /// private ISqlSugarClient ResolveDb(string operationName) { - var tenantDb = _dbConnectionProvider; - if (tenantDb == null) + var mainDb = _dbConnectionProvider; + if (mainDb == null) { throw BusinessError.Oh(GameHomeErrorCode.DbUnavailable); } - return tenantDb; + return mainDb; } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs index e6b329e6..2436fc0b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs @@ -250,7 +250,7 @@ private static void EnsurePhysicalTableAllowed(string configId, string tableName var databaseOwnership = ResolveDatabaseOwnership(configId); if (!SqlSugarEntityBoundary.IsPhysicalTableNameAllowedForDatabase(databaseOwnership, tableName)) { - throw BusinessError.Oh($"表名 {tableName} 不符合当前数据库 {configId} 的物理前缀边界。主库只能操作 system_/global_,租户库只能操作 tenant_。"); + throw BusinessError.Oh($"表名 {tableName} 不符合当前数据库 {configId} 的物理前缀边界。主库可操作 system_/global_ 前缀表与无前缀业务表。"); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs index 6c5ca69f..f4052a8e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Job/GameHomeOnlineSampleJob.cs @@ -41,19 +41,19 @@ public async Task ExecuteAsync(JobExecutingContext context, CancellationToken st /// 采样落表(桶起点唯一)。 /// 用普通 Insertable/Updateable 而非 DiffLog 变体(lesson:2026-07-13-sqlsugar-insertwithdifflog-prefix-loss)。 /// - private static async Task UpsertSampleAsync(ISqlSugarClient tenantDb, long bucketTime, int onlineCount, CancellationToken stoppingToken) + private static async Task UpsertSampleAsync(ISqlSugarClient mainDb, long bucketTime, int onlineCount, CancellationToken stoppingToken) { - var existing = await tenantDb.Queryable() + var existing = await mainDb.Queryable() .Where(u => u.SampleTime == bucketTime) .FirstAsync(stoppingToken); if (existing != null) { existing.OnlineCount = onlineCount; - await tenantDb.Updateable(existing).ExecuteCommandAsync(stoppingToken); + await mainDb.Updateable(existing).ExecuteCommandAsync(stoppingToken); return; } - await tenantDb.Insertable(new Entity.Business.Game.GameHomeOnlineSampleEntity + await mainDb.Insertable(new Entity.Business.Game.GameHomeOnlineSampleEntity { SampleTime = bucketTime, OnlineCount = onlineCount, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs index 82e852c7..f5946e20 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/OpenAccess/SystemOpenAccessService.cs @@ -153,11 +153,11 @@ public Task GetByKeyAsync([FromQuery] string accessKey) [NonAction] public BoundUser GetBoundUser(SystemOpenAccessEntity openAccess) { - var tenantDb = _dbConnectionProvider; - tenantDb.QueryFilter.ClearAndBackup(); + var mainDb = _dbConnectionProvider; + mainDb.QueryFilter.ClearAndBackup(); try { - var user = tenantDb.Queryable().First(u => u.Id == openAccess.BindUserId); + var user = mainDb.Queryable().First(u => u.Id == openAccess.BindUserId); if (user == null) { throw BusinessError.Oh(SystemUserErrorCode.AccountNotFound); @@ -167,7 +167,7 @@ public BoundUser GetBoundUser(SystemOpenAccessEntity openAccess) } finally { - tenantDb.QueryFilter.Restore(); + mainDb.QueryFilter.Restore(); } } } \ No newline at end of file From a7a59992b7bb1468d8c3a9fd31bc5f4307998896 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:35:56 +0800 Subject: [PATCH 28/86] =?UTF-8?q?test:=20=E4=BF=AE=E6=AD=A3=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E6=B5=8B=E8=AF=95=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理支付配置测试中指向已删除回调测试类的说明,避免保留失效的测试名称引用。\n\nLinear: GFX-1232 --- .../PayConfig/PaymentOptionSettingDecryptClosureTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs index 10ebcabf..caa94d37 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs @@ -20,7 +20,7 @@ namespace GameFrameX.Core.Tests.PayConfig; // change:gfx-doc/dev/client-api/changes/C372-runtime-credential-decrypt-closure/change.md // PG 真库回归:作用域 Where 的 Nullable.HasValue 闭包曾使 SqlSugar 生成非法 SQL // (SQLite 报 near "IS"、PG 报 near "NOT",真机冒烟发现 PG 同样失败),已提为局部布尔修复; -// 与 PublicCallbackTenantRoutingTests 同款 PG fixture。SQLite 侧等价回归见 RuntimeCredentialDecryptClosureTests。 +// 与公开回调测试同款 PG fixture。SQLite 侧等价回归见 RuntimeCredentialDecryptClosureTests。 public sealed class PaymentOptionSettingDecryptClosureTests { [PostgreSqlFact] @@ -58,7 +58,7 @@ public void GetOptionSetting_SensitiveJsonFieldDecrypts() } /// - /// 独立 PG 测试库 fixture(镜像 PublicCallbackTenantRoutingTests 私有实现,不跨测试类共享状态): + /// 独立 PG 测试库 fixture(不跨测试类共享状态): /// 建库 → 主库注册租户行 → 租户库建租户表,Dispose 整库删除。 /// private sealed class PostgresPaymentFixture : IDisposable @@ -119,7 +119,7 @@ private static string BuildConnectionString(string databaseName) } /// - /// 本地 PG(127.0.0.1:5432 postgres/postgres)不可用时跳过,语义同 PublicCallbackTenantRoutingTests.PostgreSqlFactAttribute。 + /// 本地 PG(127.0.0.1:5432 postgres/postgres)不可用时跳过。 /// private sealed class PostgreSqlFactAttribute : FactAttribute { From aaf72740be530ce6036e2f09d7aeeb8df42b339c Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:37:41 +0800 Subject: [PATCH 29/86] =?UTF-8?q?test:=20=E5=AE=8C=E5=96=84=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E7=99=BB=E5=BD=95=E7=BA=BF=E7=BC=86=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 记录游戏服请求完整 URI,确保身份覆盖回归同时验证 body 与 query 不含旧作用域字段。\n\nLinear: GFX-1232 --- .../ClientApi/ClientApiRecordingHttpHandler.cs | 9 ++++++++- .../ClientApi/ClientApiRoleEndpointTests.cs | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRecordingHttpHandler.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRecordingHttpHandler.cs index 29aa48b8..7ebe290e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRecordingHttpHandler.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRecordingHttpHandler.cs @@ -19,12 +19,18 @@ public IReadOnlyList RequestPaths get { return _requestPaths; } } + public IReadOnlyList RequestUris + { + get { return _requestUris; } + } + public IReadOnlyList RequestBodies { get { return _requestBodies; } } private readonly List _requestPaths = new(); + private readonly List _requestUris = new(); private readonly List _requestBodies = new(); public static ClientApiRecordingHttpHandler WithGameServerDefaults(long createdPlayerId = 501001) @@ -95,6 +101,7 @@ public int Count(string path) protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { var uri = request.RequestUri; + _requestUris.Add(uri?.ToString() ?? string.Empty); var path = uri?.AbsolutePath ?? string.Empty; _requestPaths.Add(path); if (request.Content != null) @@ -114,4 +121,4 @@ protected override async Task SendAsync(HttpRequestMessage Content = new StringContent(payload, Encoding.UTF8, "application/json"), }; } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs index 5846f186..44992be0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs @@ -216,9 +216,9 @@ public async Task GameRole_Login_IgnoresUnknownLegacyContextFields() Assert.DoesNotContain("gameAppId", body.RootElement.EnumerateObject().Select(property => property.Name), StringComparer.OrdinalIgnoreCase); // c406-keep } - Assert.DoesNotContain(handler.RequestPaths, path => path.Contains("tenantId", StringComparison.OrdinalIgnoreCase)); // c406-keep - Assert.DoesNotContain(handler.RequestPaths, path => path.Contains("appId", StringComparison.OrdinalIgnoreCase)); // c406-keep - Assert.DoesNotContain(handler.RequestPaths, path => path.Contains("gameAppId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(handler.RequestUris, uri => uri.Contains("tenantId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(handler.RequestUris, uri => uri.Contains("appId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(handler.RequestUris, uri => uri.Contains("gameAppId", StringComparison.OrdinalIgnoreCase)); // c406-keep } [Fact] From 8a930cc0f93731d44fefa138b0aadd56844b0ca4 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:41:25 +0800 Subject: [PATCH 30/86] =?UTF-8?q?fix:=20=E8=AF=B4=E6=98=8E=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E5=AD=97=E6=AE=B5=E6=8B=A6=E6=88=AA=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为 userId 与 accountId 身份覆盖字段补充逐项安全语义说明。\n\nLinear: GFX-1232 --- .../GameFrameX.Client.Api/GameRole/GameRoleController.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs index 4dab15a8..a5e31b25 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs @@ -18,7 +18,11 @@ namespace GameFrameX.Client.Api.GameRole; /// public class GameRoleController : BaseController { - private static readonly string[] IdentityOverrideFieldNames = { "userId", "accountId", }; + private static readonly string[] IdentityOverrideFieldNames = + { + "userId", // 覆盖令牌解析出的账号身份 + "accountId", // 覆盖同一账号身份的别名 + }; private readonly HttpClient _httpClientFactory; private readonly ClientApiTokenIssuer _clientApiTokenIssuer; From 0cea583d75a9d43d12b7e5e2fe5b0e0398a1271d Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:50:18 +0800 Subject: [PATCH 31/86] =?UTF-8?q?chore(core):=20=E6=97=A7=E5=BA=93?= =?UTF-8?q?=E5=AE=88=E5=8D=AB=E6=97=A7=E8=A1=A8=E5=90=8D=E8=A1=8C=E5=8A=A0?= =?UTF-8?q?=20c406-keep=20=E6=A0=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C406 R1-d / R3-b:LegacySchemaStartupGuard 的 system_tenant_entity 与 tenant_ 常量及注释、LegacySchemaStartupGuardTests 构造旧表名的六行、 JWT claim 测试的禁止 claim 说明行,统一加 c406-keep,防止 W2 改名 脚本改写后守卫失效或负向断言漂移。 Linear: GFX-1232 --- .../Bootstrap/LegacySchemaStartupGuardTests.cs | 12 ++++++------ .../System/PlatformJwtIssuedClaimSetTests.cs | 2 +- .../Bootstrap/LegacySchemaStartupGuard.cs | 10 ++++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs index c267bd0a..a74bb6c4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs @@ -20,25 +20,25 @@ public sealed class LegacySchemaStartupGuardTests : IDisposable [Fact] public void EnsureNotLegacySchema_TenantPrefixedTable_Throws() { - using var scope = CreateScopeWithLegacyTable("tenant_game_user_entity", out _); + using var scope = CreateScopeWithLegacyTable("tenant_game_user_entity", out _); // c406-keep var exception = Assert.Throws( () => LegacySchemaStartupGuard.EnsureNotLegacySchema(scope, CreateConfig("main"))); Assert.Contains("2.0 不支持旧库升级,只能用新库或整体回滚", exception.Message); - Assert.Contains("tenant_game_user_entity", exception.Message); + Assert.Contains("tenant_game_user_entity", exception.Message); // c406-keep } [Fact] public void EnsureNotLegacySchema_LegacyTenantRegistryTable_Throws() { - using var scope = CreateScopeWithLegacyTable("system_tenant_entity", out _); + using var scope = CreateScopeWithLegacyTable("system_tenant_entity", out _); // c406-keep var exception = Assert.Throws( () => LegacySchemaStartupGuard.EnsureNotLegacySchema(scope, CreateConfig("main"))); Assert.Contains("2.0 不支持旧库升级,只能用新库或整体回滚", exception.Message); - Assert.Contains("system_tenant_entity", exception.Message); + Assert.Contains("system_tenant_entity", exception.Message); // c406-keep } [Fact] @@ -58,7 +58,7 @@ public void EnsureNotLegacySchema_EmptyDatabase_PassesAndInitDatabaseCreatesTabl [Fact] public void GuardedInitSequence_LegacySchema_ThrowsBeforeCreatingAnyTable() { - using var scope = CreateScopeWithLegacyTable("tenant_game_user_entity", out _); + using var scope = CreateScopeWithLegacyTable("tenant_game_user_entity", out _); // c406-keep var config = CreateConfig("main"); var types = new[] { typeof(SystemUserEntity), typeof(GlobalMenuEntity), }; @@ -74,7 +74,7 @@ public void GuardedInitSequence_LegacySchema_ThrowsBeforeCreatingAnyTable() // 守卫在建表前抛出:除预建的旧表外不得出现任何新表 var tables = scope.GetConnectionScope("main").DbMaintenance.GetTableInfoList(false).Select(table => table.Name).ToList(); - Assert.Equal(new[] { "tenant_game_user_entity", }, tables); + Assert.Equal(new[] { "tenant_game_user_entity", }, tables); // c406-keep } [Fact] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs index 5d561828..2882bc00 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs @@ -14,7 +14,7 @@ namespace GameFrameX.Core.Tests.System; /// 平台 JWT 签发 claim 集合精确断言(C406 身份收口): /// 真实 签发的 AccessToken claim 全集必须恰好为 /// 身份四项(UserId/Account/RealName/AccountType)+ 签发框架项(iat/nbf/exp/iss/aud/platform_jwt_version), -/// 不得出现 TenantId、TenantHost、AppId、组织或租户角色等已删除作用域 claim。 +/// 不得出现 TenantId、TenantHost、AppId、组织或租户角色等已删除作用域 claim。 // c406-keep(有意引用旧 claim 名作禁止说明) /// public sealed class PlatformJwtIssuedClaimSetTests : IDisposable { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs index 03336049..536b8448 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs @@ -5,20 +5,22 @@ namespace GameFrameX.Core.Bootstrap; /// /// 旧库拒绝启动守卫(C406 / D7):Web.Api 初始化数据库(建表、种子)之前的 fail-closed 检查。 /// 2.0 为破坏性断代版本,不迁移旧数据:检测到旧 schema 标志(任一 tenant_ 前缀表,或旧租户登记表 -/// system_tenant_entity)即抛 终止启动——不建表、不写种子、不写数据, +/// system_tenant_entity)即抛 终止启动——不建表、不写种子、不写数据, // c406-keep /// 只能用新库或整体回滚。 /// public static class LegacySchemaStartupGuard { /// - /// 旧租户登记表物理名(1.x SystemTenantEntity,[PlatformTable] 派生;租户登记机制已删除,新代码永不创建)。 +/// 旧租户登记表物理名(1.x SystemTenantEntity,[PlatformTable] 派生;租户登记机制已删除,新代码永不创建)。 // c406-keep /// - private const string LegacyTenantRegistryTable = "system_tenant_entity"; + // c406-keep:旧 schema 标志字面量,有意引用旧表名(R1-d / R3-b),改名脚本不得改写 + private const string LegacyTenantRegistryTable = "system_tenant_entity"; // c406-keep /// /// 旧租户业务表物理名前缀。 /// - private const string LegacyTenantTablePrefix = "tenant_"; + // c406-keep:旧 schema 标志字面量,有意引用旧表名(R1-d / R3-b),改名脚本不得改写 + private const string LegacyTenantTablePrefix = "tenant_"; // c406-keep /// /// 检查目标库不是旧 schema;命中旧标志即抛 。 From 1b593e34919fd1da57c026b897b7afbf51d4d864 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:50:56 +0800 Subject: [PATCH 32/86] =?UTF-8?q?fix(hub):=20=E6=B6=88=E9=99=A4=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E6=B5=8B=E8=AF=95=E6=97=A7=E5=BA=94=E7=94=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 HMAC 测试中的随手查询键改为中性的 serverId,避免把已删除的应用语义作为真实机器通道契约保留。\n\nLinear: GFX-1232 --- .../TenantGameAppOpenAccessAuthMiddlewareTests.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs index e279399b..31efda51 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs @@ -38,7 +38,7 @@ private static byte[] ClientSign(string method, string path, string canonicalQue [Fact] public void TryParseSignatureHeader_ValidV2Header_ParsesAllSegments() { - var signatureBase64 = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", Encoding.UTF8.GetBytes(Body)); // c406-keep + var signatureBase64 = ClientSign("POST", "/api/PackageBuildReport", "serverId=9&channel=ios", Encoding.UTF8.GetBytes(Body)); var header = "v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";" + Convert.ToBase64String(signatureBase64); var parsed = TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(header, out var accessKey, out var timestamp, out var nonce, out var provided); @@ -68,10 +68,10 @@ public void TryParseSignatureHeader_LegacyOrMalformed_Rejected() public void VerifySignature_ClientCanonicalMessage_Passes() { var body = Encoding.UTF8.GetBytes(Body); - var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9&channel=ios", body); // c406-keep + var provided = ClientSign("POST", "/api/PackageBuildReport", "serverId=9&channel=ios", body); var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); // c406-keep + Credential(), "POST", "/api/PackageBuildReport", "serverId=9&channel=ios", Ts, Nonce, body, provided); Assert.True(verified); } @@ -81,10 +81,10 @@ public void VerifySignature_TamperedBody_Rejected() { // body 入签(C267 前规范 B 不把 body 进签 —— 这是本迁移的关键收紧点):篡改 body 后原签名必失效 var body = Encoding.UTF8.GetBytes(Body); - var provided = ClientSign("POST", "/api/PackageBuildReport", "appId=9", body); // c406-keep + var provided = ClientSign("POST", "/api/PackageBuildReport", "serverId=9", body); var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9", Ts, Nonce, // c406-keep + Credential(), "POST", "/api/PackageBuildReport", "serverId=9", Ts, Nonce, Encoding.UTF8.GetBytes("{\"package\":\"pkg-1001\",\"status\":\"tampered\"}"), provided); Assert.False(verified); @@ -96,12 +96,12 @@ public void VerifySignature_RawOrderSignedClient_Rejected() // 客户端按「原始乱序 query 串」拼消息签名(未按 canonical 排序)→ 拒绝, // 证明 Hub 侧同样强制 canonical query(与 SignatureValidationMiddleware 同一规范) var body = Encoding.UTF8.GetBytes(Body); - var rawOrderMessage = "v2\nPOST\n/api/PackageBuildReport\nchannel=ios&appId=9\n" + AccessKey + "\n" + Ts + "\n" + Nonce + "\n" // c406-keep + var rawOrderMessage = "v2\nPOST\n/api/PackageBuildReport\nchannel=ios&serverId=9\n" + AccessKey + "\n" + Ts + "\n" + Nonce + "\n" + CanonicalRequestBuilder.BodyHashHex(body); var provided = CanonicalRequestBuilder.HmacSha256(Encoding.UTF8.GetBytes(AccessSecret), rawOrderMessage); var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); // c406-keep + Credential(), "POST", "/api/PackageBuildReport", "serverId=9&channel=ios", Ts, Nonce, body, provided); Assert.False(verified); } From 8c9d3b785546a535192dcb0939c1c482efc01a33 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:53:13 +0800 Subject: [PATCH 33/86] =?UTF-8?q?refactor:=20=E5=BA=94=E7=94=A8=20C406=20?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=94=B9=E5=90=8D=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 契约 §3 W2 步骤 1:rename_tool_v2 处理本分支相对基线改动的 16 个 文件(7 个内容变更、12 个 token、residue 4 条已登记 evidence-core/ semantic-residue-core.tsv;第二、三次运行零改动)。守卫旧表名字面量 经 c406-keep 保留,声明名手工对齐脚本产物。合并 feature/GFX-1232 前本提交单独不编译,属协议规定的中间态。 Linear: GFX-1232 --- .../Social/OnlinePenaltyLinkCommandService.cs | 18 +++++++++--------- .../Bootstrap/LegacySchemaStartupGuard.cs | 8 ++++---- .../GameFrameX.Core/Const/CacheConst.cs | 2 +- .../Enum/Errors/ErrorSegmentRegistry.cs | 2 +- .../Enum/Errors/GameHomeErrorCode.cs | 2 +- .../Middleware/MiddlewareResponseWriter.cs | 2 +- .../GameFrameX.Core/SqlSugar/SqlSugarSetup.cs | 12 ++++++------ 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs index 2cd1435e..f01194ae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlinePenaltyLinkCommandService.cs @@ -15,7 +15,7 @@ namespace GameFrameX.Application.GmCenter.Social; /// 一律经 ,不得绕过本服务直调 Online 命令接口(守护测试 OnlineSocialCommandWhitelistTests)。 /// /// -/// 语义契约:Admin 侧处罚事实仍以 TenantGamePenaltyEntity 为唯一事实源,本服务只把「已生效的事实」同步到 Online 运行时 +/// 语义契约:Admin 侧处罚事实仍以 GamePenaltyEntity 为唯一事实源,本服务只把「已生效的事实」同步到 Online 运行时 /// (事实源先行);联动失败不回滚事实源,可按 IdempotencyKey 重试(见 )。 /// /// @@ -37,8 +37,8 @@ public class OnlinePenaltyLinkCommandService : IAdminApiController /// private const string MutePlayerAction = "mute_player"; - private readonly SqlSugarRepository _penaltyRepository; - private readonly SqlSugarRepository _gameAreaRepository; + private readonly SqlSugarRepository _penaltyRepository; + private readonly SqlSugarRepository _gameAreaRepository; private readonly IOnlineServerClient _onlineServerClient; private readonly OnlineScopeContextFactory _scopeContextFactory; @@ -46,8 +46,8 @@ public class OnlinePenaltyLinkCommandService : IAdminApiController /// Online 处罚联动命令服务构造函数。 /// public OnlinePenaltyLinkCommandService( - SqlSugarRepository penaltyRepository, - SqlSugarRepository gameAreaRepository, + SqlSugarRepository penaltyRepository, + SqlSugarRepository gameAreaRepository, IOnlineServerClient onlineServerClient, OnlineScopeContextFactory scopeContextFactory) { @@ -73,7 +73,7 @@ public Task ExecuteAsync(OnlinePenaltyLinkRequest inp /// /// 联动命令唯一执行入口(供处置流与 gamePenaltyEntity 页同步动作复用)。 /// - /// 「事实源先行、联动可重试」:调用前处罚事实必须已写入 TenantGamePenaltyEntity 且处于生效中—— + /// 「事实源先行、联动可重试」:调用前处罚事实必须已写入 GamePenaltyEntity 且处于生效中—— /// Online 命令只是把既有事实生效到运行时,本方法不产生任何新处罚;联动失败不影响事实源状态, /// 重新调用同(PenaltyId, Command, ServerId)组合时 Online 侧按 IdempotencyKey 返回首次结果(vault:C2 S1.5), /// 因此重试天然幂等,不会重复处罚。 @@ -121,7 +121,7 @@ public async Task ExecuteLinkAsync(long penaltyId, On /// /// 确定联动目标区服集:处罚行 AreaId 有值 = 单区服;null(全区服生效)= App 下全部区服逐一联动。 /// - private async Task> ResolveLinkTargetServerIdsAsync(TenantGamePenaltyEntity penalty) + private async Task> ResolveLinkTargetServerIdsAsync(GamePenaltyEntity penalty) { if (penalty.AreaId.HasValue) { @@ -143,7 +143,7 @@ private async Task> ResolveLinkTargetServerIdsAsync(TenantGamePenalty /// 向单个区服下发联动命令并落一条结果(含旧 Token 吊销确认字段)。 /// 单区服命令失败(Online 业务码 / 传输异常)不中断其余区服——聚合语义下逐区服呈现成败,可针对性重试。 /// - private async Task ExecuteForServerAsync(TenantGamePenaltyEntity penalty, OnlinePenaltyCommandKind command, long serverId) + private async Task ExecuteForServerAsync(GamePenaltyEntity penalty, OnlinePenaltyCommandKind command, long serverId) { var action = MapCommandToAction(command); try @@ -225,7 +225,7 @@ private static string MapCommandToAction(OnlinePenaltyCommandKind command) /// /// 构建联动命令幂等键:penalty-{PenaltyId}-{command}-{serverId}。 /// - /// 为什么先写事实源:Admin 侧处罚以 TenantGamePenaltyEntity 为唯一事实源,Online 命令只负责「生效到运行时」; + /// 为什么先写事实源:Admin 侧处罚以 GamePenaltyEntity 为唯一事实源,Online 命令只负责「生效到运行时」; /// 若命令先于事实落库,联路中断会出现「运行时已被限制但 Admin 无记录」的不可审计状态。 /// 为什么重试幂等:同一(处罚 + 命令 + 区服)组合的重复调用携带相同 IdempotencyKey,Online 侧按 vault:C2 S1.5 /// 契约返回首次执行结果,不会重复踢人 / 重复吊销;因此联动失败可以直接安全重试(含 gamePenaltyEntity 页的手动同步)。 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs index 536b8448..4e96b2fd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs @@ -14,13 +14,13 @@ public static class LegacySchemaStartupGuard /// 旧租户登记表物理名(1.x SystemTenantEntity,[PlatformTable] 派生;租户登记机制已删除,新代码永不创建)。 // c406-keep /// // c406-keep:旧 schema 标志字面量,有意引用旧表名(R1-d / R3-b),改名脚本不得改写 - private const string LegacyTenantRegistryTable = "system_tenant_entity"; // c406-keep + private const string LegacyRegistryTable = "system_tenant_entity"; // c406-keep /// /// 旧租户业务表物理名前缀。 /// // c406-keep:旧 schema 标志字面量,有意引用旧表名(R1-d / R3-b),改名脚本不得改写 - private const string LegacyTenantTablePrefix = "tenant_"; // c406-keep + private const string LegacyTablePrefix = "tenant_"; // c406-keep /// /// 检查目标库不是旧 schema;命中旧标志即抛 。 @@ -64,7 +64,7 @@ private static bool IsLegacyTableName(string tableName) return false; } - return tableName.StartsWith(LegacyTenantTablePrefix, StringComparison.OrdinalIgnoreCase) - || string.Equals(tableName, LegacyTenantRegistryTable, StringComparison.OrdinalIgnoreCase); + return tableName.StartsWith(LegacyTablePrefix, StringComparison.OrdinalIgnoreCase) + || string.Equals(tableName, LegacyRegistryTable, StringComparison.OrdinalIgnoreCase); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs index fdf93aa3..40f8acc5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/CacheConst.cs @@ -11,7 +11,7 @@ public sealed class CacheConst public const string KeyUser = "cache:user:"; /// - /// 用户已授权菜单Id集合缓存(来自 TenantRoleMenuEntity,含目录/菜单/按钮,Id 化) + /// 用户已授权菜单Id集合缓存(来自 RoleMenuEntity,含目录/菜单/按钮,Id 化) /// public const string KeyUserMenu = "cache:user_menu:"; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs index f3ea50e3..a0aedc48 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs @@ -21,7 +21,7 @@ public static class ErrorSegmentRegistry new(303, ErrorDomain.AdminBusiness, "PayConfig", null, false, "Admin 支付配置(预留:暂无错误码成员)"), new(304, ErrorDomain.AdminBusiness, "Wechat", null, false, "Admin 微信生态配置(预留:暂无错误码成员)"), new(305, ErrorDomain.AdminBusiness, "PlatformConfig", nameof(PlatformConfigErrorCode), false, "Admin 平台配置"), - new(306, ErrorDomain.AdminBusiness, "Tenant", null, false, "Admin 租户管理(已退役,号段永久保留,禁止复用)"), + new(306, ErrorDomain.AdminBusiness, "Business", null, false, "Admin 租户管理(已退役,号段永久保留,禁止复用)"), new(307, ErrorDomain.AdminBusiness, "Organization", null, false, "Admin 组织架构(已退役,号段永久保留,禁止复用)"), new(308, ErrorDomain.AdminBusiness, "Region", null, false, "Admin 区域(已退役,号段永久保留,禁止复用)"), new(309, ErrorDomain.AdminBusiness, "Position", null, false, "Admin 职位(已退役,号段永久保留,禁止复用)"), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs index 39376574..40762cdb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs @@ -9,5 +9,5 @@ public enum GameHomeErrorCode /// 目标租户库连接不可用 /// [ErrorText("目标租户库连接不可用,无法读取首页读数", "Target tenant database connection is unavailable for home metrics")] - TenantDbUnavailable = 60500002, + DbUnavailable = 60500002, } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs index c6ef3847..d544e884 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/MiddlewareResponseWriter.cs @@ -7,7 +7,7 @@ namespace GameFrameX.Core.Middleware; /// 两种 wire 形态(历史契约并存,不可合并为单一形态): /// /// :PascalCase {Code, Message},Code 恒为 HTTP 状态码 —— -/// Client.Api(PublicCallbackTenantResolution)与 Hub.Api(TenantGameAppOpenAccessAuth)及协议版本中间件的拒绝出口。 +/// Client.Api(PublicCallbackResolution)与 Hub.Api(GameAppOpenAccessAuth)及协议版本中间件的拒绝出口。 /// :camelCase {code, message},601xx 信封码 /// (签名 60101-60103 / 加密信封 60104-60106)—— 与 MVC 主信封 camelCase 一致、客户端 Lua 读 tbErr.code 的双端冻结契约。 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs index 353b6a02..9d03b7fd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs @@ -5,13 +5,13 @@ using GameFrameX.Core.Extension.Cache; using GameFrameX.Core.Extension.Const; using GameFrameX.Core.Extension.Option; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; using GameFrameX.Entity.Global; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.ObjectStorage; +using GameFrameX.Entity.Business.ObjectStorage; using GameFrameX.Foundation.Orm.Entity; using Microsoft.Extensions.Hosting; using MySqlConnector; @@ -255,7 +255,7 @@ private static void SetDbDiffLog(SqlSugarScopeProvider db, DbConnectionConfig co } /// - /// 填充差异日志实体公共字段。SystemLogDiffEntity 与 TenantLogDiffEntity 共享 字段, + /// 填充差异日志实体公共字段。SystemLogDiffEntity 与 LogDiffEntity 共享 字段, /// 调用方按当前操作库归属决定具体实体类型与写入连接。 /// private static void FillDiffLogFields(LogDiffFields target, DiffLogModel u, DbConnectionConfig config, List? beforeList, List? afterList, string? snapshot) @@ -505,10 +505,10 @@ internal static void InitDatabase(SqlSugarScope db, DbConnectionConfig config, I if (config.ConfigId.ToString() == SqlSugarConst.MainConfigId) { // 新装主库空配置时提供本地存储;已有配置(包括停用或软删)不覆盖。 - if (effectiveTypes.Contains(typeof(TenantObjectStorageConfigEntity)) - && dbProvider.DbMaintenance.IsAnyTable(dbProvider.EntityMaintenance.GetEntityInfo().DbTableName, false)) + if (effectiveTypes.Contains(typeof(ObjectStorageConfigEntity)) + && dbProvider.DbMaintenance.IsAnyTable(dbProvider.EntityMaintenance.GetEntityInfo().DbTableName, false)) { - DefaultTenantDatabaseSeeder.SeedDefaultObjectStorageConfigIfEmpty(dbProvider); + DefaultDatabaseSeeder.SeedDefaultObjectStorageConfigIfEmpty(dbProvider); } // C117 (GFX-117):8 棵游戏业务菜单路径已收敛到新前缀(appCenter/playerCenter/goodsCenter/ From 8b9dcc91512f52320c50b05ec07aab84d4829dc8 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:55:19 +0800 Subject: [PATCH 34/86] =?UTF-8?q?refactor(h):=20=E5=BA=94=E7=94=A8=20C406?= =?UTF-8?q?=20=E7=BB=9F=E4=B8=80=E6=94=B9=E5=90=8D=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 H 归属的本分支改动文件上应用 v2 改名脚本,收敛主库、业务类型和宿主通道命名,并保留负向测试中的必要旧字段。\n\nLinear: GFX-1232 --- .../GmCenter/Console/OnlineAuditSourceMap.cs | 14 +-- .../ServerCenter/Online/OnlineServerClient.cs | 4 +- .../GameRole/GameRoleController.cs | 48 +++++----- .../Advertisement/GameAdWebHookController.cs | 24 ++--- .../Payment/GameOrderController.ApplePay.cs | 4 +- .../Payment/PaymentOptionSettingProvider.cs | 16 ++-- .../GameFrameX.Client.Api/Program.cs | 24 ++--- .../ClientApiOptionsProvider.cs} | 56 +++++------ .../GameLoginTicketKeyResolver.cs | 18 ++-- .../PackageVersion/GameAppPackageResolver.cs | 12 +-- .../ClientApi/ClientApiConfigEndpointTests.cs | 78 +++++++-------- .../ClientApiEndpointCoverageMatrix.cs | 8 +- .../ClientApiEndpointCoverageTests.cs | 2 +- .../ClientApi/ClientApiRoleEndpointTests.cs | 42 ++++----- .../ClientApi/ClientApiTokenIssuerTests.cs | 8 +- .../ClientApiWebShopEndpointTests.cs | 94 +++++++++---------- .../CryptoEnvelopeMiddlewareTests.cs | 10 +- ...PublicCallbackLegacyRouteRejectionTests.cs | 2 +- .../PublicCallbackSingleMainTests.cs | 10 +- ...> GameAppOpenAccessAuthMiddlewareTests.cs} | 32 +++---- ...> GameAppOpenAccessDecryptClosureTests.cs} | 48 +++++----- ...PaymentOptionSettingDecryptClosureTests.cs | 22 ++--- .../Online/OnlineScopeContextFactoryTests.cs | 30 +++--- .../Online/OnlineServerClientTests.cs | 20 ++-- .../System/AuthTestHost.cs | 28 +++--- .../System/GameHomeServiceTests.cs | 30 +++--- .../Middleware/SessionKeyResolver.cs | 10 +- .../Middleware/SignatureKeyResolver.cs | 12 +-- 28 files changed, 353 insertions(+), 353 deletions(-) rename GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/{ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs => ClientApiOptions/ClientApiOptionsProvider.cs} (78%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/{TenantGameAppOpenAccessAuthMiddlewareTests.cs => GameAppOpenAccessAuthMiddlewareTests.cs} (68%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/{TenantGameAppOpenAccessDecryptClosureTests.cs => GameAppOpenAccessDecryptClosureTests.cs} (78%) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs index e7896ec7..af30154e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/OnlineAuditSourceMap.cs @@ -1,8 +1,8 @@ using System.Text.Json; using GameFrameX.Application.GmCenter.Console.Dto; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Online; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Online; namespace GameFrameX.Application.GmCenter.Console; @@ -11,12 +11,12 @@ namespace GameFrameX.Application.GmCenter.Console; /// /// 三来源口径(Admin 侧零事件镜像,全部实时读取原表/透传 Online): /// -/// AdminOperation:(租户操作日志, +/// AdminOperation:(租户操作日志, /// MonitorLogging 全 action 自动落库)——操作者取账号,目标对象/作用域从 RequestParam JSON 尽力提取 /// (提取不到即 null,不伪造);命令类型取 Controller.Action;时间取 LogDateTime。 /// OnlineAuditEvent:Online 审计事件(经 IOnlineServerClient 实时透传)——五维直映。 -/// DomainCommandRecord:各域命令事实源表——处罚落账(,C350) -/// 与配置灰度发布记录(,C343);资产人工发放/撤销的审计在 Online 侧, +/// DomainCommandRecord:各域命令事实源表——处罚落账(,C350) +/// 与配置灰度发布记录(,C343);资产人工发放/撤销的审计在 Online 侧, /// 由 OnlineAuditEvent 来源覆盖(本地无镜像表)。 /// /// 禁止在 Service 内散落第二套映射——新增来源必须回到本文件登记并同步守护说明。 @@ -89,7 +89,7 @@ public static OnlineAuditSearchEntryResponse FromOnlineAuditEvent(OnlineAuditEve /// /// 处罚落账行(C350 事实源)→ 统一审计行。 /// - public static OnlineAuditSearchEntryResponse FromPenaltyRecord(TenantGamePenaltyEntity penalty) + public static OnlineAuditSearchEntryResponse FromPenaltyRecord(GamePenaltyEntity penalty) { return new OnlineAuditSearchEntryResponse { @@ -107,7 +107,7 @@ public static OnlineAuditSearchEntryResponse FromPenaltyRecord(TenantGamePenalty /// /// 配置灰度发布记录行(C343 事实源)→ 统一审计行。 /// - public static OnlineAuditSearchEntryResponse FromConfigRolloutRecord(TenantGameOnlineConfigRolloutEntity rollout) + public static OnlineAuditSearchEntryResponse FromConfigRolloutRecord(GameOnlineConfigRolloutEntity rollout) { return new OnlineAuditSearchEntryResponse { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs index 366ba0c5..14d47473 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs @@ -24,11 +24,11 @@ public sealed class OnlineServerClient : IOnlineServerClient private readonly HttpClient _httpClient; private readonly IOnlineServerEndpointResolver _endpointResolver; - private readonly SqlSugarRepository _gameAreaRepository; + private readonly SqlSugarRepository _gameAreaRepository; public OnlineServerClient(HttpClient httpClient, IOnlineServerEndpointResolver endpointResolver, - SqlSugarRepository gameAreaRepository) + SqlSugarRepository gameAreaRepository) { _httpClient = httpClient; _endpointResolver = endpointResolver; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs index a5e31b25..91b31a6f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/GameRole/GameRoleController.cs @@ -16,7 +16,7 @@ namespace GameFrameX.Client.Api.GameRole; /// /// 程序版本控制器 /// -public class GameRoleController : BaseController +public class GameRoleController : BaseController { private static readonly string[] IdentityOverrideFieldNames = { @@ -27,8 +27,8 @@ public class GameRoleController : BaseController private readonly HttpClient _httpClientFactory; private readonly ClientApiTokenIssuer _clientApiTokenIssuer; private readonly GameLoginTicketIssuer _gameLoginTicketIssuer; - private readonly Repository _areaService; - private readonly IGamePenaltyEnforcementService _tenantGamePenaltyEnforcementService; + private readonly Repository _areaService; + private readonly IGamePenaltyEnforcementService _gamePenaltyEnforcementService; /// /// @@ -37,19 +37,19 @@ public class GameRoleController : BaseController /// /// /// - /// + /// public GameRoleController(HttpClient httpClientFactory, - SqlSugarRepository service, - Repository areaService, + SqlSugarRepository service, + Repository areaService, ClientApiTokenIssuer clientApiTokenIssuer, GameLoginTicketIssuer gameLoginTicketIssuer, - IGamePenaltyEnforcementService tenantGamePenaltyEnforcementService) : base(service) + IGamePenaltyEnforcementService gamePenaltyEnforcementService) : base(service) { _httpClientFactory = httpClientFactory; _clientApiTokenIssuer = clientApiTokenIssuer; _gameLoginTicketIssuer = gameLoginTicketIssuer; _areaService = areaService; - _tenantGamePenaltyEnforcementService = tenantGamePenaltyEnforcementService; + _gamePenaltyEnforcementService = gamePenaltyEnforcementService; } /// @@ -107,15 +107,15 @@ public async Task> ChangePlayerName /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> Add([FromBody] AddTenantGameRoleEntityRequest input) + public async Task> Add([FromBody] AddGameRoleEntityRequest input) { - var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == input.UserId).FirstAsync(); + var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == input.UserId).FirstAsync(); if (user == null) { return GameApiResult.Error(AccountErrorCode.AccountExists, "账号不存在"); } - var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); + var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); if (gameAreaEntity == null) { return GameApiResult.Error(AreaErrorCode.AreaNotFound, "区服不存在"); @@ -147,7 +147,7 @@ public async Task> Add([FromBody] AddTenant var respPlayerCreate = content.ToHttpJsonResult(); if (respPlayerCreate.IsSuccess) { - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Id = respPlayerCreate.Data.PlayerInfo.Id; entity.Level = (int)respPlayerCreate.Data.PlayerInfo.Level; entity.CreatedTime = TimerHelper.UnixTimeSeconds(); @@ -171,7 +171,7 @@ public async Task> Add([FromBody] AddTenant /// /// [HttpPost] - public async Task> Delete([FromBody] DeleteTenantGameRoleEntityRequest input) + public async Task> Delete([FromBody] DeleteGameRoleEntityRequest input) { var entity = await PRepository.GetFirstAsync(u => u.Id == input.Id); if (entity == null) @@ -191,9 +191,9 @@ public async Task> Delete([FromBody /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> Update([FromBody] UpdateTenantGameRoleEntityRequest input) + public async Task> Update([FromBody] UpdateGameRoleEntityRequest input) { - var entity = input.Adapt(); + var entity = input.Adapt(); var res = await PRepository.AsUpdateable(entity).IgnoreColumns(true).ExecuteCommandWithOptLockAsync(true); var result = entity.Adapt(); return HttpJsonResultData.Success(result); @@ -207,7 +207,7 @@ public async Task> Update([FromBody] Update /// [HttpPost] [ProducesResponseType(200, Type = typeof(List))] - public async Task>> GetList([FromBody] GetListTenantGameRoleEntityRequest input) + public async Task>> GetList([FromBody] GetListGameRoleEntityRequest input) { var gameRoleEntities = await PRepository.GetListAsync(a => a.UserId == input.UserId); var result = new List(gameRoleEntities.Count); @@ -239,7 +239,7 @@ public async Task> Login([FromBody] return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "授权无效"); } - var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == tokenValidation.UserId).FirstAsync(); + var user = await PRepository.AsSugarClient().Queryable().Where(u => u.Id == tokenValidation.UserId).FirstAsync(); if (user == null) { _gameLoginTicketIssuer.AuditRejected(tokenValidation.UserId, input.PlayerId, input.AreaId, "account_not_found"); @@ -259,7 +259,7 @@ public async Task> Login([FromBody] } // 处罚事实源登录阻断漏斗:账号级封禁/限制登录命中即拦截 - var accountBlocking = await _tenantGamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, user.Id.ToString()); + var accountBlocking = await _gamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, user.Id.ToString()); if (accountBlocking != null) { _gameLoginTicketIssuer.AuditRejected(user.Id, input.PlayerId, input.AreaId, "account_banned"); @@ -267,7 +267,7 @@ public async Task> Login([FromBody] } //区服状态判断 - var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); + var gameAreaEntity = await PRepository.AsSugarClient().Queryable().Filter(null, true).Where(u => u.IsDeleted == false).Where(u => u.Id == input.AreaId).FirstAsync(); if (gameAreaEntity == null) { _gameLoginTicketIssuer.AuditRejected(user.Id, input.PlayerId, input.AreaId, "area_not_found"); @@ -297,7 +297,7 @@ public async Task> Login([FromBody] } // 处罚事实源登录阻断漏斗:角色级封禁/限制登录命中即拦截(按区服作用域过滤) - var roleBlocking = await _tenantGamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Role, entity.Id.ToString(), input.AreaId); + var roleBlocking = await _gamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Role, entity.Id.ToString(), input.AreaId); if (roleBlocking != null) { _gameLoginTicketIssuer.AuditRejected(user.Id, input.PlayerId, input.AreaId, "role_banned"); @@ -324,7 +324,7 @@ public async Task> Login([FromBody] return HttpJsonResultData.Success(output); } - private async Task TryRefreshPlayerInfo(TenantGameRoleEntity entity, TenantGameAreaEntity gameAreaEntity) + private async Task TryRefreshPlayerInfo(GameRoleEntity entity, GameAreaEntity gameAreaEntity) { var areaAddress = GameServerEndpointUrlBuilder.Build(gameAreaEntity, GameServerEndpointKindEnum.ClientDispatch, "req_player_get_info"); var request = new PlayerGetInfoRequest @@ -375,7 +375,7 @@ private static bool HasForbiddenIdentityOverrideField(GamePlayerLoginRequest inp return input.ExtraFields.Keys.Any(key => IdentityOverrideFieldNames.Contains(key, StringComparer.OrdinalIgnoreCase)); } - private static string BuildRouteTarget(TenantGameAreaEntity area) + private static string BuildRouteTarget(GameAreaEntity area) { if (area.WebSocketUrl.IsNotNullOrEmpty()) { @@ -409,7 +409,7 @@ private static string TryGetHost(string value) /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> Get([FromBody] GetTenantGameRoleEntityRequest input) + public async Task> Get([FromBody] GetGameRoleEntityRequest input) { var entity = await PRepository.GetSingleAsync(a => a.UserId == input.UserId && a.AreaId == input.AreaId); var result = entity.Adapt(); @@ -423,7 +423,7 @@ public async Task> Get([FromBody] GetTenant /// [HttpPost] [ProducesResponseType(200, Type = typeof(GameRoleResponse))] - public async Task> GetById([FromBody] GetByIdTenantGameRoleEntityRequest input) + public async Task> GetById([FromBody] GetByIdGameRoleEntityRequest input) { if (long.TryParse(input.Id, out var id)) { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs index 42c1ec57..0680177b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdWebHookController.cs @@ -4,29 +4,29 @@ using GameFrameX.Advertisement.Pangle; using GameFrameX.Client.Api.Integrations.Advertisement.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Service; namespace GameFrameX.Client.Api.Integrations.Advertisement; /// /// 广告服务器回调。 -/// 广告网络回调不携带 X-Api-Key,必须先由公开回调 URL 路由参数建立租户上下文,再通过 读取该租户的验签材料。 +/// 广告网络回调不携带 X-Api-Key,必须先由公开回调 URL 路由参数建立租户上下文,再通过 读取该租户的验签材料。 /// 无法解析租户或租户未配置验签材料时安全拒绝,禁止逐租户扫描或回落到进程级 key。 /// TopOn / AdMob / UnityAds 的验签 + 幂等账本 + 发奖链路由 统一处理(C114 / GFX-110);Pangle 验签由 处理(仅验签,不进发奖链路)。 /// -public class GameAdWebHookController : BaseController +public class GameAdWebHookController : BaseController { - private readonly IClientApiTenantOptionsProvider _optionsProvider; - private readonly Repository _roleRepository; + private readonly IClientApiOptionsProvider _optionsProvider; + private readonly Repository _roleRepository; private readonly GameAdvertisementRewardService _advertisementRewardService; private readonly IAdvertisementCallbackFactory _advertisementCallbackFactory; /// /// - public GameAdWebHookController(SqlSugarRepository service, - Repository roleRepository, - IClientApiTenantOptionsProvider optionsProvider, + public GameAdWebHookController(SqlSugarRepository service, + Repository roleRepository, + IClientApiOptionsProvider optionsProvider, GameAdvertisementRewardService advertisementRewardService, IAdvertisementCallbackFactory advertisementCallbackFactory) : base(service) { @@ -83,7 +83,7 @@ public async Task PangleGlobalNotify([FromQuery] AdvertisementPangle /// /// Google AdMob奖励视频广告回调通知。 /// 验签 + 幂等账本 + 发奖由 处理。 - /// 发放成功后保留对 的写入(C75/C91 应用作用域事实,范围外不动)。 + /// 发放成功后保留对 的写入(C75/C91 应用作用域事实,范围外不动)。 /// [PublicCallbackEndpoint("admob", "ad")] [HttpGet("{packageId:long?}")] @@ -116,7 +116,7 @@ public async Task UnityAdsNotify([FromQuery] AdvertisementUnityAdsCa } /// - /// 发放成功后写入 角色广告事实(C75/C91 应用作用域,保留不改)。 + /// 发放成功后写入 角色广告事实(C75/C91 应用作用域,保留不改)。 /// private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest input) { @@ -143,7 +143,7 @@ private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest inp return; } - var gameRoleAdvertisementEntity = new TenantGameRoleAdvertisementEntity + var gameRoleAdvertisementEntity = new GameRoleAdvertisementEntity { TransId = input.TransactionId, UserId = userId, @@ -156,7 +156,7 @@ private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest inp } catch (Exception ex) { - LogHelper.Error($"AdMob TenantGameRoleAdvertisementEntity 写入异常: {ex.Message}", ex); + LogHelper.Error($"AdMob GameRoleAdvertisementEntity 写入异常: {ex.Message}", ex); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs index eea46aaf..ee67236f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/GameOrderController.ApplePay.cs @@ -299,9 +299,9 @@ private AppStoreServerApiClient GetAppStoreServerApiClientSandbox(ApplePaymentOp return new AppStoreServerApiClient(privateKey, keyId, issuerId, bundleId, ApplePayEnvironment.Sandbox, _httpClient); } - private async Task FindAppleOrderAsync(JWSTransactionDecodedPayload transactionInfo) + private async Task FindAppleOrderAsync(JWSTransactionDecodedPayload transactionInfo) { - TenantGameOrderEntity? gameOrderEntity = null; + GameOrderEntity? gameOrderEntity = null; if (!string.IsNullOrWhiteSpace(transactionInfo.TransactionId)) { gameOrderEntity = await PRepository.GetSingleAsync(m => m.AppleTransactionId == transactionInfo.TransactionId); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs index c5c297d9..36d86c32 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Payment/PaymentOptionSettingProvider.cs @@ -1,9 +1,9 @@ using GameFrameX.Client.Api.Services.PublicCallback; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using System.Text.Json; using GameFrameX.Application.ClientDelivery.GamePaymentConfig; using GameFrameX.Client.Api.Services; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Payment.Abstract; using GameFrameX.Payment.AliPay; using GameFrameX.Payment.Wechat; @@ -117,14 +117,14 @@ public IEnumerable GetOptionSettings(string channelName) where T : class, /// 渠道名称(已小写规范化)。 /// 当前上下文分包标识。 /// 候选支付配置列表。 - private List GetPaymentConfigs(string channelName, long? packageId) + private List GetPaymentConfigs(string channelName, long? packageId) { var context = _httpContextAccessor.HttpContext; var db = _database; var environments = GetRequestedEnvironments(context); var hasPackageId = packageId.HasValue; var packageIdValue = packageId.GetValueOrDefault(); - var query = db.Queryable() + var query = db.Queryable() .Where(u => u.PayChannel == channelName && u.IsEnabled == true && (u.PackageIdNormalized == 0 || (hasPackageId && u.PackageIdNormalized == packageIdValue))); @@ -137,7 +137,7 @@ private List GetPaymentConfigs(string channelName return query.ToList() .GroupBy(u => u.IsSandbox) .Select(group => GamePaymentConfigService.PickBestConfig(group, packageId)) - .OfType() + .OfType() .OrderBy(u => u.IsSandbox) .ToList(); } @@ -222,7 +222,7 @@ private static IPaymentOptionSetting NormalizeCallbackNotifyUrl(string channelNa var packageId = GetCurrentPackageId(context); if (packageId.HasValue) { - var package = db.Queryable() + var package = db.Queryable() .First(u => u.Id == packageId.Value && u.IsEnabled == true); return PackageMatchesScope(package) ? packageId : null; } @@ -233,12 +233,12 @@ private static IPaymentOptionSetting NormalizeCallbackNotifyUrl(string channelNa return null; } - var namedPackage = db.Queryable() + var namedPackage = db.Queryable() .First(u => u.PackageName == packageName.Trim() && u.IsEnabled == true); return PackageMatchesScope(namedPackage) ? namedPackage.Id : null; } - public static bool PackageMatchesScope(TenantGameAppPackageEntity? package) + public static bool PackageMatchesScope(GameAppPackageEntity? package) { return package != null && package.IsEnabled == true; } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs index 663b667a..33a5e6bc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Program.cs @@ -4,15 +4,15 @@ using GameFrameX.Client.Api.Services.RemoteConfig; using GameFrameX.Client.Api.Services.PublicCallback; using GameFrameX.Client.Api.Services.PayVerification; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.Release; using GameFrameX.Application.PlayerCenter.GamePenalty; using GameFrameX.Application.PlayerCenter.GameUser; using GameFrameX.Application.CommerceCenter.GameOrder; using GameFrameX.Client.Api.Filter; using GameFrameX.Client.Api.Middleware; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Client.Api.Services.Email; using GameFrameX.Client.Api.Integrations.Payment; using GameFrameX.Client.Api.GameAppVersion.Dto; @@ -22,7 +22,7 @@ using GameFrameX.Core.Bootstrap; using GameFrameX.Core.Cache; using GameFrameX.Core.Service.Cache; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Foundation.Extensions; using GameFrameX.Foundation.Options; using Serilog; @@ -111,18 +111,18 @@ private static async Task Main(string[] args) builder.Services.AddSingleton(); // 包名解析服务 builder.Services.AddSingleton(); // 公开 provider 回调 URL -> 分包上下文解析 // Client API 请求期配置 Provider:依赖 IHttpContextAccessor + ISqlSugarClient,按请求读取主库配置 - builder.Services.AddScoped(); - // 广告奖励发放账本服务(C114 / GFX-110):依赖 Repository + IClientApiTenantOptionsProvider + HttpClient + IHttpContextAccessor + builder.Services.AddScoped(); + // 广告奖励发放账本服务(C114 / GFX-110):依赖 Repository + IClientApiOptionsProvider + HttpClient + IHttpContextAccessor builder.Services.AddAdvertisementCallbacks(); builder.Services.AddScoped(); builder.Services.AddScoped(); // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 主库仓储,随请求作用域解析) builder.Services.AddScoped(); // 邮件分域:租户业务邮件(玩家注册 / 找回密码);平台系统邮件(SystemMessageService 等)走 ISystemEmailSender - builder.Services.AddScoped(); + builder.Services.AddScoped(); builder.Services.AddSingleton(); - // Token / Ticket 签发服务依赖 IClientApiTenantOptionsProvider(Scoped),必须随之降为 Scoped + // Token / Ticket 签发服务依赖 IClientApiOptionsProvider(Scoped),必须随之降为 Scoped builder.Services.AddScoped(); // C7 登录会话密钥签发:依赖 Scoped 主库仓储(SqlSugarRepository<>),随请求作用域 builder.Services.AddScoped(); @@ -134,9 +134,9 @@ private static async Task Main(string[] args) builder.Services.AddScoped(); // 注册 Fallback 匹配器 - builder.Services.AddScoped, AppVersionFallbackMatcher>(); - builder.Services.AddScoped, RemoteConfigFallbackMatcher>(); - builder.Services.AddScoped, AssetPackageVersionFallbackMatcher>(); + builder.Services.AddScoped, AppVersionFallbackMatcher>(); + builder.Services.AddScoped, RemoteConfigFallbackMatcher>(); + builder.Services.AddScoped, AssetPackageVersionFallbackMatcher>(); builder.Services.AddSerilog(); builder.Services.AddHostHealthChecks(); @@ -177,7 +177,7 @@ private static async Task Main(string[] args) app.UseRouting(); // 公开 provider 回调路由解析中间件 - app.UseMiddleware(); + app.UseMiddleware(); // 协议版本中间件(C5 server-envelope-middleware):X-Proto-Ver 缺头拒绝,未知版本 AuditOnly 只告警不拦截 app.UseMiddleware(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs similarity index 78% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs index bfec29c4..0ab15f45 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiTenantOptionsProvider.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiOptionsProvider.cs @@ -1,52 +1,52 @@ -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using SqlSugar; using System.Text.Json; using GameFrameX.Advertisement.Abstract; using GameFrameX.Client.Api.Middleware; using GameFrameX.Client.Api.Services.Email; -using GameFrameX.Entity.Tenant.ClientApiConfig; +using GameFrameX.Entity.Business.ClientApiConfig; -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// 从唯一主库读取 Client API 请求期业务配置。 /// 所有策略节共享启用且 Id 最大的配置行,并在请求内缓存。 /// -public sealed class ClientApiTenantOptionsProvider : IClientApiTenantOptionsProvider +public sealed class ClientApiOptionsProvider : IClientApiOptionsProvider { private readonly ISqlSugarClient _database; private readonly IHttpContextAccessor _httpContextAccessor; - private TenantClientApiPolicyEntity? _effectivePolicyRow; + private ClientApiPolicyEntity? _effectivePolicyRow; private bool _effectivePolicyRowFetched; - public ClientApiTenantOptionsProvider(ISqlSugarClient database, IHttpContextAccessor httpContextAccessor) + public ClientApiOptionsProvider(ISqlSugarClient database, IHttpContextAccessor httpContextAccessor) { _database = database; _httpContextAccessor = httpContextAccessor; } /// -#pragma warning disable CS8603 // 接口 IClientApiTenantOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake - public async Task GetEmailOptionsAsync() +#pragma warning disable CS8603 // 接口 IClientApiOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake + public async Task GetEmailOptionsAsync() { var db = _database; - var entity = await TenantEmailConfigSelector.SelectAsync(db, 0); + var entity = await EmailConfigSelector.SelectAsync(db, 0); return entity == null ? null - : new TenantEmailOptions + : new EmailOptions { FromEmailAddress = entity.FromEmailAddress, // C372(GFX-838):凭证读取边界解密(C371 起库内密文;无前缀明文直通) - FromEmailSecretId = TenantSecretCrypto.DecryptCached(entity.FromEmailSecretId) ?? string.Empty, - FromEmailSecretKey = TenantSecretCrypto.DecryptCached(entity.FromEmailSecretKey) ?? string.Empty, + FromEmailSecretId = SecretCrypto.DecryptCached(entity.FromEmailSecretId) ?? string.Empty, + FromEmailSecretKey = SecretCrypto.DecryptCached(entity.FromEmailSecretKey) ?? string.Empty, }; } #pragma warning restore CS8603 /// -#pragma warning disable CS8603 // 接口 IClientApiTenantOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake - public async Task GetAdvertisementCallbackOptionsAsync() +#pragma warning disable CS8603 // 接口 IClientApiOptionsProvider 签名非空(跨项目共享),但语义允许返回 null(未配置);改返回类型会级联到测试 fake + public async Task GetAdvertisementCallbackOptionsAsync() { var entity = await PickAdvertisementCallbackConfigAsync(); if (entity == null) @@ -67,7 +67,7 @@ public async Task GetAdvertisementCallbackOp var signingSecret = GetConfigValue(configValues, "signingSecret"); var verificationKeys = GetConfigValue(configValues, "verificationKeys"); - return new TenantAdvertisementCallbackOptions + return new AdvertisementCallbackOptions { Provider = entity.Provider, CallbackUrl = GetConfigValue(configValues, "callbackUrl", entity.CallbackUrl), @@ -82,11 +82,11 @@ public async Task GetAdvertisementCallbackOp } #pragma warning restore CS8603 - private async Task PickAdvertisementCallbackConfigAsync() + private async Task PickAdvertisementCallbackConfigAsync() { var db = _database; var provider = ResolvePublicCallbackProvider(_httpContextAccessor.HttpContext); - var query = db.Queryable() + var query = db.Queryable() .Where(c => c.IsEnabled == true); var candidates = await query.ToListAsync(); if (!string.IsNullOrWhiteSpace(provider)) @@ -102,13 +102,13 @@ public async Task GetAdvertisementCallbackOp } /// - public async Task GetTokenPolicyAsync() + public async Task GetTokenPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); - return new TenantClientApiTokenPolicyOptions + return new ClientApiTokenPolicyOptions { // C372(GFX-838):令牌签名密钥读取边界解密(C371 起库内密文;无前缀明文直通) - SigningKey = string.IsNullOrWhiteSpace(entity?.SigningKey) ? null : TenantSecretCrypto.DecryptCached(entity.SigningKey), + SigningKey = string.IsNullOrWhiteSpace(entity?.SigningKey) ? null : SecretCrypto.DecryptCached(entity.SigningKey), LifetimeMinutes = entity == null ? ClientApiPlatformDefaults.ClientApiTokenLifetimeMinutesDefault : ClientApiPlatformDefaults.ClampTokenLifetimeMinutes(entity.LifetimeMinutes), @@ -116,11 +116,11 @@ public async Task GetTokenPolicyAsync() } /// - public async Task GetGameLoginTicketPolicyAsync() + public async Task GetGameLoginTicketPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); var now = TimerHelper.UnixTimeSeconds(); - return new TenantGameLoginTicketPolicyOptions + return new GameLoginTicketPolicyOptions { TicketExpireTime = ClientApiPlatformDefaults.NormalizeGameLoginTicketExpireTime(entity?.TicketExpireTime ?? 0, now), EnableKeyAutoCreate = entity?.EnableKeyAutoCreate ?? ClientApiPlatformDefaults.GameLoginTicketKeyAutoCreateDefault, @@ -128,30 +128,30 @@ public async Task GetGameLoginTicketPolicyAs } /// - public async Task GetOrderPolicyAsync() + public async Task GetOrderPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); - return new TenantOrderPolicyOptions + return new OrderPolicyOptions { EnableSandBoxRecharge = entity?.EnableSandBoxRecharge ?? false, }; } /// - public async Task GetAreaPolicyAsync() + public async Task GetAreaPolicyAsync() { var entity = await GetEffectivePolicyRowAsync(); - return new TenantAreaPolicyOptions + return new AreaPolicyOptions { EnableReturnHttpManager = entity?.EnableReturnHttpManager ?? false, }; } - private async Task GetEffectivePolicyRowAsync() + private async Task GetEffectivePolicyRowAsync() { if (!_effectivePolicyRowFetched) { - _effectivePolicyRow = await _database.Queryable() + _effectivePolicyRow = await _database.Queryable() .Where(c => c.IsEnabled == true) .OrderByDescending(c => c.Id) .FirstAsync(); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs index a5c70919..d75f549f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketKeyResolver.cs @@ -1,21 +1,21 @@ using SqlSugar; using System.Security.Cryptography; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; namespace GameFrameX.Client.Api.Services.GameLoginTicket; /// /// 数据库驱动的 Game 登录票据签名 Key 解析服务。 -/// 生产签名唯一路径为主库 RSA();首次签发自动建 key 的开关由运行票据策略 控制。 +/// 生产签名唯一路径为主库 RSA();首次签发自动建 key 的开关由运行票据策略 控制。 /// 签名 key 默认永不过期(ExpireTime = null);手动轮换时可指定到期日,到期后被查询自然排除。不再自动预生成轮换。 /// HMAC fallback 随 C13 删除(P1 决策),不再保留兼容分支。 /// public sealed class GameLoginTicketKeyResolver : IGameLoginTicketKeyResolver { private readonly ISqlSugarClient _database; - private readonly IClientApiTenantOptionsProvider _optionsProvider; + private readonly IClientApiOptionsProvider _optionsProvider; - public GameLoginTicketKeyResolver(ISqlSugarClient database, IClientApiTenantOptionsProvider optionsProvider) + public GameLoginTicketKeyResolver(ISqlSugarClient database, IClientApiOptionsProvider optionsProvider) { _database = database; _optionsProvider = optionsProvider; @@ -44,7 +44,7 @@ public async Task ResolveSigningKeyAsync() // C372(GFX-838):签发读取边界解密(C371 起库内为密文;无前缀明文直通兼容存量行; // 进程级密文缓存兜底,避免每次签发 PBKDF2 派生) - var privateKeyPem = GameFrameX.Core.Service.Tenant.TenantSecretCrypto.DecryptCached(keys[0].PrivateKeyPem); + var privateKeyPem = GameFrameX.Core.Service.Business.SecretCrypto.DecryptCached(keys[0].PrivateKeyPem); return GameLoginTicketSigningKey.CreateRsa(keys[0].Kid, privateKeyPem, keys[0].PublicKeyPem); } @@ -63,10 +63,10 @@ public async Task> GetPublicKeysAs /// /// 查询生效中全部 key:启用、算法匹配、已生效、未过期(ExpireTime 为 null 视为永不过期),按创建时间倒序(最新在前)。 /// - private async Task> GetActiveKeyEntitiesAsync(long now) + private async Task> GetActiveKeyEntitiesAsync(long now) { var db = _database; - return await db.Queryable() + return await db.Queryable() .Where(x => x.IsEnabled != false && x.Algorithm == GameLoginTicketSigningKey.AlgorithmRs256 && (x.NotBeforeTime == null || x.NotBeforeTime <= now) && @@ -84,11 +84,11 @@ private async Task CreateRsaKeyEntityAsync(long now) var db = _database; using (var rsa = RSA.Create(2048)) { - var entity = new TenantGameLoginTicketKeyEntity + var entity = new GameLoginTicketKeyEntity { Kid = Guid.NewGuid().ToString("N"), Algorithm = GameLoginTicketSigningKey.AlgorithmRs256, - PrivateKeyPem = GameFrameX.Core.Service.Tenant.TenantSecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem()) ?? string.Empty, + PrivateKeyPem = GameFrameX.Core.Service.Business.SecretCrypto.Encrypt(rsa.ExportPkcs8PrivateKeyPem()) ?? string.Empty, PublicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(), NotBeforeTime = now, ExpireTime = null, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs index 7619cab9..94ea38f7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PackageVersion/GameAppPackageResolver.cs @@ -1,4 +1,4 @@ -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using System.Collections.Concurrent; using GameFrameX.Entity.Enum; using SqlSugar; @@ -9,7 +9,7 @@ namespace GameFrameX.Client.Api.Services.PackageVersion; /// 包名解析服务:将子包包名解析为母包包名,供客户端 Fallback 匹配器与远程配置投放做第 2 轮母包回退。 /// /// -/// 运行时继承语义(与 对齐): +/// 运行时继承语义(与 对齐): /// /// :子包允许母包回退,参与子包名→母包名映射。 /// :子包自洽配置,不回退母包(Resolve 返回子包原名)。 @@ -77,7 +77,7 @@ private PackageCache RefreshCacheIfChanged() private static PackageCache RefreshCache(ISqlSugarClient db, PackageCacheSignal signal) { // 仅"继承"模式的启用子包才允许母包回退;Override/DisableAsync 与禁用子包不进入映射。 - var children = db.Queryable() + var children = db.Queryable() .Where(p => p.IsEnabled == true && p.IsDeleted == false) .Where(p => p.ParentPackageId != null) .Where(p => p.PlatformInheritanceMode == InheritanceModeEnum.Inherit) @@ -85,11 +85,11 @@ private static PackageCache RefreshCache(ISqlSugarClient db, PackageCacheSignal var masterIds = children.Select(p => p.ParentPackageId!.Value).Distinct().ToList(); var masters = masterIds.Count > 0 - ? db.Queryable() + ? db.Queryable() .Where(p => p.IsEnabled == true && p.IsDeleted == false) .In(masterIds) .ToList() - : new List(); + : new List(); var cache = new ConcurrentDictionary(); foreach (var pkg in children) @@ -110,7 +110,7 @@ private static PackageCache RefreshCache(ISqlSugarClient db, PackageCacheSignal /// private static PackageCacheSignal GetSignal(ISqlSugarClient db) { - var participantQuery = db.Queryable() + var participantQuery = db.Queryable() .Where(p => p.IsEnabled == true && p.IsDeleted == false) .Where(p => p.ParentPackageId != null || p.PackageKind == PackageKindEnum.Master); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs index df1f5600..7f9955b9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs @@ -15,12 +15,12 @@ using GameFrameX.Client.Api.GameAssetPackageVersion.Dto; using GameFrameX.Client.Api.RemoteConfig.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Entity.Tenant.Device; -using GameFrameX.Entity.Tenant.Game; -using GameFrameX.Entity.Tenant.Game.Announcement; -using GameFrameX.Entity.Tenant.Game.App; -using GameFrameX.Entity.Tenant.Game.RemoteConfig; -using GameFrameX.Entity.Tenant.Game.Release; +using GameFrameX.Entity.Business.Device; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Entity.Business.Game.Announcement; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Entity.Business.Game.RemoteConfig; +using GameFrameX.Entity.Business.Game.Release; namespace GameFrameX.Core.Tests.ClientApi; @@ -31,10 +31,10 @@ public async Task GameAppVersion_GetInfo_UsesMainDatabaseAndReturnsPascalCasePay { using var db = new ClientApiTestDb(); db.SeedAppVersion(1, "com.gameframex.c108"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var matcher = new AppVersionFallbackMatcher(db.Repository(), resolver); - var controller = new GameAppVersionController(db.Repository(), matcher); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var resolver = new GameAppPackageResolver(db.DbProvider); + var matcher = new AppVersionFallbackMatcher(db.Repository(), resolver); + var controller = new GameAppVersionController(db.Repository(), matcher); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetInfo(new GameAppVersionRequest { @@ -58,13 +58,13 @@ public async Task GameAssetPackageVersion_GetInfo_BuildsPascalCaseAssetPathWitho { using var db = new ClientApiTestDb(); db.SeedAssetPackageVersion(1, "com.gameframex.c108"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); + var resolver = new GameAppPackageResolver(db.DbProvider); + var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); var controller = new GameAssetPackageVersionController( - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), matcher); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetInfo(new AssetPackageVersionRequest { @@ -80,7 +80,7 @@ public async Task GameAssetPackageVersion_GetInfo_BuildsPascalCaseAssetPathWitho var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); // GFX-706:GetInfo 纯只读——设备注册副作用已拆至 RegisterDevice,携带标识调用也不写设备表 - var deviceCount = await db.TenantDb.Queryable().CountAsync(); + var deviceCount = await db.TenantDb.Queryable().CountAsync(); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(0, deviceCount); Assert.Equal("2026.07.18", data.GetProperty("Version").GetString()); @@ -92,13 +92,13 @@ public async Task GameAssetPackageVersion_RegisterDevice_IdempotentByIdentifier( { using var db = new ClientApiTestDb(); db.SeedAssetPackageVersion(1, "com.gameframex.c108"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); + var resolver = new GameAppPackageResolver(db.DbProvider); + var matcher = new AssetPackageVersionFallbackMatcher(db.Repository(), resolver); var controller = new GameAssetPackageVersionController( - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), matcher); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var first = await controller.RegisterDevice(new DeviceRegisterRequest { @@ -111,7 +111,7 @@ public async Task GameAssetPackageVersion_RegisterDevice_IdempotentByIdentifier( var firstRoot = ClientApiResultReader.Read(first); var secondRoot = ClientApiResultReader.Read(second); - var deviceCount = await db.TenantDb.Queryable().CountAsync(); + var deviceCount = await db.TenantDb.Queryable().CountAsync(); Assert.Equal(0, ClientApiResultReader.Code(firstRoot)); Assert.Equal(0, ClientApiResultReader.Code(secondRoot)); // 幂等:两次注册仅落一行,DeviceId 一致 @@ -126,12 +126,12 @@ public async Task GameAssetPackageVersion_RegisterDevice_IdempotentByIdentifier( public async Task GameRemoteConfig_GetInfo_ReturnsMainDatabaseContentAndPascalCasePayload() { using var db = new ClientApiTestDb(); - db.InitTenantTables(typeof(TenantGameAppPackageEntity)); + db.InitBusinessTables(typeof(GameAppPackageEntity)); db.SeedRemoteConfig(1, "com.gameframex.c108", "{\"feature\":\"on\"}"); - var resolver = new GameAppPackageResolver(db.TenantDbProvider); - var delivery = new RemoteConfigDeliveryService(db.Repository(), resolver); - var controller = new GameRemoteConfigController(db.Repository(), delivery); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var resolver = new GameAppPackageResolver(db.DbProvider); + var delivery = new RemoteConfigDeliveryService(db.Repository(), resolver); + var controller = new GameRemoteConfigController(db.Repository(), delivery); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetInfo(new RemoteConfigRequest { @@ -158,8 +158,8 @@ public async Task GameArea_GetAreaList_FiltersDisabledAreaAndSuppressesManagerUr db.SeedAreaClassify(10); db.SeedArea(100, 10); db.SeedArea(101, 10, false); - var controller = new GameAreaController(db.Repository(), FakeOptionsProvider.WithAreaPolicy(false)); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var controller = new GameAreaController(db.Repository(), FakeOptionsProvider.WithAreaPolicy(false)); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.GetAreaList(new GameAreaGetAreaListRequest()); @@ -178,8 +178,8 @@ public async Task Announcement_ListByAreaId_FallsBackToDefaultLanguageAndSkipsIn db.SeedAnnouncement(1, 100, "default", "Area default"); db.SeedAnnouncement(2, 100, "fr-FR", "Inactive localized", false); db.SeedAnnouncement(3, null, "default", "Global default"); - var controller = new GameAnnouncementController(db.Repository()); - db.AttachContext(controller, includeTenant: false, includeApp: false); + var controller = new GameAnnouncementController(db.Repository()); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.ListByAreaId(new GameAnnouncementListRequest { Id = 100, Language = "fr-FR", }); @@ -197,14 +197,14 @@ public async Task GameLoginTicketKey_PublicKeys_ReturnsPublicKeysWithoutPrivateM var resolver = new StaticGameLoginTicketKeyResolver(); var controller = new GameLoginTicketKeyController(resolver); using var db = new ClientApiTestDb(10, 20); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.PublicKeys(); var root = ClientApiResultReader.Read(result); var key = ClientApiResultReader.Data(root)[0]; Assert.Equal(0, ClientApiResultReader.Code(root)); - Assert.Equal("tenant-10-app-20-test", key.GetProperty("Kid").GetString()); + Assert.Equal("10-app-20-test", key.GetProperty("Kid").GetString()); Assert.Equal("public-key", key.GetProperty("PublicKeyPem").GetString()); Assert.False(key.TryGetProperty("PrivateKeyPem", out _)); } @@ -215,7 +215,7 @@ public async Task GameLoginTicketKey_PublicKeys_WithoutRequestScope_ReturnsKeys( var resolver = new StaticGameLoginTicketKeyResolver(); var controller = new GameLoginTicketKeyController(resolver); using var db = new ClientApiTestDb(10, 20); - db.AttachContext(controller, includeTenant: false, includeApp: false); + db.AttachContext(controller, include: false, includeApp: false); var result = await controller.PublicKeys(); @@ -230,18 +230,18 @@ public async Task GameLoginTicketKey_PublicKeys_WithoutRequestScope_ReturnsKeys( public async Task GameLoginTicketKeyResolver_PublicKeys_DoesNotAutoCreateSigningKey() { using var db = new ClientApiTestDb(10, 20); - db.InitTenantTables(typeof(TenantGameLoginTicketKeyEntity)); - var resolver = new GameLoginTicketKeyResolver(db.TenantDbProvider, FakeOptionsProvider.WithTicketPolicy(DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60)); + db.InitBusinessTables(typeof(GameLoginTicketKeyEntity)); + var resolver = new GameLoginTicketKeyResolver(db.DbProvider, FakeOptionsProvider.WithTicketPolicy(DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60)); var publicKeys = await resolver.GetPublicKeysAsync(); Assert.Empty(publicKeys); - Assert.Equal(0, await db.TenantDb.Queryable().CountAsync()); + Assert.Equal(0, await db.TenantDb.Queryable().CountAsync()); var signingKey = await resolver.ResolveSigningKeyAsync(); Assert.False(string.IsNullOrWhiteSpace(signingKey.Kid)); - Assert.Equal(1, await db.TenantDb.Queryable().CountAsync()); + Assert.Equal(1, await db.TenantDb.Queryable().CountAsync()); Assert.Single(await resolver.GetPublicKeysAsync()); } @@ -257,7 +257,7 @@ public Task> GetPublicKeysAsync() IReadOnlyCollection keys = new[] { new GameLoginTicketPublicKey( - "tenant-10-app-20-test", + "10-app-20-test", GameLoginTicketSigningKey.AlgorithmRs256, "public-key", DateTimeOffset.UtcNow.AddMinutes(-5).ToUnixTimeSeconds(), diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs index 7e846394..c955741e 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs @@ -72,9 +72,9 @@ internal static class ClientApiEndpointCoverageMatrix Endpoint("GameUserArchive.Download", "POST", "api/GameUserArchive/Download", "archive", true, true, false, false, "downloads owned archive snapshot", "archive-not-found"), Endpoint("GameUserArchive.GetOtherProgress", "POST", "api/GameUserArchive/GetOtherProgress", "archive", true, true, false, false, "returns other players progress summary", "progress-not-found"), - Endpoint("GameUserEmail.SendRegister", "POST", "api/GameUserEmail/SendRegister", "email-code", true, true, false, false, "sends register code through tenant email", "missing-app", "rate-limited", "daily-limit", "tenant-email-missing"), + Endpoint("GameUserEmail.SendRegister", "POST", "api/GameUserEmail/SendRegister", "email-code", true, true, false, false, "sends register code through tenant email", "missing-app", "rate-limited", "daily-limit", "email-missing"), Endpoint("GameUserEmail.VerifyCode", "POST", "api/GameUserEmail/VerifyCode", "email-code", true, true, false, false, "verifies active code", "code-not-found", "code-expired"), - Endpoint("GameUserEmail.SendReset", "POST", "api/GameUserEmail/SendReset", "email-code", true, true, false, false, "sends reset code for existing account", "missing-app", "account-not-found", "rate-limited", "tenant-email-missing"), + Endpoint("GameUserEmail.SendReset", "POST", "api/GameUserEmail/SendReset", "email-code", true, true, false, false, "sends reset code for existing account", "missing-app", "account-not-found", "rate-limited", "email-missing"), Endpoint("GameUserMisc.MarkLogout", "POST", "api/GameUserMisc/MarkLogout", "misc", true, true, false, false, "marks user logout state", "account-not-found"), Endpoint("GameUserMisc.RandomRobots", "POST", "api/GameUserMisc/RandomRobots", "misc", true, true, false, false, "returns random robot users excluding caller", "empty-robot-pool"), @@ -109,7 +109,7 @@ private static ClientApiEndpointCoverage Endpoint( string httpMethod, string route, string group, - bool requiresTenant, + bool requires, bool requiresApp, bool requiresAccessToken, bool isPublicCallback, @@ -121,7 +121,7 @@ private static ClientApiEndpointCoverage Endpoint( httpMethod, route, group, - requiresTenant, + requires, requiresApp, requiresAccessToken, isPublicCallback, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs index 8ebee977..d72ea7b0 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs @@ -63,7 +63,7 @@ public void PublicCallbackEndpoints_DeclareOptionalPackageBoundary() Assert.Contains("invalid-route", endpoint.FailureCases); Assert.DoesNotContain("{tenantId:long}", endpoint.Route); // c406-keep Assert.DoesNotContain("{appId:long}", endpoint.Route); // c406-keep - Assert.False(endpoint.RequiresTenant); + Assert.False(endpoint.Requires); Assert.False(endpoint.RequiresApp); } } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs index 44992be0..70ae378a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs @@ -5,7 +5,7 @@ using System.Text.Json; using GameFrameX.Client.Api.GameRole.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.ClientApi; @@ -23,7 +23,7 @@ public async Task GameRole_Add_CreatesRoleWithoutAppContext() var controller = CreateController(db, handler); db.AttachContext(controller, includeApp: false); - var result = await controller.Add(new AddTenantGameRoleEntityRequest + var result = await controller.Add(new AddGameRoleEntityRequest { UserId = 1001, AreaId = 2001, @@ -33,7 +33,7 @@ public async Task GameRole_Add_CreatesRoleWithoutAppContext() }); var root = ClientApiResultReader.Read(result); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(1001, saved.UserId); Assert.Equal(1, handler.Count("/game/api/req_player_create")); @@ -46,7 +46,7 @@ public async Task GameRole_Add_RejectsMissingAccountWithoutAppContext() var controller = CreateController(db); db.AttachContext(controller, includeApp: false); - var result = await controller.Add(new AddTenantGameRoleEntityRequest { UserId = 1001, AreaId = 2001, Name = "Hero", }); + var result = await controller.Add(new AddGameRoleEntityRequest { UserId = 1001, AreaId = 2001, Name = "Hero", }); var root = ClientApiResultReader.Read(result); Assert.Equal((int)AccountErrorCode.AccountExists, ClientApiResultReader.Code(root)); @@ -67,7 +67,7 @@ public async Task GameRole_ChangePlayerName_UpdatesNameAfterGameServerAccepts() var result = await controller.ChangePlayerName(new GamePlayerChangeNameRequest { PlayerId = 3001, AreaId = 2001, Name = "New", }); var root = ClientApiResultReader.Read(result); - var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var saved = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal("New", saved.Name); } @@ -95,7 +95,7 @@ public async Task GameRole_GetList_ReturnsOnlyRequestedUserRoles() var controller = CreateController(db); db.AttachContext(controller); - var result = await controller.GetList(new GetListTenantGameRoleEntityRequest { UserId = 1001, }); + var result = await controller.GetList(new GetListGameRoleEntityRequest { UserId = 1001, }); var root = ClientApiResultReader.Read(result); var data = ClientApiResultReader.Data(root); @@ -114,8 +114,8 @@ public async Task GameRole_GetAndGetById_ReturnRoleDetails() var controller = CreateController(db); db.AttachContext(controller); - var get = await controller.Get(new GetTenantGameRoleEntityRequest { UserId = 1001, AreaId = 2001, }); - var getById = await controller.GetById(new GetByIdTenantGameRoleEntityRequest { Id = "3001", }); + var get = await controller.Get(new GetGameRoleEntityRequest { UserId = 1001, AreaId = 2001, }); + var getById = await controller.GetById(new GetByIdGameRoleEntityRequest { Id = "3001", }); Assert.Equal("Mine", ClientApiResultReader.Data(ClientApiResultReader.Read(get)).GetProperty("Name").GetString()); Assert.Equal("Area-2001", ClientApiResultReader.Data(ClientApiResultReader.Read(getById)).GetProperty("ServerName").GetString()); @@ -128,7 +128,7 @@ public async Task GameRole_GetById_RejectsInvalidId() var controller = CreateController(db); db.AttachContext(controller); - var result = await controller.GetById(new GetByIdTenantGameRoleEntityRequest { Id = "not-a-role-id", }); + var result = await controller.GetById(new GetByIdGameRoleEntityRequest { Id = "not-a-role-id", }); var root = ClientApiResultReader.Read(result); Assert.Equal((int)GameRoleErrorCode.RoleNotFound, ClientApiResultReader.Code(root)); @@ -143,10 +143,10 @@ public async Task GameRole_Delete_FakeDeletesExistingRole() var controller = CreateController(db); db.AttachContext(controller); - var result = await controller.Delete(new DeleteTenantGameRoleEntityRequest { Id = 3001, }); + var result = await controller.Delete(new DeleteGameRoleEntityRequest { Id = 3001, }); var root = ClientApiResultReader.Read(result); - var saved = await db.TenantDb.Queryable().Filter(null, true).FirstAsync(u => u.Id == 3001); + var saved = await db.TenantDb.Queryable().Filter(null, true).FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.True(saved.IsDeleted); } @@ -160,7 +160,7 @@ public async Task GameRole_Login_IssuesGameTicketForOwnedRole() db.SeedArea(2001, 10); db.SeedRole(3001, 1001, 2001); var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); - var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); + var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); var controller = CreateController(db, ClientApiRecordingHttpHandler.WithGameServerDefaults(), issuer); db.AttachContext(controller); @@ -186,9 +186,9 @@ public async Task GameRole_Login_IgnoresUnknownLegacyContextFields() db.SeedAreaClassify(10); db.SeedArea(2001, 10); db.SeedRole(3001, 1001, 2001); - db.InitTenantTables(typeof(TenantGameUserEntity)); + db.InitBusinessTables(typeof(GameUserEntity)); var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); - var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); + var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(); var controller = CreateController(db, handler, issuer); db.AttachContext(controller); @@ -230,9 +230,9 @@ public async Task GameRole_Login_RejectsIdentityOverrideUserId() db.SeedAreaClassify(10); db.SeedArea(2001, 10); db.SeedRole(3001, 1001, 2001); - db.InitTenantTables(typeof(TenantGameUserEntity)); + db.InitBusinessTables(typeof(GameUserEntity)); var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); - var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(user => user.Id == 1001), "Guest"); + var accessToken = await issuer.IssueAsync(await db.TenantDb.Queryable().FirstAsync(user => user.Id == 1001), "Guest"); var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(); var controller = CreateController(db, handler, issuer); db.AttachContext(controller); @@ -265,7 +265,7 @@ public async Task GameRole_Update_PropagatesOptimisticLockConflict() var controller = CreateController(db); db.AttachContext(controller); - await Assert.ThrowsAsync(() => controller.Update(new UpdateTenantGameRoleEntityRequest + await Assert.ThrowsAsync(() => controller.Update(new UpdateGameRoleEntityRequest { Id = 3001, UserId = 1001, @@ -281,11 +281,11 @@ private static GameRoleController CreateController( GameLoginTicketIssuer? ticketIssuer = null, FakeGamePenaltyEnforcementService? penaltyEnforcement = null) { - db.InitTenantTables(typeof(TenantGameRoleEntity), typeof(TenantGameAreaEntity), typeof(TenantGameUserEntity)); + db.InitBusinessTables(typeof(GameRoleEntity), typeof(GameAreaEntity), typeof(GameUserEntity)); return new GameRoleController( new HttpClient(handler ?? ClientApiRecordingHttpHandler.WithGameServerDefaults(), false), - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), issuer ?? new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)), ticketIssuer ?? new GameLoginTicketIssuer(TestGameLoginTicketKeyResolver.Create(), FakeOptionsProvider.WithTicketPolicy(DateTimeOffset.UtcNow.ToUnixTimeSeconds() + 60)), penaltyEnforcement ?? new FakeGamePenaltyEnforcementService()); @@ -305,7 +305,7 @@ public static TestGameLoginTicketKeyResolver Create() using var rsa = RSA.Create(2048); var privateKeyPem = rsa.ExportPkcs8PrivateKeyPem(); var publicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(); - return new TestGameLoginTicketKeyResolver(GameLoginTicketSigningKey.CreateRsa("tenant-10-app-20-role-test", privateKeyPem, publicKeyPem)); + return new TestGameLoginTicketKeyResolver(GameLoginTicketSigningKey.CreateRsa("10-app-20-role-test", privateKeyPem, publicKeyPem)); } public Task ResolveSigningKeyAsync() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs index 4d70f334..edb73fae 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs @@ -4,10 +4,10 @@ using System.Text.Json; using GameFrameX.Client.Api.GameRole.Dto; using GameFrameX.Client.Api.Services; -using GameFrameX.Client.Api.Services.ClientApiTenantOptions; +using GameFrameX.Client.Api.Services.ClientApiOptions; using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.IdentityModel.JsonWebTokens; namespace GameFrameX.Core.Tests.ClientApi; @@ -19,7 +19,7 @@ public async Task AccessToken_ValidatesUserSubject() { var provider = FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60); var issuer = new ClientApiTokenIssuer(provider); - var user = new TenantGameUserEntity + var user = new GameUserEntity { Id = 1001, Status = GameUserStatus.Active, @@ -178,7 +178,7 @@ public static TestGameLoginTicketKeyResolver Create() { using (var rsa = RSA.Create(2048)) { - var kid = "tenant-10-app-20-test"; + var kid = "10-app-20-test"; var privateKeyPem = rsa.ExportPkcs8PrivateKeyPem(); var publicKeyPem = rsa.ExportSubjectPublicKeyInfoPem(); return new TestGameLoginTicketKeyResolver(GameLoginTicketSigningKey.CreateRsa(kid, privateKeyPem, publicKeyPem), kid); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs index 4f0dbf2d..628c4482 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWebShopEndpointTests.cs @@ -6,7 +6,7 @@ using GameFrameX.Core.Enum; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using Microsoft.AspNetCore.Mvc; @@ -46,7 +46,7 @@ public async Task GameWebShop_Buy_BuildsCallbackUrlFromSiteRootWithPackageSegmen var controller = CreateController(db, handler); controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(true, true, 7001), }; - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -74,7 +74,7 @@ public async Task GameWebShop_Buy_RejectsLegacyThreeSegmentCallbackUrl() var controller = CreateController(db, handler); controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(true, true, 7001), }; - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -101,7 +101,7 @@ public async Task GameWebShop_Buy_RejectsUnmappableCallbackUrl() var controller = CreateController(db, handler); db.AttachContext(controller); - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -113,7 +113,7 @@ public async Task GameWebShop_Buy_RejectsUnmappableCallbackUrl() // 无法映射到回调路由的地址在下单前拒绝:不提交网关、不预创建订单 Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(root)); Assert.DoesNotContain("/submit.php", handler.RequestPaths); - Assert.Equal(0, await db.MainDb.Queryable().CountAsync()); + Assert.Equal(0, await db.MainDb.Queryable().CountAsync()); } [Fact] @@ -128,7 +128,7 @@ public async Task GameWebShop_Buy_DoesNotRequireLegacyTenantOrAppContext() var controller = CreateController(db); db.AttachContext(controller, includeApp: false); - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -153,7 +153,7 @@ public async Task GameWebShop_Buy_PersistsOrderWithSingleKeyCallbackRoute() var controller = CreateController(db, handler); db.AttachContext(controller); - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -163,7 +163,7 @@ public async Task GameWebShop_Buy_PersistsOrderWithSingleKeyCallbackRoute() var root = ClientApiResultReader.Read(result); Assert.Equal(0, ClientApiResultReader.Code(root)); - Assert.Equal(1, await db.MainDb.Queryable().CountAsync()); + Assert.Equal(1, await db.MainDb.Queryable().CountAsync()); Assert.Contains(handler.RequestBodies, requestBody => requestBody.Contains("NotifyWebShop", StringComparison.Ordinal)); } @@ -185,8 +185,8 @@ public async Task GameWebShop_NotifyWebShop_CreatesShippedOrderAndSendsMail() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -213,9 +213,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsForgedSign() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret", "forged-sign")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.TenantDb.Queryable().ToListAsync(); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.TenantDb.Queryable().ToListAsync(); // 验签缺省强制:伪造签名一律拒绝且不发货(不再有 log 灰度放行) Assert.Equal((int)AuthErrorCode.SignatureVerifyFailed, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); @@ -245,8 +245,8 @@ public async Task GameWebShop_NotifyWebShop_ShipsFromOrderSnapshotWhenShopChange var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); Assert.Equal(650, role.AllRecharge); @@ -274,9 +274,9 @@ public async Task GameWebShop_NotifyWebShop_MailFailureKeepsOrderRetryableThenSu var outTradeNo = await SeedUnpaidOrderAsync(db); var failed = ClientApiResultReader.Read(await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret"))); - var orderAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var roleAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedRows = await db.TenantDb.Queryable().ToListAsync(); + var orderAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterFailure = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedRows = await db.TenantDb.Queryable().ToListAsync(); // 发货失败:订单不能停在已完成,保留 NotShipped 可重试状态,累充不增加 Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(failed)); Assert.Equal(OrderStatusEnum.NotShipped, orderAfterFailure.Status); @@ -287,8 +287,8 @@ public async Task GameWebShop_NotifyWebShop_MailFailureKeepsOrderRetryableThenSu handler.SetJson("/game/api/post_mail", HttpJsonResultData.Success(JsonHelper.Serialize(new GameWebShpBuySendMailResponse { ErrorCode = 0, })).ToString()); var retried = ClientApiResultReader.Read(await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret"))); - var orderAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var roleAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var orderAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterRetry = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(retried)); Assert.Equal(OrderStatusEnum.Shipped, orderAfterRetry.Status); Assert.Equal(650, roleAfterRetry.AllRecharge); @@ -314,8 +314,8 @@ public async Task GameWebShop_NotifyWebShop_ReplaySameOutTradeNo_ShipsOnlyOnce() var first = ClientApiResultReader.Read(await controller.NotifyWebShop(request)); var second = ClientApiResultReader.Read(await controller.NotifyWebShop(request)); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(first)); Assert.Equal(0, ClientApiResultReader.Code(second)); Assert.Equal(OrderStatusEnum.Shipped, order.Status); @@ -343,8 +343,8 @@ public async Task GameWebShop_NotifyWebShop_TerminalStatusOrder_DoesNotShip(Orde var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(status, order.Status); Assert.Equal(0, role.AllRecharge); @@ -369,9 +369,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsAmountMismatch() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest(outTradeNo, 1.00m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.TenantDb.Queryable().ToListAsync(); + var order = await db.TenantDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.TenantDb.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyAmountMismatch, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); Assert.Equal(0, role.AllRecharge); @@ -397,9 +397,9 @@ public async Task GameWebShop_NotifyWebShop_RejectsUnknownOrder() var result = await controller.NotifyWebShop(BuildSignedNotifyRequest("999999999999999999", 6.50m, "sign-secret")); var root = ClientApiResultReader.Read(result); - var orderCount = await db.TenantDb.Queryable().CountAsync(u => u.OrderId == "999999999999999999"); - var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); - var failedOrders = await db.TenantDb.Queryable().ToListAsync(); + var orderCount = await db.TenantDb.Queryable().CountAsync(u => u.OrderId == "999999999999999999"); + var role = await db.TenantDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.TenantDb.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyOrderNotFound, ClientApiResultReader.Code(root)); Assert.Equal(0, orderCount); Assert.Equal(0, role.AllRecharge); @@ -414,7 +414,7 @@ public async Task GameWebShop_NotifyWebShop_ValidatesConfigurationWithoutLegacyA var controller = CreateController(db); db.AttachContext(controller, includeApp: false); - var result = await controller.NotifyWebShop(new TenantGameWebShopEntityBuyNotifyRequest { OutTradeNo = "unknown-order", TradeStatus = "TRADE_SUCCESS", }); + var result = await controller.NotifyWebShop(new GameWebShopEntityBuyNotifyRequest { OutTradeNo = "unknown-order", TradeStatus = "TRADE_SUCCESS", }); var root = ClientApiResultReader.Read(result); Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(root)); @@ -425,7 +425,7 @@ public async Task GameWebShop_NotifyWebShop_ValidatesConfigurationWithoutLegacyA private static async Task SeedUnpaidOrderAsync(ClientApiTestDb db, OrderStatusEnum status = OrderStatusEnum.Unpaid) { const string orderId = "800000000000001"; - await db.MainDb.Insertable(new TenantGameOrderEntity + await db.MainDb.Insertable(new GameOrderEntity { Id = 800000000000001, OrderId = orderId, @@ -457,13 +457,13 @@ await db.MainDb.Insertable(new TenantGameOrderEntity /// /// 按易支付 MD5 口径构造带正确签名的回调请求,模拟 zlpay notify 合法回传;overrideSign 用于伪造签名场景。 /// - private static TenantGameWebShopEntityBuyNotifyRequest BuildSignedNotifyRequest( + private static GameWebShopEntityBuyNotifyRequest BuildSignedNotifyRequest( string outTradeNo, decimal money, string signKey, string? overrideSign = null) { - var request = new TenantGameWebShopEntityBuyNotifyRequest + var request = new GameWebShopEntityBuyNotifyRequest { Pid = 1001, TradeNo = "provider-" + outTradeNo, @@ -482,7 +482,7 @@ private static TenantGameWebShopEntityBuyNotifyRequest BuildSignedNotifyRequest( /// /// 与 NotifyWebShop 验签侧同口径重建回传业务参数字典(money 用 invariant 无尾零格式,排除 sign/sign_type)。 /// - private static Dictionary BuildNotifySignParameters(TenantGameWebShopEntityBuyNotifyRequest request) + private static Dictionary BuildNotifySignParameters(GameWebShopEntityBuyNotifyRequest request) { return new Dictionary { @@ -499,21 +499,21 @@ private static Dictionary BuildNotifySignParameters(TenantGameWe private static GameWebShopController CreateController(ClientApiTestDb db, ClientApiRecordingHttpHandler? handler = null) { - db.InitTenantTables( - typeof(TenantGameWebShopEntity), - typeof(TenantGameRoleEntity), - typeof(TenantGameAreaEntity), - typeof(TenantGameWebShopOrderEntity), - typeof(TenantGameOrderEntity), - typeof(TenantGameGoodsEntity), + db.InitBusinessTables( + typeof(GameWebShopEntity), + typeof(GameRoleEntity), + typeof(GameAreaEntity), + typeof(GameWebShopOrderEntity), + typeof(GameOrderEntity), + typeof(GameGoodsEntity), typeof(SystemConfigEntity)); return new GameWebShopController( new HttpClient(handler ?? ClientApiRecordingHttpHandler.WithGameServerDefaults(), false), - db.Repository(), - db.Repository(), - db.Repository(), - db.Repository(), - db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), + db.Repository(), db.Repository()); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs index 10d8f221..c2947356 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs @@ -4,7 +4,7 @@ using System.Text.Json; using GameFrameX.Core.Middleware; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; @@ -669,9 +669,9 @@ public void Judge_LeaseAndEnableSemantics() Assert.Equal(SessionKeyLookupResult.Expired, SessionKeyResolver.Judge(Key(0, now, true), now)); return; - static TenantSessionKeyEntity Key(long? notBefore, long? expire, bool enabled) + static SessionKeyEntity Key(long? notBefore, long? expire, bool enabled) { - return new TenantSessionKeyEntity { NotBeforeTime = notBefore, ExpireTime = expire, IsEnabled = enabled, }; + return new SessionKeyEntity { NotBeforeTime = notBefore, ExpireTime = expire, IsEnabled = enabled, }; } } @@ -689,12 +689,12 @@ private static string ReplaceFirstCtByte(string envelopeJson) /// private sealed class FakeSessionKeyResolver : ISessionKeyResolver { - private readonly List _keys = new(); + private readonly List _keys = new(); public void AddKey(long appId, string kid, string secret, bool enabled, long? notBefore, long? expire) { _keys.RemoveAll(x => x.Kid == kid); - _keys.Add(new TenantSessionKeyEntity + _keys.Add(new SessionKeyEntity { Kid = kid, Secret = secret, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs index 488d62e1..afa829e2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs @@ -54,7 +54,7 @@ public async Task Middleware_LegacyContextFieldsAreIgnored() context.Request.RouteValues["appId"] = 888; // c406-keep context.Request.RouteValues["gameAppId"] = 777; // c406-keep var invoked = false; - var middleware = new PublicCallbackTenantResolutionMiddleware(request => + var middleware = new PublicCallbackResolutionMiddleware(request => { invoked = true; Assert.Single(request.Items); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs index a1e35e5e..0e84c26f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs @@ -3,7 +3,7 @@ using GameFrameX.Client.Api.Middleware; using GameFrameX.Client.Api.Services.PublicCallback; using GameFrameX.Core.Middleware; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.AliPay; using GameFrameX.Payment.Wechat; using Microsoft.AspNetCore.Http; @@ -21,11 +21,11 @@ public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string ch //(旧 tenantId/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 // c406-keep using (var database = new ClientApiTestDb()) { - database.InitTenantTables(typeof(TenantGamePaymentConfigEntity)); + database.InitBusinessTables(typeof(GamePaymentConfigEntity)); var configJson = channel == "alipay" ? JsonSerializer.Serialize(new AliPayOptionSetting { AliPayNotifyUrl = "https://example.test", }) : JsonSerializer.Serialize(new WechatPayOptionSetting { WechatPayNotifyUrl = "https://example.test", }); - database.TenantDb.Insertable(new TenantGamePaymentConfigEntity + database.TenantDb.Insertable(new GamePaymentConfigEntity { Id = 1900000005101, PackageIdNormalized = 0, @@ -37,7 +37,7 @@ public void OutboundPayment_BuildsNotifyUrlFromSiteRootThroughProvider(string ch var context = new DefaultHttpContext(); context.Request.QueryString = new QueryString("?tenantId=123&appId=456"); // c406-keep - var provider = new PaymentOptionSettingProvider(database.TenantDbProvider, new HttpContextAccessor { HttpContext = context }); + var provider = new PaymentOptionSettingProvider(database.DbProvider, new HttpContextAccessor { HttpContext = context }); var expectedRoute = channel == "alipay" ? "api/GameOrder/NotifyAliPay" : "api/GameOrder/NotifyWeChatPay"; var notifyUrl = channel == "alipay" @@ -58,7 +58,7 @@ public async Task IncomingCallback_OldRouteSegments_DoNotCreateScopeContext() context.Request.RouteValues["tenantId"] = 999; // c406-keep context.Request.RouteValues["appId"] = 888; // c406-keep var invoked = false; - var middleware = new PublicCallbackTenantResolutionMiddleware(request => + var middleware = new PublicCallbackResolutionMiddleware(request => { invoked = true; Assert.Single(request.Items); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessAuthMiddlewareTests.cs similarity index 68% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessAuthMiddlewareTests.cs index 31efda51..e66847d9 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessAuthMiddlewareTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessAuthMiddlewareTests.cs @@ -1,16 +1,16 @@ using System.Text; using GameFrameX.Core.SignatureAuth; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Hub.Api.Middleware; namespace GameFrameX.Core.Tests.HubApi; /// -/// TenantGameAppOpenAccessAuthMiddleware 签名段单元测试(C267-C:规范 B → 规范 A 迁移)。 +/// GameAppOpenAccessAuthMiddleware 签名段单元测试(C267-C:规范 B → 规范 A 迁移)。 /// 覆盖:v2 单头解析(合法/旧格式拒绝/坏 Base64)、canonical 消息串验签通过、 /// body 篡改拒(body 入签证据)、按原始乱序 query 拼串签名拒(canonical 强制证据)。 /// -public sealed class TenantGameAppOpenAccessAuthMiddlewareTests +public sealed class GameAppOpenAccessAuthMiddlewareTests { private const string AccessKey = "ak-hub-vector-001"; private const string AccessSecret = "GFX-C267-HUB-OPENACCESS-SECRET"; @@ -18,9 +18,9 @@ public sealed class TenantGameAppOpenAccessAuthMiddlewareTests private const string Nonce = "n-9f3c1b"; private const string Body = "{\"package\":\"pkg-1001\",\"status\":\"ok\"}"; - private static TenantGameAppOpenAccessEntity Credential() + private static GameAppOpenAccessEntity Credential() { - return new TenantGameAppOpenAccessEntity + return new GameAppOpenAccessEntity { AccessKey = AccessKey, AccessSecret = AccessSecret, @@ -41,7 +41,7 @@ public void TryParseSignatureHeader_ValidV2Header_ParsesAllSegments() var signatureBase64 = ClientSign("POST", "/api/PackageBuildReport", "serverId=9&channel=ios", Encoding.UTF8.GetBytes(Body)); var header = "v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";" + Convert.ToBase64String(signatureBase64); - var parsed = TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(header, out var accessKey, out var timestamp, out var nonce, out var provided); + var parsed = GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(header, out var accessKey, out var timestamp, out var nonce, out var provided); Assert.True(parsed); Assert.Equal(AccessKey, accessKey); @@ -55,13 +55,13 @@ public void TryParseSignatureHeader_LegacyOrMalformed_Rejected() { // C267 前的 4 个独立头(accessKey/timestamp/nonce/sign)不再支持:缺 Signature 单头直接解析失败; // 段数不足 / 非 v2 前缀 / 坏 Base64 同样拒绝 - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(null, out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(string.Empty, out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v1;" + AccessKey + ";" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce, out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";not-a-ts;" + Nonce + ";AAAA", out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;;" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); - Assert.False(TenantGameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";***not-base64***", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(null, out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader(string.Empty, out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v1;" + AccessKey + ";" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce, out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";not-a-ts;" + Nonce + ";AAAA", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;;" + Ts + ";" + Nonce + ";AAAA", out _, out _, out _, out _)); + Assert.False(GameAppOpenAccessAuthMiddleware.TryParseSignatureHeader("v2;" + AccessKey + ";" + Ts + ";" + Nonce + ";***not-base64***", out _, out _, out _, out _)); } [Fact] @@ -70,7 +70,7 @@ public void VerifySignature_ClientCanonicalMessage_Passes() var body = Encoding.UTF8.GetBytes(Body); var provided = ClientSign("POST", "/api/PackageBuildReport", "serverId=9&channel=ios", body); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( Credential(), "POST", "/api/PackageBuildReport", "serverId=9&channel=ios", Ts, Nonce, body, provided); Assert.True(verified); @@ -83,7 +83,7 @@ public void VerifySignature_TamperedBody_Rejected() var body = Encoding.UTF8.GetBytes(Body); var provided = ClientSign("POST", "/api/PackageBuildReport", "serverId=9", body); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( Credential(), "POST", "/api/PackageBuildReport", "serverId=9", Ts, Nonce, Encoding.UTF8.GetBytes("{\"package\":\"pkg-1001\",\"status\":\"tampered\"}"), provided); @@ -100,7 +100,7 @@ public void VerifySignature_RawOrderSignedClient_Rejected() + CanonicalRequestBuilder.BodyHashHex(body); var provided = CanonicalRequestBuilder.HmacSha256(Encoding.UTF8.GetBytes(AccessSecret), rawOrderMessage); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( Credential(), "POST", "/api/PackageBuildReport", "serverId=9&channel=ios", Ts, Nonce, body, provided); Assert.False(verified); diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs similarity index 78% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs index 2e0e63cd..db8cb9f5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/TenantGameAppOpenAccessDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs @@ -3,13 +3,13 @@ using GameFrameX.Core.Middleware; using GameFrameX.Core.Option; using GameFrameX.Core.Service.Cache; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SignatureAuth; using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Tests.ClientApi; -using GameFrameX.Entity.Tenant; -using GameFrameX.Entity.Tenant.Game.App; +using GameFrameX.Entity.Business; +using GameFrameX.Entity.Business.Game.App; using GameFrameX.Hub.Api.Middleware; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; @@ -21,32 +21,32 @@ namespace GameFrameX.Core.Tests.HubApi; // C372(GFX-838)T3/T5/T6:Hub.Api 开放访问中间件凭证解密收口——密文凭证(C371 起库内形态) // 经完整 InvokeAsync 管线验签通过;密文存在而密钥缺失 fail-closed 抛错。 // change:gfx-doc/dev/client-api/changes/C372-runtime-credential-decrypt-closure/change.md -public sealed class TenantGameAppOpenAccessDecryptClosureTests : IDisposable +public sealed class GameAppOpenAccessDecryptClosureTests : IDisposable { private readonly ClientApiTestDb _db = new(); private readonly string? _originalKey; - public TenantGameAppOpenAccessDecryptClosureTests() + public GameAppOpenAccessDecryptClosureTests() { - _originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); - _db.InitTenantTables(typeof(TenantGameAppOpenAccessEntity), typeof(TenantUserEntity)); + _originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + _db.InitBusinessTables(typeof(GameAppOpenAccessEntity), typeof(UserEntity)); } public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); _db.Dispose(); } [Fact] public async Task EncryptedCredential_SignedRequest_PassesFullPipeline() { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); var httpContext = CreateSignedRequest("hub-open-access-secret"); var nextCalled = false; - var middleware = new TenantGameAppOpenAccessAuthMiddleware(context => + var middleware = new GameAppOpenAccessAuthMiddleware(context => { nextCalled = true; context.Response.StatusCode = StatusCodes.Status200OK; @@ -62,16 +62,16 @@ public async Task EncryptedCredential_SignedRequest_PassesFullPipeline() [Fact] public async Task EncryptedCredential_MissingKey_FailsClosed() { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); var httpContext = CreateSignedRequest("hub-open-access-secret"); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, null); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, null); - var middleware = new TenantGameAppOpenAccessAuthMiddleware(_ => Task.CompletedTask); + var middleware = new GameAppOpenAccessAuthMiddleware(_ => Task.CompletedTask); // 密文存在而密钥缺失:fail-closed 抛 InvalidOperationException(指向环境变量,不回显密文) var exception = await Assert.ThrowsAsync( () => middleware.InvokeAsync(httpContext, CreateCacheService())); - Assert.Contains(TenantSecretCrypto.KeyEnvironmentVariable, exception.Message, StringComparison.Ordinal); + Assert.Contains(SecretCrypto.KeyEnvironmentVariable, exception.Message, StringComparison.Ordinal); } [Theory] @@ -83,8 +83,8 @@ public async Task EncryptedCredential_MissingKey_FailsClosed() [InlineData("tampered", 401)] public async Task MainDatabaseCredential_InvalidStateOrRequest_IsRejected(string scenario, int expectedStatus) { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); - var credential = _db.MainDb.Queryable().First(); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); + var credential = _db.MainDb.Queryable().First(); switch (scenario) { case "disabled": @@ -112,7 +112,7 @@ public async Task MainDatabaseCredential_InvalidStateOrRequest_IsRejected(string } var nextCalled = false; - var middleware = new TenantGameAppOpenAccessAuthMiddleware(_ => + var middleware = new GameAppOpenAccessAuthMiddleware(_ => { nextCalled = true; return Task.CompletedTask; @@ -126,11 +126,11 @@ public async Task MainDatabaseCredential_InvalidStateOrRequest_IsRejected(string [Fact] public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoTenantClaim() { - SeedCredential(TenantSecretCrypto.Encrypt("hub-open-access-secret")!); + SeedCredential(SecretCrypto.Encrypt("hub-open-access-secret")!); var first = CreateSignedRequest("hub-open-access-secret"); var cache = CreateCacheService(); var nextCount = 0; - var middleware = new TenantGameAppOpenAccessAuthMiddleware(context => + var middleware = new GameAppOpenAccessAuthMiddleware(context => { nextCount++; Assert.Equal("7801", context.User.FindFirst(GameFrameX.Core.Const.ClaimConst.UserId)?.Value); @@ -148,13 +148,13 @@ public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoTenantC private void SeedCredential(string storedAccessSecret) { - var bindUser = new TenantUserEntity + var bindUser = new UserEntity { Id = 7801, Account = "ci-user", RealName = "CI", Password = "not-a-real-password", }; - TenantUserService.NormalizeNewUser(bindUser); // 补齐 NOT NULL 字符串列默认值 + UserService.NormalizeNewUser(bindUser); // 补齐 NOT NULL 字符串列默认值 _db.TenantDb.Insertable(bindUser).ExecuteCommand(); - _db.TenantDb.Insertable(new TenantGameAppOpenAccessEntity + _db.TenantDb.Insertable(new GameAppOpenAccessEntity { Id = 7802, BindUserId = 7801, Scenario = "ci", Purpose = "unit-test", SubjectName = "unit-test", @@ -190,7 +190,7 @@ private IServiceProvider CreateRequestServices() { var services = new ServiceCollection(); services.AddSingleton(_db.MainDb); - services.AddSingleton(_db.TenantDbProvider); + services.AddSingleton(_db.DbProvider); services.AddScoped(typeof(Repository<>)); return services.BuildServiceProvider(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs index caa94d37..eaa62f89 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs @@ -4,11 +4,11 @@ using GameFrameX.Client.Api.Services; using GameFrameX.Core.Enum; using GameFrameX.Core.Middleware; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Enum; using GameFrameX.Entity.System; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Payment.AliPay; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -28,22 +28,22 @@ public void GetOptionSetting_SensitiveJsonFieldDecrypts() { const long tenantId = 1900000004001; const long appId = 1900000004101; - var originalKey = Environment.GetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable); - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + var originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); _ = Assembly.Load("GameFrameX.Payment.AliPay"); try { using var fixture = new PostgresPaymentFixture(tenantId, appId); var configJson = PaymentConfigCrypto.EncryptConfigJson("alipay", "{\"AliPayAppId\":\"2021001\",\"AliPayMerchantPrivateKey\":\"plain-merchant-key\",\"AliPayGatewayUrl\":\"https://openapi.alipay.com/gateway.do\"}"); - fixture.TenantDb.Insertable(new TenantGamePaymentConfigEntity + fixture.TenantDb.Insertable(new GamePaymentConfigEntity { Id = 1900000004201, IsEnabled = true, PayChannel = "alipay", ConfigJson = configJson, }).ExecuteCommand(); var httpContext = new DefaultHttpContext(); httpContext.Items[GameFrameX.Core.Middleware.PublicCallbackRouteContext.ItemKey] = true; - var provider = new PaymentOptionSettingProvider(fixture.TenantDbProvider, new HttpContextAccessor { HttpContext = httpContext, }); + var provider = new PaymentOptionSettingProvider(fixture.DbProvider, new HttpContextAccessor { HttpContext = httpContext, }); var setting = provider.GetOptionSetting("alipay"); @@ -53,7 +53,7 @@ public void GetOptionSetting_SensitiveJsonFieldDecrypts() } finally { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, originalKey); } } @@ -74,9 +74,9 @@ public PostgresPaymentFixture(long tenantId, long appId) MainDb = new SqlSugarScope(mainConfig); - TenantDbProvider = MainDb; - TenantDb = TenantDbProvider; - TenantDb.CodeFirst.InitTables(typeof(TenantGamePaymentConfigEntity)); + DbProvider = MainDb; + TenantDb = DbProvider; + TenantDb.CodeFirst.InitTables(typeof(GamePaymentConfigEntity)); _ = appId; } @@ -84,7 +84,7 @@ public PostgresPaymentFixture(long tenantId, long appId) public ISqlSugarClient TenantDb { get; } - public ISqlSugarClient TenantDbProvider { get; } + public ISqlSugarClient DbProvider { get; } public void Dispose() diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs index 943fe292..3c859bd4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; using GameFrameX.Entity.Log; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Orm.Entity; using Microsoft.AspNetCore.Http; using SqlSugar; @@ -47,8 +47,8 @@ public OnlineScopeContextFactoryTests() _db = _scopeOwner.GetConnectionScope("online-scope"); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantLogOperationEntity)); + typeof(GameAreaEntity), + typeof(LogOperationEntity)); } [Theory] @@ -56,7 +56,7 @@ public OnlineScopeContextFactoryTests() [InlineData(-1)] public async Task CreateAsync_RejectsMissingServer(long serverId) { - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var exception = await Assert.ThrowsAsync(() => factory.CreateAsync(serverId)); Assert.Equal(32200005, exception.Code); } @@ -64,7 +64,7 @@ public async Task CreateAsync_RejectsMissingServer(long serverId) [Fact] public async Task CreateAsync_RejectsNonexistentServer() { - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var exception = await Assert.ThrowsAsync(() => factory.CreateAsync(9999)); Assert.Equal(32200001, exception.Code); } @@ -73,7 +73,7 @@ public async Task CreateAsync_RejectsNonexistentServer() public async Task CreateAsync_ReturnsExistingServerWithoutUserContext() { await SeedAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var scope = await factory.CreateAsync(Area1001, "unit-test"); Assert.Equal(Area1001, scope.ServerId); Assert.Equal("unit-test", scope.RequestSummary); @@ -81,14 +81,14 @@ public async Task CreateAsync_ReturnsExistingServerWithoutUserContext() /// /// 审计承载断言:拒绝异常(镜像数字码 + 本地化文案 + errors JSON)可完整写入租户操作日志并查回往返 - /// (MonitorLogging 在 action 层自动落库;此处锁定 TenantLogOperationEntity 表对 322 段拒绝留痕的承载能力)。 + /// (MonitorLogging 在 action 层自动落库;此处锁定 LogOperationEntity 表对 322 段拒绝留痕的承载能力)。 /// [Fact] public async Task RejectedScope_IsAuditableInTenantOperationLog() { await SeedAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); // 本地化文案断言依赖请求语言,显式固定 zh-CN(与 ErrorCodeContractTests 的 BusinessException 行为测试同姿势)。 var originalCulture = CultureInfo.CurrentUICulture; @@ -99,7 +99,7 @@ public async Task RejectedScope_IsAuditableInTenantOperationLog() var exception = await Assert.ThrowsAsync(() => factory.CreateAsync(9999)); Assert.Equal(32200001, exception.Code); - var log = new TenantLogOperationEntity + var log = new LogOperationEntity { Message = exception.Message, Exception = exception.ToString(), @@ -109,7 +109,7 @@ public async Task RejectedScope_IsAuditableInTenantOperationLog() }; await _db.Insertable(log).ExecuteCommandAsync(); - var persisted = await _db.Queryable().FirstAsync(u => u.Message == exception.Message); + var persisted = await _db.Queryable().FirstAsync(u => u.Message == exception.Message); Assert.NotNull(persisted); persistedMessage = persisted.Message; } @@ -127,12 +127,12 @@ public async Task ProvisioningScope_AllowsDisabledButRejectsDeleted_OrdinaryScop { await SeedAsync(); SqlSugarUnifiedConfig.ConfigureClientFilters(_db); - await _db.Updateable().SetColumns(area => area.IsEnabled == false) + await _db.Updateable().SetColumns(area => area.IsEnabled == false) .Where(area => area.Id == Area1001).ExecuteCommandAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); await Assert.ThrowsAsync(() => factory.CreateAsync(Area1001)); Assert.Equal(Area1001, (await factory.CreateForProvisioningAsync(Area1001)).ServerId); - var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); + var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); deleted.IsDeleted = true; await _db.Updateable(deleted).AS().ExecuteCommandAsync(); await Assert.ThrowsAsync(() => factory.CreateForProvisioningAsync(Area1001)); @@ -151,9 +151,9 @@ private async Task SeedAsync() await _db.Insertable(NewArea(Area2001, App200, now)).ExecuteCommandAsync(); } - private static TenantGameAreaEntity NewArea(long id, long gameAppId, long now) + private static GameAreaEntity NewArea(long id, long gameAppId, long now) { - return new TenantGameAreaEntity + return new GameAreaEntity { Id = id, Name = $"area-{id}", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs index 126e618c..199d2c20 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs @@ -8,7 +8,7 @@ using GameFrameX.Core.Exceptions; using GameFrameX.Core.Service.User; using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using GameFrameX.Foundation.Http.Normalization; using GameFrameX.Foundation.Json; using GameFrameX.Foundation.Orm.Entity; @@ -53,7 +53,7 @@ public OnlineServerClientTests() _db = _scopeOwner.GetConnectionScope("online-client"); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -81,7 +81,7 @@ public async Task PostAsync_Respects_CustomOnlineAdminPrefix_FromArea() { await SeedAsync(); - var area = await _db.Queryable().FirstAsync(u => u.Id == Area1001); + var area = await _db.Queryable().FirstAsync(u => u.Id == Area1001); area.OnlineAdminApiPrefix = "online/v2"; await _db.Updateable(area).ExecuteCommandAsync(); @@ -241,7 +241,7 @@ public async Task PostAsync_WhenAreaDeletedAfterScopeCreated_ThrowsServerScopeDe var client = CreateClient(handler); var scope = await CreateScopeAsync(); - await _db.Deleteable().Where(u => u.Id == Area1001).ExecuteCommandAsync(); + await _db.Deleteable().Where(u => u.Id == Area1001).ExecuteCommandAsync(); var exception = await Assert.ThrowsAsync(async () => await client.PostAsync("kick_player", new { Reason = 1, }, scope)); @@ -255,16 +255,16 @@ public async Task PostAsync_WhenAreaDeletedAfterScopeCreated_ThrowsServerScopeDe public async Task ProvisioningClient_ResolvesDisabledOnlyWithProvisioningContext() { await SeedAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); var ordinary = await factory.CreateAsync(Area1001); SqlSugarUnifiedConfig.ConfigureClientFilters(_db); - await _db.Updateable().SetColumns(area => area.IsEnabled == false) + await _db.Updateable().SetColumns(area => area.IsEnabled == false) .Where(area => area.Id == Area1001).ExecuteCommandAsync(); var client = CreateClient(new FakeHandler(SuccessEnvelope(new OnlineDemoData { PlayerId = "provision" }))); await Assert.ThrowsAsync(() => client.PostAsync("query_server_calendar", new { }, ordinary)); var scope = await factory.CreateForProvisioningAsync(Area1001); Assert.Equal("provision", (await client.PostAsync("query_server_calendar", new { }, scope)).PlayerId); - var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); + var deleted = await _db.Queryable().Filter(null, true).FirstAsync(area => area.Id == Area1001); deleted.IsDeleted = true; await _db.Updateable(deleted).AS().ExecuteCommandAsync(); await Assert.ThrowsAsync(() => client.PostAsync("query_server_calendar", new { }, scope)); @@ -279,12 +279,12 @@ private sealed class OnlineDemoData private OnlineServerClient CreateClient(FakeHandler handler) { - return new OnlineServerClient(new HttpClient(handler), new OnlineServerEndpointResolver(), Repository()); + return new OnlineServerClient(new HttpClient(handler), new OnlineServerEndpointResolver(), Repository()); } private async Task CreateScopeAsync() { - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); return await factory.CreateAsync(Area1001, "unit-test"); } @@ -330,7 +330,7 @@ private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(new TenantGameAreaEntity + await _db.Insertable(new GameAreaEntity { Id = Area1001, Name = "area-1001", diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs index aa891591..19307953 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/AuthTestHost.cs @@ -18,7 +18,7 @@ namespace GameFrameX.Core.Tests.System; /// -/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 主库(superadmin seed)+ 业务用户测试连接(tenant_user seed)+ +/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 主库(superadmin seed)+ 业务用户测试连接(user seed)+ /// 手写 fake(3 接口)+ CurrentUserContext 真实 + SystemConfigService 真实(FakeCache)+ ICaptcha/IServiceProvider null!(captcha IsEnabled=false 路径不调用)。 /// C218 扩展:主库 + 业务测试连接双 scope(configId=main/1001)。 /// DefaultHttpContext 供 CreateTokenAsync 写响应头;FakePlatformJwtTokenService 捕获 payload 供 Claim 校验。 @@ -26,13 +26,13 @@ namespace GameFrameX.Core.Tests.System; internal sealed class AuthTestHost : IDisposable { private const string MainConfigId = "main"; - private const string TenantConfigId = "1001"; - private const long TenantUserId = 2001L; + private const string ConfigId = "1001"; + private const long UserId = 2001L; /// - /// 租户库 seed 用的租户 ID(与 对应)。 + /// 租户库 seed 用的租户 ID(与 对应)。 /// - public const long SeedTenantId = 1001L; + public const long SeedId = 1001L; private readonly SqlSugarScope _client; private readonly List _dbPaths = new(); @@ -41,18 +41,18 @@ public AuthTestHost() { SqlSugarCache.Configure(new FakeCache()); var mainConfig = CreateConfig(MainConfigId); - var tenantConfig = CreateConfig(TenantConfigId); + var tenantConfig = CreateConfig(ConfigId); _client = new SqlSugarScope(new List { mainConfig, tenantConfig, }); SqlSugarSetup.InitDatabase(_client, mainConfig, new[] { typeof(SystemUserEntity), typeof(SystemConfigEntity), - typeof(TenantUserEntity), + typeof(UserEntity), }); - _client.GetConnectionScope(MainConfigId).CodeFirst.InitTables(); + _client.GetConnectionScope(MainConfigId).CodeFirst.InitTables(); SqlSugarSetup.InitDatabase(_client, tenantConfig, new[] { - typeof(TenantUserEntity), + typeof(UserEntity), }); } @@ -70,7 +70,7 @@ public AuthTestHost() public SystemAuthService BuildService() { var httpContextAccessor = new HttpContextAccessor { HttpContext = HttpContext, }; -#pragma warning disable CS8604 // SystemUserEntity/SystemConfigEntity 是 platform table,构造不实际使用 tenantDbConnectionProvider;ICaptcha 在 captcha IsEnabled=false 路径不调用 +#pragma warning disable CS8604 // SystemUserEntity/SystemConfigEntity 是 platform table,构造不实际使用 dbConnectionProvider;ICaptcha 在 captcha IsEnabled=false 路径不调用 var systemUserRepository = new SqlSugarRepository(_client); var systemConfigRepository = new SqlSugarRepository(_client); var captcha = (Lazy.Captcha.Core.ICaptcha)null!; @@ -122,11 +122,11 @@ public async Task SeedSuperAdminAsync(string account, string password, bool? isE /// - /// 在租户库 seed 一条 (AccountType=NormalUser,IsEnabled=true,以通过冻结检查进入租户禁用分支)。 + /// 在租户库 seed 一条 (AccountType=NormalUser,IsEnabled=true,以通过冻结检查进入租户禁用分支)。 /// - public async Task SeedTenantUserAsync(long tenantId, string account, string password) + public async Task SeedUserAsync(long tenantId, string account, string password) { - var user = BuildUser(TenantUserId, account, password, AccountTypeEnum.NormalUser); + var user = BuildUser(UserId, account, password, AccountTypeEnum.NormalUser); user.IsEnabled = true; var tenantDb = _client.GetConnectionScope(MainConfigId); @@ -145,7 +145,7 @@ public void Dispose() } /// - /// 填充 共享字段(system_user / tenant_user 通用),调用方再按需覆盖 Id/TenantId/IsEnabled/AccountType。 + /// 填充 共享字段(system_user / user 通用),调用方再按需覆盖 Id/TenantId/IsEnabled/AccountType。 /// private static T BuildUser(long id, string account, string password, AccountTypeEnum accountType) where T : SystemUserBase, new() { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs index 72daaa94..f573f49d 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs @@ -1,12 +1,12 @@ using System.Net; using GameFrameX.Application.Dashboard.GameHome; using GameFrameX.Core.Exceptions; -using GameFrameX.Core.Service.Tenant; +using GameFrameX.Core.Service.Business; using GameFrameX.Core.SqlSugar; using GameFrameX.Core.Cache; using GameFrameX.Core.Option; using GameFrameX.Entity.Enum; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Entity.Business.Game; using SqlSugar; namespace GameFrameX.Core.Tests.System; @@ -17,7 +17,7 @@ namespace GameFrameX.Core.Tests.System; public class GameHomeServiceTests : IDisposable { private const long TenantId = 1001L; - private const string TenantConfigId = "1001"; + private const string ConfigId = "1001"; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"game_home_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _db; @@ -27,11 +27,11 @@ public GameHomeServiceTests() { SqlSugarCache.Configure(new FakeCache()); // AuthTestHost 判例:连接配置必须经 SqlSugarSetup.SetDbConfig 装配 ConfigureExternalServices - // (实体列名/类型服务,[TenantTable] 实体前缀 mutate 也在此链路),否则 ORM 写读列映射不一致 + // (实体列名/类型服务,[BusinessTable] 实体前缀 mutate 也在此链路),否则 ORM 写读列映射不一致 // (实测种子 ControlApiPrefix 落 NULL、读回空导致 Build 抛降级)。建表与种子统一走租户库 scope。 var config = new DbConnectionConfig { - ConfigId = TenantConfigId, + ConfigId = ConfigId, DbType = DbType.Sqlite, ConnectionString = $"DataSource={_dbPath}", IsAutoCloseConnection = true, @@ -41,12 +41,12 @@ public GameHomeServiceTests() }; SqlSugarSetup.SetDbConfig(config); _db = new SqlSugarScope(new List { config, }); - var tenantScope = _db.GetConnectionScope(TenantConfigId); - tenantScope.CodeFirst.InitTables(); - tenantScope.CodeFirst.InitTables(); - tenantScope.CodeFirst.InitTables(); - tenantScope.CodeFirst.InitTables(); - _database = _db.GetConnectionScope(TenantConfigId); + var tenantScope = _db.GetConnectionScope(ConfigId); + tenantScope.CodeFirst.InitTables(); + tenantScope.CodeFirst.InitTables(); + tenantScope.CodeFirst.InitTables(); + tenantScope.CodeFirst.InitTables(); + _database = _db.GetConnectionScope(ConfigId); } private GameHomeService CreateService(HttpClient? httpClient = null) @@ -218,7 +218,7 @@ public async Task OnlineTrend_UsesMainDatabaseWithoutTenantContext() private async Task SeedAreaAsync(long id, string httpManageUrl, string controlPrefix, GameServerStatus serverStatus = GameServerStatus.Online) { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameAreaEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameAreaEntity { Id = id, CreatedId = 1, @@ -258,7 +258,7 @@ await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameAreaEntity private async Task SeedOrderAsync(long id, long createdTime, OrderStatusEnum status) { - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameOrderEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameOrderEntity { Id = id, CreatedId = 1, @@ -299,7 +299,7 @@ await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameOrderEntit private async Task SeedPlayerAsync(long id, long createdTime) { - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameUserEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameUserEntity { Id = id, CreatedId = 1, @@ -337,7 +337,7 @@ await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameUserEntity private async Task SeedSampleAsync(long sampleTime, int onlineCount) { - await _db.GetConnectionScope(TenantConfigId).Insertable(new TenantGameHomeOnlineSampleEntity + await _db.GetConnectionScope(ConfigId).Insertable(new GameHomeOnlineSampleEntity { Id = 40000L + sampleTime % 100000, CreatedId = 0, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs index 4a638fb8..f1f11445 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SessionKeyResolver.cs @@ -1,5 +1,5 @@ -using GameFrameX.Core.Service.Tenant; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Core.Service.Business; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Middleware; @@ -33,7 +33,7 @@ public async Task ResolveAsync(string kid) /// 结果到中间件拒收信封码的映射见 ;Expire 判定为严格大于 /// (now == Expire 即到期),与 SignatureKeyResolver / LoginTicket key 查询口径一致。 /// - internal static SessionKeyLookupResult Judge(TenantSessionKeyEntity key, long now) + internal static SessionKeyLookupResult Judge(SessionKeyEntity key, long now) { if (key.IsEnabled == false) { @@ -53,10 +53,10 @@ internal static SessionKeyLookupResult Judge(TenantSessionKeyEntity key, long no return SessionKeyLookupResult.Active; } - private async Task GetKeyAsync(string kid) + private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _database.Queryable().ClearFilter() + return await _database.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs index c183121b..942cc03b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/SignatureKeyResolver.cs @@ -1,5 +1,5 @@ -using GameFrameX.Core.Service.Tenant; -using GameFrameX.Entity.Tenant.Game; +using GameFrameX.Core.Service.Business; +using GameFrameX.Entity.Business.Game; namespace GameFrameX.Core.Middleware; @@ -32,7 +32,7 @@ public async Task ResolveAsync(string kid) public async Task> GetActiveKeysAsync() { var now = TimerHelper.UnixTimeSeconds(); - var keys = await _database.Queryable().ClearFilter() + var keys = await _database.Queryable().ClearFilter() .Where(key => key.IsDeleted == false && key.IsEnabled == true && (key.NotBeforeTime == null || key.NotBeforeTime <= now) && (key.ExpireTime == null || key.ExpireTime > now)).ToListAsync(); @@ -48,7 +48,7 @@ public async Task> GetActiveKeysAsync() /// 结果到中间件拒签码的映射见 ;Expire 判定为严格大于 /// (now == Expire 即到期),与 LoginTicket key 查询口径一致。 /// - internal static SignatureKeyLookupResult Judge(TenantAppSignatureKeyEntity key, long now) + internal static SignatureKeyLookupResult Judge(AppSignatureKeyEntity key, long now) { if (key.IsEnabled == false) { @@ -68,10 +68,10 @@ internal static SignatureKeyLookupResult Judge(TenantAppSignatureKeyEntity key, return SignatureKeyLookupResult.Active; } - private async Task GetKeyAsync(string kid) + private async Task GetKeyAsync(string kid) { // 元数据不缓存,跨宿主轮换、同秒撤销、删除与租约修改在下一请求立即生效。 - return await _database.Queryable().ClearFilter() + return await _database.Queryable().ClearFilter() .Where(key => key.Kid == kid && key.IsDeleted == false).FirstAsync(); } From d7daa623b233830aa87cb350d567db77f2056717 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:56:27 +0800 Subject: [PATCH 35/86] =?UTF-8?q?refactor:=20=E8=BF=81=E7=A7=BB=20R4=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E9=81=97=E7=95=99=E8=87=B3=20Business=20?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4=E8=90=BD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C406 契约 §7 R4:改名脚本未移动目录名含 tenant 而文件名不含的目录。 Core/Service/Tenant 两文件(GameServerConfigBaselineSeed、Payment/ PaymentConfigCrypto)与 Entity/Tenant/Game 两文件(FeatureSwitch/ FeatureSwitchAudienceValues、GamePropItem)git mv 至既有 Business 落点(命名空间已由脚本统一为 Business,仅物理位置修正)。git ls-files | grep -i tenant 本角色范围清零(余 2 条归 H)。 Linear: GFX-1232 --- .../Service/{Tenant => Business}/GameServerConfigBaselineSeed.cs | 0 .../Service/{Tenant => Business}/Payment/PaymentConfigCrypto.cs | 0 .../Game/FeatureSwitch/FeatureSwitchAudienceValues.cs | 0 .../GameFrameX.Entity/{Tenant => Business}/Game/GamePropItem.cs | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/{Tenant => Business}/GameServerConfigBaselineSeed.cs (100%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/{Tenant => Business}/Payment/PaymentConfigCrypto.cs (100%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant => Business}/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs (100%) rename GameFrameX.Admin.Unified.Api/GameFrameX.Entity/{Tenant => Business}/Game/GamePropItem.cs (100%) diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/GameServerConfigBaselineSeed.cs similarity index 100% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/GameServerConfigBaselineSeed.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/Payment/PaymentConfigCrypto.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/Payment/PaymentConfigCrypto.cs similarity index 100% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/Payment/PaymentConfigCrypto.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/Payment/PaymentConfigCrypto.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs similarity index 100% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/GamePropItem.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePropItem.cs similarity index 100% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/GamePropItem.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePropItem.cs From 88addcbc41e73b02736d92696da0be38c2aaa291 Mon Sep 17 00:00:00 2001 From: Blank Date: Fri, 6 Nov 2026 15:57:59 +0800 Subject: [PATCH 36/86] =?UTF-8?q?refactor(vue):=20=E5=BA=94=E7=94=A8=20C40?= =?UTF-8?q?6=20=E7=BB=9F=E4=B8=80=E6=94=B9=E5=90=8D=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按 P0 rename_tool_v2 处理 Vue 视图、路由、权限键、i18n 键和消费方引用;手工修正脚本未执行的页面目录改名,并迁移首页 i18n 目录。\n\nLinear: GFX-1232 --- ...-boundary.e2e.ts => admin-boundary.e2e.ts} | 0 .../e2e/tests/admin-menu-fixture.ts | 6 +- .../e2e/tests/crud-roundtrips.e2e.ts | 2 +- .../e2e/tests/landing-logout.e2e.ts | 2 +- .../eslint.config.mjs | 16 +- .../scripts/check-frontend-standards.mjs | 8 +- .../scripts/fix-collisions.mjs | 2 +- .../scripts/frontend-standards-allowlist.json | 18 +- .../scripts/i18n-text-baseline.json | 302 +++++++++--------- .../scripts/perm-buttons-2026-09-01.sql | 2 +- .../perm-rename-adcallback-2026-09-05.sql | 56 ++-- .../scripts/permission-keys-ignored.json | 2 +- .../scripts/permission-keys.txt | 12 +- .../src/components/rich-editor/index.vue | 4 +- .../src/i18n/pages/{tenant => }/appHome/en.ts | 0 .../src/i18n/pages/{tenant => }/appHome/ja.ts | 0 .../src/i18n/pages/{tenant => }/appHome/ko.ts | 0 .../i18n/pages/{tenant => }/appHome/zh-cn.ts | 0 .../i18n/pages/{tenant => }/appHome/zh-tw.ts | 0 .../src/i18n/pages/client/en.ts | 2 +- .../src/i18n/pages/client/ja.ts | 2 +- .../src/i18n/pages/client/ko.ts | 2 +- .../src/i18n/pages/client/zh-cn.ts | 2 +- .../src/i18n/pages/client/zh-tw.ts | 2 +- .../src/i18n/pages/errors/en.ts | 4 +- .../src/i18n/pages/errors/zh-cn.ts | 2 +- .../src/i18n/pages/gameBusiness/en.ts | 4 +- .../src/i18n/pages/gameBusiness/ja.ts | 4 +- .../src/i18n/pages/gameBusiness/ko.ts | 4 +- .../src/i18n/pages/gameBusiness/zh-cn.ts | 4 +- .../src/i18n/pages/gameBusiness/zh-tw.ts | 4 +- .../src/i18n/pages/{tenant => }/home/en.ts | 0 .../src/i18n/pages/{tenant => }/home/ja.ts | 0 .../src/i18n/pages/{tenant => }/home/ko.ts | 0 .../src/i18n/pages/{tenant => }/home/zh-cn.ts | 0 .../src/i18n/pages/{tenant => }/home/zh-tw.ts | 0 .../src/i18n/pages/menu/en.ts | 22 +- .../src/i18n/pages/menu/ja.ts | 22 +- .../src/i18n/pages/menu/ko.ts | 22 +- .../src/i18n/pages/menu/zh-cn.ts | 22 +- .../src/i18n/pages/menu/zh-tw.ts | 22 +- .../src/utils/fileUrl.ts | 2 +- .../component/EditDialog.vue | 0 .../index.vue | 4 +- .../component/AddDialog.vue | 0 .../component/RenewDialog.vue | 0 .../component/RevealDialog.vue | 0 .../component/RotateDialog.vue | 0 .../index.vue | 4 +- .../component/EditDialog.vue | 0 .../index.vue | 22 +- .../component/EditDialog.vue | 0 .../index.vue | 4 +- .../clientDelivery/device/device/index.vue | 20 +- .../clientDelivery/featureSwitch/index.vue | 4 +- .../component/DetailDialog.vue | 2 +- .../constants.ts | 2 +- .../index.vue | 4 +- .../component/EditDialog.vue | 4 +- .../clientDelivery/gameAppPackage/index.vue | 4 +- .../component/RotateDialog.vue | 0 .../index.vue | 4 +- .../gamePaymentConfigEntity/notifyUrl.test.ts | 4 +- .../release/appReleaseVersion/index.vue | 16 +- .../component/UpdateHistory.vue | 8 +- .../release/assetPackageVersion/index.vue | 30 +- .../release/versionDefinition/index.vue | 16 +- .../remoteConfig/contentKeyConfig/index.vue | 2 +- .../clientDelivery/remoteConfig/index.vue | 20 +- .../remoteConfig/modeConfig/index.vue | 2 +- .../resource/assetPackage/index.vue | 20 +- .../clientDelivery/serverConfig/index.vue | 20 +- .../component/AddDialog.vue | 0 .../component/RenewDialog.vue | 0 .../component/RevealDialog.vue | 0 .../component/RotateDialog.vue | 0 .../index.vue | 4 +- .../controlledOperation/commandForm.test.ts | 2 +- .../views/gmCenter/onlineDashboard/index.vue | 2 +- .../component/EditDialog.vue | 4 +- .../mail/mailCampaignEntity/constants.ts | 2 +- .../mail/mailCampaignEntity/index.vue | 4 +- .../playerCenter/penaltyEnforcement/index.vue | 4 +- .../gameAreaEntity/component/EditDialog.vue | 14 +- .../system/file/component/EditSysFile.vue | 6 +- .../src/views/system/file/index.vue | 12 +- .../system/globalChannelDefinition/index.vue | 2 +- .../component/EditDialog.vue | 6 +- .../index.vue | 8 +- .../openAccess/component/EditOpenAccess.vue | 10 +- .../views/system/role/component/EditRole.vue | 8 +- .../src/views/system/role/index.vue | 10 +- .../views/system/user/component/EditUser.vue | 12 +- .../system/user/component/UserCenter.vue | 20 +- .../src/views/system/user/index.vue | 14 +- 95 files changed, 470 insertions(+), 470 deletions(-) rename GameFrameX.Admin.Unified.Vue/e2e/tests/{tenant-boundary.e2e.ts => admin-boundary.e2e.ts} (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/appHome/en.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/appHome/ja.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/appHome/ko.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/appHome/zh-cn.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/appHome/zh-tw.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/home/en.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/home/ja.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/home/ko.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/home/zh-cn.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/i18n/pages/{tenant => }/home/zh-tw.ts (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantAdvertisementCallbackConfigEntity => advertisementCallbackConfigEntity}/component/EditDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantAdvertisementCallbackConfigEntity => advertisementCallbackConfigEntity}/index.vue (97%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantAppSignatureKeyEntity => appSignatureKeyEntity}/component/AddDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantAppSignatureKeyEntity => appSignatureKeyEntity}/component/RenewDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantAppSignatureKeyEntity => appSignatureKeyEntity}/component/RevealDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantAppSignatureKeyEntity => appSignatureKeyEntity}/component/RotateDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantAppSignatureKeyEntity => appSignatureKeyEntity}/index.vue (98%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantChannelDefinition => channelDefinition}/component/EditDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantChannelDefinition => channelDefinition}/index.vue (83%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantClientApiPolicyEntity => clientApiPolicyEntity}/component/EditDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantClientApiPolicyEntity => clientApiPolicyEntity}/index.vue (98%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantGameAdvertisementRewardEntity => gameAdvertisementRewardEntity}/component/DetailDialog.vue (98%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantGameAdvertisementRewardEntity => gameAdvertisementRewardEntity}/constants.ts (97%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantGameAdvertisementRewardEntity => gameAdvertisementRewardEntity}/index.vue (98%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantGameLoginTicketKeyEntity => gameLoginTicketKeyEntity}/component/RotateDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantGameLoginTicketKeyEntity => gameLoginTicketKeyEntity}/index.vue (97%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantSessionKeyEntity => sessionKeyEntity}/component/AddDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantSessionKeyEntity => sessionKeyEntity}/component/RenewDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantSessionKeyEntity => sessionKeyEntity}/component/RevealDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantSessionKeyEntity => sessionKeyEntity}/component/RotateDialog.vue (100%) rename GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/{tenantSessionKeyEntity => sessionKeyEntity}/index.vue (98%) rename GameFrameX.Admin.Unified.Vue/src/views/system/{tenantObjectStorageConfigEntity => objectStorageConfigEntity}/component/EditDialog.vue (98%) rename GameFrameX.Admin.Unified.Vue/src/views/system/{tenantObjectStorageConfigEntity => objectStorageConfigEntity}/index.vue (97%) diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/tenant-boundary.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-boundary.e2e.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/e2e/tests/tenant-boundary.e2e.ts rename to GameFrameX.Admin.Unified.Vue/e2e/tests/admin-boundary.e2e.ts diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-menu-fixture.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-menu-fixture.ts index 951f5193..03b64f99 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-menu-fixture.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-menu-fixture.ts @@ -37,7 +37,7 @@ export function isolatedAdminOrigin(): string { export async function grantAdminMenus(browser: Browser, adminPage: Page, adminToken: string): Promise { const origin = isolatedAdminOrigin(); - const rolesResponse = await adminPage.request.get(`${origin}/api/tenantRole/list`, { + const rolesResponse = await adminPage.request.get(`${origin}/api/role/list`, { headers: { Authorization: `Bearer ${adminToken}` }, }); expect(rolesResponse.ok()).toBe(true); @@ -68,7 +68,7 @@ export async function grantAdminMenus(browser: Browser, adminPage: Page, adminTo expect(typeof readField(node, 'superAdminOnly')).toBe('boolean'); const protectedBranch = protectedAncestor || readField(node, 'superAdminOnly') === true; // 既有只读选择器例外允许业务页取平台/语言;仍不授予任何超管目录或管理叶子。 - const sharedSelector = readField(node, 'allowTenantWhenSuperAdminOnly') === true; + const sharedSelector = readField(node, 'allowWhenSuperAdminOnly') === true; if (sharedSelector) { expect(readField(node, 'type'), '租户可读例外只能是辅助按钮').toBe(3); sharedSelectorKeys.push(String(readField(node, 'key'))); @@ -88,7 +88,7 @@ export async function grantAdminMenus(browser: Browser, adminPage: Page, adminTo 'route:commerceCenter', 'route:clientDelivery', 'route:audit', 'route:system', ].sort()); // 调服务清除权限缓存;不直接写 SQL,也不依赖菜单种子的自动授权。 - const grant = await bootstrapPage.request.post(`${origin}/api/tenantRole/grantMenu`, { + const grant = await bootstrapPage.request.post(`${origin}/api/role/grantMenu`, { headers, data: { id: roleId, menuIdList: [...new Set(menuIdentifiers)] }, }); expect(grant.ok()).toBe(true); diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/crud-roundtrips.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/crud-roundtrips.e2e.ts index 3f375f91..e7fd2bbc 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/crud-roundtrips.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/crud-roundtrips.e2e.ts @@ -65,7 +65,7 @@ const ENTITIES: EntitySpec[] = [ }, { name: '设备定义', - menuTitle: '设备', // tenantDevice 的 zh-cn 渲染标签(树 Title「设备定义」已漂移) + menuTitle: '设备', // device 的 zh-cn 渲染标签(树 Title「设备定义」已漂移) menuRoot: 'C 端交付', fields: ['text', 'text', 'text'], createApi: /gameAppDevice\/add/, diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/landing-logout.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/landing-logout.e2e.ts index 533d7b62..9e197e18 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/landing-logout.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/landing-logout.e2e.ts @@ -35,7 +35,7 @@ test('个人中心签名上传后真实加载', async ({ page }) => { await page.waitForURL(/#\/system\/userCenter/); const uploadResponse = page.waitForResponse( - (r) => /\/api\/tenantFile\/uploadSignature/.test(r.url()) && r.request().method() === 'POST', + (r) => /\/api\/file\/uploadSignature/.test(r.url()) && r.request().method() === 'POST', { timeout: 30_000 }, ); await page.locator('.sys-userCenter-container input[type="file"][accept=".png"]').setInputFiles('e2e/tests/fixtures/signature-source.png'); diff --git a/GameFrameX.Admin.Unified.Vue/eslint.config.mjs b/GameFrameX.Admin.Unified.Vue/eslint.config.mjs index d2369301..abd28501 100644 --- a/GameFrameX.Admin.Unified.Vue/eslint.config.mjs +++ b/GameFrameX.Admin.Unified.Vue/eslint.config.mjs @@ -98,13 +98,13 @@ const frozenMultiWordComponentFiles = [ 'src/views/clientDelivery/release/versionDefinition/index.vue', 'src/views/clientDelivery/resource/assetPackage/index.vue', 'src/views/clientDelivery/serverConfig/index.vue', - 'src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue', - 'src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue', - 'src/views/clientDelivery/tenantSessionKeyEntity/index.vue', - 'src/views/clientDelivery/tenantChannelDefinition/index.vue', - 'src/views/clientDelivery/tenantClientApiPolicyEntity/index.vue', - 'src/views/clientDelivery/tenantGameAdvertisementRewardEntity/index.vue', - 'src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue', + 'src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue', + 'src/views/clientDelivery/appSignatureKeyEntity/index.vue', + 'src/views/clientDelivery/sessionKeyEntity/index.vue', + 'src/views/clientDelivery/channelDefinition/index.vue', + 'src/views/clientDelivery/clientApiPolicyEntity/index.vue', + 'src/views/clientDelivery/gameAdvertisementRewardEntity/index.vue', + 'src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue', 'src/views/system/gameTimeJobEntity/index.vue', 'src/views/noticeCenter/announcement/gameAnnouncementEntity/index.vue', 'src/views/noticeCenter/announcement/gameBannerAnnouncementEntity/index.vue', @@ -149,7 +149,7 @@ const frozenMultiWordComponentFiles = [ 'src/views/system/openAccess/index.vue', 'src/views/system/role/index.vue', 'src/views/system/systemEmailProvider/index.vue', - 'src/views/system/tenantObjectStorageConfigEntity/index.vue', + 'src/views/system/objectStorageConfigEntity/index.vue', 'src/views/system/user/index.vue', 'src/views/playerCenter/antiCheatEventEntity/index.vue', 'src/views/playerCenter/gamePenaltyAppealEntity/index.vue', diff --git a/GameFrameX.Admin.Unified.Vue/scripts/check-frontend-standards.mjs b/GameFrameX.Admin.Unified.Vue/scripts/check-frontend-standards.mjs index b395a277..92ae0a9f 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/check-frontend-standards.mjs +++ b/GameFrameX.Admin.Unified.Vue/scripts/check-frontend-standards.mjs @@ -846,7 +846,7 @@ function selfTest() { assert(splitArgs('"a,b", null, Flag.A | Flag.B').length === 3, 'splitArgs should ignore commas inside strings') assert(changedSourceFiles().every((file) => file.startsWith(ROOT)), 'changed source files should be absolute paths') assert(isQueryOperationName('pageGameEntity'), 'page operation should be treated as a query') - assert(isGeneratedFilterGetCall('apiTenantOrgListGet', 'state.queryParams.name'), 'generated list GET with queryParams should be blocked') + assert(isGeneratedFilterGetCall('apiOrgListGet', 'state.queryParams.name'), 'generated list GET with queryParams should be blocked') assert(!isGeneratedFilterGetCall('apiSysEnumEnumDataListGet', '"GameLanguage"'), 'plain dictionary GET should not be blocked') const requestSample = "export const pageX = (params) => request({\n url: Api.Page,\n method: 'get',\n params,\n})" const requestIndex = requestSample.indexOf('request(') @@ -874,8 +874,8 @@ function selfTest() { assert(staticRouteScopeViolation('dashboard/home/index.vue', null) === null, 'flat dashboard needs no audience scope') assert(staticRouteScopeViolation('gmCenter/onlineDashboard/index.vue', 'app') !== null, 'flat directory rejects retired scope metadata') assert(staticRouteScopeViolation('app/appCenter/appWorkspace/index.vue', 'app') !== null, 'appScope=app with app/ first segment should pass') - assert(staticRouteScopeViolation('tenant/appCenter/appEntry/index.vue', 'app') !== null, 'appScope=app with tenant/ first segment should violate') - assert(staticRouteScopeViolation('tenant/appHome/AppHomeBoard.vue', 'tenant') !== null, 'appScope=tenant with tenant/ first segment should pass') + assert(staticRouteScopeViolation('appCenter/appEntry/index.vue', 'app') !== null, 'appScope=app with tenant/ first segment should violate') + assert(staticRouteScopeViolation('appHome/AppHomeBoard.vue', 'tenant') !== null, 'appScope=tenant with tenant/ first segment should pass') assert(staticRouteScopeViolation('platform/global/platformJwtConfig/index.vue', null) !== null, 'scopeless platform page should pass shared whitelist') assert(staticRouteScopeViolation('login/index.vue', null) === null, 'scopeless shared page should pass shared whitelist') assert(staticRouteScopeViolation('global/platform/index.vue', null) !== null, 'scopeless page outside shared whitelist should violate') @@ -1073,7 +1073,7 @@ function checkComponentNames() { return failures.length === 0 } -// 反向守护(2026-09-17,tenantAppSignatureKeyEntity 菜单缺失事故防回潮): +// 反向守护(2026-09-17,appSignatureKeyEntity 菜单缺失事故防回潮): // checkRoutes 只校验「种子 → 页面文件」方向;本检查补上「页面文件 → 种子/静态路由」方向—— // src/views 下每个目录式页面入口(index.vue)必须被某条菜单种子 Component 引用,或被 // src/router/*.ts 静态路由 import,否则该页面在任何租户的动态菜单里都不可达(孤儿页)。 diff --git a/GameFrameX.Admin.Unified.Vue/scripts/fix-collisions.mjs b/GameFrameX.Admin.Unified.Vue/scripts/fix-collisions.mjs index 25ed8ec2..21b5a0fb 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/fix-collisions.mjs +++ b/GameFrameX.Admin.Unified.Vue/scripts/fix-collisions.mjs @@ -40,7 +40,7 @@ for (const f of files) { // 2. upload PostForm → Post + {file: ...} const beforeUpload = c; - c = c.replace(/tenantFileUpload(\w+)PostForm\((.+)\)/g, (_m, name, args) => `tenantFileUpload${name}Post({file: ${args}})`); + c = c.replace(/fileUpload(\w+)PostForm\((.+)\)/g, (_m, name, args) => `fileUpload${name}Post({file: ${args}})`); if (c !== beforeUpload) uploadFixed++; if (c !== orig) writeFileSync(f, c); diff --git a/GameFrameX.Admin.Unified.Vue/scripts/frontend-standards-allowlist.json b/GameFrameX.Admin.Unified.Vue/scripts/frontend-standards-allowlist.json index 9035cedd..e24f36e6 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/frontend-standards-allowlist.json +++ b/GameFrameX.Admin.Unified.Vue/scripts/frontend-standards-allowlist.json @@ -17,7 +17,7 @@ "systemDictType:delete": "dict page buttons missing from backend GlobalMenuSeedData; backend seed follow-up required", "systemDictType:page": "dict page buttons missing from backend GlobalMenuSeedData; backend seed follow-up required", "systemDictType:update": "dict page buttons missing from backend GlobalMenuSeedData; backend seed follow-up required", - "systemTenantPackageEntity:page": "legacy frontend prefix differs from seeded tenant package key", + "systemPackageEntity:page": "legacy frontend prefix differs from seeded tenant package key", "onlineAssetLedgerQuery:page": "C349 Online ledger query: backend Api#229 seed not yet landed; admin-api-worker follow-up", "onlineAssetTransactionQuery:detail": "C349 Online transaction detail: backend Api#229 seed not yet landed; admin-api-worker follow-up", "onlineAssetAuditQuery:page": "C349 Online audit query: backend Api#229 seed not yet landed; admin-api-worker follow-up", @@ -91,12 +91,12 @@ "src/views/clientDelivery/remoteConfig/modeConfig/index.vue": "C296 convention exemption: directory-style index.vue component", "src/views/clientDelivery/resource/assetPackage/index.vue": "C296 convention exemption: directory-style index.vue component", "src/views/clientDelivery/serverConfig/index.vue": "C316 convention exemption: directory-style index.vue component", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue": "C296 convention exemption: directory-style index.vue component", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue": "C296 convention exemption: directory-style index.vue component", - "src/views/clientDelivery/tenantChannelDefinition/index.vue": "C296 convention exemption: directory-style index.vue component", - "src/views/clientDelivery/tenantClientApiPolicyEntity/index.vue": "C296 convention exemption: directory-style index.vue component (C378 merged from 4 legacy policy pages)", - "src/views/clientDelivery/tenantGameAdvertisementRewardEntity/index.vue": "C296 convention exemption: directory-style index.vue component", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue": "C296 convention exemption: directory-style index.vue component", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue": "C296 convention exemption: directory-style index.vue component", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue": "C296 convention exemption: directory-style index.vue component", + "src/views/clientDelivery/channelDefinition/index.vue": "C296 convention exemption: directory-style index.vue component", + "src/views/clientDelivery/clientApiPolicyEntity/index.vue": "C296 convention exemption: directory-style index.vue component (C378 merged from 4 legacy policy pages)", + "src/views/clientDelivery/gameAdvertisementRewardEntity/index.vue": "C296 convention exemption: directory-style index.vue component", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue": "C296 convention exemption: directory-style index.vue component", "src/views/system/gameTimeJobEntity/index.vue": "C296 convention exemption: directory-style index.vue component", "src/views/noticeCenter/announcement/gameAnnouncementEntity/index.vue": "C296 convention exemption: directory-style index.vue component", "src/views/noticeCenter/announcement/gameBannerAnnouncementEntity/index.vue": "C296 convention exemption: directory-style index.vue component", @@ -158,13 +158,13 @@ "src/views/gmCenter/controlledOperation/index.vue": "C344 convention exemption: directory-style index.vue component (C344 controlledOperation)", "src/views/gmCenter/messageAudit/index.vue": "C342 convention exemption: directory-style index.vue component (messageAudit)", "src/views/gmCenter/reportCase/index.vue": "C342 convention exemption: directory-style index.vue component (reportCase)", - "src/views/system/tenantObjectStorageConfigEntity/index.vue": "C296 convention exemption: directory-style index.vue component", + "src/views/system/objectStorageConfigEntity/index.vue": "C296 convention exemption: directory-style index.vue component", "src/views/gmCenter/matchQueueOverview/index.vue": "C341 convention exemption: directory-style index.vue component (restored by C365 from PR#181)", "src/views/gmCenter/matchFailureReason/index.vue": "C341 convention exemption: directory-style index.vue component (restored by C365 from PR#181)", "src/views/gmCenter/matchAbnormalTicket/index.vue": "C341 convention exemption: directory-style index.vue component (restored by C365 from PR#181)", "src/views/gmCenter/onlinePlayerSegment/index.vue": "C351 convention exemption: directory-style index.vue component (restored by C365 from PR#182)", "src/views/gmCenter/onlineConfigRollout/index.vue": "C351 convention exemption: directory-style index.vue component (restored by C365 from PR#182)", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue": "directory-style index.vue page component (client-api security IA consolidation, 2026-09-17)", + "src/views/clientDelivery/sessionKeyEntity/index.vue": "directory-style index.vue page component (client-api security IA consolidation, 2026-09-17)", "src/components/OnlineCursorList/index.vue": "C349 convention exemption: directory-style index.vue component (OnlineCursorList relocated from views/gmCenter/components 2026-09-17, shared by 8 online pages)" }, "orphanPages": {} diff --git a/GameFrameX.Admin.Unified.Vue/scripts/i18n-text-baseline.json b/GameFrameX.Admin.Unified.Vue/scripts/i18n-text-baseline.json index 46d298cc..f1e5b88a 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/i18n-text-baseline.json +++ b/GameFrameX.Admin.Unified.Vue/scripts/i18n-text-baseline.json @@ -25,157 +25,157 @@ "src/views/clientDelivery/gamePaymentConfigEntity/index.vue:'编辑支付配置'", "src/views/clientDelivery/gamePaymentConfigEntity/index.vue:'配置'", "src/views/clientDelivery/gamePaymentConfigEntity/index.vue:`确定要删除支付配置:【${name}】?`", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:\"备注\"", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:\"服务端回调验签配置\"", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:\"请选择 Provider\"", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:'请选择 Provider'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:>Provider 字段<", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:>{{ schema.label }} 参数配置<", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:>启用<", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:>正在加载字段定义...<", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:`${field.label}不能为空`", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue:`广告回调配置 JSON 解析失败:${error.message}`", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:\"启用\"", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:\"禁用\"", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'创建时间'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'启用'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'回调 URL'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'备注'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'已配置'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'新增广告回调配置'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'未配置'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'状态'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'禁用'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'签名密钥'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'编辑广告回调配置'", - "src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue:'验证材料'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:\"取消\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:\"备注(可选)\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:\"密钥归属的应用(密钥域)\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:\"新增签名密钥\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:\"留空表示永不过期\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:\"留空表示立即生效\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:\"确认新增\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:>备注<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:>密钥明文由服务端随机生成,提交后在弹窗中一次性展示;同一应用可并存多把密钥(多版本客户端各持一把)。<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:>应用 ID<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:>生效时间<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/AddDialog.vue:>过期时间<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RenewDialog.vue:\"取消\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RenewDialog.vue:\"留空表示改为永不过期\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RenewDialog.vue:\"确认续租\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RenewDialog.vue:\"续租签名密钥\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RenewDialog.vue:>新的到期时间<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RenewDialog.vue:>续租只更新到期时间,不产生新密钥。典型用途:轮换后客户端切换进度不及预期,延长旧密钥双活窗口。<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RevealDialog.vue:\"密钥一次性回显\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RevealDialog.vue:\"我已保存\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RevealDialog.vue:'复制失败,请手动选中文本复制后再关闭'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RevealDialog.vue:'已复制'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RevealDialog.vue:>密钥明文(HMAC Secret)<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RotateDialog.vue:\"取消\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RotateDialog.vue:\"留空表示不改动旧密钥租约\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RotateDialog.vue:\"确认轮换\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RotateDialog.vue:\"轮换签名密钥\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RotateDialog.vue:>应用 ID<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RotateDialog.vue:>旧密钥到期时间(双活窗口收口)<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/component/RotateDialog.vue:>轮换 = 新插一把立即生效的密钥,旧密钥不禁用不删除:新旧双活期间两边签名均通过,客户端全量切换后再让旧密钥到期退场。<", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:\"启用\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:\"永不过期\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:\"禁用\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:\"立即生效\"", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'创建时间'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'启用'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'密钥'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'已启用'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'已禁用'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'应用ID'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'按应用 ID 筛选'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'提示'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'新增'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'状态'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'生效时间'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'禁用'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'禁用后使用该 Key 签名的请求将立即被拒签(60103),同应用其他 Key 不受影响。确认禁用?'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'续租'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'被轮换时间'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'轮换'", - "src/views/clientDelivery/tenantAppSignatureKeyEntity/index.vue:'过期时间'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/component/RotateDialog.vue:\"取消\"", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/component/RotateDialog.vue:\"留空表示永不过期\"", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/component/RotateDialog.vue:\"确认轮换\"", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/component/RotateDialog.vue:\"轮换签名密钥\"", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/component/RotateDialog.vue:>新密钥到期时间<", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/component/RotateDialog.vue:>留空表示永不过期;有值则新密钥在该时刻失效,旧密钥到期后自然退场。<", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:\"启用\"", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:\"永不过期\"", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:\"禁用\"", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'公钥 (PEM)'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'创建时间'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'启用'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'已启用'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'已禁用'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'应用ID'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'提示'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'状态'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'生效时间'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'确认为该应用轮换签名密钥?新密钥立即生效,若指定到期日则旧密钥到期后自然退场。'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'禁用'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'禁用后该密钥无法用于签发与验签,确认禁用?'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'签名密钥已轮换'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'算法'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'轮换'", - "src/views/clientDelivery/tenantGameLoginTicketKeyEntity/index.vue:'过期时间'", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:\"取消\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:\"备注(可选)\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:\"密钥归属的应用(密钥域)\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:\"新增会话密钥\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:\"留空表示永不过期\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:\"留空表示立即生效\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:\"确认新增\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:>备注<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:>密钥明文由服务端随机生成,提交后在弹窗中一次性展示;同一应用可并存多把密钥(多版本客户端各持一把)。<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:>应用 ID<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:>生效时间<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/AddDialog.vue:>过期时间<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RenewDialog.vue:\"取消\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RenewDialog.vue:\"留空表示改为永不过期\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RenewDialog.vue:\"确认续租\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RenewDialog.vue:\"续租会话密钥\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RenewDialog.vue:>新的到期时间<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RenewDialog.vue:>续租只更新到期时间,不产生新密钥。典型用途:轮换后客户端切换进度不及预期,延长旧密钥双活窗口。<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RevealDialog.vue:\"密钥一次性回显\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RevealDialog.vue:\"我已保存\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RevealDialog.vue:'复制失败,请手动选中文本复制后再关闭'", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RevealDialog.vue:'已复制'", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RevealDialog.vue:>密钥明文(AES Secret)<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RotateDialog.vue:\"取消\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RotateDialog.vue:\"留空表示不改动旧密钥租约\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RotateDialog.vue:\"确认轮换\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RotateDialog.vue:\"轮换会话密钥\"", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RotateDialog.vue:>应用 ID<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RotateDialog.vue:>旧密钥到期时间(双活窗口收口)<", - "src/views/clientDelivery/tenantSessionKeyEntity/component/RotateDialog.vue:>轮换 = 新插一把立即生效的密钥,旧密钥不禁用不删除:新旧双活期间两边信封均可解密,客户端全量切换后再让旧密钥到期退场。<", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:\"启用\"", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:\"永不过期\"", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:\"禁用\"", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:\"立即生效\"", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'创建时间'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'启用'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'密钥'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'已启用'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'已禁用'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'应用ID'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'按应用 ID 筛选'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'提示'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'新增'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'状态'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'生效时间'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'禁用'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'禁用后使用该 Key 的加密信封将立即拒解(60105),同应用其他 Key 不受影响。确认禁用?'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'续租'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'被轮换时间'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'轮换'", - "src/views/clientDelivery/tenantSessionKeyEntity/index.vue:'过期时间'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:\"备注\"", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:\"服务端回调验签配置\"", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:\"请选择 Provider\"", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:'请选择 Provider'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:>Provider 字段<", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:>{{ schema.label }} 参数配置<", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:>启用<", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:>正在加载字段定义...<", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:`${field.label}不能为空`", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:`广告回调配置 JSON 解析失败:${error.message}`", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:\"启用\"", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:\"禁用\"", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'创建时间'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'启用'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'回调 URL'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'备注'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'已配置'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'新增广告回调配置'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'未配置'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'状态'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'禁用'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'签名密钥'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'编辑广告回调配置'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue:'验证材料'", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:\"取消\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:\"备注(可选)\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:\"密钥归属的应用(密钥域)\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:\"新增签名密钥\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:\"留空表示永不过期\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:\"留空表示立即生效\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:\"确认新增\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:>备注<", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:>密钥明文由服务端随机生成,提交后在弹窗中一次性展示;同一应用可并存多把密钥(多版本客户端各持一把)。<", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:>应用 ID<", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:>生效时间<", + "src/views/clientDelivery/appSignatureKeyEntity/component/AddDialog.vue:>过期时间<", + "src/views/clientDelivery/appSignatureKeyEntity/component/RenewDialog.vue:\"取消\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RenewDialog.vue:\"留空表示改为永不过期\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RenewDialog.vue:\"确认续租\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RenewDialog.vue:\"续租签名密钥\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RenewDialog.vue:>新的到期时间<", + "src/views/clientDelivery/appSignatureKeyEntity/component/RenewDialog.vue:>续租只更新到期时间,不产生新密钥。典型用途:轮换后客户端切换进度不及预期,延长旧密钥双活窗口。<", + "src/views/clientDelivery/appSignatureKeyEntity/component/RevealDialog.vue:\"密钥一次性回显\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RevealDialog.vue:\"我已保存\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RevealDialog.vue:'复制失败,请手动选中文本复制后再关闭'", + "src/views/clientDelivery/appSignatureKeyEntity/component/RevealDialog.vue:'已复制'", + "src/views/clientDelivery/appSignatureKeyEntity/component/RevealDialog.vue:>密钥明文(HMAC Secret)<", + "src/views/clientDelivery/appSignatureKeyEntity/component/RotateDialog.vue:\"取消\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RotateDialog.vue:\"留空表示不改动旧密钥租约\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RotateDialog.vue:\"确认轮换\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RotateDialog.vue:\"轮换签名密钥\"", + "src/views/clientDelivery/appSignatureKeyEntity/component/RotateDialog.vue:>应用 ID<", + "src/views/clientDelivery/appSignatureKeyEntity/component/RotateDialog.vue:>旧密钥到期时间(双活窗口收口)<", + "src/views/clientDelivery/appSignatureKeyEntity/component/RotateDialog.vue:>轮换 = 新插一把立即生效的密钥,旧密钥不禁用不删除:新旧双活期间两边签名均通过,客户端全量切换后再让旧密钥到期退场。<", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:\"启用\"", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:\"永不过期\"", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:\"禁用\"", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:\"立即生效\"", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'创建时间'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'启用'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'密钥'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'已启用'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'已禁用'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'应用ID'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'按应用 ID 筛选'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'提示'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'新增'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'状态'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'生效时间'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'禁用'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'禁用后使用该 Key 签名的请求将立即被拒签(60103),同应用其他 Key 不受影响。确认禁用?'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'续租'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'被轮换时间'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'轮换'", + "src/views/clientDelivery/appSignatureKeyEntity/index.vue:'过期时间'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/component/RotateDialog.vue:\"取消\"", + "src/views/clientDelivery/gameLoginTicketKeyEntity/component/RotateDialog.vue:\"留空表示永不过期\"", + "src/views/clientDelivery/gameLoginTicketKeyEntity/component/RotateDialog.vue:\"确认轮换\"", + "src/views/clientDelivery/gameLoginTicketKeyEntity/component/RotateDialog.vue:\"轮换签名密钥\"", + "src/views/clientDelivery/gameLoginTicketKeyEntity/component/RotateDialog.vue:>新密钥到期时间<", + "src/views/clientDelivery/gameLoginTicketKeyEntity/component/RotateDialog.vue:>留空表示永不过期;有值则新密钥在该时刻失效,旧密钥到期后自然退场。<", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:\"启用\"", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:\"永不过期\"", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:\"禁用\"", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'公钥 (PEM)'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'创建时间'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'启用'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'已启用'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'已禁用'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'应用ID'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'提示'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'状态'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'生效时间'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'确认为该应用轮换签名密钥?新密钥立即生效,若指定到期日则旧密钥到期后自然退场。'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'禁用'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'禁用后该密钥无法用于签发与验签,确认禁用?'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'签名密钥已轮换'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'算法'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'轮换'", + "src/views/clientDelivery/gameLoginTicketKeyEntity/index.vue:'过期时间'", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:\"取消\"", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:\"备注(可选)\"", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:\"密钥归属的应用(密钥域)\"", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:\"新增会话密钥\"", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:\"留空表示永不过期\"", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:\"留空表示立即生效\"", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:\"确认新增\"", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:>备注<", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:>密钥明文由服务端随机生成,提交后在弹窗中一次性展示;同一应用可并存多把密钥(多版本客户端各持一把)。<", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:>应用 ID<", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:>生效时间<", + "src/views/clientDelivery/sessionKeyEntity/component/AddDialog.vue:>过期时间<", + "src/views/clientDelivery/sessionKeyEntity/component/RenewDialog.vue:\"取消\"", + "src/views/clientDelivery/sessionKeyEntity/component/RenewDialog.vue:\"留空表示改为永不过期\"", + "src/views/clientDelivery/sessionKeyEntity/component/RenewDialog.vue:\"确认续租\"", + "src/views/clientDelivery/sessionKeyEntity/component/RenewDialog.vue:\"续租会话密钥\"", + "src/views/clientDelivery/sessionKeyEntity/component/RenewDialog.vue:>新的到期时间<", + "src/views/clientDelivery/sessionKeyEntity/component/RenewDialog.vue:>续租只更新到期时间,不产生新密钥。典型用途:轮换后客户端切换进度不及预期,延长旧密钥双活窗口。<", + "src/views/clientDelivery/sessionKeyEntity/component/RevealDialog.vue:\"密钥一次性回显\"", + "src/views/clientDelivery/sessionKeyEntity/component/RevealDialog.vue:\"我已保存\"", + "src/views/clientDelivery/sessionKeyEntity/component/RevealDialog.vue:'复制失败,请手动选中文本复制后再关闭'", + "src/views/clientDelivery/sessionKeyEntity/component/RevealDialog.vue:'已复制'", + "src/views/clientDelivery/sessionKeyEntity/component/RevealDialog.vue:>密钥明文(AES Secret)<", + "src/views/clientDelivery/sessionKeyEntity/component/RotateDialog.vue:\"取消\"", + "src/views/clientDelivery/sessionKeyEntity/component/RotateDialog.vue:\"留空表示不改动旧密钥租约\"", + "src/views/clientDelivery/sessionKeyEntity/component/RotateDialog.vue:\"确认轮换\"", + "src/views/clientDelivery/sessionKeyEntity/component/RotateDialog.vue:\"轮换会话密钥\"", + "src/views/clientDelivery/sessionKeyEntity/component/RotateDialog.vue:>应用 ID<", + "src/views/clientDelivery/sessionKeyEntity/component/RotateDialog.vue:>旧密钥到期时间(双活窗口收口)<", + "src/views/clientDelivery/sessionKeyEntity/component/RotateDialog.vue:>轮换 = 新插一把立即生效的密钥,旧密钥不禁用不删除:新旧双活期间两边信封均可解密,客户端全量切换后再让旧密钥到期退场。<", + "src/views/clientDelivery/sessionKeyEntity/index.vue:\"启用\"", + "src/views/clientDelivery/sessionKeyEntity/index.vue:\"永不过期\"", + "src/views/clientDelivery/sessionKeyEntity/index.vue:\"禁用\"", + "src/views/clientDelivery/sessionKeyEntity/index.vue:\"立即生效\"", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'创建时间'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'启用'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'密钥'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'已启用'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'已禁用'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'应用ID'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'按应用 ID 筛选'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'提示'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'新增'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'状态'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'生效时间'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'禁用'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'禁用后使用该 Key 的加密信封将立即拒解(60105),同应用其他 Key 不受影响。确认禁用?'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'续租'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'被轮换时间'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'轮换'", + "src/views/clientDelivery/sessionKeyEntity/index.vue:'过期时间'", "src/views/login/index.vue:'日本語'", "src/views/login/index.vue:'简体中文'", "src/views/login/index.vue:'繁體中文'", diff --git a/GameFrameX.Admin.Unified.Vue/scripts/perm-buttons-2026-09-01.sql b/GameFrameX.Admin.Unified.Vue/scripts/perm-buttons-2026-09-01.sql index b25f7464..a99a2f0d 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/perm-buttons-2026-09-01.sql +++ b/GameFrameX.Admin.Unified.Vue/scripts/perm-buttons-2026-09-01.sql @@ -6,7 +6,7 @@ INSERT INTO global_menu_entity (id, pid, type, key, permission, title, is_iframe, is_hide, is_keep_alive, is_affix, - order_no, super_admin_only, sync_roles, allow_tenant_when_super_admin_only, app_scope, + order_no, super_admin_only, sync_roles, allow_admin_when_super_admin_only, app_scope, tenant_id, created_time, is_deleted, is_enabled, row_version) VALUES (6237617357109286359, 4272713015995144348, 3, 'systemDatabase:updatetable', 'systemDatabase:updatetable', '编辑表', false, false, true, false, 100, true, 0, false, 0, 0, extract(epoch from now())::bigint, false, true, 0), diff --git a/GameFrameX.Admin.Unified.Vue/scripts/perm-rename-adcallback-2026-09-05.sql b/GameFrameX.Admin.Unified.Vue/scripts/perm-rename-adcallback-2026-09-05.sql index f574ae54..f3c394ee 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/perm-rename-adcallback-2026-09-05.sql +++ b/GameFrameX.Admin.Unified.Vue/scripts/perm-rename-adcallback-2026-09-05.sql @@ -1,9 +1,9 @@ --- 2026-09-05 tenantAdCallbackConfigEntity → tenantAdvertisementCallbackConfigEntity 全名化迁移 +-- 2026-09-05 adCallbackConfigEntity → advertisementCallbackConfigEntity 全名化迁移 -- 背景:C302/C309 简写归零政策;后端控制器/端点已是长名(短名端点 is_orphan=t),DB 按钮 Key 仍为短名, -- 前端 authPrefix 长名导致按钮全隐藏。本迁移把 DB 侧 Key/Id/path/component 统一为长名。 -- Id 均按种子约定重算:StableSeedId.Menu(Key)、StableSeedId.RoleMenu(roleCode, menuKey) = SHA256(scope+":"+key) 前 8 字节小端取正。 -- 执行后需重启 Admin 后端(KeyUserMenu/KeyUserButton/端点权限映射缓存不随直插失效)。 --- 适用库:主库(gameframex_admin)+ 全部租户库(gameframex_admin_tenant_*)。 +-- 适用库:主库(gameframex_admin)+ 全部租户库(gameframex_admin_*)。 -- ============ 主库部分 ============ BEGIN; @@ -20,37 +20,37 @@ UPDATE global_menu_endpoint_entity SET menu_id=4250504171958338993 WHERE menu_id -- 2. 删除短名死端点(is_orphan=t)的绑定 DELETE FROM global_menu_endpoint_entity -WHERE endpoint_id IN (SELECT id FROM global_api_endpoint_entity WHERE route_path LIKE 'api/tenantadcallbackconfigentity/%'); +WHERE endpoint_id IN (SELECT id FROM global_api_endpoint_entity WHERE route_path LIKE 'api/adcallbackconfigentity/%'); -- 3. 页面菜单行(Id/Key/path/component 长名化) UPDATE global_menu_entity SET id=6860242852540439506, - key='route:tenantAdvertisementCallbackConfigEntity', - path='/appCenter/tenantAdvertisementCallbackConfigEntity', - component='/appCenter/tenantAdvertisementCallbackConfigEntity/index' + key='route:advertisementCallbackConfigEntity', + path='/appCenter/advertisementCallbackConfigEntity', + component='/appCenter/advertisementCallbackConfigEntity/index' WHERE id=5110847056985098658; -- 4. 七个按钮行(Id/Key/permission 长名化,pid 指向新页面 Id) -UPDATE global_menu_entity SET id=6940948928971539290, key='tenantAdvertisementCallbackConfigEntity:add', permission='tenantAdvertisementCallbackConfigEntity:add', pid=6860242852540439506 WHERE id=3352876220291316396; -UPDATE global_menu_entity SET id=5792012472829487979, key='tenantAdvertisementCallbackConfigEntity:delete', permission='tenantAdvertisementCallbackConfigEntity:delete', pid=6860242852540439506 WHERE id=7073279304846390967; -UPDATE global_menu_entity SET id=716803222343382802, key='tenantAdvertisementCallbackConfigEntity:detail', permission='tenantAdvertisementCallbackConfigEntity:detail', pid=6860242852540439506 WHERE id=5547964472362383467; -UPDATE global_menu_entity SET id=8324335229950723480, key='tenantAdvertisementCallbackConfigEntity:page', permission='tenantAdvertisementCallbackConfigEntity:page', pid=6860242852540439506 WHERE id=1612748001776889309; -UPDATE global_menu_entity SET id=2572327799805046998, key='tenantAdvertisementCallbackConfigEntity:providers',permission='tenantAdvertisementCallbackConfigEntity:providers',pid=6860242852540439506 WHERE id=4456159242109866994; -UPDATE global_menu_entity SET id=8968603540301201000, key='tenantAdvertisementCallbackConfigEntity:schema', permission='tenantAdvertisementCallbackConfigEntity:schema', pid=6860242852540439506 WHERE id=580973458478905738; -UPDATE global_menu_entity SET id=4250504171958338993, key='tenantAdvertisementCallbackConfigEntity:update', permission='tenantAdvertisementCallbackConfigEntity:update', pid=6860242852540439506 WHERE id=3089105995661482754; +UPDATE global_menu_entity SET id=6940948928971539290, key='advertisementCallbackConfigEntity:add', permission='advertisementCallbackConfigEntity:add', pid=6860242852540439506 WHERE id=3352876220291316396; +UPDATE global_menu_entity SET id=5792012472829487979, key='advertisementCallbackConfigEntity:delete', permission='advertisementCallbackConfigEntity:delete', pid=6860242852540439506 WHERE id=7073279304846390967; +UPDATE global_menu_entity SET id=716803222343382802, key='advertisementCallbackConfigEntity:detail', permission='advertisementCallbackConfigEntity:detail', pid=6860242852540439506 WHERE id=5547964472362383467; +UPDATE global_menu_entity SET id=8324335229950723480, key='advertisementCallbackConfigEntity:page', permission='advertisementCallbackConfigEntity:page', pid=6860242852540439506 WHERE id=1612748001776889309; +UPDATE global_menu_entity SET id=2572327799805046998, key='advertisementCallbackConfigEntity:providers',permission='advertisementCallbackConfigEntity:providers',pid=6860242852540439506 WHERE id=4456159242109866994; +UPDATE global_menu_entity SET id=8968603540301201000, key='advertisementCallbackConfigEntity:schema', permission='advertisementCallbackConfigEntity:schema', pid=6860242852540439506 WHERE id=580973458478905738; +UPDATE global_menu_entity SET id=4250504171958338993, key='advertisementCallbackConfigEntity:update', permission='advertisementCallbackConfigEntity:update', pid=6860242852540439506 WHERE id=3089105995661482754; COMMIT; --- ============ 租户库部分(每个 gameframex_admin_tenant_* 库各执行一次)============ +-- ============ 租户库部分(每个 gameframex_admin_* 库各执行一次)============ -- 授权行 menu_id 迁移 + 主键 id 按新 menuKey 与角色 code 重算(保持种子同构,防幂等收敛漂移) WITH map(old_id, new_id, new_key) AS (VALUES - (5110847056985098658::bigint, 6860242852540439506::bigint, 'route:tenantAdvertisementCallbackConfigEntity'), - (3352876220291316396::bigint, 6940948928971539290::bigint, 'tenantAdvertisementCallbackConfigEntity:add'), - (7073279304846390967::bigint, 5792012472829487979::bigint, 'tenantAdvertisementCallbackConfigEntity:delete'), - (5547964472362383467::bigint, 716803222343382802::bigint, 'tenantAdvertisementCallbackConfigEntity:detail'), - (1612748001776889309::bigint, 8324335229950723480::bigint, 'tenantAdvertisementCallbackConfigEntity:page'), - (4456159242109866994::bigint, 2572327799805046998::bigint, 'tenantAdvertisementCallbackConfigEntity:providers'), - (580973458478905738::bigint, 8968603540301201000::bigint, 'tenantAdvertisementCallbackConfigEntity:schema'), - (3089105995661482754::bigint, 4250504171958338993::bigint, 'tenantAdvertisementCallbackConfigEntity:update') + (5110847056985098658::bigint, 6860242852540439506::bigint, 'route:advertisementCallbackConfigEntity'), + (3352876220291316396::bigint, 6940948928971539290::bigint, 'advertisementCallbackConfigEntity:add'), + (7073279304846390967::bigint, 5792012472829487979::bigint, 'advertisementCallbackConfigEntity:delete'), + (5547964472362383467::bigint, 716803222343382802::bigint, 'advertisementCallbackConfigEntity:detail'), + (1612748001776889309::bigint, 8324335229950723480::bigint, 'advertisementCallbackConfigEntity:page'), + (4456159242109866994::bigint, 2572327799805046998::bigint, 'advertisementCallbackConfigEntity:providers'), + (580973458478905738::bigint, 8968603540301201000::bigint, 'advertisementCallbackConfigEntity:schema'), + (3089105995661482754::bigint, 4250504171958338993::bigint, 'advertisementCallbackConfigEntity:update') ), calc AS ( SELECT t.id AS old_pk, map.new_id, @@ -58,19 +58,19 @@ calc AS ( ||substr(hx.x,7,2)||substr(hx.x,5,2)||substr(hx.x,3,2)||substr(hx.x,1,2) FROM (SELECT substr(encode(sha256(convert_to('role-menu:' || r.code || '|' || map.new_key, 'utf8')),'hex'),1,16) AS x) hx ))::bit(64)::bigint & 9223372036854775807 AS new_pk - FROM tenant_role_menu_entity t + FROM role_menu_entity t JOIN map ON map.old_id = t.menu_id - JOIN tenant_role_entity r ON r.id = t.role_id + JOIN role_entity r ON r.id = t.role_id ) -UPDATE tenant_role_menu_entity SET id = calc.new_pk, menu_id = calc.new_id -FROM calc WHERE tenant_role_menu_entity.id = calc.old_pk; +UPDATE role_menu_entity SET id = calc.new_pk, menu_id = calc.new_id +FROM calc WHERE role_menu_entity.id = calc.old_pk; -- ============ 配套代码改动(与 SQL 同批生效,新环境由种子自动建长名,无需本 SQL)============ -- 后端仓: -- GameFrameX.Application/SeedData/System/GlobalMenuSeedData.AppCenter.cs 种子 Key/Path/Component/TitleCode 长名化(Id 自动随 StableSeedId.Menu 派生) --- GameFrameX.Core.Tests/System/TenantAdminMenuDefaultsTests.cs 守护期望清单长名化 +-- GameFrameX.Core.Tests/System/AdminMenuDefaultsTests.cs 守护期望清单长名化 -- GameFrameX.Core.Tests/System/GlobalMenuSeedDataStageTwoPathMigrationTests.cs 同上 -- 前端仓: --- views/appCenter/tenantAdCallbackConfigEntity/ → tenantAdvertisementCallbackConfigEntity/(git mv) +-- views/appCenter/adCallbackConfigEntity/ → advertisementCallbackConfigEntity/(git mv) -- index.vue authPrefix、i18n/pages/menu/*.ts(5 语言)menu key 同步长名化 -- 验证:Core.Tests 1323 passed / check-permission-keys / check-i18n-keys 全绿 diff --git a/GameFrameX.Admin.Unified.Vue/scripts/permission-keys-ignored.json b/GameFrameX.Admin.Unified.Vue/scripts/permission-keys-ignored.json index 536c5c66..72d6bf01 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/permission-keys-ignored.json +++ b/GameFrameX.Admin.Unified.Vue/scripts/permission-keys-ignored.json @@ -5,7 +5,7 @@ "utils/authFunction.ts": [ "x:update" ], - "views/clientDelivery/tenantGameAdvertisementRewardEntity/index.vue": [ + "views/clientDelivery/gameAdvertisementRewardEntity/index.vue": [ "gameAdvertisementReward:export" ], "views/system/platformLoggingConfig/index.vue": [ diff --git a/GameFrameX.Admin.Unified.Vue/scripts/permission-keys.txt b/GameFrameX.Admin.Unified.Vue/scripts/permission-keys.txt index 30c757ef..ec3c8aa0 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/permission-keys.txt +++ b/GameFrameX.Admin.Unified.Vue/scripts/permission-keys.txt @@ -384,9 +384,9 @@ systemUser:page systemUser:resetPwd systemUser:setStatus systemUser:update -tenantDevice:add -tenantDevice:delete -tenantDevice:detail -tenantDevice:page -tenantDevice:select -tenantDevice:update +device:add +device:delete +device:detail +device:page +device:select +device:update diff --git a/GameFrameX.Admin.Unified.Vue/src/components/rich-editor/index.vue b/GameFrameX.Admin.Unified.Vue/src/components/rich-editor/index.vue index c12f6feb..497bdf5e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/components/rich-editor/index.vue +++ b/GameFrameX.Admin.Unified.Vue/src/components/rich-editor/index.vue @@ -21,7 +21,7 @@ import {IDomEditor} from '@wangeditor/editor'; import {Toolbar, Editor} from '@wangeditor/editor-for-vue'; import NarrowScreenHint from '../narrow-screen-hint/index.vue'; import {showError} from '../../utils/message'; -import {tenantFileUploadFilePost} from '../../api/tenantFile'; +import {fileUploadFilePost} from '../../api/file'; const props = defineProps({ @@ -65,7 +65,7 @@ const state = reactive({ customUpload(file, insertFn) { const uploadFun = async () => { try { - const rps = await tenantFileUploadFilePost({file: file}); + const rps = await fileUploadFilePost({file: file}); if (rps.data.code === 0 && rps.data.data != null) { insertFn(rps.data.data.url, rps.data.data.name, rps.data.data.url); } else { diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/en.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/en.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/en.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/ja.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ja.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/ja.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/ko.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ko.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/ko.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/zh-cn.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-cn.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/zh-cn.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/zh-tw.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/zh-tw.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/zh-tw.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts index 815a84ad..4c855247 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/en.ts @@ -4,7 +4,7 @@ export default { channelCode: 'Channel Code', channelScope: 'Channel Scope', channelScopeSystem: 'System', - channelScopeTenant: 'Custom', + channelScope: 'Custom', channelType: 'Channel Type', channelTypeOfficial: 'Official', channelTypeStore: 'Store', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts index 14e321a0..fca960d9 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ja.ts @@ -4,7 +4,7 @@ export default { channelCode: 'チャネルコード', channelScope: 'チャネル範囲', channelScopeSystem: 'システム', - channelScopeTenant: 'カスタム', + channelScope: 'カスタム', channelType: 'チャネルタイプ', channelTypeOfficial: '公式', channelTypeStore: 'ストア', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts index 1aaa8d6d..5f1a7ca9 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/ko.ts @@ -4,7 +4,7 @@ export default { channelCode: '채널 코드', channelScope: '채널 범위', channelScopeSystem: '시스템', - channelScopeTenant: '사용자 지정', + channelScope: '사용자 지정', channelType: '채널 유형', channelTypeOfficial: '공식', channelTypeStore: '스토어', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts index 804438c3..360d3297 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-cn.ts @@ -4,7 +4,7 @@ export default { channelCode: '渠道编码', channelScope: '渠道范围', channelScopeSystem: '系统', - channelScopeTenant: '自定义', + channelScope: '自定义', channelType: '渠道类型', channelTypeOfficial: '官方', channelTypeStore: '商店', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts index c39c375c..c6c67975 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/client/zh-tw.ts @@ -4,7 +4,7 @@ export default { channelCode: '渠道編碼', channelScope: '渠道範圍', channelScopeSystem: '系統', - channelScopeTenant: '自訂', + channelScope: '自訂', channelType: '渠道類型', channelTypeOfficial: '官方', channelTypeStore: '商店', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts index 0a6527a0..9c203dad 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts @@ -45,10 +45,10 @@ export default { '30600003': 'A tenant administrator with the same name already exists', '30600004': 'The default tenant status cannot be changed', '30600005': 'Creating this type of database is forbidden', - '30600006': 'Tenant is disabled', + '30600006': 'Business is disabled', '30600007': 'ID isolation is forbidden for normal tenants', '30600008': 'The tenant database has already been created', - '30600009': 'Tenant has expired', + '30600009': 'Business has expired', '30700001': 'Parent organization does not exist', '30700002': 'Organization ID cannot equal its parent ID', '30700003': 'An organization with the same code or name already exists', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-cn.ts index 7b304d5a..17271853 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-cn.ts @@ -42,7 +42,7 @@ export default { '30500002': '禁止删除系统参数', '30600001': '禁止删除默认租户', '30600002': '已存在同名的租户', - '30600003': '已存在同名的租户管理员', + '30600003': '已存在同名的管理员角色', '30600004': '默认租户状态禁止修改', '30600005': '禁止创建此类型的数据库', '30600006': '租户已禁用', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts index 8dae8486..9a734c9d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/en.ts @@ -55,7 +55,7 @@ export default { pleaseSelectEndTime: 'Please select end time', pleaseSelectOrderStatus: 'Please select order status', pleaseEnterGameVersion: 'Please enter game version', - pleaseSelectTenantGameAppVersionDefinition: 'Please select client version', + pleaseSelectGameAppVersionDefinition: 'Please select client version', pleaseEnterAttachmentList: 'Please enter attachment list', pleaseSelectMailExpiry: 'Please select mail expiry date', pleaseEnterTitleTemplate: 'Please enter title template', @@ -123,7 +123,7 @@ export default { pleaseSelectPlatform: 'Please select platform', package: 'Package (optional)', pleaseSelectPackage: 'Please select package (optional)', - tenantGameAppVersionDefinition: 'Client Version', + gameAppVersionDefinition: 'Client Version', allowedPlayerProfile: 'Allowed Player Profile', pleaseEnterAllowedPlayerProfile: 'Please enter allowed player profile', serverEvents: 'Server Events', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts index 032536e7..db392b1e 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ja.ts @@ -55,7 +55,7 @@ export default { pleaseSelectEndTime: '終了時間を選択してください', pleaseSelectOrderStatus: '注文ステータスを選択してください', pleaseEnterGameVersion: 'ゲームバージョンを入力してください', - pleaseSelectTenantGameAppVersionDefinition: 'クライアントバージョンを選択してください', + pleaseSelectGameAppVersionDefinition: 'クライアントバージョンを選択してください', pleaseEnterAttachmentList: '添付リストを入力してください', pleaseSelectMailExpiry: 'メール有効期限を選択してください', pleaseEnterTitleTemplate: 'タイトルテンプレートを入力してください', @@ -123,7 +123,7 @@ export default { pleaseSelectPlatform: 'プラットフォームを選択してください', package: 'パッケージ(任意)', pleaseSelectPackage: 'パッケージを選択してください(任意)', - tenantGameAppVersionDefinition: 'クライアントバージョン', + gameAppVersionDefinition: 'クライアントバージョン', allowedPlayerProfile: '許可プレイヤープロフィール', pleaseEnterAllowedPlayerProfile: '許可プレイヤープロフィールを入力してください', serverEvents: 'サーバーイベント', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts index c44e0393..a25c72ac 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/ko.ts @@ -55,7 +55,7 @@ export default { pleaseSelectEndTime: '종료 시간을 선택하세요', pleaseSelectOrderStatus: '주문 상태를 선택하세요', pleaseEnterGameVersion: '게임 버전을 입력하세요', - pleaseSelectTenantGameAppVersionDefinition: '클라이언트 버전을 선택하세요', + pleaseSelectGameAppVersionDefinition: '클라이언트 버전을 선택하세요', pleaseEnterAttachmentList: '첨부 목록을 입력하세요', pleaseSelectMailExpiry: '메일 만료 날짜를 선택하세요', pleaseEnterTitleTemplate: '제목 템플릿을 입력하세요', @@ -123,7 +123,7 @@ export default { pleaseSelectPlatform: '플랫폼을 선택하세요', package: '패키지(선택)', pleaseSelectPackage: '패키지를 선택하세요(선택)', - tenantGameAppVersionDefinition: '클라이언트 버전', + gameAppVersionDefinition: '클라이언트 버전', allowedPlayerProfile: '허용 플레이어 프로필', pleaseEnterAllowedPlayerProfile: '허용 플레이어 프로필을 입력하세요', serverEvents: '서버 이벤트', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts index b3693724..36759eaf 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-cn.ts @@ -55,7 +55,7 @@ export default { pleaseSelectEndTime: '请选择结束时间', pleaseSelectOrderStatus: '请选择订单状态', pleaseEnterGameVersion: '请输入游戏版本号', - pleaseSelectTenantGameAppVersionDefinition: '请选择客户端版本', + pleaseSelectGameAppVersionDefinition: '请选择客户端版本', pleaseEnterAttachmentList: '请输入附件列表', pleaseSelectMailExpiry: '请选择邮件过期日期', pleaseEnterTitleTemplate: '请输入标题模板', @@ -123,7 +123,7 @@ export default { pleaseSelectPlatform: '请选择平台', package: '分包(可选)', pleaseSelectPackage: '请选择分包(可选)', - tenantGameAppVersionDefinition: '客户端版本', + gameAppVersionDefinition: '客户端版本', allowedPlayerProfile: '指定可以加入此服务器的玩家类型', pleaseEnterAllowedPlayerProfile: '请输入指定可以加入此服务器的玩家类型', serverEvents: '特定服务器举行的事件或活动信息', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts index 9757c164..4517ae88 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameBusiness/zh-tw.ts @@ -55,7 +55,7 @@ export default { pleaseSelectEndTime: '請選擇結束時間', pleaseSelectOrderStatus: '請選擇訂單狀態', pleaseEnterGameVersion: '請輸入遊戲版本號', - pleaseSelectTenantGameAppVersionDefinition: '請選擇客戶端版本', + pleaseSelectGameAppVersionDefinition: '請選擇客戶端版本', pleaseEnterAttachmentList: '請輸入附件列表', pleaseSelectMailExpiry: '請選擇郵件過期日期', pleaseEnterTitleTemplate: '請輸入標題模板', @@ -123,7 +123,7 @@ export default { pleaseSelectPlatform: '請選擇平台', package: '分包(可選)', pleaseSelectPackage: '請選擇分包(可選)', - tenantGameAppVersionDefinition: '客戶端版本', + gameAppVersionDefinition: '客戶端版本', allowedPlayerProfile: '指定可以加入此伺服器的玩家類型', pleaseEnterAllowedPlayerProfile: '請輸入指定可以加入此伺服器的玩家類型', serverEvents: '特定伺服器舉行的事件或活動信息', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/en.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/en.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/en.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/ja.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/ja.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/ja.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/ko.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/ko.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/ko.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/zh-cn.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/zh-cn.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/zh-cn.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/zh-tw.ts similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/home/zh-tw.ts rename to GameFrameX.Admin.Unified.Vue/src/i18n/pages/home/zh-tw.ts diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/en.ts index d1a66d43..6902e821 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/en.ts @@ -39,9 +39,9 @@ export default { globalChannelDefinition: 'Global Channel Definition', configKey: 'Content Metadata', configMode: 'Mode Config', - tenantDevice: 'Device', - tenantDeviceGroup: 'Device Group', - tenantDeviceManagement: 'Device Management', + device: 'Device', + deviceGroup: 'Device Group', + deviceManagement: 'Device Management', gameAppRelease: 'Versions & Releases', gameAppResource: 'Resource Management', appRuntimeConfig: 'Runtime Config', @@ -50,7 +50,7 @@ export default { gameAppVersionDefinition: 'Version Definition', gameAppAssetPackage: 'Asset Package', gameAppAssetPackageVersion: 'Asset Package Version', - tenantChannelDefinition: 'Channel Definition', + channelDefinition: 'Channel Definition', platformJwtConfig: 'JWT Configuration', platformCaptchaConfig: 'Captcha Configuration', platformRateLimitConfig: 'Rate Limit Configuration', @@ -87,15 +87,15 @@ export default { gameRedeemCodeUseRecordEntity: 'Redeem Code Usage Records', webShopItemManager: 'Item', webShopOrderManager: 'Order', - tenantObjectStorageConfigEntity: 'Object Storage Config', + objectStorageConfigEntity: 'Object Storage Config', systemIntegrationConfig: 'Integration Config', - tenantAdvertisementCallbackConfigEntity: 'Ad Callback Verification', - tenantGameAdvertisementRewardEntity: 'Ad Reward Ledger', + advertisementCallbackConfigEntity: 'Ad Callback Verification', + gameAdvertisementRewardEntity: 'Ad Reward Ledger', clientApiConfig: 'Client API Config', - tenantClientApiPolicyEntity: 'Client API Policy', - tenantGameLoginTicketKeyEntity: 'Login Ticket Keys', - tenantAppSignatureKeyEntity: 'Transport Signature Keys', - tenantSessionKeyEntity: 'Session Keys', + clientApiPolicyEntity: 'Client API Policy', + gameLoginTicketKeyEntity: 'Login Ticket Keys', + appSignatureKeyEntity: 'Transport Signature Keys', + sessionKeyEntity: 'Session Keys', systemEmailProviderEntity: 'System Email Provider', antiCheatEventEntity: 'Anti-Cheat Events', penaltyEnforcement: 'Penalty Enforcement', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ja.ts index 417c3233..17a0add4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ja.ts @@ -39,9 +39,9 @@ export default { globalChannelDefinition: 'グローバルチャンネル定義', configKey: 'コンテンツメタデータ', configMode: 'モード設定', - tenantDevice: 'デバイス', - tenantDeviceGroup: 'デバイスグループ', - tenantDeviceManagement: 'デバイス管理', + device: 'デバイス', + deviceGroup: 'デバイスグループ', + deviceManagement: 'デバイス管理', gameAppRelease: 'バージョンとリリース', gameAppResource: 'リソース管理', appRuntimeConfig: 'ランタイム設定', @@ -50,7 +50,7 @@ export default { gameAppVersionDefinition: 'バージョン定義', gameAppAssetPackage: 'アセットパッケージ', gameAppAssetPackageVersion: 'アセットパッケージバージョン', - tenantChannelDefinition: 'チャンネル定義', + channelDefinition: 'チャンネル定義', platformJwtConfig: 'JWT設定', platformCaptchaConfig: '画像認証設定', platformRateLimitConfig: 'レート制限設定', @@ -87,15 +87,15 @@ export default { gameRedeemCodeUseRecordEntity: '引換コード使用履歴', webShopItemManager: 'アイテム', webShopOrderManager: '注文', - tenantObjectStorageConfigEntity: 'オブジェクトストレージ設定', + objectStorageConfigEntity: 'オブジェクトストレージ設定', systemIntegrationConfig: '連携設定', - tenantAdvertisementCallbackConfigEntity: '広告コールバック検証', - tenantGameAdvertisementRewardEntity: '広告報酬台帳', + advertisementCallbackConfigEntity: '広告コールバック検証', + gameAdvertisementRewardEntity: '広告報酬台帳', clientApiConfig: 'Client API 設定', - tenantClientApiPolicyEntity: 'Client API ポリシー', - tenantGameLoginTicketKeyEntity: 'ログインチケット鍵', - tenantAppSignatureKeyEntity: 'トランスポート署名鍵', - tenantSessionKeyEntity: 'セッション鍵', + clientApiPolicyEntity: 'Client API ポリシー', + gameLoginTicketKeyEntity: 'ログインチケット鍵', + appSignatureKeyEntity: 'トランスポート署名鍵', + sessionKeyEntity: 'セッション鍵', systemEmailProviderEntity: 'システムメールプロバイダー', antiCheatEventEntity: 'アンチチートイベント', penaltyEnforcement: 'ペナルティ適用状態', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ko.ts index df31dfef..143404b0 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/ko.ts @@ -39,9 +39,9 @@ export default { globalChannelDefinition: '전역 채널 정의', configKey: '콘텐츠 메타데이터', configMode: '모드 설정', - tenantDevice: '장치', - tenantDeviceGroup: '장치 그룹', - tenantDeviceManagement: '장치 관리', + device: '장치', + deviceGroup: '장치 그룹', + deviceManagement: '장치 관리', gameAppRelease: '버전 및 릴리스', gameAppResource: '리소스 관리', appRuntimeConfig: '런타임 설정', @@ -50,7 +50,7 @@ export default { gameAppVersionDefinition: '버전 정의', gameAppAssetPackage: '에셋 패키지', gameAppAssetPackageVersion: '에셋 패키지 버전', - tenantChannelDefinition: '채널 정의', + channelDefinition: '채널 정의', platformJwtConfig: 'JWT 설정', platformCaptchaConfig: '이미지 보안문자 설정', platformRateLimitConfig: '요청 제한 설정', @@ -87,15 +87,15 @@ export default { gameRedeemCodeUseRecordEntity: '교환 코드 사용 기록', webShopItemManager: '아이템', webShopOrderManager: '주문', - tenantObjectStorageConfigEntity: '오브젝트 스토리지 설정', + objectStorageConfigEntity: '오브젝트 스토리지 설정', systemIntegrationConfig: '연동 설정', - tenantAdvertisementCallbackConfigEntity: '광고 콜백 검증', - tenantGameAdvertisementRewardEntity: '광고 보상 원장', + advertisementCallbackConfigEntity: '광고 콜백 검증', + gameAdvertisementRewardEntity: '광고 보상 원장', clientApiConfig: 'Client API 구성', - tenantClientApiPolicyEntity: 'Client API 정책', - tenantGameLoginTicketKeyEntity: '로그인 티켓 키', - tenantAppSignatureKeyEntity: '전송 서명 키', - tenantSessionKeyEntity: '세션 키', + clientApiPolicyEntity: 'Client API 정책', + gameLoginTicketKeyEntity: '로그인 티켓 키', + appSignatureKeyEntity: '전송 서명 키', + sessionKeyEntity: '세션 키', systemEmailProviderEntity: '시스템 이메일 제공자', antiCheatEventEntity: '안티치트 이벤트', penaltyEnforcement: '제재 적용 상태', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-cn.ts index 6ec918b4..c9c63de9 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-cn.ts @@ -39,9 +39,9 @@ export default { globalChannelDefinition: '全局渠道定义', configKey: '内容元数据', configMode: '模式配置', - tenantDevice: '设备', - tenantDeviceGroup: '设备分组', - tenantDeviceManagement: '设备管理', + device: '设备', + deviceGroup: '设备分组', + deviceManagement: '设备管理', gameAppRelease: '版本与发布', gameAppResource: '资源管理', appRuntimeConfig: '运行配置', @@ -50,7 +50,7 @@ export default { gameAppVersionDefinition: '版本定义', gameAppAssetPackage: '资源包', gameAppAssetPackageVersion: '资源包版本', - tenantChannelDefinition: '渠道定义', + channelDefinition: '渠道定义', platformJwtConfig: 'JWT配置', platformCaptchaConfig: '图形验证码配置', platformRateLimitConfig: '限流配置', @@ -87,15 +87,15 @@ export default { gameRedeemCodeUseRecordEntity: '兑换码使用记录', webShopItemManager: '道具', webShopOrderManager: '订单', - tenantObjectStorageConfigEntity: '对象存储配置', + objectStorageConfigEntity: '对象存储配置', systemIntegrationConfig: '对接配置', - tenantAdvertisementCallbackConfigEntity: '广告回调验签', - tenantGameAdvertisementRewardEntity: '广告奖励账本', + advertisementCallbackConfigEntity: '广告回调验签', + gameAdvertisementRewardEntity: '广告奖励账本', clientApiConfig: 'Client API 配置', - tenantClientApiPolicyEntity: 'Client API 策略', - tenantGameLoginTicketKeyEntity: '登录票据密钥', - tenantAppSignatureKeyEntity: '传输签名密钥', - tenantSessionKeyEntity: '会话密钥', + clientApiPolicyEntity: 'Client API 策略', + gameLoginTicketKeyEntity: '登录票据密钥', + appSignatureKeyEntity: '传输签名密钥', + sessionKeyEntity: '会话密钥', systemEmailProviderEntity: '平台系统邮件', antiCheatEventEntity: '反作弊事件', penaltyEnforcement: '处罚生效状态', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-tw.ts index 5d06b759..d37fe0af 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/menu/zh-tw.ts @@ -39,9 +39,9 @@ export default { globalChannelDefinition: '全域渠道定義', configKey: '內容元數據', configMode: '模式配置', - tenantDevice: '裝置', - tenantDeviceGroup: '裝置分組', - tenantDeviceManagement: '設備管理', + device: '裝置', + deviceGroup: '裝置分組', + deviceManagement: '設備管理', gameAppRelease: '版本與發布', gameAppResource: '資源管理', appRuntimeConfig: '運行配置', @@ -50,7 +50,7 @@ export default { gameAppVersionDefinition: '版本定義', gameAppAssetPackage: '資源包', gameAppAssetPackageVersion: '資源包版本', - tenantChannelDefinition: '渠道定義', + channelDefinition: '渠道定義', platformJwtConfig: 'JWT配置', platformCaptchaConfig: '圖形驗證碼配置', platformRateLimitConfig: '限流配置', @@ -87,15 +87,15 @@ export default { gameRedeemCodeUseRecordEntity: '兌換碼使用紀錄', webShopItemManager: '道具', webShopOrderManager: '訂單', - tenantObjectStorageConfigEntity: '物件儲存配置', + objectStorageConfigEntity: '物件儲存配置', systemIntegrationConfig: '對接配置', - tenantAdvertisementCallbackConfigEntity: '廣告回調驗簽', - tenantGameAdvertisementRewardEntity: '廣告獎勵帳本', + advertisementCallbackConfigEntity: '廣告回調驗簽', + gameAdvertisementRewardEntity: '廣告獎勵帳本', clientApiConfig: 'Client API 配置', - tenantClientApiPolicyEntity: 'Client API 策略', - tenantGameLoginTicketKeyEntity: '登入票據密鑰', - tenantAppSignatureKeyEntity: '傳輸簽名密鑰', - tenantSessionKeyEntity: '會話密鑰', + clientApiPolicyEntity: 'Client API 策略', + gameLoginTicketKeyEntity: '登入票據密鑰', + appSignatureKeyEntity: '傳輸簽名密鑰', + sessionKeyEntity: '會話密鑰', systemEmailProviderEntity: '平台系統郵件', antiCheatEventEntity: '反作弊事件', penaltyEnforcement: '處罰生效狀態', diff --git a/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.ts b/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.ts index 818204fe..d83ede87 100644 --- a/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.ts +++ b/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.ts @@ -2,7 +2,7 @@ * 后端文件 URL 解析(纯函数)。 * * 背景:对象存储 local provider 把文件落盘到后端 wwwroot(如 Upload/Avatar/123.png), - * 而 TenantUserEntity.Avatar 等 DB 字段只保存相对对象键(无 origin、无协议)。 + * 而 UserEntity.Avatar 等 DB 字段只保存相对对象键(无 origin、无协议)。 * 前端直接 `'/'+path` 渲染时请求打到前端自身(dev 20800 / 静态站),命中 SPA fallback * 返回 index.html(HTTP 200 的 HTML), 渲染为裂图——登录后头像不显示即此因。 * 统一经 window.__env__.VITE_API_URL 补全为指向后端 origin 的可加载绝对地址 diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue similarity index 100% rename from GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue rename to GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue diff --git a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue similarity index 97% rename from GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue rename to GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue index 68681ade..e2af6087 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/index.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/advertisementCallbackConfigEntity/index.vue @@ -1,5 +1,5 @@