diff --git a/.env.example b/.env.example index 81f5f05e..d5dfb5d8 100644 --- a/.env.example +++ b/.env.example @@ -15,7 +15,7 @@ # GFX_MAIN_DB_CONNECTION_STRING=Host=postgres;Port=5432;Database=gameframex_admin;Username=gameframex;Password=... # ── 运行凭证加密(留空 = 明文降级模式;设置后三 host 同值且不可再变更)── -# GFX_TENANT_SECRET_ENC_KEY= +# GAMEFRAMEX_SECRET_ENCRYPTION_KEY= # ── Hub API JWT 验签密钥 ── @@ -28,6 +28,12 @@ # ── 前端运行时 API 地址(entrypoint 写入 config/config.js;远端部署时改浏览器可达地址)── # WEB_VUE_API_URL=http://127.0.0.1:20802 +# ── 新装首个业务管理员种子引导(C406 / F3;成对设置才生效)── +# 仅当主库中还没有任何业务管理员账号时,web-api 启动期会创建该账号并绑定 sys_admin 角色 +# (授权全部非超管菜单)。账号已存在则忽略并告警;密码须满足平台密码强度策略,否则启动失败。 +# GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT=admin +# GAMEFRAMEX_ADMIN_INITIAL_PASSWORD=<初始密码,请自行设置> + # ── Grafana Cloud OpenTelemetry(三者齐全才启用;凭证见 Grafana Cloud Portal)── # OTEL_ENDPOINT=https://otlp-gateway-prod-.grafana.net/otlp # OTEL_USER= diff --git a/AGENTS.md b/AGENTS.md index a180f5d0..73231e25 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,7 +23,7 @@ Build / run / 前端脚本见 `gfx-doc/agent-handbook/INDEX.md` 的 Build & Run; - Root `gfx-doc/` is the only code-side document system. - Keep `AGENTS.md`, `CLAUDE.md`, and `gfx-doc` as root-level entry points only. - Use SqlSugar patterns in backend work; do not introduce Entity Framework. -- Preserve tenant boundaries: `全局配置` is SuperAdmin-only; tenant features belong under tenant-visible business menus. +- `全局配置` is SuperAdmin-only; admin-facing business features belong under admin-visible business menus. `ServerId` is the only operational scope. - Prefer existing local patterns and generated API clients before adding new abstractions. - Any change affecting user-visible behavior MUST be verified by real browser end-to-end (see **Verification Standard** below). Compile-only or API-only (curl/fetch) verification is NOT acceptable as the sole evidence for such changes. @@ -37,7 +37,7 @@ Any change a user can see or click must be verified in a real browser before rep **What counts as real-browser verification:** - Drive the actual Vue app (default dev server `http://127.0.0.1:20800`, hash router) with the e2e suite under `GameFrameX.Admin.Unified.Vue/e2e/` (Playwright, `channel: 'msedge'` launches system Edge — no manual CDP/browser step; run `pnpm run test:e2e` from the Vue root). -- Perform real interactions (form login with the right tenant, navigate by real menu), prove the page's real API fired (route recorder), then assert the DOM renders the expected data (account, tenant, the row/field under test). +- Perform real interactions (form login, navigate by real menu), prove the page's real API fired (route recorder), then assert the DOM renders the expected data (account, server selection, the row/field under test). - Evidence lands automatically under `GameFrameX.Admin.Unified.Vue/e2e/.e2e/`: per-test artifacts in `results//` (explicit `shot(page, 'label')` screenshots + trace.zip on failure), plus `report.json` and the HTML report in `report/` (`pnpm run test:e2e:report`). Use the `shot()` helper from `e2e/tests/helpers.ts` for explicit proof shots. **What is NOT sufficient on its own:** @@ -47,7 +47,7 @@ Any change a user can see or click must be verified in a real browser before rep These are allowed as supplementary checks, but a user-visible change still requires the browser-level assertion above. Backend-only/internal-path changes (no UI surface) may stop at compile + API/DB checks. **Existing harness:** -- `GameFrameX.Admin.Unified.Vue/e2e/` — Playwright regression suite using system Edge. The app has one shell: ordinary admin sees nine roots (总览、区服、内容运营、在线运维、玩家、商业化、C 端交付、审计、系统); superadmin sees only 总览 and 系统, including protected system groups. `auth.setup.e2e.ts` / `superadmin.setup.e2e.ts` create separate storage states through real form login; `admin-menu-fixture.ts` explicitly grants every non-superadmin menu, including new roots, then logs admin in again. This fixture is the authorized exception for active menu/role API calls. Page navigation uses rendered sidebar DOM and real clicks through `helpers.ts` `navigateByMenu`; login lands on 运营首页 (`/dashboard/home`). `modules/single-shell.e2e.ts` has one case per root/session (11 total), with `actions: true` (C404: 区服组计数含开服/合服两个向导流程页,通用 CRUD 探针经 `skipLeaves` 跳过,写路径由 `game-area-provision.e2e.ts` / `game-area-merge.e2e.ts` 专属用例覆盖); `modules/menu-inventory.e2e.ts` asserts the exact nine/two root sets. `module-coverage.ts` records page requests and sweeps every leaf: search/reset payloads, real Select/AutoComplete choices, details, edit echo, delete confirmation/cancel, and add-dialog validation. Per-leaf coverage is written to annotations. `scheduler-retention.e2e.ts` covers 任务调度内置作业可见/手动执行运行态、超期日志留存消失与定时任务 admin 增删改(C404)。 `crud-roundtrips.e2e.ts` has 20 entity roundtrips (create → edit-submit/echo → delete), with exceptions documented in its header and fields filled in control order. `server-selector.e2e.ts` covers global/local server selection, request payload and DOM, reload persistence, and delayed-response isolation. Other files cover login failure, landing/logout, appearance, log pages/search/export, and both directions of the admin/superadmin visibility boundary. The retired app-secret Client.Api correlation suite has been removed. Run `pnpm run test:e2e tests/.e2e.ts`, optionally `-g "<组名>"`; update the CRUD matrix for new CRUD pages and the module/inventory expectations for new menus. Independent static checks are `pnpm exec tsc --noEmit -p e2e/tsconfig.json` and `pnpm exec eslint -c e2e/eslint.config.mjs e2e/tests`. +- `GameFrameX.Admin.Unified.Vue/e2e/` — Playwright regression suite using system Edge. The app has one shell: ordinary admin sees nine roots (总览、区服、内容运营、在线运维、玩家、商业化、C 端交付、审计、系统); superadmin sees only 总览 and 系统, including protected system groups. `auth.setup.e2e.ts` / `superadmin.setup.e2e.ts` create separate storage states through real form login; `admin-stack.ts` holds the isolated-stack guard and response-envelope readers; the admin account and its `sys_admin` non-superadmin menu grants now come from the first-install seed bootstrap (`GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT`/`_PASSWORD`), so no active role/grant API call is made by the suite. The merge reviewer account is created through the real 账号管理 UI and its password reset through the row action menu. Page navigation uses rendered sidebar DOM and real clicks through `helpers.ts` `navigateByMenu`; login lands on 运营首页 (`/dashboard/home`). `modules/single-shell.e2e.ts` has one case per root/session (11 total), with `actions: true` (C404: 区服组计数含开服/合服两个向导流程页,通用 CRUD 探针经 `skipLeaves` 跳过,写路径由 `game-area-provision.e2e.ts` / `game-area-merge.e2e.ts` 专属用例覆盖); `modules/menu-inventory.e2e.ts` asserts the exact nine/two root sets. `module-coverage.ts` records page requests and sweeps every leaf: search/reset payloads, real Select/AutoComplete choices, details, edit echo, delete confirmation/cancel, and add-dialog validation. Per-leaf coverage is written to annotations. `scheduler-retention.e2e.ts` covers 任务调度内置作业可见/手动执行运行态、超期日志留存消失与定时任务 admin 增删改(C404)。 `crud-roundtrips.e2e.ts` has 20 entity roundtrips (create → edit-submit/echo → delete) plus the F2 ad-callback package-binding closure, with exceptions documented in its header and fields filled in control order. `server-selector.e2e.ts` covers global/local server selection, request payload and DOM, reload persistence, and delayed-response isolation. Other files cover login failure, landing/logout, appearance, log pages/search/export, and both directions of the admin/superadmin visibility boundary. `client-api-protocol.e2e.ts` proves the C406 single-game Client.Api protocol (X-Proto-Ver 200 / missing 400 / legacy headers ignored); `e2e-integration-checks.e2e.ts` carries the C406 acceptance assertions (login form fields, renamed pages + renamed APIs, wire hygiene across pages, log columns without TenantId, single-packageId callback URL shape, Hub machine-channel HMAC with legacy headers ignored, bootstrapped-admin first login with nine roots, ad-callback package selection/echo with the single-{packageId} URL form, and cross-package key rejection with missing-packageId 404). Run `pnpm run test:e2e tests/.e2e.ts`, optionally `-g "<组名>"`; update the CRUD matrix for new CRUD pages and the module/inventory expectations for new menus. Independent static checks are `pnpm exec tsc --noEmit -p e2e/tsconfig.json` and `pnpm exec eslint -c e2e/eslint.config.mjs e2e/tests`. - `GameFrameX.Admin.Unified.Vue/src/**/*.test.ts` — unit / component suite (Vitest 3 + jsdom + @vue/test-utils, since 2026-10-20; covers pure-logic utilities like `cursorPager` / `commandForm` / `notifyUrl` / `pageServer` / `http/shared.resolveResponseMessage`, plus a component convention reference at `src/components/form-label/index.test.ts`). Run via `pnpm run test:unit` (CI) / `test:unit:watch` (dev watch) / `test:unit:coverage` (v8 coverage). New pure-logic helpers: write a colocated `*.test.ts` next to the source; new Vue components: mirror `form-label/index.test.ts` (`mount` + `injected provider` + slot text). When a user-visible change is reported done without browser evidence, treat the report as incomplete and run the browser check before claiming success. 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/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs index ec5ef190..8b50744c 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackConfigCrypto.cs @@ -1,18 +1,18 @@ 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" 驱动(与表单脱敏 / 必填校验同源判定), /// 非敏感字段(callbackUrl 等)保持明文可读;字段值为密文形态(enc:sec:v1: 前缀)时幂等跳过。 /// 性能约束:底层 PBKDF2 派生单次数百毫秒级—— 按「密文原文 → 明文 JSON」做进程级缓存, /// 同一密文只解密一次;任何配置写入都会产生新密文(每次加密随机 Salt + Nonce),缓存 key 随之失效。 -/// ponytail: 缓存字典无淘汰上限(key 为整段密文 JSON);广告回调配置行数极少(每租户个位数),增长天花板可忽略。 +/// ponytail: 缓存字典无淘汰上限(key 为整段密文 JSON);广告回调配置行数极少(每作用域个位数),增长天花板可忽略。 /// 升级路径:按配置行 Id 失效或换 LRU。 /// public static class AdvertisementCallbackConfigCrypto @@ -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 84% 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..3e237704 100644 --- a/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/TenantAdvertisementCallbackOptions.cs +++ b/GameFrameX.Admin.Unified.Api/Advertisement/GameFrameX.Advertisement.Abstract/AdvertisementCallbackOptions.cs @@ -1,10 +1,15 @@ namespace GameFrameX.Advertisement.Abstract; /// -/// 租户广告回调配置快照。null 引用表示该作用域未配置广告回调材料。 +/// 广告回调配置快照。null 引用表示该作用域未配置广告回调材料。 /// -public sealed class TenantAdvertisementCallbackOptions +public sealed class AdvertisementCallbackOptions { + /// + /// 广告回调验签配置绑定的游戏应用分包 Id。 + /// + public long PackageId { get; init; } + /// /// 广告平台 Provider。 /// @@ -49,4 +54,4 @@ public sealed class TenantAdvertisementCallbackOptions /// AdMob 回调验签的 key_id → base64 key 映射(解析自 )。 /// public IReadOnlyDictionary AdMobKeys { get; init; } = new Dictionary(StringComparer.Ordinal); -} \ No newline at end of file +} 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..a0cbc082 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..c3a959f4 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(); @@ -197,7 +197,7 @@ private static void RedactSnapshot(object item) /// 按 拼接 OR Contains 表达式,用于 SearchKey 模糊匹配。 /// 表达式树按 u => u.Col1.Contains(key) OR u.Col2.Contains(key) OR ... 形式构建, /// 所有节点均为简单属性访问 + + 单一 参数, - /// SqlSugar 可正确翻译为 SQL(参考 4952fbe6 修复租户用户/角色列表 SqlSugar NotSupportedException 的教训: + /// SqlSugar 可正确翻译为 SQL(参考 4952fbe6 修复用户/角色列表 SqlSugar NotSupportedException 的教训: /// lambda 内禁止 ?? new List 等不可翻译的兜底写法)。 /// /// 已 trim 的非空关键字 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..f6f8dba5 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..ec780ed1 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..1e0728dd 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..54e3a8fe 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..dd54700c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs @@ -1,61 +1,69 @@ 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; +using GameFrameX.Entity.Business.Game.App; +using GameFrameX.Core.Enum.Errors; #pragma warning disable CS8604, CS8629 // SqlSugar WhereIF(condition, lambda):lambda 仅在 condition=true 时执行;NRT 无法跨方法传播条件守卫,lambda 内 .Trim()/.Value 实际安全 namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig; /// -/// 租户广告回调配置管理服务。 +/// 广告回调配置管理服务。 /// 只管理各广告平台服务端回调所需的最小配置材料,不实现广告回调接收和发奖处理。 /// 敏感字段(SigningSecret / VerificationKeys)输出脱敏,更新回传 ****** 保留原值。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 111)] public class AdvertisementCallbackConfigService - : GenericCrudService + : GenericCrudService { private readonly IAdvertisementCallbackConfigSchemaProvider _schemaProvider; + private readonly SqlSugarRepository _packageRepository; private const string SupportedProviderMessage = "广告平台只支持 TopOn、GoogleAdMob、Pangle、UnityAds"; public AdvertisementCallbackConfigService( - SqlSugarRepository repository, - IAdvertisementCallbackConfigSchemaProvider schemaProvider) + SqlSugarRepository repository, + IAdvertisementCallbackConfigSchemaProvider schemaProvider, + SqlSugarRepository packageRepository) : base(repository) { _schemaProvider = schemaProvider; + _packageRepository = packageRepository; } - protected override ISugarQueryable BuildPageQuery(PageTenantAdvertisementCallbackConfigRequest input) + protected override ISugarQueryable BuildPageQuery(PageAdvertisementCallbackConfigRequest input) { var searchKey = input.SearchKey?.Trim(); var provider = NormalizeProvider(input.Provider, false); return Repository.AsQueryable() .WhereIF(!string.IsNullOrWhiteSpace(searchKey), u => u.Remark.Contains(searchKey) || u.CallbackUrl.Contains(searchKey)) .WhereIF(!string.IsNullOrWhiteSpace(provider), u => u.Provider == provider) + .WhereIF(input.PackageId.HasValue, u => u.PackageId == input.PackageId.Value) .WhereIF(input.IsActive.HasValue, u => u.IsEnabled == input.IsActive.Value) .Select(); } /// - /// 新增广告回调配置(主库内 Provider 唯一)。 + /// 新增广告回调配置(同一分组的 (PackageId, Provider) 唯一)。 /// - public override async Task AddAsync(AddTenantAdvertisementCallbackConfigRequest input) + public override async Task AddAsync(AddAdvertisementCallbackConfigRequest input) { var provider = NormalizeProvider(input.Provider, true); + var packageId = await ValidatePackageAsync(input.PackageId); var configJson = NormalizeConfigJson(provider, input.ConfigJson, null); - await CheckUniqueScopeAsync(provider, null); + await CheckUniqueScopeAsync(packageId, provider, null); - var entity = input.Adapt(); + var entity = input.Adapt(); entity.Provider = provider; + entity.PackageId = packageId; 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 +74,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) @@ -75,14 +83,16 @@ public override async Task UpdateAsync(UpdateTenantAdvertisementCallbackConfigRe } var provider = NormalizeProvider(input.Provider, true); + var packageId = await ValidatePackageAsync(input.PackageId); var configJson = NormalizeConfigJson(provider, input.ConfigJson, entity.ConfigJson); - await CheckUniqueScopeAsync(provider, input.Id); + await CheckUniqueScopeAsync(packageId, provider, input.Id); entity.Provider = provider; + entity.PackageId = packageId; 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; @@ -93,6 +103,7 @@ await Repository.AsUpdateable(entity) .UpdateColumns(e => new { e.Provider, + e.PackageId, e.CallbackUrl, e.SigningSecret, e.VerificationKeys, @@ -109,7 +120,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) @@ -159,14 +170,33 @@ public List GetProviders() return _schemaProvider.GetProviders(); } - private async Task CheckUniqueScopeAsync(string provider, long? excludeId) + /// + /// 校验并返回配置绑定的分包 Id:必填正数,且分包必须存在并启用(与回调解析的启用校验一致)。 + /// + private async Task ValidatePackageAsync(long? packageId) + { + if (packageId == null || packageId <= 0) + { + throw BusinessError.Oh(AdvertisementCallbackConfigErrorCode.PackageIdRequired); + } + + var package = await _packageRepository.GetFirstAsync(x => x.Id == packageId.Value && x.IsEnabled == true); + if (package == null) + { + throw BusinessError.Oh(AdvertisementCallbackConfigErrorCode.PackageNotFound); + } + + return packageId.Value; + } + + private async Task CheckUniqueScopeAsync(long packageId, string provider, long? excludeId) { var exists = excludeId.HasValue - ? await Repository.IsAnyAsync(x => x.Provider == provider && x.Id != excludeId.Value) - : await Repository.IsAnyAsync(x => x.Provider == provider); + ? await Repository.IsAnyAsync(x => x.PackageId == packageId && x.Provider == provider && x.Id != excludeId.Value) + : await Repository.IsAnyAsync(x => x.PackageId == packageId && x.Provider == provider); if (exists) { - throw BusinessError.Oh("同一广告平台的广告回调配置已存在"); + throw BusinessError.Oh(AdvertisementCallbackConfigErrorCode.PackageProviderAlreadyExists); } } @@ -265,7 +295,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"); @@ -344,4 +374,4 @@ private void MaskSecrets(AdvertisementCallbackConfigResponse output, bool maskWh output.ConfigJson = current.ToJsonString(); } } -#pragma warning restore CS8604, CS8629 \ No newline at end of file +#pragma warning restore CS8604, CS8629 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 86% 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..b9323c62 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 @@ -1,10 +1,15 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; /// -/// 租户广告回调配置新增输入参数 +/// 广告回调配置新增输入参数 /// -public class AddTenantAdvertisementCallbackConfigRequest : BaseAddRequest +public class AddAdvertisementCallbackConfigRequest : BaseAddRequest { + /// + /// 关联的游戏应用分包 Id。 + /// + public long? PackageId { get; set; } + /// /// 广告平台 Provider。当前首批配置支持 TopOn、GoogleAdMob、Pangle、UnityAds。 /// @@ -46,4 +51,4 @@ public class AddTenantAdvertisementCallbackConfigRequest : BaseAddRequest /// 备注。 /// public string Remark { get; set; } = null!; -} \ No newline at end of file +} 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..a030dad2 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,12 +1,17 @@ -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。 + /// + public long PackageId { get; set; } + /// /// Id /// @@ -76,4 +81,4 @@ public class AdvertisementCallbackConfigResponse : IBasePageResponse public string Remark { get; set; } = null!; -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageAdvertisementCallbackConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageAdvertisementCallbackConfigRequest.cs new file mode 100644 index 00000000..dcda5576 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageAdvertisementCallbackConfigRequest.cs @@ -0,0 +1,17 @@ +namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; + +/// +/// 广告回调验签配置分页查询输入参数 +/// +public class PageAdvertisementCallbackConfigRequest : BaseAppActivePageRequest +{ + /// + /// 按游戏应用分包 Id 过滤。 + /// + public long? PackageId { get; set; } + + /// + /// 广告平台 Provider。 + /// + public string Provider { get; set; } = null!; +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageTenantAdvertisementCallbackConfigRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageTenantAdvertisementCallbackConfigRequest.cs deleted file mode 100644 index 95a2ef3a..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/Dto/PageTenantAdvertisementCallbackConfigRequest.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; - -/// -/// 租户广告回调验签配置分页查询输入参数 -/// -public class PageTenantAdvertisementCallbackConfigRequest : BaseAppActivePageRequest -{ - /// - /// 广告平台 Provider。 - /// - public string Provider { get; set; } = null!; -} \ No newline at end of file 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 86% 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..81d51de4 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 @@ -1,11 +1,16 @@ namespace GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; /// -/// 租户广告回调配置更新输入参数。 +/// 广告回调配置更新输入参数。 /// 敏感字段提交 ****** 时表示保留原值。 /// -public class UpdateTenantAdvertisementCallbackConfigRequest : BaseUpdateRequest +public class UpdateAdvertisementCallbackConfigRequest : BaseUpdateRequest { + /// + /// 关联的游戏应用分包 Id。 + /// + public long? PackageId { get; set; } + /// /// 广告平台 Provider。当前首批配置支持 TopOn、GoogleAdMob、Pangle、UnityAds。 /// @@ -47,4 +52,4 @@ public class UpdateTenantAdvertisementCallbackConfigRequest : BaseUpdateRequest /// 备注。 /// public string Remark { get; set; } = null!; -} \ No newline at end of file +} 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..dd90e7f8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionManagementServiceBase.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ChannelDefinition/ChannelDefinitionManagementServiceBase.cs @@ -39,9 +39,8 @@ protected ChannelDefinitionManagementServiceBase( protected abstract ChannelScopeEnum ManagedScope { get; } /// - /// 渠道是否已被分包引用。租户作用域由派生类用本租户分包仓储判定; - /// 系统作用域(SuperAdmin、无租户上下文)默认不拦截——租户分包表分布在各租户库, - /// 构造租户仓储本身就会因缺少租户上下文抛错,且超管侧从未有过可达的单租户判定路径。 + /// 渠道是否已被分包引用。业务作用域由派生类用分包仓储判定; + /// 系统作用域(SuperAdmin)默认不拦截——超管侧无单一业务归属可判定。 /// /// 渠道 Id。 /// 被引用返回 true。 @@ -63,7 +62,7 @@ protected override ISugarQueryable BuildPageQuery(Pag return Repository.AsQueryable() .Filter(null, true) - // Filter(null,true) 绕过租户过滤的同时也关掉了软删全局过滤,显式恢复(Api#287) + // Filter(null,true) 绕过作用域过滤的同时也关掉了软删全局过滤,显式恢复(Api#287) .Where(u => u.IsDeleted == false) .Where(u => u.Scope == ManagedScope) .WhereIF(!string.IsNullOrWhiteSpace(searchKey), u => @@ -114,7 +113,7 @@ protected override async Task OnUpdatingAsync(UpdateChannelDefinitionRequest inp if (ManagedScope == ChannelScopeEnum.System && !_currentUserContext.SuperAdmin) { - throw BusinessError.Oh("租户不能编辑系统渠道"); + throw BusinessError.Oh("业务侧不能编辑系统渠道"); } EnsureScopePermission(); @@ -161,7 +160,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) @@ -214,7 +213,7 @@ public override async Task DeleteAsync(BaseDeleteRequest input) if (ManagedScope == ChannelScopeEnum.System && !_currentUserContext.SuperAdmin) { - throw BusinessError.Oh("租户不能删除系统渠道"); + throw BusinessError.Oh("业务侧不能删除系统渠道"); } var referenced = await IsPackageReferencedAsync(input.Id); @@ -267,20 +266,20 @@ private async Task CheckCodeUniqueAsync(string code, ChannelScopeEnum scope, lon if (existsSystemCode) { - throw BusinessError.Oh("租户渠道编码不能与系统渠道重复"); + 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("租户渠道编码已存在"); + 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..d6c47e78 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; @@ -8,21 +8,21 @@ 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; } } /// @@ -61,9 +61,9 @@ public Task> AvailableAsync([FromQuery] [HttpPost(CrudActionRoutes.Export)] [ApiDescriptionSettings(Name = "Export")] [NonUnify] - [DisplayName("导出租户渠道定义")] + [DisplayName("导出业务渠道定义")] public Task ExportAsync(DataExportRequest input) { - return ExportCoreAsync(input.Query, input.Columns, input.Range, "租户渠道定义"); + return ExportCoreAsync(input.Query, input.Columns, input.Range, "业务渠道定义"); } } \ No newline at end of file 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..f5900008 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/ClientApiPolicyService.cs @@ -4,24 +4,24 @@ 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; /// -/// 租户 Client API 运行策略管理服务(C378 四表合一:Token / 登录票据 / 区服输出 / 订单策略单页管理)。 +/// Client API 运行策略管理服务(C378 四表合一:Token / 登录票据 / 区服输出 / 订单策略单页管理)。 /// 主库保存唯一运行策略,所有请求读取同一行。 /// 敏感字段(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 89% 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..cd8d0e72 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 @@ -1,9 +1,9 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; /// -/// 租户 Client API 运行策略新增输入参数 +/// Client API 运行策略新增输入参数 /// -public class AddTenantClientApiPolicyRequest : BaseAddRequest +public class AddClientApiPolicyRequest : BaseAddRequest { /// /// 是否要求请求签名。 @@ -36,7 +36,7 @@ public class AddTenantClientApiPolicyRequest : BaseAddRequest public long TicketExpireTime { get; set; } /// - /// 是否允许首次签发时自动创建租户应用级 RSA key。 + /// 是否允许首次签发时自动创建应用级 RSA key。 /// public bool EnableKeyAutoCreate { get; set; } = true; 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..0c7bce7c 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 @@ -1,9 +1,9 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; /// -/// 租户 Client API 运行策略输出参数 +/// Client API 运行策略输出参数 /// -public class ClientApiPolicyResponse : IBasePageResponse +public class ClientApiPolicyResponse : IBasePageResponse { /// /// 是否要求请求签名。 @@ -41,7 +41,7 @@ public class ClientApiPolicyResponse : IBasePageResponse - /// 是否允许首次签发时自动创建租户应用级 RSA key。 + /// 是否允许首次签发时自动创建应用级 RSA key。 /// public bool EnableKeyAutoCreate { get; set; } = true; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageClientApiPolicyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageClientApiPolicyRequest.cs new file mode 100644 index 00000000..8cec3fb3 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageClientApiPolicyRequest.cs @@ -0,0 +1,8 @@ +namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; + +/// +/// Client API 运行策略分页查询输入参数 +/// +public class PageClientApiPolicyRequest : BaseAppActivePageRequest +{ +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageTenantClientApiPolicyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageTenantClientApiPolicyRequest.cs deleted file mode 100644 index 9eb648d5..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ClientApiPolicy/Dto/PageTenantClientApiPolicyRequest.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; - -/// -/// 租户 Client API 运行策略分页查询输入参数 -/// -public class PageTenantClientApiPolicyRequest : 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 88% 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..f311a599 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 @@ -1,9 +1,9 @@ namespace GameFrameX.Application.ClientDelivery.ClientApiPolicy.Dto; /// -/// 租户 Client API 运行策略更新输入参数 +/// Client API 运行策略更新输入参数 /// -public class UpdateTenantClientApiPolicyRequest : BaseUpdateRequest +public class UpdateClientApiPolicyRequest : BaseUpdateRequest { /// /// 是否要求请求签名。 @@ -36,7 +36,7 @@ public class UpdateTenantClientApiPolicyRequest : BaseUpdateRequest public long TicketExpireTime { get; set; } /// - /// 是否允许首次签发时自动创建租户应用级 RSA key。 + /// 是否允许首次签发时自动创建应用级 RSA key。 /// public bool EnableKeyAutoCreate { get; set; } = true; 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..4cc73f61 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 _channelDefinitionRepository; public GameAppPackageService( - SqlSugarRepository repository, + SqlSugarRepository repository, SqlSugarRepository globalPlatformRepository, SqlSugarRepository globalChannelDefinitionRepository, - SqlSugarRepository tenantChannelDefinitionRepository) + SqlSugarRepository channelDefinitionRepository) : base(repository) { _globalPlatformRepository = globalPlatformRepository; _globalChannelDefinitionRepository = globalChannelDefinitionRepository; - _tenantChannelDefinitionRepository = tenantChannelDefinitionRepository; + _channelDefinitionRepository = 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; @@ -395,14 +395,14 @@ private async Task FillSnapshotsAsync(TenantGameAppPackageEntity 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)) .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/GameLoginTicketKeyResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/GameLoginTicketKeyResponse.cs index 3f4bda36..014e16b6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/GameLoginTicketKeyResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/GameLoginTicketKeyResponse.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Application.ClientDelivery.LoginTicket.GameLoginTicketKey.Dto; /// -/// 租户 Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。 +/// Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。 /// public class GameLoginTicketKeyResponse { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageGameLoginTicketKeyRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageGameLoginTicketKeyRequest.cs new file mode 100644 index 00000000..8d80cb54 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageGameLoginTicketKeyRequest.cs @@ -0,0 +1,8 @@ +namespace GameFrameX.Application.ClientDelivery.LoginTicket.GameLoginTicketKey.Dto; + +/// +/// Game 登录票据签名密钥分页查询输入参数。 +/// +public class PageGameLoginTicketKeyRequest : BaseAppActivePageRequest +{ +} \ No newline at end of file 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/PageTenantGameLoginTicketKeyRequest.cs deleted file mode 100644 index 6c8a5358..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/Dto/PageTenantGameLoginTicketKeyRequest.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace GameFrameX.Application.ClientDelivery.LoginTicket.GameLoginTicketKey.Dto; - -/// -/// 租户 Game 登录票据签名密钥分页查询输入参数。 -/// -public class PageTenantGameLoginTicketKeyRequest : 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..7514ca83 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,24 +1,24 @@ 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 实际安全 namespace GameFrameX.Application.ClientDelivery.LoginTicket.GameLoginTicketKey; /// -/// 租户 Game 登录票据签名密钥管理服务。 +/// Game 登录票据签名密钥管理服务。 /// 私钥永不回显:所有输出仅含公钥与元数据。密钥由系统签发或手动轮换生成,不支持手动新增 / 删除。 /// 作用域:主库。 /// [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 90% 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..9a934a45 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddTenantObjectStorageConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/AddObjectStorageConfigRequest.cs @@ -1,9 +1,9 @@ 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/ObjectStorageConfigResponse.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigResponse.cs index 966525f3..24cf7ca5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigResponse.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigResponse.cs @@ -1,7 +1,7 @@ namespace GameFrameX.Application.ClientDelivery.ObjectStorageConfig; /// -/// 租户对象存储配置列表项。 +/// 对象存储配置列表项。 /// public class ObjectStorageConfigResponse { 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..749ebcde 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/ObjectStorageConfigService.cs @@ -2,26 +2,26 @@ 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 实际安全 namespace GameFrameX.Application.ClientDelivery.ObjectStorageConfig; /// -/// 租户对象存储配置管理服务:CRUD + 提供商/Schema 查询 + 连通性测试。 -/// 业务规则:Provider 创建后不可变更;同租户至多一条启用;ConfigJson 白名单规范化与脱敏。 +/// 对象存储配置管理服务:CRUD + 提供商/Schema 查询 + 连通性测试。 +/// 业务规则:Provider 创建后不可变更;至多一条启用;ConfigJson 白名单规范化与脱敏。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 111)] public class ObjectStorageConfigService - : GenericCrudService + : GenericCrudService { /// - /// 启用切换进程级串行锁。同租户“停用其它 + 写当前启用”必须串行,避免并发 AddAsync/UpdateAsync 产生多条启用配置。 + /// 启用切换进程级串行锁。“停用其它 + 写当前启用”必须串行,避免并发 AddAsync/UpdateAsync 产生多条启用配置。 /// 注:当前为单实例部署的进程级锁;未来水平扩展为多实例时,需升级为分布式锁或 DB 级唯一约束。 /// private static readonly SemaphoreSlim ActiveConfigTransitionLock = new(1, 1); @@ -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); @@ -53,20 +53,20 @@ protected override ISugarQueryable BuildPageQuery(P } /// - /// 新增配置。校验 Provider 已注册、规范化 ConfigJson;若启用则在事务内停用同租户其它配置。 + /// 新增配置。校验 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 70% 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..2fd6b243 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageTenantObjectStorageConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/PageObjectStorageConfigRequest.cs @@ -1,9 +1,9 @@ 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 87% 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..d001559b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateTenantObjectStorageConfigRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ClientDelivery/ObjectStorageConfig/UpdateObjectStorageConfigRequest.cs @@ -1,9 +1,9 @@ namespace GameFrameX.Application.ClientDelivery.ObjectStorageConfig; /// -/// 更新租户对象存储配置入参。Provider 必须与既有记录一致。 +/// 更新对象存储配置入参。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..603eb9a6 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..e4fc8a1b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Dashboard/GameHome/GameHomeOnlineCounter.cs @@ -12,14 +12,14 @@ namespace GameFrameX.Application.Dashboard.GameHome; public static class GameHomeOnlineCounter { /// - /// 按指定租户库连接聚合全服在线人数。无可用区服时返回 0。 + /// 按指定主库连接聚合全服在线人数。无可用区服时返回 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(); @@ -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..96a3a81c 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; @@ -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 tenantDbConnectionProvider) + public GameHomeService(IHttpClientFactory httpClientFactory, ISqlSugarClient dbConnectionProvider) { _httpClientFactory = httpClientFactory; - _tenantDbConnectionProvider = tenantDbConnectionProvider; + _dbConnectionProvider = dbConnectionProvider; } /// @@ -34,9 +34,9 @@ public async Task> GetOnlineAsync() { // C175:从全局 GameServerOptions.HttpRootUrl 改为区服级聚合。仅统计启用且配置了管理地址的区服, // 每个区服按 Control 能力前缀调用 GetOnlinePlayer,求和返回全服在线人数。 - // C321:区服表是租户库表,经租户库连接路由查询;平台面(无租户上下文)返回明确业务错误而非裸 500。 - var tenantDb = ResolveTenantDb("首页在线人数"); - var total = await GameHomeOnlineCounter.GetTotalOnlineAsync(tenantDb, _httpClientFactory); + // C321:区服表是主库业务表,经主库连接查询;无区服数据时返回明确业务错误而非裸 500。 + 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 = ResolveTenantDb("首页运营驾驶舱聚合读数"); + 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 = ResolveTenantDb("首页在线趋势"); + 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(); @@ -152,17 +152,17 @@ 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 mainDb = _dbConnectionProvider; + if (mainDb == null) { - throw BusinessError.Oh(GameHomeErrorCode.TenantDbUnavailable); + throw BusinessError.Oh(GameHomeErrorCode.DbUnavailable); } - return tenantDb; + return mainDb; } } 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/Dto/OnlineAssetGrantRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetGrantRequest.cs index a2044e97..942d31b3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetGrantRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetGrantRequest.cs @@ -8,7 +8,7 @@ public class OnlineAssetGrantRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetRevokeRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetRevokeRequest.cs index 64933ef2..3dd858ee 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetRevokeRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetRevokeRequest.cs @@ -8,7 +8,7 @@ public class OnlineAssetRevokeRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetTransactionDetailRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetTransactionDetailRequest.cs index 98b89096..cfbc992b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetTransactionDetailRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/OnlineAssetTransactionDetailRequest.cs @@ -8,7 +8,7 @@ public class OnlineAssetTransactionDetailRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetAuditRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetAuditRequest.cs index 99fb4ae7..8874290f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetAuditRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetAuditRequest.cs @@ -8,7 +8,7 @@ public class PageOnlineAssetAuditRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetLedgerRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetLedgerRequest.cs index 290504cb..2c5e4546 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetLedgerRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Asset/Dto/PageOnlineAssetLedgerRequest.cs @@ -8,7 +8,7 @@ public class PageOnlineAssetLedgerRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] 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..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/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..595050cd 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。 /// @@ -12,7 +12,7 @@ public class OnlineControlledCommandRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineOverviewRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineOverviewRequest.cs index e3926de1..e6689edc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineOverviewRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlineOverviewRequest.cs @@ -7,7 +7,7 @@ public class OnlineOverviewRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlinePlayerTimelineRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlinePlayerTimelineRequest.cs index c34c7525..ecfdf2f3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlinePlayerTimelineRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Console/Dto/OnlinePlayerTimelineRequest.cs @@ -7,7 +7,7 @@ public class OnlinePlayerTimelineRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] 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..fd4e11c0 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 内散落第二套映射——新增来源必须回到本文件登记并同步守护说明。 @@ -45,7 +45,7 @@ private sealed class RequestJsonProbe }; /// - /// RequestParam JSON 中探测作用域的已知键(appId/serverId 双形态)。 + /// RequestParam JSON 中探测区服作用域的已知键(serverId 双形态)。 /// private static readonly string[] ScopeKeys = { "serverId", "ServerId", }; @@ -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 { @@ -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/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/GameAntiCheatEvent/AntiCheatEventIdempotencyStore.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/GameAntiCheatEvent/AntiCheatEventIdempotencyStore.cs index efec6185..a5b153a8 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/SyncPlayerSegmentOnlineRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/SyncPlayerSegmentOnlineRequest.cs index e6afe4a2..9a10f93c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/SyncPlayerSegmentOnlineRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/LiveOps/PlayerSegment/Dto/SyncPlayerSegmentOnlineRequest.cs @@ -10,7 +10,7 @@ namespace GameFrameX.Application.GmCenter.LiveOps.PlayerSegment.Dto; public sealed class SyncPlayerSegmentOnlineRequest : BaseIdRequest { /// - /// 目标区服Id(Online 作用域 ServerId,经租户归属校验)。 + /// 目标区服Id(Online 作用域 ServerId,经区服归属校验)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] 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/Match/Dto/OnlineMatchOverviewRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/OnlineMatchOverviewRequest.cs index b16823e1..9e5f7d23 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/OnlineMatchOverviewRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/OnlineMatchOverviewRequest.cs @@ -7,7 +7,7 @@ public class OnlineMatchOverviewRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchAbnormalTicketRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchAbnormalTicketRequest.cs index 3fa3a592..8962f5c7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchAbnormalTicketRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchAbnormalTicketRequest.cs @@ -7,7 +7,7 @@ public class PageOnlineMatchAbnormalTicketRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchFailureRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchFailureRequest.cs index cdce6d92..e3a66346 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchFailureRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Match/Dto/PageOnlineMatchFailureRequest.cs @@ -7,7 +7,7 @@ public class PageOnlineMatchFailureRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] 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..8e78a48d 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(deviceId:recordId) 前 4 字节 % 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..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/Dto/OnlineReportHandleRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlineReportHandleRequest.cs index 7efb3f1a..b90cec75 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlineReportHandleRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/OnlineReportHandleRequest.cs @@ -9,7 +9,7 @@ public class OnlineReportHandleRequest { /// - /// 区服作用域(案件所在区服,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(案件所在区服,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineMessageAuditRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineMessageAuditRequest.cs index ba9fd8a0..a6118f5f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineMessageAuditRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineMessageAuditRequest.cs @@ -10,7 +10,7 @@ public class PageOnlineMessageAuditRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineReportCaseRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineReportCaseRequest.cs index 6a794fa0..780d58d4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineReportCaseRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/Dto/PageOnlineReportCaseRequest.cs @@ -9,7 +9,7 @@ public class PageOnlineReportCaseRequest { /// - /// 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + /// 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 /// [Required(ErrorMessage = "区服Id不能为空")] [Range(1, long.MaxValue, ErrorMessage = "区服Id必须大于0")] 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..f01194ae 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 红线); @@ -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..424a4188 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlineReportCaseService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/GmCenter/Social/OnlineReportCaseService.cs @@ -10,9 +10,9 @@ namespace GameFrameX.Application.GmCenter.Social; /// /// Online 举报案件处置服务。路由前缀 /api/onlineReportCase(change C350 / vault:C7)。 -/// 案件数据实时透传 Online(Admin 不落镜像);处置流三步:事实源写入(Mute/Ban 落 TenantGamePenaltyEntity) +/// 案件数据实时透传 Online(Admin 不落镜像);处置流三步:事实源写入(Mute/Ban 落 GamePenaltyEntity) /// → 联动命令(经 ,失败不回滚事实源、可重试)→ 当事人通知 + 案件状态回写 -/// (失败不阻断处置,原因分别落响应字段)。三步状态经 MonitorLogging 自动落租户操作审计。 +/// (失败不阻断处置,原因分别落响应字段)。三步状态经 MonitorLogging 自动落管理员操作审计。 /// [ApiDescriptionSettings(GameConst.GroupName, Order = 130)] public class OnlineReportCaseService : IAdminApiController @@ -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..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_ 前缀表与无前缀业务表。"); } } @@ -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..1337ada8 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,8 +8,8 @@ namespace GameFrameX.Application.Platform.Email; /// 本类仅承担 Provider 名 → 的解析与转发;具体发送由 反射收集的各渠道实现承担。 /// 调用方传入已选中的 ;本类不读取数据库,避免重复选择策略。 /// 凭证解密收口(C370):落库密文(enc:sec:v1:)在 构建发送参数时经 -/// 解密——发信是所有 Provider 配置读取路径的唯一必经点,且为低频事件路径 -/// (租户生命周期 / 账单 / 安全通知),每信一次解密的 PBKDF2 派生开销在秒级投递耗时内,不引入缓存。 +/// 解密——发信是所有 Provider 配置读取路径的唯一必经点,且为低频事件路径 +/// (安全通知等),每信一次解密的 PBKDF2 派生开销在秒级投递耗时内,不引入缓存。 /// 入口校验(空配置 / 空收件人 / 未注册渠道)抛 ;渠道发送结果(含失败原因)经 返回。 /// public static class SystemEmailDispatcher @@ -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/SystemEmailProviderSelector.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailProviderSelector.cs index 77508a50..9ea034c1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailProviderSelector.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailProviderSelector.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Application.Platform.Email; /// 平台系统邮件 Provider 配置选择器。 /// 选择策略:Purpose 精确匹配 > 默认(Purpose = 0 / )。 /// 同匹配层按 Priority 降序,再按 UpdateTime DESC, Id DESC,保证选择结果确定。 -/// 本选择器不识别租户上下文;调用方负责传入正确的主库 。 +/// 本选择器不依赖请求上下文;调用方负责传入正确的主库 。 /// public static class SystemEmailProviderSelector { 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..95111a47 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/Email/SystemEmailSender.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailSender.cs index 3d3f7ec7..0ad1edf4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailSender.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/Email/SystemEmailSender.cs @@ -6,7 +6,7 @@ namespace GameFrameX.Application.Platform.Email; /// /// 平台系统邮件发送实现。 /// 从主库 SystemEmailProviderEntity 读取 Provider 配置;缺配置 / 缺凭据返回 false 并记录警告。 -/// 不得用于租户玩家邮件,也不得作为租户业务邮件的 fallback。 +/// 不得用于玩家邮件,也不得作为业务邮件的 fallback。 /// public sealed class SystemEmailSender : ISystemEmailSender { 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..f4052a8e 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 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.Tenant.Game.TenantGameHomeOnlineSampleEntity + await mainDb.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..f5946e20 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; @@ -14,18 +14,18 @@ public class SystemOpenAccessService : IAdminApiController { private readonly SqlSugarRepository _systemOpenAccessRepository; private readonly SystemCacheService _systemCacheService; - private readonly ISqlSugarClient _tenantDbConnectionProvider; + private readonly ISqlSugarClient _dbConnectionProvider; /// /// 开放接口身份服务构造函数 /// public SystemOpenAccessService(SqlSugarRepository systemOpenAccessRepository, SystemCacheService systemCacheService, - ISqlSugarClient tenantDbConnectionProvider) + ISqlSugarClient dbConnectionProvider) { _systemOpenAccessRepository = systemOpenAccessRepository; _systemCacheService = systemCacheService; - _tenantDbConnectionProvider = tenantDbConnectionProvider; + _dbConnectionProvider = 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 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); } - return new BoundTenantUser(user); + return new BoundUser(user); } finally { - tenantDb.QueryFilter.Restore(); + mainDb.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..86bc7d9e 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; + private readonly GameUserPasswordService _gameUserPasswordService; - public GameUserService(SqlSugarRepository repository, - GameUserPasswordService tenantGameUserPasswordService) : base(repository) + public GameUserService(SqlSugarRepository repository, + GameUserPasswordService gameUserPasswordService) : base(repository) { - _tenantGameUserPasswordService = tenantGameUserPasswordService; + _gameUserPasswordService = 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,10 +49,10 @@ public async Task AddByMailAsync(AddTenantGameUserEntityByMail throw new Exception("该邮箱已经被使用"); } - entity = input.Adapt(); - entity.EmailPassword = _tenantGameUserPasswordService.Hash(input.EmailPassword); + entity = input.Adapt(); + 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(); @@ -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..d486cf9d 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 覆盖)。 +/// 游戏运营配置表 表种子数据(出厂基线行;登录下发时按 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..e1c26136 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) / 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..6bd81f32 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..a50a49a5 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, @@ -64,7 +63,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -93,7 +91,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -122,7 +119,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -151,7 +147,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -180,23 +175,22 @@ 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 +203,22 @@ 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 +231,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -267,23 +259,22 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantChannelDefinition/index", + Name = "channelDefinition", + Path = "/clientDelivery/channelDefinition", + 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 +287,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -325,7 +315,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -354,7 +343,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -383,7 +371,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -411,7 +399,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -439,7 +427,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -467,7 +455,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -495,7 +483,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -523,7 +511,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987876, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -551,7 +539,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -579,7 +567,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -607,7 +595,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -635,7 +623,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -663,7 +651,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1705987916, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -691,7 +679,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -719,7 +707,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -747,7 +735,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -775,7 +763,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -803,7 +791,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -831,7 +819,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -859,7 +847,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -887,7 +875,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -915,7 +903,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -943,7 +931,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -971,7 +959,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -999,7 +987,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1027,7 +1015,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1055,7 +1043,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1083,7 +1071,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1706006569, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1111,7 +1099,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1139,7 +1127,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1167,7 +1155,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1195,7 +1183,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1223,7 +1211,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1251,7 +1239,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1279,7 +1267,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1307,7 +1295,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1335,7 +1323,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1745700000, UpdateTime = 1745700000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1363,14 +1351,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 +1379,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 +1407,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 +1435,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 +1463,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 +1491,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 +1519,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 +1547,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 +1575,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 +1603,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 +1631,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 +1659,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1699,7 +1687,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1727,7 +1715,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1755,7 +1743,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1783,7 +1771,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1811,7 +1799,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1839,7 +1827,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1867,7 +1855,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1895,7 +1883,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1923,7 +1911,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1951,7 +1939,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1786107600, UpdateTime = 1786107600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1979,7 +1967,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2007,7 +1995,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2035,7 +2023,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2063,7 +2051,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -2092,7 +2079,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2120,7 +2107,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2148,7 +2135,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2176,7 +2163,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2204,7 +2191,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2232,7 +2219,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2260,7 +2247,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2288,7 +2275,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2316,7 +2303,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -2345,7 +2331,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2373,7 +2359,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2401,7 +2387,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2429,7 +2415,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2457,7 +2443,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2485,7 +2471,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2513,7 +2499,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2541,7 +2527,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -2570,7 +2555,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -2599,7 +2583,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -2628,23 +2611,22 @@ 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 +2639,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 +2667,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 +2695,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 +2723,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 +2751,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 +2779,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1781716500, UpdateTime = 1781716500, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -2826,7 +2807,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1789603200, UpdateTime = 1789603200, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -2855,7 +2835,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2883,7 +2863,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2911,12 +2891,12 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - // A4: 支付配置 Schema 查询按钮权限。原先缺失该 Button 种子,/api/gamePaymentConfig/schema 无显式绑定 → 租户 403。 + // A4: 支付配置 Schema 查询按钮权限。原先缺失该 Button 种子,/api/gamePaymentConfig/schema 无显式绑定 → 管理员 403。 // 页面加载需要读取配置 schema。 Id = StableSeedId.Menu("gamePaymentConfigEntity:schema"), Key = "gamePaymentConfigEntity:schema", @@ -2941,7 +2921,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2969,7 +2949,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -2997,7 +2977,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3025,23 +3005,22 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantAdvertisementCallbackConfigEntity/index", + Name = "advertisementCallbackConfigEntity", + Path = "/clientDelivery/advertisementCallbackConfigEntity", + 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 +3033,24 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantGameAdvertisementRewardEntity/index", + Name = "gameAdvertisementRewardEntity", + Path = "/clientDelivery/gameAdvertisementRewardEntity", + 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 +3063,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 +3091,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 +3119,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 +3147,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 +3175,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 +3203,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 +3231,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 +3259,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 +3287,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 +3315,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 +3343,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, // 「Client API 配置」组:本组各页即四类凭证分类法的管理面(应用身份 AppSecret / 传输签名 HMAC+OpenAccess / @@ -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, @@ -3398,23 +3375,22 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantClientApiPolicyEntity/index", + Name = "clientApiPolicyEntity", + Path = "/clientDelivery/clientApiPolicyEntity", + 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,18 +3403,17 @@ 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, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.PageAsync)), @@ -3456,18 +3431,17 @@ 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, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.AddAsync)), @@ -3485,18 +3459,17 @@ 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, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.UpdateAsync)), @@ -3514,18 +3487,17 @@ 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, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.RotateAsync)), @@ -3543,18 +3515,17 @@ 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, - AppScope = MenuAppScopeEnum.Console, Component = null, Redirect = null, Permission = MenuSeedRouteName.Of(nameof(ClientApiPolicyService.DeleteAsync)), @@ -3572,23 +3543,22 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantGameLoginTicketKeyEntity/index", + Name = "gameLoginTicketKeyEntity", + Path = "/clientDelivery/gameLoginTicketKeyEntity", + 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 +3571,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 +3599,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 +3627,22 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantAppSignatureKeyEntity/index", + Name = "appSignatureKeyEntity", + Path = "/clientDelivery/appSignatureKeyEntity", + 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 +3655,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 +3683,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 +3711,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3751,7 +3720,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 +3741,22 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/clientDelivery/tenantSessionKeyEntity/index", + Name = "sessionKeyEntity", + Path = "/clientDelivery/sessionKeyEntity", + 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 +3769,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 +3797,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 +3825,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3865,7 +3833,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 +3854,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3914,7 +3882,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -3942,14 +3910,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 +3938,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 +3966,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -4026,7 +3994,7 @@ private static IEnumerable AppCenterMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -4054,7 +4022,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..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, @@ -43,7 +42,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -71,7 +70,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -99,7 +98,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -127,7 +126,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -155,7 +154,7 @@ private static IEnumerable AutomationMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -183,7 +182,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..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, @@ -48,7 +47,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -77,7 +75,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -106,7 +103,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -135,7 +131,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -164,7 +159,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -193,7 +187,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -222,7 +215,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -251,7 +243,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -279,7 +271,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -307,7 +299,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -335,7 +327,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -363,7 +355,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -391,7 +383,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792996, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -419,7 +411,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -447,7 +439,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -475,7 +467,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -503,7 +495,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -531,7 +523,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1706792999, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -559,7 +551,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -587,7 +579,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -615,7 +607,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -643,7 +635,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -671,7 +663,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -699,7 +691,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -727,7 +719,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -755,7 +747,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -783,7 +775,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -811,7 +803,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -839,7 +831,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -867,7 +859,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -895,7 +887,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -923,7 +915,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -951,7 +943,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -979,7 +971,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1007,7 +999,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1035,7 +1027,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1063,7 +1055,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1091,7 +1083,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1119,7 +1111,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1147,7 +1139,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1175,7 +1167,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1203,7 +1195,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1231,7 +1223,7 @@ private static IEnumerable ContentMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1259,7 +1251,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..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, @@ -42,7 +41,7 @@ private static IEnumerable DashboardMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -71,7 +69,7 @@ private static IEnumerable DashboardMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -99,7 +97,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..7bc8f601 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, @@ -47,7 +46,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1706793684, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -76,7 +74,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -104,7 +102,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -132,7 +130,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -161,7 +158,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1785168000, UpdateTime = 1785168000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -189,7 +186,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1785168000, UpdateTime = 1785168000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -217,7 +214,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1785168000, UpdateTime = 1785168000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -246,7 +242,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -274,7 +270,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -302,7 +298,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -331,7 +326,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -359,7 +354,7 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -387,12 +382,12 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1792377600, UpdateTime = 1792377600, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() { - // 平台/语言定义管理页已退场;本按钮仍是租户可读的下拉数据源(发布版本、分包、功能开关等页),改挂全局配置目录保留授权。 + // 平台/语言定义管理页已退场;本按钮仍是管理员可读的下拉数据源(发布版本、分包、功能开关等页),改挂全局配置目录保留授权。 Id = StableSeedId.Menu("globalPlatform:Select"), Key = "globalPlatform:Select", Pid = StableSeedId.Menu("route:globalConfig"), @@ -416,12 +411,12 @@ private static IEnumerable GlobalConfigMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = true, + AllowAdminWhenSuperAdminOnly = true, IsDeleted = false, }, new() { - // 平台/语言定义管理页已退场;本按钮仍是租户可读的下拉数据源(发布版本、分包、功能开关等页),改挂全局配置目录保留授权。 + // 平台/语言定义管理页已退场;本按钮仍是管理员可读的下拉数据源(发布版本、分包、功能开关等页),改挂全局配置目录保留授权。 Id = StableSeedId.Menu("globalLanguage:Select"), Key = "globalLanguage:Select", Pid = StableSeedId.Menu("route:globalConfig"), @@ -445,7 +440,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..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, @@ -45,7 +44,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -73,7 +72,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -101,7 +100,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -129,7 +128,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -157,7 +156,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -185,7 +184,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -213,7 +212,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -241,7 +240,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -269,7 +268,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -297,7 +296,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -325,7 +324,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -353,7 +352,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -381,7 +380,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -409,7 +408,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -437,7 +436,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -465,7 +464,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -493,7 +492,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -522,7 +520,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -551,7 +548,7 @@ private static IEnumerable GoodsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -579,7 +576,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..b646b420 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 @@ -17,7 +17,7 @@ namespace GameFrameX.Application.SeedData.System; /// /// Online LiveOps 域菜单种子(partial;由 聚合;来源 change C343 / vault:C8 S7.7 + C340 资产三页 / vault:C4 S3.7(2026-09-13 rebase 并集))。 /// C366(2026-09-16):容器 route:onlineCenter 归入在线运维顶层根(Pid=0、Path=/gmCenter),全部叶子前缀收敛为 /gmCenter/*; -/// Key/Id 不变,存量租户 role-menu 绑定无感。 +/// Key/Id 不变,存量 role-menu 绑定无感。 /// 容器行 route:onlineCenter 与 C340(Online 平台管理)§3 规格逐字段一致——并行 change 同定义时 seed upsert 按 StableSeedId 幂等合并; /// 三个既有运营域页面的 dispatchOnline 按钮行也集中在本文件(C343 增量),避免散插多域 partial 加剧并行冲突。 /// @@ -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, @@ -53,7 +52,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -81,7 +80,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -109,7 +108,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -137,7 +136,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -165,7 +164,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -193,7 +192,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -222,7 +220,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -250,7 +248,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -278,7 +276,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -306,7 +304,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, // ---- 三个既有运营域页面的 dispatchOnline 按钮(C343 增量,集中本文件)---- @@ -335,7 +333,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -363,7 +361,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -391,7 +389,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -420,7 +417,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -449,7 +445,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -478,7 +473,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -506,12 +501,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 +530,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 +559,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -592,7 +587,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -620,7 +615,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, // ---- C344 控制台三页面(在线总览 / 玩家时间线 / 统一审计检索)---- @@ -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, @@ -651,7 +645,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -680,7 +673,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -709,7 +701,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -739,9 +730,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 +760,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -797,7 +788,7 @@ private static IEnumerable OnlineMenus() CreatedTime = 1789257600, UpdateTime = 1789257600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -825,9 +816,9 @@ private static IEnumerable OnlineMenus() Remark = null, CreatedTime = 1789257600, UpdateTime = 1789257600, - // 高危:仅租户管理员可见可执行(与资产人工发放/撤销按钮口径一致);既有处罚/资产操作经各自页面端点直调,不经本按钮。 + // 高危:仅管理员角色可见可执行(与资产人工发放/撤销按钮口径一致);既有处罚/资产操作经各自页面端点直调,不经本按钮。 SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -855,7 +846,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..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, @@ -48,7 +47,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -77,7 +75,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -106,7 +103,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -134,7 +131,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -162,7 +159,7 @@ private static IEnumerable OnlineMatchMenus() CreatedTime = 1789344000, UpdateTime = 1789344000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -190,7 +187,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..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, @@ -44,7 +43,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -73,7 +71,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -101,7 +99,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -129,7 +127,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -157,7 +155,7 @@ private static IEnumerable OnlineSocialMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -186,7 +184,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..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", @@ -33,7 +32,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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", @@ -55,7 +53,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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", @@ -77,7 +74,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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", @@ -99,7 +95,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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", @@ -121,7 +116,7 @@ private static IEnumerable OperationsRootMenus() CreatedTime = 1793808000, UpdateTime = 1793808000, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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", @@ -143,7 +137,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..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 @@ -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() @@ -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, @@ -494,7 +493,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1706793124, UpdateTime = 1706793160, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -523,7 +521,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -552,7 +549,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -580,7 +577,7 @@ private static IEnumerable OpsMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -609,7 +606,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..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, @@ -49,7 +48,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -78,7 +76,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -107,7 +104,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -136,7 +132,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -165,7 +160,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -194,7 +188,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -223,7 +216,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -252,7 +244,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -280,7 +272,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -308,7 +300,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -336,7 +328,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -364,7 +356,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -392,7 +384,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -420,7 +412,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -448,7 +440,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -476,7 +468,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -504,7 +496,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -532,7 +524,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -560,7 +552,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -588,7 +580,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -616,7 +608,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -644,7 +636,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -672,7 +664,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -700,7 +692,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -728,7 +720,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -756,7 +748,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -784,7 +776,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -812,7 +804,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -840,7 +832,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -868,7 +860,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -897,7 +888,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -925,7 +916,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -953,7 +944,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -981,7 +972,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1009,7 +1000,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1037,7 +1028,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1750000000, UpdateTime = 1750000000, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1066,7 +1056,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1095,7 +1084,7 @@ private static IEnumerable PlatformMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1124,7 +1112,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..8299740a 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, @@ -47,7 +46,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1748361600, UpdateTime = 1748361600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -76,7 +74,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1706087997, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -105,7 +102,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -134,7 +130,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -162,7 +158,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1706087997, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -190,7 +186,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1706087997, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -218,7 +214,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -246,7 +242,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -274,13 +270,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 一致)。 + // C1: 邮箱新增用户按钮权限。原先缺失该 Button 种子,/api/gameUser/addByMail 无显式绑定 → 管理员 403。 + // 父菜单 route:gameUserEntity 已含 Admin,按钮经 ShouldSyncToRole 自动授予管理员角色(与 :add 一致)。 Id = StableSeedId.Menu("gameUserEntity:addByMail"), Key = "gameUserEntity:addByMail", Pid = StableSeedId.Menu("route:gameUserEntity"), @@ -304,7 +300,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -332,7 +328,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -360,7 +356,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -388,7 +384,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -416,7 +412,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -444,7 +440,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -472,7 +468,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -502,7 +497,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -530,7 +525,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -558,7 +553,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -586,7 +581,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -614,7 +609,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -642,7 +637,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -670,7 +665,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -698,7 +693,7 @@ private static IEnumerable PlayerMenus() CreatedTime = 1783612800, UpdateTime = 1783612800, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -726,7 +721,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..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 @@ -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() @@ -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, @@ -465,7 +464,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1706791008, UpdateTime = 0, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -494,7 +492,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -523,7 +520,7 @@ private static IEnumerable RedeemCodeMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -551,7 +548,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..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, @@ -63,7 +62,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 +94,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.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 9c847226..00103e8e 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, @@ -48,7 +47,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -77,7 +75,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -106,7 +103,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -135,7 +131,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -164,23 +159,22 @@ 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", - AppScope = MenuAppScopeEnum.Console, - Component = "/system/tenantObjectStorageConfigEntity/index", + Name = "objectStorageConfigEntity", + Path = "/system/objectStorageConfigEntity", + 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 +187,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -206,7 +200,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 +215,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -234,7 +228,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 +243,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -262,7 +256,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 +271,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -290,7 +284,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 +299,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -318,7 +312,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 +327,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -346,7 +340,7 @@ private static IEnumerable SystemMenus() Path = null, Component = null, Redirect = null, - Permission = "tenantUser:detail", + Permission = "user:detail", Title = "详情", TitleCode = null, Icon = null, @@ -361,7 +355,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -374,7 +368,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 +383,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -402,7 +396,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 +411,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -430,7 +424,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 +439,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -458,7 +452,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 +467,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -486,7 +480,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 +495,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -514,7 +508,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 +523,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -542,7 +536,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 +551,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -570,7 +564,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 +579,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -598,7 +592,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 +607,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -626,7 +620,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 +635,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -654,7 +648,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 +663,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -682,7 +676,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 +691,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -710,7 +704,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 +719,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -738,7 +732,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 +747,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -766,7 +760,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 +775,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 +803,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 +831,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 +859,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 +887,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 +915,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 +943,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 +971,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 +999,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1784073600, UpdateTime = 1784073600, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1034,7 +1027,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1047,7 +1040,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 +1055,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1075,7 +1068,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 +1083,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1103,7 +1096,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 +1111,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1131,7 +1124,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 +1139,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1159,7 +1152,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 +1167,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1203,7 +1195,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1232,7 +1223,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1261,7 +1251,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1290,7 +1279,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1318,7 +1307,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1346,7 +1335,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1374,7 +1363,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1402,7 +1391,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1430,7 +1419,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1458,7 +1447,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1486,7 +1475,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1514,7 +1503,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1542,7 +1531,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1570,7 +1559,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1706499485, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -1599,10 +1587,10 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, // B5: 渠道定义为全局配置,仅超管可见(与 route:appplatform 一致)。 - // 2026-10-20 修正:父级原挂租户侧 route:system(租户系统管理组),SuperAdminOnly 过滤后 - // 租户树与超管树均不可达(超管树不含 route:system 组)——改挂 route:globalConfig 全局配置组。 + // 2026-10-20 修正:父级原挂业务侧 route:system(业务系统管理组),SuperAdminOnly 过滤后 + // 管理员树与超管树均不可达(超管树不含 route:system 组)——改挂 route:globalConfig 全局配置组。 SuperAdminOnly = true, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1630,7 +1618,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1658,7 +1646,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1686,7 +1674,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1714,7 +1702,7 @@ private static IEnumerable SystemMenus() CreatedTime = 1705984444, UpdateTime = 1706793684, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -1742,7 +1730,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..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, @@ -52,7 +51,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -80,7 +79,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -108,7 +107,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -136,7 +135,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -166,7 +164,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = 1783612800, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -194,7 +192,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -222,7 +220,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -250,7 +248,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -278,7 +276,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -306,7 +304,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -334,7 +332,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -363,7 +360,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -391,7 +388,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -419,7 +416,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -447,7 +444,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -476,7 +472,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -504,7 +500,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -532,7 +528,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -560,7 +556,7 @@ private static IEnumerable TrustCenterMenus() CreatedTime = createdTime, UpdateTime = createdTime, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -588,12 +584,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", @@ -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, @@ -619,7 +614,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..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 @@ -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() @@ -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, @@ -296,7 +295,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -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, @@ -325,7 +323,7 @@ private static IEnumerable WebShopMenus() CreatedTime = 1774228858, UpdateTime = 1774228858, SuperAdminOnly = false, - AllowTenantWhenSuperAdminOnly = false, + AllowAdminWhenSuperAdminOnly = false, IsDeleted = false, }, new() @@ -353,7 +351,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..14d47473 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Application/ServerCenter/Online/OnlineServerClient.cs @@ -9,13 +9,26 @@ 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; + private readonly SqlSugarRepository _gameAreaRepository; public OnlineServerClient(HttpClient httpClient, IOnlineServerEndpointResolver endpointResolver, - SqlSugarRepository gameAreaRepository) + SqlSugarRepository gameAreaRepository) { _httpClient = httpClient; _endpointResolver = endpointResolver; @@ -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.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/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/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..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,13 +16,19 @@ namespace GameFrameX.Client.Api.GameRole; /// /// 程序版本控制器 /// -public class GameRoleController : BaseController +public class GameRoleController : BaseController { + private static readonly string[] IdentityOverrideFieldNames = + { + "userId", // 覆盖令牌解析出的账号身份 + "accountId", // 覆盖同一账号身份的别名 + }; + 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; /// /// @@ -31,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; } /// @@ -101,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, "区服不存在"); @@ -141,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(); @@ -165,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) @@ -185,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); @@ -201,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); @@ -222,9 +228,9 @@ public async Task>> GetList([FromBody] [ProducesResponseType(200, Type = typeof(GameLoginTicketResponse))] public async Task> Login([FromBody] GamePlayerLoginRequest input) { - if (HasForbiddenContextField(input)) + if (HasForbiddenIdentityOverrideField(input)) { - return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "请求体不能包含租户、应用或账号上下文字段"); + return GameApiResult.Error(AuthErrorCode.AuthorizeInvalid, "请求体不能包含身份覆盖字段"); } var tokenValidation = await _clientApiTokenIssuer.ValidateAsync(input.AccessToken); @@ -233,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"); @@ -253,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"); @@ -261,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"); @@ -291,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"); @@ -318,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 @@ -359,20 +365,17 @@ private bool TryGetContextLong(string key, out long value) return long.TryParse(item.ToString(), out value); } - private static bool HasForbiddenContextField(GamePlayerLoginRequest input) + private static bool HasForbiddenIdentityOverrideField(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)); + 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()) { @@ -406,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(); @@ -420,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)) { @@ -437,4 +440,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/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..2b916c8f 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,13 +19,13 @@ 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 IGamePenaltyEnforcementService _tenantGamePenaltyEnforcementService; - private readonly GameUserPasswordService _tenantGameUserPasswordService; + private readonly Repository _gameUserEmailService; + private readonly IGamePenaltyEnforcementService _gamePenaltyEnforcementService; + private readonly GameUserPasswordService _gameUserPasswordService; /*private readonly GoogleOAuth2Service _googleOAuth2Service;*/ @@ -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; + _gamePenaltyEnforcementService = gamePenaltyEnforcementService; + _gameUserPasswordService = gameUserPasswordService; /*_googleOAuth2Service = googleOAuth2Service;*/ } @@ -63,38 +63,38 @@ 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; - 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); 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,28 +143,28 @@ 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账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.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,38 +195,38 @@ 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; - 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); 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,28 +276,28 @@ 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账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.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,38 +328,38 @@ 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; - 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); 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,28 +409,28 @@ 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账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.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 @@ -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) { @@ -494,36 +494,36 @@ 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; - entity.EmailPassword = _tenantGameUserPasswordService.Hash(input.Password); + entity.EmailPassword = _gameUserPasswordService.Hash(input.Password); EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); 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, "账号或密码错误"); + _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, "账号或密码错误"); + 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,45 +569,45 @@ 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, "验证码错误或已过期,请重新获取验证码。"); } // 更新用户的邮箱账号信息 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) { - 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,28 +617,28 @@ 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, "用户未绑定邮箱账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.EmailPassword)) + if (!_gameUserPasswordService.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,28 +667,28 @@ 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); + entity.Password = _gameUserPasswordService.Hash(input.Password); EnsureUserStringDefaults(entity); var insertAsync = await PRepository.InsertAsync(entity); 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, "账号或密码错误"); + _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, "账号或密码错误"); + 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,27 +735,27 @@ 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, 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 归属使用 // 不受影响,如需严格唯一,升级点在 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,38 +864,38 @@ 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; - 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); 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,28 +904,28 @@ 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账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) + if (!_gameUserPasswordService.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,38 +996,38 @@ 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; - 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); 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,28 +1036,28 @@ 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, "用户未绑定谷歌账号"); } // 如果提供了密码,验证密码是否正确(可选的安全验证) if (!string.IsNullOrEmpty(input.Password)) { - if (!_tenantGameUserPasswordService.Verify(input.Password, entity.Password)) + if (!_gameUserPasswordService.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,10 +1224,10 @@ 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()); + var blocking = await _gamePenaltyEnforcementService.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Account, entity.Id.ToString()); if (blocking != null) { throw new PenaltyLoginBlockedException((int)AccountErrorCode.AccountBanned, $"账号已被封禁:{blocking.Reason}"); @@ -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..ee9a0ac5 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,18 +21,18 @@ 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; /// /// /// /// 支付订单仓储 - /// 租户配置 Provider(沙箱充值发货开关,C378 起读策略合并表) + /// 运行配置 Provider(沙箱充值发货开关,C378 起读策略合并表) /// 支付收据验真器 - public GameUserPayController(Repository payOrderRepository, - IClientApiTenantOptionsProvider optionsProvider, + public GameUserPayController(Repository payOrderRepository, + IClientApiOptionsProvider optionsProvider, IPayReceiptVerifier payReceiptVerifier) { _payOrderRepository = payOrderRepository; @@ -42,8 +42,8 @@ public GameUserPayController(Repository payOrderRepositor /// /// 支付下单(生成对外单号落库,Status=Unpaid)。 - /// 沙箱判定服务端权威(防客户端伪造免支付白嫖):读租户订单策略表 EnableSandBoxRecharge, - /// 与 Client.Api 下单尾部同源同优先级(应用级 > 租户默认);命中 → Status=Shipped + IsNeedPay=false + /// 沙箱判定服务端权威(防客户端伪造免支付白嫖):读订单策略表 EnableSandBoxRecharge, + /// 与 Client.Api 下单尾部同源同优先级;命中 → Status=Shipped + IsNeedPay=false /// (沙箱直发闭环,免 Verify);未命中 → IsNeedPay=true。 /// /// @@ -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..c087b00f 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..e51dcbef 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,30 @@ 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.Client.Api.Integrations.Payment; using GameFrameX.Core.Service; namespace GameFrameX.Client.Api.Integrations.Advertisement; /// /// 广告服务器回调。 -/// 广告网络回调不携带 X-Api-Key,必须先由公开回调 URL 路由参数建立租户上下文,再通过 读取该租户的验签材料。 -/// 无法解析租户或租户未配置验签材料时安全拒绝,禁止逐租户扫描或回落到进程级 key。 +/// 广告网络回调不携带 X-Api-Key,必须先由公开回调 URL 的 packageId 路由参数建立包上下文,再通过 读取该包的验签材料。 +/// 无法解析包或包未配置验签材料时安全拒绝,禁止全表扫描或回落到进程级 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 +42,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(); @@ -51,10 +52,10 @@ public async Task TopOnNotify() /// /// PangleGlobal通知。 - /// 租户身份只来自公开回调 URL 路由上下文;验签走 (仅验签,不进发奖链路),签名通过后才允许查询广告发放记录。 + /// 包身份只来自公开回调 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(); @@ -83,10 +84,10 @@ public async Task PangleGlobalNotify([FromQuery] AdvertisementPangle /// /// Google AdMob奖励视频广告回调通知。 /// 验签 + 幂等账本 + 发奖由 处理。 - /// 发放成功后保留对 的写入(C75/C91 应用作用域事实,范围外不动)。 + /// 发放成功后保留对 的写入(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 +108,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(); @@ -116,7 +117,7 @@ public async Task UnityAdsNotify([FromQuery] AdvertisementUnityAdsCa } /// - /// 发放成功后写入 角色广告事实(C75/C91 应用作用域,保留不改)。 + /// 发放成功后写入 角色广告事实(C75/C91 应用作用域,保留不改)。 /// private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest input) { @@ -143,9 +144,19 @@ private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest inp return; } - var gameRoleAdvertisementEntity = new TenantGameRoleAdvertisementEntity + // 角色广告事实的 PackageId 与验签所选配置一致:取公开回调路由上下文的 packageId; + // 必填路由下正常必有值,缺失即异常请求,fail-closed 不写 0 哨兵 + var packageId = PaymentOptionSettingProvider.GetCurrentPackageId(HttpContext); + if (!packageId.HasValue) + { + LogHelper.Error($"AdMob GameRoleAdvertisementEntity 写入跳过:回调路由缺少 packageId,TransId={input.TransactionId}"); + return; + } + + var gameRoleAdvertisementEntity = new GameRoleAdvertisementEntity { TransId = input.TransactionId, + PackageId = packageId.Value, UserId = userId, RoleId = playerId.ToString(), AreaId = gameRoleEntity.AreaId, @@ -156,7 +167,7 @@ private async Task WriteAdMobRoleAdvertisementFactAsync(AdMobCallbackRequest inp } catch (Exception ex) { - LogHelper.Error($"AdMob TenantGameRoleAdvertisementEntity 写入异常: {ex.Message}", ex); + LogHelper.Error($"AdMob GameRoleAdvertisementEntity 写入异常: {ex.Message}", ex); } } @@ -197,4 +208,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/Advertisement/GameAdvertisementRewardService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Integrations/Advertisement/GameAdvertisementRewardService.cs index 68ea369c..d85e56e6 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,9 +134,9 @@ 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 ledgerTemplate = BuildLedger(providerCanonical, advertisementOptions.PackageId, idempotencyKey, payload, null, TimerHelper.UnixTimeSeconds()); var store = new AdvertisementRewardLedgerIdempotencyStore(_rewardRepository, ledgerTemplate); var coordinator = new IdempotencyCoordinator(store, SystemClock.Instance, AdvertisementRewardLedgerIdempotencyStore.CreateCoordinatorOptions()); var identifier = new IdempotencyRecordIdentifier(AdvertisementRewardLedgerIdempotencyStore.IdempotencyScope, idempotencyKey); @@ -252,14 +252,16 @@ await _rewardRepository.AsUpdateable() .ExecuteCommandAsync(); } - private static TenantGameAdvertisementRewardEntity BuildLedger(string providerCanonical, + private static GameAdvertisementRewardEntity BuildLedger(string providerCanonical, + long packageId, string idempotencyKey, VerifiedPayload payload, RoleResolution? resolution, long createdTime) { - return new TenantGameAdvertisementRewardEntity + return new GameAdvertisementRewardEntity { + PackageId = packageId, Provider = providerCanonical, TransactionId = payload.TransactionId, AdvertisementUnit = payload.AdvertisementUnit, 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..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 @@ -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(); } @@ -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..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; @@ -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 起库内敏感字段密文; @@ -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 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(); } @@ -163,8 +163,7 @@ private List GetPaymentConfigs(string channelName /// /// 按公开回调路由规范化支付渠道的回调通知地址(C401,GFX-1213):站点根地址自动补全路由段 - /// (含当前分包段),旧「回调/{tenantId}/{appId}/{packageId}」三段地址自动去段重建; - /// 无法识别的地址置空并由支付处理器按「通知地址未配置」拒绝下单,避免网关回调打在无法命中的地址上 + /// (含当前分包段);旧地址无法识别时置空并由支付处理器按「通知地址未配置」拒绝下单,避免网关回调打在无法命中的地址上 /// 导致已付款订单不发货。其余渠道地址原样透传。 /// /// 渠道名称(已小写规范化)。 @@ -223,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; } @@ -234,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/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..25d66b84 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; @@ -87,6 +87,7 @@ private static async Task Main(string[] args) // 主库连接统一走 DbConnection 节 + GFX_MAIN_DB_* 单一入口(C269);LauncherOptions 裸参数仅作兼容兜底 var mainDbConfig = HostMainDbConnectionResolver.Resolve(builder.Configuration, launcherOptions); var sqlSugar = SqlSugarClientConfig.AddSqlSugarClientService(mainDbConfig); + LegacySchemaStartupGuard.EnsureNotLegacySchema(sqlSugar, mainDbConfig); builder.Services.AddSingleton(sqlSugar); // 单例注册 builder.Services.AddScoped(typeof(Repository<>)); // 仓储注册 @@ -109,22 +110,22 @@ 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.AddScoped(); - // 广告奖励发放账本服务(C114 / GFX-110):依赖 Repository + IClientApiTenantOptionsProvider + HttpClient + IHttpContextAccessor + builder.Services.AddSingleton(); // 公开 provider 回调 URL -> 分包上下文解析 + // Client API 请求期配置 Provider:依赖 IHttpContextAccessor + ISqlSugarClient,按请求读取主库配置 + builder.Services.AddScoped(); + // 广告奖励发放账本服务(C114 / GFX-110):依赖 Repository + IClientApiOptionsProvider + HttpClient + IHttpContextAccessor builder.Services.AddAdvertisementCallbacks(); builder.Services.AddScoped(); builder.Services.AddScoped(); - // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 租户仓储,随请求作用域解析) + // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 主库仓储,随请求作用域解析) builder.Services.AddScoped(); - // 邮件分域:租户业务邮件(玩家注册 / 找回密码);平台系统邮件(SystemMessageService 等)走 ISystemEmailSender - builder.Services.AddScoped(); + // 邮件分域:业务邮件(玩家注册 / 找回密码);平台系统邮件(SystemMessageService 等)走 ISystemEmailSender + builder.Services.AddScoped(); builder.Services.AddSingleton(); - // Token / Ticket 签发服务依赖 IClientApiTenantOptionsProvider(Scoped),必须随之降为 Scoped + // Token / Ticket 签发服务依赖 IClientApiOptionsProvider(Scoped),必须随之降为 Scoped builder.Services.AddScoped(); - // C7 登录会话密钥签发:依赖 Scoped 租户仓储(SqlSugarRepository<>),随请求作用域 + // C7 登录会话密钥签发:依赖 Scoped 主库仓储(SqlSugarRepository<>),随请求作用域 builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); @@ -134,9 +135,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 +178,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(); @@ -224,4 +225,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/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..511f3763 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 @@ -74,7 +74,7 @@ public async Task ValidateAsync(string token) var policy = await _optionsProvider.GetTokenPolicyAsync(); if (policy.SigningKey == null) { - // 当前租户未配置签名密钥,无法校验任何令牌 + // 当前策略行未配置签名密钥,无法校验任何令牌 return ClientApiTokenValidationResponse.Fail; } 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 56% 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..38e694e3 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 67% 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..837b5f8a 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 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) { - _tenantDbProvider = database; + _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 = _tenantDbProvider; - var entity = await TenantEmailConfigSelector.SelectAsync(db, 0); + var db = _database; + 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,8 +67,9 @@ public async Task GetAdvertisementCallbackOp var signingSecret = GetConfigValue(configValues, "signingSecret"); var verificationKeys = GetConfigValue(configValues, "verificationKeys"); - return new TenantAdvertisementCallbackOptions + return new AdvertisementCallbackOptions { + PackageId = entity.PackageId, Provider = entity.Provider, CallbackUrl = GetConfigValue(configValues, "callbackUrl", entity.CallbackUrl), SigningSecret = signingSecret, @@ -82,33 +83,41 @@ public async Task GetAdvertisementCallbackOp } #pragma warning restore CS8603 - private async Task PickAdvertisementCallbackConfigAsync() + private async Task PickAdvertisementCallbackConfigAsync() { - var db = _tenantDbProvider; + var db = _database; var provider = ResolvePublicCallbackProvider(_httpContextAccessor.HttpContext); - var query = db.Queryable() - .Where(c => c.IsEnabled == true); - var candidates = await query.ToListAsync(); - if (!string.IsNullOrWhiteSpace(provider)) - { - candidates = candidates - .Where(c => string.Equals(NormalizeAdvertisementProvider(c.Provider), provider, StringComparison.OrdinalIgnoreCase)) - .ToList(); + var packageId = ResolvePublicCallbackPackageId(_httpContextAccessor.HttpContext); + if (!packageId.HasValue) + { + return null; + } + + // R5 精确命中要求「分包 + provider + 启用」三要素齐备:provider 缺失时不得退化为该分包唯一配置的兜底选取, + // 直接拒绝(fail closed),避免请求上下文异常时误用其他 provider 的验签材料。 + if (string.IsNullOrWhiteSpace(provider)) + { + return null; } - return candidates - .OrderByDescending(c => c.Id) - .FirstOrDefault(); + var candidates = await db.Queryable() + .Where(c => c.IsEnabled == true && c.PackageId == packageId.Value) + .ToListAsync(); + candidates = candidates + .Where(c => string.Equals(NormalizeAdvertisementProvider(c.Provider), provider, StringComparison.OrdinalIgnoreCase)) + .ToList(); + + return candidates.Count == 1 ? candidates[0] : null; } /// - 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 +125,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 +137,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 _database.Queryable() .Where(c => c.IsEnabled == true) .OrderByDescending(c => c.Id) .FirstAsync(); @@ -170,6 +179,16 @@ routeContextObj is PublicCallbackRouteContext routeContext : string.Empty; } + private static long? ResolvePublicCallbackPackageId(HttpContext? context) + { + return context != null && + context.Items.TryGetValue(PublicCallbackRouteContext.ItemKey, out var routeContextObj) && + routeContextObj is PublicCallbackRouteContext routeContext && + routeContext.PackageId is > 0 + ? routeContext.PackageId.Value + : null; + } + internal static string NormalizeAdvertisementProvider(string provider) { return provider?.Trim().ToLowerInvariant() switch @@ -249,4 +268,4 @@ private static string GetConfigValue(IReadOnlyDictionary values, ? value : fallback ?? string.Empty; } -} \ No newline at end of file +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiPlatformDefaults.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiPlatformDefaults.cs similarity index 85% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiPlatformDefaults.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiPlatformDefaults.cs index ea877ecf..79cb1793 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiTenantOptions/ClientApiPlatformDefaults.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/ClientApiOptions/ClientApiPlatformDefaults.cs @@ -1,10 +1,10 @@ -namespace GameFrameX.Client.Api.Services.ClientApiTenantOptions; +namespace GameFrameX.Client.Api.Services.ClientApiOptions; /// /// Client API 平台默认策略常量(SuperAdmin 视角的非秘密默认值与安全上限)。 /// 仅覆盖白名单内的非秘密默认策略:访问令牌有效期、Game 登录票据有效期、首次签发自动建 key 开关。 /// Game 登录票据有效期以固定到期时间表达(TicketExpireTime);0 表示永不过期,非 0 值超出平台上限时按平台默认值 / 上限归一化。 -/// 签名密钥、邮件凭据、广告 key 等秘密材料不在此处,必须按租户从数据库读取。 +/// 签名密钥、邮件凭据、广告 key 等秘密材料不在此处,必须按配置行从数据库读取。 /// public static class ClientApiPlatformDefaults { @@ -14,7 +14,7 @@ public static class ClientApiPlatformDefaults public const int ClientApiTokenLifetimeMinutesDefault = 1440; /// - /// 访问令牌有效期上限(分钟)。10080 分钟 = 7 天,防止租户配置过长有效期。 + /// 访问令牌有效期上限(分钟)。10080 分钟 = 7 天,防止配置过长有效期。 /// public const int ClientApiTokenLifetimeMinutesMax = 10080; @@ -29,7 +29,7 @@ public static class ClientApiPlatformDefaults public const int GameLoginTicketLifetimeSecondsMax = 2592000; /// - /// 首次签发自动创建租户应用级 RSA key 的默认行为。 + /// 首次签发自动创建应用级 RSA key 的默认行为。 /// public const bool GameLoginTicketKeyAutoCreateDefault = true; @@ -46,7 +46,7 @@ public static class ClientApiPlatformDefaults /// /// 将访问令牌有效期钳制到平台上限内的安全值。 /// - /// 租户配置值;<=0 表示未配置,使用默认值。 + /// 配置值;<=0 表示未配置,使用默认值。 /// 钳制后的有效期分钟数,至少 1 分钟。 public static int ClampTokenLifetimeMinutes(int configured) { @@ -61,7 +61,7 @@ public static int ClampTokenLifetimeMinutes(int configured) /// /// 将 Game 登录票据到期时间归一化到平台允许范围内。 /// - /// 租户配置的 Unix 秒到期时间;0 表示永不过期,正数小于等于当前时间表示已过期。 + /// 配置的 Unix 秒到期时间;0 表示永不过期,正数小于等于当前时间表示已过期。 /// 当前 Unix 秒。 /// 归一化后的 Unix 秒到期时间。 public static long NormalizeGameLoginTicketExpireTime(long configuredExpireTime, long now) 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 59% 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..69c98bda 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 表示该租户尚未配置签名密钥。 +/// 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 60% 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..b8b453b0 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 到系统邮件。 +/// 业务邮件配置快照。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 57% 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..c0b5e309 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 部分)。 +/// Game 登录票据策略(非 key 部分)。 /// -public sealed class TenantGameLoginTicketPolicyOptions +public sealed class GameLoginTicketPolicyOptions { /// /// 票据固定到期时间(Unix 秒);0 表示永不过期,非 0 值已按平台默认值和 30 天上限归一化。 @@ -11,7 +11,7 @@ public sealed class TenantGameLoginTicketPolicyOptions public long TicketExpireTime { get; init; } /// - /// 是否允许首次签发自动创建租户应用级 RSA key。 + /// 是否允许首次签发自动创建应用级 RSA key。 /// public bool EnableKeyAutoCreate { get; init; } } \ No newline at end of file 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 53% 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..008e15f5 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 到系统邮件。 + /// 读取业务邮件配置;未配置返回 null,调用方必须返回明确错误,不得 fallback 到系统邮件。 /// - Task GetEmailOptionsAsync(); + Task GetEmailOptionsAsync(); /// - /// 读取租户广告回调验签配置;未配置返回 null。 + /// 读取广告回调验签配置;未配置返回 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..9675c2e2 --- /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 53% 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..c20d294f 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/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 82% 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..4c6daba4 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 @@ -1,10 +1,10 @@ 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 60% 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..56a04176 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 @@ -1,13 +1,13 @@ namespace GameFrameX.Client.Api.Services.Email; /// -/// 租户业务邮件用途。 -/// 面向玩家 / 租户品牌发信;必须依赖当前租户上下文,缺配置时返回明确失败,不允许改用系统邮件。 +/// 业务邮件用途。 +/// 面向玩家发信;必须依赖当前配置上下文,缺配置时返回明确失败,不允许改用系统邮件。 /// -public enum TenantEmailPurpose +public enum EmailPurpose { /// - /// 通配租户业务邮件配置(Purpose=0)。 + /// 通配业务邮件配置(Purpose=0)。 /// Default = 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 69% 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..920a49f5 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,28 +9,28 @@ 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) { - LogHelper.Warning($"租户业务邮件未配置或凭据不完整,purpose={purpose}, receiver={receiverEmail};禁止 fallback 到系统邮件。"); + LogHelper.Warning($"业务邮件未配置或凭据不完整,purpose={purpose}, receiver={receiverEmail};禁止 fallback 到系统邮件。"); return false; } if (!EmailSenderRegistry.TryGet(snapshot.Provider, out var sender)) { - LogHelper.Warning($"租户业务邮件 Provider 未注册:{snapshot.Provider};禁止 fallback 到系统邮件。"); + LogHelper.Warning($"业务邮件 Provider 未注册:{snapshot.Provider};禁止 fallback 到系统邮件。"); return false; } @@ -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..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,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 ISqlSugarClient _database; + private readonly IClientApiOptionsProvider _optionsProvider; - public GameLoginTicketKeyResolver(ISqlSugarClient tenantDbProvider, IClientApiTenantOptionsProvider optionsProvider) + public GameLoginTicketKeyResolver(ISqlSugarClient database, IClientApiOptionsProvider optionsProvider) { - _tenantDbProvider = tenantDbProvider; + _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 = _tenantDbProvider; - return await db.Queryable() + var db = _database; + return await db.Queryable() .Where(x => x.IsEnabled != false && x.Algorithm == GameLoginTicketSigningKey.AlgorithmRs256 && (x.NotBeforeTime == null || x.NotBeforeTime <= now) && @@ -81,14 +81,14 @@ 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 + 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/GameLoginTicket/GameLoginTicketSigningKey.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketSigningKey.cs index 631936f7..de12e543 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketSigningKey.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/GameLoginTicket/GameLoginTicketSigningKey.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Client.Api.Services.GameLoginTicket; /// /// Game 登录票据签名 Key。 -/// HMAC fallback 随 C13 删除(P1 决策),生产签名唯一路径为租户应用级 RSA;本类不再保留 HMAC 构造工厂。 +/// HMAC fallback 随 C13 删除(P1 决策),生产签名唯一路径为应用级 RSA;本类不再保留 HMAC 构造工厂。 /// public sealed class GameLoginTicketSigningKey { 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/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..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 返回子包原名)。 @@ -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) { @@ -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..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.Client.Api/Services/PublicCallback/PublicCallbackRouteResolver.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Client.Api/Services/PublicCallback/PublicCallbackRouteResolver.cs index 16c0fcde..bf8737d3 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; @@ -45,6 +45,13 @@ public PublicCallbackRouteResolveResponse Resolve(HttpContext context) packageId = parsedPackageId; } + // 纵深防御(R5):广告回调路由已改为必填 {packageId:long},缺段请求在路由层即 404; + // 此分支保证不变量在解析层同样成立——未来若再出现可选 packageId 的广告端点或测试直调本解析器,仍 fail-closed 拒绝 + if (!packageId.HasValue && string.Equals(endpoint.CallbackKind, "ad", StringComparison.OrdinalIgnoreCase)) + { + return PublicCallbackRouteResolveResponse.Fail("广告回调必须包含 packageId"); + } + if (packageId.HasValue && !PackageMatches(packageId.Value)) { return PublicCallbackRouteResolveResponse.Fail("分包不存在或未启用"); @@ -58,7 +65,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..d95e8686 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 { @@ -23,7 +23,7 @@ public sealed class LauncherOptions public string ConnectionString { get; set; } = null!; /// - /// Grafana Loki 服务的 URL 地址。进程级日志管道在业务请求前初始化,Loki endpoint 属于 host 观测设施,不应按租户切换。 + /// Grafana Loki 服务的 URL 地址。进程级日志管道在业务请求前初始化,Loki endpoint 属于 host 观测设施,不随请求切换。 /// [Option(nameof(GrafanaLokiUrl), Required = false)] public string GrafanaLokiUrl { get; set; } = null!; diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs index 6f27fc9c..fed54fa5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.SqlSugar/SqlSugarEntityBoundary.cs @@ -1,4 +1,3 @@ -using GameFrameX.Foundation.Orm.Attribute; using System.Reflection; using GameFrameX.Entity.Routing; using SqlSugar; @@ -11,23 +10,18 @@ public static class SqlSugarEntityBoundary new Dictionary { [DatabaseOwnership.System] = "system_", - [DatabaseOwnership.Tenant] = "tenant_", [DatabaseOwnership.Global] = "global_", + [DatabaseOwnership.Business] = string.Empty, }; - public static bool IsExternalSpecificTable(Type entityType) - { - return entityType.IsDefined(typeof(TenantAttribute), false); - } - 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 +30,11 @@ public static bool IsMainDatabaseTable(Type entityType) return true; } - public static bool RequiresTenantContext(Type entityType) - { - return false; - } - /// /// 实体归属完全由三类边界 Attribute 决定:(global_)、 - /// (system_)、(tenant_)。 - /// 外部 [Tenant] 视同 Tenant。未标注任一边界 Attribute 的受管持久化实体将抛出 。 - /// C156 起:日志不再使用独立日志库,平台日志归入 system_log_*(system_ 归属),租户日志归入 tenant_log_*(tenant_ 归属)。 + /// (system_)、(无前缀)。 + /// 未标注任一边界 Attribute 的受管持久化实体将抛出 。 + /// C156 起:日志不再使用独立日志库,平台日志归入 system_log_*(system_ 归属),业务日志归入 log_*(业务归属,无前缀)。 /// public static DatabaseOwnership GetOwnership(Type entityType) { @@ -61,12 +50,12 @@ public static DatabaseOwnership GetOwnership(Type entityType) return DatabaseOwnership.System; } - if (entityType.IsDefined(typeof(TenantTableAttribute), false) || IsExternalSpecificTable(entityType)) + if (entityType.IsDefined(typeof(BusinessTableAttribute), false)) { - return DatabaseOwnership.Tenant; + return DatabaseOwnership.Business; } - throw new InvalidOperationException($"Entity {entityType.FullName} is not assigned to system_, tenant_, or global_ ownership."); + throw new InvalidOperationException($"Entity {entityType.FullName} is not assigned to system_, business, or global_ ownership."); } public static string GetPhysicalTableName(Type entityType, string currentTableName) @@ -90,8 +79,10 @@ 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), - _ => false, + // 业务表不带前缀;只排除平台/全局前缀,防止误占保留前缀。 + DatabaseOwnership.Business => !tableName.StartsWith(Prefixes[DatabaseOwnership.System], StringComparison.Ordinal) + && !tableName.StartsWith(Prefixes[DatabaseOwnership.Global], StringComparison.Ordinal), + _ => false, }; } @@ -99,7 +90,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; } @@ -126,6 +117,12 @@ private static string StripKnownPrefix(string tableName) { foreach (var prefix in Prefixes.Values) { + // 空前缀(业务归属)不参与剥离:空前缀 StartsWith 恒为真。 + if (prefix.Length == 0) + { + continue; + } + if (tableName.StartsWith(prefix, StringComparison.Ordinal)) { return tableName[prefix.Length..]; @@ -134,4 +131,4 @@ private static string StripKnownPrefix(string tableName) return tableName; } -} \ No newline at end of file +} 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..ab948fc1 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/ChannelDefinitionNamingTests.cs @@ -9,7 +9,7 @@ public class ChannelDefinitionNamingTests [Fact] public void ChannelDefinition_IsCanonicalEntityName() { - var channel = new GlobalChannelDefinitionEntity + var globalChannel = new GlobalChannelDefinitionEntity { Code = "official", Name = "Official", @@ -19,21 +19,21 @@ public void ChannelDefinition_IsCanonicalEntityName() IsSystemLocked = true, }; - Assert.Equal("official", channel.Code); - Assert.Equal(ChannelScopeEnum.System, channel.Scope); - Assert.Equal(ChannelTypeEnum.Official, channel.ChannelType); + Assert.Equal("official", globalChannel.Code); + Assert.Equal(ChannelScopeEnum.System, globalChannel.Scope); + Assert.Equal(ChannelTypeEnum.Official, globalChannel.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,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.TenantChannelDefinitionService")); } } \ 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 77% 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..9058d469 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() + public void GameAppOpenAccessEntity_Default_IsEnabledTrue() { - var entity = new TenantGameAppOpenAccessEntity(); + var entity = new GameAppOpenAccessEntity(); Assert.True(entity.IsEnabled); } [Fact] - public void TenantGameAppOpenAccessEntity_DerivesPhysicalTableNameFromClassName() + public void GameAppOpenAccessEntity_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() + public void AddGameAppOpenAccessInput_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() + public void AddGameAppOpenAccessInput_AcceptsValidInput() { - var input = new AddTenantGameAppOpenAccessRequest + var input = new AddGameAppOpenAccessRequest { BindUserId = 200, Scenario = "ci", @@ -62,9 +62,9 @@ public void AddTenantGameAppOpenAccessInput_AcceptsValidInput() } [Fact] - public void AddTenantGameAppOpenAccessInput_AcceptsWithoutApplication() + public void AddGameAppOpenAccessInput_AcceptsWithoutApplication() { - var input = new AddTenantGameAppOpenAccessRequest + var input = new AddGameAppOpenAccessRequest { BindUserId = 1, Scenario = "ci", @@ -79,26 +79,26 @@ public void AddTenantGameAppOpenAccessInput_AcceptsWithoutApplication() } [Fact] - public void UpdateTenantGameAppOpenAccessInput_RequiresUserAndScopes() + public void UpdateGameAppOpenAccessInput_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] - public void TenantGameAppOpenAccessActionInput_HasNoApplicationDimension() + public void GameAppOpenAccessActionInput_HasNoApplicationDimension() { var input = new GameAppOpenAccessActionRequest(); var results = new List(); var isValid = Validator.TryValidateObject(input, new ValidationContext(input), results, true); Assert.False(isValid); - Assert.Null(typeof(GameAppOpenAccessActionRequest).GetProperty("AppId")); + Assert.Null(typeof(GameAppOpenAccessActionRequest).GetProperty("AppId")); // c406-keep(负向断言:旧应用作用域字段不得回归) } [Fact] @@ -167,7 +167,7 @@ public void NormalizeScopesJson_RoundTripsThroughEnsureValidScopes() } [Fact] - public void TenantGameAppOpenAccessSecretResult_SerializesSecretForOneTimeDisplay() + public void GameAppOpenAccessSecretResult_SerializesSecretForOneTimeDisplay() { // SecretResult 仅签发/轮换响应返回,前端一次性展示;序列化含明文 AccessSecret。 var result = new GameAppOpenAccessSecretResponse 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..33d7a77d 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", @@ -65,7 +65,7 @@ public void AddGameAppPackageInput_RequiresDistributionIdentity() var isValid = Validator.TryValidateObject(input, new ValidationContext(input), results, true); Assert.False(isValid); - Assert.Null(typeof(AddGameAppPackageRequest).GetProperty("AppId")); + Assert.Null(typeof(AddGameAppPackageRequest).GetProperty("AppId")); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Contains(results, result => result.MemberNames.Contains(nameof(AddGameAppPackageRequest.Name))); Assert.Contains(results, result => result.MemberNames.Contains(nameof(AddGameAppPackageRequest.PackageName))); Assert.Contains(results, result => result.MemberNames.Contains(nameof(AddGameAppPackageRequest.PlatformCode))); @@ -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..c5b7450a 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,22 +66,22 @@ 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() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(BuildAssetPackage(1, 100, "base", now)).ExecuteCommandAsync(); - await _db.Insertable(BuildAssetPackage(2, 200, "patch", now)).ExecuteCommandAsync(); + await _db.Insertable(BuildAssetPackage(1, "base", now)).ExecuteCommandAsync(); + await _db.Insertable(BuildAssetPackage(2, "patch", now)).ExecuteCommandAsync(); } - private static TenantGameAppAssetPackageEntity BuildAssetPackage(long id, long gameAppId, string name, long now) + private static GameAppAssetPackageEntity BuildAssetPackage(long id, 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..40d04c91 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; @@ -9,9 +9,8 @@ namespace GameFrameX.Core.Tests.AppScope; /// GFX-84 / C80 回归测试:PackageScopeValidator 分包级配置包名作用域校验。 /// 规则集: /// -/// package 为空 / "default" → 兜底放行(AppId 可为 0 / null)。 -/// 具体包名 + AppId>0 → 必须命中当前应用下启用分包,否则抛错。 -/// 具体包名 + AppId<=0(租户默认层)→ 抛错。 +/// package 为空 / "default" → 兜底放行,不查库。 +/// 具体包名 → 必须命中启用中的分包,否则抛错。 /// /// 用 Sqlite 内存文件库 + ConfigureBaseFilters(软删除过滤)端到端验证; /// 校验器内部用 历史框架 BusinessError.Oh 抛友好异常,无 历史框架 host 的纯单测下友好异常构造可能触发 @@ -33,35 +32,34 @@ public PackageScopeValidatorTests() SqlSugarUnifiedConfig.ConfigureBaseSettings(config); _db = new SqlSugarScope(config); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity)); + _db.CodeFirst.InitTables(typeof(GameAppPackageEntity)); } /// - /// package="default" / 空 / null:兜底放行,AppId 可为 0 / null,不查库。 + /// package="default" / 空 / null:兜底放行,不查库。 /// [Theory] [InlineData(PackageScopeValidator.DefaultPackage)] [InlineData("")] [InlineData(" ")] [InlineData(null)] - public async Task DefaultOrEmptyPackage_PassesWithoutAppScope(string? package) + public async Task DefaultOrEmptyPackage_PassesWithoutLookup(string? package) { await SeedAsync(); - // AppId=null / 0 均应放行(兜底语义不要求应用作用域) - await PackageScopeValidator.ValidateAsync(package, Query()); + // 兜底语义不查库、不要求任何作用域 await PackageScopeValidator.ValidateAsync(package, Query()); } /// - /// 具体包名 + AppId>0 + 命中当前应用下启用分包 → 放行。 + /// 具体包名 + 命中启用分包 → 放行。 /// [Fact] - public async Task SpecificPackage_BelongingToEnabledAppPackage_Passes() + public async Task SpecificPackage_BelongingToEnabledPackage_Passes() { await SeedAsync(); - // com.app.a 属于 GameAppId=100 且启用 + // com.app.a 为启用分包 await PackageScopeValidator.ValidateAsync("com.app.a", Query()); } @@ -73,7 +71,7 @@ public async Task SpecificPackage_DisabledInApp_Throws() { await SeedAsync(); - // com.app.b 属于 GameAppId=100 但 IsEnabled=false + // com.app.b 已停用 Assert.ThrowsAny(() => PackageScopeValidator.ValidateAsync("com.app.b", Query()).GetAwaiter().GetResult()); } @@ -86,7 +84,7 @@ public async Task SpecificPackage_InMainDatabase_Passes() { await SeedAsync(); - // com.app.c 属于 GameAppId=200,当前作用域 100 下不应命中 + // com.app.c 为另一启用分包(存在性校验与归属无关) await PackageScopeValidator.ValidateAsync("com.app.c", Query()); } @@ -104,23 +102,23 @@ public async Task SpecificPackage_NotExisting_Throws() - private ISugarQueryable Query() + private ISugarQueryable Query() { - return _db.Queryable(); + return _db.Queryable(); } private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(BuildPackage(1, 100, "com.app.a", true, now)).ExecuteCommandAsync(); - await _db.Insertable(BuildPackage(2, 100, "com.app.b", false, now)).ExecuteCommandAsync(); - await _db.Insertable(BuildPackage(3, 200, "com.app.c", true, now)).ExecuteCommandAsync(); + await _db.Insertable(BuildPackage(1, "com.app.a", true, now)).ExecuteCommandAsync(); + await _db.Insertable(BuildPackage(2, "com.app.b", false, now)).ExecuteCommandAsync(); + await _db.Insertable(BuildPackage(3, "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, 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..e76ce1e8 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 粒度 ============ @@ -190,7 +190,7 @@ public sealed class AdminActionStyleContractTests { "GameFrameX.Application/ClientDelivery/GamePaymentConfig/GamePaymentConfigService.cs", 6 }, { "GameFrameX.Application/Platform/Email/SystemEmailProviderService.cs", 10 }, { "GameFrameX.Application/ClientDelivery/LoginTicket/GameLoginTicketKey/GameLoginTicketKeyService.cs", 2 }, - { "GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs", 7 }, + { "GameFrameX.Application/ClientDelivery/AdvertisementCallbackConfig/AdvertisementCallbackConfigService.cs", 6 }, { "GameFrameX.Application/CommerceCenter/GameRedeemCodeChannel/GameRedeemCodeChannelService.cs", 1 }, { "GameFrameX.Application/ClientDelivery/GameAppRemoteConfigMode/GameAppRemoteConfigModeService.cs", 2 }, { "GameFrameX.Application/ClientDelivery/GameAppReleaseVersion/GameAppReleaseVersionService.cs", 1 }, @@ -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..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/gameAreaEntityAreaIdDropdown|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/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..a568727d 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 直传:审计与软删除等系统字段进入请求契约构成越权攻击面,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/LegacyScopeResidualGuardTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/LegacyScopeResidualGuardTests.cs new file mode 100644 index 00000000..103b86bc --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/LegacyScopeResidualGuardTests.cs @@ -0,0 +1,180 @@ +using System.Diagnostics; +using System.Text.RegularExpressions; + +namespace GameFrameX.Core.Tests.Architecture; + +// C406 D13 阻断测试(GFX-1232):租户与 AppId 作用域全面物理清除后,防止残留回潮。 +// 依据:parallel-contract.md §1 D12-D13、§7 R2/R3/R4 与 evidence-audit/residual-scan.py 同口径。 +// +// 扫描范围: +// 1. GameFrameX.Admin.Unified.Api/**(生产代码、实体、数据库模型、测试源码、slnx/csproj/props); +// 2. GameFrameX.Admin.Unified.Vue/src/** 与 openapi.json; +// 3. 运行时配置:.env.example、docker-compose*.yml、appsettings*.json、Database.json、launchSettings.json。 +// +// 白名单机制:本目录 LegacyScopeResidualWhitelist.tsv,每行 path_globtokenreason; +// 命中必须同时满足路径 glob 与 token 全字匹配(R2-a:按 token 精确匹配,不允许整行或整目录放行)。 +// 只允许 D2.5 第三方原生名称、D7 断代说明、R3-a 游戏服协议镜像、D12 旧字段/旧路径负向测试(R2-b)。 +// +// R4:除文件内容外,还扫描 git 跟踪文件路径——路径含 tenant 即失败(白名单除外)。 +// R2-c:正则先匹配最长 token(GameAppId 先于 AppId),GameApp* 其它产品名不命中本正则。 +public sealed class LegacyScopeResidualGuardTests +{ + private static readonly Regex ResidualTokenRegex = new( + "AsTenant|ITenant|TenantTable|GameAppId|gameAppId|AppId|appId|app_id|tenant_|Tenant|tenant", + RegexOptions.Compiled); + + [Fact] + public void InScopeSources_ContainNoUnwhitelistedTenantOrAppIdResiduals() + { + var repositoryRoot = GetGitRepositoryRoot(); + var whitelist = LoadWhitelist(GetWhitelistPath(repositoryRoot)); + var violations = new List(); + + foreach (var file in EnumerateInScopeFiles(repositoryRoot)) + { + var relativePath = Path.GetRelativePath(repositoryRoot, file).Replace(Path.DirectorySeparatorChar, '/'); + var lines = File.ReadAllLines(file); + for (var index = 0; index < lines.Length; index++) + { + foreach (Match match in ResidualTokenRegex.Matches(lines[index])) + { + if (!IsWhitelisted(relativePath, match.Value, whitelist)) + { + violations.Add($"{relativePath}:{index + 1}: {match.Value} :: {lines[index].Trim()}"); + } + } + } + } + + Assert.True(violations.Count == 0, "发现未登记的 Tenant/AppId 残留:\n" + string.Join("\n", violations)); + } + + [Fact] + public void TrackedFilePaths_ContainNoTenantSegment() + { + var repositoryRoot = GetGitRepositoryRoot(); + var offenders = ListTrackedPaths(repositoryRoot) + .Where(path => path.ToLowerInvariant().Contains("tenant")) + .ToList(); + + Assert.True(offenders.Count == 0, "git 跟踪文件路径仍含 tenant(R4):\n" + string.Join("\n", offenders)); + } + + [Fact] + public void WhitelistEntries_HavePathTokenAndReason() + { + var entries = LoadWhitelist(GetWhitelistPath(GetGitRepositoryRoot())); + Assert.NotEmpty(entries); + Assert.All(entries, entry => + { + Assert.False(string.IsNullOrWhiteSpace(entry.PathGlob)); + Assert.False(string.IsNullOrWhiteSpace(entry.TokenPattern)); + Assert.False(string.IsNullOrWhiteSpace(entry.Reason)); + }); + } + + private static IEnumerable EnumerateInScopeFiles(string root) + { + var excluded = new[] { ".git", ".codegraph", "bin", "obj", "node_modules", "dist", "coverage" }; + var extensions = new HashSet(StringComparer.OrdinalIgnoreCase) + { + ".cs", ".ts", ".tsx", ".vue", ".js", ".mjs", ".json", ".yml", ".yaml", ".props", ".targets", + ".csproj", ".slnx", + }; + return Directory.EnumerateFiles(root, "*", SearchOption.AllDirectories) + .Where(path => !path.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) + .Any(part => excluded.Contains(part, StringComparer.Ordinal)) + && (extensions.Contains(Path.GetExtension(path)) + || Path.GetFileName(path).StartsWith(".env", StringComparison.Ordinal))) + .Where(path => + { + var relative = Path.GetRelativePath(root, path).Replace(Path.DirectorySeparatorChar, '/'); + return relative.StartsWith("GameFrameX.Admin.Unified.Api/", StringComparison.Ordinal) + || relative.StartsWith("GameFrameX.Admin.Unified.Vue/src/", StringComparison.Ordinal) + || relative.Equals("GameFrameX.Admin.Unified.Vue/openapi.json", StringComparison.Ordinal) + || relative.Equals(".env.example", StringComparison.Ordinal) + || relative.StartsWith("docker-compose", StringComparison.Ordinal) + || relative.Contains("appsettings", StringComparison.OrdinalIgnoreCase) + || relative.EndsWith("Database.json", StringComparison.Ordinal) + || relative.EndsWith("launchSettings.json", StringComparison.Ordinal); + }); + } + + private static IReadOnlyList ListTrackedPaths(string repositoryRoot) + { + var startInfo = new ProcessStartInfo + { + FileName = "git", + Arguments = "ls-files", + WorkingDirectory = repositoryRoot, + RedirectStandardOutput = true, + UseShellExecute = false, + }; + using (var process = Process.Start(startInfo)!) + { + var output = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + Assert.True(process.ExitCode == 0, "git ls-files 执行失败,退出码 " + process.ExitCode); + return output.Split('\n', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries); + } + } + + private static IReadOnlyList LoadWhitelist(string path) + { + return File.ReadAllLines(path) + .Where(line => !string.IsNullOrWhiteSpace(line) && !line.TrimStart().StartsWith("#", StringComparison.Ordinal)) + .Select(line => line.Split('\t', 3)) + .Select(fields => + { + Assert.Equal(3, fields.Length); + return new WhitelistEntry(fields[0], fields[1], fields[2]); + }) + .ToList(); + } + + private static bool IsWhitelisted(string relativePath, string token, IReadOnlyList whitelist) + { + return whitelist.Any(entry => + GlobMatch(relativePath, entry.PathGlob) + && Regex.IsMatch(token, "^(?:" + entry.TokenPattern + ")$", RegexOptions.IgnoreCase)); + } + + private static bool GlobMatch(string value, string pattern) + { + var regex = "^" + Regex.Escape(pattern) + .Replace("\\*\\*/", "(?:.*/)?") + .Replace("\\*\\*", ".*") + .Replace("\\*", "[^/]*") + "$"; + return Regex.IsMatch(value, regex, RegexOptions.IgnoreCase); + } + + private static string GetGitRepositoryRoot() + { + var startInfo = new ProcessStartInfo + { + FileName = "git", + Arguments = "rev-parse --show-toplevel", + WorkingDirectory = AppContext.BaseDirectory, + RedirectStandardOutput = true, + UseShellExecute = false, + }; + using (var process = Process.Start(startInfo)!) + { + var output = process.StandardOutput.ReadToEnd().Trim(); + process.WaitForExit(); + Assert.True(process.ExitCode == 0 && output.Length > 0, "git rev-parse --show-toplevel 执行失败"); + return output; + } + } + + private static string GetWhitelistPath(string repositoryRoot) + { + var localPath = Path.Combine(repositoryRoot, "GameFrameX.Admin.Unified.Api", "GameFrameX.Core.Tests", "Architecture", "LegacyScopeResidualWhitelist.tsv"); + return File.Exists(localPath) ? localPath : throw new FileNotFoundException("C406 residual whitelist missing", localPath); + } + + /// + /// 白名单行(嵌套类型遵守 one-type-per-file 例外)。 + /// + private sealed record WhitelistEntry(string PathGlob, string TokenPattern, string Reason); +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/LegacyScopeResidualWhitelist.tsv b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/LegacyScopeResidualWhitelist.tsv new file mode 100644 index 00000000..64d55ac3 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/LegacyScopeResidualWhitelist.tsv @@ -0,0 +1,87 @@ +# path_glob token reason +# C406 D13 残留白名单(R2-a token 精确匹配;只允许 D2.5 第三方原生、D7 断代说明、R3-a 协议镜像、D12 负向测试) +# D2.5:SqlSugar 原生多库 API(R2-a:仅放行实际调用 AsTenant() 的文件) +GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarRepository.cs AsTenant SqlSugar 原生多库客户端 API(GetConnectionScope(MainConfigId)),D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionRunner.cs AsTenant SqlSugar 原生多库事务 API(BeginTran/CommitTran/RollbackTran),D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Job/LogJob.cs AsTenant SqlSugar 原生多库客户端 API,D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/GlobalMenuService.cs AsTenant SqlSugar 原生多库客户端 API,D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/DatabaseLoggingWriter.cs AsTenant SqlSugar 原生多库客户端 API,D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Application/Platform/DataBase/SystemDatabaseService.cs AsTenant SqlSugar 原生多库客户端 API(按 ConfigId 取连接),D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/InitialAdminBootstrap.cs AsTenant SqlSugar 原生多库客户端 API(GetConnectionScope(MainConfigId)),D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Application/Audit/Retention/AuditRetentionService.cs AsTenant SqlSugar 原生多库客户端 API(GetConnectionScope(MainConfigId)),D2.5 不改名 +# D2.5:SqlSugar 原生 [Tenant] 特性反射(仅这两处 GetCustomAttribute) +GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarFilter.cs Tenant SqlSugar 原生 TenantAttribute 反射判断,D2.5 不改名 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Extension/RepositoryExtension.cs Tenant SqlSugar 原生 TenantAttribute 反射判断,D2.5 不改名 +# D2.5:第三方支付生态原生 AppId(微信/支付宝/Apple/Google 协议字段) +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.AliPay/AliPayOptionSetting.cs AppId 支付宝原生 AppId 协议配置,D2.5 保留(R2-a:目录级 Payment/** 收窄为实际命中文件) +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.AliPay/AliPayPaymentHandler.cs AppId 支付宝原生 AppId 协议字段,D2.5 保留 +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.AliPay/Refund/AliPayRefundManager.cs AppId 支付宝原生 AppId 协议字段,D2.5 保留 +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatPayOptionSetting.cs AppId 微信支付原生 AppId 协议配置,D2.5 保留 +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/Option/WechatPayOptions.cs AppId 微信支付原生 AppId 协议配置,D2.5 保留 +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatPaymentHandler.cs AppId 微信支付原生 AppId 协议字段,D2.5 保留 +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatTenpayClientFactory.cs AppId 微信支付原生 AppId 协议字段,D2.5 保留 +GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatCreateOrderResponse.cs appId 微信下单响应原生 appId wire 字段,D2.5 保留 +GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemWechatPayEntity.cs AppId 微信支付原生 AppId 配置列,D2.5 保留 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/PayConfig/PaymentOptionSettingDecryptClosureTests.cs AppId 支付宝原生 AliPayAppId 加解密闭环样本,D2.5 保留 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/RuntimeCredentialDecryptClosureTests.cs AppId 支付宝原生 AliPayAppId 加解密闭环样本,D2.5 保留 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiWeChatPayCallbackTests.cs AppId 微信支付回调协议测试,D2.5 保留 +# D7 断代说明:旧库拒绝启动守卫有意引用旧 schema 标志(行已标 c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs tenant_ D7 旧库检测标志(tenant_ 前缀表 / system_tenant_entity),断代说明 +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs Tenant D7 旧租户登记表断代说明(1.x SystemTenantEntity) +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs tenant D7 断代说明(多租户架构退场描述) +GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs tenant_ D7 守卫接线注释(旧 schema 标志 fail-closed) +# R3-a:游戏服 Online 协议错误码镜像(vault error-code-table.md 唯一权威;后续项由游戏服仓/协议负责人收口) +GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/OnlineErrorCode.cs tenant R3-a 游戏服协议镜像(32200002 CrossTenantDenied 文案) +GameFrameX.Admin.Unified.Api/error-codes.json tenant R3-a 协议镜像导出产物(ErrorCodeContractTests 生成,同 OnlineErrorCode) +GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts tenant R3-a 协议镜像五语同步(32200002 en-US 文案) +GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-cn.ts 32200002 R3-a 协议镜像(32200002 zh-CN「跨租户」译文;中文不在 ASCII token 扫描范围,登记备查) +GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-tw.ts 32200002 R3-a 协议镜像(32200002 zh-TW「跨租戶」译文;同上登记备查) +GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ja.ts 32200002 R3-a 协议镜像(32200002 ja テナント译文;同上登记备查) +GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ko.ts 32200002 R3-a 协议镜像(32200002 ko 테넌트译文;同上登记备查) +GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/WechatReturnCodeEnum.cs appId 微信返回码原生字段(不合法的APPID 等 5 处,D2.5 生态原生;大小写变体不在 TOKEN_RE 扫描范围,登记备查) +# D12:旧字段/旧路径负向测试(R2-b:明确断言旧三段 404、旧字段不解析不透传、旧属性不回归;行已标 c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs tenant D12 负向断言:旧字段不出站(body/query/URI) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs appId D12 负向断言:旧字段不出站(body/query/URI) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRoleEndpointTests.cs gameAppId D12 负向断言:旧字段不出站(body/query/URI) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs tenant D12 负向断言:签发 JWT 不含旧 claim、旧字段入 ExtraFields +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiTokenIssuerTests.cs appId D12 负向断言:签发 JWT 不含旧 claim、旧字段入 ExtraFields +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs tenant D12 负向断言:旧三段路由 404、旧路由值不建上下文 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs appId D12 负向断言:旧三段路由 404、旧路由值不建上下文 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs gameAppId D12 负向断言:旧三段路由 404、旧路由值不建上下文 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs tenant D12 负向断言:旧查询串/路由值不参与解析 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackSingleMainTests.cs appId D12 负向断言:旧查询串/路由值不参与解析 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs tenant D12 负向断言:端点路由模板不含旧三段 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageTests.cs appId D12 负向断言:端点路由模板不含旧三段 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs tenant D12 负向断言:配置响应不含旧作用域字段 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiConfigEndpointTests.cs appId D12 负向断言:配置响应不含旧作用域字段 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/CryptoEnvelopeMiddlewareTests.cs tenant D12 负向断言:旧上下文字段不参与加密信封 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs tenant D12 负向断言:出站载荷不含旧三字段 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs appId D12 负向断言:出站载荷不含旧三字段 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineServerClientTests.cs gameAppId D12 负向断言:出站载荷不含旧三字段 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ServerManager/Online/OnlineScopeContextFactoryTests.cs appId D12 负向断言:越界错误样本可检索(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs tenant D12 负向断言:签发 claim 全集不含旧作用域 claim +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs appId D12 负向断言:签发 claim 全集不含旧作用域 claim +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessDecryptClosureTests.cs tenant D12 负向断言:机器通道身份不含旧作用域 claim +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs tenant_ D12 负向测试:预建 tenant_ 旧表触发启动拒绝 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs Tenant D12 负向测试:旧租户登记表字面量触发拒绝 +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs tenant D12 负向测试:旧表名字面量(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/PhysicalTableNamespaceBoundaryTests.cs tenant_ D12 负向断言:业务表禁止再现 tenant_ 前缀(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogPrefixTests.cs tenant_ D12 负向回归注释:lesson 原型引用旧前缀(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameAppFeatureSwitchServiceTests.cs tenant_ D12 断代注释:业务表不再带 tenant_ 前缀(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs appId D12 负向断言:实体列集合不含旧作用域列(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/RewardTemplateContractTests.cs appId D12 负向断言:DTO/源码不含旧作用域字段(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameBusiness/GameCommodityEntityContractTests.cs appId D12 负向断言:旧字段按未知字段忽略、DTO 无旧属性(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppPackageTests.cs appId D12 负向断言:请求 DTO 无旧作用域属性(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/AppManagement/GameAppOpenAccessEntityTests.cs appId D12 负向断言:请求 DTO 无旧作用域属性(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameAppDevice/GameAppDeviceContractTests.cs appId D12 负向断言:请求 DTO 无旧作用域属性(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignEntityServiceContractTests.cs appId D12 负向断言:DTO 属性集不含旧作用域字段(c406-keep) +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderFulfillmentServiceContractTests.cs appId D12 负向断言:DTO 属性集不含旧作用域字段(c406-keep) +GameFrameX.Admin.Unified.Vue/src/views/gmCenter/controlledOperation/commandForm.test.ts appId D12 负向断言:运营命令出站请求不含旧字段(c406-keep) +GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.test.ts tenant D12 负向断言:公开回调 URL 不含旧查询字段(c406-keep) +GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/gamePaymentConfigEntity/notifyUrl.test.ts appId D12 负向断言:公开回调 URL 不含旧查询字段(c406-keep) +GameFrameX.Admin.Unified.Vue/scripts/check-frontend-standards.mjs tenant D12 负向自检:退役目录段必须被 views 白名单拒绝(c406-keep) +GameFrameX.Admin.Unified.Vue/e2e/tests/client-api-protocol.e2e.ts Tenant D12 负向断言:旧三头发送后行为与不带完全一致(c406-keep) +GameFrameX.Admin.Unified.Vue/e2e/tests/e2e-integration-checks.e2e.ts tenant D12 负向断言:登录表单无租户字段 / 请求线缆与日志列残留扫描(c406-keep) +GameFrameX.Admin.Unified.Vue/e2e/tests/e2e-integration-checks.e2e.ts Tenant D12 负向断言:日志审计页无 TenantId 列(c406-keep) +# D13 执行机制自引用:守护测试自身的扫描正则与说明文字必然包含全部 token +GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Architecture/LegacyScopeResidualGuardTests.cs AsTenant|ITenant|TenantTable|GameAppId|gameAppId|AppId|appId|app_id|tenant_|Tenant|tenant D13 阻断测试自身(扫描正则与机制说明,文件名已按 R4 去 tenant) 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..f57c6b64 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointCatalogSyncTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/ApiEndpointCatalogSyncTests.cs @@ -28,13 +28,13 @@ public void BindingMigration_CoversParameterizedRouteNames() } [Fact] - public void StartupSync_DoesNotRewriteTenantRoleMenuGrants() + public void StartupSync_DoesNotRewriteRoleMenuGrants() { 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/AuthenticatedOnlyRouteWhitelistTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/AuthenticatedOnlyRouteWhitelistTests.cs index 3a847004..52a2dfc6 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/AuthenticatedOnlyRouteWhitelistTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Authorization/AuthenticatedOnlyRouteWhitelistTests.cs @@ -25,7 +25,7 @@ public static TheoryData EscapeHatchActions /// /// 仅登录端点必须显式标注 [AuthenticatedOnly], - /// 端点仍需落在「仅需登录」档,否则 tenant admin 会被自动隐藏按钮挡成 403(GFX-683 回潮)。 + /// 端点仍需落在「仅需登录」档,否则普通管理员会被自动隐藏按钮挡成 403(GFX-683 回潮)。 /// [Theory] [MemberData(nameof(EscapeHatchActions))] 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/Bootstrap/HostMainDbConnectionResolverTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/HostMainDbConnectionResolverTests.cs index bad3ae60..0f115d26 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/HostMainDbConnectionResolverTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/HostMainDbConnectionResolverTests.cs @@ -8,7 +8,7 @@ namespace GameFrameX.Core.Tests.Bootstrap; public class HostMainDbConnectionResolverTests { [Fact] - public void Resolve_BindsDbConnectionSectionAndDerivesDefaultTenant() + public void Resolve_BindsDbConnectionSectionAndDerivesMainDatabase() { var configuration = new ConfigurationBuilder().AddInMemoryCollection(new Dictionary { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/InitialAdminBootstrapTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/InitialAdminBootstrapTests.cs new file mode 100644 index 00000000..a1dc9a58 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/InitialAdminBootstrapTests.cs @@ -0,0 +1,252 @@ +using GameFrameX.Application.SeedData.System; +using GameFrameX.Core.Bootstrap; +using GameFrameX.Core.Cache; +using GameFrameX.Core.Const; +using GameFrameX.Core.Const.MenuSeed; +using GameFrameX.Core.Option; +using GameFrameX.Core.Tests.System; +using GameFrameX.Core.SqlSugar; +using GameFrameX.Core.Utility; +using GameFrameX.Entity.Business; +using GameFrameX.Entity.Enum; +using GameFrameX.Entity.Global; +using GameFrameX.Entity.System; +using SqlSugar; + +namespace GameFrameX.Core.Tests.Bootstrap; + +/// +/// 新装首个业务管理员种子引导测试(C406 / F3): +/// ①新库 + 环境变量:创建 1 个账号绑定 sys_admin,角色菜单 = 全部非超管种子菜单(超管专属子树 0), +/// 密码 Argon2id 可验;②二次启动幂等:账号唯一、密码不覆盖、被删的种子授权补回、手工收窄的额外授权不删; +/// ③不设变量:不建账号并输出警告;④弱密码:fail-closed 启动报错且错误信息不含密码。 +/// env 操作与密码策略静态属性均进程级,集中本类并挂 MenuSeedCatalog 串行集合避免互染。 +/// +[Collection("MenuSeedCatalog")] +public sealed class InitialAdminBootstrapTests : IDisposable +{ + private const string InitialAccount = "first-admin"; + private const string InitialPassword = "{{SECRET_p5xv2w8n}}"; + + private static readonly Type[] MainSeedTypes = + { + typeof(SystemUserEntity), + typeof(SystemUserSeedData), + typeof(GlobalMenuEntity), + typeof(GlobalMenuSeedData), + typeof(UserEntity), + typeof(RoleEntity), + typeof(RoleMenuEntity), + typeof(UserRoleEntity), + }; + + private readonly List _dbPaths = new(); + + public InitialAdminBootstrapTests() + { + SqlSugarCache.Configure(new FakeCache()); + } + + private DbConnectionConfig _config = null!; + + private SqlSugarScope CreateScope() + { + var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_admin_initial_admin_{Guid.NewGuid():N}.db"); + _dbPaths.Add(dbPath); + var config = new DbConnectionConfig + { + ConfigId = "main", + DbType = DbType.Sqlite, + ConnectionString = $"DataSource={dbPath}", + DbSettings = new DbSettings { EnableInitDb = true, EnableDiffLog = false, }, + TableSettings = new TableSettings { EnableInitTable = true, EnableIncreTable = false, }, + SeedSettings = new SeedSettings { EnableInitSeed = true, EnableIncreSeed = false, }, + }; + SqlSugarSetup.SetDbConfig(config); + _config = config; + return new SqlSugarScope(new List { config }); + } + + private static HashSet ExpectedGrantableMenuIds() + { + var reservedMenuIds = MenuSeedCatalog.SuperAdminOnlySubtreeMenuIds; + var readableMenuIds = MenuSeedCatalog.AdminReadableSuperAdminOnlyMenuIds; + return MenuSeedCatalog.AllDefinitions + .Select(u => StableSeedId.Menu(u.Key)) + .Where(id => !reservedMenuIds.Contains(id) || readableMenuIds.Contains(id)) + .ToHashSet(); + } + + [Fact] + public async Task FirstInstallWithEnv_CreatesSingleAdminWithNonSuperAdminMenus() + { + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialAccountEnvironmentVariable, InitialAccount)) + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialPasswordEnvironmentVariable, InitialPassword)) + using (var scope = CreateScope()) + { + SqlSugarSetup.InitDatabase(scope, _config, MainSeedTypes); + await InitialAdminBootstrap.RunAsync(scope); + + var db = scope.GetConnectionScope("main"); + var user = Assert.Single(db.Queryable().Filter(null, true).ToList()); + Assert.Equal(InitialAccount, user.Account); + Assert.True(CryptogramUtility.VerifyPassword(InitialPassword, user.Password)); + Assert.Equal(AccountTypeEnum.SystemAdmin, user.AccountType); + Assert.True(user.IsEnabled); + + var role = db.Queryable().First(u => u.Code == CommonConst.SysAdminRole); + Assert.NotNull(role); + Assert.Contains(db.Queryable().ToList(), binding => binding.UserId == user.Id && binding.RoleId == role.Id); + + var grantedMenuIds = db.Queryable().Where(u => u.RoleId == role.Id).Select(u => u.MenuId).ToList(); + Assert.Equal(ExpectedGrantableMenuIds(), grantedMenuIds.ToHashSet()); + Assert.Empty(grantedMenuIds.Where(MenuSeedCatalog.SuperAdminOnlySubtreeMenuIds.Contains) + .Except(MenuSeedCatalog.AdminReadableSuperAdminOnlyMenuIds)); + } + } + + [Fact] + public async Task SecondRun_IdempotentAndOnlyAddsMissingSeedMenus() + { + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialAccountEnvironmentVariable, InitialAccount)) + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialPasswordEnvironmentVariable, InitialPassword)) + using (var scope = CreateScope()) + { + SqlSugarSetup.InitDatabase(scope, _config, MainSeedTypes); + await InitialAdminBootstrap.RunAsync(scope); + + var db = scope.GetConnectionScope("main"); + var firstUser = Assert.Single(db.Queryable().Filter(null, true).ToList()); + var role = db.Queryable().First(u => u.Code == CommonConst.SysAdminRole); + + // 模拟运营手工收窄(删一条种子授权)+ 手工额外授权(非种子菜单) + db.Deleteable(u => u.RoleId == role.Id && u.MenuId == ExpectedGrantableMenuIds().First()).ExecuteCommand(); + db.Insertable(new RoleMenuEntity { RoleId = role.Id, MenuId = 987654321L, IsEnabled = true }).ExecuteCommand(); + + await InitialAdminBootstrap.RunAsync(scope); + + var secondUser = Assert.Single(db.Queryable().Filter(null, true).ToList()); + Assert.Equal(firstUser.Id, secondUser.Id); + Assert.Equal(firstUser.Password, secondUser.Password); + + var grantedMenuIds = db.Queryable().Where(u => u.RoleId == role.Id).Select(u => u.MenuId).ToList(); + // 被删的种子授权补回;手工额外授权保留(只补不删) + Assert.Superset(ExpectedGrantableMenuIds(), grantedMenuIds.ToHashSet()); + Assert.Contains(987654321L, grantedMenuIds); + Assert.Single(db.Queryable().Filter(null, true).ToList()); + } + } + + [Fact] + public async Task WithoutEnv_CreatesNoAccountAndWarns() + { + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialAccountEnvironmentVariable, null)) + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialPasswordEnvironmentVariable, null)) + using (var scope = CreateScope()) + { + SqlSugarSetup.InitDatabase(scope, _config, MainSeedTypes); + var output = string.Empty; + output = await CaptureConsoleAsync(() => InitialAdminBootstrap.RunAsync(scope)); + + var db = scope.GetConnectionScope("main"); + Assert.Empty(db.Queryable().Filter(null, true).ToList()); + // 角色与授权仍会建立(首装即有管理员角色可分配),仅账号不创建 + Assert.NotNull(db.Queryable().First(u => u.Code == CommonConst.SysAdminRole)); + Assert.Contains("尚未初始化业务管理员", output); + Assert.Contains(InitialAdminBootstrap.InitialAccountEnvironmentVariable, output); + } + } + + [Fact] + public async Task PartialEnv_WarnsAndCreatesNoAccount() + { + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialAccountEnvironmentVariable, InitialAccount)) + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialPasswordEnvironmentVariable, null)) + using (var scope = CreateScope()) + { + SqlSugarSetup.InitDatabase(scope, _config, MainSeedTypes); + var output = await CaptureConsoleAsync(() => InitialAdminBootstrap.RunAsync(scope)); + + var db = scope.GetConnectionScope("main"); + Assert.Empty(db.Queryable().Filter(null, true).ToList()); + Assert.Contains("必须成对设置", output); + } + } + + [Fact] + public async Task WeakPassword_FailsClosedWithoutLeakingPassword() + { + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialAccountEnvironmentVariable, InitialAccount)) + using (new TemporaryEnvironment(InitialAdminBootstrap.InitialPasswordEnvironmentVariable, "weak")) + using (var scope = CreateScope()) + { + SqlSugarSetup.InitDatabase(scope, _config, MainSeedTypes); + + CryptogramUtility.ApplyPasswordPolicy(true, "^(?=.*[A-Z]).{8,}$", "密码须至少 8 位且含大写字母"); + try + { + var exception = await Assert.ThrowsAsync(() => InitialAdminBootstrap.RunAsync(scope)); + Assert.Contains(InitialAdminBootstrap.InitialPasswordEnvironmentVariable, exception.Message); + Assert.DoesNotContain("weak", exception.Message); + } + finally + { + CryptogramUtility.ApplyPasswordPolicy(false, CryptogramUtility.PasswordStrengthValidation, CryptogramUtility.PasswordStrengthValidationMsg); + } + + var db = scope.GetConnectionScope("main"); + Assert.Empty(db.Queryable().Filter(null, true).ToList()); + } + } + + private static async Task CaptureConsoleAsync(Func action) + { + var originalOutput = Console.Out; + using var stringWriter = new StringWriter(); + Console.SetOut(stringWriter); + try + { + await action(); + } + finally + { + Console.SetOut(originalOutput); + } + + return stringWriter.ToString(); + } + + public void Dispose() + { + foreach (var dbPath in _dbPaths) + { + if (File.Exists(dbPath)) + { + File.Delete(dbPath); + } + } + } + + /// + /// 测试作用域环境变量:构造时设置(value 为 null 时清除),Dispose 时恢复原值。 + /// + private sealed class TemporaryEnvironment : IDisposable + { + private readonly string _name; + private readonly string? _originalValue; + private readonly bool _hadValue; + + public TemporaryEnvironment(string name, string? value) + { + _name = name; + _originalValue = Environment.GetEnvironmentVariable(name); + _hadValue = _originalValue != null; + Environment.SetEnvironmentVariable(name, value); + } + + public void Dispose() + { + Environment.SetEnvironmentVariable(_name, _hadValue ? _originalValue : null); + } + } +} 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..a00356de --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Bootstrap/LegacySchemaStartupGuardTests.cs @@ -0,0 +1,225 @@ +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 _); // 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); // c406-keep + } + + [Fact] + public void EnsureNotLegacySchema_LegacyTenantRegistryTable_Throws() + { + 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); // c406-keep + } + + [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 _); // c406-keep + 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); // c406-keep + } + + [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)"); + } + + [Theory] + [InlineData("GameFrameX.Client.Api/Program.cs")] + [InlineData("GameFrameX.Hub.Api/Program.cs")] + public void ClientAndHubPrograms_WireLegacyGuardImmediatelyAfterDatabaseCreation(string relativePath) + { + var source = File.ReadAllText(Path.Combine(FindRepositoryRoot(), relativePath)); + var createIndex = source.IndexOf("SqlSugarClientConfig.AddSqlSugarClientService", StringComparison.Ordinal); + var guardIndex = source.IndexOf("LegacySchemaStartupGuard.EnsureNotLegacySchema", StringComparison.Ordinal); + Assert.True(createIndex >= 0 && guardIndex > createIndex, $"{relativePath} 必须在建立数据库客户端后调用旧库守卫"); + } + + [Theory] + [InlineData(false)] // Client.Api:AddSqlSugarClientService(config) 后立即守卫 + [InlineData(true)] // Hub.Api:带 userAuditHandler 的同一组合 + public void ClientAndHubStartupComposition_LegacySchema_FailsFast(bool withAuditHandler) + { + // 按两宿主 Program.cs 的真实组合:AddSqlSugarClientService 建客户端后立即 EnsureNotLegacySchema; + // 旧 schema 必须在建表/写数据之前抛错终止启动 + var dbPath = CreateDbPath(); + var config = new DbConnectionConfig + { + ConfigId = "main", + DbType = DbType.Sqlite, + ConnectionString = $"DataSource={dbPath}", + IsAutoCloseConnection = true, + }; + using (var seedScope = new SqlSugarScope(new List { config, })) + { + seedScope.GetConnectionScope("main").Ado.ExecuteCommand("CREATE TABLE tenant_game_user_entity (Id INTEGER PRIMARY KEY);"); // c406-keep + } + + var sqlSugar = withAuditHandler + ? SqlSugarClientConfig.AddSqlSugarClientService(config, _ => { }) + : SqlSugarClientConfig.AddSqlSugarClientService(config); + + Assert.Throws(() => LegacySchemaStartupGuard.EnsureNotLegacySchema(sqlSugar, config)); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public void ClientAndHubStartupComposition_CleanDatabase_StartsGuardPasses(bool withAuditHandler) + { + var config = CreateConfig("main"); + var sqlSugar = withAuditHandler + ? SqlSugarClientConfig.AddSqlSugarClientService(config, _ => { }) + : SqlSugarClientConfig.AddSqlSugarClientService(config); + + LegacySchemaStartupGuard.EnsureNotLegacySchema(sqlSugar, config); + } + + 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.Tests/Tenant/TenantCredentialWritePathCryptoTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/CredentialWritePathCryptoTests.cs similarity index 54% 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..f97114fe 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,38 @@ 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 GameFrameX.Entity.Business.Game.App; 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), typeof(GameAppPackageEntity)); + _db.SeedPackage(8801, "com.example.ad"); } public void Dispose() { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, _originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); _db.Dispose(); } @@ -42,17 +44,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.MainDb.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.MainDb.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,36 +63,37 @@ public async Task SignatureKey_AddAndRotate_RevealPlaintextOnce_StoreCipherOnly( public async Task AdvertisementConfig_AddEncryptsColumnsAndSensitiveJsonFields_MaskUpdatePreserves() { var service = new AdvertisementCallbackConfigService( - new Repository(_db.MainDb), - new AdvertisementCallbackConfigSchemaProvider()); + new Repository(_db.MainDb), + new AdvertisementCallbackConfigSchemaProvider(), + new Repository(_db.MainDb)); 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 { - + PackageId = 8801, Provider = "Pangle", CallbackUrl = "https://cb.example.com/hook", SigningSecret = "ad-plain-secret", 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.MainDb.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, - + PackageId = 8801, Provider = "Pangle", CallbackUrl = "https://cb.example.com/hook", SigningSecret = SensitiveFieldMask.MaskValue, @@ -98,10 +101,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.MainDb.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/KeyLifecycleRotateTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/KeyLifecycleRotateTests.cs similarity index 77% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/KeyLifecycleRotateTests.cs index 9432324d..2c50f4bb 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Tenant/KeyLifecycleRotateTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Business/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.MainDb.Insertable(oldKey).ExecuteCommand(); + return _db.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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/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/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/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/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/AdvertisementCallbackPackageBindingTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/AdvertisementCallbackPackageBindingTests.cs new file mode 100644 index 00000000..f7254e8a --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/AdvertisementCallbackPackageBindingTests.cs @@ -0,0 +1,269 @@ +using System.Security.Cryptography; +using System.Text; +using GameFrameX.Advertisement.Abstract; +using GameFrameX.Advertisement.TopOn; +using GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig; +using GameFrameX.Application.ClientDelivery.AdvertisementCallbackConfig.Dto; +using GameFrameX.Client.Api.Integrations.Advertisement; +using GameFrameX.Client.Api.Services.ClientApiOptions; +using GameFrameX.Core.Enum.Errors; +using GameFrameX.Core.Exceptions; +using GameFrameX.Core.Middleware; +using GameFrameX.Core.Service.Business; +using GameFrameX.Core.SqlSugar; +using GameFrameX.Core.Tests.ClientApi; +using GameFrameX.Entity.Business.ClientApiConfig; +using GameFrameX.Entity.Business.Game; +using GameFrameX.Foundation.Http.Normalization; +using GameFrameX.Foundation.Json; +using Microsoft.AspNetCore.Http; + +namespace GameFrameX.Core.Tests.ClientApi; + +/// +/// 广告回调配置按 PackageId 绑定(R5)闭环测试:真实 + 真实奖励服务。 +/// 覆盖:分包隔离验签(各包只能用自己的密钥)、跨包密钥拒绝、无配置 fail-closed、 +/// 重复 (PackageId, Provider) 保存拒绝(31800001)、直插多条命中解析 fail-closed、账本 PackageId 与所选配置一致。 +/// 路由缺 packageId 的 404 由 覆盖。 +/// +public sealed class AdvertisementCallbackPackageBindingTests : IDisposable +{ + private const long RoleId = 7301; + private const long UserId = 7302; + private const long AreaId = 7303; + private const long ClassifyId = 7304; + private const long PackageA = 7311; + private const long PackageB = 7312; + private const long PackageWithoutConfig = 7313; + private const string DispatchPath = "/game/api/req_player_send_advertisement_item"; + + private readonly string? _originalKey; + + public AdvertisementCallbackPackageBindingTests() + { + _originalKey = Environment.GetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, "unit-test-secret-key"); + } + + public void Dispose() + { + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, _originalKey); + } + + [Fact] + public async Task TwoPackages_SameProvider_EachVerifiesOnlyWithOwnSecret_AndLedgerCarriesPackageId() + { + using var db = CreateDb(); + InsertConfig(db, 7401, PackageA, "secret-alpha"); + InsertConfig(db, 7402, PackageB, "secret-beta"); + + var alpha = await ReceiveTopOnAsync(db, PackageA, "TX-PKG-A", "secret-alpha"); + Assert.True(alpha.IsValid, alpha.Message); + Assert.Equal(PackageA, (await SingleLedgerAsync(db)).PackageId); + + db.MainDb.Deleteable().ExecuteCommand(); + var beta = await ReceiveTopOnAsync(db, PackageB, "TX-PKG-B", "secret-beta"); + Assert.True(beta.IsValid, beta.Message); + Assert.Equal(PackageB, (await SingleLedgerAsync(db)).PackageId); + } + + [Fact] + public async Task CrossPackageSecret_IsRejected_NoLedger() + { + using var db = CreateDb(); + InsertConfig(db, 7401, PackageA, "secret-alpha"); + InsertConfig(db, 7402, PackageB, "secret-beta"); + + // 以包 B 的密钥签名,却走包 A 的回调路由:必须验签失败且不写账本 + var result = await ReceiveTopOnAsync(db, PackageA, "TX-CROSS", "secret-beta"); + + Assert.False(result.IsValid); + Assert.Equal(601, result.Code); + Assert.Empty(await db.MainDb.Queryable().ToListAsync()); + } + + [Fact] + public async Task PackageWithoutConfig_FailsClosed() + { + using var db = CreateDb(); + InsertConfig(db, 7401, PackageA, "secret-alpha"); + + var result = await ReceiveTopOnAsync(db, PackageWithoutConfig, "TX-NOCONF", "secret-alpha"); + + Assert.False(result.IsValid); + Assert.Empty(await db.MainDb.Queryable().ToListAsync()); + } + + [Fact] + public async Task DuplicatePackageProvider_SaveIsRejected() + { + using var db = CreateDb(); + var service = CreateConfigService(db); + + await service.AddAsync(BuildAddRequest(PackageA, "secret-alpha")); + + var exception = await Assert.ThrowsAsync(() => service.AddAsync(BuildAddRequest(PackageA, "secret-alpha-2"))); + + Assert.Equal((int)AdvertisementCallbackConfigErrorCode.PackageProviderAlreadyExists, exception.Code); + } + + [Fact] + public async Task MultipleMatchingRows_DirectInsert_ResolutionFailsClosed() + { + using var db = CreateDb(); + // 绕过服务层直接插两条同 (PackageId, Provider) 启用行:解析必须 fail-closed(不回退最新一条) + InsertConfig(db, 7401, PackageA, "secret-alpha"); + InsertConfig(db, 7402, PackageA, "secret-alpha-dup"); + + var provider = CreateOptionsProvider(db, PackageA); + Assert.Null(await provider.GetAdvertisementCallbackOptionsAsync()); + + var result = await ReceiveTopOnAsync(db, PackageA, "TX-DUPCONF", "secret-alpha"); + Assert.False(result.IsValid); + Assert.Empty(await db.MainDb.Queryable().ToListAsync()); + } + + [Fact] + public async Task EmptyRouteProvider_FailsClosed_EvenWithSingleConfig() + { + using var db = CreateDb(); + // F4 #22:路由上下文缺 provider 时不得退化为「该分包唯一配置」兜底选取,必须直接拒绝 + InsertConfig(db, 7401, PackageA, "secret-alpha"); + + var context = new DefaultHttpContext(); + context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext(string.Empty, "ad", PackageA); + var provider = new ClientApiOptionsProvider(db.MainDb, new HttpContextAccessor { HttpContext = context }); + Assert.Null(await provider.GetAdvertisementCallbackOptionsAsync()); + } + + private static AddAdvertisementCallbackConfigRequest BuildAddRequest(long packageId, string signingSecret) + { + return new AddAdvertisementCallbackConfigRequest + { + PackageId = packageId, + Provider = "TopOn", + CallbackUrl = "https://cb.example.test/hook", + SigningSecret = signingSecret, + VerificationKeys = string.Empty, + ConfigJson = JsonHelper.Serialize(new TopOnAdvertisementCallbackOption + { + callbackUrl = "https://cb.example.test/hook", + signingSecret = signingSecret, + }), + IsEnabled = true, + }; + } + + private static AdvertisementCallbackConfigService CreateConfigService(ClientApiTestDb db) + { + return new AdvertisementCallbackConfigService( + new Repository(db.MainDb), + new AdvertisementCallbackConfigSchemaProvider(), + new Repository(db.MainDb)); + } + + private static void InsertConfig(ClientApiTestDb db, long id, long packageId, string signingSecret) + { + db.MainDb.Insertable(new AdvertisementCallbackConfigEntity + { + Id = id, + PackageId = packageId, + Provider = "TopOn", + CallbackUrl = "https://cb.example.test/hook", + SigningSecret = SecretCrypto.Encrypt(signingSecret) ?? signingSecret, + VerificationKeys = string.Empty, + ConfigJson = JsonHelper.Serialize(new TopOnAdvertisementCallbackOption + { + callbackUrl = "https://cb.example.test/hook", + signingSecret = signingSecret, + }), + IsEnabled = true, + }).ExecuteCommand(); + } + + private static async Task SingleLedgerAsync(ClientApiTestDb db) + { + var rows = await db.MainDb.Queryable().ToListAsync(); + return Assert.Single(rows); + } + + private static async Task ReceiveTopOnAsync(ClientApiTestDb db, long packageId, string transId, string signingSecret) + { + var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(); + handler.SetJson(DispatchPath, HttpJsonResultData.Success(JsonHelper.Serialize(new GameAdWebHookController.PlayerSendAdvertisementItemResponse())).ToString()); + var option = new TopOnAdvertisementCallbackOption { signingSecret = signingSecret, }; + var query = BuildTopOnQuery(option, transId); + SignTopOn(signingSecret, option, query); + + var httpContext = new DefaultHttpContext(); + httpContext.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("topon", "ad", packageId); +#pragma warning disable CS8620 // 测试输入 Dictionary 与 QueryString.Create 期望的 string? 仅可空性差异,运行时等价 + httpContext.Request.QueryString = QueryString.Create(query); +#pragma warning restore CS8620 + + var roleRepository = db.Repository(); + var factory = new AdvertisementCallbackFactory(new IAdvertisementCallbackHandler[] + { + new TopOnAdvertisementCallbackHandler(roleRepository), + }); + var service = new GameAdvertisementRewardService( + CreateOptionsProvider(db, packageId), + db.Repository(), + db.Repository(), + new HttpClient(handler, false), + new HttpContextAccessor { HttpContext = httpContext, }, + factory); + return await service.ReceiveTopOnAsync(); + } + + private static ClientApiOptionsProvider CreateOptionsProvider(ClientApiTestDb db, long packageId) + { + var context = new DefaultHttpContext(); + context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext("topon", "ad", packageId); + return new ClientApiOptionsProvider(db.MainDb, new HttpContextAccessor { HttpContext = context, }); + } + + private static ClientApiTestDb CreateDb() + { + var db = new ClientApiTestDb(); + db.InitBusinessTables(typeof(GameAdvertisementRewardEntity), typeof(GameRoleEntity), typeof(GameAreaEntity), typeof(AdvertisementCallbackConfigEntity)); + db.SeedAreaClassify(ClassifyId); + db.SeedArea(AreaId, ClassifyId); + db.SeedRole(RoleId, UserId, AreaId); + db.SeedPackage(PackageA, "com.example.alpha"); + db.SeedPackage(PackageB, "com.example.beta"); + db.SeedPackage(PackageWithoutConfig, "com.example.noconf"); + return db; + } + + private static Dictionary BuildTopOnQuery(TopOnAdvertisementCallbackOption option, string transId) + { + return new Dictionary(StringComparer.Ordinal) + { + [option.transactionIdParam] = transId, + [option.placementIdParam] = "p-1", + [option.adsourceIdParam] = "a-1", + [option.rewardAmountParam] = "10", + [option.rewardNameParam] = "coin", + [option.userIdParam] = RoleId.ToString(), + ["is_test"] = "0", + [option.signParam] = string.Empty, + }; + } + + /// + /// TopOn 签名:MD5(trans_id=..&placement_id=..&adsource_id=..&reward_amount=..&reward_name=..&sec_key=..) 小写 hex + /// (与 GameAdvertisementRewardServiceTests 同一协议口径)。 + /// + private static void SignTopOn(string signingSecret, TopOnAdvertisementCallbackOption option, Dictionary query) + { + var raw = "trans_id=" + query[option.transactionIdParam] + + "&placement_id=" + query[option.placementIdParam] + + "&adsource_id=" + query[option.adsourceIdParam] + + "&reward_amount=" + query[option.rewardAmountParam] + + "&reward_name=" + query[option.rewardNameParam] + + "&sec_key=" + signingSecret; + var hash = MD5.HashData(Encoding.UTF8.GetBytes(raw)); + query[option.signParam] = BitConverter.ToString(hash).Replace("-", string.Empty).ToLowerInvariant(); + } +} 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..061e0e11 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.MainDb.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.MainDb.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..fe17a49e 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.MainDb); + var matcher = new AppVersionFallbackMatcher(db.Repository(), resolver); + var controller = new GameAppVersionController(db.Repository(), matcher); + db.AttachContext(controller); 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.MainDb); + 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); 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.MainDb.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.MainDb); + 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); 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.MainDb.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.MainDb); + var delivery = new RemoteConfigDeliveryService(db.Repository(), resolver); + var controller = new GameRemoteConfigController(db.Repository(), delivery); + db.AttachContext(controller); 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); 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); var result = await controller.ListByAreaId(new GameAnnouncementListRequest { Id = 100, Language = "fr-FR", }); @@ -196,15 +196,15 @@ 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); + using var db = new ClientApiTestDb(); + db.AttachContext(controller); 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 _)); } @@ -214,34 +214,34 @@ 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); + using var db = new ClientApiTestDb(); + db.AttachContext(controller); 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("AppId", out _)); + Assert.False(key.TryGetProperty("TenantId", out _)); // c406-keep + Assert.False(key.TryGetProperty("AppId", out _)); // c406-keep } [Fact] 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)); + using var db = new ClientApiTestDb(); + db.InitBusinessTables(typeof(GameLoginTicketKeyEntity)); + var resolver = new GameLoginTicketKeyResolver(db.MainDb, 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.MainDb.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.MainDb.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(), @@ -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/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..ee372ffc 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiEndpointCoverageMatrix.cs @@ -6,30 +6,30 @@ 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("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"), - - Endpoint("GameAppVersion.GetInfo", "POST", "api/GameAppVersion/GetInfo", "client-config", true, true, false, false, "matches release version by app/package/platform/channel", "missing-app", "not-found", "disabled-record-hidden", "fallback-boundary"), - Endpoint("GameArea.GetAreaList", "POST", "api/GameArea/GetAreaList", "area", true, true, false, false, "returns visible area tree", "missing-app", "closed-area-filter", "package-fallback"), - Endpoint("GameAssetPackageVersion.GetInfo", "POST", "api/GameAssetPackageVersion/GetInfo", "client-config", true, true, false, false, "matches asset package version", "missing-app", "not-found", "disabled-record-hidden", "package-boundary"), - Endpoint("GameAssetPackageVersion.RegisterDevice", "POST", "api/GameAssetPackageVersion/RegisterDevice", "client-config", true, true, false, false, "registers device idempotently by app and identifier", "missing-app", "empty-identifier"), - Endpoint("GameFeatureSwitch.GetInfo", "POST", "api/GameFeatureSwitch/GetInfo", "client-config", true, true, false, false, "returns versioned feature switches with unchanged short-circuit", "missing-tenant", "missing-app", "audience-server-hidden", "out-of-window-hidden", "rollout-miss", "pascal-case"), - Endpoint("GameRemoteConfig.GetInfo", "POST", "api/GameRemoteConfig/GetInfo", "client-config", true, true, false, false, "returns rollout-matched global info", "missing-app", "rollout-miss", "whitelist-boundary", "pascal-case"), - Endpoint("GameLoginTicketKey.PublicKeys", "GET", "api/GameLoginTicketKey/PublicKeys", "ticket", true, true, false, false, "returns tenant-app public keys only", "missing-tenant", "missing-app", "private-key-not-returned"), - - Endpoint("GameOrder.Create", "POST", "api/GameOrder/Create", "payment", true, true, false, false, "creates order and payment payload", "missing-app", "area-not-found", "role-not-found", "unsupported-channel", "amount-boundary"), + 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-context", "disabled-record-hidden"), + Endpoint("GameAnnouncement.ListByAreaId", "POST", "api/GameAnnouncementService/ListByAreaId", "announcement", true, true, false, false, "lists enabled area announcements", "missing-context", "area-not-found"), + + Endpoint("GameAppVersion.GetInfo", "POST", "api/GameAppVersion/GetInfo", "client-config", true, true, false, false, "matches release version by app/package/platform/channel", "missing-package", "not-found", "disabled-record-hidden", "fallback-boundary"), + Endpoint("GameArea.GetAreaList", "POST", "api/GameArea/GetAreaList", "area", true, true, false, false, "returns visible area tree", "missing-package", "closed-area-filter", "package-fallback"), + Endpoint("GameAssetPackageVersion.GetInfo", "POST", "api/GameAssetPackageVersion/GetInfo", "client-config", true, true, false, false, "matches asset package version", "missing-package", "not-found", "disabled-record-hidden", "package-boundary"), + Endpoint("GameAssetPackageVersion.RegisterDevice", "POST", "api/GameAssetPackageVersion/RegisterDevice", "client-config", true, true, false, false, "registers device idempotently by app and identifier", "missing-package", "empty-identifier"), + Endpoint("GameFeatureSwitch.GetInfo", "POST", "api/GameFeatureSwitch/GetInfo", "client-config", true, true, false, false, "returns versioned feature switches with unchanged short-circuit", "missing-context", "missing-package", "audience-server-hidden", "out-of-window-hidden", "rollout-miss", "pascal-case"), + Endpoint("GameRemoteConfig.GetInfo", "POST", "api/GameRemoteConfig/GetInfo", "client-config", true, true, false, false, "returns rollout-matched global info", "missing-package", "rollout-miss", "whitelist-boundary", "pascal-case"), + Endpoint("GameLoginTicketKey.PublicKeys", "GET", "api/GameLoginTicketKey/PublicKeys", "ticket", true, true, false, false, "returns game public keys only", "missing-context", "missing-package", "private-key-not-returned"), + + Endpoint("GameOrder.Create", "POST", "api/GameOrder/Create", "payment", true, true, false, false, "creates order and payment payload", "missing-package", "area-not-found", "role-not-found", "unsupported-channel", "amount-boundary"), Endpoint("GameOrder.NotifyAliPay", "POST", "api/GameOrder/NotifyAliPay/{packageId:long?}", "payment-callback", false, false, false, true, "valid AliPay notify ships once", "invalid-route", "signature-failed", "order-not-found", "amount-mismatch", "duplicate-callback"), Endpoint("GameOrder.NotifyApple", "POST", "api/GameOrder/NotifyApple/{packageId:long?}", "payment-callback", false, false, false, true, "valid Apple notification ships once", "invalid-route", "signature-failed", "order-not-found", "duplicate-callback", "refund-boundary"), Endpoint("GameOrder.NotifyGoogle", "POST", "api/GameOrder/NotifyGoogle/{packageId:long?}", "payment-callback", false, false, false, true, "valid Google Pub/Sub ships once", "invalid-route", "jwt-failed", "purchase-invalid", "order-not-found", "duplicate-callback"), Endpoint("GameOrder.NotifyWeChatPay", "POST", "api/GameOrder/NotifyWeChatPay/{packageId:long?}", "payment-callback", false, false, false, true, "valid WeChat Pay callback ships once", "invalid-route", "signature-failed", "amount-mismatch", "duplicate-callback"), Endpoint("GameOrder.NotifyXsolla", "POST", "api/GameOrder/NotifyXsolla/{packageId:long?}", "payment-callback", false, false, false, true, "valid Xsolla webhook ships once", "invalid-route", "signature-failed", "notification-unsupported", "order-not-found", "duplicate-callback"), - Endpoint("GameRedeemCode.Consume", "POST", "api/GameRedeemCode/Consume", "redeem-code", true, true, false, false, "consumes active code once and sends item", "missing-app", "code-not-found", "not-active", "expired", "limit-exhausted", "already-used", "area-not-found"), + Endpoint("GameRedeemCode.Consume", "POST", "api/GameRedeemCode/Consume", "redeem-code", true, true, false, false, "consumes active code once and sends item", "missing-package", "code-not-found", "not-active", "expired", "limit-exhausted", "already-used", "area-not-found"), Endpoint("GameRole.ChangePlayerName", "POST", "api/GameRole/ChangePlayerName", "role", true, true, false, false, "changes owned role name", "role-not-found", "duplicate-name", "invalid-name"), Endpoint("GameRole.Add", "POST", "api/GameRole/Add", "role", true, true, false, false, "creates role in open area", "area-not-found", "duplicate-role", "area-closed", "area-full"), @@ -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 configured email", "missing-package", "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-package", "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"), @@ -95,7 +95,7 @@ internal static class ClientApiEndpointCoverageMatrix Endpoint("GameUserSession.Login", "POST", "api/GameUserSession/Login", "session", true, true, false, false, "establishes login session and returns heartbeat intervals", "client-version-blocked", "account-deleting", "account-not-found"), - Endpoint("GameWebShop.Get", "GET", "api/GameWebShop/Get", "web-shop", true, true, false, false, "lists enabled webshop goods", "missing-tenant", "disabled-goods-hidden"), + Endpoint("GameWebShop.Get", "GET", "api/GameWebShop/Get", "web-shop", true, true, false, false, "lists enabled webshop goods", "missing-context", "disabled-goods-hidden"), Endpoint("GameWebShop.Buy", "POST", "api/GameWebShop/Buy", "web-shop", true, true, false, false, "creates webshop buy request", "role-not-found", "area-not-found", "area-cannot-buy", "goods-not-found", "notify-url-context-missing"), Endpoint("GameWebShop.NotifyWebShop", "GET", "api/GameWebShop/NotifyWebShop/{packageId:long?}", "web-shop-callback", false, false, false, true, "valid webshop notify sends mail once", "invalid-route", "signature-failed", "role-not-found", "goods-not-found", "duplicate-callback"), }; @@ -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..d72ea7b0 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; @@ -54,9 +61,9 @@ 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.False(endpoint.RequiresTenant); + Assert.DoesNotContain("{tenantId:long}", endpoint.Route); // c406-keep + Assert.DoesNotContain("{appId:long}", endpoint.Route); // c406-keep + Assert.False(endpoint.Requires); Assert.False(endpoint.RequiresApp); } } @@ -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"); // c406-keep + + 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/ClientApiFeatureSwitchEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiFeatureSwitchEndpointTests.cs index 7a25c534..86997ad7 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.MainDb); 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.MainDb.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); @@ -237,12 +237,12 @@ public async Task GetInfo_MissingDeviceId_OnlyFullRolloutRowsDelivered() /// 无租户上下文仍从主库读取有效开关。 /// [Fact] - public async Task GetInfo_WithoutTenantContext_ReadsMainDatabase() + public async Task GetInfo_WithoutRequestContext_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); db.SeedFeatureSwitch(Row(1, "activity.main")); var result = ClientApiResultReader.Read(await controller.GetInfo(Request())); @@ -257,9 +257,9 @@ 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); + db.AttachContext(controller); db.SeedFeatureSwitch(Row(1, "activity.main")); var result = ClientApiResultReader.Read(await controller.GetInfo(Request())); 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..007fa65b 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.MainDb.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.MainDb.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..3586bab8 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.MainDb.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); @@ -51,9 +51,9 @@ public async Task GameOrder_Create_ValidatesAreaWithoutLegacyAppContext() { using var db = new ClientApiTestDb(); var controller = CreateController(db, new TestPaymentChannelFactory(new TestPaymentChannelHandler("testpay"))); - db.AttachContext(controller, includeApp: false); + db.AttachContext(controller); - 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.MainDb.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.MainDb, 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..854a246f 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.MainDb.Queryable().FirstAsync(u => u.Id == 7001); + var role = await db.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb, 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..97c80278 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)); - SeedPenalty(db, 1, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null, db.AppId); + db.InitBusinessTables(typeof(GamePenaltyEntity)); + SeedPenalty(db, 1, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null); - 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)); - SeedPenalty(db, 2, PenaltyActionTypeEnum.RestrictLogin, PenaltyStatusEnum.Active, null, db.AppId); + db.InitBusinessTables(typeof(GamePenaltyEntity)); + SeedPenalty(db, 2, PenaltyActionTypeEnum.RestrictLogin, PenaltyStatusEnum.Active, null); - 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)); - SeedPenalty(db, 3, PenaltyActionTypeEnum.Mute, PenaltyStatusEnum.Active, null, db.AppId); + db.InitBusinessTables(typeof(GamePenaltyEntity)); + SeedPenalty(db, 3, PenaltyActionTypeEnum.Mute, PenaltyStatusEnum.Active, null); - 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)); - SeedPenalty(db, 4, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Revoked, null, db.AppId); + db.InitBusinessTables(typeof(GamePenaltyEntity)); + SeedPenalty(db, 4, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Revoked, null); - 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)); - SeedPenalty(db, 5, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, DateTimeOffset.UtcNow.AddMinutes(-1), db.AppId); + db.InitBusinessTables(typeof(GamePenaltyEntity)); + SeedPenalty(db, 5, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, DateTimeOffset.UtcNow.AddMinutes(-1)); - 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)); - SeedPenalty(db, 6, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null, 0); + db.InitBusinessTables(typeof(GamePenaltyEntity)); + SeedPenalty(db, 6, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null); - 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)); - SeedPenalty(db, 7, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null, db.AppId, 2001); + db.InitBusinessTables(typeof(GamePenaltyEntity)); + SeedPenalty(db, 7, PenaltyActionTypeEnum.Ban, PenaltyStatusEnum.Active, null, 2001); - var service = new GamePenaltyEnforcementService(db.Repository()); + var service = new GamePenaltyEnforcementService(db.Repository()); // 同区服命中 var hitSame = await service.GetLoginBlockingPenaltyAsync(PenaltyTargetTypeEnum.Role, "role-3001", 2001); @@ -115,10 +115,9 @@ private static void SeedPenalty( PenaltyActionTypeEnum actionType, PenaltyStatusEnum status, DateTimeOffset? expiresAt, - long appId, long? areaId = null) { - var entity = new TenantGamePenaltyEntity + var entity = new GamePenaltyEntity { Id = id, AreaId = areaId, @@ -130,6 +129,6 @@ private static void SeedPenalty( ExpireTime = expiresAt?.ToUnixTimeSeconds(), OperatorId = 1, }; - db.TenantDb.Insertable(entity).ExecuteCommand(); + db.MainDb.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/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/ClientApiRedeemCodeEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiRedeemCodeEndpointTests.cs index f6b40982..499db5eb 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.MainDb.Queryable().CountAsync(); + var code = await db.MainDb.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.MainDb.Insertable(new GameRedeemCodeUseRecordEntity { Id = 9001, AreaId = 2001, @@ -116,7 +116,7 @@ public async Task GameRedeemCode_Consume_ValidatesCodeWithoutLegacyAppContext() { using var db = new ClientApiTestDb(); var controller = CreateController(db); - db.AttachContext(controller, includeApp: false); + db.AttachContext(controller); var result = await controller.Consume(new GameRedeemCodeConsumeEntityRequest { @@ -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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.Queryable() .Where(u => u.ChannelId == 5001 && u.RoleId == 3001).CountAsync(); - var countB = await db.TenantDb.Queryable() + var countB = await db.MainDb.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..bce52149 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; @@ -21,9 +21,9 @@ public async Task GameRole_Add_CreatesRoleWithoutAppContext() db.SeedArea(2001, 10); var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(3001); var controller = CreateController(db, handler); - db.AttachContext(controller, includeApp: false); + db.AttachContext(controller); - 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.MainDb.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")); @@ -44,9 +44,9 @@ public async Task GameRole_Add_RejectsMissingAccountWithoutAppContext() { using var db = new ClientApiTestDb(); var controller = CreateController(db); - db.AttachContext(controller, includeApp: false); + db.AttachContext(controller); - 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.MainDb.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.MainDb.Queryable().Filter(null, true).FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.True(saved.IsDeleted); } @@ -154,13 +154,13 @@ public async Task GameRole_Delete_FakeDeletesExistingRole() [Fact] public async Task GameRole_Login_IssuesGameTicketForOwnedRole() { - using var db = new ClientApiTestDb(10, 20); + using var db = new ClientApiTestDb(); db.SeedUser(1001, "ticket-user"); db.SeedAreaClassify(10); 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.MainDb.Queryable().FirstAsync(u => u.Id == 1001), "Guest"); var controller = CreateController(db, ClientApiRecordingHttpHandler.WithGameServerDefaults(), issuer); db.AttachContext(controller); @@ -179,26 +179,80 @@ 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.InitBusinessTables(typeof(GameUserEntity)); + var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); + var accessToken = await issuer.IssueAsync(await db.MainDb.Queryable().FirstAsync(u => u.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 = "token", + AccessToken = accessToken.Token, ExtraFields = new Dictionary { - ["tenantId"] = JsonDocument.Parse("10").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((int)AuthErrorCode.AuthorizeInvalid, ClientApiResultReader.Code(root)); - Assert.Equal("请求体不能包含租户、应用或账号上下文字段", ClientApiResultReader.Message(root)); + 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.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] + 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.InitBusinessTables(typeof(GameUserEntity)); + var issuer = new ClientApiTokenIssuer(FakeOptionsProvider.WithTokenPolicy("unit-test-signing-key", 60)); + var accessToken = await issuer.IssueAsync(await db.MainDb.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] @@ -207,11 +261,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.MainDb.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 +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()); @@ -251,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() @@ -268,4 +322,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/ClientApiSessionKeyIssuerTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiSessionKeyIssuerTests.cs index e932e2ed..9569fe06 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.MainDb.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.MainDb.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), + Seed("sess-app-1-expired", now - 10), + Seed("sess-app-1-live", now + 3600), + Seed("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.MainDb.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(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..0395f32c 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,16 @@ internal sealed class ClientApiTestDb : IDisposable { private readonly List _dbPaths = new(); - public ClientApiTestDb(long tenantId = 1080001, long appId = 1081001) + public ClientApiTestDb() { - TenantId = tenantId; - AppId = appId; MainDb = CreateScope("main"); - TenantDbPath = CreateDatabasePath("tenant"); + MainDbPath = CreateDatabasePath("main"); - - TenantDbProvider = MainDb; - TenantDb = TenantDbProvider; } - public long TenantId { get; } - - public long AppId { get; } - public SqlSugarScope MainDb { get; } - public ISqlSugarClient TenantDb { get; } - - public string TenantDbPath { get; } - - public ISqlSugarClient TenantDbProvider { get; } + public string MainDbPath { get; } public Repository Repository() where T : EntityBase, new() @@ -58,25 +45,15 @@ 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); + MainDb.CodeFirst.InitTables(tableTypes); return this; } - public DefaultHttpContext CreateHttpContext(bool includeTenant = true, bool includeApp = true) - { - return CreateHttpContext(includeTenant, includeApp, null); - } - - public DefaultHttpContext CreateHttpContext(bool includeTenant, bool includeApp, long? packageId) + public DefaultHttpContext CreateHttpContext(long? packageId = null) { var context = new DefaultHttpContext(); - if (includeTenant) - { - context.Items["TenantId"] = TenantId; - } - if (packageId.HasValue) { context.Items[PaymentOptionSettingProvider.PackageIdKey] = packageId.Value; @@ -85,15 +62,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, long? packageId = null) { - controller.ControllerContext = new ControllerContext { HttpContext = CreateHttpContext(includeTenant, includeApp), }; + controller.ControllerContext = new ControllerContext { HttpContext = CreateHttpContext(packageId), }; } - 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 +82,14 @@ public TenantGameAppPackageEntity SeedPackage(long packageId, string packageName IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +104,14 @@ public TenantGameAreaClassifyEntity SeedAreaClassify(long classifyId) IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +138,22 @@ public TenantGameAreaEntity SeedArea(long areaId, long classifyId, bool isEnable AppVersion = "1.0.0", }); entity.IsEnabled = isEnabled; - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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(); + MainDb.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 +169,14 @@ public TenantGameAppRemoteConfigEntity SeedRemoteConfig(long id, string packageN RolloutPercent = 100, Description = "C108 global info", }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +191,14 @@ public TenantGameAppReleaseVersionEntity SeedAppVersion(long id, string packageN Announcement = "Upgrade now", Description = "C108 app version", }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +211,14 @@ public TenantGameAppAssetPackageVersionEntity SeedAssetPackageVersion(long id, s ResourceVersion = "2026.07.18", Description = "C108 asset package", }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +232,11 @@ public TenantGameAnnouncementEntity SeedAnnouncement(long id, long? areaId, stri IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.Insertable(entity).ExecuteCommand(); return entity; } - public TenantGameUserEntity SeedUser( + public GameUserEntity SeedUser( long userId, string userName, string password = "password", @@ -267,8 +244,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 +267,14 @@ public TenantGameUserEntity SeedUser( IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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, 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 +293,14 @@ public TenantGameRoleEntity SeedRole(long roleId, long userId, long areaId, long AllRecharge = 0, OnlineTime = 0, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +311,14 @@ public TenantGameGoodsEntity SeedGoods(long goodsId, long classifyId = 1, int co IsEnabled = isEnabled, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +332,14 @@ public TenantGameWebShopEntity SeedWebShop(long shopId, string realPrice, string Sales = 0, Weight = weight, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +372,14 @@ public TenantGameOrderEntity SeedOrder(long orderId, long roleId, long areaId, s AppleVerifiedTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), ProviderTransactionId = providerTransactionId ?? string.Empty, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.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 +393,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(); + MainDb.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(); + MainDb.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 +423,7 @@ public TenantGameWebShopOrderEntity SeedWebShopOrder(long orderId, long roleId, OrderStatus = orderStatus, OrderId = $"webshop-{orderId}", }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -468,10 +445,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 +460,7 @@ public TenantGameUserEmailEntity SeedEmailCode(long id, string email, string cod IsEnabled = true, IsDeleted = false, }); - TenantDb.Insertable(entity).ExecuteCommand(); + MainDb.Insertable(entity).ExecuteCommand(); return entity; } @@ -544,4 +521,4 @@ private T WithBasic(T entity) where T : EntityBasic entity.IsEnabled = true; return entity; } -} \ No newline at end of file +} 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..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, @@ -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 @@ -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); @@ -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/ClientApiUserEmailEndpointTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/ClientApiUserEmailEndpointTests.cs index 30afa69d..6fda970f 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); 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..1649a1c3 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; @@ -34,7 +34,7 @@ public sealed class ClientApiWeChatPayCallbackTests /// 平台证书只在首个用例注册一次,后续用例复用(模拟生产常驻进程行为) /// private const string TestMerchantId = "1900000109"; - private const string TestAppId = "wx4a4b5c6d7e8f9012"; + private const string WechatApplicationId = "wx4a4b5c6d7e8f9012"; private const string TestMerchantCertSerial = "C108-WECHAT-MERCHANT-SERIAL"; private const string TestTransactionId = "4200001234567890123456789012"; @@ -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.MainDb.Queryable().FirstAsync(u => u.Id == 7101); + var role = await db.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb, new ClientApiTestHttpClientFactory(handler)), new WechatCallbackPaymentFactory(setting), new TestGooglePubSubPushAuthenticator(false), new TestGooglePlayPurchaseService(null)); @@ -205,7 +205,7 @@ public WechatPayOptionSetting CreateOptionSetting() var setting = new WechatPayOptionSetting { WechatPayMerchantId = TestMerchantId, - WechatPayAppId = TestAppId, + WechatPayAppId = WechatApplicationId, WechatPayApiV3Secret = ApiV3Secret, WechatPayCertificateSerialNumber = TestMerchantCertSerial, WechatPayCertificatePrivateKey = _platformRsa.ExportPkcs8PrivateKeyPem(), 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..4516037a 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; @@ -44,9 +44,9 @@ public async Task GameWebShop_Buy_BuildsCallbackUrlFromSiteRootWithPackageSegmen db.SeedSystemConfig("web_shop_params", WebShopConfigJson("https://client.example.test")); var handler = ClientApiRecordingHttpHandler.WithGameServerDefaults(); var controller = CreateController(db, handler); - controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(true, true, 7001), }; + controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(7001), }; - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -62,19 +62,19 @@ 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); 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), }; + controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(7001), }; - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -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] @@ -103,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, @@ -115,11 +113,11 @@ 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] - public async Task GameWebShop_Buy_DoesNotRequireLegacyTenantOrAppContext() + public async Task GameWebShop_Buy_DoesNotRequireLegacyScopeContext() { using var db = new ClientApiTestDb(); db.SeedAreaClassify(10); @@ -128,9 +126,9 @@ public async Task GameWebShop_Buy_DoesNotRequireLegacyTenantOrAppContext() db.SeedWebShop(5001, "6.50", ItemJson()); db.SeedSystemConfig("web_shop_params", WebShopConfigJson()); var controller = CreateController(db); - db.AttachContext(controller, includeApp: false); + db.AttachContext(controller); - var result = await controller.Buy(new TenantGameWebShopEntityBuyRequest + var result = await controller.Buy(new GameWebShopEntityBuyRequest { Id = 5001, AreaId = 2001, @@ -155,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, @@ -165,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)); } @@ -187,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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.MainDb.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 +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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.MainDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.MainDb.Queryable().ToListAsync(); // 验签缺省强制:伪造签名一律拒绝且不发货(不再有 log 灰度放行) Assert.Equal((int)AuthErrorCode.SignatureVerifyFailed, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); @@ -247,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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.MainDb.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 +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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterFailure = await db.MainDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedRows = await db.MainDb.Queryable().ToListAsync(); // 发货失败:订单不能停在已完成,保留 NotShipped 可重试状态,累充不增加 Assert.Equal((int)AreaErrorCode.AreaCannotBuy, ClientApiResultReader.Code(failed)); Assert.Equal(OrderStatusEnum.NotShipped, orderAfterFailure.Status); @@ -289,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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var roleAfterRetry = await db.MainDb.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 +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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.MainDb.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 +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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.MainDb.Queryable().FirstAsync(u => u.Id == 3001); Assert.Equal(0, ClientApiResultReader.Code(root)); Assert.Equal(status, order.Status); Assert.Equal(0, role.AllRecharge); @@ -371,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.MainDb.Queryable().FirstAsync(u => u.OrderId == outTradeNo); + var role = await db.MainDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.MainDb.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyAmountMismatch, ClientApiResultReader.Code(root)); Assert.Equal(OrderStatusEnum.Unpaid, order.Status); Assert.Equal(0, role.AllRecharge); @@ -399,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.MainDb.Queryable().CountAsync(u => u.OrderId == "999999999999999999"); + var role = await db.MainDb.Queryable().FirstAsync(u => u.Id == 3001); + var failedOrders = await db.MainDb.Queryable().ToListAsync(); Assert.Equal((int)OrderErrorCode.NotifyOrderNotFound, ClientApiResultReader.Code(root)); Assert.Equal(0, orderCount); Assert.Equal(0, role.AllRecharge); @@ -414,9 +412,9 @@ public async Task GameWebShop_NotifyWebShop_ValidatesConfigurationWithoutLegacyA { using var db = new ClientApiTestDb(); var controller = CreateController(db); - db.AttachContext(controller, includeApp: false); + db.AttachContext(controller); - 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 +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, @@ -459,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, @@ -484,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 { @@ -501,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 d35c492d..5b5f89f9 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; @@ -24,8 +24,6 @@ namespace GameFrameX.Core.Tests.ClientApi; /// public sealed class CryptoEnvelopeMiddlewareTests { - private const long TestAppId = 1001; - // ===== HKDF RFC 5869 A.1 官方向量(test-vectors.json hkdf_rfc5869_a1) ===== private const string A1IkmHex = "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"; private const string A1SaltHex = "000102030405060708090a0b0c"; @@ -72,7 +70,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") { var context = new DefaultHttpContext(); context.Response.Body = new MemoryStream(); @@ -89,15 +87,6 @@ private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, str context.Request.Headers[CryptoEnvelopeMiddleware.CryptoHeader] = cryptoHeader; } - if (appId.HasValue) - { - context.Request.Headers["GameFrameX-App-Id"] = appId.Value.ToString(); - } - - if (tenantId.HasValue) - { - context.Items["TenantId"] = tenantId.Value; - } return context; } @@ -108,7 +97,7 @@ private static DefaultHttpContext CreateEnvelopeContext(string envelopeJson, str private static FakeSessionKeyResolver CreateKeyRing() { var resolver = new FakeSessionKeyResolver(); - resolver.AddKey(TestAppId, VectorKid, DeriveSessionKeyHex, true, 0, null); + resolver.AddKey(VectorKid, DeriveSessionKeyHex, true, 0, null); return resolver; } @@ -506,7 +495,7 @@ await InvokeAsync(context, CreateOptions(true), () => public async Task WithoutAppHeader_ValidEnvelopeUsesMainKey() { var nextCalled = false; - var context = CreateEnvelopeContext(BuildEnvelopeJson(E1Path, E1Mid, E1Ts, HexToBytes(E1PayloadHex), false), appId: null); + var context = CreateEnvelopeContext(BuildEnvelopeJson(E1Path, E1Mid, E1Ts, HexToBytes(E1PayloadHex), false)); await InvokeAsync(context, CreateOptions(true), () => { nextCalled = true; @@ -520,7 +509,7 @@ await InvokeAsync(context, CreateOptions(true), () => public async Task DisabledKey_RejectedWith60105() { var ring = CreateKeyRing(); - ring.AddKey(TestAppId, VectorKid, DeriveSessionKeyHex, false, 0, null); + ring.AddKey(VectorKid, DeriveSessionKeyHex, false, 0, null); var nextCalled = false; var context = CreateEnvelopeContext(BuildEnvelopeJson(E1Path, E1Mid, E1Ts, HexToBytes(E1PayloadHex), false)); @@ -539,7 +528,7 @@ await InvokeAsync(context, CreateOptions(true), () => public async Task ExpiredKey_RejectedWith60105() { var ring = CreateKeyRing(); - ring.AddKey(TestAppId, VectorKid, DeriveSessionKeyHex, true, 0, 1755244800); // 到期时刻 = 向量 ts(已过) + ring.AddKey(VectorKid, DeriveSessionKeyHex, true, 0, 1755244800); // 到期时刻 = 向量 ts(已过) var nextCalled = false; var context = CreateEnvelopeContext(BuildEnvelopeJson(E1Path, E1Mid, E1Ts, HexToBytes(E1PayloadHex), false)); @@ -589,9 +578,10 @@ await InvokeAsync(context, CreateOptions(true), () => } [Fact] - public async Task LegacyTenantContext_DoesNotBypassDecryption() + public async Task LegacyScopeContext_DoesNotBypassDecryption() { - var context = CreateEnvelopeContext("{}", tenantId: 999); + var context = CreateEnvelopeContext("{}"); + context.Items["tenantId"] = 999; // c406-keep var nextCalled = false; await InvokeAsync(context, CreateOptions(true), () => { @@ -669,9 +659,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, }; } } @@ -685,16 +675,16 @@ private static string ReplaceFirstCtByte(string envelopeJson) } /// - /// 密钥环内存桩:按 (AppId, Kid) 查找,租约/启用判定复用 (与生产同一路径)。 + /// 密钥环内存桩:按 Kid 查找,租约/启用判定复用 (与生产同一路径)。 /// 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) + public void AddKey(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, @@ -717,4 +707,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/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..3f69bf4a 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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.Queryable().ToListAsync(); Assert.Single(rowsAfterSecond); Assert.Equal(firstLedgerId, rowsAfterSecond[0].Id); Assert.Equal(AdvertisementRewardStatusEnum.Success, rowsAfterSecond[0].Status); @@ -256,10 +256,10 @@ 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); + db.SeedRole(RoleId, UserId, AreaId); return db; } @@ -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..14ceca50 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,15 @@ 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 fixtureId) { - var mainConfig = CreateConfig("main"); - var tenantConfig = CreateConfig(tenantId.ToString()); + var mainConfig = CreateConfig($"main-{fixtureId}"); var scope = new SqlSugarScope(mainConfig); - var provider = scope; - var tenantDb = provider; - tenantDb.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity)); + var mainDb = scope; + mainDb.CodeFirst.InitTables(typeof(GameAppPackageEntity)); - return new ResolverFixture(scope, provider, tenantDb, tenantId); + return new ResolverFixture(scope, mainDb); } private ConnectionConfig CreateConfig(string configId) @@ -172,34 +170,32 @@ public void Dispose() private sealed class ResolverFixture { private readonly SqlSugarScope _scope; - private readonly ISqlSugarClient _tenantDb; - private readonly long _tenantId; + private readonly ISqlSugarClient _mainDb; - public ResolverFixture(SqlSugarScope scope, ISqlSugarClient provider, ISqlSugarClient tenantDb, long tenantId) + public ResolverFixture(SqlSugarScope scope, ISqlSugarClient mainDb) { _scope = scope; - _tenantDb = tenantDb; - _tenantId = tenantId; - Resolver = new GameAppPackageResolver(provider); + _mainDb = mainDb; + Resolver = new GameAppPackageResolver(mainDb); } public GameAppPackageResolver Resolver { get; } public void SeedMaster(long id, string packageName, bool isEnabled = true, long updateTime = 0) { - _tenantDb.Insertable(BuildEntity(id, packageName, null, PackageKindEnum.Master, InheritanceModeEnum.Override, isEnabled, updateTime)) + _mainDb.Insertable(BuildEntity(id, packageName, null, PackageKindEnum.Master, InheritanceModeEnum.Override, isEnabled, updateTime)) .ExecuteCommand(); } public void SeedChild(long id, string packageName, long parentPackageId, InheritanceModeEnum mode, bool isEnabled = true, long updateTime = 0) { - _tenantDb.Insertable(BuildEntity(id, packageName, parentPackageId, PackageKindEnum.Derived, mode, isEnabled, updateTime)) + _mainDb.Insertable(BuildEntity(id, packageName, parentPackageId, PackageKindEnum.Derived, mode, isEnabled, updateTime)) .ExecuteCommand(); } 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 = _mainDb.Queryable().First(p => p.Id == id); if (existing == null) { return; @@ -221,12 +217,12 @@ public void UpdatePackage(long id, string? packageName = null, long? parentPacka } existing.UpdateTime = updateTime; - _tenantDb.Updateable(existing).ExecuteCommand(); + _mainDb.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/PublicCallbackLegacyRouteRejectionTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs new file mode 100644 index 00000000..c7b04855 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ClientApi/PublicCallbackLegacyRouteRejectionTests.cs @@ -0,0 +1,80 @@ +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 +{ + [Theory] + [InlineData("/api/GameAdWebHook/TopOnNotify/100/200/300")] // c406-keep + [InlineData("/api/GameAdWebHook/TopOnNotify")] + [InlineData("/api/GameAdWebHook/PangleGlobalNotify")] + [InlineData("/api/GameAdWebHook/AdMobNotify")] + [InlineData("/api/GameAdWebHook/UnityAdsNotify")] + public async Task AdvertisementCallback_RouteWithoutPackageIdSegment_ReturnsNotFound(string path) + { + 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(path); + + Assert.Equal(StatusCodes.Status404NotFound, (int)response.StatusCode); + } + } + } + + [Fact] + public async Task Middleware_AdvertisementRouteWithoutPackageId_IsRejected_AndLegacyFieldsIgnored() + { + 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 PublicCallbackResolutionMiddleware(request => + { + invoked = true; + return Task.CompletedTask; + }); + + await middleware.InvokeAsync(context, new PublicCallbackRouteResolver(database.MainDb)); + + // 广告回调缺 packageId:解析层 fail-closed(纵深防御),中间件 400 短路,不进入端点; + // 旧作用域字段不触发任何解析,Items 不含旧键 + Assert.False(invoked); + Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode); + Assert.False(context.Items.ContainsKey(PublicCallbackRouteContext.ItemKey)); + Assert.DoesNotContain(context.Items.Keys, key => string.Equals(key?.ToString(), "TenantId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(context.Items.Keys, key => string.Equals(key?.ToString(), "AppId", StringComparison.OrdinalIgnoreCase)); // c406-keep + Assert.DoesNotContain(context.Items.Keys, key => string.Equals(key?.ToString(), "GameAppId", StringComparison.OrdinalIgnoreCase)); // c406-keep + } + } +} 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..6f45c514 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 能命中公开回调端点。 + //(旧 tenantId/appId 查询作用域不参与),生成的 notify_url 能命中公开回调端点。 // c406-keep // 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.MainDb.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("?tenantId=123&appId=456"); // c406-keep + var provider = new PaymentOptionSettingProvider(database.MainDb, new HttpContextAccessor { HttpContext = context }); var expectedRoute = channel == "alipay" ? "api/GameOrder/NotifyAliPay" : "api/GameOrder/NotifyWeChatPay"; var notifyUrl = channel == "alipay" @@ -55,20 +55,21 @@ 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 => + var middleware = new PublicCallbackResolutionMiddleware(request => { invoked = true; - Assert.Single(request.Items); - Assert.Equal(new PublicCallbackRouteContext("pangle", "ad", null), request.Items[PublicCallbackRouteContext.ItemKey]); return Task.CompletedTask; }); await middleware.InvokeAsync(context, new PublicCallbackRouteResolver(database.MainDb)); - Assert.True(invoked); + // 旧段不构成包上下文:广告回调必须有 packageId 路由段,旧三段请求 400 短路且不写入任何上下文 + Assert.False(invoked); + Assert.Equal(StatusCodes.Status400BadRequest, context.Response.StatusCode); + Assert.False(context.Items.ContainsKey(PaymentOptionSettingProvider.PackageIdKey)); } } } 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 fce81e2f..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_NormalizesLegacyThreeSegmentCallbackUrl() - { - 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("https://client.example.com/api/GameOrder/NotifyAliPay", 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(); - } -} 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..c8bfb41a 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.MainDb.Insertable(new AppSignatureKeyEntity { Id = 7101, Kid = "kid-plain", Secret = "sig-plain", IsEnabled = true, }).ExecuteCommand(); - _db.TenantDb.Insertable(new TenantAppSignatureKeyEntity + _db.MainDb.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.MainDb); 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.MainDb.Insertable(new SessionKeyEntity { Id = 7201, Kid = "kid-plain", Secret = "session-plain", IsEnabled = true, }).ExecuteCommand(); - _db.TenantDb.Insertable(new TenantSessionKeyEntity + _db.MainDb.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.MainDb); 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.MainDb.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.MainDb, 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.MainDb.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.MainDb, new HttpContextAccessor { HttpContext = CreateAdvertisementContext(7500), }); 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.MainDb.Insertable(new AdvertisementCallbackConfigEntity { - Id = 7501, Provider = "Pangle", - SigningSecret = TenantSecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, + Id = 7501, PackageId = 7500, Provider = "Pangle", + 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.MainDb, new HttpContextAccessor { HttpContext = CreateAdvertisementContext(7500), }); 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.MainDb.Insertable(new AdvertisementCallbackConfigEntity { - Id = 7511, Provider = "Pangle", - SigningSecret = TenantSecretCrypto.Encrypt("ad-column-secret")!, VerificationKeys = string.Empty, + Id = 7511, PackageId = 7511, Provider = "Pangle", + 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.MainDb, new HttpContextAccessor { HttpContext = CreateAdvertisementContext(7511), }); 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.MainDb.Insertable(new AdvertisementCallbackConfigEntity { - Id = 7512, Provider = "GoogleAdMob", + Id = 7512, PackageId = 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.MainDb, new HttpContextAccessor { HttpContext = CreateAdvertisementContext(7512, "admob"), }); 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.MainDb.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.MainDb, 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.MainDb.Insertable(new GamePaymentConfigEntity { Id = 7701, PayChannel = "alipay", ConfigJson = configJson, IsEnabled = true, }).ExecuteCommand(); - var context = _db.CreateHttpContext(includeTenant: false, includeApp: false); + var context = _db.CreateHttpContext(); context.Items[GameFrameX.Core.Middleware.PublicCallbackRouteContext.ItemKey] = true; - var provider = new PaymentOptionSettingProvider(_db.TenantDbProvider, new HttpContextAccessor { HttpContext = context, }); + var provider = new PaymentOptionSettingProvider(_db.MainDb, new HttpContextAccessor { HttpContext = context, }); var setting = provider.GetOptionSetting("alipay"); @@ -232,27 +232,34 @@ public void PaymentProvider_Sqlite_MainDatabaseQuery_ReturnsDecryptedOption() } [Fact] - public void TenantSecretCrypto_FailClosed_CiphertextWithoutKey_ThrowsWithEnvVarHint() + public void SecretCrypto_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() + public void SecretCrypto_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)); + } + + private static DefaultHttpContext CreateAdvertisementContext(long packageId, string provider = "pangle") + { + var context = new DefaultHttpContext(); + context.Items[PublicCallbackRouteContext.ItemKey] = new PublicCallbackRouteContext(provider, "ad", packageId); + return context; } } 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..2ddf4fbd 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; @@ -38,7 +38,8 @@ public sealed class SignatureValidationMiddlewareTests private const string KeyA = "GFX-C2-VECTOR-TEST-KEY-A"; private const string KeyBId = "sk-vector-b-002"; private const string KeyB = "GFX-C2-VECTOR-TEST-KEY-B"; - private const long TestAppId = 1001; + /// 旧应用鉴权头的样本值(负向断言:该头不再参与验签,仅作存在性干扰)。 + private const long LegacyAppHeaderValue = 1001; private const string W1Signature = "gpRxwTuAYGBKjsCeTYqx7IWhTjp07AsjUL9d5Wz8RfA="; private const string W2Signature = "Su1Np4XQN4CisUiAdf1JbIxZBzgSsZJH+nDHWlTf5GQ="; private const string W3Signature = "OrisTusDdIuqJtg8THzKBjQmC0CXD/4dFvgARPTmezw="; @@ -58,15 +59,10 @@ private static SignatureValidationOptions CreateOptions(bool enabled, int tolera private static DefaultHttpContext CreateContext(string? signature, string body = V1Body) { - return CreateContext("POST", "/cola", "?op=BLLogin&userid=10086", signature, body, null); + return CreateContext("POST", "/cola", "?op=BLLogin&userid=10086", signature, body); } - private static DefaultHttpContext CreateContext(string? signature, string body, long? appId) - { - return CreateContext("POST", "/cola", "?op=BLLogin&userid=10086", signature, body, appId); - } - - private static DefaultHttpContext CreateContext(string method, string path, string? query, string? signature, string body, long? appId) + private static DefaultHttpContext CreateContext(string method, string path, string? query, string? signature, string body) { var context = new DefaultHttpContext(); context.Response.Body = new MemoryStream(); // 默认 Stream.Null 会吞掉错误信封,无法断言 @@ -83,11 +79,6 @@ private static DefaultHttpContext CreateContext(string method, string path, stri context.Request.Headers[SignatureValidationMiddleware.ColaSignatureHeader] = signature; } - if (appId.HasValue) - { - context.Request.Headers["GameFrameX-App-Id"] = appId.Value.ToString(); - } - return context; } @@ -113,7 +104,7 @@ private static byte[] W6Body() return Encoding.ASCII.GetBytes(string.Concat(Enumerable.Repeat("0123456789abcdef", 128))); } - private static DefaultHttpContext CreateV2Context(string keyId, long ts, ulong mid, string signatureBase64, string method = "POST", string path = "/cola", string? query = "?op=BLLogin&userid=10086", byte[]? body = null, long? appId = TestAppId) + private static DefaultHttpContext CreateV2Context(string keyId, long ts, ulong mid, string signatureBase64, string method = "POST", string path = "/cola", string? query = "?op=BLLogin&userid=10086", byte[]? body = null) { var context = new DefaultHttpContext(); context.Response.Body = new MemoryStream(); @@ -126,10 +117,6 @@ private static DefaultHttpContext CreateV2Context(string keyId, long ts, ulong m context.Request.Body = new MemoryStream(body ?? Encoding.UTF8.GetBytes(V1Body)); context.Request.Headers[SignatureValidationMiddleware.ColaSignatureHeader] = V2Header(keyId, ts, mid, signatureBase64); - if (appId.HasValue) - { - context.Request.Headers["GameFrameX-App-Id"] = appId.Value.ToString(); - } return context; } @@ -141,8 +128,8 @@ private static DefaultHttpContext CreateV2Context(string keyId, long ts, ulong m private static FakeSignatureKeyResolver CreateDualKeyRing() { var resolver = new FakeSignatureKeyResolver(); - resolver.AddKey(TestAppId, KeyAId, KeyA, true, 0, null); - resolver.AddKey(TestAppId, KeyBId, KeyB, true, 0, null); + resolver.AddKey(KeyAId, KeyA, true, 0, null); + resolver.AddKey(KeyBId, KeyB, true, 0, null); return resolver; } @@ -295,6 +282,20 @@ public async Task V2_W1Vector_KeyA_Passes() Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode); } + [Fact] + public async Task V2_LegacyAppHeaderPresent_DoesNotChangeValidationOutcome() + { + // 负向契约:附带旧应用鉴权头时验签结果与不带时完全一致(旧头不参与解析、不改变结果) + var nextCalled = false; + var context = CreateV2Context(KeyAId, 1755244800, 1, W1Signature); + context.Request.Headers["GameFrameX-App-Id"] = LegacyAppHeaderValue.ToString(); // c406-keep(负向断言:旧应用头被忽略) + + await InvokeAsync(context, CreateOptions(true), new MemoryCacheService(), () => nextCalled = true, CreateDualKeyRing()); + + Assert.True(nextCalled); + Assert.Equal(StatusCodes.Status200OK, context.Response.StatusCode); + } + [Fact] public async Task V2_W2Vector_KeyB_SameParams_Passes() { @@ -415,7 +416,7 @@ public async Task V2_UnknownKeyId_RejectedWith60102() public async Task V2_WithoutAppHeader_ValidSignatureUsesMainKey() { var nextCalled = false; - var context = CreateV2Context(KeyAId, 1755244800, 1, W1Signature, appId: null); + var context = CreateV2Context(KeyAId, 1755244800, 1, W1Signature); await InvokeAsync(context, CreateOptions(true), new MemoryCacheService(), () => nextCalled = true, CreateDualKeyRing()); Assert.True(nextCalled); } @@ -424,7 +425,7 @@ public async Task V2_WithoutAppHeader_ValidSignatureUsesMainKey() public async Task V2_DisabledKey_RejectedWith60103() { var ring = CreateDualKeyRing(); - ring.AddKey(TestAppId, KeyAId, KeyA, false, 0, null); // keyA 禁用(同 Kid 覆写) + ring.AddKey(KeyAId, KeyA, false, 0, null); // keyA 禁用(同 Kid 覆写) var nextCalled = false; var context = CreateV2Context(KeyAId, 1755244800, 1, W1Signature); @@ -439,7 +440,7 @@ public async Task V2_DisabledKey_RejectedWith60103() public async Task V2_ExpiredKey_RejectedWith60103() { var ring = CreateDualKeyRing(); - ring.AddKey(TestAppId, KeyAId, KeyA, true, 0, 1755244800); // 到期时刻 = 向量 ts(已过) + ring.AddKey(KeyAId, KeyA, true, 0, 1755244800); // 到期时刻 = 向量 ts(已过) var nextCalled = false; var context = CreateV2Context(KeyAId, 1755244800, 1, W1Signature); @@ -502,7 +503,8 @@ public async Task V1_SignedWithKeyringKey_TraversesActiveSetAndPasses() // v1 无 keyId:中间件应在 App 域生效密钥集合内遍历(非 C1 常量签的名也要能过) var signature = SignV1(KeyA, "POST", "/cola", "op=BLLogin&userid=10086", 1755244800, 20, V1Body); var nextCalled = false; - var context = CreateContext("v1;1755244800;20;" + signature, V1Body, TestAppId); + var context = CreateContext("v1;1755244800;20;" + signature, V1Body); + context.Request.Headers["GameFrameX-App-Id"] = LegacyAppHeaderValue.ToString(); // c406-keep(负向断言:旧应用头存在不影响验签结果) await InvokeAsync(context, CreateOptions(true), new MemoryCacheService(), () => nextCalled = true, CreateDualKeyRing()); @@ -516,7 +518,8 @@ public async Task V1_UnknownKey_FallsBackToConstantAndFails() // ring 内没有能验过这把签名的 key,也不匹配 C1 常量 → 60101(常量回退不豁免失败签名) var signature = SignV1("GFX-UNKNOWN-KEY", "POST", "/cola", "op=BLLogin&userid=10086", 1755244800, 21, V1Body); var nextCalled = false; - var context = CreateContext("v1;1755244800;21;" + signature, V1Body, TestAppId); + var context = CreateContext("v1;1755244800;21;" + signature, V1Body); + context.Request.Headers["GameFrameX-App-Id"] = LegacyAppHeaderValue.ToString(); // c406-keep(负向断言:旧应用头存在不豁免失败签名) await InvokeAsync(context, CreateOptions(true), new MemoryCacheService(), () => nextCalled = true, CreateDualKeyRing()); @@ -532,7 +535,7 @@ public async Task DualKeyCoexistence_DisableKeyA_KeyBStillPasses() { // 禁用 keyA 不影响 keyB 验签(单 key 失效不殃及全应用) var ring = CreateDualKeyRing(); - ring.AddKey(TestAppId, KeyAId, KeyA, false, 0, null); + ring.AddKey(KeyAId, KeyA, false, 0, null); var nextCalled = false; var context = CreateV2Context(KeyBId, 1755244800, 1, W2Signature); @@ -689,9 +692,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, }; } } @@ -705,16 +708,16 @@ private static string SignV1(string secret, string method, string path, string q } /// - /// 密钥环内存桩:按 (AppId, Kid) 查找,租约/启用判定复用 (与生产同一路径)。 + /// 密钥环内存桩:按 Kid 查找,租约/启用判定复用 (与生产同一路径)。 /// 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) + public void AddKey(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..eadbcf0d 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] @@ -62,49 +62,49 @@ public async Task SystemSelector_ReturnsNullWhenNoEnabledProviderExists() } [Fact] - public async Task TenantSelector_ExactPurposeBeatsDefaultPriority() + public async Task ConfigSelector_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, 0, 999, 40, true); + await InsertAsync(2, 7, 1, 5, true); + await InsertAsync(3, 0, 999, 20, true); + await InsertAsync(4, 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); } [Fact] - public async Task TenantSelector_UsesPriorityUpdateTimeAndIdTieBreakAndIgnoresDisabled() + public async Task ConfigSelector_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, 7, 300, 30, false); + await InsertAsync(2, 7, 100, 10, true); + await InsertAsync(3, 7, 200, 20, true); + await InsertAsync(4, 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); } [Fact] - public async Task TenantSelector_DefaultPurposeFallbackWorksWithoutRequestContext() + public async Task ConfigSelector_DefaultPurposeFallbackWorksWithoutRequestContext() { - await InsertTenantAsync(1, 100, 200, 0, 100, 10, true); - var selected = await TenantEmailConfigSelector.SelectAsync(_db, 7); + await InsertAsync(1, 0, 100, 10, true); + var selected = await EmailConfigSelector.SelectAsync(_db, 7); Assert.Equal(1, selected?.Id); } [Fact] - public async Task TenantSelector_ReturnsNullWhenNoEnabledProvider() + public async Task ConfigSelector_ReturnsNullWhenNoEnabledProvider() { - await InsertTenantAsync(1, 999, 200, 7, 100, 10, false); - await InsertTenantAsync(2, 100, 200, 7, 100, 10, false); + await InsertAsync(1, 7, 100, 10, false); + await InsertAsync(2, 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, int purpose, int priority, long updateTime, bool enabled) { - await _db.Insertable(new TenantEmailConfigEntity + await _db.Insertable(new EmailConfigEntity { Id = id, CreatedId = 1, @@ -157,7 +157,7 @@ await _db.Insertable(new TenantEmailConfigEntity RowVersion = 0, Purpose = purpose, Provider = "TencentCloudSes", - FromEmailAddress = "tenant@example.test", + FromEmailAddress = "config@example.test", FromEmailSecretId = "sid", FromEmailSecretKey = "skey", Priority = priority, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/SendEmailTemplateDataMapperTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/SendEmailTemplateDataMapperTests.cs index fd8e4e58..c83182cd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/SendEmailTemplateDataMapperTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Email/SendEmailTemplateDataMapperTests.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Core.Tests.Email; public class SendEmailTemplateDataMapperTests { [Fact] - public void FromDictionary_MapsSupportedTenantEmailTemplateKeys() + public void FromDictionary_MapsSupportedEmailTemplateKeys() { var data = SendEmailTemplateDataMapper.FromDictionary(new Dictionary { 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..7f1f3e3a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/AdminEnumVisibilityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Enum/AdminEnumVisibilityTests.cs @@ -68,9 +68,6 @@ 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.OrganizationErrorCode", - "GameFrameX.Core.Enum.Errors.PositionErrorCode", "GameFrameX.Core.Enum.Errors.FileErrorCode", "GameFrameX.Core.Enum.Errors.JobErrorCode", "GameFrameX.Core.Enum.Errors.DatabaseErrorCode", @@ -80,6 +77,8 @@ private static List GetLegacyWhitelistPublicEnums() "GameFrameX.Core.Enum.Errors.OnlineErrorCode", // C350(GFX-754):Online 社交治理 317 段业务错误码同规则豁免(错误码枚举不进前端枚举下拉)。 "GameFrameX.Core.Enum.Errors.OnlineModerationErrorCode", + // F2(GFX-1232):广告回调配置 318 段错误码同规则豁免(错误码枚举不进前端枚举下拉)。 + "GameFrameX.Core.Enum.Errors.AdvertisementCallbackConfigErrorCode", // Core.Enum 程序集并入 GameFrameX.Entity 后,Entity 域内邮件营销 4 个内部枚举 // 进入白名单程序集 public enum 全集;现状即不带 [AdminEnum](不暴露给前端下拉),如实豁免。 "GameFrameX.Entity.Game.Mail.MailCampaignMailType", 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..4c3cbc47 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"; + "913F5040351BB3B57444FE0F25F09753B6566B78C621874F85E683E0DD01554E"; private static readonly JsonSerializerOptions StringEnumOptions = new() { 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..197d050d 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.MainDb.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.MainDb.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.MainDb, 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.MainDb.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.MainDb, BuildFulfillmentTemplate("fulfillment-key-voided")); Assert.True(await store.TryBeginProcessingAsync(BuildRecord(FulfillmentLedgerIdempotencyStore.OrderRefundIdempotencyScope, "fulfillment-key-voided"))); // 作废为业务终态:服务侧落 Voided 后 Complete 做存在性校验(不抛错) - await _db.TenantDb.Updateable() + await _db.MainDb.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..f4ee395e 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.MainDb.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..49d6e0fe 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.MainDb.Queryable().Single(x => x.OrderId == orderId); Assert.Equal(OrderStatusEnum.Unpaid, row.Status); Assert.Equal("7001", row.AccountId); Assert.Equal("sku.gold", row.ProductId); @@ -55,7 +55,7 @@ public async Task Create_SandboxPolicy_IssuesShippedOrder_NeedPayFalse_ClosedLoo using (var db = new ClientApiTestDb()) { var policyRepository = CreatePolicyRepository(db); - await policyRepository.InsertAsync(MakePolicy(0, true)); + await policyRepository.InsertAsync(MakePolicy(true)); var verifier = new FakePayReceiptVerifier(); var controller = CreateController(db, verifier); @@ -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.MainDb.Queryable().Single(x => x.OrderId == orderId); Assert.Equal(OrderStatusEnum.Shipped, row.Status); var query = ClientApiResultReader.Data(ClientApiResultReader.Read(await controller.Query( @@ -86,7 +86,7 @@ public async Task Create_MainPolicyChange_ControlsSandboxRecharge() using (var db = new ClientApiTestDb()) { var policyRepository = CreatePolicyRepository(db); - await policyRepository.InsertAsync(MakePolicy(db.AppId, false)); + await policyRepository.InsertAsync(MakePolicy(false)); var controller = CreateController(db, new FakePayReceiptVerifier(), true); // 主库策略关闭沙箱直发。 @@ -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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.Queryable().Count(x => x.OrderId == "pay_r2")); + var row = db.MainDb.Queryable().Single(x => x.OrderId == "pay_r2"); Assert.Equal(880, row.RealMoney); } } @@ -411,39 +411,39 @@ 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) { // 旧请求作用域键不影响主库支付查询 - controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(true, true), }; + controller.ControllerContext = new ControllerContext { HttpContext = db.CreateHttpContext(), }; } return controller; } /// - /// 真 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 accessor = new HttpContextAccessor { HttpContext = db.CreateHttpContext(true, withAppContext), }; - return new ClientApiTenantOptionsProvider(tenantDbProvider, accessor); + var dbProvider = db.MainDb; + var accessor = new HttpContextAccessor { HttpContext = db.CreateHttpContext(), }; + 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(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..45b0bd51 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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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.MainDb.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..8c076b0b 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.MainDb.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.MainDb.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.MainDb.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 72% 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..f94203f7 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")); // c406-keep(负向断言:旧应用作用域字段不得回归) } [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")); // c406-keep(负向断言:旧应用作用域字段不得回归) } [Fact] public void UpdateInput_RowVersionZeroPassesValidation() { - var input = new UpdateTenantGameAppDeviceRequest + var input = new UpdateGameAppDeviceRequest { Id = 1, Name = "test-device", @@ -81,11 +81,11 @@ public void UpdateInput_RowVersionZeroPassesValidation() [Fact] public void UpdateInput_HasNoApplicationField() { - Assert.Null(typeof(UpdateTenantGameAppDeviceRequest).GetProperty("AppId")); + Assert.Null(typeof(UpdateGameAppDeviceRequest).GetProperty("AppId")); // c406-keep(负向断言:旧应用作用域字段不得回归) } [Fact] - public void TenantGameAppDeviceService_UpdateUsesGenericCrudPath() + public void GameAppDeviceService_UpdateUsesGenericCrudPath() { var updateMethod = typeof(GameAppDeviceService).GetMethod( "UpdateAsync", @@ -97,7 +97,7 @@ public void TenantGameAppDeviceService_UpdateUsesGenericCrudPath() } [Fact] - public void TenantDeviceGroupService_UpdateUsesGenericCrudPath() + public void DeviceGroupService_UpdateUsesGenericCrudPath() { var updateMethod = typeof(DeviceGroupService).GetMethod( "UpdateAsync", 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..955a2eb0 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,9 +15,6 @@ namespace GameFrameX.Core.Tests.GameBusiness; /// public sealed class FeatureSwitchDeliveryResolverTests : IDisposable { - private const long TenantId = 1001; - private const long App100 = 100; - private const long App200 = 200; private static readonly DateTime NowUtc = new DateTime(2026, 9, 14, 12, 0, 0, DateTimeKind.Utc); @@ -34,7 +31,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 +40,10 @@ public FeatureSwitchDeliveryResolverTests() [Fact] public void Resolve_NewerRowWinsRegardlessOfLegacyApplication() { - var tenantDefault = Row("login.banner", id: 1, appId: null, valueJson: "{\"v\":\"tenant\"}"); - var appRow = Row("login.banner", id: 2, appId: App100, valueJson: "{\"v\":\"app\"}"); + var defaultRow = Row("login.banner", id: 1, valueJson: "{\"v\":\"base\"}"); + var appRow = Row("login.banner", id: 2, valueJson: "{\"v\":\"app\"}"); - var result = FeatureSwitchDeliveryResolver.Resolve(new[] { tenantDefault, appRow, }, Query()); + var result = FeatureSwitchDeliveryResolver.Resolve(new[] { defaultRow, appRow, }, Query()); var item = Assert.Single(result.Switches); Assert.Equal("{\"v\":\"app\"}", item.ValueJson); @@ -368,9 +365,9 @@ public void Resolve_VersionIgnoresDeviceRolloutOutcome() [Fact] public async Task ResolveAsync_ReadsMainDatabaseCandidates() { - await InsertAsync(Row("switch.app", id: 900001, appId: App100)); - await InsertAsync(Row("switch.default", id: 900002, appId: null)); - await InsertAsync(Row("switch.other", id: 900003, appId: App200)); + await InsertAsync(Row("switch.app", id: 900001)); + await InsertAsync(Row("switch.default", id: 900002)); + await InsertAsync(Row("switch.other", id: 900003)); var result = await CreateResolver().ResolveAsync(Query()); @@ -396,10 +393,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; @@ -413,7 +410,6 @@ private static long ToUnixSeconds(DateTime utc) private static FeatureSwitchDeliveryQuery Query( FeatureSwitchAudience audience = FeatureSwitchAudience.Client, - long? appId = App100, string? platform = null, IReadOnlyList? packageCandidates = null, string? language = null, @@ -433,10 +429,9 @@ private static FeatureSwitchDeliveryQuery Query( }; } - private static TenantGameAppFeatureSwitchEntity Row( + private static GameAppFeatureSwitchEntity Row( string switchKey, long id, - long? appId = App100, string audience = FeatureSwitchAudienceValues.Both, string valueJson = "{}", long? startTime = null, @@ -450,7 +445,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..4a60002a 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; @@ -13,12 +13,10 @@ namespace GameFrameX.Core.Tests.GameBusiness; /// C345 活动/功能开关管理服务测试。 /// 覆盖:写入侧事实固化(作用域维度归一为 Default 哨兵、消费方标记收小写、时间窗不倒置、 /// ValueJson 合法性、灰度与白名单形状)、同作用域组合查重与自身排除、应用作用域锁定、 -/// 租户默认层不得携带具体包名(C80)、分页按应用作用域收口,以及物理表名落 tenant_ 前缀。 +/// 默认层不得携带具体包名(C80)、分页按应用作用域收口,以及物理表名落无前缀业务表。 /// public sealed class GameAppFeatureSwitchServiceTests : IDisposable { - private const long App100 = 100; - private const long App200 = 200; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"feature_switch_service_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _db; @@ -33,21 +31,21 @@ 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)); } /// - /// 实体落库物理表名带 tenant_ 前缀(写后读一致性前提,避免租户表名分叉)。 + /// 实体落库物理表名为无前缀业务表(D3:业务表不再带 tenant_ 前缀)。 // c406-keep(描述已退场的前缀) /// [Fact] - public async Task PhysicalTableName_CarriesTenantPrefix() + public async Task PhysicalTableName_IsPrefixFreeBusinessTable() { var service = CreateService(); 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); } /// @@ -108,7 +106,7 @@ public async Task Add_RejectsDuplicateScopeCombination() public async Task Add_AllowsSameKeyWithDifferentScopeDimension() { var service = CreateService(); - await InsertAsync("switch.scoped", App100); + await InsertAsync("switch.scoped"); var android = NewRequest("switch.scoped"); android.Platform = "android"; @@ -118,21 +116,21 @@ public async Task Add_AllowsSameKeyWithDifferentScopeDimension() } /// - /// 租户默认层与应用层是两个独立作用域空间,同键同行互不冲突。 + /// 相同开关键在库内唯一,重复新增被拒绝。 /// [Fact] public async Task Add_RejectsDuplicateInMainDatabase() { var service = CreateService(); - await InsertAsync("switch.layered", App100); + await InsertAsync("switch.layered"); - var tenantDefault = NewRequest("switch.layered"); + var defaultRow = NewRequest("switch.layered"); - await Assert.ThrowsAsync(() => service.AddAsync(tenantDefault)); + await Assert.ThrowsAsync(() => service.AddAsync(default)); } /// - /// 租户默认层(AppId <= 0)不得携带具体包名(C80 规则,由 PackageScopeValidator 收口)。 + /// 未登记的具体包名不得作为投放维度(C80 规则,由 PackageScopeValidator 收口)。 /// [Fact] public async Task Add_RejectsUnregisteredPackage() @@ -157,7 +155,7 @@ public async Task Add_ValidatesConcretePackageAgainstEnabledAppPackages() unknown.Package = "com.gameframe.unknown"; await Assert.ThrowsAsync(() => service.AddAsync(unknown)); - await InsertPackageAsync(App100, "com.gameframe.known"); + await InsertPackageAsync("com.gameframe.known"); var known = NewRequest("switch.package.known"); known.Package = "com.gameframe.known"; var row = await service.AddAsync(known); @@ -204,7 +202,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); } @@ -252,7 +250,7 @@ public async Task Add_ValidatesRolloutShape() } /// - /// 更新锁定应用作用域:调用方传 AppId 也不允许把应用行改挂到租户默认层。 + /// 更新沿用自身作用域组合,不允许改挂到其它作用域层。 /// [Fact] public async Task Update_PersistsChangedValue() @@ -270,7 +268,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 +291,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); } @@ -316,14 +314,14 @@ await Assert.ThrowsAsync(() => service.UpdateAsync(new Update } /// - /// 分页按应用作用域收口:正值只看该应用行,留空只看租户默认层行,两层不混列。 + /// 分页从主库读取并施加业务过滤。 /// [Fact] public async Task Page_QueriesMainDatabaseAndAppliesBusinessFilter() { - await InsertAsync("switch.app100", App100); - await InsertAsync("switch.app200", App200); - await InsertAsync("switch.default", null); + await InsertAsync("switch.app100"); + await InsertAsync("switch.app200"); + await InsertAsync("switch.default"); var service = CreateService(); @@ -336,8 +334,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) @@ -356,9 +354,9 @@ private static AddGameAppFeatureSwitchRequest NewRequest(string switchKey) // (紧凑布局、同毫秒有序列),旧「同毫秒两次插入同主键」退化不再成立(C361 / GFX-804)。 private long _nextSeedId = 900000; - private async Task InsertAsync(string switchKey, long? appId) + private async Task InsertAsync(string switchKey) { - await _db.Insertable(new TenantGameAppFeatureSwitchEntity + await _db.Insertable(new GameAppFeatureSwitchEntity { Id = _nextSeedId++, SwitchKey = switchKey, @@ -376,9 +374,9 @@ await _db.Insertable(new TenantGameAppFeatureSwitchEntity }).ExecuteCommandAsync(); } - private async Task InsertPackageAsync(long gameAppId, string packageName) + private async Task InsertPackageAsync(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 75% 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..c0255aa7 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() { @@ -20,12 +20,12 @@ private static JsonSerializerOptions CreateOptions() [Fact] public void AddRequest_FrontendShapedStringPayload_Deserializes() { - const string payload = "{\"appId\":\"1300000000001\",\"status\":\"OnSale\",\"categoryId\":\"7451234567890123\",\"cost\":false,\"number\":\"5\"}"; + const string payload = "{\"appId\":\"1300000000001\",\"status\":\"OnSale\",\"categoryId\":\"7451234567890123\",\"cost\":false,\"number\":\"5\"}"; // c406-keep(负向断言:旧应用作用域字段不得回归) - 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")); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Equal("OnSale", request.Status); Assert.Equal(7451234567890123, request.CategoryId); Assert.Equal(5, request.Number); @@ -34,9 +34,9 @@ public void AddRequest_FrontendShapedStringPayload_Deserializes() [Fact] public void AddRequest_NumericCategoryIdPayload_Deserializes() { - const string payload = "{\"appId\":1300000000001,\"status\":\"OnSale\",\"categoryId\":7451234567890123,\"cost\":true,\"number\":5}"; + const string payload = "{\"appId\":1300000000001,\"status\":\"OnSale\",\"categoryId\":7451234567890123,\"cost\":true,\"number\":5}"; // c406-keep(负向断言:旧应用作用域字段不得回归) - var request = JsonSerializer.Deserialize(payload, CreateOptions()); + var request = JsonSerializer.Deserialize(payload, CreateOptions()); Assert.NotNull(request); Assert.Equal(7451234567890123, request.CategoryId); @@ -47,15 +47,15 @@ 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] public void PageRequest_TextSearchNumberFilter_Deserializes() { - const string payload = "{\"page\":1,\"pageSize\":20,\"appId\":\"1300000000001\",\"number\":\"5\",\"categoryId\":\"7451234567890123\"}"; + const string payload = "{\"page\":1,\"pageSize\":20,\"appId\":\"1300000000001\",\"number\":\"5\",\"categoryId\":\"7451234567890123\"}"; // c406-keep(负向断言:旧应用作用域字段不得回归) - 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..69955a80 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,15 +17,15 @@ 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("AppId", groupProps); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.DoesNotContain("Code", groupProps); Assert.DoesNotContain("Icon", groupProps); Assert.Contains("Sort", groupProps); - Assert.DoesNotContain("AppId", templateProps); + Assert.DoesNotContain("AppId", templateProps); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Contains("GroupId", templateProps); Assert.Contains("RewardItemsJson", templateProps); Assert.Contains("SnapshotSchemaVersion", templateProps); @@ -35,13 +35,13 @@ 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(GameRewardTemplateSnapshotRequest).GetProperty("AppId")); + Assert.Null(typeof(AddGameRewardTemplateGroupEntityRequest).GetProperty("AppId")); // c406-keep(负向断言:旧应用作用域字段不得回归) + Assert.Null(typeof(AddGameRewardTemplateGroupEntityRequest).GetProperty("Code")); + Assert.Null(typeof(AddGameRewardTemplateGroupEntityRequest).GetProperty("Icon")); + Assert.Null(typeof(AddGameRewardTemplateEntityRequest).GetProperty("AppId")); // c406-keep(负向断言:旧应用作用域字段不得回归) + AssertRequired(nameof(AddGameRewardTemplateEntityRequest.GroupId)); + AssertRequired(nameof(AddGameRewardTemplateEntityRequest.RewardItemsJson)); + Assert.Null(typeof(GameRewardTemplateSnapshotRequest).GetProperty("AppId")); // c406-keep(负向断言:旧应用作用域字段不得回归) } [Fact] @@ -80,14 +80,14 @@ public void RewardTemplateServices_GuardRewardSnapshotContracts() var groupSource = File.ReadAllText(Path.Combine(FindRepoRoot(), "GameFrameX.Application/NoticeCenter/GameRewardTemplateGroup/GameRewardTemplateGroupService.cs")); var templateSource = File.ReadAllText(Path.Combine(FindRepoRoot(), "GameFrameX.Application/NoticeCenter/GameRewardTemplate/GameRewardTemplateService.cs")); - Assert.DoesNotContain("EnsureFactAppId", groupSource); - Assert.DoesNotContain("EnsureFactAppId", templateSource); + Assert.DoesNotContain("EnsureFactAppId", groupSource); // c406-keep(负向断言:旧应用作用域字段不得回归) + Assert.DoesNotContain("EnsureFactAppId", templateSource); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Contains("ValidateGroupAsync(input.GroupId)", templateSource); Assert.Contains("ValidateRewardItemsJson(input.RewardItemsJson)", templateSource); Assert.Contains("RowVersion = t.RowVersion", templateSource); Assert.DoesNotContain("GroupCode", templateSource); Assert.DoesNotContain("EnsureCodeUniqueAsync", groupSource); - Assert.DoesNotContain("entity.AppId", templateSource); + Assert.DoesNotContain("entity.AppId", templateSource); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Contains("entity.IsEnabled == false", templateSource); } 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..c439eebd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderFulfillmentServiceContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/GameOrder/GameOrderFulfillmentServiceContractTests.cs @@ -33,12 +33,12 @@ 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(); - Assert.DoesNotContain("AppId", props); + Assert.DoesNotContain("AppId", props); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Contains("OrderId", props); Assert.Contains("RoleId", props); Assert.Contains("AreaId", props); @@ -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..4e65ffa6 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; @@ -23,16 +23,14 @@ namespace GameFrameX.Core.Tests.HubApi; /// /// C347 功能开关服务器通道(FeatureSwitchSyncController + OpenAccess 鉴权面)端点级测试。 /// 覆盖:消费方过滤(client 行不下发,server|both 命中)、四维无上下文仅命中 Default 哨兵行、 -/// 服务器通道不做设备灰度、AppId 只取凭证绑定注入、版本协议三态、缺凭证上下文拒绝, +/// 服务器通道不做设备灰度,凭证由机器通道注入、版本协议三态、缺凭证上下文拒绝, /// 以及 scope = FeatureSwitchSync 的路由放行 / 越权 403 语义与 HMAC v2 签名链路对本路由的适用性。 /// public sealed class FeatureSwitchSyncControllerTests : IDisposable { - 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_tenant_{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() @@ -46,30 +44,29 @@ 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 mainDb, bool includeContext = true) { var provider = _mainDb; - var repository = new Repository(_mainDb); - tenantDb = provider; + var repository = new Repository(_mainDb); + mainDb = 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 = "{}", string audience = FeatureSwitchAudienceValues.Both, - long? appId = CredentialAppId, string platform = GameDimensionConst.PlatformDefault, int rolloutPercent = 100) { - return new TenantGameAppFeatureSwitchEntity + return new GameAppFeatureSwitchEntity { Id = id, SwitchKey = switchKey, @@ -93,13 +90,13 @@ private static TenantGameAppFeatureSwitchEntity Row( [Fact] public async Task Sync_FiltersByAudienceFromMainDatabase() { - var controller = CreateController(out var tenantDb); - tenantDb.Insertable(new[] + var controller = CreateController(out var mainDb); + mainDb.Insertable(new[] { Row(1, "economy.drop_rate", "{\"rate\":2}", audience: FeatureSwitchAudienceValues.Server), Row(2, "login.banner", "{\"v\":1}", audience: FeatureSwitchAudienceValues.Both), Row(3, "client.only", "{\"v\":3}", audience: FeatureSwitchAudienceValues.Client), - Row(4, "other.app", "{\"v\":4}", audience: FeatureSwitchAudienceValues.Server, appId: CredentialAppId + 1), + Row(4, "other.app", "{\"v\":4}", audience: FeatureSwitchAudienceValues.Server), }).ExecuteCommand(); var root = ClientApiResultReader.Read(await controller.Sync(new FeatureSwitchSyncRequest())); @@ -120,8 +117,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 mainDb); + mainDb.Insertable(new[] { Row(1, "activity.android_only", "{\"v\":1}", platform: "android"), Row(2, "activity.everyone", "{\"v\":2}"), @@ -140,8 +137,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 mainDb); + mainDb.Insertable(new[] { Row(1, "economy.zero_rollout", "{\"rate\":5}", rolloutPercent: 0), }).ExecuteCommand(); @@ -159,9 +156,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 mainDb); var row = Row(1, "economy.drop_rate", "{\"rate\":1}"); - tenantDb.Insertable(row).ExecuteCommand(); + mainDb.Insertable(row).ExecuteCommand(); var firstResult = await controller.Sync(new FeatureSwitchSyncRequest()); var first = ClientApiResultReader.Data(ClientApiResultReader.Read(firstResult)); @@ -177,7 +174,7 @@ public async Task Sync_VersionProtocol_FirstPullUnchangedShortCircuitAndChange() Assert.Equal(0, unchanged.GetProperty("Switches").GetArrayLength()); row.ValueJson = "{\"rate\":9}"; - tenantDb.Updateable(row).ExecuteCommand(); + mainDb.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 +205,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 +216,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,15 +227,15 @@ 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)); } 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/TenantGameAppOpenAccessAuthMiddlewareTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/HubApi/GameAppOpenAccessAuthMiddlewareTests.cs similarity index 59% 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..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, @@ -38,10 +38,10 @@ 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", "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,23 +55,23 @@ 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] 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", "serverId=9&channel=ios", body); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9&channel=ios", Ts, Nonce, body, provided); + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( + 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); + var provided = ClientSign("POST", "/api/PackageBuildReport", "serverId=9", body); - var verified = TenantGameAppOpenAccessAuthMiddleware.VerifySignature( - Credential(), "POST", "/api/PackageBuildReport", "appId=9", Ts, Nonce, + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( + Credential(), "POST", "/api/PackageBuildReport", "serverId=9", Ts, Nonce, 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&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); + var verified = GameAppOpenAccessAuthMiddleware.VerifySignature( + Credential(), "POST", "/api/PackageBuildReport", "serverId=9&channel=ios", Ts, Nonce, body, provided); 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/GameAppOpenAccessDecryptClosureTests.cs similarity index 76% 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..9d6f01b3 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; @@ -124,17 +124,17 @@ public async Task MainDatabaseCredential_InvalidStateOrRequest_IsRejected(string } [Fact] - public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoTenantClaim() + public async Task MainDatabaseCredential_ReplayIsRejectedAndOperatorHasNoLegacyScopeClaim() { - 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("TenantId")); // c406-keep 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.MainDb.Insertable(bindUser).ExecuteCommand(); + _db.MainDb.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.MainDb); 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..52b94eb4 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; @@ -37,16 +37,16 @@ namespace GameFrameX.Core.Tests.Logging; /// /// Monitor 日志采集与调度管线回归守护测试(C363 / T5,真实 HTTP → 行落库): /// TestServer 挂真实 (Monitor 过滤器 + 调度队列 + 文件/数据库/ES Sink), -/// SqlSugar sqlite 主库(main)+ 租户库(1001)双连接,覆盖三表分流、C156 分表路由、C171 动态开关、 +/// SqlSugar sqlite 主库(main)+ 第二业务库(1001)双连接,覆盖三表分流、C156 分表路由、C171 动态开关、 /// sys_oplog 门控、[SuppressMonitor] 豁免、数据校验短路与 data/logs 文件生成。防复发锚点: /// 历史框架退役(2026-07-27)后全库 *_log_* 表零写入的事故不允许再次静默发生。 /// 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 = "operator"; 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,34 @@ 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.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 +224,16 @@ 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.Equal("admin", visitRows[0].Account); var mainDb = _db.GetConnectionScope(MainConfigId); var mainVisitRows = await mainDb.Queryable().Where(u => u.ActionName == "Logout").ToListAsync(); @@ -243,7 +241,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 +255,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()); } /// @@ -281,12 +279,12 @@ public async Task InvalidModel_DoesNotWriteAnyRow() /// /// 验收 7(C171):platform_logging_config database.enabled=false 保存 + 刷新快照后, - /// 同 Host 内后续调用立即停止落库(无租户上下文 → 平台库的既有语义同时得到验证)。 + /// 同 Host 内后续调用立即停止落库(匿名上下文 → 平台库的既有语义同时得到验证)。 /// [Fact] public async Task DatabaseSwitchDisabled_StopsWritingImmediately() { - // 基线:无租户上下文调用 → 主库平台操作日志行存在(平台兜底路由) + // 基线:匿名上下文调用 → 主库平台操作日志行存在(平台兜底路由) var baselineStatus = await PostAsync("/api/monitorPipeline/page", AnonymousIdentity, "{\"keyword\":\"before-switch\"}"); Assert.Equal(HttpStatusCode.OK, baselineStatus); var mainDb = _db.GetConnectionScope(MainConfigId); @@ -343,34 +341,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"; @@ -485,7 +483,7 @@ private async Task BuildHostAsync() }); webBuilder.Configure(app => { - // 测试身份:按请求头注入 Claims(无 JWT),覆盖 SuperAdmin / 租户 / 匿名三种上下文 + // 测试身份:按请求头注入 Claims(无 JWT),覆盖 SuperAdmin / 管理员 / 匿名三种上下文 app.Use(async (context, next) => { context.User = BuildTestPrincipal(context.Request.Headers["X-Test-Identity"].ToString()); @@ -540,12 +538,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..51be6ef8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignEntityServiceContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/MailCampaign/MailCampaignEntityServiceContractTests.cs @@ -35,9 +35,9 @@ 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.DoesNotContain("AppId", props); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Contains("AreaId", props); Assert.Contains("Name", props); Assert.Contains("MailType", props); @@ -49,9 +49,9 @@ 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.DoesNotContain("AppId", props); // c406-keep(负向断言:旧应用作用域字段不得回归) Assert.Contains("AreaId", props); Assert.Contains("Name", props); Assert.Contains("TemplateId", 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/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/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/ObjectStorage/ObjectStorageActiveConfigConcurrencyTests.cs index 30bb8c2f..c1b1deec 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 dbNo = 1300000000001L; + var db = OpenDb(dbNo); // 预置 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 dbNo = 1300000000002L; + var db = OpenDb(dbNo); - 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 dbNo) { - var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_active_config_{tenantId}_{Guid.NewGuid():N}.db"); + var dbPath = Path.Combine(Path.GetTempPath(), $"gfx_active_config_{dbNo}_{Guid.NewGuid():N}.db"); _dbPaths.Add(dbPath); - var tenantConfig = new DbConnectionConfig + var dbConfig = new DbConnectionConfig { - ConfigId = tenantId.ToString(), + ConfigId = dbNo.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(dbConfig); + var scope = new SqlSugarScope(dbConfig); + var db = scope.GetConnectionScope(dbNo.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..f1970c69 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 @@ -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); @@ -49,7 +47,7 @@ public void OnlineAssetMenus_Pages_UseOnlineOperationsPathsAndMatchLedgerSpec( } [Fact] - public void OnlineAssetMenus_HighRiskButtons_AreTenantAdminOnly() + public void OnlineAssetMenus_HighRiskButtons_AreAdminRoleOnly() { var menus = GlobalMenuSeedData.BuildData(); var grant = Assert.Single(menus, m => m.Key == "onlineWalletLedger:grant"); @@ -60,7 +58,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..31aa17e9 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,14 +10,12 @@ 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 App100 = 100; public const long Area1001 = 2001; public const long Area1002 = 2002; @@ -63,18 +61,17 @@ 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() { var identity = new global::System.Security.Claims.ClaimsIdentity("TestAuth"); - 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); } - public static TenantGameAreaEntity NewArea(long id, long appId, long now) + public static GameAreaEntity NewArea(long id, long now) { - return new TenantGameAreaEntity + return new GameAreaEntity { Id = id, Name = $"area-{id}", @@ -102,10 +99,10 @@ public static TenantGameAreaEntity NewArea(long id, long appId, long now) public static async Task SeedScopeAsync(SqlSugarScopeProvider db, bool secondArea = false) { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await db.Insertable(NewArea(Area1001, App100, now)).ExecuteCommandAsync(); + await db.Insertable(NewArea(Area1001, now)).ExecuteCommandAsync(); if (secondArea) { - await db.Insertable(NewArea(Area1002, App100, now)).ExecuteCommandAsync(); + await db.Insertable(NewArea(Area1002, now)).ExecuteCommandAsync(); } } } 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..53e97ec3 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,16 +44,16 @@ 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)); } /// /// 三来源归并(作用域锚定):按 OccurredAt 倒序混排,来源标注正确; - /// Online 事件行回填查询锚定作用域;无作用域提取值的操作日志行(AppId=null)被作用域过滤排除。 + /// Online 事件行回填查询锚定区服;无区服提取值的操作日志行被作用域过滤排除。 /// [Fact] public async Task PageAsync_MergesThreeSources_InOccurredAtOrder() @@ -155,7 +155,7 @@ public async Task PageAsync_KeysetCursor_PagesForward() } /// - /// Online 来源参与前置:未锚定 AppId+ServerId 时该来源静默跳过(零 Online 调用), + /// Online 来源参与前置:未锚定 ServerId 时该来源静默跳过(零 Online 调用), /// 本地两来源仍全量检索(含无作用域提取值的操作日志行)。 /// [Fact] @@ -246,7 +246,7 @@ await _db.Insertable(new SystemLogOperationEntity Id = 1, HttpMethod = "POST", RequestUrl = "/api/onlinePenaltyLinkCommand/execute", - RequestParam = $"{{\"input\":{{\"appId\":{OnlineAssetTestSupport.App100},\"serverId\":{OnlineAssetTestSupport.Area1001},\"playerId\":\"player-9\",\"ticketId\":\"t-77\"}}}}", + RequestParam = $"{{\"input\":{{\"serverId\":{OnlineAssetTestSupport.Area1001},\"playerId\":\"player-9\",\"ticketId\":\"t-77\"}}}}", ControllerName = "OnlinePenaltyLinkCommand", ActionName = "Execute", DisplayTitle = "处罚联动执行", @@ -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..d2e7bf95 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 @@ -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); @@ -40,7 +39,7 @@ public void OnlineConsoleMenus_Pages_UseOnlineOperationsPaths( // C403:叶子路径和组件直接使用 gmCenter 前缀。 Assert.Equal(path, page.Path); Assert.Equal(component, page.Component); - // 控制台查询受众:租户管理员 + 运营负责人 + 客服 GM + 数据分析。 + // 控制台查询受众:管理员角色 + 运营负责人 + 客服 GM + 数据分析。 } [Fact] @@ -66,7 +65,7 @@ public void OnlineConsoleMenus_QueryButtons_CarryPermissionMatching_EndpointConv } [Fact] - public void OnlineConsoleMenus_ExecuteButton_IsTenantAdminOnly() + public void OnlineConsoleMenus_ExecuteButton_IsAdminRoleOnly() { var menus = GlobalMenuSeedData.BuildData(); var execute = Assert.Single(menus, m => m.Key == "onlinePlayerTimeline:execute"); @@ -75,6 +74,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..852ccd38 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,8 +23,6 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 回滚目标不存在拒绝、下发失败删行重抛(不留半生效审计行)。 public sealed class GameOnlineConfigRolloutServiceTests : IDisposable { - private const long TenantA = 1001; - private const long App100 = 100; private const long Area1001 = 2001; private const long SegmentSynced = 7001; @@ -49,8 +47,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 +63,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 +84,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 +145,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 +180,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,20 +215,15 @@ private RollbackConfigRolloutRequest NewRollback(int targetVersion) private GameOnlineConfigRolloutService CreateService() { return new GameOnlineConfigRolloutService( - Repository(), - Repository(), + Repository(), + Repository(), _dispatch, - CreateUserContext(TenantA)); + CreateUserContext()); } - private static CurrentUserContext CreateUserContext(long? tenantId) + private static CurrentUserContext CreateUserContext() { var identity = new ClaimsIdentity("TestAuth"); - if (tenantId.HasValue) - { - identity.AddClaim(new Claim("TenantId", tenantId.Value.ToString())); - } - var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; var accessor = new HttpContextAccessor { HttpContext = httpContext, }; return new CurrentUserContext(accessor); @@ -244,7 +237,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 +245,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 +273,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 +294,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..d0a0a385 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,6 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // 被灰度版本行引用的分群不可删除。 public sealed class GameOnlinePlayerSegmentServiceTests : IDisposable { - private const long TenantA = 1001; private const long App100 = 100; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"online_segment_{Guid.NewGuid():N}.db"); @@ -43,8 +42,8 @@ public GameOnlinePlayerSegmentServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameOnlinePlayerSegmentEntity), - typeof(TenantGameOnlineConfigRolloutEntity)); + typeof(GameOnlinePlayerSegmentEntity), + typeof(GameOnlineConfigRolloutEntity)); } /// @@ -59,7 +58,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 +97,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 +125,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 +149,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 +163,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 +186,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 +199,8 @@ private AddTenantGameOnlinePlayerSegmentRequest NewAdd(string? conditionsJson) private GameOnlinePlayerSegmentService CreateService() { return new GameOnlinePlayerSegmentService( - Repository(), - Repository(), + Repository(), + Repository(), _dispatch); } @@ -232,7 +231,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 +247,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..985ecaa0 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 @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Globalization; -using System.Security.Claims; using GameFrameX.Application.GmCenter.LiveOps.Dispatch; using GameFrameX.Application.GmCenter.LiveOps.Dispatch.Dto; using GameFrameX.Application.ServerCenter.Online; @@ -10,11 +9,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; @@ -25,13 +24,10 @@ namespace GameFrameX.Core.Tests.Online.LiveOps; // C343 / GFX-755(vault:C8 S7.7):统一下发服务行为测试(mock-first:fake IOnlineServerClient,联调延后)。 // 覆盖:四类配置来源路由到冻结命令名 + 载荷键断言、越枚举拒绝、来源不存在拒绝、应用归属不符拒绝、 // 邮件方案C(Published 同目标合并返回首次回执 / Draft 拒绝并指引 / ServerId≠AreaId 拒绝 / 合并路径不发起 Online 调用)、 -// 分群同步通道回执映射。作用域走真实 OnlineScopeContextFactory(含租户归属校验)。 +// 分群同步通道回执映射。作用域走真实 OnlineScopeContextFactory(含区服归属校验)。 public sealed class OnlineLiveOpsDispatchServiceTests : IDisposable { - private const long TenantA = 1001; - private const long App100 = 100; - private const long App200 = 200; - private const long Area1001 = 2001; // 归属 App100 + private const long Area1001 = 2001; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"online_liveops_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _scopeOwner; @@ -53,12 +49,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 +193,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,25 +225,12 @@ private OnlineLiveOpsDispatchService CreateService() { return new OnlineLiveOpsDispatchService( _client, - new OnlineScopeContextFactory(Repository()), - Repository(), - Repository(), - Repository(), - Repository(), - Repository()); - } - - private static CurrentUserContext CreateUserContext(long? tenantId) - { - var identity = new ClaimsIdentity("TestAuth"); - if (tenantId.HasValue) - { - identity.AddClaim(new Claim("TenantId", tenantId.Value.ToString())); - } - - var httpContext = new DefaultHttpContext { User = new ClaimsPrincipal(identity), }; - var accessor = new HttpContextAccessor { HttpContext = httpContext, }; - return new CurrentUserContext(accessor); + new OnlineScopeContextFactory(Repository()), + Repository(), + Repository(), + Repository(), + Repository(), + Repository()); } private SqlSugarRepository Repository() where T : EntityBase, new() @@ -259,17 +242,17 @@ private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(NewArea(Area1001, App100, now)).ExecuteCommandAsync(); + await _db.Insertable(NewArea(Area1001, 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(); + // 四类配置来源各一行;公告 9005 为独立记录 + 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 +263,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 +274,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 now) { - return FillStrings(new TenantGameAreaEntity + return FillStrings(new GameAreaEntity { Id = id, CreatedTime = now, @@ -302,7 +285,7 @@ private static TenantGameAreaEntity NewArea(long id, long gameAppId, long now) } /// - /// 反射填充全部 string 属性为空串(绕开实体 NOT NULL 列的种子样板;测试只关心 Id/AppId/状态字段)。 + /// 反射填充全部 string 属性为空串(绕开实体 NOT NULL 列的种子样板;测试只关心 Id/状态字段)。 /// private static T FillStrings(T entity) where T : class { 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..82e6788d 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,6 @@ namespace GameFrameX.Core.Tests.Online.Social; // 单区服失败(Online 业务码 / 传输层)不抛不回滚事实源、非 Active / 纯落账动作 / 全区服无目标拒绝。 public sealed class OnlinePenaltyLinkCommandServiceTests : IDisposable { - private const long TenantA = 3001; private const long App100 = 100; private const long Area1001 = 2001; private const long Area1002 = 2002; @@ -48,8 +47,8 @@ public OnlinePenaltyLinkCommandServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantGamePenaltyEntity)); + typeof(GameAreaEntity), + typeof(GamePenaltyEntity)); } /// @@ -134,7 +133,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 +219,11 @@ public async Task ExecuteLinkAsync_RejectsGlobalPenaltyWithoutTargetServers() private OnlinePenaltyLinkCommandService CreateService(IOnlineServerClient onlineServerClient) { - var userContext = CreateUserContext(TenantA); - var factory = new OnlineScopeContextFactory(Repository()); + var userContext = CreateUserContext(); + var factory = new OnlineScopeContextFactory(Repository()); return new OnlinePenaltyLinkCommandService( - Repository(), - Repository(), + Repository(), + Repository(), onlineServerClient, factory); } @@ -242,7 +241,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 +258,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 +290,9 @@ private static TenantGameAreaEntity NewArea(long id, long now) return new SqlSugarRepository { Context = _db, }; } - private static CurrentUserContext CreateUserContext(long tenantId) + private static CurrentUserContext CreateUserContext() { var identity = new ClaimsIdentity("TestAuth"); - 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 c823e7c6..dca5e487 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,6 @@ namespace GameFrameX.Core.Tests.Online.Social; // 案件回写失败落响应原因不阻断;Mute 缺时长服务端兜底拒绝;Page 过滤透传与游标往返。 public sealed class OnlineReportCaseServiceTests : IDisposable { - private const long TenantA = 4001; private const long App100 = 100; private const long Area1001 = 2001; private const long OperatorUserId = 77; @@ -48,8 +47,8 @@ public OnlineReportCaseServiceTests() SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity), - typeof(TenantGamePenaltyEntity)); + typeof(GameAreaEntity), + typeof(GamePenaltyEntity)); } /// @@ -73,7 +72,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 +117,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 +149,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 +264,15 @@ public async Task PageAsync_PassesThroughFiltersAndCursor() private OnlineReportCaseService CreateService(IOnlineServerClient onlineServerClient) { - var userContext = CreateUserContext(TenantA, OperatorUserId); - var factory = new OnlineScopeContextFactory(Repository()); + var userContext = CreateUserContext(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 +282,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 +312,9 @@ await _db.Insertable(new TenantGameAreaEntity return new SqlSugarRepository { Context = _db, }; } - private static CurrentUserContext CreateUserContext(long tenantId, long userId) + private static CurrentUserContext CreateUserContext(long userId) { var identity = new ClaimsIdentity("TestAuth"); - 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/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..826c47be 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,28 @@ 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] 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); + using var fixture = new PostgresPaymentFixture(); var configJson = PaymentConfigCrypto.EncryptConfigJson("alipay", "{\"AliPayAppId\":\"2021001\",\"AliPayMerchantPrivateKey\":\"plain-merchant-key\",\"AliPayGatewayUrl\":\"https://openapi.alipay.com/gateway.do\"}"); - fixture.TenantDb.Insertable(new TenantGamePaymentConfigEntity + fixture.MainDb.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.MainDb, new HttpContextAccessor { HttpContext = httpContext, }); var setting = provider.GetOptionSetting("alipay"); @@ -53,19 +51,19 @@ public void GetOptionSetting_SensitiveJsonFieldDecrypts() } finally { - Environment.SetEnvironmentVariable(TenantSecretCrypto.KeyEnvironmentVariable, originalKey); + Environment.SetEnvironmentVariable(SecretCrypto.KeyEnvironmentVariable, originalKey); } } /// - /// 独立 PG 测试库 fixture(镜像 PublicCallbackTenantRoutingTests 私有实现,不跨测试类共享状态): + /// 独立 PG 测试库 fixture(不跨测试类共享状态): /// 建库 → 主库注册租户行 → 租户库建租户表,Dispose 整库删除。 /// private sealed class PostgresPaymentFixture : IDisposable { private readonly string _databaseName; - public PostgresPaymentFixture(long tenantId, long appId) + public PostgresPaymentFixture() { _databaseName = ("gfx_c372_pay_" + Guid.NewGuid().ToString("N")).ToLowerInvariant(); ExecuteAdminCommand($"CREATE DATABASE \"{_databaseName}\""); @@ -74,17 +72,11 @@ public PostgresPaymentFixture(long tenantId, long appId) MainDb = new SqlSugarScope(mainConfig); - TenantDbProvider = MainDb; - TenantDb = TenantDbProvider; - TenantDb.CodeFirst.InitTables(typeof(TenantGamePaymentConfigEntity)); - _ = appId; + MainDb.CodeFirst.InitTables(typeof(GamePaymentConfigEntity)); } public SqlSugarScope MainDb { get; } - public ISqlSugarClient TenantDb { get; } - - public ISqlSugarClient TenantDbProvider { get; } public void Dispose() @@ -119,7 +111,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 { 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..f1b61db5 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 })); @@ -171,12 +171,12 @@ public async Task Create_RejectsInvalidServers(long target, long source) } [Fact] - public void PlanEntity_UsesMainDatabaseAndExplicitTenantPhysicalOwnership() + public void PlanEntity_UsesMainDatabaseAndExplicitBusinessOwnership() { - 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..73c3f7e0 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,11 +19,8 @@ namespace GameFrameX.Core.Tests.ServerManager.Online; // S3/C401 断链修复点 public sealed class OnlineScopeContextFactoryTests : IDisposable { - private const long TenantA = 1001; - private const long App100 = 100; - private const long App200 = 200; - private const long Area1001 = 2001; // 归属 App100 - private const long Area2001 = 3001; // 归属 App200(构造跨应用区服场景) + private const long Area1001 = 2001; + private const long Area2001 = 3001; private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"online_scope_{Guid.NewGuid():N}.db"); private readonly SqlSugarScope _scopeOwner; @@ -47,8 +44,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 +53,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 +61,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 +70,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 +78,14 @@ public async Task CreateAsync_ReturnsExistingServerWithoutUserContext() /// /// 审计承载断言:拒绝异常(镜像数字码 + 本地化文案 + errors JSON)可完整写入租户操作日志并查回往返 - /// (MonitorLogging 在 action 层自动落库;此处锁定 TenantLogOperationEntity 表对 322 段拒绝留痕的承载能力)。 + /// (MonitorLogging 在 action 层自动落库;此处锁定 LogOperationEntity 表对 322 段拒绝留痕的承载能力)。 /// [Fact] - public async Task RejectedScope_IsAuditableInTenantOperationLog() + public async Task RejectedScope_IsAuditableInOperationLog() { await SeedAsync(); - var factory = new OnlineScopeContextFactory(Repository()); + var factory = new OnlineScopeContextFactory(Repository()); // 本地化文案断言依赖请求语言,显式固定 zh-CN(与 ErrorCodeContractTests 的 BusinessException 行为测试同姿势)。 var originalCulture = CultureInfo.CurrentUICulture; @@ -99,7 +96,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 +106,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; } @@ -119,7 +116,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] @@ -127,12 +124,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)); @@ -147,13 +144,13 @@ private async Task SeedAsync() { var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); - await _db.Insertable(NewArea(Area1001, App100, now)).ExecuteCommandAsync(); - await _db.Insertable(NewArea(Area2001, App200, now)).ExecuteCommandAsync(); + await _db.Insertable(NewArea(Area1001, now)).ExecuteCommandAsync(); + await _db.Insertable(NewArea(Area2001, now)).ExecuteCommandAsync(); } - private static TenantGameAreaEntity NewArea(long id, long gameAppId, long now) + private static GameAreaEntity NewArea(long id, 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..87a95355 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,6 @@ namespace GameFrameX.Core.Tests.ServerManager.Online; // 作用域构造后区服被删的时序漂移拒绝。 public sealed class OnlineServerClientTests : IDisposable { - private const long TenantA = 1001; private const long App100 = 100; private const long Area1001 = 2001; @@ -53,7 +52,7 @@ public OnlineServerClientTests() _db = _scopeOwner.GetConnectionScope("online-client"); SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); _db.CodeFirst.InitTables( - typeof(TenantGameAreaEntity)); + typeof(GameAreaEntity)); } /// @@ -81,7 +80,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(); @@ -94,8 +93,7 @@ public async Task PostAsync_Respects_CustomOnlineAdminPrefix_FromArea() } /// - /// 作用域注入:POST 请求体顶层强制携带 ServerId,丢弃旧租户与应用字段;业务体自带的伪作用域字段被鉴权值覆盖 - ///(「以鉴权与服务端路由为准,客户端字段不可直接覆盖」vault 契约);业务字段原样保留。 + /// 作用域注入:POST 请求体顶层强制携带 ServerId,未知字段被白名单丢弃;业务体自带的伪作用域字段被鉴权值覆盖。 /// [Fact] public async Task PostAsync_MergesScopeIntoPayload_OverridingClientScopeFields() @@ -105,11 +103,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()); // c406-keep var body = handler.LastRequestBodyJson; - Assert.False(body.ContainsKey("TenantId")); - Assert.False(body.ContainsKey("AppId")); + 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()); Assert.Equal("key-1", body["IdempotencyKey"]?.ToString()); @@ -238,7 +240,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 +254,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 +278,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 +329,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..03f05882 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; @@ -15,7 +15,7 @@ namespace GameFrameX.Core.Tests.SqlSugar; /// GFX-919 / C388 回归测试:渠道定义管理查询不得显示软删行。 /// 根因:ChannelDefinitionManagementServiceBase.BuildPageQuery 用 .Filter(null, true) 绕过全部全局过滤器 /// (意图:管理列表显示禁用渠道 + 跨 scope 合并),连带禁用了 ISafeDeletedFilter,软删行穿透分页列表。 -/// 复刻生产租户库连接装配(ClientApiTestDb 三组过滤器),Sqlite 租户库做服务级 PageAsync/AvailableAsync 端到端验证; +/// 复刻生产主库连接装配(ClientApiTestDb 三组过滤器),Sqlite 单库做服务级 PageAsync/AvailableAsync 端到端验证; /// 修复契约(C67 FixPattern 同构):Filter(null, true) 后必须手动补 u.IsDeleted == false,且禁用行仍须可见(可重新启用)。 /// public sealed class ChannelDefinitionSoftDeleteVisibilityTests : IDisposable @@ -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.MainDb.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.MainDb.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 走主库 + // (生产过滤器 + 审计字段填充 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..e13e0f33 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;策略行作用域唯一; // 票据固定到期时间 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.MainDb.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.MainDb.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.MainDb.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..2b6b1caa 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,20 +54,18 @@ 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 app_scope"); + mainDatabase.Ado.ExecuteCommand("ALTER TABLE global_menu_entity DROP COLUMN allow_admin_when_super_admin_only"); // 二次初始化 = 生产升级重放: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 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.Equal((int)MenuAppScopeEnum.Console, (int)legacyRow.app_scope); + Assert.False((bool)legacyRow.allow_admin_when_super_admin_only); } } 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..f44b4019 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_、业务实体与 Log* -> 无前缀。 /// 阶段 A 预期 RED:阶段 B 完成实体重命名 + Attribute 补齐后转 GREEN。 /// [Fact] @@ -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(); @@ -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,8 @@ private static string ClassExpectedPrefix(DatabaseOwnership ownership) { DatabaseOwnership.System => "System", DatabaseOwnership.Global => "Global", - DatabaseOwnership.Tenant => "Tenant", + // D3/C406:业务表无物理前缀,类名不再要求 Business 前缀(如 UserEntity、LogOperationEntity)。 + DatabaseOwnership.Business => string.Empty, _ => 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..c2ebbedf 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,17 +27,17 @@ public GameAppPackageDisabledVisibilityTests() // 复刻生产全局过滤器:软删除 + 启用/禁用(ISafeEnabledFilter 即 BLA-28 根因)。 SqlSugarUnifiedConfig.ConfigureBaseFilters(_db); SqlSugarUnifiedConfig.ConfigureClientFilters(_db); - _db.CodeFirst.InitTables(typeof(TenantGameAppPackageEntity)); + _db.CodeFirst.InitTables(typeof(GameAppPackageEntity)); } [Fact] public async Task GlobalEnabledFilter_HidesDisabledPackage_ReproducesBla28() { - await SeedAsync(1, true, false, null); - await SeedAsync(2, false, false, null); + await SeedAsync(1, true, false); + await SeedAsync(2, false, false); // 旧 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); @@ -47,12 +47,12 @@ public async Task GlobalEnabledFilter_HidesDisabledPackage_ReproducesBla28() [Fact] public async Task FixPattern_FilterNullTrue_ExposesDisabledAndKeepsSoftDelete() { - await SeedAsync(1, true, false, null); - await SeedAsync(2, false, false, null); - await SeedAsync(3, true, true, null); + await SeedAsync(1, true, false); + await SeedAsync(2, false, false); + await SeedAsync(3, true, true); // 修复后 BuildPageQuery 行为:绕过全部过滤器,手动补 IsDeleted==false。 - var rows = await _db.Queryable() + var rows = await _db.Queryable() .Filter(null, true) .Where(u => u.IsDeleted == false) .ToListAsync(); @@ -65,13 +65,13 @@ public async Task FixPattern_FilterNullTrue_ExposesDisabledAndKeepsSoftDelete() [Fact] public async Task FixPattern_MainDatabase_ReturnsAllActivePackages() { - await SeedAsync(1, false, false, 1); - await SeedAsync(2, false, false, 2); - await SeedAsync(3, false, false, null); + await SeedAsync(1, false, false); + await SeedAsync(2, false, false); + await SeedAsync(3, false, false); - 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(); @@ -83,15 +83,15 @@ public async Task FixPattern_MainDatabase_ReturnsAllActivePackages() [Fact] public async Task FixPattern_SetStatusLookup_FindsDisabledPackageById() { - await SeedAsync(1, false, false, null); + await SeedAsync(1, false, false); // 旧 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) { - 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/GameRoleAdvertisementEntityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs new file mode 100644 index 00000000..ffe0d60b --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/GameRoleAdvertisementEntityTests.cs @@ -0,0 +1,41 @@ +using GameFrameX.Core.SqlSugar; +using GameFrameX.Entity.Business.Game; +using SqlSugar; + +namespace GameFrameX.Core.Tests.SqlSugar; + +/// 角色广告索引必须在无作用域列的真实表上成功创建。 +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 GameRoleAdvertisementEntityTests() + { + var config = new ConnectionConfig + { + DbType = DbType.Sqlite, + ConnectionString = $"DataSource={_dbPath}", + }; + SqlSugarUnifiedConfig.ConfigureBaseSettings(config); + _db = new SqlSugarScope(config); + } + + [Fact] + public void InitTables_AcceptsBusinessIndexesWithoutLegacyScopeColumns() + { + _db.CodeFirst.InitTables(typeof(GameRoleAdvertisementEntity)); + + var columns = _db.EntityMaintenance.GetEntityInfo().Columns; + Assert.DoesNotContain(columns, c => c.PropertyName is "AppId"); // c406-keep(负向断言:旧应用作用域字段不得回归) + } + + public void Dispose() + { + _db?.Dispose(); + if (File.Exists(_dbPath)) + { + File.Delete(_dbPath); + } + } +} 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..d1131e74 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() @@ -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) // c406-keep(负向断言:旧前缀禁止再现) + && !tableName.StartsWith("system_sys_", StringComparison.Ordinal); } } \ No newline at end of file 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..a170d725 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; @@ -114,28 +114,28 @@ public void InitDatabase_EnableIncreSeedTrue_RunsAuthoritativeSeedsOnly() } [Fact] - public void DefaultTenantSeeder_Upsert_InsertsMissingRowsOnly() + public void DefaultDatabaseSeeder_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 dbConfig = CreateConfig("2001"); + SqlSugarSetup.InitDatabase(scope, dbConfig, 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..f254fac0 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,18 +217,17 @@ 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)); 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}, {allowTenantColumn}, {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); @@ -271,14 +269,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 businessDb = scope.GetConnectionScope("1003"); - var sql = tenantDb.Queryable() + var sql = businessDb.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 79% 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..b1f14200 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogTenantPrefixTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/SqlSugarDiffLogPrefixTests.cs @@ -2,22 +2,22 @@ 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; namespace GameFrameX.Core.Tests.SqlSugar; /// -/// 2026-07-13 lesson 回归验证:InsertWithDiffLogAsync(DiffLog 路径)是否丢失租户表名前缀 tenant_。 +/// 2026-07-13 lesson 回归验证:InsertWithDiffLogAsync(DiffLog 路径)是否写错物理表名(lesson 原型为丢失 tenant_ 前缀,C406 后业务表物理名无前缀,检查目标改为 EntityNameService 推导的最终物理名)。 // c406-keep(lesson 历史引用) /// 复刻生产接线:SqlSugarUnifiedConfig.ConfigureBaseSettings(EntityNameService → SqlSugarEntityBoundary.GetPhysicalTableName) /// + RepositoryExtension.InsertWithDiffLogAsync(.AS() + EnableDiffLogEvent,与 BaseService.InnerAddAsync 同链路)。 -/// 同时手工建一张无前缀镜像表,模拟生产"旧表残留、写错表不报错"的场景:若 INSERT 落错表可精确定位。 +/// 同时手工建一张旧名镜像表,模拟生产"旧表残留、写错表不报错"的场景:若 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,25 +27,25 @@ public class SqlSugarDiffLogTenantPrefixTests : IDisposable private readonly ITestOutputHelper _output; private readonly List _dbFiles = new(); - public SqlSugarDiffLogTenantPrefixTests(ITestOutputHelper output) + public SqlSugarDiffLogPrefixTests(ITestOutputHelper output) { _output = output; } [Fact] - public async Task Insert_PlainAndDiffLog_BothWriteTenantPrefixTable_Sqlite() + public async Task Insert_PlainAndDiffLog_BothWritePhysicalTable_Sqlite() { var config = CreateSqliteConfig(); 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,24 +65,24 @@ 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 + // DiffLog after-data 查回 SQL(GetDiffTableBySql 的 Context.Queryable())也必须走物理表: + // 捕获窗口内不允许出现任何指向其它表名的 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 同样带前缀 + // DiffLog 事件中的 SQL 同样指向物理表 Assert.NotEmpty(observers.DiffLogSqls); 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)"); + // 落表位置:物理表 2 行,旧名镜像表 0 行 + 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); @@ -90,7 +90,7 @@ public async Task Insert_PlainAndDiffLog_BothWriteTenantPrefixTable_Sqlite() } [Fact] - public async Task Update_EnableDiffLogEvent_UsesTenantPrefixTable_Sqlite() + public async Task Update_EnableDiffLogEvent_UsesPhysicalTable_Sqlite() { // BaseService.InnerUpdateAsync 的 DiffLog 链路没有 .AS() 显式表名(RepositoryExtension.UpdateWithDiffLogAsync 亦然), // 表名纯依赖 EntityNameService——这条链路是 lesson 机制的残余暴露面,单独验证。 @@ -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()); @@ -140,7 +140,7 @@ await db.Updateable(entity) } [SkippableFact] - public async Task Insert_InsertWithDiffLogAsync_WritesTenantPrefixTable_Postgres() + public async Task Insert_InsertWithDiffLogAsync_WritesPhysicalTable_Postgres() { Skip.IfNot(PostgresTestDatabase.TryCreate(out var postgres, out var unavailableReason), unavailableReason); using (postgres) @@ -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..8d66150f 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; @@ -20,55 +20,53 @@ public void PlatformEntity_IsPlatformDatabase() } [Fact] - public void TenantGameEntity_IsTenantDatabase() + public void GameEntity_IsBusinessTable() { - 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() + public void GameAppDeviceEntity_IsBusinessTable() { - 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))); } [Fact] - public void TenantUser_IsTenantDatabase() + public void User_IsBusinessTable() { - 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.Equal("user_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(UserEntity), nameof(UserEntity))); } [Fact] - public void TenantGameEntity_IsInitializedInMainDatabase() + public void GameEntity_IsInitializedInMainDatabase() { - Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(TenantGameGoodsEntity))); + Assert.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(GameGoodsEntity))); } [Fact] - public void TenantGameGoodsEntityFamily_UsesTenantGameAppPrefixAndEntitySuffix() + public void GameGoodsEntityFamily_UsesGameAppPrefixAndEntitySuffix() { 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 +77,15 @@ 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))); } [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 +93,16 @@ 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.Equal("system_log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(SystemLogOperationEntity), nameof(SystemLogOperationEntity))); } [Fact] - public void TenantLogEntity_IsTenantDatabase() + public void LogEntity_IsBusinessTable() { - 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.Equal("log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(LogOperationEntity), nameof(LogOperationEntity))); } [Fact] @@ -115,7 +110,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 +119,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 +128,12 @@ 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.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.Equal("global_dictionary_data_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(GlobalDictionaryDataEntity), nameof(GlobalDictionaryDataEntity))); } @@ -157,29 +150,28 @@ public void ConfigEntities_AreSplitByVisibility() } [Fact] - public void EmailConfigEntities_AreSplitBetweenSystemAndTenantDatabases() + public void EmailConfigEntities_AreSplitBetweenSystemAndBusinessDatabases() { 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.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..89b9cf27 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,10 +34,10 @@ public SqlSugarRepositoryDiResolutionTests() /// /// DI 解析平台表仓储:无租户上下文(superadmin 语义)下不抛异常,Context 路由主库且查询可用。 - /// 对应 AddTenantAsync 中 adminAccount 查重的修复路径。 + /// 对应 AddAsync 中 adminAccount 查重的修复路径。 /// [Fact] - public void DiResolution_PlatformTableRepository_RoutesMainDatabase_WithoutTenantContext() + public void DiResolution_PlatformTableRepository_RoutesMainDatabaseWithoutLegacyContext() { var services = BuildServices(); 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/SqlSugar/TenantGameRoleAdvertisementEntityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/TenantGameRoleAdvertisementEntityTests.cs deleted file mode 100644 index f66746b3..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/SqlSugar/TenantGameRoleAdvertisementEntityTests.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Reflection; -using GameFrameX.Core.SqlSugar; -using GameFrameX.Entity.Tenant.Game; -using SqlSugar; - -namespace GameFrameX.Core.Tests.SqlSugar; - -/// 角色广告索引必须在无作用域列的真实表上成功创建。 -public sealed class TenantGameRoleAdvertisementEntityTests : IDisposable -{ - private readonly string _dbPath = Path.Combine(Path.GetTempPath(), $"role_ad_index_{Guid.NewGuid():N}.db"); - private readonly SqlSugarScope _db; - - public TenantGameRoleAdvertisementEntityTests() - { - var config = new ConnectionConfig - { - DbType = DbType.Sqlite, - ConnectionString = $"DataSource={_dbPath}", - }; - SqlSugarUnifiedConfig.ConfigureBaseSettings(config); - _db = new SqlSugarScope(config); - } - - [Fact] - public void TenantGameRoleAdvertisement_HasNoTenantScope() - { - var tenantId = typeof(TenantGameRoleAdvertisementEntity).GetProperty( - "TenantId", - BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy); - - Assert.Null(tenantId); - } - - [Fact] - public void InitTables_AcceptsBusinessIndexesWithoutTenantScope() - { - _db.CodeFirst.InitTables(typeof(TenantGameRoleAdvertisementEntity)); - - var columns = _db.EntityMaintenance.GetEntityInfo().Columns; - Assert.DoesNotContain(columns, c => c.PropertyName is "TenantId" or "AppId"); - } - - public void Dispose() - { - _db?.Dispose(); - if (File.Exists(_dbPath)) - { - File.Delete(_dbPath); - } - } -} 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..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", }, - ["tenantId"] = 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); } [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..75c7994b 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,14 @@ namespace GameFrameX.Core.Tests.System; /// -/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 主库(superadmin seed)+ 租户库(tenant_user seed)+ +/// SystemAuthService 端到端测试宿主(C217):真实 SqlSugar 单主库(superadmin seed)+ /// 手写 fake(3 接口)+ CurrentUserContext 真实 + SystemConfigService 真实(FakeCache)+ ICaptcha/IServiceProvider null!(captcha IsEnabled=false 路径不调用)。 -/// C218 扩展:主库 + 租户库双连接 scope(configId=main/1001),FakeTenantDbConnectionProvider 返回租户 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; - - /// - /// 租户库 seed 用的租户 ID(与 对应)。 - /// - public const long SeedTenantId = 1001L; + private const long UserId = 2001L; private readonly SqlSugarScope _client; private readonly List _dbPaths = new(); @@ -41,18 +34,12 @@ public AuthTestHost() { SqlSugarCache.Configure(new FakeCache()); var mainConfig = CreateConfig(MainConfigId); - var tenantConfig = CreateConfig(TenantConfigId); - _client = new SqlSugarScope(new List { mainConfig, tenantConfig, }); + _client = new SqlSugarScope(new List { mainConfig, }); SqlSugarSetup.InitDatabase(_client, mainConfig, new[] { typeof(SystemUserEntity), typeof(SystemConfigEntity), - typeof(TenantUserEntity), - }); - _client.GetConnectionScope(MainConfigId).CodeFirst.InitTables(); - SqlSugarSetup.InitDatabase(_client, tenantConfig, new[] - { - typeof(TenantUserEntity), + typeof(UserEntity), }); } @@ -70,7 +57,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!; @@ -120,19 +107,6 @@ public async Task SeedSuperAdminAsync(string account, string password, bool? isE return await mainDb.Queryable().FirstAsync(u => u.AccountType == AccountTypeEnum.SuperAdmin); } - - /// - /// 在租户库 seed 一条 (AccountType=NormalUser,IsEnabled=true,以通过冻结检查进入租户禁用分支)。 - /// - public async Task SeedTenantUserAsync(long tenantId, string account, string password) - { - var user = BuildUser(TenantUserId, account, password, AccountTypeEnum.NormalUser); - user.IsEnabled = true; - - var tenantDb = _client.GetConnectionScope(MainConfigId); - await tenantDb.Insertable(user).ExecuteCommandAsync(); - } - public void Dispose() { foreach (var dbPath in _dbPaths) @@ -145,7 +119,7 @@ public void Dispose() } /// - /// 填充 共享字段(system_user / tenant_user 通用),调用方再按需覆盖 Id/TenantId/IsEnabled/AccountType。 + /// 填充 共享字段(system_user / user 通用),调用方再按需覆盖 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/FakeDbConnectionProvider.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs new file mode 100644 index 00000000..9d3c8d22 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/FakeDbConnectionProvider.cs @@ -0,0 +1,18 @@ +using GameFrameX.Core.Service.Business; +using SqlSugar; + +namespace GameFrameX.Core.Tests.System; + +internal sealed class FakeDbConnectionProvider +{ + private readonly SqlSugarScope _client; + private readonly string _configId; + + public FakeDbConnectionProvider(SqlSugarScope client, string configId) + { + _client = client; + _configId = configId; + } + + public ISqlSugarClient Database => _client.GetConnectionScope(_configId); +} \ No newline at end of file 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..e666a9f7 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/GameHomeServiceTests.cs @@ -1,37 +1,36 @@ 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; // C175:GetOnlineAsync 从全局 GameServerOptions.HttpRootUrl 改为按启用区服的 Control 能力前缀聚合。 -// C321:getOnline/overview/onlineTrend 经租户库连接路由查询;平台面(无租户上下文)抛 BusinessException 明确语义。 +// C321:getOnline/overview/onlineTrend 直接经主库连接查询;平台面(无区服上下文)抛 BusinessException 明确语义。 // 用 Sqlite 双库 SqlSugarScope 种子数据,伪造 HttpMessageHandler 验证聚合、降级、计数与趋势桶行为。 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; - private readonly FakeTenantDbConnectionProvider _tenantDbProvider; + private readonly FakeDbConnectionProvider _dbProvider; public GameHomeServiceTests() { SqlSugarCache.Configure(new FakeCache()); // AuthTestHost 判例:连接配置必须经 SqlSugarSetup.SetDbConfig 装配 ConfigureExternalServices - // (实体列名/类型服务,[TenantTable] 实体前缀 mutate 也在此链路),否则 ORM 写读列映射不一致 - // (实测种子 ControlApiPrefix 落 NULL、读回空导致 Build 抛降级)。建表与种子统一走租户库 scope。 + // (实体列名/类型服务,[BusinessTable] 实体前缀 mutate 也在此链路),否则 ORM 写读列映射不一致 + // (实测种子 ControlApiPrefix 落 NULL、读回空导致 Build 抛降级)。建表与种子统一走主库 scope。 var config = new DbConnectionConfig { - ConfigId = TenantConfigId, + ConfigId = ConfigId, DbType = DbType.Sqlite, ConnectionString = $"DataSource={_dbPath}", IsAutoCloseConnection = true, @@ -41,18 +40,18 @@ 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 mainScope = _db.GetConnectionScope(ConfigId); + mainScope.CodeFirst.InitTables(); + mainScope.CodeFirst.InitTables(); + mainScope.CodeFirst.InitTables(); + mainScope.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); } @@ -122,9 +121,9 @@ public async Task GetOnline_DegradesToZeroWhenGameServerUnreachable() } [Fact] - public async Task GetOnline_UsesMainDatabaseWithoutTenantContext() + public async Task GetOnline_QueriesMainDatabaseDirectly() { - // C321:平台面(SuperAdmin 无目标租户)不落到主库查租户表触发 42P01 裸 500,而是抛明确业务错误 + // C321:平台面(无区服上下文)不裸查业务表触发 42P01 裸 500,而是抛明确业务错误 var service = CreateService(); var result = await service.GetOnlineAsync(); @@ -169,7 +168,7 @@ public async Task Overview_CountsOrdersPlayersAndAreasByStatus() } [Fact] - public async Task Overview_UsesMainDatabaseWithoutTenantContext() + public async Task Overview_QueriesMainDatabaseDirectly() { var service = CreateService(); @@ -207,7 +206,7 @@ public async Task OnlineTrend_FillsHourBucketsWithLastSampleAndNullForGaps() } [Fact] - public async Task OnlineTrend_UsesMainDatabaseWithoutTenantContext() + public async Task OnlineTrend_QueriesMainDatabaseDirectly() { var service = CreateService(); @@ -218,7 +217,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 +257,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 +298,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 +336,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..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", @@ -51,7 +50,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 +60,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..183881cd 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 @@ -9,7 +9,7 @@ namespace GameFrameX.Core.Tests.System.Job; /// /// C404 裁定 §9.4:LogJob 不再删除 SystemLogVisit / SystemLogOperation(移交审计留存归档), -/// 仍清理 SystemLogDiff 与租户历史日志表。行为级断言,防止有人回退修剪。 +/// 仍清理 SystemLogDiff 与管理员历史日志表。行为级断言,防止有人回退修剪。 /// public sealed class LogJobRetentionBoundaryTests : IDisposable { @@ -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() @@ -27,7 +27,7 @@ public void Dispose() } [Fact] - public async Task LogJob_KeepsSystemVisitAndOperation_DeletesDiffAndTenantHistory() + public async Task LogJob_KeepsSystemVisitAndOperation_DeletesDiffAndBusinessHistory() { var cutoff = DateTimeOffset.UtcNow.ToUnixTimeSeconds() - 40 * 24 * 60 * 60; foreach (var entity in new object[] @@ -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); @@ -61,11 +61,11 @@ public async Task LogJob_KeepsSystemVisitAndOperation_DeletesDiffAndTenantHistor // §9.4:两张 System 表保留(审计留存负责归档)。 Assert.Equal(1, _database.MainDb.Queryable().Count()); 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..66c3c47c 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"", ""serverId"": 1300000000001 } } ], ""returnInformation"": { @@ -106,7 +106,7 @@ public void StatusField_HttpStatusCode_SerializesAsStringNumber() public void SerializedReturnInformation_RoundTripsThroughSuccessDetection() { // 落盘得到的 returnInformation JSON 喂回 IsSuccessfulUnifiedReturn 必须仍判为成功, - // 登录租户回填依赖这条链路(lesson 2026-07-11:损坏的 [] 会让回填全 miss)。 + // 登录范围回填依赖这条链路(lesson 2026-07-11:损坏的 [] 会让回填全 miss)。 var monitor = ParseMonitor(); var returnResult = monitor["returnInformation"]?.ToJsonString(); 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 60% 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..a9c4739b 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogTenantQueryIsolationTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/LogQueryIsolationTests.cs @@ -7,49 +7,47 @@ namespace GameFrameX.Core.Tests.System; /// /// C156 日志边界隔离测试。日志不再集中到独立日志库,平台日志(SystemLog*)归属主库 system_log_*, -/// 租户日志(TenantLog*)归属当前租户库 tenant_log_*。隔离由实体归属 + 物理库边界共同保证: -/// 平台与租户日志为不同 CLR 类型,分别路由到不同数据库(路由/catalog 验收见 SqlSugarDatabaseInitializationTests)。 +/// 管理员日志(Log*)归属主库 log_*。隔离由实体归属 + 物理表前缀边界共同保证: +/// 平台与管理员日志为不同 CLR 类型,分别落到不同物理表(路由/catalog 验收见 SqlSugarDatabaseInitializationTests)。 /// -public class LogTenantQueryIsolationTests +public class LogQueryIsolationTests { [Fact] public void SystemLogEntities_ArePlatformMainDatabase() { - // 平台日志归属主库 system_log_*,SuperAdmin 平台查询只读主库,不触碰任何租户库。 + // 平台日志归属主库 system_log_*,SuperAdmin 平台查询只读平台日志表。 Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemLogVisitEntity))); Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemLogOperationEntity))); Assert.True(SqlSugarEntityBoundary.IsPlatformTable(typeof(SystemLogExceptionEntity))); 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.Equal("system_log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(SystemLogOperationEntity), nameof(SystemLogOperationEntity))); } [Fact] - public void TenantLogEntities_UseMainDatabase() + public void BusinessLogEntities_BelongToMainDatabase() { // 历史日志表保留名称,读写统一归主库。 - 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.True(SqlSugarEntityBoundary.IsMainDatabaseTable(typeof(LogOperationEntity))); + Assert.Equal("log_operation_entity", SqlSugarEntityBoundary.GetPhysicalTableName(typeof(LogOperationEntity), nameof(LogOperationEntity))); } [Fact] - public void PlatformAndTenantLogs_UseDistinctClrTypes() + public void PlatformAndBusinessLogs_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)); + // C156 禁止同一 CLR 实体按运行上下文切物理表:平台与管理员日志必须是不同实体类型。 + 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 +85,8 @@ public void TryReadLoginScope_LoginParameters_ReturnsAccount() value = new { account = "admin", - tenantId = 1300000000001, - tenantHost = (string?)null, + serverId = 1300000000001, + channel = (string?)null, }, }, }); 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.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..528d7645 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[] { "adCallbackConfigEntity:page", "route:adCallbackConfigEntity", }, 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/MenuSeedSuperAdminVisibilityTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedSuperAdminVisibilityTests.cs index 24cdfb32..a5722b92 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedSuperAdminVisibilityTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/MenuSeedSuperAdminVisibilityTests.cs @@ -15,7 +15,7 @@ public MenuSeedSuperAdminVisibilityTests(ITestOutputHelper output) } [Fact] - public void ProtectedSubtrees_IncludeDirectoryAncestorsWithoutTenantLeaves() + public void ProtectedSubtrees_IncludeDirectoryAncestorsWithoutBusinessLeaves() { MenuSeedCatalogTestData.LoadSampleMenus(); var definitions = MenuSeedCatalog.AllDefinitions.ToDictionary(definition => definition.Key); 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..6ff0b8fa 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/OnlineUserHubBoundaryTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/OnlineUserHubBoundaryTests.cs @@ -6,14 +6,14 @@ namespace GameFrameX.Core.Tests.System; public class OnlineUserHubBoundaryTests { [Fact] - public void Constructor_DoesNotResolveTenantOnlineUserRepository() + public void Constructor_DoesNotResolveOnlineUserRepository() { var constructorParameterTypes = typeof(OnlineUserHub) .GetConstructors() .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/PlatformJwtIssuedClaimSetTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/PlatformJwtIssuedClaimSetTests.cs new file mode 100644 index 00000000..2882bc00 --- /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。 // c406-keep(有意引用旧 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); + } + } +} 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/SystemAuthServiceLoginTests.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/SystemAuthServiceLoginTests.cs index ae542924..3634a9fe 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/SystemAuthServiceLoginTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/System/SystemAuthServiceLoginTests.cs @@ -9,7 +9,7 @@ namespace GameFrameX.Core.Tests.System; /// /// SystemAuthService 登录端到端集成测试。 /// C217 part 2a 覆盖核心场景 ①②③(不存在/错误/响应一致——C216 枚举防护端到端)。 -/// C218 补充 4 场景:③正确密码成功(CreateTokenAsync + Claim)/ ④账号冻结 D1017 / ⑤租户禁用 Z1003 / ⑥连续失败锁定。 +/// C218 补充 4 场景:③正确密码成功(CreateTokenAsync + Claim)/ ④账号冻结 D1017 / ⑤普通账号登录 / ⑥连续失败锁定。 /// public class SystemAuthServiceLoginTests { 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/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.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..ec92e168 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,18 @@ public void Configure_WritesIdentifierLongsAsStringsAndReadsThemBack() var json = JsonSerializer.Serialize(new IdentifierJsonContract { Id = 4664278385747429000, - TenantId = 1300000000001, CreatedTime = 1784073600, }, options); Assert.Contains("\"Id\":\"4664278385747429000\"", json); - Assert.Contains("\"TenantId\":\"1300000000001\"", json); Assert.Contains("\"CreatedTime\":1784073600", json); var value = JsonSerializer.Deserialize( - "{\"Id\":\"4664278385747429000\",\"TenantId\":\"1300000000001\",\"CreatedTime\":1784073600}", + "{\"Id\":\"4664278385747429000\",\"CreatedTime\":1784073600}", options); Assert.NotNull(value); Assert.Equal(4664278385747429000, value.Id); - Assert.Equal(1300000000001, value.TenantId); Assert.Equal(1784073600, value.CreatedTime); } @@ -80,8 +77,6 @@ private sealed class IdentifierJsonContract { public long Id { get; init; } - public long? TenantId { get; init; } - public long CreatedTime { get; init; } } } \ No newline at end of file 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..9cae2fc4 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/ProjectJsonSerializerOptionsHostContractTests.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core.Tests/Utility/ProjectJsonSerializerOptionsHostContractTests.cs @@ -12,8 +12,6 @@ private sealed class HostJsonContract { public long Id { get; set; } - public long? TenantId { get; set; } - public long CreatedTime { get; set; } public string Name { get; set; } @@ -28,23 +26,21 @@ public void ApplyLongIdentifierStringContract_WritesIdentifierLongsAsStringsAndR var json = JsonSerializer.Serialize(new HostJsonContract { Id = 4664278385747429000, - TenantId = 1300000000001, CreatedTime = 1784073600, Name = "hub", }, options); Assert.Contains("\"Id\":\"4664278385747429000\"", json); - Assert.Contains("\"TenantId\":\"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\",\"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,\"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/Authorization/AuthenticatedOnlyAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Authorization/AuthenticatedOnlyAttribute.cs index e3246485..d32e4822 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Authorization/AuthenticatedOnlyAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Authorization/AuthenticatedOnlyAttribute.cs @@ -6,9 +6,9 @@ namespace GameFrameX.Core.Authorization; /// 仅登录档 [AuthenticatedOnly]。 /// 方法删除或改名时登记随之自动消失/更新,不再依赖集中手写路由清单(GFX-684 / C277, /// 取代 ApiEndpointCatalogSync.AuthenticatedOnlyRouteNames 手写数组 + global_authenticated_only_route 中转表)。 -/// 成员必须是「登录即可访问」的登录态基础数据端点:不按角色授权、不暴露越租户数据; +/// 成员必须是「登录即可访问」的登录态基础数据端点:不按角色授权、不暴露越权数据; /// 标注后 ApiEndpointCatalogSync 会把活端点登记为 IsAuthenticatedOnly=true, -/// 避免被自动隐藏按钮挡成 403(自动按钮默认不授权任何租户角色)。 +/// 避免被自动隐藏按钮挡成 403(自动按钮默认不授权任何角色)。 /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] public sealed class AuthenticatedOnlyAttribute : Attribute, IFilterMetadata diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/InitialAdminBootstrap.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/InitialAdminBootstrap.cs new file mode 100644 index 00000000..9b261735 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/InitialAdminBootstrap.cs @@ -0,0 +1,176 @@ +using GameFrameX.Core.Const; +using GameFrameX.Core.Const.MenuSeed; +using GameFrameX.Core.SqlSugar; +using GameFrameX.Core.Extension.Const; +using GameFrameX.Core.Service.User; +using GameFrameX.Core.Utility; +using SqlSugar; +using GameFrameX.Entity.Enum; +using GameFrameX.Foundation.Utility.DistributedSystem.Snowflake; + +namespace GameFrameX.Core.Bootstrap; + +/// +/// 新装首个业务管理员种子引导(C406 / F3)。 +/// Web.Api 初始化(旧库守卫 + 建表 + 种子)之后执行: +/// ① 角色不存在时创建,并按 同口径 +/// (超管专属子树不授予、AllowAdminWhenSuperAdminOnly 可读选择器照常授予)授予全部非超管种子菜单; +/// ② 与 +/// 成对设置且库中尚无任何业务管理员()时创建该账号(Argon2id)并绑定管理员角色。 +/// 幂等口径:账号已存在不重建、不覆盖密码;角色菜单授权每次启动补齐全部缺失的种子菜单授权—— +/// 运营在管理端删掉 sys_admin 的某条种子菜单授权后,下次重启会被补回(模板角色的手工授权不持久, +/// 与 C353 口径一致)。需要收窄权限时新建自定义角色,不要直接修改 sys_admin; +/// 这与 global_menu 种子的 upsert 语义同向:菜单行与模板角色授权都由启动期种子保证。 +/// 口令永不落入日志;密码不满足平台密码强度策略时 fail-closed 终止启动(错误信息不含密码)。 +/// +public static class InitialAdminBootstrap +{ + /// + /// 首个业务管理员账号注入环境变量名(与密码变量成对设置才生效)。 + /// + public const string InitialAccountEnvironmentVariable = "GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT"; + + /// + /// 首个业务管理员初始密码注入环境变量名(与账号变量成对设置才生效)。 + /// + public const string InitialPasswordEnvironmentVariable = "GAMEFRAMEX_ADMIN_INITIAL_PASSWORD"; + + /// + /// 执行引导。须在主库建表与种子初始化完成之后(依赖 MenuSeedCatalog 已 LoadFromDb)调用。 + /// + /// SqlSugar 客户端(取主库连接)。 + public static async Task RunAsync(ISqlSugarClient sqlSugarClient) + { + var db = sqlSugarClient.AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId); + + var roleId = await EnsureSysAdminRoleAsync(db); + await GrantAdminMenusAsync(db, roleId); + await EnsureInitialAccountAsync(db, roleId); + } + + /// + /// 确保 角色存在,返回角色 Id。 + /// + private static async Task EnsureSysAdminRoleAsync(ISqlSugarClient db) + { + var role = await db.Queryable().Where(u => u.Code == CommonConst.SysAdminRole).FirstAsync(); + if (role != null) + { + return role.Id; + } + + role = new RoleEntity + { + Id = SnowFlakeIdHelper.Instance.NextId(), + Name = "系统管理员", + Code = CommonConst.SysAdminRole, + OrderNo = 1, + Remark = "新装引导创建的内置管理员角色,授权全部非超管菜单", + IsEnabled = true, + }; + await db.Insertable(role).ExecuteCommandAsync(); + var roleId = role.Id; + + Console.WriteLine($"[InitialAdmin] 已创建管理员角色 {CommonConst.SysAdminRole} 并授权全部非超管种子菜单。"); + return roleId; + } + + /// + /// 补齐管理员角色缺失的非超管种子菜单授权(与 RoleMenuService.ExcludeSuperAdminOnlyMenusAsync 同口径); + /// 已删除的种子授权会在下次启动补回(模板角色手工授权不持久)。 + /// + private static async Task GrantAdminMenusAsync(ISqlSugarClient db, long roleId) + { + var reservedMenuIds = MenuSeedCatalog.SuperAdminOnlySubtreeMenuIds; + var readableMenuIds = MenuSeedCatalog.AdminReadableSuperAdminOnlyMenuIds; + var grantableMenuIds = MenuSeedCatalog.AllDefinitions + .Select(u => StableSeedId.Menu(u.Key)) + .Where(id => !reservedMenuIds.Contains(id) || readableMenuIds.Contains(id)) + .ToHashSet(); + + var grantedMenuIds = (await db.Queryable().Where(u => u.RoleId == roleId).Select(u => u.MenuId).ToListAsync()).ToHashSet(); + var missingMenuIds = grantableMenuIds.Where(id => !grantedMenuIds.Contains(id)).ToArray(); + if (missingMenuIds.Length == 0) + { + return; + } + + await db.Insertable(missingMenuIds.Select(menuId => new RoleMenuEntity + { + Id = SnowFlakeIdHelper.Instance.NextId(), + RoleId = roleId, + MenuId = menuId, + IsEnabled = true, + }).ToList()).ExecuteCommandAsync(); + + Console.WriteLine($"[InitialAdmin] 管理员角色 {CommonConst.SysAdminRole} 补授 {missingMenuIds.Length} 个种子菜单(缺失授权补齐,手工删除的授权会在重启后恢复)。"); + } + + /// + /// 按环境变量引导首个业务管理员账号;密码强度 fail-closed;全部日志不含口令。 + /// + private static async Task EnsureInitialAccountAsync(ISqlSugarClient db, long roleId) + { + var account = Environment.GetEnvironmentVariable(InitialAccountEnvironmentVariable); + var password = Environment.GetEnvironmentVariable(InitialPasswordEnvironmentVariable); + var accountConfigured = !string.IsNullOrWhiteSpace(account); + var passwordConfigured = !string.IsNullOrWhiteSpace(password); + + // 含软删行一并计数:账号唯一性以物理行为准,软删残留同样阻止重建,避免重启复活同名账号。 + var existingAdminCount = await db.Queryable().Filter(null, true).CountAsync(); + + if (!accountConfigured && !passwordConfigured) + { + if (existingAdminCount == 0) + { + Console.WriteLine($"[Warning] 尚未初始化业务管理员:设置环境变量 {InitialAccountEnvironmentVariable} 与 {InitialPasswordEnvironmentVariable} 后重启即可引导创建首个业务管理员。"); + } + + return; + } + + if (!accountConfigured || !passwordConfigured) + { + Console.WriteLine($"[Warning] 环境变量 {InitialAccountEnvironmentVariable} 与 {InitialPasswordEnvironmentVariable} 必须成对设置,本次不引导创建业务管理员。"); + return; + } + + if (existingAdminCount > 0) + { + Console.WriteLine($"[Warning] 库中已存在业务管理员({existingAdminCount} 个),环境变量 {InitialAccountEnvironmentVariable} / {InitialPasswordEnvironmentVariable} 被忽略:不重建账号、不覆盖密码。"); + return; + } + + if (CryptogramUtility.StrongPassword && !System.Text.RegularExpressions.Regex.IsMatch(password!, CryptogramUtility.PasswordStrengthValidation)) + { + // fail-closed:拒绝带着弱口令启动;错误信息只带变量名与策略提示,不带密码。 + throw new InvalidOperationException( + $"环境变量 {InitialPasswordEnvironmentVariable} 的初始密码不满足平台密码强度策略:{CryptogramUtility.PasswordStrengthValidationMsg}。请调整密码后重启。"); + } + + var user = new UserEntity + { + Id = SnowFlakeIdHelper.Instance.NextId(), + Account = account!.Trim(), + Password = CryptogramUtility.HashPassword(password!), + NickName = "初始业务管理员", + RealName = "初始业务管理员", + Avatar = string.Empty, + AccountType = AccountTypeEnum.SystemAdmin, + Remark = "新装环境变量引导创建的首个业务管理员", + IsEnabled = true, + }; + UserService.NormalizeNewUser(user); + await db.Insertable(user).ExecuteCommandAsync(); + var userId = user.Id; + await db.Insertable(new UserRoleEntity + { + Id = SnowFlakeIdHelper.Instance.NextId(), + UserId = userId, + RoleId = roleId, + IsEnabled = true, + }).ExecuteCommandAsync(); + + Console.WriteLine($"[InitialAdmin] 已按环境变量引导创建首个业务管理员账号 {user.Account} 并绑定角色 {CommonConst.SysAdminRole},请立即登录并按需修改密码。"); + } +} 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..4e96b2fd --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Bootstrap/LegacySchemaStartupGuard.cs @@ -0,0 +1,70 @@ +using GameFrameX.Core.Option; + +namespace GameFrameX.Core.Bootstrap; + +/// +/// 旧库拒绝启动守卫(C406 / D7):Web.Api 初始化数据库(建表、种子)之前的 fail-closed 检查。 +/// 2.0 为破坏性断代版本,不迁移旧数据:检测到旧 schema 标志(任一 tenant_ 前缀表,或旧租户登记表 +/// system_tenant_entity)即抛 终止启动——不建表、不写种子、不写数据, // c406-keep +/// 只能用新库或整体回滚。 +/// +public static class LegacySchemaStartupGuard +{ + /// +/// 旧租户登记表物理名(1.x SystemTenantEntity,[PlatformTable] 派生;租户登记机制已删除,新代码永不创建)。 // c406-keep + /// + // c406-keep:旧 schema 标志字面量,有意引用旧表名(R1-d / R3-b),改名脚本不得改写 + private const string LegacyRegistryTable = "system_tenant_entity"; // c406-keep + + /// + /// 旧租户业务表物理名前缀。 + /// + // c406-keep:旧 schema 标志字面量,有意引用旧表名(R1-d / R3-b),改名脚本不得改写 + private const string LegacyTablePrefix = "tenant_"; // c406-keep + + /// + /// 检查目标库不是旧 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(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 c60a412c..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:"; @@ -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"; - /// /// 常量下拉框 /// diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/GameDimensionConst.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/GameDimensionConst.cs index eafdccef..2c0ff455 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/GameDimensionConst.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/GameDimensionConst.cs @@ -3,7 +3,7 @@ namespace GameFrameX.Core.Const; /// /// 游戏客户端维度回退默认值常量(三 host 共享)。 /// 客户端请求携带的维度参数(渠道 / 包名 / 平台 / 语言 / 子渠道 / 程序版本)缺省时按这些默认值 -/// 匹配租户库中的“默认配置”行;原 Client.Api / Hub.Api 各自的 ConstValue 副本已收敛至此。 +/// 匹配主库中的“默认配置”行;原 Client.Api / Hub.Api 各自的 ConstValue 副本已收敛至此。 /// public static class GameDimensionConst { 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..19876136 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Const/MenuSeed/MenuSeedCatalog.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Core.Const.MenuSeed; /// -/// 菜单、按钮和租户默认授权的 DB 缓存入口。 +/// 菜单、按钮和管理员默认授权的 DB 缓存入口。 /// public static class MenuSeedCatalog { @@ -58,14 +58,14 @@ public static IReadOnlyList SuperAdminOnlyRootMenuIds } /// - /// 获取 SuperAdmin-only 树下允许租户调用的只读辅助按钮 ID。 + /// 获取 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(); } @@ -73,7 +73,7 @@ public static IReadOnlySet TenantReadableSuperAdminOnlyMenuIds /// /// 获取 SuperAdmin 可见菜单 ID。 - /// 规则: SuperAdminOnly 菜单(含整棵子树)及其目录祖先 + 公共总览与运营首页(dashboard/home)。只补目录祖先,不引入祖先下的租户业务菜单。 + /// 规则: SuperAdminOnly 菜单(含整棵子树)及其目录祖先 + 公共总览与运营首页(dashboard/home)。只补目录祖先,不引入祖先下的业务菜单。 /// public static IReadOnlyList SuperAdminVisibleMenuIds { @@ -109,7 +109,7 @@ public static IReadOnlyList SuperAdminVisibleMenuIds /// /// 获取 SuperAdmin-only 整棵子树的菜单 ID(根 + 所有后代)。 - /// 供租户登录菜单树过滤:任何落入超管专属子树的菜单(含历史残留授权,如某菜单由租户可见改为超管专属后旧租户仍残留 role-menu 授权)都不应出现在租户导航中。 + /// 供管理员登录菜单树过滤:任何落入超管专属子树的菜单(含历史残留授权,如某菜单由管理员可见改为超管专属后仍残留 role-menu 授权)都不应出现在管理员导航中。 /// public static IReadOnlySet SuperAdminOnlySubtreeMenuIds { @@ -178,8 +178,7 @@ public static void LoadFromDb(ISqlSugarClient db) dbMenu.CreatedTime, dbMenu.UpdateTime ?? dbMenu.CreatedTime, dbMenu.SuperAdminOnly, - dbMenu.AllowTenantWhenSuperAdminOnly, - 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 d5922723..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 AllowTenantWhenSuperAdminOnly, - 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/Enum/Errors/AdvertisementCallbackConfigErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/AdvertisementCallbackConfigErrorCode.cs new file mode 100644 index 00000000..5935e575 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/AdvertisementCallbackConfigErrorCode.cs @@ -0,0 +1,25 @@ +namespace GameFrameX.Core.Enum.Errors; + +/// +/// Admin 广告回调配置错误码(段 318)。 +/// +public enum AdvertisementCallbackConfigErrorCode +{ + /// + /// 同一分包下的广告平台配置已存在。 + /// + [ErrorText("同一分包下的广告平台回调配置已存在", "An advertisement callback configuration already exists for this package and provider")] + PackageProviderAlreadyExists = 31800001, + + /// + /// 分包 Id 必填且必须为正数。 + /// + [ErrorText("分包 Id 必须为正数", "Package id must be a positive number")] + PackageIdRequired = 31800002, + + /// + /// 指定的游戏应用分包不存在或未启用。 + /// + [ErrorText("分包不存在或未启用", "Package does not exist or is not enabled")] + PackageNotFound = 31800003, +} 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..875d0b50 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/ErrorSegmentRegistry.cs @@ -21,10 +21,10 @@ 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(307, ErrorDomain.AdminBusiness, "Organization", nameof(OrganizationErrorCode), 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", nameof(PositionErrorCode), false, "Admin 职位"), + new(309, ErrorDomain.AdminBusiness, "Position", null, false, "Admin 职位(已退役,号段永久保留,禁止复用)"), new(310, ErrorDomain.AdminBusiness, "File", nameof(FileErrorCode), false, "Admin 文件"), new(311, ErrorDomain.AdminBusiness, "Job", nameof(JobErrorCode), false, "Admin 任务调度"), new(312, ErrorDomain.AdminBusiness, "Database", nameof(DatabaseErrorCode), false, "Admin 代码生成数据库表"), @@ -33,6 +33,7 @@ public static class ErrorSegmentRegistry new(315, ErrorDomain.AdminBusiness, "Print", null, false, "Admin 打印模板(已退役,号段永久保留,禁止复用)"), new(316, ErrorDomain.AdminBusiness, "Plugin", null, false, "Admin 动态插件(已退役,号段永久保留,禁止复用)"), new(317, ErrorDomain.AdminBusiness, "OnlineModeration", nameof(OnlineModerationErrorCode), false, "Admin Online 社交治理(消息审计/举报处置/处罚联动,C350)"), + new(318, ErrorDomain.AdminBusiness, "AdvertisementCallbackConfig", nameof(AdvertisementCallbackConfigErrorCode), false, "Admin 广告回调配置"), // Online 平台 8 子段(C339 / vault:C2 S1.3,一一镜像 vault 1xxx~8xxx 八段;协议段 Nxxx ↔ 镜像段 32(N-1))。 new(320, ErrorDomain.AdminBusiness, "OnlineSystem", nameof(OnlineErrorCode), false, "Online 镜像:系统与网络(vault 1xxx)"), new(321, ErrorDomain.AdminBusiness, "OnlineSession", nameof(OnlineErrorCode), false, "Online 镜像:鉴权与 Session(vault 2xxx)"), @@ -88,4 +89,4 @@ public static bool IsLeadingDigitInDomain(int segment, ErrorDomain domain) _ => false, }; } -} \ No newline at end of file +} 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..b9ab67b5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/GameHomeErrorCode.cs @@ -6,14 +6,8 @@ namespace GameFrameX.Core.Enum.Errors; 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("目标租户库连接不可用,无法读取首页读数", "Target tenant database connection is unavailable for home metrics")] - TenantDbUnavailable = 60500002, + [ErrorText("数据库连接不可用,无法读取首页读数", "The database connection is unavailable for home metrics")] + 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/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/PaymentErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/PaymentErrorCode.cs index 3a52d653..5f30569f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/PaymentErrorCode.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/PaymentErrorCode.cs @@ -18,7 +18,7 @@ public enum PaymentErrorCode RefundNotSupported = 70400002, /// - /// 渠道退款所需的支付配置缺失(租户支付配置表中无该渠道该应用的启用配置)(C310 / GFX-718) + /// 渠道退款所需的支付配置缺失(支付配置表中无该渠道该应用的启用配置)(C310 / GFX-718) /// [ErrorText("退款失败:渠道支付配置缺失", "Refund failed: payment channel configuration is missing")] RefundConfigMissing = 70400003, 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 diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/TenantErrorCode.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/TenantErrorCode.cs deleted file mode 100644 index d278a7d1..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Enum/Errors/TenantErrorCode.cs +++ /dev/null @@ -1,97 +0,0 @@ -namespace GameFrameX.Core.Enum.Errors; - -/// -/// Admin 租户管理错误码(段 306,见 ;C265 自旧 D 码体系平移)。 -/// -public enum TenantErrorCode -{ - /// - /// 禁止删除默认租户 - /// - [ErrorText("禁止删除默认租户", "Deleting the default tenant is forbidden")] - DeleteDefaultTenantForbidden = 30600001, - - /// - /// 已存在同名的租户 - /// - [ErrorText("已存在同名的租户", "A tenant with the same name already exists")] - TenantNameAlreadyExists = 30600002, - - /// - /// 已存在同名的租户管理员 - /// - [ErrorText("已存在同名的租户管理员", "A tenant administrator with the same name already exists")] - TenantAdminNameAlreadyExists = 30600003, - - /// - /// 默认租户状态禁止修改 - /// - [ErrorText("默认租户状态禁止修改", "The default tenant status cannot be changed")] - DefaultTenantStatusChangeForbidden = 30600004, - - /// - /// 禁止创建此类型的数据库 - /// - [ErrorText("禁止创建此类型的数据库", "Creating this type of database is forbidden")] - TenantDbTypeForbidden = 30600005, - - /// - /// 租户已禁用 - /// - [ErrorText("租户已禁用", "Tenant is disabled")] - TenantDisabled = 30600006, - - /// - /// 普通租户禁止使用ID隔离 - /// - [ErrorText("普通租户禁止使用ID隔离", "ID isolation is forbidden for normal tenants")] - IdIsolationForbiddenForNormalTenant = 30600007, - - /// - /// 租户数据库已创建,禁止重复创建 - /// - [ErrorText("租户数据库已创建,禁止重复创建", "The tenant database has already been created")] - TenantDatabaseAlreadyCreated = 30600008, - - /// - /// 租户已过期 - /// - [ErrorText("租户已过期", "Tenant has expired")] - TenantExpired = 30600009, - - /// - /// 租户菜单同步手动触发仅超级管理员可用 - /// - [ErrorText("租户菜单同步手动触发仅超级管理员可用", "Manual tenant menu sync trigger is reserved for the super admin")] - MenuSyncSuperAdminOnly = 30600010, - - /// - /// 租户不存在或不在菜单同步范围 - /// - [ErrorText("租户不存在或不在菜单同步范围", "The tenant does not exist or is out of the menu sync scope")] - MenuSyncTenantNotInScope = 30600011, - - /// - /// 套餐不存在 - /// - [ErrorText("套餐不存在", "The package does not exist")] - MenuSyncPackageNotFound = 30600012, - - /// - /// 企业版套餐菜单清单由启动自动收敛维护,禁止手工编辑 - /// - [ErrorText("企业版套餐菜单清单由启动自动收敛维护,禁止手工编辑", "The enterprise package menu list is startup-converged and read-only for manual editing")] - EnterprisePackageMenuReadOnly = 30600013, - - /// - /// 套餐不存在或未启用 - /// - [ErrorText("套餐不存在或未启用", "The package does not exist or is not enabled")] - TenantPackageNotUsable = 30600014, - - /// - /// 默认租户套餐禁止修改 - /// - [ErrorText("默认租户套餐禁止修改", "The default tenant package cannot be changed")] - DefaultTenantPackageChangeForbidden = 30600015, -} \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportHelper.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportHelper.cs index 2430b0be..12e502ab 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportHelper.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportHelper.cs @@ -23,9 +23,9 @@ public static class DataExportHelper /// 按列白名单投影数据行并生成 Excel 文件结果。 /// /// 行数据类型(通常为实体 Output DTO)。 - /// 已查询并通过租户/权限过滤的数据行。 + /// 已查询并通过权限过滤的数据行。 /// 前端可见列白名单。 - /// 文件名后缀(业务名,如「租户渠道定义」)。 + /// 文件名后缀(业务名,如「业务渠道定义」)。 /// 可直接返回的 .xlsx FileStreamResult。 public static async Task BuildExcelResultAsync( IEnumerable rows, diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportRequest.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportRequest.cs index a3ad6306..fc81ed57 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportRequest.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Export/DataExportRequest.cs @@ -9,7 +9,7 @@ namespace GameFrameX.Core.Export; public class DataExportRequest where TQuery : class, new() { /// - /// 查询条件,复用各实体既有 Query 输入;租户与权限过滤由 Service 的 BuildPageQuery 强制叠加。 + /// 查询条件,复用各实体既有 Query 输入;权限过滤由 Service 的 BuildPageQuery 强制叠加。 /// public TQuery Query { get; set; } = new(); 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..2ef1903d 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; @@ -7,14 +7,14 @@ namespace GameFrameX.Core.Job; /// -/// 按保留期清理主库差异日志与租户历史日志(C404 裁定 §9.4)。 +/// 按保留期清理主库差异日志与管理员历史日志(C404 裁定 §9.4)。 /// 访问日志与操作日志的留存已交由审计留存作业(job_auditRetention:搬归档表)负责, /// 本作业不再删除 SystemLogVisit / SystemLogOperation,防止在归档前删掉热数据。 /// 触发器保持无参 [Daily]:调度合一后该特性不带调度参数,作业保持休眠(§9.8); /// 是否启用差异日志清理登记为后续候选。 /// -[JobDetail("job_log", Description = "清理差异日志与租户历史日志", GroupName = "default", Concurrent = false)] -[Daily(TriggerId = "trigger_log", Description = "清理差异日志与租户历史日志")] +[JobDetail("job_log", Description = "清理差异日志与历史日志", GroupName = "default", Concurrent = false)] +[Daily(TriggerId = "trigger_log", Description = "清理差异日志与历史日志")] public class LogJob : IJob { private readonly IServiceScopeFactory _scopeFactory; @@ -34,12 +34,12 @@ public async Task ExecuteAsync(JobExecutingContext context, CancellationToken st var provider = serviceScope.ServiceProvider; var mainDb = provider.GetRequiredService().AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId); // §9.4:SystemLogVisit / SystemLogOperation 的删除已移交审计留存(job_auditRetention 归档); - // 此处仅保留差异日志与租户历史日志(C400 后只读)的清理。 + // 此处仅保留差异日志与管理员历史日志(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/Logging/MonitorLoggingFilter.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/MonitorLoggingFilter.cs index a3ee6915..43ba6f56 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/MonitorLoggingFilter.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Logging/MonitorLoggingFilter.cs @@ -486,7 +486,7 @@ private static string ResolveActionRouteSegment(ControllerActionDescriptor descr } /// - /// 方法名去掉 Async 后缀作为 actionTypeName(DatabaseLoggingWriter 的登录租户归因判定 actionTypeName == "Login" + /// 方法名去掉 Async 后缀作为 actionTypeName(DatabaseLoggingWriter 的登录归因判定 actionTypeName == "Login" /// 的配套口径:#189 路由锁定重命名把方法统一加了 Async 后缀,去后缀后与历史框架时代判定值一致)。 /// private static string TrimAsyncSuffix(string methodName) 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..d544e884 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(PublicCallbackResolution)与 Hub.Api(GameAppOpenAccessAuth)及协议版本中间件的拒绝出口。 /// :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/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/PublicStartupEndpointAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/PublicStartupEndpointAttribute.cs index 3ca36afa..faf05293 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/PublicStartupEndpointAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Middleware/PublicStartupEndpointAttribute.cs @@ -6,8 +6,8 @@ namespace GameFrameX.Core.Middleware; /// 资源版本),请求体仅为设备 / 包名 / 渠道等非秘密字段;业界同类接口(Firebase Remote Config、商店版本检查、 /// 热更 manifest)一律纯 HTTPS 无请求签名,且客户端本就不在启动期做签名——不豁免则签名灰度切 FailClosed /// 会打断所有存量客户端启动流程。 -/// 豁免边界:仅豁免传输签名强制,不等于匿名接口——仍要求租户 / 应用上下文解析 -/// (RequireTenantAppContext)+ TLS,也不豁免加密信封 opt-in 与其他中间件(如租户到期拦截)。 +/// 豁免边界:仅豁免传输签名强制,不等于匿名接口——仍要求 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..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; @@ -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; } /// @@ -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 _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..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; @@ -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(); @@ -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 _database.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/Base/GenericCrudService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Base/GenericCrudService.cs index b1a1bfcb..7fcdb197 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Base/GenericCrudService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Base/GenericCrudService.cs @@ -90,12 +90,12 @@ protected virtual ISugarQueryable BuildPageQuery(TPageRequest input) } /// - /// 通用导出核心实现:复用既有 (已含租户/权限过滤) + /// 通用导出核心实现:复用既有 (已含权限过滤) /// 与 ,按列白名单投影生成 Excel。 /// /// /// 各业务 Service 通过显式 Export 端点 opt-in 调用本方法;禁止裸 SQL, - /// 禁止绕过 的租户/权限过滤。租户边界由各 Service + /// 禁止绕过 的权限过滤。数据边界由各 Service /// 的 override 强制叠加(参考 ChannelDefinitionManagementServiceBase)。 /// /// 实体既有查询输入,复用各 Service 的筛选条件;分页参数仅在 =CurrentPage 时生效。 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/GameServerConfigBaselineSeed.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/GameServerConfigBaselineSeed.cs similarity index 82% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/GameServerConfigBaselineSeed.cs index 0543c115..5a9cf227 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/GameServerConfigBaselineSeed.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/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/ObjectStorage/TenantObjectStorageConfigCrypto.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/ObjectStorage/ObjectStorageConfigCrypto.cs similarity index 91% 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..d597356a 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):写入侧在 规范化之后、 +/// 对象存储 ConfigJson 敏感字段级加解密收口(C370 / GFX-829):写入侧在 规范化之后、 /// 落库之前调用 ;读取侧在 之前调用 。 /// 敏感字段集合由 Provider Schema 的 Sensitive 标记驱动(与表单脱敏同源),非敏感字段(Bucket / Endpoint 等)保持明文可读; -/// 字段值为 密文形态(enc:sec:v1: 前缀)时幂等跳过。 +/// 字段值为 密文形态(enc:sec:v1: 前缀)时幂等跳过。 /// 性能约束:底层 PBKDF2 派生单次数百毫秒级,而文件上传 / 下载 / 连通性测试按请求读取配置—— /// 按「密文原文 → 明文 JSON」做进程级缓存,同一密文只解密一次; /// 任何配置写入都会产生新密文(每次加密随机 Salt + Nonce),缓存 key 随之失效,无需显式失效协议。 -/// ponytail: 缓存字典无淘汰上限(key 为整段密文 JSON,每条数 KB);对象存储配置行数极少(每租户至多几条), +/// 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/Payment/PaymentConfigCrypto.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/Payment/PaymentConfigCrypto.cs similarity index 95% 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 index c510cb5b..8574703a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Tenant/Payment/PaymentConfigCrypto.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/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/Tenant/TenantSecretCrypto.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Business/SecretCrypto.cs similarity index 90% 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..eeeed0c9 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、 +/// 业务凭证静态加密唯一收口(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 85% 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..0004ad77 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; @@ -9,35 +9,35 @@ namespace GameFrameX.Core.Service.File; /// /// 系统文件服务。 -/// 上传/下载/删除全部经由 解析当前租户的对象存储配置。 +/// 上传/下载/删除全部经由 解析当前的对象存储配置。 /// 业务规则: /// -/// 上传必须命中当前租户唯一启用的配置;未启用任何配置时直接报错,不做隐式 fallback。 -/// 下载/删除按文件记录的 精确解析(即使该配置已被禁用)。 -/// 为 null 的历史记录按本地 legacy 行为兜底(wwwroot 下原 FilePath)。 -/// 大小限额直接按字节比较 。 +/// 上传必须命中唯一启用的配置;未启用任何配置时直接报错,不做隐式 fallback。 +/// 下载/删除按文件记录的 精确解析(即使该配置已被禁用)。 +/// 为 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,26 +240,26 @@ 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); } /// - /// 上传文件核心逻辑:解析租户活动配置 → 校验 → 写对象存储 → 写文件记录。 + /// 上传文件核心逻辑:解析活动配置 → 校验 → 写对象存储 → 写文件记录。 /// /// 文件 /// 路径覆盖值;为空时使用配置的 PathTemplate /// - private async Task HandleUploadFileAsync(IFormFile file, string? savePath) + private async Task HandleUploadFileAsync(IFormFile file, string? savePath) { if (file == null) { throw BusinessError.Oh(FileErrorCode.FileNotFound); } - // 当前租户必须存在唯一启用的对象存储配置。命中 0 条 → 未配置;命中 ≥2 条 → 配置异常(不变量违反)。 + // 必须存在唯一启用的对象存储配置。命中 0 条 → 未配置;命中 ≥2 条 → 配置异常(不变量违反)。 // 两者都明确报错,不 fallback、不静默取首条(spec-review P1:Resolver 遇多条视为配置错误)。 var activeConfigs = await _storageConfigRepository.AsQueryable().Where(c => c.IsEnabled == true).ToListAsync(); var config = EnsureSingleActiveConfig(activeConfigs); @@ -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; @@ -459,22 +459,22 @@ private static string ResolveUploadPath(string? savePath, string pathTemplate) } /// - /// 校验当前租户存在且仅存在一条启用的对象存储配置。 + /// 校验存在且仅存在一条启用的对象存储配置。 /// 命中 0 条:上传明确报错“未配置”,不 fallback 到平台/本地。 /// 命中 ≥2 条:视为唯一活动配置不变量被违反(并发竞态/回填 bug/手工改库),明确报错,不静默取首条。 /// - /// 当前租户启用的配置列表。 + /// 启用的配置列表。 /// 唯一启用配置。 - internal static TenantObjectStorageConfigEntity EnsureSingleActiveConfig(List activeConfigs) + internal static ObjectStorageConfigEntity EnsureSingleActiveConfig(List activeConfigs) { if (activeConfigs == null || activeConfigs.Count == 0) { - throw BusinessError.Oh("当前租户未启用对象存储配置,请联系管理员在「对象存储配置」中启用一项"); + throw BusinessError.Oh("未启用对象存储配置,请联系管理员在「对象存储配置」中启用一项"); } if (activeConfigs.Count > 1) { - throw BusinessError.Oh("对象存储配置异常:当前租户存在多个启用配置,请联系管理员仅保留一项"); + throw BusinessError.Oh("对象存储配置异常:存在多个启用配置,请联系管理员仅保留一项"); } return activeConfigs[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..5a452503 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 @@ -109,14 +109,10 @@ public class GlobalMenuResponse /// - /// 超管专属菜单下允许租户只读访问 + /// 超管专属菜单下允许管理员只读访问 /// - public bool AllowTenantWhenSuperAdminOnly { get; set; } + public bool AllowAdminWhenSuperAdminOnly { get; set; } - /// - /// 应用作用域(Tenant 租户默认 / 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/GlobalMenuService.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Menu/GlobalMenuService.cs index 4c83d41e..b17e8f40 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/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.Core/Service/Message/ISystemEmailSender.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/ISystemEmailSender.cs index aaaa99bb..7adb0a38 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/ISystemEmailSender.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/ISystemEmailSender.cs @@ -2,8 +2,8 @@ namespace GameFrameX.Core.Service.Message; /// /// 平台系统邮件发送服务。 -/// 配置存主库 / SuperAdmin-only,不依赖当前请求租户上下文。 -/// 关键约束:本服务不得用于租户玩家邮件,也不得作为租户业务邮件的 fallback。 +/// 配置存主库 / SuperAdmin-only,不依赖请求上下文。 +/// 关键约束:本服务不得用于玩家邮件,也不得作为业务邮件的 fallback。 /// 缺配置 / 缺凭据 / 发送失败返回 false 并记录警告,不抛业务异常;测试发送由 SystemEmailProviderService.SendTestEmail 暴露。 /// public interface ISystemEmailSender 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..a0c6f603 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemEmailPurpose.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/Message/SystemEmailPurpose.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Core.Service.Message; /// /// 平台系统邮件用途。 -/// 仅服务 SaaS 平台自身流程:租户生命周期、平台安全、平台运维通知等;不依赖当前请求租户上下文,不得作为租户玩家邮件的静默 fallback。 +/// 仅服务平台自身流程:平台安全、平台运维通知等;不依赖请求上下文,不得作为玩家邮件的静默 fallback。 /// [AdminEnum] public enum SystemEmailPurpose @@ -14,18 +14,13 @@ public enum SystemEmailPurpose /// Default = 0, - /// - /// 租户生命周期通知(开通、到期、账单)。 - /// - TenantLifecycle = 1, - /// /// 平台安全通知(异常登录、密钥泄露告警等)。 /// PlatformSecurity = 2, /// - /// 平台运维通知(系统维护、租户初始化前邮件等)。 + /// 平台运维通知(系统维护等)。 /// PlatformOps = 3, 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..95eafec0 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); @@ -101,7 +101,7 @@ public async Task SendUsersAsync(MessageRequest input) /// /// 发送平台系统邮件。 - /// 从主库 SystemEmailProviderEntity 读取配置(按 SystemEmailPurpose.PlatformOps 默认);缺配置返回 false,禁止静默成功或 fallback 到租户玩家邮件。 + /// 从主库 SystemEmailProviderEntity 读取配置(按 SystemEmailPurpose.PlatformOps 默认);缺配置返回 false,禁止静默成功或 fallback 到玩家邮件。 /// 缺省收件人:使用当前命中的 SystemEmailProviderEntity 配置的 DefaultToEmail;若配置也未提供则发送失败。 /// /// 邮件正文。 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/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 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 98% 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..3a51419c 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 @@ -3,9 +3,9 @@ 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 69% 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..4098a06c 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/TenantUserService.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/Service/User/UserService.cs @@ -6,30 +6,30 @@ 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 _userRepository; + private readonly UserRoleService _userRoleService; 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; + _userRepository = userRepository; + _userRoleService = 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,15 +45,15 @@ 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() + 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)) .WhereIF(!string.IsNullOrWhiteSpace(input.Phone), u => u.Phone.Contains(input.Phone)) .OrderBy(u => u.OrderNo) - .Select() + .Select() .ToPagedListAsync(input.Page, input.PageSize); } @@ -68,7 +68,7 @@ public async Task> PageAsync(PageUserReque [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); @@ -76,10 +76,10 @@ 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(); + 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); } @@ -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); + var user = await _userRepository.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,9 +170,9 @@ 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) + 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(TenantUserEntity 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 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..9d03b7fd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarSetup.cs @@ -1,16 +1,17 @@ +using GameFrameX.Core.Bootstrap; using GameFrameX.Core.Logging; using GameFrameX.Foundation.Orm.Attribute; using GameFrameX.Core.Const.MenuSeed; 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; @@ -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); } @@ -253,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) @@ -503,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/ diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionAttribute.cs index 1adbcff2..263359b3 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionAttribute.cs @@ -4,7 +4,7 @@ /// SqlSugar 请求事务过滤器。 /// /// -/// 标记在动态 API action 或普通 MVC action 上时,使用当前 的多租户事务入口包裹整次 action 执行。 +/// 标记在动态 API action 或普通 MVC action 上时,使用当前 的事务入口包裹整次 action 执行。 /// 这是 C38 迁移后的显式事务边界,替代 历史框架 隐式工作单元注册。 /// [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionRunner.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionRunner.cs index a5cdb15c..930190e5 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionRunner.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Core/SqlSugar/SqlSugarTransactionRunner.cs @@ -45,24 +45,24 @@ public async Task ExecuteAsync(Func> action) return; } - var tenant = _sqlSugarClient.AsTenant(); - tenant.BeginTran(); + var multiDatabaseClient = _sqlSugarClient.AsTenant(); // SqlSugar 多库事务客户端(D2.5 原生 API) + multiDatabaseClient.BeginTran(); CurrentDepth.Value++; try { var shouldCommit = await action(); if (shouldCommit) { - tenant.CommitTran(); + multiDatabaseClient.CommitTran(); } else { - tenant.RollbackTran(); + multiDatabaseClient.RollbackTran(); } } catch { - tenant.RollbackTran(); + multiDatabaseClient.RollbackTran(); throw; } finally diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantChannelDefinitionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ChannelDefinitionEntity.cs similarity index 55% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantChannelDefinitionEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ChannelDefinitionEntity.cs index 3962621d..5b8edc20 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] +[SugarTable(null, "业务渠道定义表")] +[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 84% 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..a801ba6a 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantAdvertisementCallbackConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/AdvertisementCallbackConfigEntity.cs @@ -1,18 +1,24 @@ 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] +[SugarTable(null, "广告回调配置")] +[BusinessTable] [IncrementTable] -public class TenantAdvertisementCallbackConfigEntity : EntityBasic +public class AdvertisementCallbackConfigEntity : EntityBasic { + /// + /// 关联的游戏应用分包 Id,对应 ;广告回调验签材料严格绑定此分包。 + /// + [SugarColumn(ColumnDescription = "游戏应用分包Id", DefaultValue = "0")] + public long PackageId { get; set; } + /// /// 广告平台 Provider。当前首批配置支持 TopOn、GoogleAdMob、Pangle、UnityAds。 /// @@ -57,4 +63,4 @@ public class TenantAdvertisementCallbackConfigEntity : EntityBasic /// [SugarColumn(ColumnDescription = "备注", Length = EntityStringLength.Length1024, IsNullable = true)] public string Remark { get; set; } = null!; -} \ No newline at end of file +} 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 86% 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..2e06ed90 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantClientApiPolicyEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/ClientApiPolicyEntity.cs @@ -1,16 +1,16 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.ClientApiConfig; +namespace GameFrameX.Entity.Business.ClientApiConfig; /// -/// 租户 Client API 运行策略合并配置(C378 四表合一:Token / 登录票据 / 区服输出 / 订单策略)。 -/// 节划分理由:令牌节是服务端内部签名密钥语义,天然租户级(不区分应用);票据节与输出节均为应用作用域的运行窗口 / 开关,随行作用域回退。 +/// Client API 运行策略合并配置(C378 四表合一:Token / 登录票据 / 区服输出 / 订单策略)。 +/// 节划分理由:令牌节是服务端内部签名密钥语义,天然全局级(不区分应用);票据节与输出节均为应用作用域的运行窗口 / 开关,随行作用域回退。 /// 存量数据由启动期迁移执行器从原四表幂等迁入(同键 Id 大者优先),迁移后原四表停写。 /// -[SugarTable(null, "租户ClientAPI运行策略")] -[TenantTable] +[SugarTable(null, "ClientAPI运行策略")] +[BusinessTable] [IncrementTable] -public class TenantClientApiPolicyEntity : EntityBasic +public class ClientApiPolicyEntity : EntityBasic { /// /// 是否要求请求签名。 @@ -50,7 +50,7 @@ public class TenantClientApiPolicyEntity : EntityBasic public long TicketExpireTime { get; set; } /// - /// 【票据节】是否允许首次签发时自动创建租户应用级 RSA key。实际值可被平台默认覆盖。 + /// 【票据节】是否允许首次签发时自动创建应用级 RSA key。实际值可被平台默认覆盖。 /// [SugarColumn(ColumnDescription = "是否允许首次签发自动建Key", DefaultValue = "false")] public bool EnableKeyAutoCreate { get; set; } = true; 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 84% 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..051edd38 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/ClientApiConfig/TenantEmailConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/ClientApiConfig/EmailConfigEntity.cs @@ -1,21 +1,21 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.ClientApiConfig; +namespace GameFrameX.Entity.Business.ClientApiConfig; /// -/// 租户业务邮件配置。 -/// 承载玩家注册验证码、找回密码、玩家运营触达等租户品牌发信;与平台系统邮件(SystemEmailProviderEntity)完全独立,互不 fallback。 +/// 业务邮件配置。 +/// 承载玩家注册验证码、找回密码、玩家运营触达等本游戏品牌发信;与平台系统邮件(SystemEmailProviderEntity)完全独立,互不 fallback。 /// -[SugarTable(null, "租户业务邮件配置")] -[TenantTable] +[SugarTable(null, "业务邮件配置")] +[BusinessTable] [IncrementTable] -public class TenantEmailConfigEntity : EntityBasic +public class EmailConfigEntity : EntityBasic { /// - /// 租户业务邮件用途(TenantEmailPurpose)。0 表示通配该租户 / 应用下所有租户业务邮件。 + /// 业务邮件用途(EmailPurpose)。0 表示通配该应用下所有业务邮件。 /// - [SugarColumn(ColumnDescription = "租户业务邮件用途", DefaultValue = "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 90% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantFileEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/FileEntity.cs index 91e7a9fa..4bda6430 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] +[SugarTable(null, "文件表")] +[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 76% 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..fbc5dc8d 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,25 +1,25 @@ 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; } /// - /// 绑定的租户系统用户 Id。Hub.Api 写入版本数据和审计列时使用该用户身份。 + /// 绑定的系统用户 Id。Hub.Api 写入版本数据和审计列时使用该用户身份。 /// [SugarColumn(ColumnDescription = "绑定用户Id", DefaultValue = "0")] public long BindUserId { get; set; } @@ -50,13 +50,13 @@ public TenantGameAppOpenAccessEntity() public string ScopesJson { get; set; } = null!; /// - /// 访问 Key。租户内唯一,鉴权时按声明租户路由租户库查询。 + /// 访问 Key。全局唯一,鉴权时直接查询主库。 /// [SugarColumn(ColumnDescription = "访问Key", Length = EntityStringLength.Length256)] 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/FeatureSwitchAudienceValues.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs similarity index 84% 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 index f1d325d3..69d89c7f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/FeatureSwitch/FeatureSwitchAudienceValues.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/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/FeatureSwitch/TenantGameAppFeatureSwitchEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/FeatureSwitch/GameAppFeatureSwitchEntity.cs similarity index 95% 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..7adeb5ee 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,17 +1,17 @@ using GameFrameX.Entity.Base; -namespace GameFrameX.Entity.Tenant.Game.FeatureSwitch; +namespace GameFrameX.Entity.Business.Game.FeatureSwitch; /// -/// 活动/功能开关注册表(租户库)。 +/// 活动/功能开关注册表。 /// 每行一个可运行时投放的开关/活动事实源:客户端经 Client.Api、游戏服务器经 Hub.Api /// 按 过滤后拉取,玩法 gate 判定权在使用方业务端点,本表只承载配置分发。 /// [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 86% 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..445938c3 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,11 +10,18 @@ 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 { + /// + /// 本笔回调验签时选中的广告回调配置所属游戏应用分包 Id(与 一致), + /// 来自公开回调 URL 的 packageId 路由段;新装库才有值,历史行为 0。 + /// + [SugarColumn(ColumnDescription = "验签配置所属游戏应用分包Id", DefaultValue = "0")] + public long PackageId { get; set; } + /// /// 广告平台 Provider。标准化值:TopOn / GoogleAdMob / UnityAds。 /// @@ -34,7 +41,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!; @@ -86,4 +93,4 @@ public class TenantGameAdvertisementRewardEntity : EntityBasic /// [SugarColumn(ColumnDescription = "是否沙箱", DefaultValue = "false")] public bool IsSandbox { get; set; } -} \ No newline at end of file +} 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/GamePropItem.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GamePropItem.cs similarity index 96% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/GamePropItem.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/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/Business/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/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 73% 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..35d44f6e 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 65% 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..aec89ea2 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameRoleAdvertisementEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameRoleAdvertisementEntity.cs @@ -1,17 +1,24 @@ 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 { + /// + /// 广告回调命中的游戏应用分包 Id(与 一致),来自公开回调 URL 的 packageId 路由段; + /// 与该笔回调验签所选配置的分包一致。新装库才有值,历史行为 0。 + /// + [SugarColumn(ColumnDescription = "回调命中游戏应用分包Id", DefaultValue = "0")] + public long PackageId { get; set; } + /// /// 用户ID /// @@ -41,4 +48,4 @@ public class TenantGameRoleAdvertisementEntity : EntityBase /// [SugarColumn(ColumnDescription = "角色ID")] public string RoleId { get; set; } = null!; -} \ No newline at end of file +} 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 97% 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..eda8e645 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/Game/TenantGameUserArchiveEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/Game/GameUserArchiveEntity.cs @@ -1,19 +1,19 @@ 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(租户内唯一,一玩家一行) + /// 玩家 id(全局唯一,一玩家一行) /// [SugarColumn(ColumnDescription = "玩家 id", DefaultValue = "0")] public long UserId { get; set; } 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 86% 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..96b293f1 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] +[SugarTable(null, "对象存储配置")] +[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 90% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantOnlineUserEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/OnlineUserEntity.cs index 23bc4ae2..3ba011ca 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] +[SugarTable(null, "在线用户表")] +[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 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleEntity.cs index b0a1a745..47becf28 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] +[SugarTable(null, "角色表")] +[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 81% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantRoleMenuEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/RoleMenuEntity.cs index f04ab69e..74052bca 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] +[SugarTable(null, "角色菜单表")] +[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..93a3d556 --- /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 70% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantUserRoleEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/UserRoleEntity.cs index 266091ec..74bbd6a3 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] +[SugarTable(null, "用户角色表")] +[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 89% rename from GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantWechatUserEntity.cs rename to GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/WechatUserEntity.cs index b30fea04..d6d084ee 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Tenant/TenantWechatUserEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Business/WechatUserEntity.cs @@ -1,27 +1,27 @@ using GameFrameX.Entity.Base; using GameFrameX.Entity.Enum; -namespace GameFrameX.Entity.Tenant; +namespace GameFrameX.Entity.Business; /// -/// 租户微信用户绑定表 +/// 微信用户绑定表 /// -[SugarTable(null, "租户微信用户绑定表")] -[TenantTable] +[SugarTable(null, "微信用户绑定表")] +[BusinessTable] [IncrementTable] -public sealed class TenantWechatUserEntity : EntityBasic +public sealed class WechatUserEntity : EntityBasic { /// - /// 租户用户Id + /// 用户Id /// - [SugarColumn(ColumnDescription = "租户用户Id", DefaultValue = "0")] + [SugarColumn(ColumnDescription = "用户Id", DefaultValue = "0")] public long UserId { get; set; } /// - /// 租户用户 + /// 用户 /// [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..206a250f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ChannelScopeEnum.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/ChannelScopeEnum.cs @@ -13,7 +13,7 @@ public enum ChannelScopeEnum [Description("系统")] System = 1, /// - /// 租户自定义渠道 + /// 业务自定义渠道 /// - [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/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/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/TenantTypeEnum.cs deleted file mode 100644 index 4e84c09e..00000000 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Enum/TenantTypeEnum.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace GameFrameX.Entity.Enum; - -/// -/// 租户类型枚举 -/// -[Description("租户类型枚举")] -[AdminEnum] -public enum TenantTypeEnum -{ - /// - /// 库隔离 - /// - [Description("库隔离")] Db = 1, -} \ No newline at end of file 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/GlobalChannelDefinitionEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalChannelDefinitionEntity.cs index 4b7a0d21..64ed0889 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalChannelDefinitionEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalChannelDefinitionEntity.cs @@ -4,7 +4,7 @@ namespace GameFrameX.Entity.Global; /// -/// 全局渠道定义表,由平台维护,租户只能通过白名单只读入口选择。 +/// 全局渠道定义表,由平台维护,业务侧只能通过白名单只读入口选择。 /// [SugarTable(null, "全局渠道定义表")] [GlobalTable] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalConfigEntity.cs index f31f8535..9739c97f 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalConfigEntity.cs @@ -4,9 +4,9 @@ namespace GameFrameX.Entity.Global; /// -/// 租户可只读的全局配置表,仅允许保存经过白名单 DTO 审查的非敏感配置。 +/// 业务侧可只读的全局配置表,仅允许保存经过白名单 DTO 审查的非敏感配置。 /// -[SugarTable(null, "租户可读全局配置表")] +[SugarTable(null, "业务侧可读全局配置表")] [GlobalTable] [IncrementTable] public class GlobalConfigEntity : SystemConfigBase diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs index 218b6e4d..fc0a2414 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Global/GlobalMenuEntity.cs @@ -128,16 +128,11 @@ public sealed class GlobalMenuEntity : EntityBasic /// - /// 超管专属菜单下允许租户只读访问 + /// 超管专属菜单下允许管理员只读访问 /// - [SugarColumn(ColumnDescription = "超管专属允许租户只读", DefaultValue = "false")] - public bool AllowTenantWhenSuperAdminOnly { get; set; } + [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/GlobalUsing.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/GlobalUsing.cs index 03892dfc..626b3549 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;global using GameFrameX.Entity.Routing; 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..4ebdeaaf --- /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..cd6296ae --- /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..2fe33d39 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogDiffFields.cs @@ -3,14 +3,10 @@ namespace GameFrameX.Entity.Log; /// -/// 差异日志公共字段基类。不映射物理表,供 与 复用字段。 +/// 差异日志公共字段基类。不映射物理表,供 与 复用字段。 /// public class LogDiffFields : EntityBasic { - /// 历史审计归属,仅保留既有记录,不参与路由或自动填充。 - [SugarColumn(ColumnDescription = "历史租户标识", IsNullable = true)] - public long? TenantId { 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..4f5c8d60 --- /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..17508849 --- /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/LogOperationFields.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogOperationFields.cs index 23fd9e78..10947ca8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogOperationFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogOperationFields.cs @@ -2,7 +2,7 @@ namespace GameFrameX.Entity.Log; /// /// 操作/异常日志公共字段基类。不映射物理表,供 、 -/// 及对应租户日志实体复用 HTTP 请求与异常字段。 +/// 及对应管理员日志实体复用 HTTP 请求与异常字段。 /// public class LogOperationFields : LogVisitFields { 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..f62abd22 --- /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..7f2e52bd 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Log/LogVisitFields.cs @@ -4,15 +4,11 @@ namespace GameFrameX.Entity.Log; /// -/// 访问日志公共字段基类。不映射物理表,仅供 与 复用字段, +/// 访问日志公共字段基类。不映射物理表,仅供 与 复用字段, /// 避免单个 CLR 实体按运行上下文切换物理表。 /// public class LogVisitFields : EntityBase { - /// 历史审计归属,仅保留既有记录,不参与路由或自动填充。 - [SugarColumn(ColumnDescription = "历史租户标识", IsNullable = true)] - public long? TenantId { 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/BusinessTableAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/BusinessTableAttribute.cs new file mode 100644 index 00000000..e298efd2 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/BusinessTableAttribute.cs @@ -0,0 +1,14 @@ +namespace GameFrameX.Entity.Routing; + +/// +/// 标记业务表(物理表名不带前缀)。 +/// +/// +/// 归属:主数据库,承载游戏运营业务数据与管理员身份、权限、业务日志。 +/// 路由:必须解析到主库,禁止根据连接或用户切换物理表名。 +/// 边界:与 、 互斥,每个受管持久化实体只能标注其中一个。 +/// +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] +public sealed class BusinessTableAttribute : Attribute +{ +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs index 3bef73ef..6e14d139 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/GlobalTableAttribute.cs @@ -33,10 +33,10 @@ namespace GameFrameX.Entity.Routing; /// 标记主库全局定义表(物理前缀 global_)。 /// /// -/// 归属:主数据库,承载租户可通过白名单只读访问的全局定义(菜单、字典、语言、平台、渠道定义、租户套餐模板等)。 -/// 访问:租户代码只能通过显式白名单 Provider/API 只读访问,写入仅限平台;禁止租户任意查询主库。 -/// 路由:必须解析到主库,与 system_ 同属主库初始化集合,禁止 fallback 到租户库。 -/// 边界:与 、 互斥。C34 新增,用于区分平台私有表(system_)与租户白名单只读全局定义表(global_)。 +/// 归属:主数据库,承载业务侧可通过白名单只读访问的全局定义(菜单、字典、语言、平台、渠道定义等)。 +/// 访问:业务代码只能通过显式白名单 Provider/API 只读访问,写入仅限平台;禁止任意查询主库。 +/// 路由:必须解析到主库,与 system_ 同属主库初始化集合,禁止 fallback 到其他库。 +/// 边界:与 、 互斥。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..48120312 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/PlatformTableAttribute.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/Routing/PlatformTableAttribute.cs @@ -4,9 +4,9 @@ namespace GameFrameX.Entity.Routing; /// 标记平台主库私有表(物理前缀 system_)。 /// /// -/// 归属:主数据库,仅平台与 SuperAdmin 可读写,承载平台身份、租户注册、平台私有配置等平台私有数据。 -/// 路由:必须解析到主库,禁止根据连接或用户切换物理表名,禁止 fallback 到租户库或日志库。 -/// 边界:与 、 互斥,每个受管持久化实体只能标注其中一个。 +/// 归属:主数据库,仅平台与 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/SystemConfigBase.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemConfigBase.cs index d662239a..aa2700f8 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemConfigBase.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemConfigBase.cs @@ -5,7 +5,7 @@ namespace GameFrameX.Entity.System; /// -/// 配置字段基类。不要直接映射数据库表,平台私有配置使用 ,租户只读全局配置使用 。 +/// 配置字段基类。不要直接映射数据库表,平台私有配置使用 ,业务侧只读全局配置使用 。 /// public abstract class SystemConfigBase : EntityBasic { diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemConfigEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemConfigEntity.cs index d67fa99e..a2c4dfbf 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemConfigEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemConfigEntity.cs @@ -32,7 +32,7 @@ namespace GameFrameX.Entity.System; /// -/// 平台私有配置表,保存默认密码、Token、登录安全、日志、水印等不可暴露给租户的系统配置。 +/// 平台私有配置表,保存默认密码、Token、登录安全、日志、水印等不可暴露给业务侧的系统配置。 /// [SugarTable(null, "平台私有配置表")] [PlatformTable] diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs index fbc8cfb4..8a4292ea 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Entity/System/SystemEmailProviderEntity.cs @@ -5,8 +5,8 @@ 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..d264976c 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/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..3f9cb789 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Program.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Hub.Api/Program.cs @@ -47,13 +47,14 @@ private static void Main(string[] args) // 主库连接统一走 DbConnection 节 + GFX_MAIN_DB_* 单一入口(C269);LauncherOptions 裸参数仅作兼容兜底 var mainDbConfig = HostMainDbConnectionResolver.Resolve(builder.Configuration, launcherOptions); var sqlSugar = SqlSugarClientConfig.AddSqlSugarClientService(mainDbConfig, HubUserAuditHandler.Handle(httpContextAccessor)); + LegacySchemaStartupGuard.EnsureNotLegacySchema(sqlSugar, mainDbConfig); builder.Services.AddSingleton(sqlSugar); // 主库 - builder.Services.AddScoped(typeof(Repository<>)); // 仓储(按租户路由数据库) + builder.Services.AddScoped(typeof(Repository<>)); // 仓储(主库) // 基类服务面:FeatureSwitchDeliveryResolver 等共享实现以 SqlSugarRepository 为构造参数(C345 冻结契约), // DI 不做基类向上匹配,须显式注册开放泛型基类 -> Repository 实现(与上行为不同 descriptor,仓储无状态可各自实例化) builder.Services.AddScoped(typeof(SqlSugarRepository<>), typeof(Repository<>)); - // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 租户仓储,FeatureSwitchSync 端点消费) + // 活动/功能开关投放解析器(C345 共享实现,依赖 Scoped 仓储,FeatureSwitchSync 端点消费) builder.Services.AddScoped(); // OpenAccess 机器凭证中间件 nonce 去重依赖链(与 Client.Api 同款注册):ICache + SystemCacheService(仅依赖 ICache + IOptions) builder.Services.AddCache(); @@ -90,11 +91,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(); @@ -111,4 +112,4 @@ private static void Main(string[] args) throw; } } -} \ No newline at end of file +} 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..c745e064 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/ApiEndpointCatalogSync.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/ApiEndpointCatalogSync.cs @@ -24,7 +24,7 @@ namespace GameFrameX.Web.Api.Handlers; /// Host 启动后:枚举 ASP.NET Core MVC 发现的全部 Admin API 端点 → 与 对账(匹配/孤儿/新增) /// → 按 DB global_menu.Permission(routeName)一次性回填 绑定 /// → 为未绑定且非公开端点自动挂隐藏按钮 → 构建并预热请求期端点权限缓存。 -/// 异常上抛让 Host fail-fast:避免目录空导致 JwtHandler 静默锁死全部租户请求。 +/// 异常上抛让 Host fail-fast:避免目录空导致 JwtHandler 静默锁死全部已登录请求。 /// public sealed class ApiEndpointCatalogSync : IHostedService { @@ -259,7 +259,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/Handlers/InitialAdminStartupBootstrap.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/InitialAdminStartupBootstrap.cs new file mode 100644 index 00000000..ff637861 --- /dev/null +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Handlers/InitialAdminStartupBootstrap.cs @@ -0,0 +1,31 @@ +using GameFrameX.Core.Bootstrap; +using Microsoft.Extensions.Hosting; +using SqlSugar; + +namespace GameFrameX.Web.Api.Handlers; + +/// +/// 启动期执行首个业务管理员种子引导(C406 / F3)。 +/// AddSqlSugar(旧库守卫 + 建表 + 种子 + MenuSeedCatalog 加载)在装配期同步完成, +/// HostedService 在其后运行;注册顺序在 PlatformPasswordPolicyStartupLoader 之后, +/// 保证密码强度策略静态属性已就位再做 fail-closed 校验。仅 Web.Api 装配(Client/Hub 不引导)。 +/// +public sealed class InitialAdminStartupBootstrap : IHostedService +{ + private readonly ISqlSugarClient _sqlSugarClient; + + public InitialAdminStartupBootstrap(ISqlSugarClient sqlSugarClient) + { + _sqlSugarClient = sqlSugarClient; + } + + public Task StartAsync(CancellationToken cancellationToken) + { + return InitialAdminBootstrap.RunAsync(_sqlSugarClient); + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} diff --git a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs index d15ac403..d6af8651 100644 --- a/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs +++ b/GameFrameX.Admin.Unified.Api/GameFrameX.Web.Api/Startup.cs @@ -70,7 +70,6 @@ public void ConfigureServices(IServiceCollection services) LocalObjectStorageAdapter.Configure(webHostEnvironment); // SqlSugar services.AddSqlSugar(configuration, webHostEnvironment, cache, httpContextAccessor); - // Admin 侧租户库连接提供器:Core 收敛层(Repository 租户表路由 / 签名密钥环 Resolver)依赖,与 Client.Api / Game.Api 的注册同口径 // 支付配置 schema 提供器(供 GamePaymentConfigService 在 admin 主机解析) services.AddScoped(); // 渠道退款管理器(C310 / GFX-718):四渠道统一 IRefundManager 契约;Payment.* 工程不在自动扫描范围,须显式注册 @@ -84,7 +83,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,15 +103,15 @@ public void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddHostedService(); // 平台密码策略运行时配置(C173):快照由启动加载器填充并镜像同步 CryptogramUtility 密码策略静态属性, - // TenantUserService.ChangePwdAsync 读镜像实现保存后同 Host 动态生效 + // UserService.ChangePwdAsync 读镜像实现保存后同 Host 动态生效 services.AddSingleton(); services.AddHostedService(); + // C406 / F3:新装首个业务管理员种子引导(角色 + 菜单授权 + 环境变量账号);须在密码策略加载之后注册 + services.AddHostedService(); // JWT services.AddHostedService(); // U6/C42:API 端点目录启动同步(端点登记→绑定迁移→自动隐藏按钮→预热权限缓存)。 services.AddHostedService(); - // C353 / GFX-773:套餐驱动的存量租户菜单权限自动同步(队列单例 + Applier 作用域 + 后台工作器)。 - // 注册顺序在 ApiEndpointCatalogSync 之后:Worker 启动扫描有目录就绪等待兜底,不依赖严格启动序。 services.AddPlatformJwt(); // 允许跨域(支持通过 CORS_ORIGINS 环境变量配置允许的域名列表,逗号分隔;未配置则允许所有来源) var corsOrigins = Environment.GetEnvironmentVariable("CORS_ORIGINS"); 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..d6eda2a0 100644 --- a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/DefaultObjectStorageAdapterFactory.cs +++ b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/DefaultObjectStorageAdapterFactory.cs @@ -4,8 +4,8 @@ namespace GameFrameX.ObjectStorage.Abstract; /// /// 默认对象存储 Adapter 工厂。按 Provider 名返回对应 Adapter 单例, -/// 并把租户配置(ConfigJson + 路径模板)解析为运行时上下文。 -/// 在 Web.Core/Startup.cs 以 AddSingleton 手动注册到 DI,供 TenantFileService 与 TestConnection 端点共用。 +/// 并把对象存储配置(ConfigJson + 路径模板)解析为运行时上下文。 +/// 在 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..4c308953 100644 --- a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/IObjectStorageAdapterFactory.cs +++ b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/IObjectStorageAdapterFactory.cs @@ -1,8 +1,8 @@ namespace GameFrameX.ObjectStorage.Abstract; /// -/// 对象存储 Adapter 工厂。按 Provider 名解析 Adapter,并把租户配置(ConfigJson + 路径模板) -/// 解析为运行时上下文。DI 注入;TenantFileService 与 TestConnection 端点共用此工厂。 +/// 对象存储 Adapter 工厂。按 Provider 名解析 Adapter,并把对象存储配置(ConfigJson + 路径模板) +/// 解析为运行时上下文。DI 注入;FileService 与 TestConnection 端点共用此工厂。 /// public interface IObjectStorageAdapterFactory { diff --git a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/ObjectStorageAdapterContext.cs b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/ObjectStorageAdapterContext.cs index 3d157af5..d7564037 100644 --- a/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/ObjectStorageAdapterContext.cs +++ b/GameFrameX.Admin.Unified.Api/ObjectStorage/GameFrameX.ObjectStorage.Abstract/ObjectStorageAdapterContext.cs @@ -1,7 +1,7 @@ namespace GameFrameX.ObjectStorage.Abstract; /// -/// 对象存储 Adapter 运行时上下文。由 Factory 从租户配置解析得到,承载 Provider 名、 +/// 对象存储 Adapter 运行时上下文。由 Factory 从对象存储配置解析得到,承载 Provider 名、 /// 反序列化后的 Option 实例、Bucket、公共访问域名与路径模板。 /// public sealed class ObjectStorageAdapterContext diff --git a/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.AliPay/AliPayOptionSetting.cs b/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.AliPay/AliPayOptionSetting.cs index a8ed3f0b..9875e79d 100644 --- a/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.AliPay/AliPayOptionSetting.cs +++ b/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.AliPay/AliPayOptionSetting.cs @@ -41,7 +41,7 @@ public class AliPayOptionSetting : IPaymentOptionSetting /// /// 异步通知地址。运行期由 PaymentOptionSettingProvider 按当前公开回调端点 /// (api/GameOrder/NotifyAliPay/{packageId})自动补全路由段:配置时只需填写站点根地址; - /// 完整新路由地址与旧「租户/应用/分包」三段地址会自动规范化,无法识别的地址下单时拒绝。 + /// 完整新路由地址可直接使用;旧「租户/应用/分包」三段地址不再重建(C406),无法识别的地址下单时拒绝。 /// [PaymentField(Label = "异步通知地址", Help = "填写站点根地址即可,系统自动追加回调路由段(含分包标识)")] public string AliPayNotifyUrl { get; set; } = null!; diff --git a/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatPayOptionSetting.cs b/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatPayOptionSetting.cs index 55141e85..306bec17 100644 --- a/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatPayOptionSetting.cs +++ b/GameFrameX.Admin.Unified.Api/Payment/GameFrameX.Payment.Wechat/WechatPayOptionSetting.cs @@ -48,7 +48,7 @@ public class WechatPayOptionSetting : IPaymentOptionSetting /// /// 支付结果回调通知地址。运行期由 PaymentOptionSettingProvider 按当前公开回调端点 /// (api/GameOrder/NotifyWeChatPay/{packageId})自动补全路由段:配置时只需填写站点根地址; - /// 完整新路由地址与旧「租户/应用/分包」三段地址会自动规范化,无法识别的地址下单时拒绝。 + /// 完整新路由地址可直接使用;旧「租户/应用/分包」三段地址不再重建(C406),无法识别的地址下单时拒绝。 /// [PaymentField(Label = "回调通知地址", Required = true, Help = "填写站点根地址即可,系统自动追加回调路由段(含分包标识)")] public string WechatPayNotifyUrl { get; set; } = null!; diff --git a/GameFrameX.Admin.Unified.Api/README.ja.md b/GameFrameX.Admin.Unified.Api/README.ja.md index e7112f99..d0589450 100644 --- a/GameFrameX.Admin.Unified.Api/README.ja.md +++ b/GameFrameX.Admin.Unified.Api/README.ja.md @@ -67,7 +67,7 @@ Client API と Hub API はどちらもより「スリム」です:Client API 1. **Service を書けば自動的に API が生える**(Admin API)。`IDynamicApiController` を実装すると、クラス内の public メソッドが自動的に REST エンドポイントになります。Controller を手書きしたり `[Route]` を手で貼ったりする必要はありません。これが Admin API の魂です。 2. **エンティティを書けば自動的にテーブルができる**。SqlSugar Code-First:起動時にエンティティクラスをスキャン → テーブル生成 → シードデータ投入。CREATE TABLE の SQL を 1 行も書かなくてよく、フィールドを変えたら再起動するだけでテーブル構造が追従します。 -3. **3 ホストは単一のメイン DB を共有**。リポジトリは `ConfigId=main` を使用し、ログインと業務データからテナント・アプリの軸を廃止。ソフトデリートと作成者ベースの権限は維持します。 +3. **3 ホストは単一のメイン DB を共有**。リポジトリは `ConfigId=main` を使用し、ログインと業務データにマルチ DB の軸はありません。ソフトデリートと作成者ベースの権限は維持します。 --- @@ -107,7 +107,7 @@ Admin API(20802) Client API(20808) Hub API(208 依存関係はこんな形です(左から右が参照方向): ``` -Web.Api → Web.Core → Application.{System, Game, Client, Tenant} → Core → Entity → Core.Enum +Web.Api → Web.Core → Application.{System, Game, Client, Business} → Core → Entity → Core.Enum Client.Api(独立、Entity + Payment のみ参照) Hub.Api(独立、Application.Game + Core + Entity を参照するが、Controller は Application Service を呼ばない) ``` @@ -134,7 +134,7 @@ GameFrameX.Admin.Unified.Api/ ├── GameFrameX.Application.System/ # システム管理サービス(ユーザー/ロール/メニュー/ログ…) ├── GameFrameX.Application.Game/ # ゲーム管理サービス(サーバー/注文/メール/引換コード…) ├── GameFrameX.Application.Client/ # クライアント管理サービス(バージョン/チャネル/リソースパッケージ…) -├── GameFrameX.Application.Tenant/ # 業務サービス(デバイス / デバイスグループ、プロジェクト名は後続で変更予定) +├── GameFrameX.Application.Business/ # 業務サービス(デバイス / デバイスグループ) ├── GameFrameX.Entity/ # エンティティ層(Base / System / Game / Client) ├── GameFrameX.Core/ # コア層(リポジトリ、サービス基底クラス、認証、SignalR) ├── GameFrameX.Core.Enum/ # 列挙型定義 @@ -176,13 +176,12 @@ GameFrameX.Admin.Unified.Api/ **本番 / コンテナ(PostgreSQL、環境変数でペア上書き)**:データベースを上書きする場合、タイプと接続文字列は必ず**ペアで**設定します。片方だけの上書きは起動時に即エラーになります。3 つの host(Web / Client / Hub)は**同じペアの変数**を使います: - `GFX_MAIN_DB_TYPE=PostgreSQL` + `GFX_MAIN_DB_CONNECTION_STRING=Host=...` -- 3 ホストは `ConfigId=main` のみを使用します。テナント DB の自動作成・導出は行いません。 +- 3 ホストは `ConfigId=main` のみを使用します。単一メイン DB がすべての DB であり、他の DB の自動作成・導出は行いません。 - 既存デプロイの素の `DbType` / `ConnectionString` 起動パラメータも引き続き使用可能(互換層)ですが、起動時に移行警告が出るので、早めに切り替えてください - 他のデータベース(MySQL / Oracle / 達夢……全 34 種の DbType)への切り替えの接続文字列の書き方と例:[`GameFrameX.Application/Configuration/Database-ConnectionStrings.md`](GameFrameX.Application/Configuration/Database-ConnectionStrings.md) データベースについて、他にも知っておくべき決まりがいくつかあります: -- **デフォルトのセルフホスト環境の移行**:書き込みを停止し両 DB をバックアップ後、`db/single-main/migrate-default-instance.sh --dry-run`、続いて `--execute` を実行します。`GFX_MIGRATION_DATABASE_TYPE`、`GFX_MIGRATION_SOURCE`、`GFX_MIGRATION_TARGET` を設定してください。複数テナント・複数アプリ・データ競合は拒否します。dry-run はロールバックされ、再実行は冪等です。 - **Compose 内蔵 PostgreSQL**。リポジトリルートで `docker compose up` を実行すると `postgres:16-alpine` が一緒に起動します(初回起動時に自動構築、`docker/postgres/init.sql` 参照、データはリポジトリルートの `postgres-data/` bind mount に保存)。ホスト側の既存 postgres コンテナを再利用する場合は、リポジトリルートの `.env` に `POSTGRES_HOST=host.docker.internal` などの変数を設定し、api サービスの `postgres` への `depends_on` を外すだけです。 - **3 つの host は同じデフォルト設定を共有**。Client / Hub は起動時に `Database.json` を自動ロードします(Admin と同一ソース、1 ヵ所変えれば 3 ヵ所に反映)。環境変数での上書き方法は compose と同一です。 @@ -288,7 +287,7 @@ public class MyService : ITransient, IDynamicApiController ### リポジトリと単一メイン DB -`SqlSugarRepository` は常にメイン接続(`ConfigId=main`)を使用します。エンティティ属性によるテナント DB 選択は廃止しました。 +`SqlSugarRepository` は常にメイン接続(`ConfigId=main`)を使用し、3 ホストが単一メイン DB を共有します。 ### 認証体系:JWT 共通+署名 @@ -320,7 +319,7 @@ SqlSugar AOP が `SqlSugarSetup.SetDbAop()` の中でこの仕事を代行しま | Insert | `CreatedTime`、`CreatedId`、`CreatedName` | | Update | `UpdateTime`、`UpdatedId`、`UpdatedName` | -同時に、データ変更を監査ログ(`SystemLogDiff` / `TenantLogDiff`)に書き込みます。エンティティを作るとき、監査フィールドの値は自分で入れなくてよく、フレームワークが埋めてくれます。 +同時に、データ変更を監査ログ(`SystemLogDiff` / `LogDiff`)に書き込みます。エンティティを作るとき、監査フィールドの値は自分で入れなくてよく、フレームワークが埋めてくれます。 ### スノーフレーク ID @@ -359,7 +358,7 @@ Admin API の `AdminResultProvider` がすべてのレスポンスに統一の ### SignalR リアルタイム通信 - Hub:`OnlineUserHub`、パス `/hubs/onlineUser` -- 接続は認証済みユーザーを使用し、テナント別メッセージグループは作成しません。 +- 接続は認証済みユーザーを使用します。 - できること:オンラインユーザー一覧、強制ログアウト、メッセージ送信(ユニキャスト / ブロードキャスト / 自分以外 / 特定ユーザー) - マルチインスタンスデプロイでは任意で Redis Backplane + Data Protection Key の永続化が可能で、メッセージをインスタンス横断でプッシュできる @@ -390,12 +389,12 @@ Hub API(`GameFrameX.Hub.Api`、ポート `20806`)は**外部システム** |------|----------|-----------|------| | ログインユーザー | JWT(各コントローラーが `[Authorize]` を明示) | 認証済みユーザー | コンテナ制御 / リソースバージョンの書き戻し | | 匿名 WebHook | - | - | このホストにコンパイル済み WebHook はありません | -| マシン間 | `[AllowAnonymous]` + `TenantGameAppOpenAccessAuthMiddleware` | 紐付くユーザー | `PackageBuildReportController` / `FeatureSwitchSyncController` | +| マシン間 | `[AllowAnonymous]` + オープンアクセス HMAC 認証ミドルウェア(マシン経路) | 紐付くユーザー | `PackageBuildReportController` / `FeatureSwitchSyncController` | マシン証憑の仕組みが検証するのは AccessKey + 署名 + scope で、**JWT ではありません**。だから Controller は `[AllowAnonymous]` で JWT をスキップし、専用ミドルウェアが引き受けます。 **4. メイン DB と認証情報に紐付くユーザー。** -JWT は認証済みユーザーを使用します。マシン経路は AccessKey、HMAC 署名、scope、失効状態、紐付くユーザーを検証し、テナントやアプリは選択しません。 +JWT は認証済みユーザーを使用します。マシン経路は AccessKey、HMAC 署名、scope、失効状態、紐付くユーザーを検証し、資格情報はユーザーに直接紐付きます。 **5. 楽観ロックミドルウェアとヘルスチェックを内蔵。** `OptimisticConcurrencyMiddleware` はパイプラインの先頭にいて、並行制御が必要な書き込み操作を下支えします。ヘルスチェックのエンドポイントは 3 つ:`/health`、`/health/live`、`/health/ready`(compose の liveness probe に使用)。 @@ -407,7 +406,7 @@ OptimisticConcurrencyMiddleware → Swagger(スイッチ制御) → CORS → Authentication → Authorization - → TenantGameAppOpenAccessAuthMiddleware(/api/PackageBuildReport / /api/FeatureSwitchSync) + → オープンアクセス HMAC 認証ミドルウェア(/api/PackageBuildReport / /api/FeatureSwitchSync) → HealthChecks / MapControllers ``` @@ -438,14 +437,14 @@ Admin API の独立した JSON 設定はすべて `GameFrameX.Application/Config | 機能 | サービスクラス | 説明 | |------|--------|--------| | 認証ログイン | `SystemAuthService` | アカウントとパスワードでのログイン、JWT 発行 + 自動更新、CAPTCHA | -| ユーザー管理 | `SystemUserService` | ユーザーの CRUD、パスワードリセット、ユーザー-ロール紐付け(注意:このサービスが実際に管理するのは `TenantUser`。命名は少しミスリード) | -| ロール管理 | `TenantRoleService` | ロール CRUD、データ範囲制御、ロール-メニュー権限紐付け | +| ユーザー管理 | `SystemUserService` | ユーザーの CRUD、パスワードリセット、ユーザー-ロール紐付け | +| ロール管理 | `RoleService` | ロール CRUD、データ範囲制御、ロール-メニュー権限紐付け | | メニュー権限 | `GlobalMenuService` | ツリー形式メニュー、ボタン単位の権限解決、ルートと API のマッピング | | 辞書管理 | `GlobalDictTypeService` / `GlobalDictDataService` | 辞書タイプと辞書値の CRUD、状態切替 | -| ファイル管理 | `TenantFileService` | ファイルのアップロード・ダウンロード、OSS オブジェクトストレージ | +| ファイル管理 | `FileService` | ファイルのアップロード・ダウンロード、OSS オブジェクトストレージ | | 定期ジョブ | `SystemJobService` | ジョブとトリガーの CRUD、一時停止 / 開始 / 即時実行、クラスタ協調 | | データベース管理 | `SystemDatabaseService` | テーブル / 列 CRUD、DB・テーブル構造のオンライン管理 | -| オンラインユーザー | `TenantOnlineUserService` | リアルタイムオンライン一覧、強制ログアウト、シングルサインオン | +| オンラインユーザー | `OnlineUserService` | リアルタイムオンライン一覧、強制ログアウト、シングルサインオン | | ログシステム | `LogOperationService` / `LogExceptionService` / `LogVisitService` / `LogDiffService` | 操作ログ、例外ログ、アクセスログ、データ変更監査、Excel エクスポート対応 | | キャッシュ管理 | `SystemCacheService` | 統一キャッシュ抽象(Memory / Redis)、キャッシュキー管理 | | システム設定 | `SystemConfigService` | キー・バリュー設定の CRUD | @@ -489,9 +488,9 @@ Admin API の独立した JSON 設定はすべて `GameFrameX.Application/Config | リソースパッケージ | `GameAppAssetPackageService` | AssetBundle / リソースパッケージ管理 | | リソースバージョン | `GameAppAssetPackageVersionService` | リソースパッケージのバージョン追跡 | | リソース履歴 | `GameAppAssetPackageVersionHistoryService` | リソースバージョンの変更履歴 | -| チャネル定義 | `GlobalChannelDefinitionService` / `TenantChannelDefinitionService` | 配信チャネル(App Store、Google Play など) | -| デバイス管理 | `TenantDeviceService` | デバイスの登録と識別(`Application.Tenant` にある) | -| デバイスグループ | `TenantDeviceGroupService` | デバイスのグルーピング(カナリア / A/B テスト、`Application.Tenant` にある) | +| チャネル定義 | `GlobalChannelDefinitionService` / `ChannelDefinitionService` | 配信チャネル(App Store、Google Play など) | +| デバイス管理 | `DeviceService` | デバイスの登録と識別(`Application.Business` にある) | +| デバイスグループ | `DeviceGroupService` | デバイスのグルーピング(カナリア / A/B テスト、`Application.Business` にある) | | 多言語 | `GlobalLanguageService` | 対応言語の設定 | | 分割パッケージ管理 | `GameAppPackageService` | アプリの分割パッケージ、チャネル紐付けとベースパッケージ継承の管理 | | プラットフォーム管理 | `GlobalPlatformService` | 実行プラットフォーム(iOS、Android など) | @@ -552,7 +551,7 @@ public class GameItemEntity : EntityBasic | 基底クラス | 特徴 | 適用シーン | |------|------|----------| -| `EntityBaseId` | `Id` のみ | 紐付けテーブル、テナントなしエンティティ | +| `EntityBaseId` | `Id` のみ | 紐付けテーブル、作成者 / 監査カラムなしのエンティティ | | `EntityBase` | Id + 監査フィールド + ソフトデリート | メイン DB のエンティティ | | `EntityBasic` | `EntityBase` を継承 | 汎用ビジネスエンティティ(最頻出) | | `EntityBasicData` | 作成者ベースのデータ権限 | `CreatedId` でフィルタ | @@ -579,7 +578,7 @@ public class GameItemSeedData : ISqlSugarEntitySeedData ### 3. Service を書く -`GameFrameX.Application.Game/Service/`(または System / Client / Tenant)配下にサービスを作成します: +`GameFrameX.Application.Game/Service/`(または System / Client / Business)配下にサービスを作成します: ```csharp [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] @@ -729,7 +728,7 @@ SuperAdmin の権限バイパスは維持します。全ホストがメイン DB Hub は Admin の JWT 鍵を再利用しますが、読むのは自分の `appsettings.json` の `JWTSettings` ノードです。両側の鍵(`IssuerSigningKey` / `ValidIssuer` / `ValidAudience`)は一致が必須。不一致だと発行された token を互いに受理しません。 **ビルド報告(PackageBuildReport)が 401?** -マシン経路は `TenantGameAppOpenAccessAuthMiddleware` で AccessKey、HMAC 署名、scope、紐付くユーザーを検証します。 +マシン経路はオープンアクセス HMAC 認証ミドルウェアで AccessKey、HMAC 署名、scope、紐付くユーザーを検証します。 ### ハマりポイント @@ -772,13 +771,26 @@ cd .. && docker compose up --build # 統一オーケストレーションは > 命名の経緯:compose サービスはかつて `web-entry` という名前(旧 "Web.Entry" を踏襲)でしたが、2026-10-20 に `web-api` へ改名され、GameFrameX.Web.Api と揃えられました。 +### 初回デプロイ:超管パスワードと最初の業務管理者 + +空の DB での初回起動時、web-api はテーブル作成とシード処理の後に「最初の業務管理者シードブートストラップ」(C406 / F3)を実行します。2 つの初期アカウントはそれぞれ別の環境変数で与え、役割が異なります: + +| 環境変数 | 役割 | 有効条件 | +|---|---|---| +| `GFX_SUPERADMIN_INITIAL_PASSWORD` | プラットフォーム超管 `superadmin` の初期パスワード。未設定の場合はパスワードが空のままとなり、ログインページ初回アクセス時に初回セットアップウィザードで設定します | 初回インストール時のシード挿入時のみ | +| `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD` | **最初の業務管理者**のアカウントと初期パスワード。起動時に自動作成され、内蔵 `sys_admin` ロールにバインドされます(超管専用サブツリーを除く全ノン超管メニューを付与)。以後このアカウントで業務管理画面にログインできます | 2 つの変数をペアで設定し、かつメイン DB に業務管理者アカウントがまだ存在しないこと。パスワードはプラットフォームの強度ポリシーを満たす必要があり、満たさない場合は起動が失敗します | + +冪等性:アカウントが既に存在する場合は再作成せずパスワードも上書きしません。`sys_admin` のメニュー付与は起動のたびに新規シードメニューの追加のみを行い、既存の付与を削除しません(運営がロール管理で手動で絞り込んでも再起動で元に戻されることはありません)。両方の変数未設定かつ業務管理者が存在しない場合、起動ログに「業務管理者が未初期化」の警告を出力します。ログにパスワードが出力されることはありません。 + +> パスワード強度:新規インストールではプラットフォームのパスワードポリシーが**既定で無効**(`strongPassword=false`)のため、2 つの初期アカウントのパスワードは強度チェックされません。有効化すると 6–16 文字で大文字・小文字・数字・記号をすべて含むことが必須になります。初期パスワードはこの規則(12 文字以上)で設定し、サービス公開前にポリシーを有効化してください。 + ### リリース前チェックリスト:DB 再投入とコンパクト短 ID -この節は 2026-09-15 の旧ロング ID から短い ID への移行のみを説明し、データ変換スクリプトはありません。短い ID を使用中のデフォルト環境は、前述の単一メイン DB 移行を利用できます。このツールは旧ロング ID を変換しません。 +この節は 2026-09-15 の旧ロング ID から短い ID への移行のみを説明し、データ変換スクリプトはありません。C406 以降は移行ツール自体を提供しません。2.0 は単一メイン DB の新規初期化のみサポートし、旧 DB はリリース前の完全バックアップによる全体ロールバックでのみ復元できます。 -コンパクト短 ID レイアウトのリリース方針は**リセット可能、移行スクリプトなし**(2026-09-15 決定):新旧の ID レイアウトは非互換で、本番 PG のメイン DB / テナント DB は「全消し再投入」でリリースし、新旧 ID の混在は許されません。リリース前に以下を確認: +コンパクト短 ID レイアウトのリリース方針は**リセット可能、移行スクリプトなし**(2026-09-15 決定):新旧の ID レイアウトは非互換で、本番 PG のメイン DB は「全消し再投入」でリリースし、新旧 ID の混在は許されません。リリース前に以下を確認: -1. **全消し再投入**:本番 PG メイン DB + 全テナント DB を空にし、各 host の起動で再構築(CodeFirst によるテーブル作成 + シード再投入)。旧 DB の 18〜19 桁のロング Id データを新レイアウトへ移行しないこと——新旧 Id 空間の重複はデータ整合性事故です。 +1. **全消し再投入**:本番 PG メイン DB を空にし、各 host の起動で再構築(CodeFirst によるテーブル作成 + シード再投入)。旧 DB の 18〜19 桁のロング Id データを新レイアウトへ移行しないこと——新旧 Id 空間の重複はデータ整合性事故です。 2. **WorkerId 相互排他の確認**:同じ DB に書き込むすべてのインスタンス(Web.Api レプリカ / Hub / Client)の `SnowFlake__WorkerId` が互いに異なり 0-7 の範囲内であること。デフォルト値 1/2/3 は単一マシン構成での非衝突しか保証しません。レプリカを増やす前に必ず明示的に割り当ててください。 3. **桁数の抜き取りチェック**:再投入後、業務テーブルの主キーを抜き取り、13〜14 桁の数値(< 2^53)であることを確認。18〜19 桁が見えたら Foundation の採番を通っていない経路があるので、停止して調査してください。 diff --git a/GameFrameX.Admin.Unified.Api/README.ko.md b/GameFrameX.Admin.Unified.Api/README.ko.md index 905e76f3..5c6615cf 100644 --- a/GameFrameX.Admin.Unified.Api/README.ko.md +++ b/GameFrameX.Admin.Unified.Api/README.ko.md @@ -67,7 +67,7 @@ Client API와 Hub API는 더 "가볍습니다": Client API는 Entity + Payment 1. **Service를 작성하면 API가 자동 생성됩니다**(Admin API). `IDynamicApiController`를 구현하면 클래스의 public 메서드가 자동으로 REST 엔드포인트가 되어, Controller를 직접 작성하거나 `[Route]`를 붙일 필요가 없습니다. Admin API의 핵심입니다. 2. **엔티티를 작성하면 테이블이 자동 생성됩니다**. SqlSugar Code-First: 시작 시 엔티티 클래스를 스캔 → 테이블 생성 → 시드 데이터 입력. 한 줄의 DDL도 작성할 필요가 없으며, 필드를 수정하고 재시작하면 테이블 구조가 따라옵니다. -3. **세 호스트가 단일 메인 DB를 공유합니다**. 리포지토리는 `ConfigId=main`을 사용하며 로그인과 업무 데이터에서 테넌트와 앱 차원을 제거했습니다. 소프트 삭제와 생성자 데이터 권한은 유지됩니다. +3. **세 호스트가 단일 메인 DB를 공유합니다**. 리포지토리는 `ConfigId=main`을 사용하며 로그인과 업무 데이터에 다중 DB 차원이 없습니다. 소프트 삭제와 생성자 데이터 권한은 유지됩니다. --- @@ -107,7 +107,7 @@ Admin API(20802) Client API(20808) Hub API(208 의존 관계는 다음과 같습니다(왼쪽에서 오른쪽이 참조 방향): ``` -Web.Api → Web.Core → Application.{System, Game, Client, Tenant} → Core → Entity → Core.Enum +Web.Api → Web.Core → Application.{System, Game, Client, Business} → Core → Entity → Core.Enum Client.Api(독립, Entity + Payment만 참조) Hub.Api(독립, Application.Game + Core + Entity 참조, 단 Controller는 Application Service를 호출하지 않음) ``` @@ -134,7 +134,7 @@ GameFrameX.Admin.Unified.Api/ ├── GameFrameX.Application.System/ # 시스템 관리 서비스(사용자/역할/메뉴/로그...) ├── GameFrameX.Application.Game/ # 게임 관리 서비스(구역 서버/주문/메일/교환 코드...) ├── GameFrameX.Application.Client/ # 클라이언트 관리 서비스(버전/채널/리소스 패키지...) -├── GameFrameX.Application.Tenant/ # 업무 서비스(기기 / 기기 그룹, 프로젝트 이름은 후속 단계에서 변경) +├── GameFrameX.Application.Business/ # 업무 서비스(기기 / 기기 그룹) ├── GameFrameX.Entity/ # 엔티티 계층(Base / System / Game / Client) ├── GameFrameX.Core/ # 핵심 계층(리포지토리, 서비스 기본 클래스, 인증, SignalR) ├── GameFrameX.Core.Enum/ # 열거형 정의 @@ -176,13 +176,12 @@ GameFrameX.Admin.Unified.Api/ **프로덕션 / 컨테이너(PostgreSQL, 환경 변수 쌍으로 오버라이드)**: 데이터베이스를 오버라이드할 때는 타입과 연결 문자열을 반드시 **쌍으로** 설정해야 하며, 절반만 설정하면 시작 시 바로 오류가 발생합니다. 세 개의 host(Web / Client / Hub)는 **동일한 변수 쌍**을 사용합니다: - `GFX_MAIN_DB_TYPE=PostgreSQL` + `GFX_MAIN_DB_CONNECTION_STRING=Host=...` -- 세 호스트는 `ConfigId=main`만 사용하며 테넌트 DB를 자동 생성하거나 유도하지 않습니다. +- 세 호스트는 `ConfigId=main`만 사용하며, 단일 메인 DB가 전부입니다. 다른 DB를 자동 생성하거나 유도하지 않습니다. - 기존 배포의 `DbType` / `ConnectionString` 시작 파라미터도 여전히 사용 가능(호환 계층), 시작 시 마이그레이션 경고가 출력되므로 빠르게 전환하세요 - 다른 데이터베이스(MySQL / Oracle / DM…… 전체 34종 DbType)로 전환하는 연결 문자열 작성법과 예시: [`GameFrameX.Application/Configuration/Database-ConnectionStrings.md`](GameFrameX.Application/Configuration/Database-ConnectionStrings.md) 데이터베이스에 대해 알아야 할 몇 가지 규칙: -- **기본 자체 호스팅 인스턴스 업그레이드**: 쓰기를 중지하고 두 DB를 백업한 뒤 `db/single-main/migrate-default-instance.sh --dry-run`, 이후 `--execute`를 실행하세요. `GFX_MIGRATION_DATABASE_TYPE`, `GFX_MIGRATION_SOURCE`, `GFX_MIGRATION_TARGET`을 설정합니다. 여러 테넌트, 여러 앱, 데이터 충돌은 거부하며 dry-run은 롤백되고 반복 실행은 멱등입니다. - **Compose에 PostgreSQL 내장**. 리포지토리 루트에서 `docker compose up` 실행 시 `postgres:16-alpine`이 자동으로 시작됨(첫 시작 시 자동 DB 생성, `docker/postgres/init.sql` 참조, 데이터는 리포지토리 루트 `postgres-data/` bind mount에 저장). 호스트의 기존 postgres 컨테이너를 재사용하려면 리포지토리 루트 `.env`에 `POSTGRES_HOST=host.docker.internal` 등 변수를 설정하고 api 서비스의 `postgres`에 대한 `depends_on`을 제거하면 됩니다. - **세 개의 host가 동일한 기본 구성을 공유**. Client / Hub 시작 시 `Database.json`을 자동으로 로드(Admin과 동일한 소스, 한 곳 수정 시 세 곳에 적용); 환경 변수 오버라이드 방식은 compose와 일치. @@ -288,7 +287,7 @@ public class MyService : ITransient, IDynamicApiController ### 리포지토리와 단일 메인 DB -`SqlSugarRepository`는 항상 메인 연결(`ConfigId=main`)을 사용합니다. 엔티티 특성으로 테넌트 DB를 선택하지 않습니다. +`SqlSugarRepository`는 항상 메인 연결(`ConfigId=main`)을 사용하며 세 호스트가 단일 메인 DB를 공유합니다. ### 인증 체계: JWT 공유 + 서명 @@ -320,7 +319,7 @@ SqlSugar AOP가 `SqlSugarSetup.SetDbAop()`에서 이 작업을 처리합니다: | Insert | `CreatedTime`, `CreatedId`, `CreatedName` | | Update | `UpdateTime`, `UpdatedId`, `UpdatedName` | -동시에 데이터 변경 사항을 감사 로그(`SystemLogDiff` / `TenantLogDiff`)에 기록합니다. 따라서 엔티티를 만들 때 감사 필드를 직접 할당할 필요 없이 프레임워크가 채워줍니다. +동시에 데이터 변경 사항을 감사 로그(`SystemLogDiff` / `LogDiff`)에 기록합니다. 따라서 엔티티를 만들 때 감사 필드를 직접 할당할 필요 없이 프레임워크가 채워줍니다. ### 스노우플레이크 ID @@ -359,7 +358,7 @@ Admin API의 `AdminResultProvider`가 모든 응답을 통일된 형식으로 ### SignalR 실시간 통신 - Hub: `OnlineUserHub`, 경로 `/hubs/onlineUser` -- 연결은 인증된 사용자 식별자를 사용하며 테넌트별 메시지 그룹은 생성하지 않습니다. +- 연결은 인증된 사용자 식별자를 사용합니다. - 가능한 기능: 온라인 사용자 목록, 강제 로그아웃, 메시지 발송(유니캐스트 / 브로드캐스트 / 자신 제외 / 특정 사용자 지정) - 다중 인스턴스 배포 시 선택적 Redis Backplane + Data Protection Key 영속화로 메시지를 인스턴스 간에 푸시 @@ -390,12 +389,12 @@ Hub API(`GameFrameX.Hub.Api`, 포트 `20806`)는 **외부 시스템**을 위한 |------|----------|-----------|------| | 로그인 사용자 | JWT(각 컨트롤러에 `[Authorize]` 명시) | 인증된 사용자 | 컨테이너 관리 / 리소스 버전 기록 | | 익명 WebHook | - | - | 이 호스트에 컴파일된 WebHook 없음 | -| 머신 간 | `[AllowAnonymous]` + `TenantGameAppOpenAccessAuthMiddleware` | 연결된 사용자 | `PackageBuildReportController` / `FeatureSwitchSyncController` | +| 머신 간 | `[AllowAnonymous]` + 오픈 액세스 HMAC 인증 미들웨어(머신 채널) | 연결된 사용자 | `PackageBuildReportController` / `FeatureSwitchSyncController` | 머신 자격 증명 방식은 AccessKey + 서명 + scope를 검증하며 **JWT가 아닙니다**. 따라서 Controller에 `[AllowAnonymous]`를 표시해 JWT를 건너뛰고, 전용 미들웨어가 처리합니다. **4. 메인 DB와 자격 증명에 연결된 사용자.** -JWT 요청은 인증된 사용자를 사용합니다. 머신 요청은 AccessKey, HMAC 서명, scope, 폐기 상태, 연결된 사용자를 검증하며 테넌트나 앱을 선택하지 않습니다. +JWT 요청은 인증된 사용자를 사용합니다. 머신 요청은 AccessKey, HMAC 서명, scope, 폐기 상태, 연결된 사용자를 검증하며 자격 증명은 사용자에게 직접 연결됩니다. **5. 자체 낙관적 잠금 미들웨어와 헬스 체크 내장.** `OptimisticConcurrencyMiddleware`가 파이프라인 맨 앞에 있어 동시성 제어가 필요한 쓰기 작업의 안전망이 됩니다. 헬스 체크 엔드포인트는 3개: `/health`, `/health/live`, `/health/ready`(compose가 생존 프로브로 사용). @@ -407,7 +406,7 @@ OptimisticConcurrencyMiddleware → Swagger(스위치 제어) → CORS → Authentication → Authorization - → TenantGameAppOpenAccessAuthMiddleware(/api/PackageBuildReport / /api/FeatureSwitchSync) + → 오픈 액세스 HMAC 인증 미들웨어(/api/PackageBuildReport / /api/FeatureSwitchSync) → HealthChecks / MapControllers ``` @@ -438,14 +437,14 @@ Admin API의 독립 JSON 구성은 모두 `GameFrameX.Application/Configuration/ | 기능 | 서비스 클래스 | 설명 | |------|--------|--------| | 인증 로그인 | `SystemAuthService` | 계정 비밀번호 로그인, JWT 발급 + 자동 갱신, 캡차 | -| 사용자 관리 | `SystemUserService` | 사용자 CRUD, 비밀번호 초기화, 사용자-역할 바인딩(주의: 이 서비스가 실제로 관리하는 것은 `TenantUser`이며, 명명이 다소 오해의 소지가 있음) | -| 역할 관리 | `TenantRoleService` | 역할 CRUD, 데이터 범위 제어, 역할-메뉴 권한 바인딩 | +| 사용자 관리 | `SystemUserService` | 사용자 CRUD, 비밀번호 초기화, 사용자-역할 바인딩 | +| 역할 관리 | `RoleService` | 역할 CRUD, 데이터 범위 제어, 역할-메뉴 권한 바인딩 | | 메뉴 권한 | `GlobalMenuService` | 트리 메뉴, 버튼 수준 권한 파싱, 라우팅과 API 매핑 | | 사전 관리 | `GlobalDictTypeService` / `GlobalDictDataService` | 사전 타입과 사전 값 CRUD, 상태 전환 | -| 파일 관리 | `TenantFileService` | 파일 업로드/다운로드, OSS 객체 스토리지 | +| 파일 관리 | `FileService` | 파일 업로드/다운로드, OSS 객체 스토리지 | | 정기 작업 | `SystemJobService` | 작업과 트리거 CRUD, 일시 정지 / 시작 / 즉시 실행, 클러스터 조율 | | 데이터베이스 관리 | `SystemDatabaseService` | 테이블 / 컬럼 CRUD, DB 테이블 구조 온라인 관리 | -| 온라인 사용자 | `TenantOnlineUserService` | 실시간 온라인 목록, 강제 로그아웃, 싱글 사인온 | +| 온라인 사용자 | `OnlineUserService` | 실시간 온라인 목록, 강제 로그아웃, 싱글 사인온 | | 로그 시스템 | `LogOperationService` / `LogExceptionService` / `LogVisitService` / `LogDiffService` | 작업 로그, 예외 로그, 접속 로그, 데이터 변경 감사, Excel 내보내기 지원 | | 캐시 관리 | `SystemCacheService` | 통일 캐시 추상화(Memory / Redis), 캐시 키 관리 | | 시스템 구성 | `SystemConfigService` | 키-값 쌍 구성 CRUD | @@ -489,9 +488,9 @@ Admin API의 독립 JSON 구성은 모두 `GameFrameX.Application/Configuration/ | 리소스 패키지 | `GameAppAssetPackageService` | AssetBundle / 리소스 패키지 관리 | | 리소스 버전 | `GameAppAssetPackageVersionService` | 리소스 패키지 버전 추적 | | 리소스 이력 | `GameAppAssetPackageVersionHistoryService` | 리소스 버전 변경 기록 | -| 채널 정의 | `GlobalChannelDefinitionService` / `TenantChannelDefinitionService` | 배포 채널(App Store, Google Play 등) | -| 기기 관리 | `TenantDeviceService` | 기기 등록과 식별(`Application.Tenant`에 위치) | -| 기기 그룹 | `TenantDeviceGroupService` | 기기 그룹(그레이스케일 / A/B 테스트, `Application.Tenant`에 위치) | +| 채널 정의 | `GlobalChannelDefinitionService` / `ChannelDefinitionService` | 배포 채널(App Store, Google Play 등) | +| 기기 관리 | `DeviceService` | 기기 등록과 식별(`Application.Business`에 위치) | +| 기기 그룹 | `DeviceGroupService` | 기기 그룹(그레이스케일 / A/B 테스트, `Application.Business`에 위치) | | 다국어 | `GlobalLanguageService` | 지원 언어 구성 | | 분할 패키지 관리 | `GameAppPackageService` | 앱 분할 패키지, 채널 바인딩과 마스터 패키지 상속 관리 | | 플랫폼 관리 | `GlobalPlatformService` | 실행 플랫폼(iOS, Android 등) | @@ -552,7 +551,7 @@ public class GameItemEntity : EntityBasic | 기본 클래스 | 특징 | 적용 시나리오 | |------|------|----------| -| `EntityBaseId` | `Id`만 있음 | 연결 테이블, 테넌트 없는 엔티티 | +| `EntityBaseId` | `Id`만 있음 | 연결 테이블, 생성자/감사 열 없는 엔티티 | | `EntityBase` | Id + 감사 필드 + 소프트 삭제 | 메인 DB 엔티티 | | `EntityBasic` | `EntityBase` 상속 | 범용 비즈니스 엔티티(가장 많이 사용) | | `EntityBasicData` | 생성자 데이터 권한 | `CreatedId`로 필터링 | @@ -579,7 +578,7 @@ public class GameItemSeedData : ISqlSugarEntitySeedData ### 3. Service 작성 -`GameFrameX.Application.Game/Service/`(또는 System / Client / Tenant) 아래에 서비스를 생성합니다: +`GameFrameX.Application.Game/Service/`(또는 System / Client / Business) 아래에 서비스를 생성합니다: ```csharp [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] @@ -729,7 +728,7 @@ SuperAdmin의 권한 우회는 유지됩니다. 모든 호스트는 메인 DB를 Hub는 Admin의 JWT 키를 재사용하지만, 자체 `appsettings.json`의 `JWTSettings` 노드를 읽습니다. 양쪽 키(`IssuerSigningKey` / `ValidIssuer` / `ValidAudience`)가 반드시 일치해야 합니다. 불일치하면 발급된 token을 서로 인정하지 않습니다. **빌드 보고(PackageBuildReport)에서 401?** -머신 채널은 `TenantGameAppOpenAccessAuthMiddleware`에서 AccessKey, HMAC 서명, scope, 연결된 사용자를 검증합니다。 +머신 채널은 오픈 액세스 HMAC 인증 미들웨어에서 AccessKey, HMAC 서명, scope, 연결된 사용자를 검증합니다。 ### 함정 @@ -772,13 +771,26 @@ cd .. && docker compose up --build # 통합 오케스트레이션은 리포지 > 역사적 명명: compose 서비스명은 과거 `web-entry`(구버전 "Web.Entry"에서 유래)였으나, 2026-10-20부터 `web-api`로 변경되어 GameFrameX.Web.Api와 정렬되었습니다. +### 최초 배포: Superadmin 비밀번호와 첫 번째 업무 관리자 + +빈 데이터베이스로 최초 기동 시, web-api는 테이블 생성과 시드 처리 후 "첫 번째 업무 관리자 시드 부트스트랩"(C406 / F3)을 실행합니다. 두 개의 초기 계정은 서로 다른 환경 변수로 지정하며 역할이 다릅니다: + +| 환경 변수 | 역할 | 적용 조건 | +|---|---|---| +| `GFX_SUPERADMIN_INITIAL_PASSWORD` | 플랫폼 superadmin `superadmin`의 초기 비밀번호. 설정하지 않으면 비밀번호가 비어 있고, 로그인 페이지 첫 접속 시 초기 설치 마법사에서 설정합니다 | 최초 설치 시드 삽입 시에만 | +| `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD` | **첫 번째 업무 관리자** 계정과 초기 비밀번호. 기동 시 자동 생성되어 내장 `sys_admin` 역할에 바인딩됩니다(superadmin 전용 하위 트리를 제외한 모든 non-superadmin 메뉴 부여). 이후 이 계정으로 업무 관리 화면에 로그인할 수 있습니다 | 두 변수를 쌍으로 설정하고, 메인 DB에 업무 관리자 계정이 아직 없어야 합니다. 비밀번호는 플랫폼 강도 정책을 충족해야 하며, 충족하지 않으면 기동이 실패합니다 | + +멱등성: 계정이 이미 존재하면 재생성하지 않고 비밀번호도 덮어쓰지 않습니다. `sys_admin`의 메뉴 부여는 매 기동마다 새로 추가된 시드 메뉴만 보강하고 기존 부여를 삭제하지 않습니다(운영이 역할 관리에서 수동으로 축소해도 재시작 후 되돌려지지 않음). 두 변수 모두 설정되지 않았고 업무 관리자가 없으면, 기동 로그에 "업무 관리자가 초기화되지 않음" 경고를 출력합니다. 어떤 로그에도 비밀번호가 출력되지 않습니다. + +> 비밀번호 강도: 신규 설치에서는 플랫폼 비밀번호 정책이 **기본적으로 꺼져**(`strongPassword=false`) 있으므로 두 초기 계정의 비밀번호는 강도 검사를 받지 않습니다. 활성화하면 6–16자에 대문자·소문자·숫자·특수문자를 모두 포함해야 합니다. 초기 비밀번호를 이 규칙(12자 이상)으로 설정하고 서비스 공개 전에 정책을 켜세요. + ### 출시 전 체크리스트: 데이터베이스 재적재와 컴팩트 숏 ID -이 절은 2026-09-15의 기존 긴 ID에서 짧은 ID로의 전환만 설명하며 데이터 변환 스크립트는 없습니다. 이미 짧은 ID를 사용하는 기본 인스턴스는 위의 단일 메인 DB 마이그레이션을 사용할 수 있습니다. 이 도구는 기존 긴 ID를 변환하지 않습니다. +이 절은 2026-09-15의 기존 긴 ID에서 짧은 ID로의 전환만 설명하며 데이터 변환 스크립트는 없습니다. C406부터는 마이그레이션 도구 자체를 제공하지 않습니다. 2.0은 단일 메인 DB의 신규 초기화만 지원하며, 기존 DB는 릴리스 전 전체 백업으로만 롤백할 수 있습니다. -컴팩트 숏 ID 레이아웃의 출시 방침은 **리셋 가능, 마이그레이션 스크립트 없음**입니다(2026-09-15 결정): 신규/기존 ID 레이아웃은 호환되지 않으므로, 프로덕션 PG 메인 DB / 테넌트 DB는 "비우고 재적재" 방식으로 출시하며, 신규/기존 ID 혼재 쓰기를 허용하지 않습니다. 출시 전에 확인하세요: +컴팩트 숏 ID 레이아웃의 출시 방침은 **리셋 가능, 마이그레이션 스크립트 없음**입니다(2026-09-15 결정): 신규/기존 ID 레이아웃은 호환되지 않으므로, 프로덕션 PG 메인 DB는 "비우고 재적재" 방식으로 출시하며, 신규/기존 ID 혼재 쓰기를 허용하지 않습니다. 출시 전에 확인하세요: -1. **비우고 재적재**: 프로덕션 PG 메인 DB + 전체 테넌트 DB를 비우고, 각 host 시작 시 재구축(CodeFirst 테이블 생성 + 시드 데이터 재적재). 기존 DB의 18-19자리 긴 Id 데이터를 새 레이아웃으로 마이그레이션하지 마세요——신규/기존 Id 공간 중복은 데이터 무결성 사고입니다. +1. **비우고 재적재**: 프로덕션 PG 메인 DB를 비우고, 각 host 시작 시 재구축(CodeFirst 테이블 생성 + 시드 데이터 재적재). 기존 DB의 18-19자리 긴 Id 데이터를 새 레이아웃으로 마이그레이션하지 마세요——신규/기존 Id 공간 중복은 데이터 무결성 사고입니다. 2. **WorkerId 상호 배제 확인**: 동일한 DB에 쓰는 모든 인스턴스(Web.Api 복제본 / Hub / Client)의 `SnowFlake__WorkerId`가 서로 다르고 0-7 범위 내인지 확인. 기본값 1/2/3은 단일 머신 배포에서만 충돌이 없음을 보장; 복제본 확장 전에 반드시 명시적으로 할당하세요. 3. **규모 샘플 검사**: 재적재 후 비즈니스 테이블의 기본 키를 샘플링하면 13-14자리 숫자여야 합니다(< 2^53). 18-19자리가 보이면 Foundation 발급 경로를 벗어난 것이므로 중단하고 조사하세요. diff --git a/GameFrameX.Admin.Unified.Api/README.md b/GameFrameX.Admin.Unified.Api/README.md index b5a6931e..39456cd0 100644 --- a/GameFrameX.Admin.Unified.Api/README.md +++ b/GameFrameX.Admin.Unified.Api/README.md @@ -67,7 +67,7 @@ Client API and Hub API are both "leaner": Client API only references Entity + Pa 1. **Write a Service and you get APIs for free** (Admin API). Implement `IDynamicApiController`, and the public methods in your class automatically become REST endpoints — no hand-written Controllers, no hand-pasted `[Route]`. This is the soul of Admin API. 2. **Write an entity and tables get created for free**. SqlSugar Code-First: at startup it scans entity classes → creates tables → fills seed data. You never write a line of DDL SQL; change a field, restart, and the table schema catches up. -3. **One main database for all hosts**. Repositories use `ConfigId=main`; login and business data have no tenant or application dimension. Soft deletion and creator data permissions remain. +3. **One main database for all hosts**. Repositories use `ConfigId=main`; login and business data have no multi-database dimension. Soft deletion and creator data permissions remain. --- @@ -107,7 +107,7 @@ Admin API (20802) Client API (20808) Hub API (20806) The dependency graph looks like this (arrows point left to right, i.e. reference direction): ``` -Web.Api → Web.Core → Application.{System, Game, Client, Tenant} → Core → Entity → Core.Enum +Web.Api → Web.Core → Application.{System, Game, Client, Business} → Core → Entity → Core.Enum Client.Api (independent, only references Entity + Payment) Hub.Api (independent, references Application.Game + Core + Entity, but its Controllers do not call Application Services) ``` @@ -134,7 +134,7 @@ GameFrameX.Admin.Unified.Api/ ├── GameFrameX.Application.System/ # System management services (users/roles/menus/logs...) ├── GameFrameX.Application.Game/ # Game management services (zones/orders/mails/redeem codes...) ├── GameFrameX.Application.Client/ # Client management services (versions/channels/asset packages...) -├── GameFrameX.Application.Tenant/ # Business services (devices / device groups; legacy project name) +├── GameFrameX.Application.Business/ # Business services (devices / device groups) ├── GameFrameX.Entity/ # Entity layer (Base / System / Game / Client) ├── GameFrameX.Core/ # Core layer (repositories, service base classes, auth, SignalR) ├── GameFrameX.Core.Enum/ # Enum definitions @@ -176,13 +176,12 @@ Note: SQLite is for local development/debugging only. SQLite is forbidden in liv **Production / containers (PostgreSQL, override env vars in pairs)**: when overriding the database, the type and the connection string must be set **as a pair**; a half override fails outright at startup. All three hosts (Web / Client / Hub) use **the same pair of variables**: - `GFX_MAIN_DB_TYPE=PostgreSQL` + `GFX_MAIN_DB_CONNECTION_STRING=Host=...` -- All three hosts use only `ConfigId=main`. There is no automatic tenant database creation or derivation. +- All three hosts use only `ConfigId=main`; the single main database is the entire database estate — no other databases are created or derived. - The legacy bare `DbType` / `ConnectionString` startup parameters still work (compatibility layer); startup prints a migration warning — switch soon - For other databases (MySQL / Oracle / DM… all 34 DbTypes), connection string syntax and examples: [`GameFrameX.Application/Configuration/Database-ConnectionStrings.md`](GameFrameX.Application/Configuration/Database-ConnectionStrings.md) A few more database conventions worth knowing: -- **Upgrade a default self-hosted instance**: stop writes and back up both databases, then run `db/single-main/migrate-default-instance.sh --dry-run` before `--execute`. Set `GFX_MIGRATION_DATABASE_TYPE`, `GFX_MIGRATION_SOURCE`, and `GFX_MIGRATION_TARGET`. The tool rejects multiple tenants/applications and conflicting data; dry-run rolls back, and repeated execution is idempotent. - **Compose ships PostgreSQL**. Running `docker compose up` from the repository root starts a `postgres:16-alpine` (first startup creates the databases automatically, see `docker/postgres/init.sql`; data lands in the repository root `postgres-data/` bind mount). To reuse an existing postgres container on the host, set `POSTGRES_HOST=host.docker.internal` etc. in the repository root `.env` and remove the api services' `depends_on` on `postgres`. - **All three hosts read the same default config**. Client / Hub automatically load `Database.json` at startup (same source as Admin; change it once and all three pick it up); environment variable overrides work the same way as compose. @@ -288,7 +287,7 @@ Infrastructure components (SqlSugar, JWT, SignalR, EventBus and friends) are reg ### Repositories and the Main Database -`SqlSugarRepository` always uses the main connection (`ConfigId=main`). Entity attributes no longer select a tenant database. +`SqlSugarRepository` always uses the main connection (`ConfigId=main`); all three hosts share the single main database. ### Authentication: Shared JWT, Plus Signatures @@ -320,7 +319,7 @@ SqlSugar AOP does this for you in `SqlSugarSetup.SetDbAop()`: | Insert | `CreatedTime`, `CreatedId`, `CreatedName` | | Update | `UpdateTime`, `UpdatedId`, `UpdatedName` | -It also writes data changes into the audit log (`SystemLogDiff` / `TenantLogDiff`) along the way. So when you create entities you never assign audit fields yourself — the framework fills them in. +It also writes data changes into the audit log (`SystemLogDiff` / `LogDiff`) along the way. So when you create entities you never assign audit fields yourself — the framework fills them in. ### Snowflake IDs @@ -359,7 +358,7 @@ The frontend only recognizes this structure: `Code === 200` passes, everything e ### SignalR Real-Time Communication - Hub: `OnlineUserHub`, path `/hubs/onlineUser` -- Connections use authenticated user identities; there are no tenant message groups. +- Connections use authenticated user identities. - Capabilities: online user list, force logout, message sending (unicast / broadcast / exclude-self / target user) - For multi-instance deployment, optional Redis Backplane + Data Protection Key persistence lets messages fan out across instances @@ -390,12 +389,12 @@ This is the iron law of Hub.Api. Controllers inject repositories in their constr |------|----------|-----------|------| | Logged-in user | JWT (`[Authorize]`) | Authenticated user | Container orchestration / asset-version writeback | | Anonymous WebHook | - | - | None compiled in this host | -| Machine to machine | `[AllowAnonymous]` + `TenantGameAppOpenAccessAuthMiddleware` | Credential-bound user | `PackageBuildReportController` / `FeatureSwitchSyncController` | +| Machine to machine | `[AllowAnonymous]` + open-access HMAC auth middleware (machine channel) | Credential-bound user | `PackageBuildReportController` / `FeatureSwitchSyncController` | The machine-credential path validates AccessKey + signature + scope, **not JWT**, so the Controller is marked `[AllowAnonymous]` to skip JWT and a dedicated middleware takes over. **4. Main database and credential-bound identity.** -JWT requests use the authenticated user. Machine requests validate AccessKey, HMAC signature, scope, revocation and the bound user; credentials no longer select a tenant or application. +JWT requests use the authenticated user. Machine requests validate AccessKey, HMAC signature, scope, revocation and the bound user; credentials bind a user directly and select nothing else. **5. Ships its own optimistic-lock middleware and health checks.** `OptimisticConcurrencyMiddleware` sits at the very front of the pipeline, backstopping write operations that need concurrency control. There are three health check endpoints: `/health`, `/health/live`, `/health/ready` (compose uses them for liveness probes). @@ -407,7 +406,7 @@ OptimisticConcurrencyMiddleware → Swagger (switch-controlled) → CORS → Authentication → Authorization - → TenantGameAppOpenAccessAuthMiddleware (/api/PackageBuildReport / /api/FeatureSwitchSync) + → Open-access HMAC auth middleware (/api/PackageBuildReport / /api/FeatureSwitchSync) → HealthChecks / MapControllers ``` @@ -438,14 +437,14 @@ A complete back-office management module built on the in-house dynamic API routi | Feature | Service Class | What It Does | |------|--------|--------| | Auth login | `SystemAuthService` | Account/password login, JWT issuance + auto renewal, captcha | -| User management | `SystemUserService` | User CRUD, password reset, user-role binding (note: this service actually manages `TenantUser`; the naming is a bit misleading) | -| Role management | `TenantRoleService` | Role CRUD, data-scope control, role-menu permission binding | +| User management | `SystemUserService` | User CRUD, password reset, user-role binding | +| Role management | `RoleService` | Role CRUD, data-scope control, role-menu permission binding | | Menu permissions | `GlobalMenuService` | Tree menus, button-level permission resolution, route-to-API mapping | | Dictionary management | `GlobalDictTypeService` / `GlobalDictDataService` | Dictionary type and value CRUD, status toggling | -| File management | `TenantFileService` | File upload/download, OSS object storage | +| File management | `FileService` | File upload/download, OSS object storage | | Scheduled jobs | `SystemJobService` | Job and trigger CRUD, pause / start / run now, cluster coordination | | Database management | `SystemDatabaseService` | Table / column CRUD, online schema management | -| Online users | `TenantOnlineUserService` | Real-time online list, force logout, single sign-on | +| Online users | `OnlineUserService` | Real-time online list, force logout, single sign-on | | Logging | `LogOperationService` / `LogExceptionService` / `LogVisitService` / `LogDiffService` | Operation, exception, visit logs and data-change audits, with Excel export | | Cache management | `SystemCacheService` | Unified cache abstraction (Memory / Redis), cache key management | | System config | `SystemConfigService` | Key-value config CRUD | @@ -489,9 +488,9 @@ Configuration management modules for client apps. | Asset packages | `GameAppAssetPackageService` | AssetBundle / asset package management | | Asset versions | `GameAppAssetPackageVersionService` | Asset package version tracking | | Asset history | `GameAppAssetPackageVersionHistoryService` | Asset version change history | -| Channel definitions | `GlobalChannelDefinitionService` / `TenantChannelDefinitionService` | Distribution channels (App Store, Google Play, etc.) | -| Device management | `TenantDeviceService` | Device registration and identification (in `Application.Tenant`) | -| Device groups | `TenantDeviceGroupService` | Device grouping (grayscale / A/B testing, in `Application.Tenant`) | +| Channel definitions | `GlobalChannelDefinitionService` / `ChannelDefinitionService` | Distribution channels (App Store, Google Play, etc.) | +| Device management | `DeviceService` | Device registration and identification (in `Application.Business`) | +| Device groups | `DeviceGroupService` | Device grouping (grayscale / A/B testing, in `Application.Business`) | | Languages | `GlobalLanguageService` | Supported language configuration | | Package splitting | `GameAppPackageService` | App package splitting, channel binding and base-package inheritance | | Platform management | `GlobalPlatformService` | Runtime platforms (iOS, Android, etc.) | @@ -552,7 +551,7 @@ Pick an entity base class as needed: | Base Class | Characteristics | Use Case | |------|------|----------| -| `EntityBaseId` | Only `Id` | Join tables, non-tenant entities | +| `EntityBaseId` | Only `Id` | Join tables, entities without creator/audit columns | | `EntityBase` | Id + audit fields + soft delete | Main-database entities | | `EntityBasic` | Inherits `EntityBase` | General-purpose business entities (most common) | | `EntityBasicData` | Creator-based data permissions | Filter by `CreatedId` | @@ -579,7 +578,7 @@ Seed data uses `StorageableByObject` to InsertOrUpdate by primary key, so repeat ### 3. Write the Service -Create the service under `GameFrameX.Application.Game/Service/` (or System / Client / Tenant): +Create the service under `GameFrameX.Application.Game/Service/` (or System / Client / Business): ```csharp [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] @@ -729,7 +728,7 @@ Seeds upsert by primary key. If the key didn't change, existing rows aren't over Hub reuses Admin's JWT key but reads the `JWTSettings` node from its own `appsettings.json`. The key settings (`IssuerSigningKey` / `ValidIssuer` / `ValidAudience`) must match on both sides. If they don't, the tokens each side issues aren't accepted by the other. **Build reporting (PackageBuildReport) returns 401?** -Machine channels use AccessKey, HMAC signature, scope and the bound user through `TenantGameAppOpenAccessAuthMiddleware`. +Machine channels use AccessKey, HMAC signature, scope and the bound user through the open-access HMAC auth middleware. ### Pitfalls @@ -772,13 +771,26 @@ All three Dockerfiles are multi-stage builds (`sdk:10.0` for packaging → `aspn > Naming history: the compose service was once named `web-entry` (carried over from the old "Web.Entry"); renamed to `web-api` as of 2026-10-20 to align with GameFrameX.Web.Api. +### First Deployment: Superadmin Password and the First Business Administrator + +On the very first startup against an empty database, web-api runs the "first business administrator bootstrap" (C406 / F3) after table creation and seeding. The two initial accounts come from separate environment variables with different responsibilities: + +| Environment variable | Purpose | When it takes effect | +|---|---|---| +| `GFX_SUPERADMIN_INITIAL_PASSWORD` | Initial password of the platform superadmin `superadmin`; if unset the password stays empty and the first visit to the login page goes through the first-install wizard | Only when the first-install seed inserts it | +| `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD` | Account and initial password of the **first business administrator**: created automatically at startup, bound to the built-in `sys_admin` role (all non-superadmin menus granted; the superadmin-only subtree excluded), then used to sign in to the business back office | Both variables set together, and the main database contains no business administrator yet; the password must satisfy the platform password-strength policy, otherwise startup fails | + +Idempotency: once the account exists it is neither recreated nor is its password overwritten; on every startup the `sys_admin` menu grants only add newly introduced seed menus and never remove existing grants (manual narrowing done by operators in role management survives restarts). When neither variable is set and no business administrator exists, startup logs a "business administrator not initialized" warning. No log line ever prints a password. + +> Password strength: the platform password policy is **off by default** on a fresh install (`strongPassword=false`), so neither initial password is strength-checked. Once enabled it requires 6–16 characters including upper case, lower case, digits and a special character. Set the initial passwords to that shape (12+ characters) and enable the policy before exposing the service. + ### Pre-Release Checklist: Database Re-Seeding and Compact Short IDs -This section describes only the historical long-ID to compact-ID upgrade (2026-09-15), which has no data conversion script. Instances already using compact IDs can use the default-instance single-main migration described above; it does not convert long IDs. +This section describes only the historical long-ID to compact-ID upgrade (2026-09-15), which has no data conversion script. Since C406 there is no migration tooling at all: 2.0 only supports fresh single-main-database initialization; legacy databases must be rolled back wholesale from a pre-release backup. -The compact short ID layout ships with a **resettable, no-migration-script policy** (decision 2026-09-15): old and new ID layouts are incompatible; production PG main / tenant databases ship by "wipe and re-seed", and mixing old and new IDs is not allowed. Go through this before release: +The compact short ID layout ships with a **resettable, no-migration-script policy** (decision 2026-09-15): old and new ID layouts are incompatible; the production PG main database ships by "wipe and re-seed", and mixing old and new IDs is not allowed. Go through this before release: -1. **Wipe and re-seed**: empty the production PG main database and all tenant databases; each host rebuilds on startup (CodeFirst table creation + seed re-insertion). Do not migrate data with 18-19 digit long Ids from old databases into the new layout — overlapping old/new Id spaces is a data-integrity incident. +1. **Wipe and re-seed**: empty the production PG main database; each host rebuilds on startup (CodeFirst table creation + seed re-insertion). Do not migrate data with 18-19 digit long Ids from old databases into the new layout — overlapping old/new Id spaces is a data-integrity incident. 2. **WorkerId mutual-exclusion check**: all instances writing to the same database (Web.Api replicas / Hub / Client) must have pairwise-different `SnowFlake__WorkerId` values in 0-7. The defaults 1/2/3 only guarantee no collisions on a single-machine deployment; assign explicitly before scaling replicas. 3. **Magnitude spot-check**: after re-seeding, spot-check business-table primary keys — they should be 13-14 digit numbers (< 2^53). Seeing 18-19 digits means some path skipped Foundation's ID generation; stop and investigate. diff --git a/GameFrameX.Admin.Unified.Api/README.zh-CN.md b/GameFrameX.Admin.Unified.Api/README.zh-CN.md index cbd02a25..fbbdfd06 100644 --- a/GameFrameX.Admin.Unified.Api/README.zh-CN.md +++ b/GameFrameX.Admin.Unified.Api/README.zh-CN.md @@ -67,7 +67,7 @@ Client API 和 Hub API 都更"瘦":Client API 只引用 Entity + Payment,不 1. **写个 Service 就自动有接口**(Admin API)。实现 `IDynamicApiController`,类里的 public 方法会自动变成 REST 端点,你不用手写 Controller、不用手贴 `[Route]`。这是 Admin API 的灵魂。 2. **写个实体就自动建表**。SqlSugar Code-First:启动时扫实体类 → 建表 → 填种子数据。你不用写一行建表 SQL,改了字段重启一下,表结构就跟上了。 -3. **三宿主共用单主库**。仓储固定使用 `ConfigId=main`,登录和业务数据不再包含租户或应用维度;软删除和创建者数据权限继续生效。 +3. **三宿主共用单主库**。仓储固定使用 `ConfigId=main`,登录和业务数据没有多库维度;软删除和创建者数据权限继续生效。 --- @@ -107,7 +107,7 @@ Admin API(20802) Client API(20808) Hub API(208 依赖关系长这样(左到右是引用方向): ``` -Web.Api → Web.Core → Application.{System, Game, Client, Tenant} → Core → Entity → Core.Enum +Web.Api → Web.Core → Application.{System, Game, Client, Business} → Core → Entity → Core.Enum Client.Api(独立,仅引用 Entity + Payment) Hub.Api(独立,引用 Application.Game + Core + Entity,但 Controller 不调 Application Service) ``` @@ -134,7 +134,7 @@ GameFrameX.Admin.Unified.Api/ ├── GameFrameX.Application.System/ # 系统管理服务(用户/角色/菜单/日志...) ├── GameFrameX.Application.Game/ # 游戏管理服务(区服/订单/邮件/兑换码...) ├── GameFrameX.Application.Client/ # 客户端管理服务(版本/渠道/资源包...) -├── GameFrameX.Application.Tenant/ # 业务服务(设备 / 设备分组,项目名待后续调整) +├── GameFrameX.Application.Business/ # 业务服务(设备 / 设备分组) ├── GameFrameX.Entity/ # 实体层(Base / System / Game / Client) ├── GameFrameX.Core/ # 核心层(仓储、服务基类、认证、SignalR) ├── GameFrameX.Core.Enum/ # 枚举定义 @@ -176,13 +176,12 @@ GameFrameX.Admin.Unified.Api/ **生产 / 容器(PostgreSQL,环境变量成对覆盖)**:覆盖数据库时类型和连接串必须**成对**设置,半套覆盖会在启动期直接报错。三个 host(Web / Client / Hub)用**同一对变量**: - `GFX_MAIN_DB_TYPE=PostgreSQL` + `GFX_MAIN_DB_CONNECTION_STRING=Host=...` -- 三宿主仅使用 `ConfigId=main`,不再自动创建或推导租户数据库。 +- 三宿主仅使用 `ConfigId=main`,单主库即全部数据库,不存在其他库的创建或推导。 - 存量部署的裸 `DbType` / `ConnectionString` 启动参数仍可用(兼容层),启动会打迁移警告,请尽快切换 - 换其他数据库(MySQL / Oracle / 达梦……全部 34 种 DbType)的连接串写法与示例:[`GameFrameX.Application/Configuration/Database-ConnectionStrings.md`](GameFrameX.Application/Configuration/Database-ConnectionStrings.md) 关于数据库,还有几个约定你要知道: -- **默认自托管实例升级**:停写并备份两个数据库,先运行 `db/single-main/migrate-default-instance.sh --dry-run`,再用 `--execute` 提交。设置 `GFX_MIGRATION_DATABASE_TYPE`、`GFX_MIGRATION_SOURCE` 和 `GFX_MIGRATION_TARGET`。脚本拒绝多租户、多应用和数据冲突;dry-run 回滚,重复执行幂等。 - **Compose 内置 PostgreSQL**。在仓库根执行 `docker compose up` 会自带起一个 `postgres:16-alpine`(首次启动自动建库,见 `docker/postgres/init.sql`,数据落在仓库根 `postgres-data/` bind mount)。要复用宿主机已有的 postgres 容器,在仓库根 `.env` 里设 `POSTGRES_HOST=host.docker.internal` 等变量并移除 api 服务对 `postgres` 的 `depends_on` 即可。 - **三个 host 共读同一份默认配置**。Client / Hub 启动时自动加载 `Database.json`(与 Admin 同源,改一处三处生效);环境变量覆盖写法与 compose 一致。 @@ -288,7 +287,7 @@ public class MyService : ITransient, IDynamicApiController ### 仓储与单主库 -`SqlSugarRepository` 固定使用主库连接(`ConfigId=main`),实体特性不再决定租户分库。 +`SqlSugarRepository` 固定使用主库连接(`ConfigId=main`),三个 host 共用单主库。 ### 认证体系:JWT 共用,外加签名 @@ -320,7 +319,7 @@ SqlSugar AOP 在 `SqlSugarSetup.SetDbAop()` 里帮你干了这事: | Insert | `CreatedTime`、`CreatedId`、`CreatedName` | | Update | `UpdateTime`、`UpdatedId`、`UpdatedName` | -同时顺手把数据变更写进审计日志(`SystemLogDiff` / `TenantLogDiff`)。所以你建实体的时候,审计字段不用自己赋值,框架替你填。 +同时顺手把数据变更写进审计日志(`SystemLogDiff` / `LogDiff`)。所以你建实体的时候,审计字段不用自己赋值,框架替你填。 ### 雪花 ID @@ -359,7 +358,7 @@ Admin API 的 `AdminResultProvider` 把所有响应统一套了一层壳: ### SignalR 实时通信 - Hub:`OnlineUserHub`,路径 `/hubs/onlineUser` -- 连接使用已认证用户身份,不再按租户建立消息组。 +- 连接使用已认证用户身份。 - 能干:在线用户列表、强制下线、消息发送(单播 / 广播 / 排除自己 / 指定用户) - 多实例部署时可选 Redis Backplane + Data Protection Key 持久化,让消息跨实例推送 @@ -390,12 +389,12 @@ Hub API(`GameFrameX.Hub.Api`,端口 `20806`)是给**外部系统**用的 |------|----------|-----------|------| | 登录用户 | JWT(各控制器显式声明 `[Authorize]`) | 已认证用户 | 容器编排 / 资源版本回写 | | 匿名 WebHook | - | - | 当前宿主无编译中的 WebHook | -| 机器对机器 | `[AllowAnonymous]` + `TenantGameAppOpenAccessAuthMiddleware` | 凭证绑定用户 | `PackageBuildReportController` / `FeatureSwitchSyncController` | +| 机器对机器 | `[AllowAnonymous]` + 开放接入 HMAC 鉴权中间件(机器通道) | 凭证绑定用户 | `PackageBuildReportController` / `FeatureSwitchSyncController` | 机器凭证那套校验的是 AccessKey + 签名 + scope,**不是 JWT**,所以 Controller 标 `[AllowAnonymous]` 跳过 JWT,由专用中间件接管。 **4. 主库与凭证绑定身份。** -JWT 请求使用已认证用户;机器请求继续校验 AccessKey、HMAC 签名、scope、撤销状态及绑定用户,凭证不再选择租户或应用。 +JWT 请求使用已认证用户;机器请求继续校验 AccessKey、HMAC 签名、scope、撤销状态及绑定用户,凭证只绑定用户,不再选择其他作用域。 **5. 自带乐观锁中间件和健康检查。** `OptimisticConcurrencyMiddleware` 在管道最前面,给需要并发控制的写操作兜底。健康检查端点有三个:`/health`、`/health/live`、`/health/ready`(compose 用它做存活探测)。 @@ -407,7 +406,7 @@ OptimisticConcurrencyMiddleware → Swagger(开关控制) → CORS → Authentication → Authorization - → TenantGameAppOpenAccessAuthMiddleware(/api/PackageBuildReport / /api/FeatureSwitchSync) + → 开放接入 HMAC 鉴权中间件(/api/PackageBuildReport / /api/FeatureSwitchSync) → HealthChecks / MapControllers ``` @@ -438,14 +437,14 @@ Admin API 的独立 JSON 配置都在 `GameFrameX.Application/Configuration/`, | 功能 | 服务类 | 干啥的 | |------|--------|--------| | 认证登录 | `SystemAuthService` | 账号密码登录,签发 JWT + 自动续签,验证码 | -| 用户管理 | `SystemUserService` | 用户增删改查、密码重置、用户-角色绑定(注意:这个服务实际管的是 `TenantUser`,命名有点误导) | -| 角色管理 | `TenantRoleService` | 角色 CRUD、数据范围控制、角色-菜单权限绑定 | +| 用户管理 | `SystemUserService` | 用户增删改查、密码重置、用户-角色绑定 | +| 角色管理 | `RoleService` | 角色 CRUD、数据范围控制、角色-菜单权限绑定 | | 菜单权限 | `GlobalMenuService` | 树形菜单、按钮级权限解析、路由与 API 映射 | | 字典管理 | `GlobalDictTypeService` / `GlobalDictDataService` | 字典类型与字典值 CRUD、状态切换 | -| 文件管理 | `TenantFileService` | 文件上传下载、OSS 对象存储 | +| 文件管理 | `FileService` | 文件上传下载、OSS 对象存储 | | 定时任务 | `SystemJobService` | 作业与触发器 CRUD、暂停 / 启动 / 立即执行、集群协调 | | 数据库管理 | `SystemDatabaseService` | 表 / 列 CRUD、库表结构在线管理 | -| 在线用户 | `TenantOnlineUserService` | 实时在线列表、强制下线、单点登录 | +| 在线用户 | `OnlineUserService` | 实时在线列表、强制下线、单点登录 | | 日志系统 | `LogOperationService` / `LogExceptionService` / `LogVisitService` / `LogDiffService` | 操作日志、异常日志、访问日志、数据变更审计,支持 Excel 导出 | | 缓存管理 | `SystemCacheService` | 统一缓存抽象(Memory / Redis),缓存键管理 | | 系统配置 | `SystemConfigService` | 键值对配置 CRUD | @@ -489,9 +488,9 @@ Admin API 的独立 JSON 配置都在 `GameFrameX.Application/Configuration/`, | 资源包 | `GameAppAssetPackageService` | AssetBundle / 资源包管理 | | 资源版本 | `GameAppAssetPackageVersionService` | 资源包版本追踪 | | 资源历史 | `GameAppAssetPackageVersionHistoryService` | 资源版本变更记录 | -| 渠道定义 | `GlobalChannelDefinitionService` / `TenantChannelDefinitionService` | 分发渠道(App Store、Google Play 等) | -| 设备管理 | `TenantDeviceService` | 设备注册与识别(位于 `Application.Tenant`) | -| 设备分组 | `TenantDeviceGroupService` | 设备分组(灰度 / A/B 测试,位于 `Application.Tenant`) | +| 渠道定义 | `GlobalChannelDefinitionService` / `ChannelDefinitionService` | 分发渠道(App Store、Google Play 等) | +| 设备管理 | `DeviceService` | 设备注册与识别(位于 `Application.Business`) | +| 设备分组 | `DeviceGroupService` | 设备分组(灰度 / A/B 测试,位于 `Application.Business`) | | 多语言 | `GlobalLanguageService` | 支持语言配置 | | 分包管理 | `GameAppPackageService` | 应用分包、渠道绑定与母包继承管理 | | 平台管理 | `GlobalPlatformService` | 运行平台(iOS、Android 等) | @@ -552,7 +551,7 @@ public class GameItemEntity : EntityBasic | 基类 | 特点 | 适用场景 | |------|------|----------| -| `EntityBaseId` | 只有 `Id` | 关联表、无租户实体 | +| `EntityBaseId` | 只有 `Id` | 关联表、无创建者/审计列的实体 | | `EntityBase` | Id + 审计字段 + 软删除 | 主库实体 | | `EntityBasic` | 继承 `EntityBase` | 通用业务实体(最常用) | | `EntityBasicData` | 创建者数据权限 | 按 `CreatedId` 过滤 | @@ -579,7 +578,7 @@ public class GameItemSeedData : ISqlSugarEntitySeedData ### 3. 写 Service -在 `GameFrameX.Application.Game/Service/`(或 System / Client / Tenant)下建服务: +在 `GameFrameX.Application.Game/Service/`(或 System / Client / Business)下建服务: ```csharp [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] @@ -729,7 +728,7 @@ SuperAdmin 保留权限绕过。三宿主共用主库,Hub 机器通道仍执 Hub 复用 Admin 的 JWT 密钥,但读的是自己 `appsettings.json` 里的 `JWTSettings` 节点。两边密钥(`IssuerSigningKey` / `ValidIssuer` / `ValidAudience`)必须一致。不一致就签出来的 token 互相不认。 **打包上报(PackageBuildReport)报 401?** -机器通道通过 `TenantGameAppOpenAccessAuthMiddleware` 校验 AccessKey、HMAC 签名、scope 与绑定用户。 +机器通道通过开放接入 HMAC 鉴权中间件校验 AccessKey、HMAC 签名、scope 与绑定用户。 ### 踩坑 @@ -772,13 +771,26 @@ cd .. && docker compose up --build # 统一编排位于仓库根(含前端 > 历史命名:compose 服务曾名 `web-entry`(沿用旧版 "Web.Entry"),2026-10-20 起更名 `web-api`,与 GameFrameX.Web.Api 对齐。 +### 首次部署:超管密码与首个业务管理员 + +全新数据库首次启动时,web-api 在建表与种子之后执行「首个业务管理员种子引导」(C406 / F3)。两个初始账号各走各的环境变量,职责不同: + +| 环境变量 | 作用 | 生效条件 | +|---|---|---| +| `GFX_SUPERADMIN_INITIAL_PASSWORD` | 平台超级管理员 `superadmin` 的初始密码;不设则密码留空,首次打开登录页走首装向导设置 | 仅首装种子插入时 | +| `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD` | **首个业务管理员**账号与初始密码:启动期自动创建该账号,绑定内置 `sys_admin` 角色(授权全部非超管菜单,超管专属子树不授予),之后即可用它登录业务后台 | 两变量成对设置,且主库中尚无任何业务管理员账号;密码须满足平台密码强度策略,否则启动直接失败 | + +幂等语义:账号已存在时不重建、不覆盖密码;`sys_admin` 的菜单授权每次启动只补新增的种子菜单、不删除已有授权(运营在角色管理里手工收窄后重启不会被冲掉)。两个变量都没设且库中无业务管理员时,启动日志会输出「尚未初始化业务管理员」警告。任何日志都不输出密码。 + +> 密码强度:新装的「平台密码策略」默认关闭(`strongPassword=false`),两个初始账号的密码此时不做强度校验;开启后要求 6–16 位且同时包含大写字母、小写字母、数字与特殊字符。建议初始密码直接按该规则设置(12 位以上),并在对外提供服务前开启策略。 + ### 发布前清单:数据库重灌与紧凑短 ID -本节仅说明 2026-09-15 的历史长 ID → 紧凑短 ID 升级,该升级不提供数据转换脚本。已经使用短 ID 的默认实例可按上文执行单主库迁移;该工具不转换历史长 ID。 +本节仅说明 2026-09-15 的历史长 ID → 紧凑短 ID 升级,该升级不提供数据转换脚本。C406 起不再提供任何迁移工具:2.0 只支持单主库全新初始化,旧库只能靠发布前的完整备份整体回滚。 -紧凑短 ID 布局的发布口径是**可重置、无迁移脚本**(决策 2026-09-15):新旧 ID 布局不兼容,生产 PG 主库 / 租户库按「清空重灌」发布,不允许新旧 ID 混写。发布前过一遍: +紧凑短 ID 布局的发布口径是**可重置、无迁移脚本**(决策 2026-09-15):新旧 ID 布局不兼容,生产 PG 主库按「清空重灌」发布,不允许新旧 ID 混写。发布前过一遍: -1. **清空重灌**:生产 PG 主库 + 全部租户库清空,由各 host 启动重建(CodeFirst 建表 + 种子数据重灌)。旧库里 18-19 位长 Id 的数据不要往新布局迁——新旧 Id 空间重叠是数据完整性事故。 +1. **清空重灌**:生产 PG 主库清空,由各 host 启动重建(CodeFirst 建表 + 种子数据重灌)。旧库里 18-19 位长 Id 的数据不要往新布局迁——新旧 Id 空间重叠是数据完整性事故。 2. **WorkerId 互斥核对**:同库写入的所有实例(Web.Api 副本 / Hub / Client)`SnowFlake__WorkerId` 两两不同且在 0-7。默认值 1/2/3 只保证单机部署不撞;扩副本前必须显式分配。 3. **量级抽查**:重灌后抽查业务表主键应为 13-14 位数字(< 2^53)。看到 18-19 位说明有路径没走 Foundation 取号,停下来排查。 diff --git a/GameFrameX.Admin.Unified.Api/README.zh-TW.md b/GameFrameX.Admin.Unified.Api/README.zh-TW.md index f0b8577c..92788e1f 100644 --- a/GameFrameX.Admin.Unified.Api/README.zh-TW.md +++ b/GameFrameX.Admin.Unified.Api/README.zh-TW.md @@ -67,7 +67,7 @@ Client API 和 Hub API 都更「瘦」:Client API 只引用 Entity + Payment 1. **寫個 Service 就自動有接口**(Admin API)。實作 `IDynamicApiController`,類別裡的 public 方法會自動變成 REST 端點,你不用手寫 Controller、不用手貼 `[Route]`。這是 Admin API 的靈魂。 2. **寫個實體就自動建表**。SqlSugar Code-First:啟動時掃實體類別 → 建表 → 填種子資料。你不用寫一行建表 SQL,改了欄位重啟一下,表結構就跟上了。 -3. **三宿主共用單主庫**。倉儲固定使用 `ConfigId=main`,登入和業務資料不再包含租戶或應用維度;軟刪除和建立者資料權限繼續生效。 +3. **三宿主共用單主庫**。倉儲固定使用 `ConfigId=main`,登入和業務資料沒有多庫維度;軟刪除和建立者資料權限繼續生效。 --- @@ -107,7 +107,7 @@ Admin API(20802) Client API(20808) Hub API(208 依賴關係長這樣(左到右是引用方向): ``` -Web.Api → Web.Core → Application.{System, Game, Client, Tenant} → Core → Entity → Core.Enum +Web.Api → Web.Core → Application.{System, Game, Client, Business} → Core → Entity → Core.Enum Client.Api(獨立,僅引用 Entity + Payment) Hub.Api(獨立,引用 Application.Game + Core + Entity,但 Controller 不調 Application Service) ``` @@ -134,7 +134,7 @@ GameFrameX.Admin.Unified.Api/ ├── GameFrameX.Application.System/ # 系統管理服務(用戶/角色/選單/日誌...) ├── GameFrameX.Application.Game/ # 遊戲管理服務(區服/訂單/郵件/兌換碼...) ├── GameFrameX.Application.Client/ # 客戶端管理服務(版本/渠道/資源包...) -├── GameFrameX.Application.Tenant/ # 業務服務(設備 / 設備分組,專案名稱待後續調整) +├── GameFrameX.Application.Business/ # 業務服務(設備 / 設備分組) ├── GameFrameX.Entity/ # 實體層(Base / System / Game / Client) ├── GameFrameX.Core/ # 核心層(倉儲、服務基類、認證、SignalR) ├── GameFrameX.Core.Enum/ # 列舉定義 @@ -176,13 +176,12 @@ GameFrameX.Admin.Unified.Api/ **生產 / 容器(PostgreSQL,環境變數成對覆蓋)**:覆蓋資料庫時類型和連接串必須**成對**設定,半套覆蓋會在啟動期直接報錯。三個 host(Web / Client / Hub)用**同一對變數**: - `GFX_MAIN_DB_TYPE=PostgreSQL` + `GFX_MAIN_DB_CONNECTION_STRING=Host=...` -- 三宿主僅使用 `ConfigId=main`,不再自動建立或推導租戶資料庫。 +- 三宿主僅使用 `ConfigId=main`,單主庫即全部資料庫,不存在其他庫的建立或推導。 - 存量部署的裸 `DbType` / `ConnectionString` 啟動參數仍可用(相容層),啟動會打遷移警告,請盡快切換 - 換其他資料庫(MySQL / Oracle / 達夢……全部 34 種 DbType)的連接串寫法與範例:[`GameFrameX.Application/Configuration/Database-ConnectionStrings.md`](GameFrameX.Application/Configuration/Database-ConnectionStrings.md) 關於資料庫,還有幾個約定你要知道: -- **預設自託管實例升級**:停寫並備份兩個資料庫,先執行 `db/single-main/migrate-default-instance.sh --dry-run`,再用 `--execute` 提交。設定 `GFX_MIGRATION_DATABASE_TYPE`、`GFX_MIGRATION_SOURCE` 和 `GFX_MIGRATION_TARGET`。指令碼拒絕多租戶、多應用和資料衝突;dry-run 回滾,重複執行具冪等性。 - **Compose 內建 PostgreSQL**。在倉儲根執行 `docker compose up` 會自帶起一個 `postgres:16-alpine`(首次啟動自動建庫,見 `docker/postgres/init.sql`,資料落在倉儲根 `postgres-data/` bind mount)。要複用宿主機已有的 postgres 容器,在倉儲根 `.env` 裡設 `POSTGRES_HOST=host.docker.internal` 等變數並移除 api 服務對 `postgres` 的 `depends_on` 即可。 - **三個 host 共讀同一份預設組態**。Client / Hub 啟動時自動載入 `Database.json`(與 Admin 同源,改一處三處生效);環境變數覆蓋寫法與 compose 一致。 @@ -288,7 +287,7 @@ public class MyService : ITransient, IDynamicApiController ### 倉儲與單主庫 -`SqlSugarRepository` 固定使用主庫連線(`ConfigId=main`),實體特性不再決定租戶分庫。 +`SqlSugarRepository` 固定使用主庫連線(`ConfigId=main`),三個 host 共用單主庫。 ### 認證體系:JWT 共用,外加簽名 @@ -320,7 +319,7 @@ SqlSugar AOP 在 `SqlSugarSetup.SetDbAop()` 裡幫你幹了這事: | Insert | `CreatedTime`、`CreatedId`、`CreatedName` | | Update | `UpdateTime`、`UpdatedId`、`UpdatedName` | -同時順手把資料變更寫進稽核日誌(`SystemLogDiff` / `TenantLogDiff`)。所以你建實體的時候,稽核欄位不用自己賦值,框架替你填。 +同時順手把資料變更寫進稽核日誌(`SystemLogDiff` / `LogDiff`)。所以你建實體的時候,稽核欄位不用自己賦值,框架替你填。 ### 雪花 ID @@ -359,7 +358,7 @@ Admin API 的 `AdminResultProvider` 把所有回應統一套了一層殼: ### SignalR 即時通訊 - Hub:`OnlineUserHub`,路徑 `/hubs/onlineUser` -- 連線使用已驗證使用者身分,不再按租戶建立訊息群組。 +- 連線使用已驗證使用者身分。 - 能幹:線上用戶列表、強制下線、訊息發送(單播 / 廣播 / 排除自己 / 指定用戶) - 多實例部署時可選 Redis Backplane + Data Protection Key 持久化,讓訊息跨實例推送 @@ -390,12 +389,12 @@ Hub API(`GameFrameX.Hub.Api`,埠 `20806`)是給**外部系統**用的聚 |------|----------|-----------|------| | 登入用戶 | JWT(各控制器明確宣告 `[Authorize]`) | 已驗證使用者 | 容器編排 / 資源版本回寫 | | 匿名 WebHook | - | - | 目前宿主無編譯中的 WebHook | -| 機器對機器 | `[AllowAnonymous]` + `TenantGameAppOpenAccessAuthMiddleware` | 憑證綁定使用者 | `PackageBuildReportController` / `FeatureSwitchSyncController` | +| 機器對機器 | `[AllowAnonymous]` + 開放接入 HMAC 鑑權中介軟體(機器通道) | 憑證綁定使用者 | `PackageBuildReportController` / `FeatureSwitchSyncController` | 機器憑證那套校驗的是 AccessKey + 簽名 + scope,**不是 JWT**,所以 Controller 標 `[AllowAnonymous]` 跳過 JWT,由專用中介軟體接管。 **4. 主庫與憑證綁定身分。** -JWT 請求使用已驗證使用者;機器請求繼續驗證 AccessKey、HMAC 簽章、scope、撤銷狀態及綁定使用者,憑證不再選擇租戶或應用。 +JWT 請求使用已驗證使用者;機器請求繼續驗證 AccessKey、HMAC 簽章、scope、撤銷狀態及綁定使用者,憑證只綁定使用者,不再選擇其他作用域。 **5. 自帶樂觀鎖中介軟體和健康檢查。** `OptimisticConcurrencyMiddleware` 在管道最前面,給需要並發控制的寫操作兜底。健康檢查端點有三個:`/health`、`/health/live`、`/health/ready`(compose 用它做存活探測)。 @@ -407,7 +406,7 @@ OptimisticConcurrencyMiddleware → Swagger(開關控制) → CORS → Authentication → Authorization - → TenantGameAppOpenAccessAuthMiddleware(/api/PackageBuildReport / /api/FeatureSwitchSync) + → 開放接入 HMAC 鑑權中介軟體(/api/PackageBuildReport / /api/FeatureSwitchSync) → HealthChecks / MapControllers ``` @@ -438,14 +437,14 @@ Admin API 的獨立 JSON 組態都在 `GameFrameX.Application/Configuration/`, | 功能 | 服務類別 | 幹啥的 | |------|--------|--------| | 認證登入 | `SystemAuthService` | 帳號密碼登入,簽發 JWT + 自動續簽,驗證碼 | -| 用戶管理 | `SystemUserService` | 用戶增刪改查、密碼重置、用戶-角色綁定(注意:這個服務實際管的是 `TenantUser`,命名有點誤導) | -| 角色管理 | `TenantRoleService` | 角色 CRUD、資料範圍控制、角色-選單權限綁定 | +| 用戶管理 | `SystemUserService` | 用戶增刪改查、密碼重置、用戶-角色綁定 | +| 角色管理 | `RoleService` | 角色 CRUD、資料範圍控制、角色-選單權限綁定 | | 選單權限 | `GlobalMenuService` | 樹狀選單、按鈕級權限解析、路由與 API 映射 | | 字典管理 | `GlobalDictTypeService` / `GlobalDictDataService` | 字典類型與字典值 CRUD、狀態切換 | -| 檔案管理 | `TenantFileService` | 檔案上傳下載、OSS 物件儲存 | +| 檔案管理 | `FileService` | 檔案上傳下載、OSS 物件儲存 | | 定時任務 | `SystemJobService` | 作業與觸發器 CRUD、暫停 / 啟動 / 立即執行、叢集協調 | | 資料庫管理 | `SystemDatabaseService` | 表 / 欄 CRUD、庫表結構線上管理 | -| 線上用戶 | `TenantOnlineUserService` | 即時線上列表、強制下線、單點登入 | +| 線上用戶 | `OnlineUserService` | 即時線上列表、強制下線、單點登入 | | 日誌系統 | `LogOperationService` / `LogExceptionService` / `LogVisitService` / `LogDiffService` | 操作日誌、異常日誌、存取日誌、資料變更稽核,支援 Excel 匯出 | | 快取管理 | `SystemCacheService` | 統一快取抽象(Memory / Redis),快取鍵管理 | | 系統組態 | `SystemConfigService` | 鍵值對組態 CRUD | @@ -489,9 +488,9 @@ Admin API 的獨立 JSON 組態都在 `GameFrameX.Application/Configuration/`, | 資源包 | `GameAppAssetPackageService` | AssetBundle / 資源包管理 | | 資源版本 | `GameAppAssetPackageVersionService` | 資源包版本追蹤 | | 資源歷史 | `GameAppAssetPackageVersionHistoryService` | 資源版本變更記錄 | -| 渠道定義 | `GlobalChannelDefinitionService` / `TenantChannelDefinitionService` | 分發渠道(App Store、Google Play 等) | -| 設備管理 | `TenantDeviceService` | 設備註冊與識別(位於 `Application.Tenant`) | -| 設備分組 | `TenantDeviceGroupService` | 設備分組(灰度 / A/B 測試,位於 `Application.Tenant`) | +| 渠道定義 | `GlobalChannelDefinitionService` / `ChannelDefinitionService` | 分發渠道(App Store、Google Play 等) | +| 設備管理 | `DeviceService` | 設備註冊與識別(位於 `Application.Business`) | +| 設備分組 | `DeviceGroupService` | 設備分組(灰度 / A/B 測試,位於 `Application.Business`) | | 多語言 | `GlobalLanguageService` | 支援語言組態 | | 分包管理 | `GameAppPackageService` | 應用分包、渠道綁定與母包繼承管理 | | 平台管理 | `GlobalPlatformService` | 執行平台(iOS、Android 等) | @@ -552,7 +551,7 @@ public class GameItemEntity : EntityBasic | 基類 | 特點 | 適用場景 | |------|------|----------| -| `EntityBaseId` | 只有 `Id` | 關聯表、無租戶實體 | +| `EntityBaseId` | 只有 `Id` | 關聯表、無建立者/稽核欄的實體 | | `EntityBase` | Id + 稽核欄位 + 軟刪除 | 主庫實體 | | `EntityBasic` | 繼承 `EntityBase` | 通用業務實體(最常用) | | `EntityBasicData` | 建立者資料權限 | 按 `CreatedId` 過濾 | @@ -579,7 +578,7 @@ public class GameItemSeedData : ISqlSugarEntitySeedData ### 3. 寫 Service -在 `GameFrameX.Application.Game/Service/`(或 System / Client / Tenant)下建服務: +在 `GameFrameX.Application.Game/Service/`(或 System / Client / Business)下建服務: ```csharp [ApiDescriptionSettings(GameConst.GroupName, Order = 100)] @@ -729,7 +728,7 @@ SuperAdmin 保留權限繞過。三宿主共用主庫,Hub 機器通道仍執 Hub 複用 Admin 的 JWT 金鑰,但讀的是自己 `appsettings.json` 裡的 `JWTSettings` 節點。兩邊金鑰(`IssuerSigningKey` / `ValidIssuer` / `ValidAudience`)必須一致。不一致就簽出來的 token 互相不認。 **打包上報(PackageBuildReport)報 401?** -機器通道透過 `TenantGameAppOpenAccessAuthMiddleware` 驗證 AccessKey、HMAC 簽章、scope 與綁定使用者。 +機器通道透過開放接入 HMAC 鑑權中介軟體驗證 AccessKey、HMAC 簽章、scope 與綁定使用者。 ### 踩坑 @@ -772,13 +771,26 @@ cd .. && docker compose up --build # 統一編排位於倉儲根(含前端 > 歷史命名:compose 服務曾名 `web-entry`(沿用舊版 "Web.Entry"),2026-10-20 起更名 `web-api`,與 GameFrameX.Web.Api 對齊。 +### 首次部署:超管密碼與首個業務管理員 + +以全新資料庫首次啟動時,web-api 在建表與種子之後執行「首個業務管理員種子引導」(C406 / F3)。兩個初始帳號各走各的環境變數,職責不同: + +| 環境變數 | 作用 | 生效條件 | +|---|---|---| +| `GFX_SUPERADMIN_INITIAL_PASSWORD` | 平台超級管理員 `superadmin` 的初始密碼;不設則密碼留空,首次開啟登入頁走首裝嚮導設定 | 僅首裝種子插入時 | +| `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD` | **首個業務管理員**帳號與初始密碼:啟動期自動建立該帳號,綁定內建 `sys_admin` 角色(授權全部非超管選單,超管專屬子樹不授予),之後即可用它登入業務後台 | 兩變數成對設定,且主庫中尚無任何業務管理員帳號;密碼須滿足平台密碼強度策略,否則啟動直接失敗 | + +冪等語義:帳號已存在時不重建、不覆蓋密碼;`sys_admin` 的選單授權每次啟動只補新增的種子選單、不刪除既有授權(營運在角色管理裡手工收窄後重啟不會被沖掉)。兩個變數都沒設且庫中無業務管理員時,啟動日誌會輸出「尚未初始化業務管理員」警告。任何日誌都不輸出密碼。 + +> 密碼強度:新裝的「平台密碼策略」預設關閉(`strongPassword=false`),兩個初始帳號的密碼此時不做強度校驗;開啟後要求 6–16 位且同時包含大寫字母、小寫字母、數字與特殊字元。建議初始密碼直接按該規則設定(12 位以上),並在對外提供服務前開啟策略。 + ### 發布前清單:資料庫重灌與緊湊短 ID -本節僅說明 2026-09-15 的歷史長 ID → 緊湊短 ID 升級,該升級不提供資料轉換指令碼。已使用短 ID 的預設實例可依上文執行單主庫遷移;該工具不轉換歷史長 ID。 +本節僅說明 2026-09-15 的歷史長 ID → 緊湊短 ID 升級,該升級不提供資料轉換指令碼。C406 起不再提供任何遷移工具:2.0 只支援單主庫全新初始化,舊庫只能靠發布前的完整備份整體回滾。 -緊湊短 ID 佈局的發布口徑是**可重置、無遷移指令碼**(決策 2026-09-15):新舊 ID 佈局不相容,生產 PG 主庫 / 租戶庫按「清空重灌」發布,不允許新舊 ID 混寫。發布前過一遍: +緊湊短 ID 佈局的發布口徑是**可重置、無遷移指令碼**(決策 2026-09-15):新舊 ID 佈局不相容,生產 PG 主庫按「清空重灌」發布,不允許新舊 ID 混寫。發布前過一遍: -1. **清空重灌**:生產 PG 主庫 + 全部租戶庫清空,由各 host 啟動重建(CodeFirst 建表 + 種子資料重灌)。舊庫裡 18-19 位長 Id 的資料不要往新佈局遷——新舊 Id 空間重疊是資料完整性事故。 +1. **清空重灌**:生產 PG 主庫清空,由各 host 啟動重建(CodeFirst 建表 + 種子資料重灌)。舊庫裡 18-19 位長 Id 的資料不要往新佈局遷——新舊 Id 空間重疊是資料完整性事故。 2. **WorkerId 互斥核對**:同庫寫入的所有實例(Web.Api 副本 / Hub / Client)`SnowFlake__WorkerId` 兩兩不同且在 0-7。預設值 1/2/3 只保證單機部署不撞;擴副本前必須顯式分配。 3. **量級抽查**:重灌後抽查業務表主鍵應為 13-14 位數字(< 2^53)。看到 18-19 位說明有路徑沒走 Foundation 取號,停下來排查。 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 - - - - - - - diff --git a/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql b/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql index e8cd775c..3bbf22f3 100644 --- a/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql +++ b/GameFrameX.Admin.Unified.Api/docker/postgres/init.sql @@ -1,4 +1,3 @@ --- GameFrameX Admin 内置 PostgreSQL 初始化:首次启动自动创建主库与默认租户库。 +-- GameFrameX Admin 内置 PostgreSQL 初始化:首次启动自动创建主库(C406 起单主库,无独立业务库)。 -- 由 docker/postgres/initdb.d 挂载执行(仅数据卷为空时运行一次),账号由 compose 的 POSTGRES_USER 提供。 CREATE DATABASE gameframex_admin; -CREATE DATABASE gameframex_admin_tenant_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) // // 约定: diff --git a/GameFrameX.Admin.Unified.Vue/README.ja.md b/GameFrameX.Admin.Unified.Vue/README.ja.md index a4359d31..202394e2 100644 --- a/GameFrameX.Admin.Unified.Vue/README.ja.md +++ b/GameFrameX.Admin.Unified.Vue/README.ja.md @@ -28,7 +28,7 @@ GameFrameX ゲーム管理プラットフォームのフロントエンドプロジェクト。Vue 3 + TypeScript + Vite + PrimeVue で構築されています。 -> 本プロジェクトは [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin) を fork し、GameFrameX のマルチテナント / アプリケーションスコープモデルに合わせて改造したものです。現在のバージョンは ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(package.json 由来、自動同期)です。 +> 本プロジェクトは [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin) を fork し、GameFrameX の単一ゲーム管理バックエンドモデルに合わせて改造したものです。現在のバージョンは ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(package.json 由来、自動同期)です。 ## 目次 @@ -144,11 +144,8 @@ src/ │ ├── useCrudTable.ts テーブルページング / ソート / loading ラップ │ ├── useEditDialog.ts 追加 / 編集ダイアログ(監査フィールドの除去、isEnabled デフォルト) │ ├── useTableColumnPersistence.ts 列幅 / 列順 / 列表示のローカル永続化 -│ ├── useCurrentApp.ts 現在のアプリケーション(AppId)状態 + 読み込み / 切り替え -│ ├── useConfigAppScope.ts アプリケーションスコープ変更 │ ├── useRequiredFields.ts 必須フィールドの集合 │ ├── usePrimeTablePage.ts テーブルページング hook -│ ├── useRouteAppIdQuerySync.ts AppId query とテーブルの同期 │ ├── formResolver.ts フォームバリデーションルールの適合 │ └── types/ composables の TS 型 │ @@ -160,7 +157,6 @@ src/ │ ├── time-column/ テーブル列:long 秒を自動フォーマット │ ├── form-label / form-help-text フォームフィールドのラベル / ヘルプテキスト │ ├── app-confirm-dialog グローバル確認ダイアログ -│ ├── config-app-scope-picker アプリケーションスコープセレクター │ ├── narrow-screen-hint 狭画面ヒント │ ├── notice-bar 通知バー │ ├── cropper / drag-verify / editor / icon-selector / reward-items-editor / svg-icon / table @@ -190,7 +186,6 @@ src/ │ ├── index.ts ルーターインスタンス + ガード │ ├── frontEnd.ts フロントエンド制御ルート(フォールバック、現在未使用) │ ├── backEnd.ts バックエンド動的ルーティングの核 -│ ├── appWorkspaceRoutes.ts アプリケーションワークスペースルート │ ├── globalConfigRoutes.ts グローバル設定ルート │ └── route.ts 静的 / フォールバックルート(/login / 404 / 401) │ @@ -220,7 +215,6 @@ src/ │ ├── watermark.ts 透かし │ ├── isEnabled.ts IsEnabled の正規化と追加時デフォルト値 │ ├── rowVersion.ts 行バージョン読み取り(rowVersion / RowVersion 互換) -│ ├── targetTenant.ts テナント横断 header(X-Target-Tenant-Id) │ ├── primevue-locale.ts PrimeVue コンポーネントの言語切替 │ ├── formatTime.ts 日付 / 時刻フォーマット │ ├── download.ts / exportExcel.ts エクスポート @@ -228,15 +222,13 @@ src/ │ ├── fontawesome.ts FA 自動オンデマンド │ ├── icons.ts FA 名前マッピング │ ├── build.ts CDN 設定 -│ ├── appWorkspace.ts ※ アプリケーションスコープユーティリティ(resolveRouteScope など) │ ├── arrayOperation.ts / commonFunction.ts / base64Conver.ts / crudConfig.ts / getStyleSheets.ts / loading.ts / mitt.ts / other.ts / template-utils.ts │ └── http/ インターセプター分割 │ ├── views/ # 業務ページ -│ ├── system/ システム管理(ユーザー / ロール / メニュー / 組織 / テナント / 辞書 / ログ / 設定 / 通知 / プラグイン / 印刷 / 地域 / オンラインユーザー ……) +│ ├── system/ システム管理(ユーザー / ロール / メニュー / 辞書 / ログ / 設定 / 通知 ……) │ ├── game/ ゲーム管理(区服 / 商品 / 注文 / メール / 引換コード / ショップ / お知らせ / アイテム ……) │ ├── client/ クライアント管理(プラットフォーム / バージョン / チャネル / デバイス / 言語 / リソースパッケージ / オープン API ……) -│ ├── appCenter/ アプリケーションセンター(appEntry / appSelector / appWorkspace / gameAppEntity など) │ ├── contentCenter / chart / chartCenter / chartCenter / opsCenter / trustCenter / automationCenter / goodsCenter / redeemCenter / webShopCenter / playerCenter │ ├── home/ ホームダッシュボード │ ├── login/ ログイン @@ -295,6 +287,12 @@ pnpm run dev # デフォルト http://localhost:20800 ブラウザを開く → ログインページが表示される → バックエンド担当者にアカウントをもらう。 +初回デプロイのアカウントの由来(バックエンド側の 2 つの環境変数。リポジトリルートの `.env.example` 参照): + +- `GFX_SUPERADMIN_INITIAL_PASSWORD`:superadmin `superadmin` の初期パスワード。未設定の場合、ログインページ初回アクセス時に初回セットアップウィザードで設定します。 +- `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD`:ペアで設定すると、バックエンドの起動時に**最初の業務管理者**アカウントを自動作成します(`sys_admin` ロールにバインドされ、ノン超管メニューをすべて付与)。このアカウントでログインすれば業務管理画面に入れます。メイン DB に業務管理者がまだ存在しない間のみ一度だけ有効です。 +なお、プラットフォームのパスワードポリシーは既定で無効です。有効化すると 6–16 文字で大小英字・数字・記号が必要になるため、初期パスワードはその規則で設定し、公開前にポリシーを有効化してください。 + ### つまずいたら? | 症状 | 最も可能性が高い原因 | @@ -367,9 +365,9 @@ Vite 起動時にこれらの値が `public/config/config.js` の `window.__env_ **リクエストインターセプター**(4 ステップ): 1. `Authorization: Bearer ` を自動付与;JWT が期限切れ間近なら `X-Authorization: Bearer ` も同時に付与し、バックエンドに黙って再発行させる -2. `X-Target-Tenant-Id` を自動付与(テナント横断切替時は `utils/targetTenant.ts` が制御) -3. `request.ts` は追加で GET リクエストの `data` を query string にシリアライズ(`tansParams`) -4. `axios-utils.ts` は追加で `Accept-Language: ` を付与 +2. `request.ts` は追加で GET リクエストの `data` を query string にシリアライズ(`tansParams`) +3. `axios-utils.ts` は追加で `Accept-Language: ` を付与 +4. ページリクエストはグローバルのサーバー区セレクターから `ServerId` を読み込み、業務パラメータとして付与する **レスポンスインターセプター**(4 ステップ): @@ -381,17 +379,6 @@ Vite 起動時にこれらの値が `public/config/config.js` の `window.__env_ - その他 → バックエンドの `message` を表示 4. キャメルケース化(先頭大文字 → 小文字)+ エラー通知は PrimeVue Toast 経由 -### アプリケーションスコープ(マルチテナント) - -バックエンドメニューの各項目は `app_scope`(`platform` / `tenant` / `app`)と `menu_context` を持ちます。フロントエンドは `meta.appScope` + `meta.menuContext` でマークします: - -| Scope | 意味 | ルート例 | -|---|---|---| -| `platform` | プラットフォームレベル(超管理者のみ、テナント横断) | `/platform/*` | -| `tenant` | テナントレベル(全アプリ共通、appId query なし) | `/dashboard/*`、`/system/*` | -| `app` | アプリケーションワークスペース内(`appId` query 必須) | `/gameCenter/*` | - -遷移ロジックは `src/utils/appWorkspace.ts` の `decideTenantAppEntry()` / `resolveRouteScope()` にあり、`router/index.ts` の `resolveTenantAppRedirect()` がガード内で発火します。 ### Pinia 永続化 @@ -695,7 +682,7 @@ git push - **page / list / query / search / filter 系インターフェースで GET による params / data 送信は禁止**——`pnpm run check:frontend api-query-get` がブロックします - バックエンド生成 API は `xxxPagePost` / `xxxListPost` / `xxxQueryPost` を使用 - 手書き API は `request({ method: 'post', data: params })` を使用 -- 業務コードで `Authorization` / `Accept-Language` / `X-Tenant-Id` を手動で付与**しない**——インターセプターが自動処理 +- 業務コードで `Authorization` / `Accept-Language` を手動で付与**しない**——インターセプターが自動処理 - レスポンス内で手動 `showError` **しない**——インターセプターが業務コードを自動処理 ### コミットフロー @@ -977,7 +964,6 @@ echo "wrote ${FRONTEND_REPO}/openapi.json" - `src/utils/http/shared.ts` — HTTP インターセプター - `src/stores/userInfo.ts` — ユーザー情報 / ボタン権限 - `src/composables/useEditDialog.ts` — ダイアログの核 -- `src/utils/appWorkspace.ts` — マルチテナントアプリケーションスコープ - `scripts/check-frontend-standards.mjs` — クロスプラットフォーム規約ゲート ## ドキュメントとリソース diff --git a/GameFrameX.Admin.Unified.Vue/README.ko.md b/GameFrameX.Admin.Unified.Vue/README.ko.md index b7cd2836..ee2dcdbb 100644 --- a/GameFrameX.Admin.Unified.Vue/README.ko.md +++ b/GameFrameX.Admin.Unified.Vue/README.ko.md @@ -28,7 +28,7 @@ GameFrameX 게임 관리 플랫폼의 프런트엔드 프로젝트로, Vue 3 + TypeScript + Vite + PrimeVue 기반으로 구축되었습니다. -> 본 프로젝트는 [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin)에서 fork 하여 GameFrameX의 멀티 테넌트 / 앱 스코프 모델에 맞게 개조한 것입니다. 현재 버전 ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(package.json 기반, 자동 동기화). +> 본 프로젝트는 [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin)에서 fork 하여 GameFrameX 단일 게임 관리 백오피스 모델에 맞게 개조한 것입니다. 현재 버전 ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(package.json 기반, 자동 동기화). ## 목차 @@ -144,11 +144,8 @@ src/ │ ├── useCrudTable.ts 테이블 페이지네이션 / 정렬 / loading 래핑 │ ├── useEditDialog.ts 추가 / 수정 다이얼로그 (감사 필드 제거, isEnabled 기본값) │ ├── useTableColumnPersistence.ts 컬럼 너비 / 순서 / 표시 여부 로컬 영속화 -│ ├── useCurrentApp.ts 현재 앱 (AppId) 상태 + 로드 / 전환 -│ ├── useConfigAppScope.ts 앱 스코프 변경 │ ├── useRequiredFields.ts 필수 필드 집합 │ ├── usePrimeTablePage.ts 테이블 페이지네이션 hook -│ ├── useRouteAppIdQuerySync.ts AppId query와 테이블 동기화 │ ├── formResolver.ts 폼 검증 규칙 어댑터 │ └── types/ 컴포지션 함수의 TS 타입 │ @@ -160,7 +157,6 @@ src/ │ ├── time-column/ 테이블 컬럼: long 초 자동 포맷 │ ├── form-label / form-help-text 폼 필드 라벨 / 도움말 텍스트 │ ├── app-confirm-dialog 전역 확인 다이얼로그 -│ ├── config-app-scope-picker 앱 스코프 선택기 │ ├── narrow-screen-hint 좁은 화면 힌트 │ ├── notice-bar 공지 바 │ ├── cropper / drag-verify / editor / icon-selector / reward-items-editor / svg-icon / table @@ -190,7 +186,6 @@ src/ │ ├── index.ts 라우트 인스턴스 + 가드 │ ├── frontEnd.ts 프런트엔드 제어 라우팅 (폴백, 현재는 미사용) │ ├── backEnd.ts 백엔드 동적 라우팅 핵심 -│ ├── appWorkspaceRoutes.ts 앱 워크스페이스 라우팅 │ ├── globalConfigRoutes.ts 전역 설정 라우팅 │ └── route.ts 정적 / 폴백 라우팅 (/login / 404 / 401) │ @@ -220,7 +215,6 @@ src/ │ ├── watermark.ts 워터마크 │ ├── isEnabled.ts IsEnabled 정규화 및 신규 추가 기본값 │ ├── rowVersion.ts 행 버전 읽기 (rowVersion / RowVersion 호환) -│ ├── targetTenant.ts 테넌트 간 헤더 (X-Target-Tenant-Id) │ ├── primevue-locale.ts PrimeVue 컴포넌트 언어 전환 │ ├── formatTime.ts 날짜 / 시간 포맷 │ ├── download.ts / exportExcel.ts 내보내기 @@ -228,15 +222,13 @@ src/ │ ├── fontawesome.ts FA 자동 온디맨드 │ ├── icons.ts FA 이름 매핑 │ ├── build.ts CDN 설정 -│ ├── appWorkspace.ts ※ 앱 스코프 유틸리티 (resolveRouteScope 등) │ ├── arrayOperation.ts / commonFunction.ts / base64Conver.ts / crudConfig.ts / getStyleSheets.ts / loading.ts / mitt.ts / other.ts / template-utils.ts │ └── http/ 인터셉터 분리 │ ├── views/ # 비즈니스 페이지 -│ ├── system/ 시스템 관리 (사용자 / 역할 / 메뉴 / 조직 / 테넌트 / 사전 / 로그 / 설정 / 알림 / 플러그인 / 인쇄 / 지역 / 온라인 사용자 ……) +│ ├── system/ 시스템 관리 (사용자 / 역할 / 메뉴 / 사전 / 로그 / 설정 / 알림 ……) │ ├── game/ 게임 관리 (서버 / 상품 / 주문 / 메일 / 교환 코드 / 상점 / 공지 / 아이템 / 재화 ……) │ ├── client/ 클라이언트 관리 (플랫폼 / 버전 / 채널 / 기기 / 언어 / 리소스 패키지 / 오픈 API ……) -│ ├── appCenter/ 앱 센터 (appEntry / appSelector / appWorkspace / gameAppEntity 등) │ ├── contentCenter / chart / chartCenter / chartCenter / opsCenter / trustCenter / automationCenter / goodsCenter / redeemCenter / webShopCenter / playerCenter │ ├── home/ 홈 대시보드 │ ├── login/ 로그인 @@ -295,6 +287,12 @@ pnpm run dev # 기본 http://localhost:20800 브라우저를 열고 → 로그인 페이지가 보이면 → 백엔드 담당자에게 계정을 요청하세요. +최초 배포 계정의 출처(백엔드 측 환경 변수 2개, 저장소 루트의 `.env.example` 참조): + +- `GFX_SUPERADMIN_INITIAL_PASSWORD`: superadmin `superadmin`의 초기 비밀번호. 설정하지 않으면 로그인 페이지 첫 접속 시 초기 설치 마법사에서 설정합니다. +- `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD`: 쌍으로 설정하면 백엔드 기동 시 **첫 번째 업무 관리자** 계정을 자동 생성합니다(`sys_admin` 역할에 바인딩, 모든 non-superadmin 메뉴 부여). 이 계정으로 로그인하면 업무 관리 화면에 진입할 수 있습니다. 메인 DB에 업무 관리자가 아직 없는 동안에만 한 번 적용됩니다. +또한 플랫폼 비밀번호 정책은 기본적으로 꺼져 있습니다. 활성화하면 6–16자에 대소문자·숫자·특수문자가 필요하므로 초기 비밀번호를 그 규칙으로 설정하고 공개 전에 정책을 켜세요. + ### 막혔다면? | 증상 | 가장 유력한 원인 | @@ -367,9 +365,9 @@ Vite 시작 시 이 값들을 `public/config/config.js`의 `window.__env__`에 **요청 인터셉트** (4단계): 1. `Authorization: Bearer ` 자동 추가; JWT 만료가 임박하면 동시에 `X-Authorization: Bearer `을 추가해 백엔드가 조용히 재발급 -2. `X-Target-Tenant-Id` 자동 추가 (테넌트 간 전환 시 `utils/targetTenant.ts`가 제어) -3. `request.ts`는 GET 요청의 `data`를 query string으로 직렬화 (`tansParams`) -4. `axios-utils.ts`는 `Accept-Language: ` 추가 +2. `request.ts`는 GET 요청의 `data`를 query string으로 직렬화 (`tansParams`) +3. `axios-utils.ts`는 `Accept-Language: ` 추가 +4. 페이지 요청은 전역 서버 구역 셀렉터에서 `ServerId`를 읽어 업무 파라미터로 첨부 **응답 인터셉트** (4단계): @@ -381,17 +379,6 @@ Vite 시작 시 이 값들을 `public/config/config.js`의 `window.__env__`에 - 기타 → 백엔드 `message` 표시 4. 카멜케이스화 (첫 글자 대문자 → 소문자) + 오류 알림은 PrimeVue Toast 사용 -### 앱 스코프 (멀티 테넌트) - -백엔드 메뉴 각 항목에는 `app_scope`(`platform` / `tenant` / `app`)와 `menu_context`가 붙습니다. 프런트엔드는 `meta.appScope` + `meta.menuContext`로 표시합니다: - -| Scope | 의미 | 라우팅 예시 | -|---|---|---| -| `platform` | 플랫폼 수준 (최고 관리자만 보임, 테넌트 간) | `/platform/*` | -| `tenant` | 테넌트 수준 (모든 앱 공통, appId query 없음) | `/dashboard/*`, `/system/*` | -| `app` | 앱 워크스페이스 내 (`appId` query 필수) | `/gameCenter/*` | - -이동 로직은 `src/utils/appWorkspace.ts`의 `decideTenantAppEntry()` / `resolveRouteScope()`에 있으며, `router/index.ts`의 `resolveTenantAppRedirect()`가 가드에서 트리거합니다. ### Pinia 영속화 @@ -695,7 +682,7 @@ git push - **page / list / query / search / filter류 인터페이스는 GET으로 params / data 전송 금지**——`pnpm run check:frontend api-query-get`이 검사 - 백엔드 생성 API는 반드시 `xxxPagePost` / `xxxListPost` / `xxxQueryPost` 사용 - 수작성 API는 `request({ method: 'post', data: params })` 사용 -- 비즈니스 코드에서 `Authorization` / `Accept-Language` / `X-Tenant-Id`를 수동으로 추가하지 **마세요**——인터셉터가 자동 처리 +- 비즈니스 코드에서 `Authorization` / `Accept-Language`를 수동으로 추가하지 **마세요**——인터셉터가 자동 처리 - 응답에서 수동으로 `showError`하지 **마세요**——인터셉터가 비즈니스 코드를 자동 처리 ### 제출 흐름 @@ -977,7 +964,6 @@ echo "wrote ${FRONTEND_REPO}/openapi.json" - `src/utils/http/shared.ts` — HTTP 인터셉터 - `src/stores/userInfo.ts` — 사용자 정보 / 버튼 권한 - `src/composables/useEditDialog.ts` — 다이얼로그 핵심 -- `src/utils/appWorkspace.ts` — 멀티 테넌트 앱 스코프 - `scripts/check-frontend-standards.mjs` — 크로스 플랫폼 규칙 게이트 ## 문서 및 자료 diff --git a/GameFrameX.Admin.Unified.Vue/README.md b/GameFrameX.Admin.Unified.Vue/README.md index 48f947cc..32a25740 100644 --- a/GameFrameX.Admin.Unified.Vue/README.md +++ b/GameFrameX.Admin.Unified.Vue/README.md @@ -28,7 +28,7 @@ All-in-One Solution for Indie Game Development · Empowering Indie Developers' D The frontend project of the GameFrameX game management platform, built on Vue 3 + TypeScript + Vite + PrimeVue. -> This project is forked from [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin) and reworked for GameFrameX's multi-tenant / app-scope model. Current version ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json) (sourced from package.json, kept in sync automatically). +> This project is forked from [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin) and reworked for GameFrameX's single-game admin model. Current version ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json) (sourced from package.json, kept in sync automatically). ## Table of Contents @@ -144,11 +144,8 @@ src/ │ ├── useCrudTable.ts Table pagination / sorting / loading wrapper │ ├── useEditDialog.ts Add / edit dialog (strips audit fields, isEnabled default) │ ├── useTableColumnPersistence.ts Local persistence of column width / order / visibility -│ ├── useCurrentApp.ts Current app (AppId) state + load / switch -│ ├── useConfigAppScope.ts App-scope changes │ ├── useRequiredFields.ts Required-field sets │ ├── usePrimeTablePage.ts Table pagination hook -│ ├── useRouteAppIdQuerySync.ts Syncs AppId query with the table │ ├── formResolver.ts Form validation rule adapter │ └── types/ TS types for composables │ @@ -160,7 +157,6 @@ src/ │ ├── time-column/ Table column: auto-formats long seconds │ ├── form-label / form-help-text Form field label / help text │ ├── app-confirm-dialog Global confirm dialog -│ ├── config-app-scope-picker App-scope picker │ ├── narrow-screen-hint Narrow-screen hint │ ├── notice-bar Notice bar │ ├── cropper / drag-verify / editor / icon-selector / reward-items-editor / svg-icon / table @@ -190,7 +186,6 @@ src/ │ ├── index.ts Router instance + guards │ ├── frontEnd.ts Frontend-controlled routes (fallback, currently unused) │ ├── backEnd.ts Core of backend dynamic routing -│ ├── appWorkspaceRoutes.ts App workspace routes │ ├── globalConfigRoutes.ts Global config routes │ └── route.ts Static / fallback routes (/login / 404 / 401) │ @@ -220,7 +215,6 @@ src/ │ ├── watermark.ts Watermark │ ├── isEnabled.ts IsEnabled normalization and add defaults │ ├── rowVersion.ts Row version reading (supports rowVersion / RowVersion) -│ ├── targetTenant.ts Cross-tenant header (X-Target-Tenant-Id) │ ├── primevue-locale.ts PrimeVue components switch by language │ ├── formatTime.ts Date / time formatting │ ├── download.ts / exportExcel.ts Exports @@ -228,15 +222,13 @@ src/ │ ├── fontawesome.ts FA automatic on-demand loading │ ├── icons.ts FA name mapping │ ├── build.ts CDN config -│ ├── appWorkspace.ts ※ App-scope utilities (resolveRouteScope, etc.) │ ├── arrayOperation.ts / commonFunction.ts / base64Conver.ts / crudConfig.ts / getStyleSheets.ts / loading.ts / mitt.ts / other.ts / template-utils.ts │ └── http/ Interceptor split │ ├── views/ # Business pages -│ ├── system/ System management (users / roles / menus / orgs / tenants / dictionaries / logs / config / notifications / online users …) +│ ├── system/ System management (users / roles / menus / dictionaries / logs / config / notifications …) │ ├── game/ Game management (zones / goods / orders / mail / redeem codes / shop / announcements / items / props …) │ ├── client/ Client management (platforms / versions / channels / devices / languages / asset packages / open APIs …) -│ ├── appCenter/ App center (appEntry / appSelector / appWorkspace / gameAppEntity, etc.) │ ├── contentCenter / chart / chartCenter / chartCenter / opsCenter / trustCenter / automationCenter / goodsCenter / redeemCenter / webShopCenter / playerCenter │ ├── home/ Home dashboard │ ├── login/ Login @@ -295,6 +287,13 @@ pnpm run dev # defaults to http://localhost:20800 Open the browser → see the login page → ask a backend colleague for an account. +Where the first-deployment accounts come from (two backend-side environment variables, see the repo-root `.env.example`): + +- `GFX_SUPERADMIN_INITIAL_PASSWORD`: initial password of the superadmin `superadmin`; if unset, the first visit to the login page goes through the first-install wizard to set one. +- `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD`: when set together, backend startup automatically creates the **first business administrator** account (bound to the `sys_admin` role with all non-superadmin menus granted); sign in with it to enter the business back office. Takes effect only once, while the main database has no business administrator yet. + +The platform password policy is off by default; once enabled, passwords need 6–16 characters with upper/lower case, digits and a special character — set the initial password that way and enable the policy before go-live. + ### Stuck? | Symptom | Most likely cause | @@ -367,9 +366,9 @@ Two axios instances share the same interceptor factory: **Request interception** (4 steps): 1. Automatically adds `Authorization: Bearer `; if the JWT is about to expire, also adds `X-Authorization: Bearer ` so the backend silently reissues it -2. Automatically adds `X-Target-Tenant-Id` (controlled by `utils/targetTenant.ts` on cross-tenant switches) -3. `request.ts` additionally serializes `data` of GET requests into a query string (`tansParams`) -4. `axios-utils.ts` additionally adds `Accept-Language: ` +2. `request.ts` additionally serializes `data` of GET requests into a query string (`tansParams`) +3. `axios-utils.ts` additionally adds `Accept-Language: ` +4. Page requests read `ServerId` from the global server selector and attach it as a business parameter **Response interception** (4 steps): @@ -381,17 +380,6 @@ Two axios instances share the same interceptor factory: - otherwise → show the backend `message` 4. Camelization (initial uppercase → lowercase) + error toasts via PrimeVue Toast -### App scope (multi-tenancy) - -Each backend menu item carries `app_scope` (`platform` / `tenant` / `app`) and `menu_context`. The frontend marks them with `meta.appScope` + `meta.menuContext`: - -| Scope | Meaning | Route example | -|---|---|---| -| `platform` | Platform level (visible to super admins, cross-tenant) | `/platform/*` | -| `tenant` | Tenant level (shared by all apps, no appId query) | `/dashboard/*`, `/system/*` | -| `app` | Inside an app workspace (must carry the `appId` query) | `/gameCenter/*` | - -The redirect logic lives in `decideTenantAppEntry()` / `resolveRouteScope()` in `src/utils/appWorkspace.ts`, triggered inside the guard by `resolveTenantAppRedirect()` in `router/index.ts`. ### Pinia persistence @@ -695,7 +683,7 @@ If `pnpm run quality` fails, fix per the errors: missing i18n keys → add trans - **page / list / query / search / filter style endpoints must not pass params / data via GET** — `pnpm run check:frontend api-query-get` will block it - Backend-generated APIs must use `xxxPagePost` / `xxxListPost` / `xxxQueryPost` - Handwritten APIs use `request({ method: 'post', data: params })` -- **Do not** manually add `Authorization` / `Accept-Language` / `X-Tenant-Id` in business code — the interceptors handle it automatically +- **Do not** manually add `Authorization` / `Accept-Language` in business code — the interceptors handle it automatically - **Do not** manually call `showError` on responses — the interceptors handle business codes automatically ### Commit workflow @@ -977,7 +965,6 @@ To read concrete code, jump to: - `src/utils/http/shared.ts` — HTTP interceptors - `src/stores/userInfo.ts` — user info / button permissions - `src/composables/useEditDialog.ts` — dialog core -- `src/utils/appWorkspace.ts` — multi-tenant app scope - `scripts/check-frontend-standards.mjs` — cross-end standards gate ## Documentation & Resources diff --git a/GameFrameX.Admin.Unified.Vue/README.zh-CN.md b/GameFrameX.Admin.Unified.Vue/README.zh-CN.md index 86b49f72..ad2b22d4 100644 --- a/GameFrameX.Admin.Unified.Vue/README.zh-CN.md +++ b/GameFrameX.Admin.Unified.Vue/README.zh-CN.md @@ -28,7 +28,7 @@ GameFrameX 游戏管理平台的前端工程,基于 Vue 3 + TypeScript + Vite + PrimeVue 构建。 -> 本项目 fork 自 [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin),按 GameFrameX 的多租户 / 应用作用域模型做了改造。当前版本 ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(取自 package.json,自动同步)。 +> 本项目 fork 自 [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin),按 GameFrameX 单游戏管理后台模型做了改造。当前版本 ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(取自 package.json,自动同步)。 ## 目录 @@ -144,11 +144,8 @@ src/ │ ├── useCrudTable.ts 表格分页 / 排序 / loading 封装 │ ├── useEditDialog.ts 新增 / 编辑弹窗(剥离审计字段、isEnabled 默认) │ ├── useTableColumnPersistence.ts 列宽 / 列顺序 / 列显隐本地持久化 -│ ├── useCurrentApp.ts 当前应用(AppId)状态 + 加载 / 切换 -│ ├── useConfigAppScope.ts 应用作用域变更 │ ├── useRequiredFields.ts 必填字段集合 │ ├── usePrimeTablePage.ts 表格分页 hook -│ ├── useRouteAppIdQuerySync.ts AppId query 与表格同步 │ ├── formResolver.ts 表单校验规则适配 │ └── types/ 组合式函数的 TS 类型 │ @@ -160,7 +157,6 @@ src/ │ ├── time-column/ 表格列:long 秒自动格式化 │ ├── form-label / form-help-text 表单字段标签 / 帮助文字 │ ├── app-confirm-dialog 全局确认弹窗 -│ ├── config-app-scope-picker 应用作用域选择器 │ ├── narrow-screen-hint 窄屏提示 │ ├── notice-bar 通知条 │ ├── cropper / drag-verify / editor / icon-selector / reward-items-editor / svg-icon / table @@ -190,7 +186,6 @@ src/ │ ├── index.ts 路由实例 + 守卫 │ ├── frontEnd.ts 前端控制路由(兜底,目前用不到) │ ├── backEnd.ts 后端动态路由核心 -│ ├── appWorkspaceRoutes.ts 应用工作台路由 │ ├── globalConfigRoutes.ts 全局配置路由 │ └── route.ts 静态 / 兜底路由(/login / 404 / 401) │ @@ -220,7 +215,6 @@ src/ │ ├── watermark.ts 水印 │ ├── isEnabled.ts IsEnabled 归一化与新增默认值 │ ├── rowVersion.ts 行版本读取(兼容 rowVersion / RowVersion) -│ ├── targetTenant.ts 跨租户 header(X-Target-Tenant-Id) │ ├── primevue-locale.ts PrimeVue 组件按语言切换 │ ├── formatTime.ts 日期 / 时间格式化 │ ├── download.ts / exportExcel.ts 导出 @@ -228,15 +222,13 @@ src/ │ ├── fontawesome.ts FA 自动按需 │ ├── icons.ts FA 名称映射 │ ├── build.ts CDN 配置 -│ ├── appWorkspace.ts ※ 应用作用域工具(resolveRouteScope 等) │ ├── arrayOperation.ts / commonFunction.ts / base64Conver.ts / crudConfig.ts / getStyleSheets.ts / loading.ts / mitt.ts / other.ts / template-utils.ts │ └── http/ 拦截器拆分 │ ├── views/ # 业务页面 -│ ├── system/ 系统管理(用户 / 角色 / 菜单 / 组织 / 租户 / 字典 / 日志 / 配置 / 通知 / 在线用户 ……) +│ ├── system/ 系统管理(用户 / 角色 / 菜单 / 字典 / 日志 / 配置 / 通知 ……) │ ├── game/ 游戏管理(区服 / 商品 / 订单 / 邮件 / 兑换码 / 商城 / 公告 / 物品 / 道具 ……) │ ├── client/ 客户端管理(平台 / 版本 / 渠道 / 设备 / 语言 / 资源包 / 开放接口 ……) -│ ├── appCenter/ 应用中心(appEntry / appSelector / appWorkspace / gameAppEntity 等) │ ├── contentCenter / chart / chartCenter / chartCenter / opsCenter / trustCenter / automationCenter / goodsCenter / redeemCenter / webShopCenter / playerCenter │ ├── home/ 首页仪表盘 │ ├── login/ 登录 @@ -295,6 +287,12 @@ pnpm run dev # 默认 http://localhost:20800 打开浏览器 → 看到登录页 → 找后端同学要账号。 +首次部署的账号从哪来(后端侧两个环境变量,见仓库根 `.env.example`): + +- `GFX_SUPERADMIN_INITIAL_PASSWORD`:超级管理员 `superadmin` 的初始密码;不设则首次打开登录页走首装向导设置。 +- `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD`:成对设置时,后端启动会自动创建**首个业务管理员**账号(绑定 `sys_admin` 角色、授权全部非超管菜单),前端用它登录即可进业务后台;只在主库还没有任何业务管理员时生效一次。 +另外注意「平台密码策略」默认关闭:开启后口令需 6–16 位并含大小写字母、数字与特殊字符,建议初始口令按此设置并在上线前开启策略。 + ### 卡住了? | 现象 | 大概率原因 | @@ -367,9 +365,9 @@ Vite 启动时会把这些值写入 `public/config/config.js` 的 `window.__env_ **请求拦截**(4 步): 1. 自动加 `Authorization: Bearer `;如 JWT 即将过期,同时加 `X-Authorization: Bearer `,让后端静默换发 -2. 自动加 `X-Target-Tenant-Id`(跨租户切换时由 `utils/targetTenant.ts` 控制) -3. `request.ts` 额外把 GET 请求的 `data` 序列化为 query string(`tansParams`) -4. `axios-utils.ts` 额外加 `Accept-Language: ` +2. `request.ts` 额外把 GET 请求的 `data` 序列化为 query string(`tansParams`) +3. `axios-utils.ts` 额外加 `Accept-Language: ` +4. 页面请求从全局区服选择器读取 `ServerId` 并附带业务参数 **响应拦截**(4 步): @@ -381,17 +379,6 @@ Vite 启动时会把这些值写入 `public/config/config.js` 的 `window.__env_ - 其它 → 显示后端 `message` 4. 驼峰化(首字母大写 → 小写)+ 错误提示走 PrimeVue Toast -### 应用作用域(多租户) - -后端菜单每项带 `app_scope`(`platform` / `tenant` / `app`)与 `menu_context`。前端用 `meta.appScope` + `meta.menuContext` 标记: - -| Scope | 含义 | 路由示例 | -|---|---|---| -| `platform` | 平台级(超管可见,跨租户) | `/platform/*` | -| `tenant` | 租户级(所有应用共有,无 appId query) | `/dashboard/*`、`/system/*` | -| `app` | 应用工作台内(必须带 `appId` query) | `/gameCenter/*` | - -跳转逻辑在 `src/utils/appWorkspace.ts` 的 `decideTenantAppEntry()` / `resolveRouteScope()`,由 `router/index.ts` 的 `resolveTenantAppRedirect()` 在守卫里触发。 ### Pinia 持久化 @@ -695,7 +682,7 @@ git push - **page / list / query / search / filter 类接口禁止用 GET 传 params / data**——`pnpm run check:frontend api-query-get` 会卡 - 后端生成 API 必须用 `xxxPagePost` / `xxxListPost` / `xxxQueryPost` - 手写 API 用 `request({ method: 'post', data: params })` -- **不要**在业务代码里手动加 `Authorization` / `Accept-Language` / `X-Tenant-Id`——拦截器自动处理 +- **不要**在业务代码里手动加 `Authorization` / `Accept-Language`——拦截器自动处理 - **不要**在响应里手动 `showError`——拦截器自动处理业务码 ### 提交流程 @@ -977,7 +964,6 @@ echo "wrote ${FRONTEND_REPO}/openapi.json" - `src/utils/http/shared.ts` — HTTP 拦截器 - `src/stores/userInfo.ts` — 用户信息 / 按钮权限 - `src/composables/useEditDialog.ts` — 弹窗核心 -- `src/utils/appWorkspace.ts` — 多租户应用作用域 - `scripts/check-frontend-standards.mjs` — 跨端规范门禁 ## 文档与资源 diff --git a/GameFrameX.Admin.Unified.Vue/README.zh-TW.md b/GameFrameX.Admin.Unified.Vue/README.zh-TW.md index db61b1d5..9067a9bc 100644 --- a/GameFrameX.Admin.Unified.Vue/README.zh-TW.md +++ b/GameFrameX.Admin.Unified.Vue/README.zh-TW.md @@ -28,7 +28,7 @@ GameFrameX 遊戲管理平台的前端工程,基於 Vue 3 + TypeScript + Vite + PrimeVue 構建。 -> 本項目 fork 自 [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin),按 GameFrameX 的多租戶 / 應用作用域模型做了改造。當前版本 ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(取自 package.json,自動同步)。 +> 本項目 fork 自 [vue-next-admin](https://gitee.com/lyt-top/vue-next-admin),按 GameFrameX 單遊戲管理後台模型做了改造。當前版本 ![version](https://img.shields.io/github/package-json/v/GameFrameX/Admin?filename=GameFrameX.Admin.Unified.Vue/package.json)(取自 package.json,自動同步)。 ## 目錄 @@ -144,11 +144,8 @@ src/ │ ├── useCrudTable.ts 表格分頁 / 排序 / loading 封裝 │ ├── useEditDialog.ts 新增 / 編輯彈窗(剝離審計欄位、isEnabled 預設) │ ├── useTableColumnPersistence.ts 列寬 / 列順序 / 列顯隱本地持久化 -│ ├── useCurrentApp.ts 當前應用(AppId)狀態 + 載入 / 切換 -│ ├── useConfigAppScope.ts 應用作用域變更 │ ├── useRequiredFields.ts 必填欄位集合 │ ├── usePrimeTablePage.ts 表格分頁 hook -│ ├── useRouteAppIdQuerySync.ts AppId query 與表格同步 │ ├── formResolver.ts 表單校驗規則適配 │ └── types/ 組合式函式的 TS 型別 │ @@ -160,7 +157,6 @@ src/ │ ├── time-column/ 表格列:long 秒自動格式化 │ ├── form-label / form-help-text 表單欄位標籤 / 說明文字 │ ├── app-confirm-dialog 全域確認彈窗 -│ ├── config-app-scope-picker 應用作用域選擇器 │ ├── narrow-screen-hint 窄屏提示 │ ├── notice-bar 通知條 │ ├── cropper / drag-verify / editor / icon-selector / reward-items-editor / svg-icon / table @@ -190,7 +186,6 @@ src/ │ ├── index.ts 路由實例 + 守衛 │ ├── frontEnd.ts 前端控制路由(兜底,目前用不到) │ ├── backEnd.ts 後端動態路由核心 -│ ├── appWorkspaceRoutes.ts 應用工作台路由 │ ├── globalConfigRoutes.ts 全域組態路由 │ └── route.ts 靜態 / 兜底路由(/login / 404 / 401) │ @@ -220,7 +215,6 @@ src/ │ ├── watermark.ts 浮水印 │ ├── isEnabled.ts IsEnabled 歸一化與新增預設值 │ ├── rowVersion.ts 行版本讀取(相容 rowVersion / RowVersion) -│ ├── targetTenant.ts 跨租戶 header(X-Target-Tenant-Id) │ ├── primevue-locale.ts PrimeVue 元件按語言切換 │ ├── formatTime.ts 日期 / 時間格式化 │ ├── download.ts / exportExcel.ts 匯出 @@ -228,15 +222,13 @@ src/ │ ├── fontawesome.ts FA 自動按需 │ ├── icons.ts FA 名稱映射 │ ├── build.ts CDN 組態 -│ ├── appWorkspace.ts ※ 應用作用域工具(resolveRouteScope 等) │ ├── arrayOperation.ts / commonFunction.ts / base64Conver.ts / crudConfig.ts / getStyleSheets.ts / loading.ts / mitt.ts / other.ts / template-utils.ts │ └── http/ 攔截器拆分 │ ├── views/ # 業務頁面 -│ ├── system/ 系統管理(使用者 / 角色 / 選單 / 組織 / 租戶 / 字典 / 日誌 / 組態 / 通知 / 外掛 / 列印 / 區域 / 線上使用者 ……) +│ ├── system/ 系統管理(使用者 / 角色 / 選單 / 字典 / 日誌 / 組態 / 通知 ……) │ ├── game/ 遊戲管理(區服 / 商品 / 訂單 / 郵件 / 兌換碼 / 商城 / 公告 / 物品 / 道具 ……) │ ├── client/ 客戶端管理(平台 / 版本 / 渠道 / 裝置 / 語言 / 資源包 / 開放介面 ……) -│ ├── appCenter/ 應用中心(appEntry / appSelector / appWorkspace / gameAppEntity 等) │ ├── contentCenter / chart / chartCenter / chartCenter / opsCenter / trustCenter / automationCenter / goodsCenter / redeemCenter / webShopCenter / playerCenter │ ├── home/ 首頁儀表板 │ ├── login/ 登入 @@ -294,6 +286,12 @@ pnpm run dev # 預設 http://localhost:20800 打開瀏覽器 → 看到登入頁 → 找後端同學要帳號。 +首次部署的帳號從哪來(後端側兩個環境變數,見倉庫根 `.env.example`): + +- `GFX_SUPERADMIN_INITIAL_PASSWORD`:超級管理員 `superadmin` 的初始密碼;不設則首次開啟登入頁走首裝嚮導設定。 +- `GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT` + `GAMEFRAMEX_ADMIN_INITIAL_PASSWORD`:成對設定時,後端啟動會自動建立**首個業務管理員**帳號(綁定 `sys_admin` 角色、授權全部非超管選單),前端用它登入即可進業務後台;只在主庫還沒有任何業務管理員時生效一次。 +另注意「平台密碼策略」預設關閉:開啟後口令需 6–16 位並含大小寫字母、數字與特殊字元,建議初始口令按此設定並在上線前開啟策略。 + ### 卡住了? | 現象 | 大機率原因 | @@ -366,9 +364,9 @@ Vite 啟動時會把這些值寫入 `public/config/config.js` 的 `window.__env_ **請求攔截**(4 步): 1. 自動加 `Authorization: Bearer `;如 JWT 即將過期,同時加 `X-Authorization: Bearer `,讓後端靜默換發 -2. 自動加 `X-Target-Tenant-Id`(跨租戶切換時由 `utils/targetTenant.ts` 控制) -3. `request.ts` 額外把 GET 請求的 `data` 序列化為 query string(`tansParams`) -4. `axios-utils.ts` 額外加 `Accept-Language: ` +2. `request.ts` 額外把 GET 請求的 `data` 序列化為 query string(`tansParams`) +3. `axios-utils.ts` 額外加 `Accept-Language: ` +4. 頁面請求從全域區服選擇器讀取 `ServerId` 並附帶業務參數 **回應攔截**(4 步): @@ -380,17 +378,6 @@ Vite 啟動時會把這些值寫入 `public/config/config.js` 的 `window.__env_ - 其它 → 顯示後端 `message` 4. 駝峰化(首字母大寫 → 小寫)+ 錯誤提示走 PrimeVue Toast -### 應用作用域(多租戶) - -後端選單每項帶 `app_scope`(`platform` / `tenant` / `app`)與 `menu_context`。前端用 `meta.appScope` + `meta.menuContext` 標記: - -| Scope | 含義 | 路由示例 | -|---|---|---| -| `platform` | 平台級(超管可見,跨租戶) | `/platform/*` | -| `tenant` | 租戶級(所有應用共有,無 appId query) | `/dashboard/*`、`/system/*` | -| `app` | 應用工作台內(必須帶 `appId` query) | `/gameCenter/*` | - -跳轉邏輯在 `src/utils/appWorkspace.ts` 的 `decideTenantAppEntry()` / `resolveRouteScope()`,由 `router/index.ts` 的 `resolveTenantAppRedirect()` 在守衛裡觸發。 ### Pinia 持久化 @@ -694,7 +681,7 @@ git push - **page / list / query / search / filter 類介面禁止用 GET 傳 params / data**——`pnpm run check:frontend api-query-get` 會卡 - 後端生成 API 必須用 `xxxPagePost` / `xxxListPost` / `xxxQueryPost` - 手寫 API 用 `request({ method: 'post', data: params })` -- **不要**在業務程式碼裡手動加 `Authorization` / `Accept-Language` / `X-Tenant-Id`——攔截器自動處理 +- **不要**在業務程式碼裡手動加 `Authorization` / `Accept-Language`——攔截器自動處理 - **不要**在回應裡手動 `showError`——攔截器自動處理業務碼 ### 提交流程 @@ -976,7 +963,6 @@ echo "wrote ${FRONTEND_REPO}/openapi.json" - `src/utils/http/shared.ts` — HTTP 攔截器 - `src/stores/userInfo.ts` — 使用者資訊 / 按鈕權限 - `src/composables/useEditDialog.ts` — 彈窗核心 -- `src/utils/appWorkspace.ts` — 多租戶應用作用域 - `scripts/check-frontend-standards.mjs` — 跨端規範門禁 ## 文檔與資源 diff --git a/GameFrameX.Admin.Unified.Vue/e2e/stubs/online-generic.mjs b/GameFrameX.Admin.Unified.Vue/e2e/stubs/online-generic.mjs index 03f03620..b039bd27 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/stubs/online-generic.mjs +++ b/GameFrameX.Admin.Unified.Vue/e2e/stubs/online-generic.mjs @@ -33,7 +33,7 @@ const server = createServer(async (request, response) => { } }); -server.listen(port, '127.0.0.1', () => process.stdout.write(`Online generic stub: http://127.0.0.1:${port}/online/admin\n`)); +server.listen(port, process.env.E2E_STUB_HOST ?? '127.0.0.1', () => process.stdout.write(`Online generic stub: http://127.0.0.1:${port}/online/admin\n`)); for (const signal of ['SIGTERM', 'SIGINT']) process.on(signal, () => server.close()); export { server }; diff --git a/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-merge.mjs b/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-merge.mjs index 61261678..e302272a 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-merge.mjs +++ b/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-merge.mjs @@ -53,6 +53,6 @@ export function createMergeStub() { if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { const port = Number(process.env.MERGE_STUB_PORT ?? 22390); const server = createMergeStub(); - server.listen(port, '127.0.0.1', () => process.stdout.write(`Server merge stub: http://127.0.0.1:${port}/online/admin\n`)); + server.listen(port, process.env.E2E_STUB_HOST ?? '127.0.0.1', () => process.stdout.write(`Server merge stub: http://127.0.0.1:${port}/online/admin\n`)); for (const signal of ['SIGTERM', 'SIGINT']) process.on(signal, () => server.close()); } diff --git a/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-provision.mjs b/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-provision.mjs index f9165ef8..fd1888f7 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-provision.mjs +++ b/GameFrameX.Admin.Unified.Vue/e2e/stubs/server-provision.mjs @@ -51,7 +51,7 @@ const server = createServer(async (request, response) => { response.writeHead(400, { 'Content-Type': 'application/json' }).end(JSON.stringify({ code: 400, message: error.message })); } }); -server.listen(port, '127.0.0.1', () => process.stdout.write(`provision-ready:${port}\n`)); +server.listen(port, process.env.E2E_STUB_HOST ?? '127.0.0.1', () => process.stdout.write(`provision-ready:${port}\n`)); for (const signal of ['SIGINT', 'SIGTERM']) { process.on(signal, () => { server.closeAllConnections(); server.close(() => process.exit(0)); }); } 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 deleted file mode 100644 index 951f5193..00000000 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-menu-fixture.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { expect, type Page, type Browser } from '@playwright/test'; -import { anonPage, signIn, SUPERADMIN_STATE } from './helpers'; - -// 仅 setup 的授权准备可读管理菜单清单;导航/可见性断言始终读取真实侧边栏 DOM。 -// 不用新的 API 登录挤掉已经建立的 superadmin 会话:完整表单登录后同步重写其 storageState。 -// 两个 setup 串行运行,顺序任意,最后一次 superadmin 登录总是对应最新的状态文件。 -export function readField(value: unknown, name: string): unknown { - if (!value || typeof value !== 'object') return undefined; - const record = value as Record; - return record[name] ?? record[name[0].toUpperCase() + name.slice(1)]; -} - -function rows(value: unknown): unknown[] { - expect(Array.isArray(value)).toBe(true); - return value as unknown[]; -} - -function identifier(value: unknown): string { - expect(typeof value === 'string' || typeof value === 'number').toBe(true); - const result = String(value); - expect(result).toMatch(/^\d+$/); - return result; -} - -export function isolatedAdminOrigin(): string { - for (const name of ['E2E_APP_URL', 'E2E_ADMIN_API_URL']) { - const value = process.env[name]; - if (!value) throw new Error(`${name} 必须显式指向 C403 隔离栈`); - const url = new URL(value); - if (!['127.0.0.1', 'localhost', '[::1]'].includes(url.hostname) - || !url.port || ['20800', '20802', '20806', '20808', '5432'].includes(url.port)) { - throw new Error(`${name} 必须使用本机隔离端口,不能使用共享栈`); - } - } - return new URL(process.env.E2E_ADMIN_API_URL!).origin; -} - -export async function grantAdminMenus(browser: Browser, adminPage: Page, adminToken: string): Promise { - const origin = isolatedAdminOrigin(); - const rolesResponse = await adminPage.request.get(`${origin}/api/tenantRole/list`, { - headers: { Authorization: `Bearer ${adminToken}` }, - }); - expect(rolesResponse.ok()).toBe(true); - const rolesEnvelope: unknown = await rolesResponse.json(); - expect(readField(rolesEnvelope, 'code')).toBe(0); - const roles = rows(readField(rolesEnvelope, 'data')); - const configuredRole = process.env.E2E_ADMIN_ROLE_ID; - const candidates = roles.filter(role => configuredRole - ? identifier(readField(role, 'id')) === configuredRole - : ['admin', 'adminrole'].includes(String(readField(role, 'code')).toLowerCase())); - expect(candidates, '应有唯一 admin 角色;种子编码不同则设置 E2E_ADMIN_ROLE_ID').toHaveLength(1); - const roleId = identifier(readField(candidates[0], 'id')); - - const bootstrapPage = await anonPage(browser); - try { - const token = await signIn(bootstrapPage, process.env.E2E_SUPERADMIN_ACCOUNT ?? 'superadmin', - process.env.E2E_SUPERADMIN_PASSWORD ?? '123456'); - const headers = { Authorization: `Bearer ${token}` }; - const response = await bootstrapPage.request.get(`${origin}/api/globalMenu/list`, { headers }); - expect(response.ok()).toBe(true); - const envelope: unknown = await response.json(); - expect(readField(envelope, 'code')).toBe(0); - const menuIdentifiers: string[] = []; - const rootKeys: string[] = []; - const sharedSelectorKeys: string[] = []; - const visit = (nodes: unknown[], protectedAncestor = false): void => { - for (const node of nodes) { - expect(typeof readField(node, 'superAdminOnly')).toBe('boolean'); - const protectedBranch = protectedAncestor || readField(node, 'superAdminOnly') === true; - // 既有只读选择器例外允许业务页取平台/语言;仍不授予任何超管目录或管理叶子。 - const sharedSelector = readField(node, 'allowTenantWhenSuperAdminOnly') === true; - if (sharedSelector) { - expect(readField(node, 'type'), '租户可读例外只能是辅助按钮').toBe(3); - sharedSelectorKeys.push(String(readField(node, 'key'))); - } - if (!protectedBranch || sharedSelector) { - menuIdentifiers.push(identifier(readField(node, 'id'))); - if (String(readField(node, 'pid')) === '0' && readField(node, 'type') === 1) rootKeys.push(String(readField(node, 'key'))); - } - const children = readField(node, 'children'); - if (children != null) visit(rows(children), protectedBranch); - } - }; - visit(rows(readField(envelope, 'data'))); - expect(sharedSelectorKeys.sort()).toEqual(['globalLanguage:Select', 'globalPlatform:Select']); - expect(rootKeys.sort()).toEqual([ - 'route:dashboard', 'route:serverCenter', 'route:noticeCenter', 'route:gmCenter', 'route:player', - 'route:commerceCenter', 'route:clientDelivery', 'route:audit', 'route:system', - ].sort()); - // 调服务清除权限缓存;不直接写 SQL,也不依赖菜单种子的自动授权。 - const grant = await bootstrapPage.request.post(`${origin}/api/tenantRole/grantMenu`, { - headers, data: { id: roleId, menuIdList: [...new Set(menuIdentifiers)] }, - }); - expect(grant.ok()).toBe(true); - expect(readField(await grant.json(), 'code')).toBe(0); - await bootstrapPage.context().storageState({ path: SUPERADMIN_STATE }); - } finally { - await bootstrapPage.context().close(); - } -} diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-stack.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-stack.ts new file mode 100644 index 00000000..8373f18c --- /dev/null +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/admin-stack.ts @@ -0,0 +1,111 @@ +import { expect, type Page } from '@playwright/test'; +import { mkdir, readFile, writeFile } from 'node:fs/promises'; +import { dirname } from 'node:path'; +import { navigateByMenu } from './helpers'; + +// C406 / GFX-1232 集成第 2 轮(R6):业务管理员账号与 sys_admin 角色的全部非超管菜单授权 +// 已由 Web.Api 首启种子引导(GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT / _PASSWORD)创建, +// 原 admin-menu-fixture 的 role/grantMenu 主动授权例外随之删除;本文件只保留: +// 1. 隔离栈守卫(防止误打共享栈); +// 2. 信封字段读取工具(供向导用例解析响应); +// 3. 合服复核人账号的产品路径准备:由引导出来的 admin 在「账号管理」真实界面创建, +// 并通过「重置密码」取得明文初始口令,写入 state 目录供合服用例读取(不入证据目录)。 +export function readField(value: unknown, name: string): unknown { + if (!value || typeof value !== 'object') return undefined; + const record = value as Record; + return record[name] ?? record[name[0].toUpperCase() + name.slice(1)]; +} + +export function isolatedAdminOrigin(): string { + for (const name of ['E2E_APP_URL', 'E2E_ADMIN_API_URL']) { + const value = process.env[name]; + if (!value) throw new Error(`${name} 必须显式指向 C406 隔离栈`); + const url = new URL(value); + if (!['127.0.0.1', 'localhost', '[::1]'].includes(url.hostname) + || !url.port || ['20800', '20802', '20806', '20808', '5432'].includes(url.port)) { + throw new Error(`${name} 必须使用本机隔离端口,不能使用共享栈`); + } + } + return new URL(process.env.E2E_ADMIN_API_URL!).origin; +} + +export const REVIEWER_CREDENTIALS_FILE = 'e2e/.e2e/state/reviewer-credentials.json'; + +// 「账号管理」真实界面准备合服复核人:不存在则新增(绑定 sys_admin),随后重置密码取回明文口令。 +export async function ensureMergeReviewer(page: Page, account: string, realName: string): Promise { + await navigateByMenu(page, '账号管理', '系统'); + const table = page.locator('.p-datatable-tbody'); + await expect(table).toBeVisible({ timeout: 20_000 }); + + const search = page.locator('label:has-text("账号")').locator('..').locator('input'); + await search.fill(account); + await page.getByRole('button', { name: '查询', exact: true }).click(); + await page.waitForTimeout(600); + const existingRow = table.locator('tr').filter({ hasText: account }); + if (await existingRow.count() === 0) { + await page.getByRole('button', { name: '新增', exact: true }).click(); + const dialog = page.locator('.p-dialog:visible').first(); + await expect(dialog).toBeVisible(); + // BaseEditDialog 自带隐藏 id 输入,按占位符定位可见业务输入 + await dialog.getByPlaceholder('账号名称').fill(account); + await dialog.getByPlaceholder('真实姓名').fill(realName); + await dialog.getByPlaceholder('手机号码').fill('13800000002'); + // 生日(必填):DatePicker 直接键入固定日期后失焦(对话框含出生/入职两个日期框,按占位符区分) + const birthday = dialog.getByRole('combobox', { name: '出生日期' }); + await birthday.fill('1990-01-01'); + await birthday.press('Enter'); + // 角色集合:绑定种子引导出的 sys_admin(全部非超管菜单) + await dialog.locator('.p-multiselect').click(); + await page.getByRole('option', { name: /sys_admin|系统管理员/ }).first().click(); + await page.keyboard.press('Escape'); + await dialog.getByRole('button', { name: '确定', exact: true }).click(); + await expect(dialog).toBeHidden({ timeout: 20_000 }); + await page.waitForTimeout(600); + } + + // 重置密码 → toast 回读明文口令(产品路径;口令只落 state 目录,不进证据) + await search.fill(account); + await page.getByRole('button', { name: '查询', exact: true }).click(); + await page.waitForTimeout(600); + const row = table.locator('tr').filter({ hasText: account }).first(); + await expect(row).toBeVisible(); + // 重置密码在行内「更多」弹出菜单(图标按钮无可访问名,是行内第二个按钮); + // PrimeVue popup 菜单带过渡动画,偶发开合竞态,允许再点一次按钮重开 + const menuItem = page.getByRole('menuitem', { name: '重置密码' }); + for (let attempt = 0; attempt < 2; attempt += 1) { + await row.getByRole('button').nth(1).click(); + try { + await menuItem.click({ timeout: 5_000 }); + break; + } catch { + if (attempt === 1) throw new Error('重置密码菜单项无法点击'); + await page.waitForTimeout(400); + } + } + await page.getByRole('button', { name: '确定', exact: true }).click(); + const toast = page.locator('.p-toast-message-text'); + await expect(toast.first()).toBeVisible({ timeout: 15_000 }); + const toastText = (await toast.first().innerText()).trim(); + const match = toastText.match(/[::]\s*(\S+)\s*$/); + expect(match, `重置密码 toast 应包含明文口令:${toastText.slice(0, 40)}`).toBeTruthy(); + const password = match![1]; + + // 口令可用性即刻验证:复核人真实表单登录(本页上下文先退出由调用方负责) + await mkdir(dirname(REVIEWER_CREDENTIALS_FILE), { recursive: true }); + await writeFile(REVIEWER_CREDENTIALS_FILE, JSON.stringify({ account, password }, null, 2), 'utf-8'); +} + +// 合服用例读取复核人凭证:环境变量优先,回落到 setup 写入的 state 文件。 +export async function readMergeReviewerCredentials(): Promise<{ account: string; password: string }> { + const account = process.env.E2E_MERGE_REVIEWER_ACCOUNT; + const password = process.env.E2E_MERGE_REVIEWER_PASSWORD; + if (account && password) { + return { account, password }; + } + const raw = await readFile(REVIEWER_CREDENTIALS_FILE, 'utf-8'); + const parsed = JSON.parse(raw) as { account: string; password: string }; + expect(parsed.account, '复核人凭证文件缺少账号').toBeTruthy(); + expect(parsed.password, '复核人凭证文件缺少口令').toBeTruthy(); + return parsed; +} + diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/auth.setup.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/auth.setup.e2e.ts index 58ef2530..9baa4e60 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/auth.setup.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/auth.setup.e2e.ts @@ -1,17 +1,20 @@ import { test, expect } from '@playwright/test'; -import { ADMIN_ROOTS, ADMIN_STATE, logoutByMenu, signIn, shot } from './helpers'; +import { ADMIN_ROOTS, ADMIN_STATE, shot, signIn } from './helpers'; import { renderedMenuGroups } from './module-coverage'; -import { grantAdminMenus, isolatedAdminOrigin } from './admin-menu-fixture'; +import { ensureMergeReviewer, isolatedAdminOrigin } from './admin-stack'; -test('sign in as tenant admin', async ({ page, browser }) => { +// C406 / GFX-1232 集成第 2 轮(R6):admin 账号由 Web.Api 首启种子引导创建 +// (GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT / _PASSWORD,取值与 E2E_ACCOUNT / E2E_PASSWORD 一致), +// sys_admin 角色已随引导获得全部非超管菜单——本 setup 不再做 role/grantMenu 主动授权。 +test('sign in as admin', async ({ page }) => { isolatedAdminOrigin(); const account = process.env.E2E_ACCOUNT ?? 'admin'; const password = process.env.E2E_PASSWORD ?? '123456'; - const token = await signIn(page, account, password); - await grantAdminMenus(browser, page, token); - await logoutByMenu(page); + // 新装首启后的第一次表单登录即成功(引导由 HostedService 在启动期同步完成,无竞态) await signIn(page, account, password); expect((await renderedMenuGroups(page)).map(group => group.group)).toEqual([...ADMIN_ROOTS]); await shot(page, 'admin-authorized-nine-roots'); + // 合服复核人走产品路径准备:引导出来的 admin 在「账号管理」真实界面创建并重置口令 + await ensureMergeReviewer(page, process.env.E2E_MERGE_REVIEWER_NAME ?? 'e2e_merge_reviewer', 'E2E 合服复核人'); await page.context().storageState({ path: ADMIN_STATE }); }); diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/client-api-protocol-correlation.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/client-api-protocol-correlation.e2e.ts deleted file mode 100644 index 113e23af..00000000 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/client-api-protocol-correlation.e2e.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { expect, test, type Page } from '@playwright/test'; -import { expectOverview, navigateByMenu, shot } from './helpers'; - -const CLIENT_API_URL = process.env.E2E_CLIENT_API_URL; -const CLIENT_TENANT_ID = process.env.E2E_CLIENT_TENANT_ID; -const CLIENT_APP_ID = process.env.E2E_CLIENT_APP_ID; -const CLIENT_APP_SECRET = process.env.E2E_CLIENT_APP_SECRET; -const CLIENT_PROTO_VERSION = process.env.E2E_CLIENT_PROTO_VERSION ?? 'cola/1.0.0'; - -function requireClientEnvironment(): { url: string; tenantId: string; appId: string; appSecret: string } { - const missing = [ - ['E2E_CLIENT_API_URL', CLIENT_API_URL], - ['E2E_CLIENT_TENANT_ID', CLIENT_TENANT_ID], - ['E2E_CLIENT_APP_ID', CLIENT_APP_ID], - ['E2E_CLIENT_APP_SECRET', CLIENT_APP_SECRET], - ].filter(([, value]) => !value).map(([name]) => name); - if (missing.length > 0) { - throw new Error(`新协议 Client.Api e2e 缺少隔离栈变量:${missing.join(', ')}`); - } - - const url = new URL(CLIENT_API_URL!); - if (!['127.0.0.1', 'localhost', '[::1]'].includes(url.hostname) || !url.port - || ['20800', '20802', '20806', '20808', '5432'].includes(url.port)) { - throw new Error('E2E_CLIENT_API_URL 必须指向本机隔离 Client.Api 端口,不能使用共享栈端口'); - } - return { - url: url.origin, - tenantId: CLIENT_TENANT_ID!, - appId: CLIENT_APP_ID!, - appSecret: CLIENT_APP_SECRET!, - }; -} - -async function requestStartupEndpoint( - page: Page, - url: string, - headers: Record, -): Promise<{ status: number; body: unknown }> { - return page.evaluate(async ({ endpoint, requestHeaders }) => { - const response = await fetch(endpoint, { - method: 'POST', - headers: { 'Content-Type': 'application/json', ...requestHeaders }, - body: JSON.stringify({ - Platform: 'ios', - PackageName: 'com.gameframex.e2e', - AppVersion: '0.0.0', - Language: 'zh-CN', - Channel: 'official', - DeviceId: 'c405-protocol-e2e', - }), - }); - let body: unknown = null; - try { - body = await response.json(); - } catch { - // The status assertion below still reports protocol middleware failures clearly. - } - return { status: response.status, body }; - }, { - endpoint: `${url}/api/GameRemoteConfig/GetInfo`, - requestHeaders: headers, - }); -} - -test('Client.Api 新协议鉴权头经真实 Admin 菜单关联到启动配置端点', async ({ page }) => { - let policyPageRequested = false; - await page.route(/\/api\/clientApiPolicy\/page/, async route => { - if (route.request().method() === 'POST') policyPageRequested = true; - await route.continue(); - }); - - await page.goto('/'); - await expectOverview(page); - await navigateByMenu(page, 'Client API 策略', 'C 端交付'); - await expect(page).toHaveURL(/#\/clientDelivery\/tenantClientApiPolicyEntity/); - await expect(page.locator('.p-datatable')).toBeVisible(); - expect(policyPageRequested, '真实菜单页面应读取 Client.Api 策略').toBe(true); - - const client = requireClientEnvironment(); - const headers = { - 'GameFrameX-Tenant-Id': client.tenantId, - 'GameFrameX-App-Id': client.appId, - 'GameFrameX-App-Secret': client.appSecret, - 'X-Proto-Ver': CLIENT_PROTO_VERSION, - }; - const accepted = await requestStartupEndpoint(page, client.url, headers); - // 业务信封固定 HTTP 200(HttpJsonResultData),业务码承载结果:0 = 成功,404 = 配置未命中。 - // 只接受这两种已确认结果,防止 401/403/500 的 JSON 错误体误判为通过(CodeRabbit PR #25)。 - expect(accepted.status).toBe(200); - const acceptedBody = accepted.body as { code?: number }; - expect( - [0, 404], - '带完整新协议头的请求必须命中成功(0)或配置未命中(404),不得是鉴权/服务器错误', - ).toContain(acceptedBody?.code); - - const missingProto = await requestStartupEndpoint(page, client.url, { - 'GameFrameX-Tenant-Id': client.tenantId, - 'GameFrameX-App-Id': client.appId, - 'GameFrameX-App-Secret': client.appSecret, - }); - expect(missingProto.status, '普通 Client.Api 请求缺失 X-Proto-Ver 必须拒绝').toBe(400); - await shot(page, 'client-api-protocol-correlation'); -}); diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/client-api-protocol.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/client-api-protocol.e2e.ts new file mode 100644 index 00000000..96421c12 --- /dev/null +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/client-api-protocol.e2e.ts @@ -0,0 +1,98 @@ +import { expect, test, type Page } from '@playwright/test'; +import { expectOverview, navigateByMenu, shot } from './helpers'; + +// C406 / GFX-1232:替代 C405 的 client-api-protocol-correlation 用例。 +// 新单游戏协议只认 X-Proto-Ver;旧三头(GameFrameX-Tenant-Id / GameFrameX-App-Id / GameFrameX-App-Secret) +// 在生产代码已无读取方——本用例证明:附带旧头时结果与不带时完全一致(被忽略)。 +const CLIENT_API_URL = process.env.E2E_CLIENT_API_URL; +const CLIENT_PROTO_VERSION = process.env.E2E_CLIENT_PROTO_VERSION ?? 'cola/1.0.0'; + +function requireClientEnvironment(): string { + if (!CLIENT_API_URL) { + throw new Error('新协议 Client.Api e2e 缺少隔离栈变量:E2E_CLIENT_API_URL'); + } + const url = new URL(CLIENT_API_URL); + if (!['127.0.0.1', 'localhost', '[::1]'].includes(url.hostname) || !url.port + || ['20800', '20802', '20806', '20808', '5432'].includes(url.port)) { + throw new Error('E2E_CLIENT_API_URL 必须指向本机隔离 Client.Api 端口,不能使用共享栈端口'); + } + return url.origin; +} + +async function requestStartupEndpoint( + page: Page, + url: string, + headers: Record, +): Promise<{ status: number; body: unknown }> { + return page.evaluate(async ({ endpoint, requestHeaders }) => { + const response = await fetch(endpoint, { + method: 'POST', + headers: { 'Content-Type': 'application/json', ...requestHeaders }, + body: JSON.stringify({ + Platform: 'ios', + PackageName: 'com.gameframex.e2e', + AppVersion: '0.0.0', + Language: 'zh-CN', + Channel: 'official', + DeviceId: 'c406-protocol-e2e', + }), + }); + let body: unknown = null; + try { + body = await response.json(); + } catch { + // 状态断言足以区分协议中间件的拒绝形态。 + } + return { status: response.status, body }; + }, { + endpoint: `${url}/api/GameRemoteConfig/GetInfo`, + requestHeaders: headers, + }); +} + +test('Client.Api 新协议 X-Proto-Ver 关联与旧作用域头被忽略', async ({ page }) => { + let policyPageRequested = false; + await page.route(/\/api\/clientApiPolicy\/page/, async route => { + if (route.request().method() === 'POST') policyPageRequested = true; + await route.continue(); + }); + + await page.goto('/'); + await expectOverview(page); + await navigateByMenu(page, 'Client API 策略', 'C 端交付'); + await expect(page).toHaveURL(/#\/clientDelivery\/clientApiPolicyEntity/); + await expect(page.locator('.p-datatable')).toBeVisible(); + expect(policyPageRequested, '真实菜单页面应读取改名后的 Client.Api 策略接口').toBe(true); + + const client = requireClientEnvironment(); + + // 1. 带 X-Proto-Ver:业务信封 HTTP 200,业务码 0(成功)或 404(配置未命中)。 + const accepted = await requestStartupEndpoint(page, client, { 'X-Proto-Ver': CLIENT_PROTO_VERSION }); + expect(accepted.status).toBe(200); + const acceptedBody = accepted.body as { code?: number }; + expect( + [0, 404], + '带 X-Proto-Ver 的请求必须命中成功(0)或配置未命中(404),不得是鉴权/服务器错误', + ).toContain(acceptedBody?.code); + + // 2. 缺 X-Proto-Ver:协议中间件拒绝 400。 + const missingProto = await requestStartupEndpoint(page, client, {}); + expect(missingProto.status, '缺失 X-Proto-Ver 必须拒绝').toBe(400); + + // 3. 附带旧三头:结果与不带时完全一致(旧头被忽略,不参与解析、不改变结果)。 + const legacyHeaders: Record = { + 'GameFrameX-Tenant-Id': '1300000000001', + 'GameFrameX-App-Id': '1081001', + 'GameFrameX-App-Secret': 'legacy-secret-not-read', + }; + const withLegacy = await requestStartupEndpoint(page, client, legacyHeaders); + expect(withLegacy.status, '附带旧作用域头不得改变拒绝结果').toBe(missingProto.status); + const withLegacyAndProto = await requestStartupEndpoint(page, client, { + 'X-Proto-Ver': CLIENT_PROTO_VERSION, + ...legacyHeaders, + }); + expect(withLegacyAndProto.status).toBe(accepted.status); + expect((withLegacyAndProto.body as { code?: number })?.code).toBe(acceptedBody?.code); + + await shot(page, 'client-api-protocol'); +}); 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..5486684e 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/, @@ -322,6 +322,8 @@ test.describe('CRUD 功能闭环(首批)', () => { // editable/只读 Select 点输入框不开面板:兜底点专用下拉钮 await page.locator(`.p-dialog >> .p-select-dropdown >> nth=${selectIndex}`).click(); } + // 选项异步懒加载(如分组列表):先等首项可见再点,避免空面板竞态 + await firstOption.first().waitFor({ state: 'visible', timeout: 8_000 }); await firstOption.first().click(); selectIndex += 1; } else if (field === 'unique-number') { @@ -388,3 +390,95 @@ test.describe('CRUD 功能闭环(首批)', () => { }); } }); + +// 广告回调配置闭环(F2 / R5:配置按分包绑定):该页对话框是 schema 驱动(Provider 参数区 + 密钥 Password 框), +// 不进通用 CRUD 矩阵(fields 引擎不覆盖 password 型字段),此处专项覆盖: +// 新增必须先选分包 → 提交链带 packageId;编辑弹窗回显所选分包标签;更新与删除闭环。 +// 权限口径(协调者裁定):跨页选择器沿用 gameAppPackage Select 现有消费约定(同 remoteConfig / gamePaymentConfigEntity), +// 不为本页单独补按钮权限;e2e 的 admin 夹具授予全部非超管菜单,包含 gameAppPackage:Select。 +test.describe('广告回调配置分包闭环(F2)', () => { + test('广告回调配置 选分包新增 编辑回显 更新删除', async ({ page }) => { + const token = `GFX_E2E_ADCB_${Date.now().toString(36)}`; + + let created = false; + let updated = false; + let deleted = false; + await page.route(/advertisementCallbackConfig\/add/, async (route) => { + created = true; + await route.continue(); + }); + await page.route(/advertisementCallbackConfig\/update/, async (route) => { + updated = true; + await route.continue(); + }); + await page.route(/advertisementCallbackConfig\/delete/, async (route) => { + deleted = true; + await route.continue(); + }); + + await page.goto('/'); + await expectOverview(page); + await navigateByMenu(page, '广告回调验签', 'C 端交付'); + await expect(page.locator('.p-datatable-tbody')).toBeVisible({ timeout: 20_000 }); + + // 前置清理:失败重跑可能留下 (PackageId, Provider) 配置,唯一约束会令新增被拒; + // 只清本用例会选中的选项 0(分包夹具 com.e2e.pkg.alpha)上的遗留行 + for (let guard = 0; guard < 5; guard += 1) { + const stale = page.locator('.p-datatable-tbody tr').filter({ hasText: 'com.e2e.pkg.alpha' }).first(); + if (await stale.count() === 0) { + break; + } + await stale.getByText('删除', { exact: true }).click(); + await page.locator('role=button[name="确定"]').first().click(); + await page.waitForTimeout(500); + } + + // —— 新增:Provider 默认 TopOn(schema 参数区异步加载后出现);分包选择器在 Provider 之后 —— + await page.locator('role=button[name="新增"]').first().click(); + await expect(page.locator('.p-dialog')).toBeVisible({ timeout: 10_000 }); + await expect(page.locator('.p-dialog .parameter-panel')).toBeVisible({ timeout: 10_000 }); + + await page.locator('.p-dialog >> role=combobox >> nth=1').click(); + const firstPackageOption = page.locator('role=option >> nth=0'); + await firstPackageOption.first().waitFor({ state: 'visible', timeout: 8_000 }); + await firstPackageOption.first().click(); + // 记录所选分包标签,供编辑回显断言 + const chosenPackageLabel = await page.locator('.p-dialog >> role=combobox >> nth=1').evaluate((el) => { + const label = el.closest('.p-select')?.querySelector('.p-select-label'); + return (label?.textContent ?? '').trim(); + }); + expect(chosenPackageLabel.length, '分包选择器未回显所选标签').toBeGreaterThan(0); + + // schema 参数区:首个文本框为回调 URL(承载 token 锚点),TopOn 的 sec_key 是 Password 框 + await page.locator('.p-dialog >> role=textbox >> nth=0').fill(`https://cb.example.test/${token}`); + await page.locator('.p-dialog .p-password input').first().fill('e2e-adcb-secret'); + + await page.locator('role=button[name="确定"]').first().click(); + await expect.poll(() => created, '广告回调配置新增请求未发出').toBe(true); + await expect(page.locator('.p-datatable-tbody')).toContainText(token, { timeout: 20_000 }); + + // —— 编辑:分包选择器必须回显新增时所选分包(R5 绑定后 packageId 是配置身份的一部分)—— + await page.locator(`tr:has-text("${token}") >> text=编辑`).first().click(); + await expect(page.locator('.p-dialog')).toBeVisible({ timeout: 10_000 }); + await expect(page.locator('.p-dialog .parameter-panel')).toBeVisible({ timeout: 10_000 }); + const echoedPackageLabel = await page.locator('.p-dialog >> role=combobox >> nth=1').evaluate((el) => { + const label = el.closest('.p-select')?.querySelector('.p-select-label'); + return (label?.textContent ?? '').trim(); + }); + expect(echoedPackageLabel, '编辑弹窗未回显新增时所选分包').toBe(chosenPackageLabel); + const echoedUrl = await page.locator('.p-dialog >> role=textbox >> nth=0').inputValue(); + expect(echoedUrl, '编辑弹窗未回显回调 URL').toContain(token); + + await page.locator('role=button[name="确定"]').first().click(); + await expect.poll(() => updated, '广告回调配置更新请求未发出').toBe(true); + await expect(page.locator('.p-datatable-tbody')).toContainText(token, { timeout: 20_000 }); + + // —— 删除闭环 —— + await page.locator(`tr:has-text("${token}") >> text=删除`).first().click(); + await page.locator('role=button[name="确定"]').first().click(); + await expect.poll(() => deleted, '广告回调配置删除请求未发出').toBe(true); + await expect(page.locator('.p-datatable-tbody')).not.toContainText(token, { timeout: 20_000 }); + + await shot(page, 'crud-roundtrip-广告回调配置'); + }); +}); diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/e2e-integration-checks.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/e2e-integration-checks.e2e.ts new file mode 100644 index 00000000..856257af --- /dev/null +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/e2e-integration-checks.e2e.ts @@ -0,0 +1,488 @@ +import { createHmac, createHash } from 'node:crypto'; +import { expect, test, type Page } from '@playwright/test'; +import { ADMIN_ROOTS, expectOverview, navigateByMenu, shot, signIn, logoutByMenu } from './helpers'; +import { renderedMenuGroups } from './module-coverage'; + +// C406 / GFX-1232 集成轮专项断言(第 1 轮 a–g + 第 2 轮 h/i/j)。 +// 全部走真实菜单 / 真实表单 / 浏览器内 fetch;每项独立用例并 shot() 留证。 + +const HUB_API = process.env.E2E_HUB_API_URL; +const CLIENT_API = process.env.E2E_CLIENT_API_URL; + +// 第 2 轮 (i)/(j) 的分包夹具(evidence-integration-2 环境准备 SQL 预置,is_enabled=true) +const FIXTURE_PACKAGE_A = { id: 9200000000101, label: 'com.e2e.pkg.alpha' }; +const FIXTURE_PACKAGE_B = { id: 9200000000102, label: 'com.e2e.pkg.beta' }; + +// —— (a) 登录页没有租户字段,admin 与超管都能通过表单登录 —— +test('a 登录表单无租户字段且双身份表单登录', async ({ browser }) => { + const context = await browser.newContext({ storageState: { cookies: [], origins: [] } }); + const page = await context.newPage(); + await page.goto('/#/login'); + await expect(page.locator('#login-account')).toBeVisible(); + await expect(page.locator('#login-password')).toBeVisible(); + // 全表单只有账号与密码两个输入,不存在任何租户/作用域输入或下拉 + expect(await page.locator('input[id], select[id]').count()).toBe(2); + expect(await page.locator('input[id*="tenant" i], select[id*="tenant" i], input[placeholder*="租户"]').count()).toBe(0); + await shot(page, 'c406-a-login-form-no-tenant-field'); + + // admin 表单登录(种子默认密码经 e2e 环境注入) + await signIn(page, process.env.E2E_ACCOUNT ?? 'admin', process.env.E2E_PASSWORD ?? '123456'); + await expectOverview(page); + await shot(page, 'c406-a-admin-landed'); + await logoutByMenu(page); + + // 超管表单登录(首装密码经 GFX_SUPERADMIN_INITIAL_PASSWORD 注入) + await signIn(page, process.env.E2E_SUPERADMIN_ACCOUNT ?? 'superadmin', + process.env.E2E_SUPERADMIN_PASSWORD ?? '123456'); + await expectOverview(page); + await shot(page, 'c406-a-superadmin-landed'); + await context.close(); +}); + +// —— (c) 改名后的 8 个页面经真实菜单打开、请求改名后的接口、表格渲染 —— +const RENAMED_PAGES = [ + { leaf: '广告回调验签', root: 'C 端交付', urlPart: /#\/clientDelivery\/advertisementCallbackConfigEntity/, api: '/api/advertisementCallbackConfig/page' }, + { leaf: '传输签名密钥', root: 'C 端交付', urlPart: /#\/clientDelivery\/appSignatureKeyEntity/, api: '/api/appSignatureKey/page' }, + { leaf: '渠道定义', root: 'C 端交付', urlPart: /#\/clientDelivery\/channelDefinition/, api: '/api/channelDefinition/page' }, + { leaf: 'Client API 策略', root: 'C 端交付', urlPart: /#\/clientDelivery\/clientApiPolicyEntity/, api: '/api/clientApiPolicy/page' }, + { leaf: '登录票据密钥', root: 'C 端交付', urlPart: /#\/clientDelivery\/gameLoginTicketKeyEntity/, api: '/api/gameLoginTicketKey/page' }, + { leaf: '会话密钥', root: 'C 端交付', urlPart: /#\/clientDelivery\/sessionKeyEntity/, api: '/api/sessionKey/page' }, + { leaf: '对象存储配置', root: '系统', urlPart: /#\/system\/objectStorageConfigEntity/, api: '/api/objectStorageConfig/page' }, +] as const; +// 广告奖励账本为设计内隐藏页(种子 IsHide=true,与权益发货账本同款先例,侧边栏不露出)——URL 直达验证 +const HIDDEN_RENAMED_PAGE = { urlPart: /#\/clientDelivery\/gameAdvertisementRewardEntity/, api: '/api/gameAdvertisementReward/page' }; + +test('c 改名页面经真实菜单请求改名接口并渲染表格', async ({ page }) => { + // 所有路由拦截在导航前注册:SPA hash 导航与页面挂载时序不定,后注册可能漏掉首个请求 + const apiHits = new Map(); + const register = (api: string) => { + if (apiHits.has(api)) { + return; + } + apiHits.set(api, false); + void page.route(new RegExp(api.replace(/\//g, '\\/')), async route => { + if (route.request().method() === 'POST') { + apiHits.set(api, true); + } + await route.continue(); + }); + }; + for (const item of RENAMED_PAGES) { + register(item.api); + } + register(HIDDEN_RENAMED_PAGE.api); + + await page.goto('/'); + await expectOverview(page); + for (const item of RENAMED_PAGES) { + try { + await navigateByMenu(page, item.leaf, item.root); + } catch { + await page.waitForTimeout(1_000); + await navigateByMenu(page, item.leaf, item.root); + } + await expect(page).toHaveURL(item.urlPart); + await expect(page.locator('.p-datatable')).toBeVisible(); + await expect.poll(() => apiHits.get(item.api) === true, { timeout: 15_000 }) + .toBe(true); + await shot(page, `c406-c-${item.leaf}`); + await page.waitForTimeout(300); + } + + // 隐藏页(广告奖励账本,设计内 IsHide)经 URL 直达:同样请求改名接口并渲染表格 + await page.goto('/#/clientDelivery/gameAdvertisementRewardEntity'); + await expect(page).toHaveURL(HIDDEN_RENAMED_PAGE.urlPart); + await expect(page.locator('.p-datatable')).toBeVisible(); + await expect.poll(() => apiHits.get(HIDDEN_RENAMED_PAGE.api) === true, { timeout: 15_000 }) + .toBe(true); + await shot(page, 'c406-c-广告奖励账本-隐藏页直达'); +}); + +// —— (d) 策展页面巡查:记录的页面请求 body/query 不含旧作用域字段;区服请求带 serverId —— +const WALK_LEAVES: Array<{ leaf: string; root?: string }> = [ + { leaf: '运营首页', root: '总览' }, + { leaf: '游戏区服', root: '区服' }, + { leaf: '开服向导', root: '区服' }, + { leaf: '游戏公告', root: '内容运营' }, + { leaf: '活动/功能开关', root: 'C 端交付' }, + { leaf: '远程配置', root: 'C 端交付' }, + { leaf: '在线总览', root: '在线运维' }, + { leaf: '统一审计', root: '在线运维' }, + { leaf: '资产审计', root: '在线运维' }, + { leaf: '游戏用户', root: '玩家' }, + { leaf: '订单', root: '商业化' }, + { leaf: '支付配置', root: 'C 端交付' }, + ...RENAMED_PAGES.map(item => ({ leaf: item.leaf, root: item.root })), + { leaf: '操作日志', root: '审计' }, +]; + +test('d 全页面请求不含旧作用域字段且区服请求携带 serverId', async ({ page }) => { + test.setTimeout(300_000); + const captured: Array<{ url: string; body?: string }> = []; + page.on('request', request => { + if (/\/api\//.test(request.url())) { + captured.push({ url: request.url(), body: request.postData() ?? undefined }); + } + }); + + await page.goto('/'); + await expectOverview(page); + + // 顶栏全局区服选择器真实点击(在线运维区服维度查询依赖已选区服) + const serverSelector = page.locator('.server-selector').first(); + if (await serverSelector.count()) { + await serverSelector.getByRole('combobox', { name: '选择区服', exact: true }).click(); + const areaOption = page.locator('.p-select-option', { hasText: 'E2E-区服一' }).first(); + await areaOption.waitFor({ state: 'visible', timeout: 10_000 }); + await areaOption.click(); + await page.waitForTimeout(1_000); + } + + for (const item of WALK_LEAVES) { + try { + await navigateByMenu(page, item.leaf, item.root); + } catch { + await page.waitForTimeout(1_000); + await navigateByMenu(page, item.leaf, item.root); + } + await page.waitForTimeout(300); + } + + expect(captured.length, '应捕获到页面 API 请求').toBeGreaterThan(50); + const offenders = captured.filter(record => + /tenantid|appid|gameappid/i.test(record.url) + || (record.body !== undefined && /tenantid|appid|gameappid/i.test(record.body))); + expect(offenders, `旧作用域字段不得出现在任何请求 URL/body:${JSON.stringify(offenders.slice(0, 5))}`).toHaveLength(0); + + // 区服作用域契约:Online 区服维度查询显式携带 serverId(不再有租户/应用字段) + const scopedRequests = captured.filter(record => /"serverId"\s*:/.test(record.body ?? '') || /serverid=/i.test(record.url)); + test.info().annotations.push({ type: 'c406-d', description: `captured=${captured.length} serverScoped=${scopedRequests.length}` }); + await shot(page, 'c406-d-wire-hygiene'); + + expect(scopedRequests.length, '区服作用域查询应携带 serverId').toBeGreaterThan(0); +}); + +// —— (e) 日志与审计页没有 TenantId 列并且有数据行 —— +const LOG_PAGES = ['操作日志', '访问日志', '差异日志', '异常日志'] as const; + +test('e 日志审计页无 TenantId 列且有数据行', async ({ page }) => { + await page.goto('/'); + await expectOverview(page); + for (const leaf of LOG_PAGES) { + await navigateByMenu(page, leaf, '审计'); + await expect(page).toHaveURL(/#\/audit\//); + await expect(page.locator('.p-datatable')).toBeVisible(); + const headers = await page.locator('.p-datatable-thead th').allTextContents(); + expect(headers.filter(header => /tenant/i.test(header)), `${leaf} 不得有 TenantId 列`).toHaveLength(0); + await shot(page, `c406-e-${leaf}`); + } + // 数据行:套件此前的真实操作必然产生操作/访问日志(workers=1 顺序执行) + await navigateByMenu(page, '操作日志', '审计'); + await expect(page.locator('.p-datatable-tbody tr').first()).toBeVisible({ timeout: 20_000 }); + const rowCount = await page.locator('.p-datatable-tbody tr').count(); + expect(rowCount, '操作日志应有数据行').toBeGreaterThan(0); + await navigateByMenu(page, '访问日志', '审计'); + await expect(page.locator('.p-datatable-tbody tr').first()).toBeVisible({ timeout: 20_000 }); + await shot(page, 'c406-e-visit-rows'); +}); + +// —— (f) 支付配置页回调地址只有 {packageId} 一种形态 —— +test('f 支付配置回调地址为单 packageId 形态', async ({ page, context }) => { + await context.grantPermissions(['clipboard-read', 'clipboard-write'], { origin: new URL(process.env.E2E_APP_URL ?? 'http://127.0.0.1:21140').origin }); + await page.goto('/'); + await expectOverview(page); + await navigateByMenu(page, '支付配置', 'C 端交付'); + await expect(page).toHaveURL(/#\/clientDelivery\/gamePaymentConfigEntity/); + await expect(page.locator('.p-datatable')).toBeVisible(); + + // 新装库无支付配置行:经真实 UI 新增一条(渠道字段由 schema 默认值自动填充) + await page.getByRole('button', { name: '新增' }).first().click(); + const paymentDialog = page.locator('.p-dialog:visible').first(); + await expect(paymentDialog).toBeVisible(); + await paymentDialog.getByRole('combobox').first().click(); + const channelOption = page.locator('.p-select-option:visible').first(); + await channelOption.waitFor({ state: 'visible', timeout: 8_000 }); + await channelOption.click(); + await page.waitForTimeout(800); + // 渠道 schema 的必填字段(各渠道不同)逐个补齐,否则表单校验拦截提交 + const requiredInputs = paymentDialog.locator('input[type="text"]:visible'); + const requiredCount = await requiredInputs.count(); + for (let index = 0; index < requiredCount; index += 1) { + const input = requiredInputs.nth(index); + if (!(await input.inputValue())) { + await input.fill('E2E_PAYMENT_FIXTURE'); + } + } + await page.waitForTimeout(300); + await page.screenshot({ path: test.info().outputPath('c406-f-payment-dialog.png') }); + await page.locator('.p-dialog-footer button', { hasText: '确定' }).first().click(); + await expect(paymentDialog).toBeHidden({ timeout: 20_000 }); + await expect(page.locator('.p-datatable-tbody tr:not(:has-text("暂无数据"))').first()).toBeVisible({ timeout: 20_000 }); + + // 复制回调地址 → 校验剪贴板 URL 形态:/api/gameOrder/notify{Channel}(/packageId)?,不出现旧三段数字 + await page.locator('.p-datatable-tbody tr').first().getByText('复制回调地址').click(); + await expect(page.locator('.p-toast')).toBeVisible(); + const notifyUrl = await page.evaluate(() => navigator.clipboard.readText()); + expect(notifyUrl, `回调地址应为单 packageId 形态:${notifyUrl}`).toMatch(/\/api\/gameOrder\/notify\w+(\/\d+)?$/); + expect(notifyUrl.match(/\/\d+\/\d+\/\d+(\/|$)/), '不得出现旧三段数字路径').toBeNull(); + await shot(page, 'c406-f-payment-notify-single-package'); + + // 清理:删除新增行,保持库内无测试残留 + await page.locator('.p-datatable-tbody tr').first().getByText('删除').click(); + await page.locator('.p-confirmdialog-accept-button, .p-dialog-footer button', { hasText: '确定' }).last().click(); + await expect(page.locator('.p-datatable-tbody tr').first()).toBeHidden({ timeout: 20_000 }).catch(() => {}); +}); + +// —— (g) Hub 机器通道:真实页面建凭证,HMAC 正确 200 / 篡改与缺失被拒 / 旧租户头无影响 —— +function hmacSignature(secret: string, method: string, path: string, query: string, keyId: string, ts: number, nonce: string, body: string): string { + const bodyHash = createHash('sha256').update(body, 'utf8').digest('hex'); + const message = ['v2', method, path, query, keyId, String(ts), nonce, bodyHash].join('\n'); + return createHmac('sha256', secret).update(message, 'utf8').digest('base64'); +} + +async function hubSync(page: Page, headers: Record): Promise<{ status: number; code: number | null }> { + return page.evaluate(async ({ endpoint, requestHeaders }) => { + const body = JSON.stringify({}); + const response = await fetch(endpoint, { + method: 'POST', + headers: { 'Content-Type': 'application/json', ...requestHeaders }, + body, + }); + let code: number | null = null; + try { + const envelope = await response.json(); + code = typeof envelope.code === 'number' ? envelope.code : null; + } catch { + // 401/403 的错误体不总是 JSON + } + return { status: response.status, code }; + }, { endpoint: `${HUB_API}/api/FeatureSwitchSync/Sync`, requestHeaders: headers }); +} + +test('g Hub 机器通道 HMAC 鉴权与旧租户头被忽略', async ({ page }) => { + if (!HUB_API) { + throw new Error('缺少 E2E_HUB_API_URL(隔离 Hub.Api 地址)'); + } + + // 真实页面创建凭证(绑定 admin、scope=FeatureSwitchSync) + await page.goto('/'); + await expectOverview(page); + await navigateByMenu(page, '应用开放访问凭证', 'C 端交付'); + await expect(page.locator('.p-datatable')).toBeVisible(); + await page.getByRole('button', { name: '新增' }).first().click(); + await expect(page.locator('.p-dialog')).toBeVisible(); + await page.locator('.p-dialog input[placeholder="请输入责任场景编码"]').fill('c406-e2e'); + await page.locator('.p-dialog input[placeholder="请输入责任主体"]').fill('集成轮回归'); + await page.locator('.p-dialog textarea[placeholder="请输入使用目的"]').fill('C406 集成轮机器通道验证'); + await page.locator('.p-dialog .p-select').first().click(); + // 绑定用户选项文本为「账号(真实姓名)」;真实姓名随引导账号不同(新装为「初始业务管理员」),按账号前缀匹配 + await page.locator('.p-select-option', { hasText: `${process.env.E2E_ACCOUNT ?? 'admin'}(` }).first().click(); + await page.locator('.p-dialog .p-multiselect').first().click(); + await page.locator('.p-multiselect-option', { hasText: 'FeatureSwitchSync' }).first().click(); + await page.keyboard.press('Escape'); + await page.screenshot({ path: test.info().outputPath('c406-g-credential-dialog.png') }); + await page.locator('.p-dialog-footer button', { hasText: '确定' }).first().click(); + + // 一次性密钥展示框:读取 AccessKey/AccessSecret(截图只拍凭证列表,不拍密文明文) + const secretDialog = page.locator('.p-dialog').last(); + await expect(secretDialog).toBeVisible({ timeout: 20_000 }); + const accessKey = (await secretDialog.locator('code').first().textContent() ?? '').trim(); + const accessSecret = (await secretDialog.locator('code').nth(1).textContent() ?? '').trim(); + expect(accessKey.length, '应取得 AccessKey').toBeGreaterThan(10); + expect(accessSecret.length, '应取得 AccessSecret').toBeGreaterThan(20); + await secretDialog.getByRole('button').last().click(); + await shot(page, 'c406-g-credential-created'); + + // 1. HMAC 正确 → 200 + 业务码 0 + const ts = Math.floor(Date.now() / 1000); + const nonce = `c406-${ts}-${Math.random().toString(36).slice(2, 8)}`; + const goodSig = hmacSignature(accessSecret, 'POST', '/api/FeatureSwitchSync/Sync', '', accessKey, ts, nonce, JSON.stringify({})); + const accepted = await hubSync(page, { Signature: `v2;${accessKey};${ts};${nonce};${goodSig}` }); + expect(accepted.status, '正确 HMAC 签名必须 200').toBe(200); + expect(accepted.code, '业务信封码应为 0').toBe(0); + + // 2. 无签名头 → 401 + const unsigned = await hubSync(page, {}); + expect(unsigned.status, '缺失签名头必须被拒绝').toBe(401); + + // 3. 签名被篡改 → 401 + const tampered = await hubSync(page, { Signature: `v2;${accessKey};${ts};${nonce};${goodSig.slice(0, -4)}AAAA` }); + expect(tampered.status, '篡改签名必须被拒绝').toBe(401); + + // 4. 正确签名 + 旧三个租户/应用头 → 结果与不带完全一致(旧头被忽略) + const ts2 = ts + 1; + const nonce2 = `c406-${ts2}-x`; + const sig2 = hmacSignature(accessSecret, 'POST', '/api/FeatureSwitchSync/Sync', '', accessKey, ts2, nonce2, JSON.stringify({})); + const withLegacy = await hubSync(page, { + Signature: `v2;${accessKey};${ts2};${nonce2};${sig2}`, + 'GameFrameX-Tenant-Id': '1300000000001', + 'GameFrameX-App-Id': '1081001', + 'GameFrameX-App-Secret': 'legacy-secret-not-read', + }); + expect(withLegacy.status, '附带旧租户/应用头不得改变结果').toBe(accepted.status); + expect(withLegacy.code, '附带旧租户/应用头不得改变业务码').toBe(accepted.code); +}); + +// —— (h) 新装首启后,引导出来的业务管理员第一次表单登录即成功,菜单九根 —— +test('h 引导业务管理员首启表单登录成功且九根齐全', async ({ browser }) => { + const context = await browser.newContext({ storageState: { cookies: [], origins: [] } }); + const page = await context.newPage(); + // 账号由 Web.Api 首启种子引导创建(GAMEFRAMEX_ADMIN_INITIAL_ACCOUNT/_PASSWORD 与 E2E_* 同值), + // 不经任何写库;第一次表单登录必须直接落地运营首页。 + await signIn(page, process.env.E2E_ACCOUNT ?? 'admin', process.env.E2E_PASSWORD ?? '123456'); + await expectOverview(page); + expect((await renderedMenuGroups(page)).map(group => group.group)).toEqual([...ADMIN_ROOTS]); + await shot(page, 'c406-h-bootstrap-admin-first-login-nine-roots'); + await context.close(); +}); + +// 清理夹具分包上遗留的广告回调配置(历史失败运行的残留),保证唯一约束可重跑 +async function deleteExistingAdConfigs(page: Page, packagePrefixes: string[]): Promise { + for (const prefix of packagePrefixes) { + for (let guard = 0; guard < 5; guard += 1) { + const row = page.locator('.p-datatable-tbody tr').filter({ hasText: prefix }).first(); + if (await row.count() === 0) { + break; + } + await row.getByText('删除', { exact: true }).click(); + await page.locator('role=button[name="确定"]').first().click(); + await page.waitForTimeout(500); + } + } +} + +// —— (i) 广告回调配置:真实界面选分包新增、编辑回显;回调地址只有 {packageId} 一种形态 —— +test('i 广告回调配置分包选择回显且回调地址单 packageId 形态', async ({ page, request }) => { + if (!CLIENT_API) { + throw new Error('缺少 E2E_CLIENT_API_URL(隔离 Client.Api 地址)'); + } + const token = `GFX_E2E_ADCI_${Date.now().toString(36)}`; + + await page.goto('/'); + await expectOverview(page); + await navigateByMenu(page, '广告回调验签', 'C 端交付'); + await expect(page.locator('.p-datatable-tbody')).toBeVisible({ timeout: 20_000 }); + // 前置清理:失败重跑可能留下夹具分包上的配置,(PackageId, Provider) 唯一会令新增被拒 + await deleteExistingAdConfigs(page, [FIXTURE_PACKAGE_A.label, FIXTURE_PACKAGE_B.label]); + + // 新增:真实界面选择分包(R5:分包是配置身份的一部分) + await page.locator('role=button[name="新增"]').first().click(); + const dialog = page.locator('.p-dialog'); + await expect(dialog).toBeVisible({ timeout: 10_000 }); + await expect(dialog.locator('.parameter-panel')).toBeVisible({ timeout: 10_000 }); + await dialog.locator('role=combobox >> nth=1').click(); + const optionA = page.locator('role=option', { hasText: FIXTURE_PACKAGE_A.label }).first(); + await optionA.waitFor({ state: 'visible', timeout: 8_000 }); + await optionA.click(); + const chosenLabel = (await dialog.locator('role=combobox >> nth=1').evaluate((el) => { + return (el.closest('.p-select')?.querySelector('.p-select-label')?.textContent ?? '').trim(); + })); + expect(chosenLabel, '分包选择器未回显所选标签').toContain(FIXTURE_PACKAGE_A.label); + await dialog.locator('role=textbox >> nth=0').fill(`https://cb.example.test/${token}`); + await dialog.locator('.p-password input').first().fill('E2eAdSecret-Alpha-001'); + await shot(page, 'c406-i-adconfig-package-selected'); + await dialog.locator('role=button[name="确定"]').first().click(); + await expect(page.locator('.p-datatable-tbody')).toContainText(token, { timeout: 20_000 }); + + // 编辑回显:分包标签与新增时一致 + await page.locator(`tr:has-text("${token}") >> text=编辑`).first().click(); + await expect(dialog).toBeVisible({ timeout: 10_000 }); + await expect(dialog.locator('.parameter-panel')).toBeVisible({ timeout: 10_000 }); + const echoedLabel = (await dialog.locator('role=combobox >> nth=1').evaluate((el) => { + return (el.closest('.p-select')?.querySelector('.p-select-label')?.textContent ?? '').trim(); + })); + expect(echoedLabel, '编辑弹窗必须回显新增时所选分包').toContain(FIXTURE_PACKAGE_A.label); + await shot(page, 'c406-i-adconfig-edit-echo-package'); + await dialog.locator('role=button[name="确定"]').first().click(); + await page.waitForTimeout(600); + + // 回调地址只有 {packageId} 一种形态:带分包段命中端点(非 404,验签拒绝为 601), + // 缺分包段直接 404——不存在旧的多段路由形态。 + const withPackage = await request.get(`${CLIENT_API}/api/GameAdWebHook/TopOnNotify/${FIXTURE_PACKAGE_A.id}`); + expect(withPackage.status(), '带 packageId 的回调地址必须命中端点').toBe(601); + // Client.Api 协议头守卫先于路由执行:不带 X-Proto-Ver 的非回调路径先得 400, + // 带上协议头才走到路由层验证「缺 packageId 段 → 404」。 + const withoutPackage = await request.get(`${CLIENT_API}/api/GameAdWebHook/TopOnNotify`, { headers: { 'X-Proto-Ver': 'cola/1.0.0' } }); + expect(withoutPackage.status(), '缺 packageId 的回调地址必须 404').toBe(404); + await shot(page, 'c406-i-adconfig-callback-url-form'); + + // 清理本轮配置(保持 (PackageId, Provider) 可被后续用例复用) + await page.locator(`tr:has-text("${token}") >> text=删除`).first().click(); + await page.locator('role=button[name="确定"]').first().click(); + await expect(page.locator('.p-datatable-tbody')).not.toContainText(token, { timeout: 20_000 }); +}); + +// —— (j) 接口级补充证据:同 provider 双分包不同密钥,跨包密钥被拒;缺 packageId 404 —— +function topOnSign(secret: string, transId: string): string { + const raw = `trans_id=${transId}&placement_id=p-1&adsource_id=a-1&reward_amount=10&reward_name=coin&sec_key=${secret}`; + return createHash('md5').update(raw, 'utf8').digest('hex'); +} + +function topOnCallbackUrl(packageId: number, secret: string, transId: string): string { + const query = new URLSearchParams({ + trans_id: transId, + placement_id: 'p-1', + adsource_id: 'a-1', + reward_amount: '10', + reward_name: 'coin', + user_id: '9200000000201', + is_test: '0', + sign: topOnSign(secret, transId), + }); + return `${CLIENT_API}/api/GameAdWebHook/TopOnNotify/${packageId}?${query.toString()}`; +} + +test('j 广告回调跨包密钥被拒且缺分包 404', async ({ page, request }) => { + if (!CLIENT_API) { + throw new Error('缺少 E2E_CLIENT_API_URL(隔离 Client.Api 地址)'); + } + const tokenAlpha = `GFX_E2E_ADCJ_A_${Date.now().toString(36)}`; + const tokenBeta = `GFX_E2E_ADCJ_B_${Date.now().toString(36)}`; + const secretAlpha = 'E2eAdSecret-Alpha-101'; + const secretBeta = 'E2eAdSecret-Beta-202'; + + await page.goto('/'); + await expectOverview(page); + await navigateByMenu(page, '广告回调验签', 'C 端交付'); + await expect(page.locator('.p-datatable-tbody')).toBeVisible({ timeout: 20_000 }); + await deleteExistingAdConfigs(page, [FIXTURE_PACKAGE_A.label, FIXTURE_PACKAGE_B.label]); + + // 同一 provider(TopOn)下两个分包各配一条不同密钥的配置(真实界面) + for (const [fixture, urlToken, secret] of [ + [FIXTURE_PACKAGE_A, tokenAlpha, secretAlpha], + [FIXTURE_PACKAGE_B, tokenBeta, secretBeta], + ] as const) { + await page.locator('role=button[name="新增"]').first().click(); + const dialog = page.locator('.p-dialog'); + await expect(dialog).toBeVisible({ timeout: 10_000 }); + await expect(dialog.locator('.parameter-panel')).toBeVisible({ timeout: 10_000 }); + await dialog.locator('role=combobox >> nth=1').click(); + const option = page.locator('role=option', { hasText: fixture.label }).first(); + await option.waitFor({ state: 'visible', timeout: 8_000 }); + await option.click(); + await dialog.locator('role=textbox >> nth=0').fill(`https://cb.example.test/${urlToken}`); + await dialog.locator('.p-password input').first().fill(secret); + await dialog.locator('role=button[name="确定"]').first().click(); + await expect(page.locator('.p-datatable-tbody')).toContainText(urlToken, { timeout: 20_000 }); + } + await shot(page, 'c406-j-two-package-configs'); + + // 1. A 包回调用 B 包密钥签名 → 601 拒绝(R5:配置按『分包 + provider』精确命中) + const crossKey = await request.get(topOnCallbackUrl(FIXTURE_PACKAGE_A.id, secretBeta, 'TX-CROSS-KEY')); + expect(crossKey.status(), '跨包密钥签名必须被拒绝(601)').toBe(601); + + // 2. A 包回调用 A 包自身密钥签名 → 非 601(签名被接受;业务后续校验失败属预期,无角色夹具) + const ownKey = await request.get(topOnCallbackUrl(FIXTURE_PACKAGE_A.id, secretAlpha, 'TX-OWN-KEY')); + expect(ownKey.status(), '本包密钥签名应通过验签(结果不应再是 601)').not.toBe(601); + + // 3. 缺 packageId → 404(路由必填,唯一 URL 形态) + const missingPackage = await request.get(`${CLIENT_API}/api/GameAdWebHook/TopOnNotify?trans_id=tx`, { headers: { 'X-Proto-Ver': 'cola/1.0.0' } }); + expect(missingPackage.status(), '缺 packageId 必须返回 404').toBe(404); + + // 清理两条配置 + for (const urlToken of [tokenAlpha, tokenBeta]) { + await page.locator(`tr:has-text("${urlToken}") >> text=删除`).first().click(); + await page.locator('role=button[name="确定"]').first().click(); + await expect(page.locator('.p-datatable-tbody')).not.toContainText(urlToken, { timeout: 20_000 }); + } +}); diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-merge.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-merge.e2e.ts index af9c69e5..4a6fc265 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-merge.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-merge.e2e.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test'; import { ADMIN_STATE, anonPage, navigateByMenu, shot, signIn } from './helpers'; import { installApiRecorder, readApiRecords } from './module-coverage'; import { globalServerSelector } from './server-selection'; -import { readField } from './admin-menu-fixture'; +import { readField, readMergeReviewerCredentials } from './admin-stack'; // 环境准备由集成轮执行:至少三个启用区服,目标 OnlineAdminApiPrefix=online/admin, // HttpManageUrl 指向 server-merge.mjs;两个不同普通运营账号均授予合服/区服菜单。 @@ -60,15 +60,17 @@ test('合服向导:取消计划释放区服并允许同范围再次建计划', test('合服向导:真实登录、预演、双人复核、执行与源服退场', async ({ browser }) => { const targetName = process.env.E2E_MERGE_TARGET_NAME; const sourceNames: string[] = JSON.parse(process.env.E2E_MERGE_SOURCE_NAMES ?? '[]'); - const reviewerAccount = process.env.E2E_MERGE_REVIEWER_ACCOUNT; - const reviewerPassword = process.env.E2E_MERGE_REVIEWER_PASSWORD; + // C406 第 2 轮(R6):复核人由 setup 在「账号管理」真实界面创建并重置口令(产品路径), + // 凭证优先取环境变量,回落 setup 写入的 state 文件;不再直接写库造账号。 + const reviewer = process.env.E2E_MERGE_REVIEWER_ACCOUNT && process.env.E2E_MERGE_REVIEWER_PASSWORD + ? { account: process.env.E2E_MERGE_REVIEWER_ACCOUNT, password: process.env.E2E_MERGE_REVIEWER_PASSWORD } + : await readMergeReviewerCredentials(); expect(targetName, '请准备隔离目标区服').toBeTruthy(); expect(sourceNames.length, '请准备至少两个隔离源区服').toBeGreaterThanOrEqual(2); - expect(reviewerAccount, '请准备独立复核账号及菜单权限').toBeTruthy(); - expect(reviewerPassword).toBeTruthy(); - expect(reviewerAccount).not.toBe(process.env.E2E_ACCOUNT ?? 'admin'); + expect(reviewer.account, '请准备独立复核账号及菜单权限').toBeTruthy(); + expect(reviewer.account).not.toBe(process.env.E2E_ACCOUNT ?? 'admin'); const applicant = await anonPage(browser); - const reviewer = await anonPage(browser); + const reviewerPage = await anonPage(browser); try { await installApiRecorder(applicant); await signIn(applicant, process.env.E2E_ACCOUNT ?? 'admin', process.env.E2E_PASSWORD ?? '123456'); @@ -103,55 +105,55 @@ test('合服向导:真实登录、预演、双人复核、执行与源服退 await expect(applicant.getByRole('button', { name: '批准', exact: true })).toBeDisabled(); await shot(applicant, 'merge-dry-run-self-approval-blocked'); - await installApiRecorder(reviewer); - await signIn(reviewer, reviewerAccount!, reviewerPassword!); - await navigateByMenu(reviewer, '合服', '区服'); + await installApiRecorder(reviewerPage); + await signIn(reviewerPage, reviewer.account, reviewer.password); + await navigateByMenu(reviewerPage, '合服', '区服'); // planId 由目标/源服确定,取消用例留下的已取消行与其同 planId:排除已取消行后定位。 - await reviewer.getByRole('row').filter({ hasText: planId }).filter({ hasNotText: '已取消' }).getByRole('button', { name: '详情', exact: true }).click(); - await reviewer.locator('#merge-review-reason').fill('已核查零全局域写入'); - await reviewer.getByRole('button', { name: '批准', exact: true }).click(); - await expect(reviewer.getByTestId('merge-status')).toHaveText('已批准'); - await expect(reviewer.getByRole('button', { name: '执行合服', exact: true })).toBeDisabled(); - await reviewer.locator('#merge-backup').fill(`backup-${Date.now()}`); - await reviewer.getByLabel('已完成备份', { exact: true }).check(); - await reviewer.getByRole('button', { name: '执行合服', exact: true }).click(); - await expect(reviewer.getByText('确认执行合服?成功后源服将停止对客户端和顶栏选服可见。')).toBeVisible(); - await reviewer.getByRole('button', { name: '确定', exact: true }).click(); - await expect(reviewer.getByTestId('merge-status')).toHaveText('已完成'); - await expect(reviewer.getByTestId('merge-report')).toHaveCount(2); - await shot(reviewer, 'merge-completed-reports'); - await reviewer.getByRole('dialog').getByRole('button', { name: /close|关闭/i }).click(); - await globalServerSelector(reviewer).getByRole('combobox').click(); - await expect(reviewer.getByRole('option', { name: targetName!, exact: true })).toBeVisible(); - for (const source of sourceNames) await expect(reviewer.getByRole('option', { name: source, exact: true })).toHaveCount(0); - await reviewer.keyboard.press('Escape'); - await shot(reviewer, 'merge-sources-removed-from-selector'); - await navigateByMenu(reviewer, '游戏区服', '区服'); + await reviewerPage.getByRole('row').filter({ hasText: planId }).filter({ hasNotText: '已取消' }).getByRole('button', { name: '详情', exact: true }).click(); + await reviewerPage.locator('#merge-review-reason').fill('已核查零全局域写入'); + await reviewerPage.getByRole('button', { name: '批准', exact: true }).click(); + await expect(reviewerPage.getByTestId('merge-status')).toHaveText('已批准'); + await expect(reviewerPage.getByRole('button', { name: '执行合服', exact: true })).toBeDisabled(); + await reviewerPage.locator('#merge-backup').fill(`backup-${Date.now()}`); + await reviewerPage.getByLabel('已完成备份', { exact: true }).check(); + await reviewerPage.getByRole('button', { name: '执行合服', exact: true }).click(); + await expect(reviewerPage.getByText('确认执行合服?成功后源服将停止对客户端和顶栏选服可见。')).toBeVisible(); + await reviewerPage.getByRole('button', { name: '确定', exact: true }).click(); + await expect(reviewerPage.getByTestId('merge-status')).toHaveText('已完成'); + await expect(reviewerPage.getByTestId('merge-report')).toHaveCount(2); + await shot(reviewerPage, 'merge-completed-reports'); + await reviewerPage.getByRole('dialog').getByRole('button', { name: /close|关闭/i }).click(); + await globalServerSelector(reviewerPage).getByRole('combobox').click(); + await expect(reviewerPage.getByRole('option', { name: targetName!, exact: true })).toBeVisible(); + for (const source of sourceNames) await expect(reviewerPage.getByRole('option', { name: source, exact: true })).toHaveCount(0); + await reviewerPage.keyboard.press('Escape'); + await shot(reviewerPage, 'merge-sources-removed-from-selector'); + await navigateByMenu(reviewerPage, '游戏区服', '区服'); // 全量套件中区服行数超过一页,按源服名检索后再断言(管理查询保留禁用行并显示已合服); // 名称输入在「高级」折叠区,先展开。 - const advancedToggle = reviewer.locator('role=button[name=/高级/]').first(); + const advancedToggle = reviewerPage.locator('role=button[name=/高级/]').first(); if (await advancedToggle.isVisible().catch(() => false)) { await advancedToggle.click(); - await reviewer.waitForTimeout(400); + await reviewerPage.waitForTimeout(400); } - const areaSearch = reviewer.locator('.search-form input:visible').first(); + const areaSearch = reviewerPage.locator('.search-form input:visible').first(); for (const source of sourceNames) { await areaSearch.fill(source); - await reviewer.getByRole('button', { name: '查询' }).first().click(); - await reviewer.waitForTimeout(1200); - const row = reviewer.getByRole('row').filter({ hasText: source }); + await reviewerPage.getByRole('button', { name: '查询' }).first().click(); + await reviewerPage.waitForTimeout(1200); + const row = reviewerPage.getByRole('row').filter({ hasText: source }); await expect(row).toContainText('已合服'); await expect(row).toContainText(targetIdentifier); } - await shot(reviewer, 'merge-management-retains-retired-sources'); - const records = [...await readApiRecords(applicant), ...await readApiRecords(reviewer)]; + await shot(reviewerPage, 'merge-management-retains-retired-sources'); + const records = [...await readApiRecords(applicant), ...await readApiRecords(reviewerPage)]; for (const endpoint of ['add', 'page', 'detail', 'dryRun', 'approve', 'execute']) { expect(records.some(record => record.url.includes(`/api/gameAreaMerge/${endpoint}`)), `页面真实请求 ${endpoint}`).toBe(true); } expect(records.some(record => record.url.includes('/api/gameArea/page'))).toBe(true); } finally { await applicant.context().storageState({ path: ADMIN_STATE }); - await reviewer.context().close(); + await reviewerPage.context().close(); await applicant.context().close(); } }); diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-provision.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-provision.e2e.ts index 006d04b6..122303ea 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-provision.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/game-area-provision.e2e.ts @@ -4,7 +4,7 @@ import { test, expect } from '@playwright/test'; import { ADMIN_STATE, navigateByMenu, shot, signIn } from './helpers'; import { installApiRecorder, readApiRecords } from './module-coverage'; import { globalServerSelector, selectServerOption } from './server-selection'; -import { readField } from './admin-menu-fixture'; +import { readField } from './admin-stack'; // 环境准备见 notes-provision.md:隔离库模板“E2E 开服模板”的分类 HttpManagerUrl 指向本桩。 // 用例只通过真实表单与菜单操作,不主动调用管理 API 或 SQL。 @@ -62,7 +62,8 @@ for (const registrationFailures of [0, 1]) { const name = `开服回归-${identifier}`; await wizard.getByLabel('新区服编号', { exact: true }).fill(identifier); await wizard.getByLabel('新区服名称', { exact: true }).fill(name); - await wizard.getByLabel('游戏服 HTTP 管理地址', { exact: true }).fill(`http://127.0.0.1:${port}`); + // 容器化 Web.Api 经 host.docker.internal 回连宿主桩;宿主进程跑法保持 127.0.0.1 + await wizard.getByLabel('游戏服 HTTP 管理地址', { exact: true }).fill(`http://${process.env.E2E_PROVISION_STUB_HOST ?? '127.0.0.1'}:${port}`); await wizard.getByLabel('TCP 连接地址', { exact: true }).fill('tcp://127.0.0.1:22241'); await wizard.getByLabel('WebSocket 连接地址', { exact: true }).fill('ws://127.0.0.1:22242'); await wizard.getByLabel('容器环境变量覆盖项(JSON 字符串字典)', { exact: true }).fill(JSON.stringify({ ServerId: identifier })); diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/helpers.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/helpers.ts index 71d8da29..ec0b9a10 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/helpers.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/helpers.ts @@ -203,7 +203,7 @@ export async function logoutByMenu(page: Page): Promise { await expect(page).toHaveURL(/#\/login/); } -// C400 单实例账号不再拼接 @tenantId;身份与菜单必须由真实表单登录建立。 +// C400 单实例账号直接登录;身份与菜单必须由真实表单登录建立。 export async function signIn(page: Page, account: string, password: string): Promise { await page.goto('/#/login'); await page.locator('#login-account').fill(account); 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 ebf19687..9e197e18 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/landing-logout.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/landing-logout.e2e.ts @@ -1,7 +1,7 @@ import { test, expect } from '@playwright/test'; import { shot, expectOverview, userMenuButton, logoutByMenu, signIn, ADMIN_STATE } from './helpers'; -// 单 shell 登录后直达总览首页,旧应用选择卡片/应用工作台入口退场。 +// 单 shell 登录后直达总览首页,旧选择卡片/工作台入口退场。 test('登录落地页渲染总览首页', async ({ page }) => { await page.goto('/'); await expectOverview(page); @@ -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/e2e/tests/scheduler-retention.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/scheduler-retention.e2e.ts index fca254ab..421c7c4a 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/scheduler-retention.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/scheduler-retention.e2e.ts @@ -7,7 +7,7 @@ import { installApiRecorder, readApiRecords } from './module-coverage'; // (job_gameTimeJobDispatch)——内置作业此前从未落库,页面看不到;手动执行留存作业后, // 触发器运行态(触发次数)从数据库刷新可见(§9.8 运行态写回)。 // 2) 预置的超期访问 / 操作日志(环境准备 SQL,CreatedTime 早于热数据窗口)在留存作业执行前 -// 于「审计 › 访问日志 / 操作日志」(admin 视角,system_* 与 tenant_* 联合查询)可见, +// 于「审计 › 访问日志 / 操作日志」(admin 视角,system_* 与业务日志联合查询)可见, // 手动执行后消失(归档表行数由编排脚本查库留证)。 // 3) 普通 admin 在「系统 › 定时任务」完成增删改(crud-roundtrips 闭环之外的专门截图证据)。 const RETENTION_JOB_ID = 'job_auditRetention'; diff --git a/GameFrameX.Admin.Unified.Vue/e2e/tests/server-selector.e2e.ts b/GameFrameX.Admin.Unified.Vue/e2e/tests/server-selector.e2e.ts index fe07b068..7bde2f00 100644 --- a/GameFrameX.Admin.Unified.Vue/e2e/tests/server-selector.e2e.ts +++ b/GameFrameX.Admin.Unified.Vue/e2e/tests/server-selector.e2e.ts @@ -2,7 +2,7 @@ import { test, expect, type Route } from '@playwright/test'; import { expectOverview, navigateByMenu, shot } from './helpers'; import { installApiRecorder, readApiRecords, apiAnomalies } from './module-coverage'; import { globalServerSelector, selectServerOption } from './server-selection'; -import { readField } from './admin-menu-fixture'; +import { readField } from './admin-stack'; // 区服选项来自真实页面发出的 gameArea/page;只 mock 在线业务响应,避免依赖游戏服在线状态。 // mock 不发请求也不改变 serverId,记录器与 DOM 指标共同验证页面实际使用的上下文。 diff --git a/GameFrameX.Admin.Unified.Vue/eslint.config.mjs b/GameFrameX.Admin.Unified.Vue/eslint.config.mjs index d2369301..d4e733a0 100644 --- a/GameFrameX.Admin.Unified.Vue/eslint.config.mjs +++ b/GameFrameX.Admin.Unified.Vue/eslint.config.mjs @@ -57,14 +57,13 @@ const namingConventionRule = [ // eslint-plugin-vue 该规则的文件名分支报告位置硬编码为 1:1(Program:exit),早于任何注释位置, // 行内 eslint-disable 无法压制,故只能在此按精确路径冻结(精确路径而非 ignores 名称白名单: // 同目录今后新增同名文件仍会被主规则拦截,防增量语义最严)。 -// 命名治理已完成(C296 改名 132 个单词名/camelCase 文件),本清单仅剩 119 个约定豁免文件 +// 命名治理已完成(C296 改名 132 个单词名/camelCase 文件),本清单仅剩 118 个约定豁免文件 // (117 个 index.vue 目录式组件 + 401/404 错误页),不再是 TODO;新增非 index.vue 文件必须 multi-word。 // 本清单只减不增(GFX-717 / C305):与 scripts/frontend-standards-allowlist.json 的 componentNames // 上限快照比对,新增条目未扩快照会被 pnpm run check:frontend 拦截;收缩后请同步删快照条目。 const frozenMultiWordComponentFiles = [ 'src/components/app-confirm-dialog/index.vue', 'src/components/base-edit-dialog/index.vue', - 'src/components/config-app-scope-picker/index.vue', 'src/components/image-cropper/index.vue', 'src/components/OnlineCursorList/index.vue', 'src/components/crud-data-table/index.vue', @@ -98,13 +97,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 +148,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/openapi.json b/GameFrameX.Admin.Unified.Vue/openapi.json index dea8fb4c..36bdb071 100644 --- a/GameFrameX.Admin.Unified.Vue/openapi.json +++ b/GameFrameX.Admin.Unified.Vue/openapi.json @@ -10,23 +10,23 @@ "tags": [ "advertisementCallbackConfig" ], - "summary": "新增广告回调配置(主库内 Provider 唯一)。", + "summary": "新增广告回调配置(同一分组的 (PackageId, Provider) 唯一)。", "operationId": "AdvertisementCallbackConfigAddPost", "requestBody": { "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,40 +70783,241 @@ } } }, - "/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": { - "required": [ + "$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", + "content": { + "text/plain": { + "schema": { + "required": [ "code", "message", "data", @@ -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,1021 @@ "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, + "PackageId": { "type": "string", - "description": "包名" + "description": "关联的游戏应用分包 Id。", + "nullable": true }, - "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 }, - "CreatedName": { + "DictionaryTypeId": { + "type": "string" + }, + "DictionaryType": { + "$ref": "#/components/schemas/GlobalDictionaryTypeEntity" + }, + "Value": { "type": "string", "nullable": true }, - "UpdatedName": { + "Code": { "type": "string", "nullable": true }, - "Name": { - "minLength": 1, + "TagType": { "type": "string", - "description": "名称" - } - }, - "additionalProperties": false, - "description": "版本管理增加输入参数" - }, - "AddGamePaymentConfigRequest": { - "required": [ - "ConfigJson", - "PayChannel" - ], - "type": "object", - "properties": { - "PackageId": { + "nullable": true + }, + "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 +73372,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 +73593,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 +74186,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 +74257,7 @@ "additionalProperties": false, "description": "游戏大区分类增加输入参数" }, - "AddTenantGameAreaEntityRequest": { + "AddGameAreaEntityRequest": { "required": [ "Capacity", "ClassifyId", @@ -75065,58 +74385,515 @@ }, "AccessControls": { "type": "string", - "description": "访问权限设置,控制哪些玩家可以访问服务器", - "nullable": true + "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": "分类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 +74907,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 +75073,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": { - "type": "integer", - "description": "邮件的过期日期", - "format": "int64" + "Description": { + "type": "string", + "description": "详细描述", + "nullable": true }, - "MailType": { - "$ref": "#/components/schemas/GameMailType" + "Level": { + "type": "integer", + "description": "角色当前的等级", + "format": "int64", + "nullable": true + }, + "LastLoginTime": { + "type": "integer", + "description": "角色最后一次登录时间", + "format": "int64", + "nullable": true } }, "additionalProperties": false, - "description": "游戏邮件增加输入参数" + "description": "游戏角色增加输入参数" }, - "AddTenantGameMailTemplateCategoryEntityRequest": { + "AddGameTimeJobEntityRequest": { "required": [ + "Cron", "Id", "Name" ], @@ -75472,277 +75347,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 +75554,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 +75930,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 +76236,7 @@ } }, "additionalProperties": false, - "description": "新增租户对象存储配置入参。" + "description": "平台系统邮件 Provider 配置新增输入参数。" }, "AddUserRequest": { "required": [ @@ -76436,6 +76441,10 @@ "AdvertisementCallbackConfigResponse": { "type": "object", "properties": { + "PackageId": { + "type": "string", + "description": "关联的游戏应用分包 Id。" + }, "Id": { "type": "string", "description": "Id" @@ -76508,7 +76517,7 @@ } }, "additionalProperties": false, - "description": "租户广告回调配置输出参数(敏感字段已脱敏)" + "description": "广告回调配置输出参数(敏感字段已脱敏)" }, "AdvertisementCallbackConfigResponseSqlSugarPagedList": { "type": "object", @@ -77299,11 +77308,11 @@ "format": "int32", "x-enum-varnames": [ "System", - "Tenant" + "Business" ], "x-enum-descriptions": [ "系统", - "租户" + "业务" ] }, "ChannelTypeEnum": { @@ -77365,7 +77374,7 @@ }, "EnableKeyAutoCreate": { "type": "boolean", - "description": "是否允许首次签发时自动创建租户应用级 RSA key。" + "description": "是否允许首次签发时自动创建应用级 RSA key。" }, "EnableReturnHttpManager": { "type": "boolean", @@ -77413,7 +77422,7 @@ } }, "additionalProperties": false, - "description": "租户 Client API 运行策略输出参数" + "description": "Client API 运行策略输出参数" }, "ClientApiPolicyResponseSqlSugarPagedList": { "type": "object", @@ -77871,6 +77880,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 +77964,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 +78091,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 +78378,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 +78478,7 @@ }, "RoleId": { "type": "string", - "description": "角色 Id。反查自 TenantGameRoleEntity。", + "description": "角色 Id。反查自 GameRoleEntity。", "nullable": true }, "UserId": { @@ -79546,7 +79590,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", @@ -82010,7 +82054,7 @@ } }, "additionalProperties": false, - "description": "租户 Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。" + "description": "Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。" }, "GameLoginTicketKeyResponseSqlSugarPagedList": { "type": "object", @@ -82882,7 +82926,7 @@ }, "OrderId": { "type": "string", - "description": "来源订单 Id(TenantGameOrderEntity.Id)。" + "description": "来源订单 Id(GameOrderEntity.Id)。" }, "PayChannel": { "type": "string", @@ -83421,7 +83465,7 @@ }, "PenaltyId": { "type": "string", - "description": "关联处罚 Id(TenantGamePenaltyEntity.Id)。" + "description": "关联处罚 Id(GamePenaltyEntity.Id)。" }, "AppellantId": { "type": "string", @@ -83933,12 +83977,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,12 +85573,9 @@ "type": "boolean", "description": "是否仅超管可见(种子元数据,DB 驱动授权读取)" }, - "AllowTenantWhenSuperAdminOnly": { + "AllowAdminWhenSuperAdminOnly": { "type": "boolean", - "description": "超管专属菜单下允许租户只读访问" - }, - "AppScope": { - "$ref": "#/components/schemas/MenuAppScopeEnum" + "description": "超管专属菜单下允许管理员只读访问" }, "Children": { "type": "array", @@ -85696,7 +85737,7 @@ }, "additionalProperties": false }, - "LinkPenaltyTenantGameReportEntityRequest": { + "LinkPenaltyGameReportEntityRequest": { "required": [ "Id", "PenaltyId" @@ -85825,10 +85866,6 @@ "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "TenantId": { - "type": "string", - "nullable": true - }, "BeforeData": { "type": "string", "nullable": true @@ -86012,10 +86049,6 @@ "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "TenantId": { - "type": "string", - "nullable": true - }, "ControllerName": { "type": "string", "nullable": true @@ -86254,10 +86287,6 @@ "description": "是否启用,true:启用,false:禁用,null:未设置(启用)", "nullable": true }, - "TenantId": { - "type": "string", - "nullable": true - }, "ControllerName": { "type": "string", "nullable": true @@ -86635,19 +86664,6 @@ "升级处理" ] }, - "MenuAppScopeEnum": { - "enum": [ - 0 - ], - "type": "integer", - "format": "int32", - "x-enum-varnames": [ - "Console" - ], - "x-enum-descriptions": [ - "控制台" - ] - }, "MenuResponse": { "type": "object", "properties": { @@ -86888,7 +86904,7 @@ } }, "additionalProperties": false, - "description": "租户对象存储配置列表项。" + "description": "对象存储配置列表项。" }, "ObjectStorageConfigResponseSqlSugarPagedList": { "type": "object", @@ -87089,7 +87105,7 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, "PlayerId": { "maxLength": 256, @@ -87214,7 +87230,7 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, "PlayerId": { "maxLength": 256, @@ -87529,7 +87545,7 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, "Command": { "$ref": "#/components/schemas/OnlineControlledCommandKind" @@ -87569,7 +87585,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 锁定):本端点整体高危(权限码仅同步管理员角色),`Reason` 与\n`ReviewerOperatorId` 对全部四命令必填——双人复核字段落地 vault「审批(如需)」,不做通用审批流。\n目标标识按命令取值:CancelTicket → TicketId;EndAbnormalMatch → MatchId;SuspendResumePlayer / MatchIsolation → PlayerId。" }, "OnlineLiveOpsDispatchRequest": { "required": [ @@ -87878,7 +87894,7 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, "Mode": { "maxLength": 256, @@ -88052,7 +88068,7 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" } }, "additionalProperties": false, @@ -88140,7 +88156,7 @@ } }, "additionalProperties": false, - "description": "处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步 TenantAdmin)。\n\n作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。" + "description": "处罚联动命令输入参数(高危端点,权限码 onlinePenaltyLinkCommand:execute 仅同步管理员角色)。\n\n作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。" }, "OnlinePenaltyLinkResponse": { "type": "object", @@ -88299,7 +88315,7 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, "PlayerId": { "maxLength": 256, @@ -88522,7 +88538,7 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "区服作用域(案件所在区服,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "description": "区服作用域(案件所在区服,经 OnlineScopeContextFactory 校验区服归属)。" }, "CaseId": { "minLength": 1, @@ -88744,453 +88760,12 @@ "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": { - "type": "string", - "description": "编码", - "nullable": true - }, - "GroupCode": { - "type": "string", - "description": "分组编码", - "nullable": true - } - }, - "additionalProperties": false - }, - "PageDictionaryDataRequest": { - "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" - }, - "DictionaryTypeId": { - "type": "string", - "description": "字典类型Id" - }, - "Value": { - "type": "string", - "description": "值", - "nullable": true - }, - "Code": { - "type": "string", - "description": "编码", - "nullable": true - } - }, - "additionalProperties": false - }, - "PageDictionaryTypeRequest": { - "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": { - "type": "string", - "description": "编码", - "nullable": true - } - }, - "additionalProperties": false - }, - "PageFileRequest": { - "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" - }, - "FileName": { - "type": "string", - "description": "文件名称", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "开始时间", - "format": "int64", - "nullable": true - }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "PageGameAppAssetPackageRequest": { - "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 - } - }, - "additionalProperties": false, - "description": "资源包分页查询输入参数" - }, - "PageGameAppAssetPackageVersionHistoryRequest": { - "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" - }, - "VersionId": { - "type": "string", - "description": "资源包版本Id", - "nullable": true - } - }, - "additionalProperties": false, - "description": "资源包版本记录分页查询输入参数" - }, - "PageGameAppAssetPackageVersionRequest": { - "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" - }, - "Channel": { - "type": "string", - "nullable": true - }, - "Platform": { - "type": "string", - "nullable": true - }, - "AppVersion": { - "type": "string", - "nullable": true - }, - "Package": { - "type": "string", - "nullable": true - }, - "Language": { - "type": "string", - "nullable": true - }, - "RootPath": { - "type": "string", - "description": "资源下载根路径", - "nullable": true - }, - "AssetPackageName": { - "type": "string", - "description": "资源包名称", - "nullable": true - } - }, - "additionalProperties": false, - "description": "资源包版本分页查询输入参数" - }, - "PageGameAppAssetPackageVersionSelectRequest": { - "type": "object", - "properties": { - "SearchKey": { - "type": "string", - "nullable": true - }, - "PageSize": { - "maximum": 1000, - "minimum": 1, - "type": "integer", - "format": "int32" - }, - "AppPackageId": { - "type": "string", - "description": "分包Id", - "nullable": true - } - }, - "additionalProperties": false, - "description": "资源包版本选择器输入参数" - }, - "PageGameAppFeatureSwitchRequest": { - "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" - }, - "SwitchKey": { - "type": "string", - "description": "开关键模糊筛选", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "启停筛选", - "nullable": true - }, - "Audience": { - "type": "string", - "description": "消费方标记精确筛选:client / server / both", - "nullable": true - } - }, - "additionalProperties": false, - "description": "活动/功能开关管理分页查询输入参数" + "普通", + "母包", + "子包" + ] }, - "PageGameAppPackageRequest": { + "PageAdvertisementCallbackConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -89216,36 +88791,25 @@ "IsDescending": { "type": "boolean" }, - "Name": { - "type": "string", - "description": "分包名称", - "nullable": true - }, - "PackageName": { - "type": "string", - "description": "包名", + "IsActive": { + "type": "boolean", "nullable": true }, - "PackageVersion": { + "PackageId": { "type": "string", - "description": "分包版本号", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", + "description": "按游戏应用分包 Id 过滤。", "nullable": true }, - "ParentPackageId": { + "Provider": { "type": "string", - "description": "母包Id", + "description": "广告平台 Provider。", "nullable": true } }, "additionalProperties": false, - "description": "游戏应用分包分页查询输入参数" + "description": "广告回调验签配置分页查询输入参数" }, - "PageGameAppReleaseVersionRequest": { + "PageAppSignatureKeyRequest": { "type": "object", "properties": { "SearchKey": { @@ -89271,41 +88835,15 @@ "IsDescending": { "type": "boolean" }, - "Channel": { - "type": "string", - "nullable": true - }, - "Platform": { - "type": "string", - "nullable": true - }, - "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", + "IsActive": { + "type": "boolean", "nullable": true } }, "additionalProperties": false, - "description": "游戏版本管理分页查询输入参数" + "description": "App 传输签名密钥分页查询输入参数。" }, - "PageGameAppRemoteConfigKeyRequest": { + "PageChannelDefinitionRequest": { "type": "object", "properties": { "SearchKey": { @@ -89331,21 +88869,22 @@ "IsDescending": { "type": "boolean" }, - "KeyName": { + "Code": { "type": "string", - "description": "JSON key 名称", + "description": "渠道编码", "nullable": true }, - "DisplayName": { - "type": "string", - "description": "显示名称", - "nullable": true + "Scope": { + "$ref": "#/components/schemas/ChannelScopeEnum" }, - "ValueType": { + "PlatformCode": { "type": "string", - "description": "值类型:string、bool、long", + "description": "适用平台编码", "nullable": true }, + "ChannelType": { + "$ref": "#/components/schemas/ChannelTypeEnum" + }, "IsEnabled": { "type": "boolean", "description": "是否启用", @@ -89353,54 +88892,30 @@ } }, "additionalProperties": false, - "description": "远程配置内容键定义分页查询输入参数" + "description": "渠道分页查询输入参数" }, - "PageGameAppRemoteConfigModeRequest": { + "PageChannelDefinitionRequestDataExportRequest": { "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" - }, - "ModeCode": { - "type": "string", - "description": "模式编码", - "nullable": true + "Query": { + "$ref": "#/components/schemas/PageChannelDefinitionRequest" }, - "DisplayName": { - "type": "string", - "description": "显示名称", + "Columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExportColumnRequest" + }, + "description": "可见列白名单。仅这些字段会被导出;非白名单或敏感字段一律不输出。", "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "Range": { + "$ref": "#/components/schemas/ExportRangeEnum" } }, "additionalProperties": false, - "description": "远程配置模式定义分页查询输入参数" + "description": "通用数据导出请求。实体标识由各业务 Service 的 Admin API 路由隐含\n(URL = 实体),本 DTO 不携带 tableName 或任意表直查参数,\n以规避「任意表 + 自由 SQL」的越权攻击面。" }, - "PageGameAppRemoteConfigRequest": { + "PageClientApiPolicyRequest": { "type": "object", "properties": { "SearchKey": { @@ -89426,61 +88941,15 @@ "IsDescending": { "type": "boolean" }, - "Channel": { - "type": "string", - "nullable": true - }, - "Platform": { - "type": "string", - "nullable": true - }, - "AppVersion": { - "type": "string", - "nullable": true - }, - "Package": { - "type": "string", - "nullable": true - }, - "Language": { - "type": "string", - "nullable": true - }, - "Content": { - "type": "string", - "description": "Content", - "nullable": true - }, - "CheckResourceUrl": { - "type": "string", - "description": "CheckResourceUrl", - "nullable": true - }, - "CheckAppVersionUrl": { - "type": "string", - "description": "CheckAppVersionUrl", - "nullable": true - }, - "CreatedName": { - "type": "string", - "description": "CreatedName", - "nullable": true - }, - "UpdatedName": { - "type": "string", - "description": "UpdatedName", - "nullable": true - }, - "Description": { - "type": "string", - "description": "Description", + "IsActive": { + "type": "boolean", "nullable": true } }, "additionalProperties": false, - "description": "远程配置管理分页查询输入参数" + "description": "Client API 运行策略分页查询输入参数" }, - "PageGameAppServerConfigRequest": { + "PageConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -89506,41 +88975,25 @@ "IsDescending": { "type": "boolean" }, - "Channel": { - "type": "string", - "nullable": true - }, - "Platform": { - "type": "string", - "nullable": true - }, - "AppVersion": { - "type": "string", - "nullable": true - }, - "Package": { + "Name": { "type": "string", + "description": "名称", "nullable": true }, - "Language": { + "Code": { "type": "string", + "description": "编码", "nullable": true }, - "Key": { + "GroupCode": { "type": "string", - "description": "配置键精确筛选", - "nullable": true - }, - "Enabled": { - "type": "boolean", - "description": "键级启停筛选", + "description": "分组编码", "nullable": true } }, - "additionalProperties": false, - "description": "游戏运营配置管理分页查询输入参数" + "additionalProperties": false }, - "PageGameAppVersionDefinitionRequest": { + "PageDictionaryDataRequest": { "type": "object", "properties": { "SearchKey": { @@ -89565,61 +89018,25 @@ }, "IsDescending": { "type": "boolean" - } - }, - "additionalProperties": false, - "description": "版本管理分页查询输入参数" - }, - "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": { + "DictionaryTypeId": { "type": "string", - "nullable": true - }, - "IsDescending": { - "type": "boolean" - }, - "IsActive": { - "type": "boolean", - "nullable": true + "description": "字典类型Id" }, - "PackageId": { + "Value": { "type": "string", - "description": "分包ID", + "description": "值", "nullable": true }, - "PayChannel": { + "Code": { "type": "string", - "description": "支付渠道", - "nullable": true - }, - "IsSandbox": { - "type": "boolean", - "description": "是否沙盒配置", + "description": "编码", "nullable": true } }, - "additionalProperties": false, - "description": "游戏支付配置分页查询输入参数" + "additionalProperties": false }, - "PageJobRequest": { + "PageDictionaryTypeRequest": { "type": "object", "properties": { "SearchKey": { @@ -89645,22 +89062,26 @@ "IsDescending": { "type": "boolean" }, - "JobId": { + "Name": { "type": "string", - "description": "作业Id", + "description": "名称", "nullable": true }, - "Description": { + "Code": { "type": "string", - "description": "描述信息", + "description": "编码", "nullable": true } }, "additionalProperties": false }, - "PageLogRequest": { + "PageFileRequest": { "type": "object", "properties": { + "SearchKey": { + "type": "string", + "nullable": true + }, "Page": { "maximum": 2147483647, "minimum": 1, @@ -89680,9 +89101,9 @@ "IsDescending": { "type": "boolean" }, - "SearchKey": { + "FileName": { "type": "string", - "description": "关键字查询(不区分大小写,按各日志服务声明的 `SearchableTextColumns` 多列 OR 模糊匹配)。\n与时间范围条件 `AND` 叠加;为空/null 时行为与现状完全一致(不过滤)。\n继承自 GameFrameX.Core.BaseInputOutput.BasePageRequest,此处显式列出便于契约可读。", + "description": "文件名称", "nullable": true }, "StartTime": { @@ -89700,378 +89121,202 @@ }, "additionalProperties": false }, - "PageOnlineAssetAuditRequest": { - "required": [ - "ServerId" - ], + "PageGameAdvertisementRewardEntityRequest": { "type": "object", "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "OperatorId": { - "maxLength": 256, - "type": "string", - "description": "操作者 Id 过滤(null = 不过滤)。", - "nullable": true - }, - "PlayerId": { - "maxLength": 256, - "type": "string", - "description": "目标玩家 Id 过滤(null = 不过滤)。", - "nullable": true - }, - "CommandType": { - "maxLength": 256, + "SearchKey": { "type": "string", - "description": "命令类型过滤(grant / revoke 等;null = 不过滤)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "发生时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", "nullable": true }, - "EndTime": { + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "Cursor": { - "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", - "nullable": true + "format": "int32" }, "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, + "OrderBy": { "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 + "IsDescending": { + "type": "boolean" }, - "Cursor": { + "AreaId": { "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", "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 不落资产镜像。" - }, - "PageOnlineAuditSearchRequest": { - "type": "object", - "properties": { - "Operator": { - "maxLength": 256, + "Provider": { "type": "string", - "description": "操作者过滤(Admin 操作日志按账号/姓名匹配,Online/域命令按操作者 Id;null = 不过滤)。", + "description": "广告平台 Provider(等值匹配,标准化值 TopOn / GoogleAdMob / UnityAds)。", "nullable": true }, - "TargetPlayerId": { - "maxLength": 256, + "TransactionId": { "type": "string", - "description": "目标对象过滤(玩家 Id 等;null = 不过滤。Admin 操作日志来源经 RequestParam 提取尽力匹配,提取不到的行不命中)。", + "description": "平台交易号(等值匹配)。", "nullable": true }, - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + "RoleId": { "type": "string", - "description": "区服作用域过滤(null = 全部区服;Online 审计事件来源提供时参与聚合)。", + "description": "角色 Id(等值匹配)。", "nullable": true }, - "CommandKind": { - "maxLength": 256, + "UserId": { "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", + "description": "用户 Id。", "nullable": true }, - "Cursor": { - "maxLength": 256, + "AdvertisementUnit": { "type": "string", - "description": "游标(上一页返回的 NextCursor = 末行 OccurredAt Unix 秒的时间倒序 keyset;首页不传)。", + "description": "广告位/单元(模糊匹配)。", "nullable": true }, - "PageSize": { - "maximum": 100, - "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": { + "Status": { + "$ref": "#/components/schemas/AdvertisementRewardStatusEnum" + }, + "CreateTimeRange": { "type": "array", "items": { - "$ref": "#/components/schemas/OnlineAuditSearchEntryResponse" + "type": "integer", + "format": "int64", + "nullable": true }, - "description": "统一审计行(三来源归并,按 OccurredAt 倒序)。", - "nullable": true - }, - "NextCursor": { - "type": "string", - "description": "下一页游标(= 末行 OccurredAt Unix 秒的时间倒序 keyset;null = 没有更多)。", - "nullable": true - }, - "HasMore": { - "type": "boolean", - "description": "是否还有更多(任一来源仍有剩余即为 true)。" - } - }, - "additionalProperties": false, - "description": "统一审计检索分页响应(Admin 出参;change C344 / vault:C9 S8.2)。" - }, - "PageOnlineMatchAbnormalTicketRequest": { - "required": [ - "AbnormalKind", - "ServerId" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "AbnormalKind": { - "$ref": "#/components/schemas/AbnormalKind" - }, - "Cursor": { - "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", + "description": "创建时间范围([0]=起始, [1]=结束)。", "nullable": true - }, - "PageSize": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "description": "页大小(1~100,默认 20)。", - "format": "int32" } }, "additionalProperties": false, - "description": "异常 Ticket 分页查询输入参数(change C341 §3;按异常类别检索,Cursor 翻页透传 Online)。" + "description": "广告奖励发放账本分页/导出查询输入参数(C114 / GFX-111 后端跟进)。\n\n过滤字段对齐前端检索表单:Provider/Status/RoleId 常用 + TransactionId/AdvertisementUnit/AreaId/时间范围 高级。" }, - "PageOnlineMatchFailureRequest": { - "required": [ - "ServerId" - ], + "PageGameAnnouncementEntityRequest": { "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", + "properties": { + "SearchKey": { + "type": "string", "nullable": true }, - "EndTime": { + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "Cursor": { - "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", - "nullable": true + "format": "int32" }, "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, + }, + "OrderBy": { "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" + "nullable": true }, - "ChannelKind": { - "$ref": "#/components/schemas/OnlineChatChannelKind" + "IsDescending": { + "type": "boolean" }, - "ParticipantPlayerId": { + "AreaId": { "type": "string", - "description": "参与者玩家 Id 过滤(null = 不过滤)。", "nullable": true }, - "Keyword": { + "Language": { "type": "string", - "description": "内容关键词过滤(null = 不过滤)。", + "description": "语言", + "nullable": true + }, + "Title": { + "type": "string", + "description": "标题", "nullable": true }, "StartTime": { "type": "integer", - "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "description": "开始时间", "format": "int64", "nullable": true }, + "StartTimeRange": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": "开始时间范围", + "nullable": true + }, "EndTime": { "type": "integer", - "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "description": "结束时间", "format": "int64", "nullable": true }, - "Cursor": { - "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", + "EndTimeRange": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": "结束时间范围", "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 不落消息镜像。" + "description": "游戏公告分页查询输入参数" }, - "PageOnlineReportCaseRequest": { - "required": [ - "ServerId" - ], + "PageGameAntiCheatEventRequest": { "type": "object", "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。" - }, - "Status": { - "$ref": "#/components/schemas/OnlineReportCaseStatusKind" - }, - "ReporterPlayerId": { + "SearchKey": { "type": "string", - "description": "举报人玩家 Id 过滤(null = 不过滤)。", - "nullable": true - }, - "StartTime": { - "type": "integer", - "description": "举报时间窗起点(Unix 秒;null = 不限)。", - "format": "int64", "nullable": true }, - "EndTime": { + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "举报时间窗终点(Unix 秒;null = 不限)。", - "format": "int64", - "nullable": true - }, - "Cursor": { - "type": "string", - "description": "游标(上一页返回的 NextCursor;首页不传)。", - "nullable": true + "format": "int32" }, "PageSize": { "maximum": 100, "minimum": 1, "type": "integer", - "description": "页大小(1~100,默认 20)。", "format": "int32" + }, + "OrderBy": { + "type": "string", + "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": "指向对象标识过滤(精确匹配)。可空。", + "nullable": true } }, "additionalProperties": false, - "description": "举报案件分页查询输入参数(案件数据实时透传 Online,Admin 不落镜像;作用域必填,与消息审计页一致)。" + "description": "反作弊事件分页查询输入。" }, - "PageOpenAccessRequest": { + "PageGameAppAssetPackageRequest": { "type": "object", "properties": { "SearchKey": { @@ -90097,16 +89342,16 @@ "IsDescending": { "type": "boolean" }, - "AccessKey": { + "Name": { "type": "string", - "description": "身份标识", + "description": "名称", "nullable": true } }, "additionalProperties": false, - "description": "开放接口身份输入参数" + "description": "资源包分页查询输入参数" }, - "PageRoleRequest": { + "PageGameAppAssetPackageVersionHistoryRequest": { "type": "object", "properties": { "SearchKey": { @@ -90132,20 +89377,16 @@ "IsDescending": { "type": "boolean" }, - "Name": { - "type": "string", - "description": "名称", - "nullable": true - }, - "Code": { + "VersionId": { "type": "string", - "description": "编码", + "description": "资源包版本Id", "nullable": true } }, - "additionalProperties": false + "additionalProperties": false, + "description": "资源包版本记录分页查询输入参数" }, - "PageSystemEmailProviderRequest": { + "PageGameAppAssetPackageVersionRequest": { "type": "object", "properties": { "SearchKey": { @@ -90171,27 +89412,63 @@ "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 + }, + "RootPath": { + "type": "string", + "description": "资源下载根路径", + "nullable": true + }, + "AssetPackageName": { + "type": "string", + "description": "资源包名称", "nullable": true } }, "additionalProperties": false, - "description": "平台系统邮件 Provider 配置分页查询输入参数。" + "description": "资源包版本分页查询输入参数" + }, + "PageGameAppAssetPackageVersionSelectRequest": { + "type": "object", + "properties": { + "SearchKey": { + "type": "string", + "nullable": true + }, + "PageSize": { + "maximum": 1000, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "AppPackageId": { + "type": "string", + "description": "分包Id", + "nullable": true + } + }, + "additionalProperties": false, + "description": "资源包版本选择器输入参数" }, - "PageTenantAdvertisementCallbackConfigRequest": { + "PageGameAppFeatureSwitchRequest": { "type": "object", "properties": { "SearchKey": { @@ -90217,20 +89494,26 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { + "SwitchKey": { + "type": "string", + "description": "开关键模糊筛选", + "nullable": true + }, + "IsEnabled": { "type": "boolean", + "description": "启停筛选", "nullable": true }, - "Provider": { + "Audience": { "type": "string", - "description": "广告平台 Provider。", + "description": "消费方标记精确筛选:client / server / both", "nullable": true } }, "additionalProperties": false, - "description": "租户广告回调验签配置分页查询输入参数" + "description": "活动/功能开关管理分页查询输入参数" }, - "PageTenantAppSignatureKeyRequest": { + "PageGameAppOpenAccessRequest": { "type": "object", "properties": { "SearchKey": { @@ -90256,15 +89539,31 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { + "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": "App 传输签名密钥分页查询输入参数。" + "description": "应用开放访问凭证分页查询输入。" }, - "PageTenantClientApiPolicyRequest": { + "PageGameAppPackageRequest": { "type": "object", "properties": { "SearchKey": { @@ -90290,15 +89589,36 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { + "Name": { + "type": "string", + "description": "分包名称", + "nullable": true + }, + "PackageName": { + "type": "string", + "description": "包名", + "nullable": true + }, + "PackageVersion": { + "type": "string", + "description": "分包版本号", + "nullable": true + }, + "IsEnabled": { "type": "boolean", + "description": "是否启用", + "nullable": true + }, + "ParentPackageId": { + "type": "string", + "description": "母包Id", "nullable": true } }, "additionalProperties": false, - "description": "租户 Client API 运行策略分页查询输入参数" + "description": "游戏应用分包分页查询输入参数" }, - "PageTenantGameAdvertisementRewardEntityRequest": { + "PageGameAppReleaseVersionRequest": { "type": "object", "properties": { "SearchKey": { @@ -90324,53 +89644,41 @@ "IsDescending": { "type": "boolean" }, - "AreaId": { + "Channel": { "type": "string", "nullable": true }, - "Provider": { + "Platform": { "type": "string", - "description": "广告平台 Provider(等值匹配,标准化值 TopOn / GoogleAdMob / UnityAds)。", "nullable": true }, - "TransactionId": { + "AppVersion": { "type": "string", - "description": "平台交易号(等值匹配)。", "nullable": true }, - "RoleId": { + "Package": { "type": "string", - "description": "角色 Id(等值匹配)。", "nullable": true }, - "UserId": { + "Language": { "type": "string", - "description": "用户 Id。", "nullable": true }, - "AdvertisementUnit": { + "OldVersion": { "type": "string", - "description": "广告位/单元(模糊匹配)。", + "description": "OldVersion", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/AdvertisementRewardStatusEnum" - }, - "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": { + "PageGameAppRemoteConfigKeyRequest": { "type": "object", "properties": { "SearchKey": { @@ -90396,57 +89704,76 @@ "IsDescending": { "type": "boolean" }, - "AreaId": { + "KeyName": { "type": "string", + "description": "JSON key 名称", "nullable": true }, - "Language": { + "DisplayName": { "type": "string", - "description": "语言", + "description": "显示名称", "nullable": true }, - "Title": { + "ValueType": { "type": "string", - "description": "标题", + "description": "值类型:string、bool、long", "nullable": true }, - "StartTime": { + "IsEnabled": { + "type": "boolean", + "description": "是否启用", + "nullable": true + } + }, + "additionalProperties": false, + "description": "远程配置内容键定义分页查询输入参数" + }, + "PageGameAppRemoteConfigModeRequest": { + "type": "object", + "properties": { + "SearchKey": { + "type": "string", + "nullable": true + }, + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "开始时间", - "format": "int64", + "format": "int32" + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "OrderBy": { + "type": "string", "nullable": true }, - "StartTimeRange": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "description": "开始时间范围", + "IsDescending": { + "type": "boolean" + }, + "ModeCode": { + "type": "string", + "description": "模式编码", "nullable": true }, - "EndTime": { - "type": "integer", - "description": "结束时间", - "format": "int64", + "DisplayName": { + "type": "string", + "description": "显示名称", "nullable": true }, - "EndTimeRange": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "description": "结束时间范围", + "IsEnabled": { + "type": "boolean", + "description": "是否启用", "nullable": true } }, "additionalProperties": false, - "description": "游戏公告分页查询输入参数" + "description": "远程配置模式定义分页查询输入参数" }, - "PageTenantGameAntiCheatEventRequest": { + "PageGameAppRemoteConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -90472,28 +89799,61 @@ "IsDescending": { "type": "boolean" }, - "Provider": { - "$ref": "#/components/schemas/AntiCheatProviderEnum" + "Channel": { + "type": "string", + "nullable": true }, - "RiskLevel": { - "$ref": "#/components/schemas/RiskLevelEnum" + "Platform": { + "type": "string", + "nullable": true }, - "ManualReviewState": { - "$ref": "#/components/schemas/ManualReviewStateEnum" + "AppVersion": { + "type": "string", + "nullable": true }, - "TargetType": { - "$ref": "#/components/schemas/AntiCheatTargetTypeEnum" + "Package": { + "type": "string", + "nullable": true }, - "TargetId": { + "Language": { "type": "string", - "description": "指向对象标识过滤(精确匹配)。可空。", + "nullable": true + }, + "Content": { + "type": "string", + "description": "Content", + "nullable": true + }, + "CheckResourceUrl": { + "type": "string", + "description": "CheckResourceUrl", + "nullable": true + }, + "CheckAppVersionUrl": { + "type": "string", + "description": "CheckAppVersionUrl", + "nullable": true + }, + "CreatedName": { + "type": "string", + "description": "CreatedName", + "nullable": true + }, + "UpdatedName": { + "type": "string", + "description": "UpdatedName", + "nullable": true + }, + "Description": { + "type": "string", + "description": "Description", "nullable": true } }, "additionalProperties": false, - "description": "反作弊事件分页查询输入。" + "description": "远程配置管理分页查询输入参数" }, - "PageTenantGameAppOpenAccessRequest": { + "PageGameAppServerConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -90519,31 +89879,71 @@ "IsDescending": { "type": "boolean" }, - "AccessKey": { + "Channel": { "type": "string", - "description": "访问 Key 关键字。", "nullable": true }, - "Scenario": { + "Platform": { "type": "string", - "description": "责任场景编码。", "nullable": true }, - "SubjectName": { + "AppVersion": { "type": "string", - "description": "责任主体。", "nullable": true }, - "IsEnabled": { + "Package": { + "type": "string", + "nullable": true + }, + "Language": { + "type": "string", + "nullable": true + }, + "Key": { + "type": "string", + "description": "配置键精确筛选", + "nullable": true + }, + "Enabled": { "type": "boolean", - "description": "启用状态过滤(可空)。", + "description": "键级启停筛选", "nullable": true } }, "additionalProperties": false, - "description": "应用开放访问凭证分页查询输入。" + "description": "游戏运营配置管理分页查询输入参数" + }, + "PageGameAppVersionDefinitionRequest": { + "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" + } + }, + "additionalProperties": false, + "description": "版本管理分页查询输入参数" }, - "PageTenantGameAreaClassifyEntityRequest": { + "PageGameAreaClassifyEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90578,7 +89978,7 @@ "additionalProperties": false, "description": "游戏大区分类分页查询输入参数" }, - "PageTenantGameAreaEntityRequest": { + "PageGameAreaEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90631,7 +90031,7 @@ "additionalProperties": false, "description": "游戏区服分页查询输入参数" }, - "PageTenantGameBannerAnnouncementEntityRequest": { + "PageGameBannerAnnouncementEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90725,7 +90125,7 @@ "additionalProperties": false, "description": "游戏内横幅公告分页查询输入参数" }, - "PageTenantGameCommodityEntityRequest": { + "PageGameCommodityEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90786,7 +90186,7 @@ "additionalProperties": false, "description": "游戏商品交易分页查询输入参数" }, - "PageTenantGameDockerTagEntityRequest": { + "PageGameDockerTagEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90821,7 +90221,7 @@ "additionalProperties": false, "description": "游戏大区分类分页查询输入参数" }, - "PageTenantGameGoodsCatalogueEntityRequest": { + "PageGameGoodsCatalogueEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90861,7 +90261,7 @@ "additionalProperties": false, "description": "游戏道具分类分页查询输入参数" }, - "PageTenantGameGoodsEntityRequest": { + "PageGameGoodsEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90902,7 +90302,7 @@ "additionalProperties": false, "description": "游戏资源分页查询输入参数" }, - "PageTenantGameLoginTicketKeyRequest": { + "PageGameLoginTicketKeyRequest": { "type": "object", "properties": { "SearchKey": { @@ -90934,9 +90334,9 @@ } }, "additionalProperties": false, - "description": "租户 Game 登录票据签名密钥分页查询输入参数。" + "description": "Game 登录票据签名密钥分页查询输入参数。" }, - "PageTenantGameMailCampaignEntityRequest": { + "PageGameMailCampaignEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -90992,7 +90392,7 @@ "additionalProperties": false, "description": "Campaign 分页查询输入。" }, - "PageTenantGameMailEntityRequest": { + "PageGameMailEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91042,7 +90442,7 @@ "additionalProperties": false, "description": "游戏邮件分页查询输入参数" }, - "PageTenantGameMailTemplateCategoryEntityRequest": { + "PageGameMailTemplateCategoryEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91082,7 +90482,7 @@ "additionalProperties": false, "description": "邮件模板分类分页查询输入参数" }, - "PageTenantGameMailTemplateEntityRequest": { + "PageGameMailTemplateEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91127,7 +90527,7 @@ "additionalProperties": false, "description": "邮件模板分页查询输入参数" }, - "PageTenantGameOnlineConfigRolloutRequest": { + "PageGameOnlineConfigRolloutRequest": { "type": "object", "properties": { "SearchKey": { @@ -91173,7 +90573,7 @@ "additionalProperties": false, "description": "配置灰度版本行分页查询输入(来源 change C343 / vault:C8 S7.7)。" }, - "PageTenantGameOnlinePlayerSegmentRequest": { + "PageGameOnlinePlayerSegmentRequest": { "type": "object", "properties": { "SearchKey": { @@ -91211,7 +90611,7 @@ "additionalProperties": false, "description": "玩家分群分页查询输入。" }, - "PageTenantGameOrderEntityRequest": { + "PageGameOrderEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91255,332 +90655,68 @@ "format": "int32", "nullable": true }, - "Content": { - "type": "string", - "description": "内容", - "nullable": true - }, - "OrderId": { - "type": "string", - "description": "第三方订单id", - "nullable": true - }, - "Sku": { - "type": "integer", - "description": "商品", - "format": "int64", - "nullable": true - }, - "PayChannel": { - "type": "string", - "description": "支付渠道", - "nullable": true - }, - "Channel": { - "type": "string", - "description": "客户端所属渠道", - "nullable": true - }, - "Platform": { - "type": "string", - "description": "全局平台", - "nullable": true - }, - "CreateTime": { - "type": "integer", - "description": "创建时间", - "format": "int64", - "nullable": true - }, - "CreateTimeRange": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "description": "创建时间范围", - "nullable": true - }, - "IsSandbox": { - "type": "boolean", - "description": "是否为沙盒", - "nullable": true - }, - "AccountId": { - "type": "string", - "description": "所属账号", - "nullable": true - } - }, - "additionalProperties": false, - "description": "游戏支付订单分页查询输入参数" - }, - "PageTenantGameOrderFulfillmentEntityRequest": { - "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" - }, - "AreaId": { - "type": "string", - "nullable": true - }, - "OrderId": { - "type": "string", - "description": "来源订单 Id(账本 OrderId 为 long,非订单表的字符串 OrderId)。", - "nullable": true - }, - "RoleId": { - "type": "string", - "description": "角色 Id。", - "nullable": true - }, - "PayChannel": { - "type": "string", - "description": "支付渠道/Provider(模糊匹配)。", - "nullable": true - }, - "ProviderTransactionId": { - "type": "string", - "description": "第三方支付交易号(等值匹配)。", - "nullable": true - }, - "Type": { - "$ref": "#/components/schemas/FulfillmentTypeEnum" - }, - "Status": { - "$ref": "#/components/schemas/FulfillmentStatusEnum" - }, - "Sku": { - "type": "integer", - "description": "商品 Id。", - "format": "int64", - "nullable": true - }, - "AccountId": { - "type": "string", - "description": "账号。", - "nullable": true - }, - "OperatorId": { - "type": "string", - "description": "操作人(>0 人工 / =0 系统自动)。", - "nullable": true - }, - "CreateTimeRange": { - "type": "array", - "items": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "description": "创建时间范围([0]=起始, [1]=结束)。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "权益发货账本分页查询输入参数(C120)。过滤字段严格锁定见 change C120 §3 BuildPageQuery 表。" - }, - "PageTenantGamePenaltyAppealEntityRequest": { - "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" - }, - "PenaltyId": { - "type": "string", - "description": "关联处罚 Id(可选过滤)。", - "nullable": true - }, - "Status": { - "$ref": "#/components/schemas/AppealStatusEnum" - } - }, - "additionalProperties": false, - "description": "申诉分页查询输入参数。" - }, - "PageTenantGamePenaltyEntityRequest": { - "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" - }, - "TargetType": { - "$ref": "#/components/schemas/PenaltyTargetTypeEnum" - }, - "TargetId": { - "type": "string", - "description": "对象标识(可选过滤,精确匹配)。", - "nullable": true - }, - "Status": { - "$ref": "#/components/schemas/PenaltyStatusEnum" - }, - "ActionType": { - "$ref": "#/components/schemas/PenaltyActionTypeEnum" - } - }, - "additionalProperties": false, - "description": "处罚分页查询输入参数。" - }, - "PageTenantGameRedeemCodeChannelEntityRequest": { - "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 - } - }, - "additionalProperties": false, - "description": "兑换码渠道分页查询输入参数" - }, - "PageTenantGameRedeemCodeEntityRequest": { - "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" + "Content": { + "type": "string", + "description": "内容", + "nullable": true }, - "OrderBy": { + "OrderId": { "type": "string", + "description": "第三方订单id", "nullable": true }, - "IsDescending": { - "type": "boolean" + "Sku": { + "type": "integer", + "description": "商品", + "format": "int64", + "nullable": true }, - "AreaId": { + "PayChannel": { "type": "string", + "description": "支付渠道", "nullable": true }, - "Code": { + "Channel": { "type": "string", - "description": "兑换码", + "description": "客户端所属渠道", "nullable": true }, - "IsActive": { - "type": "boolean", - "description": "是否激活", + "Platform": { + "type": "string", + "description": "全局平台", "nullable": true }, - "UsageLimit": { + "CreateTime": { "type": "integer", - "description": "可使用次数", - "format": "int32", + "description": "创建时间", + "format": "int64", "nullable": true }, - "UsedCount": { - "type": "integer", - "description": "已使用次数", - "format": "int32", + "CreateTimeRange": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": "创建时间范围", "nullable": true }, - "ChannelId": { + "IsSandbox": { + "type": "boolean", + "description": "是否为沙盒", + "nullable": true + }, + "AccountId": { "type": "string", - "description": "兑换码渠道ID", + "description": "所属账号", "nullable": true } }, "additionalProperties": false, - "description": "兑换码分页查询输入参数" + "description": "游戏支付订单分页查询输入参数" }, - "PageTenantGameRedeemCodeUseRecordEntityRequest": { + "PageGameOrderFulfillmentEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91610,70 +90746,63 @@ "type": "string", "nullable": true }, - "Code": { + "OrderId": { "type": "string", - "description": "兑换码", + "description": "来源订单 Id(账本 OrderId 为 long,非订单表的字符串 OrderId)。", "nullable": true }, - "PlayerId": { + "RoleId": { "type": "string", - "description": "角色ID", + "description": "角色 Id。", "nullable": true }, - "ChannelId": { + "PayChannel": { "type": "string", - "description": "兑换码渠道/分组ID(关联 TenantGameRedeemCodeEntity.ChannelId 过滤)", + "description": "支付渠道/Provider(模糊匹配)。", "nullable": true - } - }, - "additionalProperties": false, - "description": "兑换记录分页查询输入参数" - }, - "PageTenantGameReportEntityRequest": { - "type": "object", - "properties": { - "SearchKey": { + }, + "ProviderTransactionId": { "type": "string", + "description": "第三方支付交易号(等值匹配)。", "nullable": true }, - "Page": { - "maximum": 2147483647, - "minimum": 1, - "type": "integer", - "format": "int32" + "Type": { + "$ref": "#/components/schemas/FulfillmentTypeEnum" }, - "PageSize": { - "maximum": 100, - "minimum": 1, + "Status": { + "$ref": "#/components/schemas/FulfillmentStatusEnum" + }, + "Sku": { "type": "integer", - "format": "int32" + "description": "商品 Id。", + "format": "int64", + "nullable": true }, - "OrderBy": { + "AccountId": { "type": "string", + "description": "账号。", "nullable": true }, - "IsDescending": { - "type": "boolean" - }, - "TargetType": { - "$ref": "#/components/schemas/PenaltyTargetTypeEnum" - }, - "TargetId": { + "OperatorId": { "type": "string", - "description": "被举报对象标识(可选过滤,精确匹配)。", + "description": "操作人(>0 人工 / =0 系统自动)。", "nullable": true }, - "ReportType": { - "$ref": "#/components/schemas/ReportTypeEnum" - }, - "Status": { - "$ref": "#/components/schemas/ReportStatusEnum" + "CreateTimeRange": { + "type": "array", + "items": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": "创建时间范围([0]=起始, [1]=结束)。", + "nullable": true } }, "additionalProperties": false, - "description": "举报分页查询输入参数。" + "description": "权益发货账本分页查询输入参数(C120)。过滤字段严格锁定见 change C120 §3 BuildPageQuery 表。" }, - "PageTenantGameRewardTemplateEntityRequest": { + "PageGamePaymentConfigRequest": { "type": "object", "properties": { "SearchKey": { @@ -91699,26 +90828,30 @@ "IsDescending": { "type": "boolean" }, - "Name": { + "IsActive": { + "type": "boolean", + "nullable": true + }, + "PackageId": { "type": "string", - "description": "名称。", + "description": "分包ID", "nullable": true }, - "GroupId": { + "PayChannel": { "type": "string", - "description": "分组Id。", + "description": "支付渠道", "nullable": true }, - "IsEnabled": { + "IsSandbox": { "type": "boolean", - "description": "是否启用。", + "description": "是否沙盒配置", "nullable": true } }, "additionalProperties": false, - "description": "奖励模板分页查询输入参数。" + "description": "游戏支付配置分页查询输入参数" }, - "PageTenantGameRewardTemplateGroupEntityRequest": { + "PageGamePenaltyAppealEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91744,21 +90877,19 @@ "IsDescending": { "type": "boolean" }, - "Name": { + "PenaltyId": { "type": "string", - "description": "名称。", + "description": "关联处罚 Id(可选过滤)。", "nullable": true }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。", - "nullable": true + "Status": { + "$ref": "#/components/schemas/AppealStatusEnum" } }, "additionalProperties": false, - "description": "奖励模板分组分页查询输入参数。" + "description": "申诉分页查询输入参数。" }, - "PageTenantGameRoleEntityRequest": { + "PageGamePenaltyEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91784,71 +90915,25 @@ "IsDescending": { "type": "boolean" }, - "AreaId": { - "type": "string", - "nullable": true - }, - "UserId": { - "type": "string", - "description": "用户ID", - "nullable": true - }, - "Id": { - "type": "string", - "description": "角色ID", - "nullable": true - }, - "IsSandbox": { - "type": "boolean", - "description": "是否是沙盒账户", - "nullable": true + "TargetType": { + "$ref": "#/components/schemas/PenaltyTargetTypeEnum" }, - "Name": { + "TargetId": { "type": "string", - "description": "名称", - "nullable": true - }, - "Level": { - "type": "integer", - "description": "角色当前的等级", - "format": "int64", - "nullable": true - }, - "RegisterTime": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "注册时间范围", - "nullable": true - }, - "LogoutTime": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "最后登录时间范围", + "description": "对象标识(可选过滤,精确匹配)。", "nullable": true }, - "RechargeMin": { - "type": "integer", - "description": "累充最小值(分)", - "format": "int32", - "nullable": true + "Status": { + "$ref": "#/components/schemas/PenaltyStatusEnum" }, - "RechargeMax": { - "type": "integer", - "description": "累充最大值(分)", - "format": "int32", - "nullable": true + "ActionType": { + "$ref": "#/components/schemas/PenaltyActionTypeEnum" } }, "additionalProperties": false, - "description": "游戏角色分页查询输入参数" + "description": "处罚分页查询输入参数。" }, - "PageTenantGameTimeJobEntityRequest": { + "PageGameRedeemCodeChannelEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91881,9 +90966,9 @@ } }, "additionalProperties": false, - "description": "游戏定时任务分页查询输入参数" + "description": "兑换码渠道分页查询输入参数" }, - "PageTenantGameUserEntityRequest": { + "PageGameRedeemCodeEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91909,29 +90994,42 @@ "IsDescending": { "type": "boolean" }, - "Id": { + "AreaId": { "type": "string", - "description": "Id", "nullable": true }, - "UserName": { + "Code": { "type": "string", - "description": "账号", + "description": "兑换码", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/GameUserStatus" + "IsActive": { + "type": "boolean", + "description": "是否激活", + "nullable": true }, - "Name": { + "UsageLimit": { + "type": "integer", + "description": "可使用次数", + "format": "int32", + "nullable": true + }, + "UsedCount": { + "type": "integer", + "description": "已使用次数", + "format": "int32", + "nullable": true + }, + "ChannelId": { "type": "string", - "description": "昵称", + "description": "兑换码渠道ID", "nullable": true } }, "additionalProperties": false, - "description": "游戏账号分页查询输入参数" + "description": "兑换码分页查询输入参数" }, - "PageTenantGameWebShopEntityRequest": { + "PageGameRedeemCodeUseRecordEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -91961,27 +91059,26 @@ "type": "string", "nullable": true }, - "Title": { + "Code": { "type": "string", - "description": "标题", + "description": "兑换码", "nullable": true }, - "IsAllPost": { - "type": "boolean", - "description": "是否发全部用户", + "PlayerId": { + "type": "string", + "description": "角色ID", "nullable": true }, - "Status": { - "$ref": "#/components/schemas/GameMailStatus" - }, - "MailType": { - "$ref": "#/components/schemas/GameMailType" + "ChannelId": { + "type": "string", + "description": "兑换码渠道/分组ID(关联 GameRedeemCodeEntity.ChannelId 过滤)", + "nullable": true } }, "additionalProperties": false, - "description": "游戏邮件分页查询输入参数" + "description": "兑换记录分页查询输入参数" }, - "PageTenantGameWebShopOrderEntityRequest": { + "PageGameReportEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -92007,31 +91104,25 @@ "IsDescending": { "type": "boolean" }, - "AreaId": { - "type": "string", - "nullable": true + "TargetType": { + "$ref": "#/components/schemas/PenaltyTargetTypeEnum" }, - "Title": { + "TargetId": { "type": "string", - "description": "标题", + "description": "被举报对象标识(可选过滤,精确匹配)。", "nullable": true }, - "IsAllPost": { - "type": "boolean", - "description": "是否发全部用户", - "nullable": true + "ReportType": { + "$ref": "#/components/schemas/ReportTypeEnum" }, "Status": { - "$ref": "#/components/schemas/GameMailStatus" - }, - "MailType": { - "$ref": "#/components/schemas/GameMailType" + "$ref": "#/components/schemas/ReportStatusEnum" } }, "additionalProperties": false, - "description": "游戏邮件分页查询输入参数" + "description": "举报分页查询输入参数。" }, - "PageTenantObjectStorageConfigRequest": { + "PageGameRewardTemplateEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -92057,21 +91148,26 @@ "IsDescending": { "type": "boolean" }, - "Provider": { + "Name": { "type": "string", - "description": "按提供商过滤。", + "description": "名称。", + "nullable": true + }, + "GroupId": { + "type": "string", + "description": "分组Id。", "nullable": true }, "IsEnabled": { "type": "boolean", - "description": "按启用状态过滤。", + "description": "是否启用。", "nullable": true } }, "additionalProperties": false, - "description": "租户对象存储配置分页查询入参。" + "description": "奖励模板分页查询输入参数。" }, - "PageTenantSessionKeyRequest": { + "PageGameRewardTemplateGroupEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -92097,15 +91193,21 @@ "IsDescending": { "type": "boolean" }, - "IsActive": { + "Name": { + "type": "string", + "description": "名称。", + "nullable": true + }, + "IsEnabled": { "type": "boolean", + "description": "是否启用。", "nullable": true } }, "additionalProperties": false, - "description": "App 会话密钥分页查询输入参数。" + "description": "奖励模板分组分页查询输入参数。" }, - "PageUserRequest": { + "PageGameRoleEntityRequest": { "type": "object", "properties": { "SearchKey": { @@ -92131,849 +91233,699 @@ "IsDescending": { "type": "boolean" }, - "Account": { - "type": "string", - "description": "账号", - "nullable": true - }, - "RealName": { - "type": "string", - "description": "姓名", - "nullable": true - }, - "Phone": { - "type": "string", - "description": "手机号", - "nullable": true - } - }, - "additionalProperties": false - }, - "PaymentConfigChannel": { - "type": "object", - "properties": { - "Value": { + "AreaId": { "type": "string", "nullable": true }, - "Label": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PaymentConfigField": { - "type": "object", - "properties": { - "Key": { + "UserId": { "type": "string", + "description": "用户ID", "nullable": true }, - "Label": { + "Id": { "type": "string", + "description": "角色ID", "nullable": true }, - "Type": { - "type": "string", + "IsSandbox": { + "type": "boolean", + "description": "是否是沙盒账户", "nullable": true }, - "Required": { - "type": "boolean" - }, - "Help": { + "Name": { "type": "string", + "description": "名称", "nullable": true }, - "Default": { + "Level": { + "type": "integer", + "description": "角色当前的等级", + "format": "int64", "nullable": true }, - "Options": { + "RegisterTime": { "type": "array", "items": { - "$ref": "#/components/schemas/PaymentConfigOption" + "type": "integer", + "format": "int64" }, - "nullable": true - } - }, - "additionalProperties": false - }, - "PaymentConfigOption": { - "type": "object", - "properties": { - "Value": { - "type": "string", - "nullable": true - }, - "Label": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PaymentConfigSchema": { - "type": "object", - "properties": { - "Channel": { - "type": "string", - "nullable": true - }, - "Label": { - "type": "string", + "description": "注册时间范围", "nullable": true }, - "Fields": { + "LogoutTime": { "type": "array", "items": { - "$ref": "#/components/schemas/PaymentConfigField" - }, - "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" - }, - "CodeLength": { - "type": "integer", - "description": "验证码长度。", - "format": "int32" - }, - "ExpirySeconds": { - "type": "integer", - "description": "过期秒数。", - "format": "int32" - }, - "IgnoreCase": { - "type": "boolean", - "description": "是否忽略大小写。" + "type": "integer", + "format": "int64" + }, + "description": "最后登录时间范围", + "nullable": true }, - "ImageOption": { - "$ref": "#/components/schemas/PlatformCaptchaImageRequest" + "RechargeMin": { + "type": "integer", + "description": "累充最小值(分)", + "format": "int32", + "nullable": true }, - "UpdateTime": { + "RechargeMax": { "type": "integer", - "description": "最近更新时间。", - "format": "int64", + "description": "累充最大值(分)", + "format": "int32", "nullable": true } }, "additionalProperties": false, - "description": "平台图形验证码配置输出。" + "description": "游戏角色分页查询输入参数" }, - "PlatformCaptchaConfigUpdateRequest": { - "required": [ - "ImageOption" - ], + "PageGameTimeJobEntityRequest": { "type": "object", "properties": { - "IsEnabled": { - "type": "boolean", - "description": "是否启用登录图形验证码。" + "SearchKey": { + "type": "string", + "nullable": true }, - "CaptchaType": { - "maximum": 11, - "minimum": 0, + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "验证码类型。", "format": "int32" }, - "CodeLength": { - "maximum": 8, + "PageSize": { + "maximum": 100, "minimum": 1, "type": "integer", - "description": "验证码长度。", "format": "int32" }, - "ExpirySeconds": { - "maximum": 600, - "minimum": 10, - "type": "integer", - "description": "过期秒数。", - "format": "int32" + "OrderBy": { + "type": "string", + "nullable": true }, - "IgnoreCase": { - "type": "boolean", - "description": "是否忽略大小写。" + "IsDescending": { + "type": "boolean" }, - "ImageOption": { - "$ref": "#/components/schemas/PlatformCaptchaImageRequest" + "Name": { + "type": "string", + "description": "名称", + "nullable": true } }, "additionalProperties": false, - "description": "平台图形验证码配置更新输入。" + "description": "游戏定时任务分页查询输入参数" }, - "PlatformCaptchaImageRequest": { + "PageGameUserEntityRequest": { "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" + "SearchKey": { + "type": "string", + "nullable": true }, - "BubbleCount": { - "maximum": 30, - "minimum": 0, + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "气泡数量。", "format": "int32" }, - "BubbleThickness": { - "maximum": 10, - "minimum": 0, - "type": "number", - "description": "气泡线条厚度。", - "format": "float" - }, - "InterferenceLineCount": { - "maximum": 30, - "minimum": 0, + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", - "description": "干扰线数量。", "format": "int32" }, - "FontFamily": { - "maxLength": 256, + "OrderBy": { "type": "string", - "description": "字体名称。", "nullable": true }, - "FrameDelay": { - "maximum": 2000, - "minimum": 50, - "type": "integer", - "description": "动画帧延迟。", - "format": "int32" + "IsDescending": { + "type": "boolean" }, - "BackgroundColor": { - "maxLength": 256, + "Id": { "type": "string", - "description": "背景颜色。", + "description": "Id", "nullable": true }, - "ForegroundColors": { - "maxLength": 256, + "UserName": { "type": "string", - "description": "前景颜色,多个颜色用逗号分隔。", + "description": "账号", "nullable": true }, - "Quality": { - "maximum": 100, - "minimum": 1, - "type": "integer", - "description": "图片质量。", - "format": "int32" + "Status": { + "$ref": "#/components/schemas/GameUserStatus" }, - "TextBold": { - "type": "boolean", - "description": "是否粗体。" + "Name": { + "type": "string", + "description": "昵称", + "nullable": true } }, "additionalProperties": false, - "description": "平台图形验证码图像配置输入。" + "description": "游戏账号分页查询输入参数" }, - "PlatformJwtConfigResponse": { + "PageGameWebShopEntityRequest": { "type": "object", "properties": { - "IssuerSigningKey": { + "SearchKey": { "type": "string", - "description": "签名密钥掩码。", "nullable": true }, - "HasSigningKey": { - "type": "boolean", - "description": "是否已配置签名密钥。" + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "ValidIssuer": { - "type": "string", - "description": "签发方。", - "nullable": true + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "ValidAudience": { + "OrderBy": { "type": "string", - "description": "签收方。", "nullable": true }, - "ClockSkew": { - "type": "integer", - "description": "过期时间容错秒数。", - "format": "int64" + "IsDescending": { + "type": "boolean" }, - "Algorithm": { + "AreaId": { "type": "string", - "description": "签名算法。", "nullable": true }, - "ValidateIssuerSigningKey": { - "type": "boolean", - "description": "验证签名密钥。" - }, - "ValidateIssuer": { - "type": "boolean", - "description": "验证签发方。" - }, - "ValidateAudience": { - "type": "boolean", - "description": "验证签收方。" + "Title": { + "type": "string", + "description": "标题", + "nullable": true }, - "ValidateLifetime": { + "IsAllPost": { "type": "boolean", - "description": "验证生命周期。" + "description": "是否发全部用户", + "nullable": true }, - "TokenVersion": { - "type": "integer", - "description": "当前全局令牌版本。", - "format": "int64" + "Status": { + "$ref": "#/components/schemas/GameMailStatus" }, - "UpdateTime": { - "type": "integer", - "description": "最近更新时间。", - "format": "int64", - "nullable": true + "MailType": { + "$ref": "#/components/schemas/GameMailType" } }, "additionalProperties": false, - "description": "平台 JWT 配置输出。" + "description": "游戏邮件分页查询输入参数" }, - "PlatformJwtConfigUpdateRequest": { - "required": [ - "ValidAudience", - "ValidIssuer" - ], + "PageGameWebShopOrderEntityRequest": { "type": "object", "properties": { - "IssuerSigningKey": { + "SearchKey": { "type": "string", - "description": "签名密钥。传入 ****** 表示保留当前密钥。", "nullable": true }, - "ValidIssuer": { - "minLength": 1, - "type": "string", - "description": "签发方。" - }, - "ValidAudience": { - "minLength": 1, - "type": "string", - "description": "签收方。" + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "ClockSkew": { - "maximum": 300, - "minimum": 0, + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", - "description": "过期时间容错秒数。", - "format": "int64" - } - }, - "additionalProperties": false, - "description": "平台 JWT 配置更新输入。" - }, - "PlatformLoggingConfigResponse": { - "type": "object", - "properties": { - "File": { - "$ref": "#/components/schemas/PlatformLoggingFileResponse" + "format": "int32" }, - "Database": { - "$ref": "#/components/schemas/PlatformLoggingDatabaseResponse" + "OrderBy": { + "type": "string", + "nullable": true }, - "ElasticSearch": { - "$ref": "#/components/schemas/PlatformLoggingElasticSearchResponse" + "IsDescending": { + "type": "boolean" }, - "Monitor": { - "$ref": "#/components/schemas/PlatformLoggingMonitorResponse" + "AreaId": { + "type": "string", + "nullable": true }, - "UpdateTime": { - "type": "integer", - "description": "最近更新时间(Unix 秒)。", - "format": "int64", + "Title": { + "type": "string", + "description": "标题", "nullable": true - } - }, - "additionalProperties": false, - "description": "平台日志配置输出。ES !:ElasticSearchServerUris 经掩码处理,不回显明文 URI/凭据。" - }, - "PlatformLoggingConfigUpdateRequest": { - "type": "object", - "properties": { - "File": { - "$ref": "#/components/schemas/PlatformLoggingFileUpdateRequest" }, - "Database": { - "$ref": "#/components/schemas/PlatformLoggingDatabaseUpdateRequest" + "IsAllPost": { + "type": "boolean", + "description": "是否发全部用户", + "nullable": true }, - "ElasticSearch": { - "$ref": "#/components/schemas/PlatformLoggingElasticSearchUpdateRequest" + "Status": { + "$ref": "#/components/schemas/GameMailStatus" }, - "Monitor": { - "$ref": "#/components/schemas/PlatformLoggingMonitorUpdateRequest" + "MailType": { + "$ref": "#/components/schemas/GameMailType" } }, "additionalProperties": false, - "description": "平台日志配置更新输入。\nES !:ElasticSearchServerUris:若全部为掩码占位 `\"***\"` 视为「未变更」,保留库内原值;\n含非占位项则按非占位项替换;空列表视为清空。" + "description": "游戏邮件分页查询输入参数" }, - "PlatformLoggingDatabaseResponse": { + "PageJobRequest": { "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" }, - "MinimumLevel": { + "JobId": { + "type": "string", + "description": "作业Id", + "nullable": true + }, + "Description": { "type": "string", + "description": "描述信息", "nullable": true } }, "additionalProperties": false }, - "PlatformLoggingDatabaseUpdateRequest": { + "PageLogRequest": { "type": "object", "properties": { - "IsEnabled": { + "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" }, - "MinimumLevel": { + "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 }, - "PlatformLoggingElasticSearchResponse": { + "PageObjectStorageConfigRequest": { "type": "object", "properties": { - "IsEnabled": { - "type": "boolean" + "SearchKey": { + "type": "string", + "nullable": true }, - "ServerUris": { - "type": "array", - "items": { - "type": "string" - }, + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "OrderBy": { + "type": "string", "nullable": true }, - "DefaultIndex": { + "IsDescending": { + "type": "boolean" + }, + "Provider": { "type": "string", + "description": "按提供商过滤。", + "nullable": true + }, + "IsEnabled": { + "type": "boolean", + "description": "按启用状态过滤。", "nullable": true } }, "additionalProperties": false, - "description": "ES 日志输出。ServerUris 元素统一掩码为 `\"***\"`,仅保留数量,不回显明文。" + "description": "对象存储配置分页查询入参。" }, - "PlatformLoggingElasticSearchUpdateRequest": { + "PageOnlineAssetAuditRequest": { + "required": [ + "ServerId" + ], "type": "object", "properties": { - "IsEnabled": { - "type": "boolean" + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, - "ServerUris": { - "type": "array", - "items": { - "type": "string" - }, + "OperatorId": { + "maxLength": 256, + "type": "string", + "description": "操作者 Id 过滤(null = 不过滤)。", "nullable": true }, - "DefaultIndex": { + "PlayerId": { + "maxLength": 256, "type": "string", + "description": "目标玩家 Id 过滤(null = 不过滤)。", "nullable": true - } - }, - "additionalProperties": false - }, - "PlatformLoggingFileResponse": { - "type": "object", - "properties": { - "IsEnabled": { - "type": "boolean" }, - "FileName": { + "CommandType": { + "maxLength": 256, "type": "string", + "description": "命令类型过滤(grant / revoke 等;null = 不过滤)。", "nullable": true }, - "Append": { - "type": "boolean" + "StartTime": { + "type": "integer", + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "FileSizeLimitBytes": { + "EndTime": { "type": "integer", - "format": "int64" + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "MaxRollingFiles": { + "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 必填;审计查询无跨区服聚合端点。" }, - "PlatformLoggingFileUpdateRequest": { + "PageOnlineAssetLedgerRequest": { + "required": [ + "PlayerId", + "ServerId" + ], "type": "object", "properties": { - "IsEnabled": { - "type": "boolean" - }, - "FileName": { - "maximum": 4096, + "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 }, - "Append": { - "type": "boolean" + "StartTime": { + "type": "integer", + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "FileSizeLimitBytes": { - "maximum": 1073741824, - "minimum": 1024, + "EndTime": { "type": "integer", - "format": "int64" + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "MaxRollingFiles": { - "maximum": 365, + "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 不落资产镜像。" }, - "PlatformLoggingMonitorResponse": { + "PageOnlineAuditSearchRequest": { "type": "object", "properties": { - "GlobalEnabled": { - "type": "boolean" - }, - "BahLogLevel": { + "Operator": { + "maxLength": 256, "type": "string", + "description": "操作者过滤(Admin 操作日志按账号/姓名匹配,Online/域命令按操作者 Id;null = 不过滤)。", "nullable": true }, - "WithReturnValue": { - "type": "boolean" - }, - "ReturnValueThreshold": { - "type": "integer", - "format": "int32" - }, - "JsonBehavior": { + "TargetPlayerId": { + "maxLength": 256, "type": "string", + "description": "目标对象过滤(玩家 Id 等;null = 不过滤。Admin 操作日志来源经 RequestParam 提取尽力匹配,提取不到的行不命中)。", "nullable": true }, - "JsonIndented": { - "type": "boolean" - }, - "UseUtcTimestamp": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "PlatformLoggingMonitorUpdateRequest": { - "type": "object", - "properties": { - "GlobalEnabled": { - "type": "boolean" + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "区服作用域过滤(null = 全部区服;Online 审计事件来源提供时参与聚合)。", + "nullable": true }, - "BahLogLevel": { + "CommandKind": { + "maxLength": 256, "type": "string", + "description": "命令类型过滤(substring 匹配,如 penalty / grant / rollout;null = 不过滤)。", "nullable": true }, - "WithReturnValue": { - "type": "boolean" + "StartTime": { + "type": "integer", + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "ReturnValueThreshold": { - "maximum": 100000, - "minimum": 0, + "EndTime": { "type": "integer", - "format": "int32" + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "JsonBehavior": { + "Cursor": { + "maxLength": 256, "type": "string", + "description": "游标(上一页返回的 NextCursor = 末行 OccurredAt Unix 秒的时间倒序 keyset;首页不传)。", "nullable": true }, - "JsonIndented": { - "type": "boolean" - }, - "UseUtcTimestamp": { - "type": "boolean" + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "统一审计检索分页输入参数(五维过滤:操作者/对象/作用域/命令类型/时间窗;change C344 / vault:C9 S8.2)。\n\n作用域维度(ServerId)在此是可选过滤而非调用前置:本地两来源(Admin 操作日志 / 域命令记录)\n支持无作用域全量检索;Online 审计事件来源仅在 ServerId 提供时参与聚合\n(区服上下文是每次 Online 调用的前置条件),未锚定时该来源静默跳过(三来源口径见 OnlineAuditSourceMap)。" }, - "PlatformPasswordPolicyConfigResponse": { + "PageOnlineAuditSearchResponse": { "type": "object", "properties": { - "StrongPassword": { - "type": "boolean", - "description": "是否开启密码强度验证。" - }, - "PasswordStrengthValidation": { - "type": "string", - "description": "密码强度验证正则表达式。", + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OnlineAuditSearchEntryResponse" + }, + "description": "统一审计行(三来源归并,按 OccurredAt 倒序)。", "nullable": true }, - "PasswordStrengthValidationMsg": { + "NextCursor": { "type": "string", - "description": "密码强度验证失败提示。", + "description": "下一页游标(= 末行 OccurredAt Unix 秒的时间倒序 keyset;null = 没有更多)。", "nullable": true }, - "UpdateTime": { - "type": "integer", - "description": "最近更新时间(Unix 秒)。", - "format": "int64", - "nullable": true + "HasMore": { + "type": "boolean", + "description": "是否还有更多(任一来源仍有剩余即为 true)。" } }, "additionalProperties": false, - "description": "平台密码策略配置输出(C173)。仅暴露密码强度策略字段,绝不回显 Cryptogram 密钥(CryptoType/PublicKey/PrivateKey)。" + "description": "统一审计检索分页响应(Admin 出参;change C344 / vault:C9 S8.2)。" }, - "PlatformPasswordPolicyConfigUpdateRequest": { + "PageOnlineMatchAbnormalTicketRequest": { + "required": [ + "AbnormalKind", + "ServerId" + ], "type": "object", "properties": { - "StrongPassword": { - "type": "boolean", - "description": "是否开启密码强度验证。" - }, - "PasswordStrengthValidation": { - "maximum": 1024, + "ServerId": { + "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "密码强度验证正则表达式(必须可编译)。", - "nullable": true + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, - "PasswordStrengthValidationMsg": { - "maximum": 1024, - "minimum": 1, + "AbnormalKind": { + "$ref": "#/components/schemas/AbnormalKind" + }, + "Cursor": { "type": "string", - "description": "密码强度验证失败提示。", + "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, "additionalProperties": false, - "description": "平台密码策略配置更新输入(SuperAdmin-only)。" + "description": "异常 Ticket 分页查询输入参数(change C341 §3;按异常类别检索,Cursor 翻页透传 Online)。" }, - "PlatformRateLimitConfigResponse": { + "PageOnlineMatchFailureRequest": { + "required": [ + "ServerId" + ], "type": "object", "properties": { - "IsEnabled": { - "type": "boolean", - "description": "是否启用全局 IP 固定窗口限流。" - }, - "Version": { - "type": "integer", - "description": "当前配置版本。", - "format": "int64" - }, - "PermitLimit": { - "type": "integer", - "description": "单个固定窗口允许的请求数。", - "format": "int32" + "ServerId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, - "WindowSeconds": { - "type": "integer", - "description": "固定窗口秒数。", - "format": "int32" + "ReasonCode": { + "maxLength": 256, + "type": "string", + "description": "失败原因码过滤(Online 原值:Timeout/CancelRace/RateLimited/DuplicateTicket;null = 不过滤)。", + "nullable": true }, - "QueueLimit": { + "StartTime": { "type": "integer", - "description": "排队请求数量。", - "format": "int32" + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "UpdateTime": { + "EndTime": { "type": "integer", - "description": "最近更新时间。", + "description": "发生时间窗终点(Unix 秒;null = 不限)。", "format": "int64", "nullable": true - } - }, - "additionalProperties": false, - "description": "平台限流配置输出。" - }, - "PlatformRateLimitConfigUpdateRequest": { - "type": "object", - "properties": { - "IsEnabled": { - "type": "boolean", - "description": "是否启用全局 IP 固定窗口限流。" }, - "PermitLimit": { - "maximum": 100000, - "minimum": 1, - "type": "integer", - "description": "单个固定窗口允许的请求数。", - "format": "int32" + "Cursor": { + "type": "string", + "description": "游标(上一页返回的 NextCursor;首页不传)。", + "nullable": true }, - "WindowSeconds": { - "maximum": 3600, + "PageSize": { + "maximum": 100, "minimum": 1, "type": "integer", - "description": "固定窗口秒数。", - "format": "int32" - }, - "QueueLimit": { - "maximum": 100000, - "minimum": 0, - "type": "integer", - "description": "排队请求数量。", + "description": "页大小(1~100,默认 20)。", "format": "int32" } }, "additionalProperties": false, - "description": "平台限流配置更新输入。" + "description": "匹配失败原因分页查询输入参数(change C341 §3;Cursor 翻页透传 Online)。" }, - "PreviewMailCampaignEntityRequest": { + "PageOnlineMessageAuditRequest": { "required": [ - "Id" + "ServerId" ], "type": "object", "properties": { - "Id": { + "ServerId": { "maximum": 9.223372036854776E+18, "minimum": 1, - "type": "string" - } - }, - "additionalProperties": false, - "description": "预览输入(Campaign Id)。" - }, - "PreviewMailCampaignEntityResponse": { - "type": "object", - "properties": { - "Code": { - "$ref": "#/components/schemas/MailCampaignServerCode" + "type": "string", + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, - "EstimatedHitCount": { + "ChannelKind": { + "$ref": "#/components/schemas/OnlineChatChannelKind" + }, + "ParticipantPlayerId": { + "type": "string", + "description": "参与者玩家 Id 过滤(null = 不过滤)。", + "nullable": true + }, + "Keyword": { + "type": "string", + "description": "内容关键词过滤(null = 不过滤)。", + "nullable": true + }, + "StartTime": { "type": "integer", - "description": "预估命中玩家数(一期 -1 = 未知)。", - "format": "int64" + "description": "发生时间窗起点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true }, - "Message": { + "EndTime": { + "type": "integer", + "description": "发生时间窗终点(Unix 秒;null = 不限)。", + "format": "int64", + "nullable": true + }, + "Cursor": { "type": "string", - "description": "提示信息。", + "description": "游标(上一页返回的 NextCursor;首页不传)。", "nullable": true + }, + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "页大小(1~100,默认 20)。", + "format": "int32" } }, "additionalProperties": false, - "description": "预览输出。" + "description": "消息审计分页查询输入参数(vault:C7 四类频道;Cursor 翻页,vault:C2 S1.2 定稿)。\n\n查询实时透传 Online,Admin 不落消息镜像。" }, - "PublishConfigRolloutRequest": { + "PageOnlineReportCaseRequest": { "required": [ - "ConfigKey", - "ConfigKind", - "Percent", - "Reason", - "SegmentId", "ServerId" ], "type": "object", @@ -92982,399 +91934,371 @@ "maximum": 9.223372036854776E+18, "minimum": 1, "type": "string", - "description": "目标区服Id(Online 作用域 ServerId)。" + "description": "区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。" }, - "ConfigKind": { - "$ref": "#/components/schemas/OnlineConfigRolloutKind" + "Status": { + "$ref": "#/components/schemas/OnlineReportCaseStatusKind" }, - "ConfigKey": { - "minLength": 1, + "ReporterPlayerId": { "type": "string", - "description": "配置业务键(所辖配置域实体 Id 的字符串形式)。" + "description": "举报人玩家 Id 过滤(null = 不过滤)。", + "nullable": true }, - "SegmentId": { - "maximum": 9.223372036854776E+18, - "minimum": 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": "灰度分群Id(必须为已同步 Online 的分群)。" + "description": "游标(上一页返回的 NextCursor;首页不传)。", + "nullable": true }, - "Percent": { + "PageSize": { "maximum": 100, "minimum": 1, "type": "integer", - "description": "灰度百分比(1-100:0 无意义即拒绝,100 = 分群内全量;语义边界见 OnlineRolloutSemanticMap)。", + "description": "页大小(1~100,默认 20)。", "format": "int32" - }, - "Reason": { - "minLength": 1, - "type": "string", - "description": "下发理由(必填,进审计)。" } }, "additionalProperties": false, - "description": "灰度发布输入(来源 change C343 / vault:C8 S7.7)。Percent 边界常量直接引用 `OnlineRolloutSemanticMap`(禁内联第二套数值)。" + "description": "举报案件分页查询输入参数(案件数据实时透传 Online,Admin 不落镜像;作用域必填,与消息审计页一致)。" }, - "PublishConfigRolloutResponse": { + "PageOpenAccessRequest": { "type": "object", "properties": { - "Id": { + "SearchKey": { "type": "string", - "description": "版本行Id。" + "nullable": true }, - "ServerId": { - "type": "string", - "description": "目标区服Id。" + "Page": { + "maximum": 2147483647, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "ConfigKind": { - "$ref": "#/components/schemas/OnlineConfigRolloutKind" + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" }, - "ConfigKey": { + "OrderBy": { "type": "string", - "description": "配置业务键(所辖配置域实体 Id 字符串)。", "nullable": true }, - "ConfigVersion": { - "type": "integer", - "description": "Admin 侧分配的下发版本号(同配置维度递增;发布与回滚共用序列)。", - "format": "int32" + "IsDescending": { + "type": "boolean" }, - "SegmentId": { + "AccessKey": { "type": "string", - "description": "灰度分群Id。" + "description": "身份标识", + "nullable": true + } + }, + "additionalProperties": false, + "description": "开放接口身份输入参数" + }, + "PageRoleRequest": { + "type": "object", + "properties": { + "SearchKey": { + "type": "string", + "nullable": true }, - "Percent": { + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "灰度百分比(1-100,语义见 OnlineRolloutSemanticMap)。", "format": "int32" }, - "Status": { - "$ref": "#/components/schemas/OnlineConfigRolloutStatus" - }, - "TargetVersion": { + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", - "description": "回滚目标版本(仅回滚行有值,指向要恢复到的历史 ConfigVersion)。", "format": "int32" }, - "Reason": { + "OrderBy": { "type": "string", - "description": "本次下发理由。", "nullable": true }, - "OnlineConfirmVersion": { + "IsDescending": { + "type": "boolean" + }, + "Name": { "type": "string", - "description": "Online 确认版本回执(空 = 未取得回执)。", + "description": "名称", "nullable": true }, - "DispatchOperator": { + "Code": { "type": "string", - "description": "下发操作人。", + "description": "编码", "nullable": true - }, - "PublishedTime": { - "type": "integer", - "description": "下发时间(Unix 秒)。", - "format": "int64" - }, - "CreatedTime": { - "type": "integer", - "description": "创建时间(Unix 秒)。", - "format": "int64" } }, - "additionalProperties": false, - "description": "灰度发布输出(发布成功的版本行回显)。" + "additionalProperties": false }, - "PublishMailCampaignEntityRequest": { - "required": [ - "Id" - ], + "PageSessionKeyRequest": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, + "SearchKey": { + "type": "string", + "nullable": true + }, + "Page": { + "maximum": 2147483647, "minimum": 1, - "type": "string" + "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": "发布输入(Campaign Id)。" + "description": "App 会话密钥分页查询输入参数。" }, - "PublishMailCampaignEntityResponse": { + "PageSystemEmailProviderRequest": { "type": "object", "properties": { - "Code": { - "$ref": "#/components/schemas/MailCampaignServerCode" - }, - "CampaignId": { + "SearchKey": { "type": "string", - "description": "Server 分配的 CampaignId。" + "nullable": true }, - "Version": { + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", - "description": "版本号。", "format": "int32" }, - "PublishedTime": { + "PageSize": { + "maximum": 100, + "minimum": 1, "type": "integer", - "description": "发布时间(Unix 秒)。", - "format": "int64" + "format": "int32" }, - "Message": { + "OrderBy": { "type": "string", - "description": "提示信息。", + "nullable": true + }, + "IsDescending": { + "type": "boolean" + }, + "Purpose": { + "type": "integer", + "description": "平台系统邮件用途(精确过滤)。空表示不限。", + "format": "int32", + "nullable": true + }, + "Provider": { + "type": "string", + "description": "Provider 类型(精确过滤)。空表示不限。", + "nullable": true + }, + "IsActive": { + "type": "boolean", + "description": "是否启用。", "nullable": true } }, "additionalProperties": false, - "description": "发布输出。" + "description": "平台系统邮件 Provider 配置分页查询输入参数。" }, - "RefreshTokenResponse": { + "PageUserRequest": { "type": "object", "properties": { - "RefreshToken": { + "SearchKey": { "type": "string", - "description": "刷新Token(一次性明文返回,仅本次响应可见,禁止落日志/缓存)", "nullable": true - } - }, - "additionalProperties": false, - "description": "获取刷新Token结果" - }, - "RefreshTokenResponseHttpJsonResultData": { - "type": "object", - "properties": { - "code": { + }, + "Page": { + "maximum": 2147483647, + "minimum": 1, "type": "integer", "format": "int32" }, - "message": { + "PageSize": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "format": "int32" + }, + "OrderBy": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/RefreshTokenResponse" + "IsDescending": { + "type": "boolean" }, - "trackId": { + "Account": { "type": "string", + "description": "账号", "nullable": true }, - "errorCode": { + "RealName": { "type": "string", + "description": "姓名", "nullable": true }, - "type": { + "Phone": { "type": "string", - "nullable": true - }, - "time": { - "type": "integer", - "format": "int64" - }, - "extras": { + "description": "手机号", "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": { + "PaymentConfigChannel": { "type": "object", "properties": { - "NewPassword": { + "Value": { + "type": "string", + "nullable": true + }, + "Label": { "type": "string", - "description": "重置后的初始密码(取自系统密码配置;一次性明文返回,仅本次响应可见,禁止落日志/缓存)", "nullable": true } }, - "additionalProperties": false, - "description": "重置密码结果(平台用户与租户管理员重置共用)" + "additionalProperties": false }, - "ResetPwdResponseHttpJsonResultData": { + "PaymentConfigField": { "type": "object", "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { + "Key": { "type": "string", "nullable": true }, - "data": { - "$ref": "#/components/schemas/ResetPwdResponse" - }, - "trackId": { + "Label": { "type": "string", "nullable": true }, - "errorCode": { + "Type": { "type": "string", "nullable": true }, - "type": { + "Required": { + "type": "boolean" + }, + "Help": { "type": "string", "nullable": true }, - "time": { - "type": "integer", - "format": "int64" + "Default": { + "nullable": true }, - "extras": { + "Options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentConfigOption" + }, "nullable": true } }, "additionalProperties": false }, - "ResetPwdUserRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "ReviewTenantGamePenaltyAppealEntityRequest": { - "required": [ - "Approve", - "Id" - ], + "PaymentConfigOption": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, + "Value": { "type": "string", - "description": "申诉 Id。" - }, - "Approve": { - "type": "boolean", - "description": "是否通过。true=审核通过(撤销关联处罚);false=审核驳回。" + "nullable": true }, - "Remark": { - "maxLength": 2048, + "Label": { "type": "string", - "description": "审核备注。", "nullable": true } }, - "additionalProperties": false, - "description": "申诉审核输入参数。Approve=true 通过(同步撤销关联处罚);Approve=false 驳回。" - }, - "RevokeMailCampaignEntityRequest": { - "required": [ - "Id" - ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - } - }, - "additionalProperties": false, - "description": "撤回输入(Campaign Id)。" + "additionalProperties": false }, - "RevokeMailCampaignEntityResponse": { + "PaymentConfigSchema": { "type": "object", "properties": { - "Code": { - "$ref": "#/components/schemas/MailCampaignServerCode" - }, - "CampaignId": { + "Channel": { "type": "string", - "description": "CampaignId。" - }, - "RevokedTime": { - "type": "integer", - "description": "撤回时间(Unix 秒)。", - "format": "int64" + "nullable": true }, - "Message": { + "Label": { "type": "string", - "description": "提示信息。", + "nullable": true + }, + "Fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentConfigField" + }, "nullable": true } }, - "additionalProperties": false, - "description": "撤回输出。" + "additionalProperties": false }, - "RevokeTenantGamePenaltyEntityRequest": { - "required": [ - "Id", - "Reason" + "PenaltyActionTypeEnum": { + "enum": [ + 1, + 2, + 3, + 4, + 5 ], - "type": "object", - "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "处罚 Id。" - }, - "Reason": { - "maxLength": 2048, - "minLength": 1, - "type": "string", - "description": "撤销原因。" - } - }, - "additionalProperties": false, - "description": "撤销处罚输入参数。" + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Ban", + "RestrictLogin", + "Mute", + "RestrictTrade", + "RestrictMatch" + ], + "x-enum-descriptions": [ + "封禁", + "限制登录", + "禁言", + "限制交易", + "限制匹配" + ] }, - "RiskLevelEnum": { + "PenaltyStatusEnum": { + "enum": [ + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32", + "x-enum-varnames": [ + "Active", + "Revoked", + "Expired" + ], + "x-enum-descriptions": [ + "生效中", + "已撤销", + "已过期" + ] + }, + "PenaltyTargetTypeEnum": { "enum": [ 1, 2, @@ -93384,466 +92308,652 @@ "type": "integer", "format": "int32", "x-enum-varnames": [ - "Low", - "Medium", - "High", - "Critical" + "Account", + "Role", + "Device", + "Ip" ], "x-enum-descriptions": [ - "低风险", - "中风险", - "高风险", - "严重风险" + "账号", + "角色", + "设备", + "IP" ] }, - "RoleMenuRequest": { - "required": [ - "Id" - ], + "PlatformCaptchaConfigResponse": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" + "IsEnabled": { + "type": "boolean", + "description": "是否启用登录图形验证码。" }, - "MenuIdList": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - }, - "description": "菜单Id集合", + "Version": { + "type": "integer", + "description": "配置版本。", + "format": "int64" + }, + "CaptchaType": { + "type": "integer", + "description": "验证码类型。", + "format": "int32" + }, + "CodeLength": { + "type": "integer", + "description": "验证码长度。", + "format": "int32" + }, + "ExpirySeconds": { + "type": "integer", + "description": "过期秒数。", + "format": "int32" + }, + "IgnoreCase": { + "type": "boolean", + "description": "是否忽略大小写。" + }, + "ImageOption": { + "$ref": "#/components/schemas/PlatformCaptchaImageRequest" + }, + "UpdateTime": { + "type": "integer", + "description": "最近更新时间。", + "format": "int64", "nullable": true } }, "additionalProperties": false, - "description": "授权角色菜单" + "description": "平台图形验证码配置输出。" }, - "RoleRequest": { + "PlatformCaptchaConfigUpdateRequest": { "required": [ - "Id" + "ImageOption" ], "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, + "IsEnabled": { + "type": "boolean", + "description": "是否启用登录图形验证码。" + }, + "CaptchaType": { + "maximum": 11, + "minimum": 0, + "type": "integer", + "description": "验证码类型。", + "format": "int32" + }, + "CodeLength": { + "maximum": 8, "minimum": 1, - "type": "string" + "type": "integer", + "description": "验证码长度。", + "format": "int32" }, - "IsEnabled": { + "ExpirySeconds": { + "maximum": 600, + "minimum": 10, + "type": "integer", + "description": "过期秒数。", + "format": "int32" + }, + "IgnoreCase": { "type": "boolean", - "description": "是否启用" + "description": "是否忽略大小写。" + }, + "ImageOption": { + "$ref": "#/components/schemas/PlatformCaptchaImageRequest" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "平台图形验证码配置更新输入。" }, - "RoleResponse": { + "PlatformCaptchaImageRequest": { "type": "object", "properties": { - "Id": { - "type": "string", - "description": "Id" + "Animation": { + "type": "boolean", + "description": "是否启用 GIF 动画。" }, - "Name": { + "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" + }, + "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 }, - "Code": { + "FrameDelay": { + "maximum": 2000, + "minimum": 50, + "type": "integer", + "description": "动画帧延迟。", + "format": "int32" + }, + "BackgroundColor": { + "maxLength": 256, "type": "string", - "description": "编码", + "description": "背景颜色。", "nullable": true - } - }, - "additionalProperties": false, - "description": "角色列表输出参数" - }, - "RollbackConfigRolloutRequest": { - "required": [ - "ConfigKey", - "ConfigKind", - "Reason", - "ServerId", - "TargetVersion" - ], - "type": "object", - "properties": { - "ServerId": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string", - "description": "目标区服Id(Online 作用域 ServerId)。" - }, - "ConfigKind": { - "$ref": "#/components/schemas/OnlineConfigRolloutKind" }, - "ConfigKey": { - "minLength": 1, + "ForegroundColors": { + "maxLength": 256, "type": "string", - "description": "配置业务键(所辖配置域实体 Id 的字符串形式)。" + "description": "前景颜色,多个颜色用逗号分隔。", + "nullable": true }, - "TargetVersion": { - "maximum": 2147483647, + "Quality": { + "maximum": 100, "minimum": 1, "type": "integer", - "description": "回滚目标版本(要恢复到的历史 ConfigVersion,必须已存在于该配置的版本序列)。", + "description": "图片质量。", "format": "int32" }, - "Reason": { - "minLength": 1, - "type": "string", - "description": "回滚理由(必填,进审计)。" + "TextBold": { + "type": "boolean", + "description": "是否粗体。" } }, "additionalProperties": false, - "description": "灰度回滚输入(来源 change C343 / vault:C8 S7.8 / VC-7.12)。回滚 = 版本化新下发:恢复目标版本的 SegmentId/Percent 语义,生成新 ConfigVersion 行。" + "description": "平台图形验证码图像配置输入。" }, - "RollbackConfigRolloutResponse": { + "PlatformJwtConfigResponse": { "type": "object", "properties": { - "Id": { + "IssuerSigningKey": { "type": "string", - "description": "版本行Id。" + "description": "签名密钥掩码。", + "nullable": true }, - "ServerId": { - "type": "string", - "description": "目标区服Id。" + "HasSigningKey": { + "type": "boolean", + "description": "是否已配置签名密钥。" }, - "ConfigKind": { - "$ref": "#/components/schemas/OnlineConfigRolloutKind" + "ValidIssuer": { + "type": "string", + "description": "签发方。", + "nullable": true }, - "ConfigKey": { + "ValidAudience": { "type": "string", - "description": "配置业务键(所辖配置域实体 Id 字符串)。", + "description": "签收方。", "nullable": true }, - "ConfigVersion": { + "ClockSkew": { "type": "integer", - "description": "Admin 侧分配的下发版本号(同配置维度递增;发布与回滚共用序列)。", - "format": "int32" + "description": "过期时间容错秒数。", + "format": "int64" }, - "SegmentId": { + "Algorithm": { "type": "string", - "description": "灰度分群Id。" + "description": "签名算法。", + "nullable": true }, - "Percent": { - "type": "integer", - "description": "灰度百分比(1-100,语义见 OnlineRolloutSemanticMap)。", - "format": "int32" + "ValidateIssuerSigningKey": { + "type": "boolean", + "description": "验证签名密钥。" }, - "Status": { - "$ref": "#/components/schemas/OnlineConfigRolloutStatus" + "ValidateIssuer": { + "type": "boolean", + "description": "验证签发方。" }, - "TargetVersion": { + "ValidateAudience": { + "type": "boolean", + "description": "验证签收方。" + }, + "ValidateLifetime": { + "type": "boolean", + "description": "验证生命周期。" + }, + "TokenVersion": { "type": "integer", - "description": "回滚目标版本(仅回滚行有值,指向要恢复到的历史 ConfigVersion)。", - "format": "int32" + "description": "当前全局令牌版本。", + "format": "int64" }, - "Reason": { - "type": "string", - "description": "本次下发理由。", + "UpdateTime": { + "type": "integer", + "description": "最近更新时间。", + "format": "int64", "nullable": true - }, - "OnlineConfirmVersion": { + } + }, + "additionalProperties": false, + "description": "平台 JWT 配置输出。" + }, + "PlatformJwtConfigUpdateRequest": { + "required": [ + "ValidAudience", + "ValidIssuer" + ], + "type": "object", + "properties": { + "IssuerSigningKey": { "type": "string", - "description": "Online 确认版本回执(空 = 未取得回执)。", + "description": "签名密钥。传入 ****** 表示保留当前密钥。", "nullable": true }, - "DispatchOperator": { + "ValidIssuer": { + "minLength": 1, "type": "string", - "description": "下发操作人。", - "nullable": true + "description": "签发方。" }, - "PublishedTime": { - "type": "integer", - "description": "下发时间(Unix 秒)。", - "format": "int64" + "ValidAudience": { + "minLength": 1, + "type": "string", + "description": "签收方。" }, - "CreatedTime": { + "ClockSkew": { + "maximum": 300, + "minimum": 0, "type": "integer", - "description": "创建时间(Unix 秒)。", + "description": "过期时间容错秒数。", "format": "int64" } }, "additionalProperties": false, - "description": "灰度回滚输出(回滚生成的版本化新行回显,TargetVersion 指向恢复目标)。" + "description": "平台 JWT 配置更新输入。" }, - "SecretCreateResponse": { + "PlatformLoggingConfigResponse": { "type": "object", "properties": { - "Secret": { - "type": "string", - "description": "新生成的开放接口密钥明文(Base64 编码的随机串)。\n\n安全语义:该明文仅在本次响应中一次性下发,用于拷贝到开放接口身份的 AccessSecret 字段;获取后请立即妥善保存,后续无法再次查询。", + "File": { + "$ref": "#/components/schemas/PlatformLoggingFileResponse" + }, + "Database": { + "$ref": "#/components/schemas/PlatformLoggingDatabaseResponse" + }, + "ElasticSearch": { + "$ref": "#/components/schemas/PlatformLoggingElasticSearchResponse" + }, + "Monitor": { + "$ref": "#/components/schemas/PlatformLoggingMonitorResponse" + }, + "UpdateTime": { + "type": "integer", + "description": "最近更新时间(Unix 秒)。", + "format": "int64", "nullable": true } }, "additionalProperties": false, - "description": "开放接口密钥创建结果" + "description": "平台日志配置输出。ES !:ElasticSearchServerUris 经掩码处理,不回显明文 URI/凭据。" }, - "SecretCreateResponseHttpJsonResultData": { + "PlatformLoggingConfigUpdateRequest": { "type": "object", "properties": { - "code": { - "type": "integer", - "format": "int32" + "File": { + "$ref": "#/components/schemas/PlatformLoggingFileUpdateRequest" }, - "message": { - "type": "string", - "nullable": true + "Database": { + "$ref": "#/components/schemas/PlatformLoggingDatabaseUpdateRequest" }, - "data": { - "$ref": "#/components/schemas/SecretCreateResponse" + "ElasticSearch": { + "$ref": "#/components/schemas/PlatformLoggingElasticSearchUpdateRequest" }, - "trackId": { - "type": "string", - "nullable": true + "Monitor": { + "$ref": "#/components/schemas/PlatformLoggingMonitorUpdateRequest" + } + }, + "additionalProperties": false, + "description": "平台日志配置更新输入。\nES !:ElasticSearchServerUris:若全部为掩码占位 `\"***\"` 视为「未变更」,保留库内原值;\n含非占位项则按非占位项替换;空列表视为清空。" + }, + "PlatformLoggingDatabaseResponse": { + "type": "object", + "properties": { + "IsEnabled": { + "type": "boolean" }, - "errorCode": { + "MinimumLevel": { "type": "string", "nullable": true + } + }, + "additionalProperties": false + }, + "PlatformLoggingDatabaseUpdateRequest": { + "type": "object", + "properties": { + "IsEnabled": { + "type": "boolean" }, - "type": { + "MinimumLevel": { "type": "string", "nullable": true - }, - "time": { - "type": "integer", - "format": "int64" - }, - "extras": { - "nullable": true } }, "additionalProperties": false }, - "SessionKeyAddRequest": { + "PlatformLoggingElasticSearchResponse": { "type": "object", "properties": { - "NotBeforeTime": { - "type": "integer", - "description": "生效时间(Unix 秒);null 表示立即生效。", - "format": "int64", - "nullable": true + "IsEnabled": { + "type": "boolean" }, - "ExpireTime": { - "type": "integer", - "description": "过期时间(Unix 秒);null 表示永不过期。", - "format": "int64", + "ServerUris": { + "type": "array", + "items": { + "type": "string" + }, "nullable": true }, - "Remark": { + "DefaultIndex": { "type": "string", - "description": "备注。", "nullable": true } }, "additionalProperties": false, - "description": "新增 App 会话密钥输入参数。\n\n密钥明文由服务端随机生成(不允许外部提交,避免弱密钥入环),响应中一次性回显。" + "description": "ES 日志输出。ServerUris 元素统一掩码为 `\"***\"`,仅保留数量,不回显明文。" }, - "SessionKeyRenewRequest": { - "required": [ - "Id" - ], + "PlatformLoggingElasticSearchUpdateRequest": { "type": "object", "properties": { - "Id": { - "type": "string", - "description": "密钥主键 ID。" + "IsEnabled": { + "type": "boolean" }, - "ExpireTime": { - "type": "integer", - "description": "新的到期时间(Unix 秒);null 表示改为永不过期。必须晚于当前时间。", - "format": "int64", + "ServerUris": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "DefaultIndex": { + "type": "string", "nullable": true } }, - "additionalProperties": false, - "description": "续租 App 会话密钥输入参数:仅更新到期时间,不产生新密钥。" + "additionalProperties": false }, - "SessionKeyResponse": { + "PlatformLoggingFileResponse": { "type": "object", "properties": { - "Id": { - "type": "string", - "description": "主键 ID。" - }, - "Kid": { - "type": "string", - "description": "Key ID,信封 JSON kid 字段。", - "nullable": true + "IsEnabled": { + "type": "boolean" }, - "Secret": { + "FileName": { "type": "string", - "description": "密钥脱敏占位(固定 ******),真实明文仅 AddAsync/RotateAsync 一次性回显。", "nullable": true }, - "NotBeforeTime": { - "type": "integer", - "description": "生效时间;null 表示无生效下限。", - "format": "int64", - "nullable": true + "Append": { + "type": "boolean" }, - "ExpireTime": { + "FileSizeLimitBytes": { "type": "integer", - "description": "过期时间;null 表示永不过期。", - "format": "int64", - "nullable": true + "format": "int64" }, - "RotatedTime": { + "MaxRollingFiles": { "type": "integer", - "description": "被轮换时间;null 表示从未被轮换。", - "format": "int64", - "nullable": true - }, + "format": "int32" + } + }, + "additionalProperties": false + }, + "PlatformLoggingFileUpdateRequest": { + "type": "object", + "properties": { "IsEnabled": { - "type": "boolean", - "description": "是否启用。", - "nullable": true + "type": "boolean" }, - "Remark": { + "FileName": { + "maximum": 4096, + "minimum": 1, "type": "string", - "description": "备注。", "nullable": true }, - "CreatedTime": { + "Append": { + "type": "boolean" + }, + "FileSizeLimitBytes": { + "maximum": 1073741824, + "minimum": 1024, "type": "integer", - "description": "创建时间。", "format": "int64" + }, + "MaxRollingFiles": { + "maximum": 365, + "minimum": 1, + "type": "integer", + "format": "int32" } }, - "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)一次性回显。" + "additionalProperties": false }, - "SessionKeyResponseSqlSugarPagedList": { + "PlatformLoggingMonitorResponse": { "type": "object", "properties": { - "Page": { - "type": "integer", - "format": "int32" + "GlobalEnabled": { + "type": "boolean" }, - "PageSize": { - "type": "integer", - "format": "int32" + "BahLogLevel": { + "type": "string", + "nullable": true }, - "Total": { - "type": "integer", - "format": "int32" + "WithReturnValue": { + "type": "boolean" }, - "TotalPages": { + "ReturnValueThreshold": { "type": "integer", "format": "int32" }, - "Items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionKeyResponse" - }, + "JsonBehavior": { + "type": "string", "nullable": true }, - "HasPrevPage": { + "JsonIndented": { "type": "boolean" }, - "HasNextPage": { + "UseUtcTimestamp": { "type": "boolean" } }, "additionalProperties": false }, - "SessionKeyRevealResponse": { + "PlatformLoggingMonitorUpdateRequest": { "type": "object", "properties": { - "Id": { + "GlobalEnabled": { + "type": "boolean" + }, + "BahLogLevel": { "type": "string", - "description": "主键 ID。" + "nullable": true }, - "Kid": { + "WithReturnValue": { + "type": "boolean" + }, + "ReturnValueThreshold": { + "maximum": 100000, + "minimum": 0, + "type": "integer", + "format": "int32" + }, + "JsonBehavior": { "type": "string", - "description": "Key ID,信封 JSON kid 字段。", "nullable": true }, - "Secret": { + "JsonIndented": { + "type": "boolean" + }, + "UseUtcTimestamp": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "PlatformPasswordPolicyConfigResponse": { + "type": "object", + "properties": { + "StrongPassword": { + "type": "boolean", + "description": "是否开启密码强度验证。" + }, + "PasswordStrengthValidation": { "type": "string", - "description": "会话密钥明文(64 位 hex,仅本次响应回显,请立即复制到客户端注入通道 / SessionKeyRing.SetSessionKey;不再二次提供)。", + "description": "密码强度验证正则表达式。", "nullable": true }, - "NotBeforeTime": { - "type": "integer", - "description": "生效时间;null 表示无生效下限。", - "format": "int64", + "PasswordStrengthValidationMsg": { + "type": "string", + "description": "密码强度验证失败提示。", "nullable": true }, - "ExpireTime": { + "UpdateTime": { "type": "integer", - "description": "过期时间;null 表示永不过期。", + "description": "最近更新时间(Unix 秒)。", "format": "int64", "nullable": true } }, "additionalProperties": false, - "description": "App 会话密钥一次性明文回显输出(仅 AddAsync / RotateAsync 响应使用)。\n\n明文只在密钥生成的那一次响应中出现,前端展示后即失;此后任何接口不再提供明文\n(列表/详情均为 ****** 脱敏,实体禁删)。丢失明文只能通过 RotateAsync 再生成新 key。" + "description": "平台密码策略配置输出(C173)。仅暴露密码强度策略字段,绝不回显 Cryptogram 密钥(CryptoType/PublicKey/PrivateKey)。" }, - "SessionKeyRotateRequest": { + "PlatformPasswordPolicyConfigUpdateRequest": { "type": "object", "properties": { - "OldKeyExpireTime": { - "type": "integer", - "description": "旧密钥的新到期时间(Unix 秒):建议设为「双活窗口」结束时刻(客户端全量切换完成后);\nnull 表示不改动旧密钥租约(旧密钥按原到期时间或永久继续双活)。", - "format": "int64", + "StrongPassword": { + "type": "boolean", + "description": "是否开启密码强度验证。" + }, + "PasswordStrengthValidation": { + "maximum": 1024, + "minimum": 1, + "type": "string", + "description": "密码强度验证正则表达式(必须可编译)。", "nullable": true }, - "Remark": { + "PasswordStrengthValidationMsg": { + "maximum": 1024, + "minimum": 1, "type": "string", - "description": "备注。", + "description": "密码强度验证失败提示。", "nullable": true } }, "additionalProperties": false, - "description": "轮换 App 会话密钥输入参数:新插一把立即生效的 key(双活),旧 key 不动、按其租约自然退场。" + "description": "平台密码策略配置更新输入(SuperAdmin-only)。" }, - "SetGameAppPackageStatusRequest": { - "required": [ - "Id" - ], + "PlatformRateLimitConfigResponse": { "type": "object", "properties": { - "Id": { - "maximum": 9.223372036854776E+18, - "minimum": 1, - "type": "string" - }, "IsEnabled": { "type": "boolean", - "description": "是否启用" + "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": "游戏应用分包启停输入参数" + "description": "平台限流配置输出。" }, - "SetupSuperAdminPasswordRequest": { - "required": [ - "ConfirmPassword", - "Password" - ], + "PlatformRateLimitConfigUpdateRequest": { "type": "object", "properties": { - "Password": { - "minLength": 6, - "type": "string", - "description": "登录密码", - "example": "Abc12345" + "IsEnabled": { + "type": "boolean", + "description": "是否启用全局 IP 固定窗口限流。" }, - "ConfirmPassword": { - "minLength": 6, - "type": "string", - "description": "确认密码", - "example": "Abc12345" + "PermitLimit": { + "maximum": 100000, + "minimum": 1, + "type": "integer", + "description": "单个固定窗口允许的请求数。", + "format": "int32" + }, + "WindowSeconds": { + "maximum": 3600, + "minimum": 1, + "type": "integer", + "description": "固定窗口秒数。", + "format": "int32" + }, + "QueueLimit": { + "maximum": 100000, + "minimum": 0, + "type": "integer", + "description": "排队请求数量。", + "format": "int32" } }, "additionalProperties": false, - "description": "平台超管首装密码初始化参数" + "description": "平台限流配置更新输入。" }, - "SyncOnlineRuntimeTenantGamePenaltyRequest": { + "PreviewMailCampaignEntityRequest": { "required": [ "Id" ], @@ -93852,318 +92962,525 @@ "Id": { "maximum": 9.223372036854776E+18, "minimum": 1, + "type": "string" + } + }, + "additionalProperties": false, + "description": "预览输入(Campaign Id)。" + }, + "PreviewMailCampaignEntityResponse": { + "type": "object", + "properties": { + "Code": { + "$ref": "#/components/schemas/MailCampaignServerCode" + }, + "EstimatedHitCount": { + "type": "integer", + "description": "预估命中玩家数(一期 -1 = 未知)。", + "format": "int64" + }, + "Message": { "type": "string", - "description": "处罚事实源行 Id(必须处于生效中)。" + "description": "提示信息。", + "nullable": true } }, "additionalProperties": false, - "description": "处罚同步 Online 运行时输入参数(联动命令按 ActionType 服务端推导,不暴露给请求体)。" + "description": "预览输出。" }, - "SyncPlayerSegmentOnlineRequest": { + "PublishConfigRolloutRequest": { "required": [ - "Id", + "ConfigKey", + "ConfigKind", + "Percent", "Reason", + "SegmentId", "ServerId" ], "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(Online 作用域 ServerId)。" }, - "Reason": { + "ConfigKind": { + "$ref": "#/components/schemas/OnlineConfigRolloutKind" + }, + "ConfigKey": { "minLength": 1, "type": "string", - "description": "同步理由(必填,审计)。" - } - }, - "additionalProperties": false, - "description": "分群同步 Online 输入(来源 change C343 / vault:C8 S7.6)。" - }, - "SyncPlayerSegmentOnlineResponse": { - "type": "object", - "properties": { - "Id": { - "type": "string", - "description": "分群Id。" - }, - "SyncStatus": { - "$ref": "#/components/schemas/OnlinePlayerSegmentSyncStatus" + "description": "配置业务键(所辖配置域实体 Id 的字符串形式)。" }, - "OnlineSegmentId": { + "SegmentId": { + "maximum": 9.223372036854776E+18, + "minimum": 1, "type": "string", - "description": "Online 侧分群标识。" + "description": "灰度分群Id(必须为已同步 Online 的分群)。" }, - "ConfirmVersion": { - "type": "string", - "description": "Online 确认版本回执。", - "nullable": true + "Percent": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "灰度百分比(1-100:0 无意义即拒绝,100 = 分群内全量;语义边界见 OnlineRolloutSemanticMap)。", + "format": "int32" }, - "Message": { + "Reason": { + "minLength": 1, "type": "string", - "description": "提示消息(Online 侧原文)。", - "nullable": true - }, - "SyncedTime": { - "type": "integer", - "description": "同步时间(Unix 秒,UTC)。", - "format": "int64" + "description": "下发理由(必填,进审计)。" } }, "additionalProperties": false, - "description": "分群同步 Online 输出。" + "description": "灰度发布输入(来源 change C343 / vault:C8 S7.7)。Percent 边界常量直接引用 `OnlineRolloutSemanticMap`(禁内联第二套数值)。" }, - "SystemConfigResponse": { + "PublishConfigRolloutResponse": { "type": "object", "properties": { "Id": { "type": "string", - "description": "Id" + "description": "版本行Id。" }, - "Name": { + "ServerId": { "type": "string", - "description": "名称", - "nullable": true + "description": "目标区服Id。" }, - "Code": { - "type": "string", - "description": "编码", - "nullable": true + "ConfigKind": { + "$ref": "#/components/schemas/OnlineConfigRolloutKind" }, - "Value": { + "ConfigKey": { "type": "string", - "description": "属性值", + "description": "配置业务键(所辖配置域实体 Id 字符串)。", "nullable": true }, - "SysFlag": { - "$ref": "#/components/schemas/YesNoEnum" + "ConfigVersion": { + "type": "integer", + "description": "Admin 侧分配的下发版本号(同配置维度递增;发布与回滚共用序列)。", + "format": "int32" }, - "GroupCode": { + "SegmentId": { "type": "string", - "description": "分组编码", - "nullable": true + "description": "灰度分群Id。" }, - "OrderNo": { + "Percent": { "type": "integer", - "description": "排序", + "description": "灰度百分比(1-100,语义见 OnlineRolloutSemanticMap)。", "format": "int32" }, - "Remark": { - "type": "string", - "description": "备注", - "nullable": true - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "Status": { + "$ref": "#/components/schemas/OnlineConfigRolloutStatus" }, - "CreatedTime": { + "TargetVersion": { "type": "integer", - "description": "创建时间", - "format": "int64" + "description": "回滚目标版本(仅回滚行有值,指向要恢复到的历史 ConfigVersion)。", + "format": "int32" }, - "CreatedName": { + "Reason": { "type": "string", - "description": "创建人", - "nullable": true - }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", + "description": "本次下发理由。", "nullable": true }, - "UpdatedName": { + "OnlineConfirmVersion": { "type": "string", - "description": "更新人", + "description": "Online 确认版本回执(空 = 未取得回执)。", "nullable": true }, - "RowVersion": { + "DispatchOperator": { "type": "string", - "description": "行版本号(乐观锁)", + "description": "下发操作人。", "nullable": true + }, + "PublishedTime": { + "type": "integer", + "description": "下发时间(Unix 秒)。", + "format": "int64" + }, + "CreatedTime": { + "type": "integer", + "description": "创建时间(Unix 秒)。", + "format": "int64" } }, "additionalProperties": false, - "description": "平台参数配置输出参数" + "description": "灰度发布输出(发布成功的版本行回显)。" }, - "SystemConfigResponseSqlSugarPagedList": { + "PublishMailCampaignEntityRequest": { + "required": [ + "Id" + ], "type": "object", "properties": { - "Page": { - "type": "integer", - "format": "int32" + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + } + }, + "additionalProperties": false, + "description": "发布输入(Campaign Id)。" + }, + "PublishMailCampaignEntityResponse": { + "type": "object", + "properties": { + "Code": { + "$ref": "#/components/schemas/MailCampaignServerCode" }, - "PageSize": { - "type": "integer", - "format": "int32" + "CampaignId": { + "type": "string", + "description": "Server 分配的 CampaignId。" }, - "Total": { + "Version": { "type": "integer", + "description": "版本号。", "format": "int32" }, - "TotalPages": { + "PublishedTime": { "type": "integer", - "format": "int32" + "description": "发布时间(Unix 秒)。", + "format": "int64" }, - "Items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SystemConfigResponse" - }, + "Message": { + "type": "string", + "description": "提示信息。", "nullable": true - }, - "HasPrevPage": { - "type": "boolean" - }, - "HasNextPage": { - "type": "boolean" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "发布输出。" }, - "SystemEmailProviderResponse": { + "RefreshTokenResponse": { "type": "object", "properties": { - "Id": { + "RefreshToken": { "type": "string", - "description": "Id" - }, - "Purpose": { + "description": "刷新Token(一次性明文返回,仅本次响应可见,禁止落日志/缓存)", + "nullable": true + } + }, + "additionalProperties": false, + "description": "获取刷新Token结果" + }, + "RefreshTokenResponseHttpJsonResultData": { + "type": "object", + "properties": { + "code": { "type": "integer", - "description": "平台系统邮件用途(SystemEmailPurpose)。0 表示默认配置。", "format": "int32" }, - "Provider": { + "message": { "type": "string", - "description": "Provider 类型。当前支持 TencentCloudSes(腾讯云 SES)和 Smtp。", "nullable": true }, - "Host": { + "data": { + "$ref": "#/components/schemas/RefreshTokenResponse" + }, + "trackId": { "type": "string", - "description": "SMTP 主机。Provider=Smtp 时必填。", "nullable": true }, - "Port": { - "type": "integer", - "description": "SMTP 端口。Provider=Smtp 时必填。", - "format": "int32", + "errorCode": { + "type": "string", "nullable": true }, - "EnableSsl": { - "type": "boolean", - "description": "SMTP 启用 SSL。Provider=Smtp 时使用。", + "type": { + "type": "string", "nullable": true }, - "UseDefaultCredentials": { - "type": "boolean", - "description": "SMTP 使用默认凭据。Provider=Smtp 时使用。", - "nullable": true + "time": { + "type": "integer", + "format": "int64" }, - "UserName": { - "type": "string", - "description": "SMTP 用户名(敏感字段,API 输出脱敏,日志禁止明文)。", + "extras": { "nullable": true - }, - "Password": { + } + }, + "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": { + "type": "object", + "properties": { + "NewPassword": { "type": "string", - "description": "SMTP 密码(敏感字段,API 输出脱敏,日志禁止明文)。", + "description": "重置后的初始密码(取自系统密码配置;一次性明文返回,仅本次响应可见,禁止落日志/缓存)", "nullable": true + } + }, + "additionalProperties": false, + "description": "重置密码结果(平台用户与管理员角色重置共用)" + }, + "ResetPwdResponseHttpJsonResultData": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" }, - "Region": { + "message": { "type": "string", - "description": "Provider 区域(如腾讯云 SES 区域 ap-hongkong)。", "nullable": true }, - "SecretId": { - "type": "string", - "description": "腾讯云 SES SecretId(敏感字段,API 输出脱敏,日志禁止明文)。", - "nullable": true + "data": { + "$ref": "#/components/schemas/ResetPwdResponse" }, - "SecretKey": { + "trackId": { "type": "string", - "description": "腾讯云 SES SecretKey(敏感字段,API 输出脱敏,日志禁止明文)。", "nullable": true }, - "DefaultFromEmail": { + "errorCode": { "type": "string", - "description": "平台默认发件人邮箱地址。", "nullable": true }, - "DefaultFromName": { + "type": { "type": "string", - "description": "平台默认发件人显示名称。", "nullable": true }, - "DefaultToEmail": { - "type": "string", - "description": "平台默认收件人邮箱;缺省时使用业务调用方传入的 receiver。", - "nullable": true + "time": { + "type": "integer", + "format": "int64" }, - "TemplateId": { - "type": "string", - "description": "腾讯云 SES 模板 ID。Provider=TencentCloudSes 时必填;SMTP 发送不使用。", + "extras": { "nullable": true + } + }, + "additionalProperties": false + }, + "ResetPwdUserRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "ReviewGamePenaltyAppealEntityRequest": { + "required": [ + "Approve", + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "申诉 Id。" }, - "TemplateDataJson": { + "Approve": { + "type": "boolean", + "description": "是否通过。true=审核通过(撤销关联处罚);false=审核驳回。" + }, + "Remark": { + "maxLength": 2048, "type": "string", - "description": "腾讯云 SES 模板变量 JSON。Provider=TencentCloudSes 时写入 TemplateData;SMTP 发送不使用。", + "description": "审核备注。", "nullable": true + } + }, + "additionalProperties": false, + "description": "申诉审核输入参数。Approve=true 通过(同步撤销关联处罚);Approve=false 驳回。" + }, + "RevokeGamePenaltyEntityRequest": { + "required": [ + "Id", + "Reason" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string", + "description": "处罚 Id。" }, - "Priority": { - "type": "integer", - "description": "配置选择优先级。同一 Purpose 匹配层中按此值降序选择;数值越大越优先。", - "format": "int32" + "Reason": { + "maxLength": 2048, + "minLength": 1, + "type": "string", + "description": "撤销原因。" + } + }, + "additionalProperties": false, + "description": "撤销处罚输入参数。" + }, + "RevokeMailCampaignEntityRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" + } + }, + "additionalProperties": false, + "description": "撤回输入(Campaign Id)。" + }, + "RevokeMailCampaignEntityResponse": { + "type": "object", + "properties": { + "Code": { + "$ref": "#/components/schemas/MailCampaignServerCode" }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用", - "nullable": true + "CampaignId": { + "type": "string", + "description": "CampaignId。" }, - "CreatedTime": { + "RevokedTime": { "type": "integer", - "description": "创建时间", + "description": "撤回时间(Unix 秒)。", "format": "int64" }, - "CreatedName": { + "Message": { "type": "string", - "description": "创建人", + "description": "提示信息。", "nullable": true + } + }, + "additionalProperties": false, + "description": "撤回输出。" + }, + "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": { + "Id": { + "maximum": 9.223372036854776E+18, + "minimum": 1, + "type": "string" }, - "UpdateTime": { - "type": "integer", - "description": "更新时间", - "format": "int64", + "MenuIdList": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "菜单Id集合", "nullable": true + } + }, + "additionalProperties": false, + "description": "授权角色菜单" + }, + "RoleRequest": { + "required": [ + "Id" + ], + "type": "object", + "properties": { + "Id": { + "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 +93502,7 @@ "Items": { "type": "array", "items": { - "$ref": "#/components/schemas/SystemEmailProviderResponse" + "$ref": "#/components/schemas/RoleResponse" }, "nullable": true }, @@ -94198,227 +93515,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 +93705,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 +94049,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 +94209,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 +94241,7 @@ "Items": { "type": "array", "items": { - "$ref": "#/components/schemas/TenantFileResponse" + "$ref": "#/components/schemas/SystemEmailProviderResponse" }, "nullable": true }, @@ -94914,34 +94254,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 +94346,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 +94408,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 +94788,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 +94860,73 @@ "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" + }, + "PackageId": { + "type": "string", + "description": "关联的游戏应用分包 Id。", + "nullable": true + }, + "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 +94987,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 +95212,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 +95487,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 +95683,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 +95819,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 +96310,11 @@ "additionalProperties": false, "description": "版本管理更新输入参数" }, - "UpdateGamePaymentConfigRequest": { + "UpdateGameAreaClassifyEntityRequest": { "required": [ - "ConfigJson", + "Description", "Id", - "PayChannel", + "Name", "RowVersion" ], "type": "object", @@ -96594,678 +96329,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" + }, + "HttpManageUrl": { + "minLength": 1, + "type": "string", + "description": "Http 管理连接地址" }, - "RowVersion": { + "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列表" + }, + "IsAllPost": { + "type": "boolean", + "description": "是否发全部用户" }, - "DataScope": { - "$ref": "#/components/schemas/DataScopeEnum" + "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 +97093,12 @@ } }, "additionalProperties": false, - "description": "平台系统邮件 Provider 配置更新输入参数。\n\n敏感字段(UserName / Password / SecretId / SecretKey)回传 `******` 时保留数据库原值,避免脱敏回写覆盖真实凭据。" + "description": "邮件模板更新输入参数" }, - "UpdateTenantAdvertisementCallbackConfigRequest": { + "UpdateGameOnlinePlayerSegmentRequest": { "required": [ - "ConfigJson", "Id", - "Provider", + "Name", "RowVersion" ], "type": "object", @@ -97303,50 +97113,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 +97174,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 +97473,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 +97543,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 +97573,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 +97654,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 +97727,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 +98116,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 +98491,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" - }, - "IsEnabled": { - "type": "boolean", - "description": "是否启用。", - "nullable": true - } - }, - "additionalProperties": false, - "description": "奖励模板分组更新输入参数。" - }, - "UpdateTenantGameRoleEntityRequest": { - "required": [ - "Id", - "RowVersion" - ], - "type": "object", - "properties": { - "UserId": { - "type": "string", - "description": "用户ID" + "description": "创建时间", + "format": "int64" }, - "AreaId": { + "CreatedName": { + "maxLength": 512, "type": "string", - "description": "区服Id" + "description": "创建人姓名", + "nullable": true }, - "Name": { + "UpdateCount": { + "type": "integer", + "description": "更新次数", + "format": "int32", + "nullable": true + }, + "UpdateTime": { + "type": "integer", + "description": "更新时间", + "format": "int64", + "nullable": true + }, + "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 +99020,11 @@ "description": "紧急联系人地址", "nullable": true }, + "Introduction": { + "type": "string", + "description": "个人简介", + "nullable": true + }, "OrderNo": { "type": "integer", "description": "排序", @@ -99279,69 +99038,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 @@ -99434,27 +99263,31 @@ "tags": [ { "name": "advertisementCallbackConfig", - "description": "租户广告回调配置管理服务。\n\n只管理各广告平台服务端回调所需的最小配置材料,不实现广告回调接收和发奖处理。\n敏感字段(SigningSecret / VerificationKeys)输出脱敏,更新回传 `******` 保留原值。" + "description": "广告回调配置管理服务。\n\n只管理各广告平台服务端回调所需的最小配置材料,不实现广告回调接收和发奖处理。\n敏感字段(SigningSecret / VerificationKeys)输出脱敏,更新回传 `******` 保留原值。" }, { "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", - "description": "租户渠道定义服务,仅管理当前租户渠道" + "description": "业务渠道定义服务,仅管理业务渠道" }, { "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", @@ -99558,7 +99391,7 @@ }, { "name": "gameLoginTicketKey", - "description": "租户 Game 登录票据签名密钥管理服务。\n\n私钥永不回显:所有输出仅含公钥与元数据。密钥由系统签发或手动轮换生成,不支持手动新增 / 删除。\n作用域:主库。" + "description": "Game 登录票据签名密钥管理服务。\n\n私钥永不回显:所有输出仅含公钥与元数据。密钥由系统签发或手动轮换生成,不支持手动新增 / 删除。\n作用域:主库。" }, { "name": "gameMail", @@ -99566,7 +99399,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 +99411,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 +99431,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 +99451,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 +99507,7 @@ }, { "name": "logDiff", - "description": "系统差异日志服务。C156 起:SuperAdmin 查询主库 system_log_diff,普通租户查询当前租户库 tenant_log_diff。" + "description": "系统差异日志服务。C156 起:SuperAdmin 查询主库 system_log_diff,管理员查询主库 log_diff。" }, { "name": "logException", @@ -99686,19 +99519,19 @@ }, { "name": "logVisit", - "description": "系统访问日志服务。C156 起:SuperAdmin 查询主库 system_log_visit,普通租户查询当前租户库 tenant_log_visit。" + "description": "系统访问日志服务。C156 起:SuperAdmin 查询主库 system_log_visit,管理员查询主库 log_visit。" }, { "name": "objectStorageConfig", - "description": "租户对象存储配置管理服务:CRUD + 提供商/Schema 查询 + 连通性测试。\n业务规则:Provider 创建后不可变更;同租户至多一条启用;ConfigJson 白名单规范化与脱敏。" + "description": "对象存储配置管理服务:CRUD + 提供商/Schema 查询 + 连通性测试。\n业务规则:Provider 创建后不可变更;至多一条启用;ConfigJson 白名单规范化与脱敏。" }, { "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 仅同步管理员角色)。\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 +99543,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 仅同步管理员角色)。\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 +99571,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 仅同步管理员角色)。\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 +99579,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 +99601,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 +99631,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,16 +99650,8 @@ "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", - "description": "租户用户服务" + "name": "user", + "description": "用户服务" } ] } \ No newline at end of file diff --git a/GameFrameX.Admin.Unified.Vue/scripts/check-frontend-standards.mjs b/GameFrameX.Admin.Unified.Vue/scripts/check-frontend-standards.mjs index b395a277..09b5cea2 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(') @@ -867,18 +867,19 @@ function selfTest() { const additionDiff = diffFrozenAgainstSnapshot(['src/a/One.vue', 'src/b/Two.vue'], ['src/a/One.vue']) assert(additionDiff.additions.length === 1 && additionDiff.additions[0] === 'src/b/Two.vue', 'unregistered frozen entry should be flagged as addition') assert(diffFrozenAgainstSnapshot(['src/a/One.vue'], ['src/a/One.vue', 'src/c/Gone.vue']).stale.length === 1, 'shrunk entry should surface as stale snapshot hint, not a failure') - // GFX-734 守卫:views 顶层白名单 + 静态路由 appScope↔文件首段(先红后绿构造样本) + // GFX-734 守卫:views 顶层白名单 + 静态路由文件首段(先红后绿构造样本) + // c406-keep: retired audience segment remains a negative whitelist assertion. assert(viewsTopLevelViolation('tenant') !== null, 'retired audience segment should fail views whitelist') assert(viewsTopLevelViolation('system') === null, 'flat system directory should pass views whitelist') assert(viewsTopLevelViolation('unknownCenter') !== null, 'unknown directory should violate views whitelist') - 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('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') + assert(staticRouteScopeViolation('dashboard/home/index.vue') === null, 'flat dashboard page should pass') + assert(staticRouteScopeViolation('gmCenter/onlineDashboard/index.vue') === null, 'flat operations page should pass') + assert(staticRouteScopeViolation('app/appCenter/appWorkspace/index.vue') !== null, 'retired app directory should violate') + assert(staticRouteScopeViolation('appCenter/appEntry/index.vue') !== null, 'unknown first segment should violate') + assert(staticRouteScopeViolation('appHome/AppHomeBoard.vue') !== null, 'retired app home directory should violate') + assert(staticRouteScopeViolation('platform/global/platformJwtConfig/index.vue') !== null, 'platform directory outside whitelist should violate') + assert(staticRouteScopeViolation('login/index.vue') === null, 'shared login page should pass') + assert(staticRouteScopeViolation('global/platform/index.vue') !== null, 'unknown global directory should violate') console.log('[self-test] pass') return true } @@ -907,17 +908,15 @@ function checkViewsLayout() { return failures.length === 0 } -// ── 静态路由 appScope ↔ 文件首段一致性守护(GFX-734 / C325)──────────────────── -// route.ts / appWorkspaceRoutes.ts 中静态路由的 meta.appScope -// 必须与 component 文件路径首段一致:app→app、tenant→tenant、无 appScope⇒platform 或共享目录。 +// ── 静态路由文件首段一致性守护(GFX-734 / C325)──────────────────── +// route.ts 中静态路由的 component 文件路径首段必须属于当前运营中心或共享目录。 const STATIC_ROUTE_SCOPE_FILES = ['src/router/route.ts'] const SHARED_ROUTE_FIRST_SEGMENTS = new Set(['login', 'error', ...OPERATION_CENTER_DIRECTORIES]) -function staticRouteScopeViolation(viewPath, appScope) { +function staticRouteScopeViolation(viewPath) { const firstSegment = viewPath.split('/')[0] - if (appScope != null) return `退役的 appScope 元数据仍存在:${appScope}` if (!SHARED_ROUTE_FIRST_SEGMENTS.has(firstSegment)) { - return `无 appScope(平台/共享页)但 component 文件首段 "${firstSegment}" 不在共享白名单 [${[...SHARED_ROUTE_FIRST_SEGMENTS].join(', ')}](/@/views/${viewPath})` + return `component 文件首段 "${firstSegment}" 不在运营中心和共享白名单 [${[...SHARED_ROUTE_FIRST_SEGMENTS].join(', ')}](/@/views/${viewPath})` } return null } @@ -934,11 +933,9 @@ function checkStaticRouteScopes() { const compMatch = chunk.match(/import\('\/@\/views\/([^']+)'\)/) if (!compMatch) continue const viewPath = compMatch[1] - const scopeMatch = chunk.match(/appScope:\s*'([^']+)'/) - const appScope = scopeMatch ? scopeMatch[1] : null - const label = `${relFile}: /@/views/${viewPath} (appScope=${appScope ?? 'none'})` + const label = `${relFile}: /@/views/${viewPath}` checked.push(label) - const violation = staticRouteScopeViolation(viewPath, appScope) + const violation = staticRouteScopeViolation(viewPath) if (violation) failures.push(`${label} — ${violation}`) } } @@ -1073,7 +1070,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,否则该页面在任何租户的动态菜单里都不可达(孤儿页)。 @@ -1112,7 +1109,7 @@ function checkOrphanPages() { if (reason) { details.push(`allowed: ${module.rel} (${reason})`) } else { - failures.push(`${module.rel}: directory-style page entry referenced by no GlobalMenuSeedData component and no static route import — unreachable for every tenant; add the menu seed or register an orphanPages allowlist reason`) + failures.push(`${module.rel}: directory-style page entry referenced by no GlobalMenuSeedData component and no static route import — unreachable for every admin session; add the menu seed or register an orphanPages allowlist reason`) } } diff --git a/GameFrameX.Admin.Unified.Vue/scripts/error-codes-translations.json b/GameFrameX.Admin.Unified.Vue/scripts/error-codes-translations.json index 9c70fd28..8cc3b4c1 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/error-codes-translations.json +++ b/GameFrameX.Admin.Unified.Vue/scripts/error-codes-translations.json @@ -213,5 +213,620 @@ "zh-tw": "支付渠道退款失敗", "ja": "支払いチャネルの返金に失敗しました", "ko": "결제 채널 환불이 실패했습니다" + }, + "10000001": { + "zh-tw": "內部錯誤", + "ja": "内部エラーです", + "ko": "내부 오류입니다" + }, + "10000002": { + "zh-tw": "平台系統郵件測試發送失敗", + "ja": "プラットフォームのシステムメールテスト送信に失敗しました", + "ko": "플랫폼 시스템 메일 테스트 전송에 실패했습니다" + }, + "20000001": { + "zh-tw": "沒有找到", + "ja": "見つかりません", + "ko": "찾을 수 없습니다" + }, + "20000002": { + "zh-tw": "參數校驗失敗", + "ja": "パラメータの検証に失敗しました", + "ko": "매개변수 검증에 실패했습니다" + }, + "20000003": { + "zh-tw": "記錄不存在", + "ja": "レコードが存在しません", + "ko": "레코드가 존재하지 않습니다" + }, + "20000004": { + "zh-tw": "數據已存在", + "ja": "データは既に存在します", + "ko": "데이터가 이미 존재합니다" + }, + "20000005": { + "zh-tw": "數據已被其他用戶修改,請刷新後重試", + "ja": "データは他のユーザーによって変更されました。更新してから再試行してください", + "ko": "데이터가 다른 사용자에 의해 수정되었습니다. 새로 고침 후 다시 시도하세요" + }, + "20100001": { + "zh-tw": "授權無效", + "ja": "認可が無効です", + "ko": "권한이 유효하지 않습니다" + }, + "20100002": { + "zh-tw": "令牌無效", + "ja": "トークンが無効です", + "ko": "토큰이 유효하지 않습니다" + }, + "20100003": { + "zh-tw": "令牌已過期", + "ja": "トークンの有効期限が切れました", + "ko": "토큰이 만료되었습니다" + }, + "20100004": { + "zh-tw": "未授權", + "ja": "未認可です", + "ko": "권한이 없습니다" + }, + "20100005": { + "zh-tw": "簽名驗證失敗", + "ja": "署名の検証に失敗しました", + "ko": "서명 검증에 실패했습니다" + }, + "20200001": { + "zh-tw": "不是枚舉類型", + "ja": "列挙型ではありません", + "ko": "열거형이 아닙니다" + }, + "30000001": { + "zh-tw": "驗證碼錯誤", + "ja": "認証コードが正しくありません", + "ko": "인증 코드가 올바르지 않습니다" + }, + "30000002": { + "zh-tw": "賬號不存在", + "ja": "アカウントが存在しません", + "ko": "계정이 존재하지 않습니다" + }, + "30000003": { + "zh-tw": "非法操作,禁止刪除自己", + "ja": "不正な操作です。自分自身の削除は禁止されています", + "ko": "잘못된 조작입니다. 자기 자신을 삭제할 수 없습니다" + }, + "30000004": { + "zh-tw": "賬號已存在", + "ja": "アカウントは既に存在します", + "ko": "계정이 이미 존재합니다" + }, + "30000005": { + "zh-tw": "舊密碼輸入錯誤", + "ja": "旧パスワードが正しくありません", + "ko": "이전 비밀번호가 올바르지 않습니다" + }, + "30000006": { + "zh-tw": "非法操作,未登錄", + "ja": "不正な操作です。未ログインです", + "ko": "잘못된 조작입니다. 로그인되어 있지 않습니다" + }, + "30000007": { + "zh-tw": "禁止刪除超級管理員", + "ja": "スーパー管理者の削除は禁止されています", + "ko": "슈퍼 관리자를 삭제할 수 없습니다" + }, + "30000008": { + "zh-tw": "禁止修改超級管理員狀態", + "ja": "スーパー管理者の状態変更は禁止されています", + "ko": "슈퍼 관리자 상태를 변경할 수 없습니다" + }, + "30000009": { + "zh-tw": "沒有權限", + "ja": "権限がありません", + "ko": "권한이 없습니다" + }, + "30000010": { + "zh-tw": "賬號已凍結", + "ja": "アカウントは凍結されました", + "ko": "계정이 동결되었습니다" + }, + "30000011": { + "zh-tw": "禁止為超級管理員分配角色", + "ja": "スーパー管理者へのロール割り当ては禁止されています", + "ko": "슈퍼 관리자에게 역할을 할당할 수 없습니다" + }, + "30000012": { + "zh-tw": "郵箱自助註冊未開啟", + "ja": "メールでのセルフ登録は有効になっていません", + "ko": "이메일 셀프 서비스 등록이 비활성화되어 있습니다" + }, + "30000013": { + "zh-tw": "驗證碼錯誤或已過期", + "ja": "認証コードが正しくないか、有効期限が切れています", + "ko": "인증 코드가 올바르지 않거나 만료되었습니다" + }, + "30000014": { + "zh-tw": "驗證碼發送太頻繁,請稍後再試", + "ja": "認証コードの送信が頻繁すぎます。しばらくしてから再試行してください", + "ko": "인증 코드 전송이 너무 잦습니다. 잠시 후 다시 시도하세요" + }, + "30000015": { + "zh-tw": "今日驗證碼發送次數已達上限", + "ja": "本日の認証コード送信回数が上限に達しました", + "ko": "오늘 인증 코드 전송 횟수 한도에 도달했습니다" + }, + "30000016": { + "zh-tw": "郵件發送失敗,請稍後重試", + "ja": "メールの送信に失敗しました。しばらくしてから再試行してください", + "ko": "메일 전송에 실패했습니다. 잠시 후 다시 시도하세요" + }, + "30000017": { + "zh-tw": "平台管理員密碼尚未初始化,請先完成初始化設置", + "ja": "プラットフォーム管理者のパスワードが未初期化です。先に初期設定を完了してください", + "ko": "플랫폼 관리자 비밀번호가 초기화되지 않았습니다. 먼저 초기 설정을 완료하세요" + }, + "30000018": { + "zh-tw": "平台管理員密碼已初始化,禁止重複設置", + "ja": "プラットフォーム管理者のパスワードは既に初期化済みです。重複設定は禁止されています", + "ko": "플랫폼 관리자 비밀번호가 이미 초기화되었습니다. 중복 설정할 수 없습니다" + }, + "30000019": { + "zh-tw": "兩次輸入的密碼不一致", + "ja": "入力されたパスワードが一致しません", + "ko": "두 번 입력한 비밀번호가 일치하지 않습니다" + }, + "30000020": { + "zh-tw": "操作過於頻繁,請稍後再試", + "ja": "操作が頻繁すぎます。しばらくしてから再試行してください", + "ko": "조작이 너무 잦습니다. 잠시 후 다시 시도하세요" + }, + "30000021": { + "zh-tw": "今日操作次數已達上限", + "ja": "本日の操作回数が上限に達しました", + "ko": "오늘 조작 횟수 한도에 도달했습니다" + }, + "30100001": { + "zh-tw": "禁止刪除系統管理員角色", + "ja": "システム管理者ロールの削除は禁止されています", + "ko": "시스템 관리자 역할을 삭제할 수 없습니다" + }, + "30100002": { + "zh-tw": "選單已存在", + "ja": "メニューは既に存在します", + "ko": "메뉴가 이미 존재합니다" + }, + "30100003": { + "zh-tw": "權限標識格式為空", + "ja": "権限識別子が空です", + "ko": "권한 식별자가 비어 있습니다" + }, + "30100004": { + "zh-tw": "禁止本節點與父節點相同", + "ja": "ノードを自分自身の親にすることはできません", + "ko": "노드가 자기 자신의 부모가 될 수 없습니다" + }, + "30100005": { + "zh-tw": "路由名稱重複", + "ja": "ルート名が重複しています", + "ko": "라우트 이름이 중복됩니다" + }, + "30200001": { + "zh-tw": "字典類型不存在", + "ja": "辞書タイプが存在しません", + "ko": "사전 유형이 존재하지 않습니다" + }, + "30200002": { + "zh-tw": "字典類型已存在,名稱或編碼重複", + "ja": "辞書タイプが既に存在します(名称またはコードの重複)", + "ko": "사전 유형이 이미 존재합니다(이름 또는 코드 중복)" + }, + "30200003": { + "zh-tw": "字典值已存在,名稱或編碼重複", + "ja": "辞書値が既に存在します(名称またはコードの重複)", + "ko": "사전 값이 이미 존재합니다(이름 또는 코드 중복)" + }, + "30200004": { + "zh-tw": "字典值不存在", + "ja": "辞書値が存在しません", + "ko": "사전 값이 존재하지 않습니다" + }, + "30500001": { + "zh-tw": "已存在同名或同編碼參數配置", + "ja": "同じ名前またはコードのパラメータ設定が既に存在します", + "ko": "같은 이름 또는 코드의 매개변수 설정이 이미 존재합니다" + }, + "30500002": { + "zh-tw": "禁止刪除系統參數", + "ja": "システムパラメータの削除は禁止されています", + "ko": "시스템 매개변수를 삭제할 수 없습니다" + }, + "31000001": { + "zh-tw": "文件不存在", + "ja": "ファイルが存在しません", + "ko": "파일이 존재하지 않습니다" + }, + "31000002": { + "zh-tw": "不允許的文件類型", + "ja": "許可されていないファイル形式です", + "ko": "허용되지 않는 파일 형식입니다" + }, + "31000003": { + "zh-tw": "文件超過允許大小", + "ja": "ファイルサイズが上限を超えています", + "ko": "파일 크기가 허용 한도를 초과했습니다" + }, + "31000004": { + "zh-tw": "文件後綴錯誤", + "ja": "ファイル拡張子が正しくありません", + "ko": "파일 확장자가 올바르지 않습니다" + }, + "31100001": { + "zh-tw": "腳本代碼不能為空", + "ja": "スクリプトコードは空にできません", + "ko": "스크립트 코드는 비워둘 수 없습니다" + }, + "31100002": { + "zh-tw": "腳本代碼中的作業類,需要定義 [JobDetail] 特性", + "ja": "スクリプト内のジョブクラスには [JobDetail] 属性が必要です", + "ko": "스크립트의 작업 클래스에는 [JobDetail] 특성을 정의해야 합니다" + }, + "31100003": { + "zh-tw": "作業編號需要與腳本代碼中的作業類 [JobDetail('jobId')] 一致", + "ja": "ジョブ ID はスクリプト内の [JobDetail('jobId')] と一致する必要があります", + "ko": "작업 ID는 스크립트의 [JobDetail('jobId')]와 일치해야 합니다" + }, + "31100004": { + "zh-tw": "禁止修改作業編號", + "ja": "ジョブ ID の変更は禁止されています", + "ko": "작업 ID를 변경할 수 없습니다" + }, + "31100005": { + "zh-tw": "執行作業失敗", + "ja": "ジョブの実行に失敗しました", + "ko": "작업 실행에 실패했습니다" + }, + "31200001": { + "zh-tw": "請添加數據列", + "ja": "データ列を追加してください", + "ko": "데이터 열을 추가하세요" + }, + "31200002": { + "zh-tw": "不允許添加相同欄位名", + "ja": "同じフィールド名の追加は許可されません", + "ko": "동일한 필드 이름을 추가할 수 없습니다" + }, + "31300001": { + "zh-tw": "身份標識已存在", + "ja": "識別情報は既に存在します", + "ko": "신원 식별자가 이미 존재합니다" + }, + "31300003": { + "zh-tw": "綁定用戶不存在", + "ja": "バインドされたユーザーが存在しません", + "ko": "바인딩된 사용자가 존재하지 않습니다" + }, + "31300004": { + "zh-tw": "憑證不存在或不屬於當前應用", + "ja": "資格情報が存在しない、または現在のアプリに属していません", + "ko": "자격 증명이 존재하지 않거나 현재 앱에 속하지 않습니다" + }, + "31300005": { + "zh-tw": "憑證已撤銷,不可啟用", + "ja": "資格情報は失効済みのため有効化できません", + "ko": "자격 증명이 취소되어 활성화할 수 없습니다" + }, + "31300006": { + "zh-tw": "介面範圍為空或格式無效", + "ja": "スコープが空または無効です", + "ko": "범위가 비어 있거나 유효하지 않습니다" + }, + "31400001": { + "zh-tw": "郵件已發佈,主體欄位不可修改", + "ja": "メールキャンペーンは公開済みのため、本文フィールドを変更できません", + "ko": "메일 캠페인이 게시되어 본문 필드를 수정할 수 없습니다" + }, + "31400002": { + "zh-tw": "郵件已撤回,不可重複撤回", + "ja": "メールキャンペーンは既に撤回されています", + "ko": "메일 캠페인이 이미 회수되었습니다" + }, + "31400003": { + "zh-tw": "郵件記錄不存在", + "ja": "メールキャンペーンが存在しません", + "ko": "메일 캠페인이 존재하지 않습니다" + }, + "31400004": { + "zh-tw": "郵件參數校驗失敗", + "ja": "メールキャンペーンのパラメータ検証に失敗しました", + "ko": "메일 캠페인 매개변수 검증에 실패했습니다" + }, + "31400005": { + "zh-tw": "郵件當前狀態不允許該操作", + "ja": "現在のメールキャンペーン状態ではこの操作は許可されません", + "ko": "현재 메일 캠페인 상태에서는 이 작업을 수행할 수 없습니다" + }, + "31400006": { + "zh-tw": "郵件發佈調用服務端失敗", + "ja": "メールキャンペーン公開のサーバー呼び出しに失敗しました", + "ko": "메일 캠페인 게시의 서버 호출에 실패했습니다" + }, + "31700001": { + "zh-tw": "處罰不是生效狀態,無法聯動 Online 運行時", + "ja": "処罰が有効状態でないため、Online ランタイムと連動できません", + "ko": "처벌이 활성 상태가 아니어 Online 런타임과 연동할 수 없습니다" + }, + "31700002": { + "zh-tw": "該處罰動作無對應 Online 聯動命令", + "ja": "この処罰アクションに対応する Online 連動コマンドがありません", + "ko": "이 처벌 동작에 대응하는 Online 연동 명령이 없습니다" + }, + "31700003": { + "zh-tw": "應用下沒有可聯動的區服", + "ja": "アプリ配下に連動可能なゲームエリアがありません", + "ko": "앱 아래에 연동 가능한 게임 영역이 없습니다" + }, + "31800001": { + "zh-tw": "同一分包下的廣告平台回調配置已存在", + "ja": "同じパッケージの広告プラットフォームコールバック設定が既に存在します", + "ko": "동일 패키지의 광고 플랫폼 콜백 설정이 이미 존재합니다" + }, + "31800002": { + "zh-tw": "分包 Id 必須為正數", + "ja": "パッケージ Id は正の数である必要があります", + "ko": "패키지 Id는 양수여야 합니다" + }, + "31800003": { + "zh-tw": "分包不存在或未啟用", + "ja": "パッケージが存在しないか有効になっていません", + "ko": "패키지가 존재하지 않거나 활성화되어 있지 않습니다" + }, + "60100001": { + "zh-tw": "賬號或密碼錯誤", + "ja": "アカウントまたはパスワードが正しくありません", + "ko": "계정 또는 비밀번호가 올바르지 않습니다" + }, + "60100002": { + "zh-tw": "賬號已存在", + "ja": "アカウントは既に存在します", + "ko": "계정이 이미 존재합니다" + }, + "60100003": { + "zh-tw": "賬號不存在", + "ja": "アカウントが存在しません", + "ko": "계정이 존재하지 않습니다" + }, + "60100004": { + "zh-tw": "賬號已被禁用", + "ja": "アカウントは無効化されています", + "ko": "계정이 비활성화되었습니다" + }, + "60100005": { + "zh-tw": "賬號未綁定谷歌Id", + "ja": "アカウントに Google ID がバインドされていません", + "ko": "계정에 Google ID가 바인딩되어 있지 않습니다" + }, + "60100006": { + "zh-tw": "谷歌Id已被其他用戶綁定", + "ja": "Google ID は既に他のユーザーにバインドされています", + "ko": "Google ID가 이미 다른 사용자에게 바인딩되어 있습니다" + }, + "60100007": { + "zh-tw": "郵箱的賬號或密碼錯誤", + "ja": "メールのアカウントまたはパスワードが正しくありません", + "ko": "이메일 계정 또는 비밀번호가 올바르지 않습니다" + }, + "60100008": { + "zh-tw": "郵箱已存在", + "ja": "メールアドレスは既に存在します", + "ko": "이메일이 이미 존재합니다" + }, + "60100009": { + "zh-tw": "賬號未綁定AppleId", + "ja": "アカウントに Apple ID がバインドされていません", + "ko": "계정에 Apple ID가 바인딩되어 있지 않습니다" + }, + "60100010": { + "zh-tw": "賬號未綁定FacebookId", + "ja": "アカウントに Facebook ID がバインドされていません", + "ko": "계정에 Facebook ID가 바인딩되어 있지 않습니다" + }, + "60100011": { + "zh-tw": "賬號未綁定TwitterId", + "ja": "アカウントに Twitter ID がバインドされていません", + "ko": "계정에 Twitter ID가 바인딩되어 있지 않습니다" + }, + "60100012": { + "zh-tw": "賬號未綁定DiscordId", + "ja": "アカウントに Discord ID がバインドされていません", + "ko": "계정에 Discord ID가 바인딩되어 있지 않습니다" + }, + "60100013": { + "zh-tw": "賬號解綁找不到", + "ja": "アカウントのバインド解除対象が見つかりません", + "ko": "계정 바인딩 해제 대상을 찾을 수 없습니다" + }, + "60100014": { + "zh-tw": "郵箱已被其他用戶綁定", + "ja": "メールアドレスは既に他のユーザーにバインドされています", + "ko": "이메일이 이미 다른 사용자에게 바인딩되어 있습니다" + }, + "60100015": { + "zh-tw": "郵箱解綁找不到", + "ja": "メールのバインド解除対象が見つかりません", + "ko": "이메일 바인딩 해제 대상을 찾을 수 없습니다" + }, + "60100016": { + "zh-tw": "賬號未綁定郵箱", + "ja": "アカウントにメールがバインドされていません", + "ko": "계정에 이메일이 바인딩되어 있지 않습니다" + }, + "60100017": { + "zh-tw": "Apple Id已被其他用戶綁定", + "ja": "Apple ID は既に他のユーザーにバインドされています", + "ko": "Apple ID가 이미 다른 사용자에게 바인딩되어 있습니다" + }, + "60100018": { + "zh-tw": "Facebook Id已被其他用戶綁定", + "ja": "Facebook ID は既に他のユーザーにバインドされています", + "ko": "Facebook ID가 이미 다른 사용자에게 바인딩되어 있습니다" + }, + "60100019": { + "zh-tw": "賬號未綁定Facebook", + "ja": "アカウントに Facebook がバインドされていません", + "ko": "계정에 Facebook가 바인딩되어 있지 않습니다" + }, + "60100020": { + "zh-tw": "QQ Id已被其他用戶綁定", + "ja": "QQ ID は既に他のユーザーにバインドされています", + "ko": "QQ ID가 이미 다른 사용자에게 바인딩되어 있습니다" + }, + "60100021": { + "zh-tw": "賬號未綁定QQ", + "ja": "アカウントに QQ がバインドされていません", + "ko": "계정에 QQ가 바인딩되어 있지 않습니다" + }, + "60100022": { + "zh-tw": "WeChat Id已被其他用戶綁定", + "ja": "WeChat ID は既に他のユーザーにバインドされています", + "ko": "WeChat ID가 이미 다른 사용자에게 바인딩되어 있습니다" + }, + "60100023": { + "zh-tw": "賬號未綁定WeChat", + "ja": "アカウントに WeChat がバインドされていません", + "ko": "계정에 WeChat가 바인딩되어 있지 않습니다" + }, + "60100024": { + "zh-tw": "用戶郵件驗證碼不存在或已過期", + "ja": "ユーザーのメール認証コードが存在しないか、有効期限が切れています", + "ko": "사용자 메일 인증 코드가 없거나 만료되었습니다" + }, + "60100300": { + "zh-tw": "賬號處於註銷狀態", + "ja": "アカウントは削除処理中です", + "ko": "계정이 삭제 처리 중입니다" + }, + "60100301": { + "zh-tw": "賬號已被封禁/限制登錄", + "ja": "アカウントはログイン禁止または制限されています", + "ko": "계정이 차단되거나 로그인이 제한되었습니다" + }, + "60200001": { + "zh-tw": "角色不存在", + "ja": "ロールが存在しません", + "ko": "역할이 존재하지 않습니다" + }, + "60200002": { + "zh-tw": "角色名稱不能為空", + "ja": "ロール名は空にできません", + "ko": "역할 이름은 비워둘 수 없습니다" + }, + "60200003": { + "zh-tw": "角色已被封禁/限制登錄", + "ja": "ロールはログイン禁止または制限されています", + "ko": "역할이 차단되거나 로그인이 제한되었습니다" + }, + "60300001": { + "zh-tw": "區服已存在", + "ja": "ゲームエリアは既に存在します", + "ko": "게임 영역이 이미 존재합니다" + }, + "60300002": { + "zh-tw": "區服不存在", + "ja": "ゲームエリアが存在しません", + "ko": "게임 영역이 존재하지 않습니다" + }, + "60300003": { + "zh-tw": "當前狀態不能註冊", + "ja": "現在の状態では登録できません", + "ko": "현재 상태에서는 등록할 수 없습니다" + }, + "60300004": { + "zh-tw": "當前區服已滿員", + "ja": "このゲームエリアは満員です", + "ko": "현재 게임 영역이 가득 찼습니다" + }, + "60300005": { + "zh-tw": "當前狀態不能登錄", + "ja": "現在の状態ではログインできません", + "ko": "현재 상태에서는 로그인할 수 없습니다" + }, + "60300006": { + "zh-tw": "當前狀態不能購買", + "ja": "現在の状態では購入できません", + "ko": "현재 상태에서는 구매할 수 없습니다" + }, + "60400001": { + "zh-tw": "存檔同步衝突,請先下載最新存檔後重試", + "ja": "アーカイブ同期が競合しました。最新のアーカイブをダウンロードしてから再試行してください", + "ko": "아카이브 동기화 충돌. 최신 아카이브를 내려받은 후 다시 시도하세요" + }, + "60500002": { + "zh-tw": "資料庫連接不可用,無法讀取首頁讀數", + "ja": "データベース接続が利用できないため、ホーム指標を取得できません", + "ko": "데이터베이스 연결을 사용할 수 없어 홈 지표를 읽을 수 없습니다" + }, + "70100001": { + "zh-tw": "商品不存在", + "ja": "商品が存在しません", + "ko": "상품이 존재하지 않습니다" + }, + "70100002": { + "zh-tw": "回調訂單不存在", + "ja": "コールバック注文が存在しません", + "ko": "콜백 주문이 존재하지 않습니다" + }, + "70100003": { + "zh-tw": "支付金額與訂單不符", + "ja": "支払い金額が注文と一致しません", + "ko": "결제 금액이 주문과 일치하지 않습니다" + }, + "70300001": { + "zh-tw": "兌換碼已過期", + "ja": "引き換えコードの有効期限が切れています", + "ko": "교환 코드가 만료되었습니다" + }, + "70300002": { + "zh-tw": "兌換碼次數已用完", + "ja": "引き換えコードの利用回数を使い切りました", + "ko": "교환 코드 사용 횟수를 모두 소진했습니다" + }, + "70300003": { + "zh-tw": "兌換碼未激活", + "ja": "引き換えコードが未アクティブ化です", + "ko": "교환 코드가 활성화되지 않았습니다" + }, + "70300004": { + "zh-tw": "兌換碼已使用", + "ja": "引き換えコードは既に使用されました", + "ko": "교환 코드가 이미 사용되었습니다" + }, + "70300005": { + "zh-tw": "兌換碼不存在", + "ja": "引き換えコードが存在しません", + "ko": "교환 코드가 존재하지 않습니다" + }, + "70300006": { + "zh-tw": "兌換碼調用錯誤", + "ja": "引き換えコードの呼び出しエラーです", + "ko": "교환 코드 호출 오류입니다" + }, + "70300007": { + "zh-tw": "兌換碼分組每角色次數已用完", + "ja": "この引き換えコードグループのロールごとの利用回数を使い切りました", + "ko": "이 교환 코드 그룹의 역할별 사용 횟수를 모두 소진했습니다" + }, + "70400001": { + "zh-tw": "支付渠道不支援", + "ja": "この支払いチャネルはサポートされていません", + "ko": "지원되지 않는 결제 채널입니다" + }, + "70400002": { + "zh-tw": "該支付渠道不支持商家主動發起退款", + "ja": "この支払いチャネルは加盟店からの返金開始をサポートしていません", + "ko": "이 결제 채널은 판매자가 시작하는 환불을 지원하지 않습니다" + }, + "70400003": { + "zh-tw": "退款失敗:渠道支付配置缺失", + "ja": "返金に失敗しました:チャネルの支払い設定がありません", + "ko": "환불 실패: 채널 결제 구성이 누락되었습니다" } } 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..93f58166 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 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", @@ -58,7 +58,6 @@ "componentNames": { "src/components/app-confirm-dialog/index.vue": "C296 convention exemption: directory-style index.vue component", "src/components/base-edit-dialog/index.vue": "C296 convention exemption: directory-style index.vue component", - "src/components/config-app-scope-picker/index.vue": "C296 convention exemption: directory-style index.vue component", "src/components/crud-data-table/index.vue": "C296 convention exemption: directory-style index.vue component", "src/components/form-help-text/index.vue": "C296 convention exemption: directory-style index.vue component", "src/components/form-label/index.vue": "C296 convention exemption: directory-style index.vue component", @@ -91,12 +90,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 +157,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..96d3296d 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/i18n-text-baseline.json +++ b/GameFrameX.Admin.Unified.Vue/scripts/i18n-text-baseline.json @@ -1,7 +1,107 @@ { "description": "C151 全量用户可见中文债务基线:check:text 对 changed files 中不在基线的新增中文硬编码 fail;基线内条目为已分类历史债务,随迁移推进删除。重新生成:node scripts/check-frontend-standards.mjs text-baseline", - "count": 251, + "count": 242, "fingerprints": [ + "src/views/audit/logDiff/component/DiffFields.vue:'(空)'", + "src/views/audit/logOperation/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:\"请选择分包\"", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:'请选择 Provider'", + "src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue:'请选择分包'", + "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:>正在加载字段定义...<", + "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:'启用'", + "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:>过期时间<", + "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:>旧密钥到期时间(双活窗口收口)<", + "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:'提示'", + "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:'提示'", + "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/gamePaymentConfigEntity/component/EditDialog.vue:\"备注\"", "src/views/clientDelivery/gamePaymentConfigEntity/component/EditDialog.vue:\"请选择支付渠道\"", "src/views/clientDelivery/gamePaymentConfigEntity/component/EditDialog.vue:'请选择支付渠道'", @@ -25,157 +125,52 @@ "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/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:>过期时间<", + "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:>旧密钥到期时间(双活窗口收口)<", + "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:'提示'", + "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:'繁體中文'", @@ -206,7 +201,6 @@ "src/views/system/systemEmailProvider/component/EditDialog.vue:\"默认收件人\"", "src/views/system/systemEmailProvider/component/EditDialog.vue:'平台安全'", "src/views/system/systemEmailProvider/component/EditDialog.vue:'平台运维'", - "src/views/system/systemEmailProvider/component/EditDialog.vue:'租户生命周期'", "src/views/system/systemEmailProvider/component/EditDialog.vue:'请输入默认发件人邮箱'", "src/views/system/systemEmailProvider/component/EditDialog.vue:'请选择 Provider'", "src/views/system/systemEmailProvider/component/EditDialog.vue:'默认'", @@ -238,7 +232,6 @@ "src/views/system/systemEmailProvider/index.vue:'状态'", "src/views/system/systemEmailProvider/index.vue:'用途'", "src/views/system/systemEmailProvider/index.vue:'禁用'", - "src/views/system/systemEmailProvider/index.vue:'租户生命周期'", "src/views/system/systemEmailProvider/index.vue:'编辑平台系统邮件配置'", "src/views/system/systemEmailProvider/index.vue:'请填写收件邮箱、主题和正文'", "src/views/system/systemEmailProvider/index.vue:'请选择要测试的邮件配置'", @@ -250,8 +243,6 @@ "src/views/system/systemEmailProvider/index.vue:>发送<", "src/views/system/systemEmailProvider/index.vue:>取消<", "src/views/system/systemEmailProvider/index.vue:>收件邮箱<", - "src/views/system/systemEmailProvider/index.vue:>正文<", - "src/views/audit/logDiff/component/DiffFields.vue:'(空)'", - "src/views/audit/logOperation/index.vue:\"日志详情\"" + "src/views/system/systemEmailProvider/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..ec46a67e 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,15 +6,15 @@ 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, - tenant_id, created_time, is_deleted, is_enabled, row_version) + order_no, super_admin_only, sync_roles, allow_admin_when_super_admin_only, + 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), - (7465144620076053409, 4272713015995144348, 3, 'systemDatabase:deletetable', 'systemDatabase:deletetable', '删除表', false, false, true, false, 100, true, 0, false, 0, 0, extract(epoch from now())::bigint, false, true, 0), - (8279821677540379012, 5034912420112633389, 3, 'systemConfig:batchDelete', 'systemConfig:batchDelete', '批量删除', false, false, true, false, 100, true, 0, false, 0, 0, extract(epoch from now())::bigint, false, true, 0); + (6237617357109286359, 4272713015995144348, 3, 'systemDatabase:updatetable', 'systemDatabase:updatetable', '编辑表', false, false, true, false, 100, true, 0, false, extract(epoch from now())::bigint, false, true, 0), + (7465144620076053409, 4272713015995144348, 3, 'systemDatabase:deletetable', 'systemDatabase:deletetable', '删除表', false, false, true, false, 100, true, 0, false, extract(epoch from now())::bigint, false, true, 0), + (8279821677540379012, 5034912420112633389, 3, 'systemConfig:batchDelete', 'systemConfig:batchDelete', '批量删除', false, false, true, false, 100, true, 0, false, extract(epoch from now())::bigint, false, true, 0); -INSERT INTO global_menu_endpoint_entity (id, menu_id, endpoint_id, is_auto, tenant_id, created_time, is_deleted, is_enabled, row_version) +INSERT INTO global_menu_endpoint_entity (id, menu_id, endpoint_id, is_auto, created_time, is_deleted, is_enabled, row_version) VALUES - (220231790542065666, 6237617357109286359, 216998930158845952, false, 0, extract(epoch from now())::bigint, false, true, 0), - (220231790542065667, 7465144620076053409, 216998930154651648, false, 0, extract(epoch from now())::bigint, false, true, 0), - (220231790542065668, 8279821677540379012, 216998930452447232, false, 0, extract(epoch from now())::bigint, false, true, 0); + (220231790542065666, 6237617357109286359, 216998930158845952, false, extract(epoch from now())::bigint, false, true, 0), + (220231790542065667, 7465144620076053409, 216998930154651648, false, extract(epoch from now())::bigint, false, true, 0), + (220231790542065668, 8279821677540379012, 216998930452447232, false, 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..d23afc80 100644 --- a/GameFrameX.Admin.Unified.Vue/scripts/permission-keys.txt +++ b/GameFrameX.Admin.Unified.Vue/scripts/permission-keys.txt @@ -24,6 +24,12 @@ clientApiPolicy:delete clientApiPolicy:page clientApiPolicy:rotate clientApiPolicy:update +device:add +device:delete +device:detail +device:page +device:select +device:update deviceGroup:add deviceGroup:delete deviceGroup:detail @@ -384,9 +390,3 @@ systemUser:page systemUser:resetPwd systemUser:setStatus systemUser:update -tenantDevice:add -tenantDevice:delete -tenantDevice:detail -tenantDevice:page -tenantDevice:select -tenantDevice:update 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..0bff6c62 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/_shared/data-contracts.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/_shared/data-contracts.ts @@ -109,8 +109,8 @@ export enum ChannelTypeEnum { 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..1fa44b78 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, @@ -39,11 +39,11 @@ export class AdvertisementCallbackConfig { * * @tags advertisementCallbackConfig * @name AdvertisementCallbackConfigAddPost - * @summary 新增广告回调配置(主库内 Provider 唯一)。 + * @summary 新增广告回调配置(同一分组的 (PackageId, Provider) 唯一)。 * @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..832a6b92 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/advertisementCallbackConfig/types.ts @@ -1,8 +1,10 @@ /* eslint-disable */ /* tslint:disable */ -/** 租户广告回调配置新增输入参数 */ -export interface AddTenantAdvertisementCallbackConfigRequest { +/** 广告回调配置新增输入参数 */ +export interface AddAdvertisementCallbackConfigRequest { + /** 关联的游戏应用分包 Id。 */ + packageId?: string | null; /** * 广告平台 Provider。当前首批配置支持 `TopOn`、`GoogleAdMob`、`Pangle`、`UnityAds`。 * @minLength 1 @@ -43,8 +45,10 @@ export interface AdvertisementCallbackConfigOption { label?: string | null; } -/** 租户广告回调配置输出参数(敏感字段已脱敏) */ +/** 广告回调配置输出参数(敏感字段已脱敏) */ export interface AdvertisementCallbackConfigResponse { + /** 关联的游戏应用分包 Id。 */ + packageId?: string; /** Id */ id?: string; /** 广告平台 Provider。当前首批配置支持 TopOn、GoogleAdMob、Pangle、UnityAds。 */ @@ -106,8 +110,8 @@ export interface AdvertisementCallbackProviderItem { label?: string | null; } -/** 租户广告回调验签配置分页查询输入参数 */ -export interface PageTenantAdvertisementCallbackConfigRequest { +/** 广告回调验签配置分页查询输入参数 */ +export interface PageAdvertisementCallbackConfigRequest { searchKey?: string | null; /** * @format int32 @@ -124,16 +128,18 @@ export interface PageTenantAdvertisementCallbackConfigRequest { orderBy?: string | null; isDescending?: boolean; isActive?: boolean | null; + /** 按游戏应用分包 Id 过滤。 */ + packageId?: string | null; /** 广告平台 Provider。 */ provider?: string | null; } /** - * 租户广告回调配置更新输入参数。 + * 广告回调配置更新输入参数。 * * 敏感字段提交 `******` 时表示保留原值。 */ -export interface UpdateTenantAdvertisementCallbackConfigRequest { +export interface UpdateAdvertisementCallbackConfigRequest { /** * @min 1 * @max 9223372036854776000 @@ -144,6 +150,8 @@ export interface UpdateTenantAdvertisementCallbackConfigRequest { * @max 9223372036854776000 */ rowVersion: string; + /** 关联的游戏应用分包 Id。 */ + packageId?: string | null; /** * 广告平台 Provider。当前首批配置支持 `TopOn`、`GoogleAdMob`、`Pangle`、`UnityAds`。 * @minLength 1 @@ -176,7 +184,7 @@ export interface AdvertisementCallbackConfigAddPostData { code: number; /** 错误或提示信息 */ message: string; - /** 租户广告回调配置输出参数(敏感字段已脱敏) */ + /** 广告回调配置输出参数(敏感字段已脱敏) */ data: AdvertisementCallbackConfigResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; @@ -202,7 +210,7 @@ export interface AdvertisementCallbackConfigDetailGetData { code: number; /** 错误或提示信息 */ message: string; - /** 租户广告回调配置输出参数(敏感字段已脱敏) */ + /** 广告回调配置输出参数(敏感字段已脱敏) */ data: AdvertisementCallbackConfigResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; 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..ef6bf8d5 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/clientApiPolicy/types.ts @@ -1,8 +1,8 @@ /* eslint-disable */ /* tslint:disable */ -/** 租户 Client API 运行策略新增输入参数 */ -export interface AddTenantClientApiPolicyRequest { +/** Client API 运行策略新增输入参数 */ +export interface AddClientApiPolicyRequest { /** 是否要求请求签名。 */ signatureRequired?: boolean; /** 是否要求设备证明。 */ @@ -21,7 +21,7 @@ export interface AddTenantClientApiPolicyRequest { * @format int64 */ ticketExpireTime?: number; - /** 是否允许首次签发时自动创建租户应用级 RSA key。 */ + /** 是否允许首次签发时自动创建应用级 RSA key。 */ enableKeyAutoCreate?: boolean; /** 区服列表是否返回 HttpManagerUrl。 */ enableReturnHttpManager?: boolean; @@ -31,7 +31,7 @@ export interface AddTenantClientApiPolicyRequest { remark?: string | null; } -/** 租户 Client API 运行策略输出参数 */ +/** Client API 运行策略输出参数 */ export interface ClientApiPolicyResponse { /** 是否要求请求签名。 */ signatureRequired?: boolean; @@ -53,7 +53,7 @@ export interface ClientApiPolicyResponse { * @format int64 */ ticketExpireTime?: number; - /** 是否允许首次签发时自动创建租户应用级 RSA key。 */ + /** 是否允许首次签发时自动创建应用级 RSA key。 */ enableKeyAutoCreate?: boolean; /** 区服列表是否返回 HttpManagerUrl。 */ enableReturnHttpManager?: boolean; @@ -95,8 +95,8 @@ export interface ClientApiPolicyResponseSqlSugarPagedList { hasNextPage?: boolean; } -/** 租户 Client API 运行策略分页查询输入参数 */ -export interface PageTenantClientApiPolicyRequest { +/** Client API 运行策略分页查询输入参数 */ +export interface PageClientApiPolicyRequest { searchKey?: string | null; /** * @format int32 @@ -115,8 +115,8 @@ export interface PageTenantClientApiPolicyRequest { isActive?: boolean | null; } -/** 租户 Client API 运行策略更新输入参数 */ -export interface UpdateTenantClientApiPolicyRequest { +/** Client API 运行策略更新输入参数 */ +export interface UpdateClientApiPolicyRequest { /** * @min 1 * @max 9223372036854776000 @@ -145,7 +145,7 @@ export interface UpdateTenantClientApiPolicyRequest { * @format int64 */ ticketExpireTime?: number; - /** 是否允许首次签发时自动创建租户应用级 RSA key。 */ + /** 是否允许首次签发时自动创建应用级 RSA key。 */ enableKeyAutoCreate?: boolean; /** 区服列表是否返回 HttpManagerUrl。 */ enableReturnHttpManager?: boolean; @@ -163,7 +163,7 @@ export interface ClientApiPolicyAddPostData { code: number; /** 错误或提示信息 */ message: string; - /** 租户 Client API 运行策略输出参数 */ + /** Client API 运行策略输出参数 */ data: ClientApiPolicyResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; @@ -189,7 +189,7 @@ export interface ClientApiPolicyDetailGetData { code: number; /** 错误或提示信息 */ message: string; - /** 租户 Client API 运行策略输出参数 */ + /** Client API 运行策略输出参数 */ data: ClientApiPolicyResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; 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..0e839ec3 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/gameLoginTicketKey/types.ts @@ -1,7 +1,7 @@ /* eslint-disable */ /* tslint:disable */ -/** 租户 Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。 */ +/** Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。 */ export interface GameLoginTicketKeyResponse { /** 主键 ID。 */ id?: string; @@ -68,8 +68,8 @@ export interface GameLoginTicketKeyRotateRequest { oldKeyExpireTime?: number | null; } -/** 租户 Game 登录票据签名密钥分页查询输入参数。 */ -export interface PageTenantGameLoginTicketKeyRequest { +/** Game 登录票据签名密钥分页查询输入参数。 */ +export interface PageGameLoginTicketKeyRequest { searchKey?: string | null; /** * @format int32 @@ -98,7 +98,7 @@ export interface GameLoginTicketKeyDetailGetData { code: number; /** 错误或提示信息 */ message: string; - /** 租户 Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。 */ + /** Game 登录票据签名密钥输出参数(仅公钥与元数据,私钥永不回显)。 */ data: GameLoginTicketKeyResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; 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..d562aeb7 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 @@ -119,7 +119,7 @@ export interface SyncPlayerSegmentOnlineRequest { */ id: string; /** - * 目标区服Id(Online 作用域 ServerId,经租户归属校验)。 + * 目标区服Id(Online 作用域 ServerId,经区服归属校验)。 * @min 1 * @max 9223372036854776000 */ @@ -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..90f28ca9 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,编辑由前端回填) */ @@ -145,9 +139,8 @@ export interface GlobalMenuResponse { remark?: string | null; /** 是否仅超管可见(种子元数据,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..99920463 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, @@ -40,11 +40,11 @@ export class ObjectStorageConfig { * * @tags objectStorageConfig * @name ObjectStorageConfigAddPost - * @summary 新增配置。校验 Provider 已注册、规范化 ConfigJson;若启用则在事务内停用同租户其它配置。 + * @summary 新增配置。校验 Provider 已注册、规范化 ConfigJson;若启用则在事务内停用其它配置。 * @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..1b7ff1ae 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/objectStorageConfig/types.ts @@ -1,8 +1,8 @@ /* eslint-disable */ /* tslint:disable */ -/** 新增租户对象存储配置入参。 */ -export interface AddTenantObjectStorageConfigRequest { +/** 新增对象存储配置入参。 */ +export interface AddObjectStorageConfigRequest { /** 存储提供商名称(local / aliyun / tencent-cos / qiniu)。 */ provider?: string | null; /** 对象键路径模板。 */ @@ -35,7 +35,7 @@ export interface ObjectStorageConfigField { sensitive?: boolean; } -/** 租户对象存储配置列表项。 */ +/** 对象存储配置列表项。 */ export interface ObjectStorageConfigResponse { id?: string; /** 存储提供商名称。 */ @@ -91,8 +91,8 @@ export interface ObjectStorageProviderItem { label?: string | null; } -/** 租户对象存储配置分页查询入参。 */ -export interface PageTenantObjectStorageConfigRequest { +/** 对象存储配置分页查询入参。 */ +export interface PageObjectStorageConfigRequest { searchKey?: string | null; /** * @format int32 @@ -114,8 +114,8 @@ export interface PageTenantObjectStorageConfigRequest { isEnabled?: boolean | null; } -/** 更新租户对象存储配置入参。Provider 必须与既有记录一致。 */ -export interface UpdateTenantObjectStorageConfigRequest { +/** 更新对象存储配置入参。Provider 必须与既有记录一致。 */ +export interface UpdateObjectStorageConfigRequest { /** * @min 1 * @max 9223372036854776000 @@ -155,7 +155,7 @@ export interface ObjectStorageConfigAddPostData { code: number; /** 错误或提示信息 */ message: string; - /** 租户对象存储配置列表项。 */ + /** 对象存储配置列表项。 */ data: ObjectStorageConfigResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; @@ -181,7 +181,7 @@ export interface ObjectStorageConfigDetailGetData { code: number; /** 错误或提示信息 */ message: string; - /** 租户对象存储配置列表项。 */ + /** 对象存储配置列表项。 */ data: ObjectStorageConfigResponse; /** 链路追踪标识,未启用追踪时为 null */ trackId: string | null; diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetAuditQuery/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetAuditQuery/types.ts index f25d1acf..c4f8b020 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetAuditQuery/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetAuditQuery/types.ts @@ -42,7 +42,7 @@ export interface OnlineAssetAuditPageResponse { */ export interface PageOnlineAssetAuditRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetGrantCommand/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetGrantCommand/types.ts index 0c1a62a8..b7b347a3 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetGrantCommand/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetGrantCommand/types.ts @@ -40,7 +40,7 @@ export interface OnlineAssetGrantItemRequest { */ export interface OnlineAssetGrantRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ @@ -73,7 +73,7 @@ export interface OnlineAssetGrantRequest { */ export interface OnlineAssetRevokeRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetLedgerQuery/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetLedgerQuery/types.ts index e08ade66..8c43770b 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetLedgerQuery/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetLedgerQuery/types.ts @@ -54,7 +54,7 @@ export interface OnlineAssetLedgerPageResponse { */ export interface PageOnlineAssetLedgerRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetTransactionQuery/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetTransactionQuery/index.ts index 0da0de09..019bae44 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetTransactionQuery/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineAssetTransactionQuery/index.ts @@ -33,7 +33,7 @@ export class OnlineAssetTransactionQuery { onlineAssetTransactionQueryDetailGet = ( query: { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @format int64 * @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..5065fb62 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineControlledCommand/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineControlledCommand/types.ts @@ -62,13 +62,13 @@ export interface OnlineControlledCommandAckResponse { /** * 受控操作命令输入参数(高危端点;change C344 / vault:C9 S8.1)。 * - * 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步 TenantAdmin),`Reason` 与 + * 高危复核口径(A0 锁定):本端点整体高危(权限码仅同步管理员角色),`Reason` 与 * `ReviewerOperatorId` 对全部四命令必填——双人复核字段落地 vault「审批(如需)」,不做通用审批流。 * 目标标识按命令取值:CancelTicket → TicketId;EndAbnormalMatch → MatchId;SuspendResumePlayer / MatchIsolation → PlayerId。 */ export interface OnlineControlledCommandRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchQueueQuery/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchQueueQuery/types.ts index 44e05ff9..b91705bb 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchQueueQuery/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchQueueQuery/types.ts @@ -4,7 +4,7 @@ /** 匹配队列总览查询输入参数,ServerId 为调用前置条件。 */ export interface OnlineMatchOverviewRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchTicketQuery/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchTicketQuery/types.ts index 5e3d6af2..3faf2876 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchTicketQuery/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineMatchTicketQuery/types.ts @@ -117,7 +117,7 @@ export interface OnlineMatchFailureResponse { /** 异常 Ticket 分页查询输入参数(change C341 §3;按异常类别检索,Cursor 翻页透传 Online)。 */ export interface PageOnlineMatchAbnormalTicketRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ @@ -142,7 +142,7 @@ export interface PageOnlineMatchAbnormalTicketRequest { /** 匹配失败原因分页查询输入参数(change C341 §3;Cursor 翻页透传 Online)。 */ export interface PageOnlineMatchFailureRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineMessageAuditQuery/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineMessageAuditQuery/types.ts index 5d8bb2a0..fc844a8d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineMessageAuditQuery/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineMessageAuditQuery/types.ts @@ -46,7 +46,7 @@ export interface OnlineMessageAuditPageResponse { */ export interface PageOnlineMessageAuditRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineOverviewQuery/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineOverviewQuery/types.ts index a3dcedfa..8b0f2cb6 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineOverviewQuery/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineOverviewQuery/types.ts @@ -27,7 +27,7 @@ export interface OnlineOverviewQueueSummaryResponse { /** 在线总览快照查询输入参数(作用域必填;change C344 / vault:C9 S8.1)。 */ export interface OnlineOverviewRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlinePenaltyLinkCommand/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlinePenaltyLinkCommand/types.ts index 8fb7e518..5ea927ae 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 仅同步管理员角色)。 * * 作用域从处罚事实源行推导(AreaId 有值 = 单区服联动,null = 主库全部区服逐一联动)。 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlinePlayerTimelineQuery/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlinePlayerTimelineQuery/types.ts index 9fbe848c..ba2ef595 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlinePlayerTimelineQuery/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlinePlayerTimelineQuery/types.ts @@ -51,7 +51,7 @@ export interface OnlinePlayerTimelineEntryResponse { /** 玩家时间线查询输入参数(change C344 / vault:C9 S8.1;Cursor 翻页,vault:C2 S1.2)。 */ export interface OnlinePlayerTimelineRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ diff --git a/GameFrameX.Admin.Unified.Vue/src/api/onlineReportCase/types.ts b/GameFrameX.Admin.Unified.Vue/src/api/onlineReportCase/types.ts index 7d2d8723..7e8c2b98 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/onlineReportCase/types.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/onlineReportCase/types.ts @@ -77,7 +77,7 @@ export interface OnlineReportCasePageResponse { /** 举报案件处置输入参数(处置流:事实源写入 → 联动命令 → 当事人通知,三步状态落审计)。 */ export interface OnlineReportHandleRequest { /** - * 区服作用域(案件所在区服,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(案件所在区服,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ @@ -139,7 +139,7 @@ export interface OnlineReportHandleResponse { /** 举报案件分页查询输入参数(案件数据实时透传 Online,Admin 不落镜像;作用域必填,与消息审计页一致)。 */ export interface PageOnlineReportCaseRequest { /** - * 区服作用域(必填,经 OnlineScopeContextFactory 校验租户与应用归属)。 + * 区服作用域(必填,经 OnlineScopeContextFactory 校验区服归属)。 * @min 1 * @max 9223372036854776000 */ 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/systemMessage/index.ts b/GameFrameX.Admin.Unified.Vue/src/api/systemMessage/index.ts index 66fc3975..57a2fb30 100644 --- a/GameFrameX.Admin.Unified.Vue/src/api/systemMessage/index.ts +++ b/GameFrameX.Admin.Unified.Vue/src/api/systemMessage/index.ts @@ -51,7 +51,7 @@ export class SystemMessage { * * @tags systemMessage * @name SystemMessageSendEmailPost - * @summary 发送平台系统邮件。 从主库 `SystemEmailProviderEntity` 读取配置(按 `SystemEmailPurpose.PlatformOps` 默认);缺配置返回 `false`,禁止静默成功或 fallback 到租户玩家邮件。 缺省收件人:使用当前命中的 `SystemEmailProviderEntity` 配置的 `DefaultToEmail`;若配置也未提供则发送失败。 + * @summary 发送平台系统邮件。 从主库 `SystemEmailProviderEntity` 读取配置(按 `SystemEmailPurpose.PlatformOps` 默认);缺配置返回 `false`,禁止静默成功或 fallback 到玩家邮件。 缺省收件人:使用当前命中的 `SystemEmailProviderEntity` 配置的 `DefaultToEmail`;若配置也未提供则发送失败。 * @request POST:/api/systemMessage/sendEmail */ systemMessageSendEmailPost = ( 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 93% rename from GameFrameX.Admin.Unified.Vue/src/api/tenantUser/types.ts rename to GameFrameX.Admin.Unified.Vue/src/api/user/types.ts index 54f960cf..44420406 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 TenantUserResponse { +export interface UserRequest { + /** + * @min 1 + * @max 9223372036854776000 + */ + id: string; + /** 是否启用 */ + isEnabled?: boolean; +} + +/** 用户输出参数 */ +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 @@ -549,8 +549,8 @@ export interface TenantUserBaseInfoGetData { code: number; /** 错误或提示信息 */ 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; 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/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/tenant/appHome/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/appHome/en.ts similarity index 91% 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 index 523ace26..374392d4 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/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/appHome/ja.ts similarity index 89% 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 index edaaabc7..0caa71ac 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/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/appHome/ko.ts similarity index 91% 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 index 1ca14d4f..df20111d 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/tenant/appHome/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/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/appHome/zh-cn.ts similarity index 91% 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 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/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/appHome/zh-tw.ts similarity index 91% 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 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/appHome/zh-tw.ts @@ -1,4 +1,4 @@ -// 定義內容(APP-駕駛艙=租戶選定應用後的運營首頁) +// 定義內容(單一遊戲運營首頁) export default { appHome: { kpiOnline: '應用在線 · ONLINE', 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..68c0fa67 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', + channelScopeCustom: 'Custom', channelType: 'Channel Type', channelTypeOfficial: 'Official', channelTypeStore: 'Store', @@ -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..e9be1955 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: 'カスタム', + channelScopeCustom: 'カスタム', channelType: 'チャネルタイプ', channelTypeOfficial: '公式', channelTypeStore: 'ストア', @@ -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..1fd30652 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: '사용자 지정', + channelScopeCustom: '사용자 지정', channelType: '채널 유형', channelTypeOfficial: '공식', channelTypeStore: '스토어', @@ -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..44d57ebb 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: '自定义', + channelScopeCustom: '自定义', channelType: '渠道类型', channelTypeOfficial: '官方', channelTypeStore: '商店', @@ -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..7e3fca95 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: '自訂', + channelScopeCustom: '自訂', channelType: '渠道類型', channelTypeOfficial: '官方', channelTypeStore: '商店', @@ -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/errors/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts index 0a6527a0..2653307f 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/en.ts @@ -2,6 +2,7 @@ export default { errors: { codes: { '10000001': 'Internal error', + '10000002': 'Platform system email test send failed', '20000001': 'Not found', '20000002': 'Parameter validation failed', '20000003': 'Record does not exist', @@ -24,6 +25,11 @@ export default { '30000009': 'No permission', '30000010': 'Account is frozen', '30000011': 'Assigning roles to the super administrator is forbidden', + '30000012': 'Email self-service registration is disabled', + '30000013': 'Verification code is invalid or expired', + '30000014': 'Verification code is being sent too frequently, please retry later', + '30000015': 'Daily verification code sending limit has been reached', + '30000016': 'Failed to send the email, please retry later', '30000017': 'The platform administrator password has not been initialized; complete the setup first', '30000018': 'The platform administrator password has already been initialized; repeated setup is forbidden', '30000019': 'The two entered passwords do not match', @@ -40,28 +46,6 @@ export default { '30200004': 'Dictionary value does not exist', '30500001': 'A parameter with the same name or code already exists', '30500002': 'Deleting system parameters is forbidden', - '30600001': 'Deleting the default tenant is forbidden', - '30600002': 'A tenant with the same name already exists', - '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', - '30600007': 'ID isolation is forbidden for normal tenants', - '30600008': 'The tenant database has already been created', - '30600009': 'Tenant 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', - '30700004': 'No permission to operate on the organization', - '30700005': 'The organization has users and cannot be deleted', - '30700006': 'The affiliated organization has users and cannot be deleted', - '30700007': 'The child organization has users and cannot be deleted', - '30700008': 'The tenant default organization cannot be deleted', - '30700009': 'Creating root organizations is forbidden', - '30900001': 'A position with the same name or code already exists', - '30900002': 'The position has users and cannot be deleted', - '30900003': 'No permission to modify this position', - '30900004': 'Position does not exist', '31000001': 'File does not exist', '31000002': 'File type is not allowed', '31000003': 'File exceeds the allowed size', @@ -74,8 +58,7 @@ export default { '31200001': 'Please add data columns', '31200002': 'Duplicate field names are not allowed', '31300001': 'Identity already exists', - '31300002': 'App does not exist or does not belong to the current tenant', - '31300003': 'Bound user does not exist or does not belong to the current tenant', + '31300003': 'Bound user does not exist', '31300004': 'Credential does not exist or does not belong to the current app', '31300005': 'The credential is revoked and cannot be enabled', '31300006': 'Scopes are empty or invalid', @@ -85,6 +68,12 @@ export default { '31400004': 'Mail campaign parameter validation failed', '31400005': 'The current mail campaign state does not allow this operation', '31400006': 'Failed to call the server for the mail campaign', + '31700001': 'Penalty is not active; cannot link to Online runtime', + '31700002': 'Penalty action has no corresponding Online link command', + '31700003': 'No linkable game area under the application', + '31800001': 'An advertisement callback configuration already exists for this package and provider', + '31800002': 'Package id must be a positive number', + '31800003': 'Package does not exist or is not enabled', '32000001': 'Online internal error', '32000002': 'Online network timeout', '32000003': 'Online network error', @@ -144,6 +133,7 @@ export default { '60300005': 'Login is not allowed in the current state', '60300006': 'Purchase is not allowed in the current state', '60400001': 'Archive sync conflict: download the latest archive and retry', + '60500002': 'The database connection is unavailable for home metrics', '60600001': 'Invalid provisioning parameters', '60600002': 'Template server not found', '60600003': 'Server identifier is occupied or retry parameters differ', @@ -164,6 +154,8 @@ export default { '60700009': 'Merge call failed; verify and rehearse again', '60700010': 'Merge plan cannot be cancelled', '70100001': 'Product not found', + '70100002': 'Notify order not found', + '70100003': 'Notify amount mismatch', '70300001': 'Redeem code has expired', '70300002': 'Redeem code usage limit reached', '70300003': 'Redeem code is not activated', @@ -172,6 +164,9 @@ export default { '70300006': 'Redeem code invocation error', '70300007': 'Per-role usage limit of this redeem code group reached', '70400001': 'Payment channel not supported', + '70400002': 'This payment channel does not support merchant-initiated refunds', + '70400003': 'Refund failed: payment channel configuration is missing', + '70400004': 'Payment channel refund failed', }, }, }; diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ja.ts index e5c2eed5..3f6edb73 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ja.ts @@ -1,90 +1,79 @@ export default { errors: { codes: { - '10000001': '内部エラーが発生しました', - '20000001': '見つかりませんでした', + '10000001': '内部エラーです', + '10000002': 'プラットフォームのシステムメールテスト送信に失敗しました', + '20000001': '見つかりません', '20000002': 'パラメータの検証に失敗しました', '20000003': 'レコードが存在しません', - '20000004': 'データが既に存在します', + '20000004': 'データは既に存在します', '20000005': 'データは他のユーザーによって変更されました。更新してから再試行してください', '20100001': '認可が無効です', '20100002': 'トークンが無効です', - '20100003': 'トークンの有効期限が切れています', - '20100004': '権限がありません', + '20100003': 'トークンの有効期限が切れました', + '20100004': '未認可です', '20100005': '署名の検証に失敗しました', '20200001': '列挙型ではありません', '30000001': '認証コードが正しくありません', '30000002': 'アカウントが存在しません', - '30000003': '不正な操作です。自分自身を削除することはできません', - '30000004': 'アカウントが既に存在します', + '30000003': '不正な操作です。自分自身の削除は禁止されています', + '30000004': 'アカウントは既に存在します', '30000005': '旧パスワードが正しくありません', - '30000006': '不正な操作です。ログインしていません', - '30000007': 'スーパー管理者は削除できません', - '30000008': 'スーパー管理者の状態は変更できません', + '30000006': '不正な操作です。未ログインです', + '30000007': 'スーパー管理者の削除は禁止されています', + '30000008': 'スーパー管理者の状態変更は禁止されています', '30000009': '権限がありません', - '30000010': 'アカウントは凍結されています', + '30000010': 'アカウントは凍結されました', '30000011': 'スーパー管理者へのロール割り当ては禁止されています', - '30000017': 'プラットフォーム管理者のパスワードが初期化されていません。先に初期設定を完了してください', - '30000018': 'プラットフォーム管理者のパスワードは既に初期化済みのため、再設定は禁止されています', + '30000012': 'メールでのセルフ登録は有効になっていません', + '30000013': '認証コードが正しくないか、有効期限が切れています', + '30000014': '認証コードの送信が頻繁すぎます。しばらくしてから再試行してください', + '30000015': '本日の認証コード送信回数が上限に達しました', + '30000016': 'メールの送信に失敗しました。しばらくしてから再試行してください', + '30000017': 'プラットフォーム管理者のパスワードが未初期化です。先に初期設定を完了してください', + '30000018': 'プラットフォーム管理者のパスワードは既に初期化済みです。重複設定は禁止されています', '30000019': '入力されたパスワードが一致しません', '30000020': '操作が頻繁すぎます。しばらくしてから再試行してください', '30000021': '本日の操作回数が上限に達しました', - '30100001': 'システム管理者ロールは削除できません', - '30100002': 'メニューが既に存在します', + '30100001': 'システム管理者ロールの削除は禁止されています', + '30100002': 'メニューは既に存在します', '30100003': '権限識別子が空です', - '30100004': 'ノードと親ノードを同一にはできません', + '30100004': 'ノードを自分自身の親にすることはできません', '30100005': 'ルート名が重複しています', '30200001': '辞書タイプが存在しません', '30200002': '辞書タイプが既に存在します(名称またはコードの重複)', '30200003': '辞書値が既に存在します(名称またはコードの重複)', '30200004': '辞書値が存在しません', - '30500001': '同名または同コードのパラメータ設定が既に存在します', - '30500002': 'システムパラメータは削除できません', - '30600001': '既定のテナントは削除できません', - '30600002': '同名のテナントが既に存在します', - '30600003': '同名のテナント管理者が既に存在します', - '30600004': '既定のテナントの状態は変更できません', - '30600005': 'この種類のデータベースは作成できません', - '30600006': 'テナントは無効化されています', - '30600007': '通常テナントは ID 分離を使用できません', - '30600008': 'テナントデータベースは既に作成済みです。重複作成はできません', - '30600009': 'テナントの有効期限が切れています', - '30700001': '上位組織が存在しません', - '30700002': '現在の組織 ID を上位組織 ID と同一にはできません', - '30700003': '同じコードまたは名称の運営組織が既に存在します', - '30700004': '組織を操作する権限がありません', - '30700005': 'この組織にはユーザーが存在するため削除できません', - '30700006': '所属組織にはユーザーが存在するため削除できません', - '30700007': '下位組織にはユーザーが存在するため削除できません', - '30700008': 'テナントの既定組織は削除できません', - '30700009': 'ルート組織の追加は禁止されています', - '30900001': '同名または同コードのポジションが既に存在します', - '30900002': 'このポジションにはユーザーが存在するため削除できません', - '30900003': 'このポジションを変更する権限がありません', - '30900004': 'ポジションが存在しません', + '30500001': '同じ名前またはコードのパラメータ設定が既に存在します', + '30500002': 'システムパラメータの削除は禁止されています', '31000001': 'ファイルが存在しません', '31000002': '許可されていないファイル形式です', '31000003': 'ファイルサイズが上限を超えています', '31000004': 'ファイル拡張子が正しくありません', - '31100001': 'スクリプトコードは必須です', - '31100002': 'スクリプト内のジョブクラスには [JobDetail] 属性の定義が必要です', - '31100003': 'ジョブ ID はスクリプト内のジョブクラスの [JobDetail(\'jobId\')] と一致する必要があります', - '31100004': 'ジョブ ID は変更できません', + '31100001': 'スクリプトコードは空にできません', + '31100002': 'スクリプト内のジョブクラスには [JobDetail] 属性が必要です', + '31100003': 'ジョブ ID はスクリプト内の [JobDetail(\'jobId\')] と一致する必要があります', + '31100004': 'ジョブ ID の変更は禁止されています', '31100005': 'ジョブの実行に失敗しました', '31200001': 'データ列を追加してください', - '31200002': '同じフィールド名の追加は許可されていません', - '31300001': 'アイデンティティが既に存在します', - '31300002': 'アプリが存在しない、または現在のテナントに所属していません', - '31300003': 'バインドされたユーザーが存在しない、または現在のテナントに所属していません', - '31300004': 'クレデンシャルが存在しない、または現在のアプリに所属していません', - '31300005': 'クレデンシャルは失効済みのため有効化できません', - '31300006': 'スコープが空、または形式が無効です', - '31400001': 'メールキャンペーンは公開済みのため、本文フィールドは変更できません', - '31400002': 'メールキャンペーンは既に取り消されています', - '31400003': 'メール記録が存在しません', + '31200002': '同じフィールド名の追加は許可されません', + '31300001': '識別情報は既に存在します', + '31300003': 'バインドされたユーザーが存在しません', + '31300004': '資格情報が存在しない、または現在のアプリに属していません', + '31300005': '資格情報は失効済みのため有効化できません', + '31300006': 'スコープが空または無効です', + '31400001': 'メールキャンペーンは公開済みのため、本文フィールドを変更できません', + '31400002': 'メールキャンペーンは既に撤回されています', + '31400003': 'メールキャンペーンが存在しません', '31400004': 'メールキャンペーンのパラメータ検証に失敗しました', - '31400005': '現在のメールキャンペーンの状態ではこの操作は許可されていません', - '31400006': 'メールキャンペーンの公開でサーバー呼び出しに失敗しました', + '31400005': '現在のメールキャンペーン状態ではこの操作は許可されません', + '31400006': 'メールキャンペーン公開のサーバー呼び出しに失敗しました', + '31700001': '処罰が有効状態でないため、Online ランタイムと連動できません', + '31700002': 'この処罰アクションに対応する Online 連動コマンドがありません', + '31700003': 'アプリ配下に連動可能なゲームエリアがありません', + '31800001': '同じパッケージの広告プラットフォームコールバック設定が既に存在します', + '31800002': 'パッケージ Id は正の数である必要があります', + '31800003': 'パッケージが存在しないか有効になっていません', '32000001': 'Online システム内部エラーです', '32000002': 'Online ネットワークタイムアウトが発生しました', '32000003': 'Online ネットワークエラーが発生しました', @@ -109,41 +98,42 @@ export default { '32700001': 'Online サービスが混雑しています。しばらくしてから再試行してください', '32700002': 'Online 依存サービスが一時的に利用できません', '60100001': 'アカウントまたはパスワードが正しくありません', - '60100002': 'アカウントが既に存在します', - '60100003': 'アカウントが見つかりません', + '60100002': 'アカウントは既に存在します', + '60100003': 'アカウントが存在しません', '60100004': 'アカウントは無効化されています', - '60100005': 'アカウントに Google ID が紐付けられていません', - '60100006': 'Google ID は既に他のユーザーに紐付けられています', - '60100007': 'メールアドレスのアカウントまたはパスワードが正しくありません', - '60100008': 'メールアドレスが既に存在します', - '60100009': 'アカウントに Apple ID が紐付けられていません', - '60100010': 'アカウントに Facebook ID が紐付けられていません', - '60100011': 'アカウントに Twitter ID が紐付けられていません', - '60100012': 'アカウントに Discord ID が紐付けられていません', - '60100013': 'アカウントの紐付け解除対象が見つかりません', - '60100014': 'メールアドレスは既に他のユーザーに紐付けられています', - '60100015': 'メールアドレスの紐付け解除対象が見つかりません', - '60100016': 'アカウントにメールアドレスが紐付けられていません', - '60100017': 'Apple ID は既に他のユーザーに紐付けられています', - '60100018': 'Facebook ID は既に他のユーザーに紐付けられています', - '60100019': 'アカウントに Facebook が紐付けられていません', - '60100020': 'QQ ID は既に他のユーザーに紐付けられています', - '60100021': 'アカウントに QQ が紐付けられていません', - '60100022': 'WeChat ID は既に他のユーザーに紐付けられています', - '60100023': 'アカウントに WeChat が紐付けられていません', + '60100005': 'アカウントに Google ID がバインドされていません', + '60100006': 'Google ID は既に他のユーザーにバインドされています', + '60100007': 'メールのアカウントまたはパスワードが正しくありません', + '60100008': 'メールアドレスは既に存在します', + '60100009': 'アカウントに Apple ID がバインドされていません', + '60100010': 'アカウントに Facebook ID がバインドされていません', + '60100011': 'アカウントに Twitter ID がバインドされていません', + '60100012': 'アカウントに Discord ID がバインドされていません', + '60100013': 'アカウントのバインド解除対象が見つかりません', + '60100014': 'メールアドレスは既に他のユーザーにバインドされています', + '60100015': 'メールのバインド解除対象が見つかりません', + '60100016': 'アカウントにメールがバインドされていません', + '60100017': 'Apple ID は既に他のユーザーにバインドされています', + '60100018': 'Facebook ID は既に他のユーザーにバインドされています', + '60100019': 'アカウントに Facebook がバインドされていません', + '60100020': 'QQ ID は既に他のユーザーにバインドされています', + '60100021': 'アカウントに QQ がバインドされていません', + '60100022': 'WeChat ID は既に他のユーザーにバインドされています', + '60100023': 'アカウントに WeChat がバインドされていません', '60100024': 'ユーザーのメール認証コードが存在しないか、有効期限が切れています', - '60100300': 'アカウントは退会処理中です', - '60100301': 'アカウントは利用制限またはログイン制限されています', + '60100300': 'アカウントは削除処理中です', + '60100301': 'アカウントはログイン禁止または制限されています', '60200001': 'ロールが存在しません', - '60200002': 'ロール名は必須です', - '60200003': 'ロールは利用制限またはログイン制限されています', - '60300001': 'サーバーエリアが既に存在します', - '60300002': 'サーバーエリアが存在しません', + '60200002': 'ロール名は空にできません', + '60200003': 'ロールはログイン禁止または制限されています', + '60300001': 'ゲームエリアは既に存在します', + '60300002': 'ゲームエリアが存在しません', '60300003': '現在の状態では登録できません', - '60300004': 'このサーバーエリアは満員です', + '60300004': 'このゲームエリアは満員です', '60300005': '現在の状態ではログインできません', '60300006': '現在の状態では購入できません', - '60400001': 'アーカイブ同期の競合が発生しました。最新のアーカイブをダウンロードしてから再試行してください', + '60400001': 'アーカイブ同期が競合しました。最新のアーカイブをダウンロードしてから再試行してください', + '60500002': 'データベース接続が利用できないため、ホーム指標を取得できません', '60600001': '開設パラメーターが無効です', '60600002': 'テンプレートサーバーが見つかりません', '60600003': 'サーバー番号が使用中か、再試行のパラメーターが異なります', @@ -164,14 +154,19 @@ export default { '60700009': '統合呼び出しに失敗しました。確認して再度予行してください', '60700010': '統合計画は取消できません', '70100001': '商品が存在しません', - '70300001': '引換コードの有効期限が切れています', - '70300002': '引換コードの利用回数を使い切りました', - '70300003': '引換コードは未アクティブ化です', - '70300004': '引換コードは既に使用済みです', - '70300005': '引換コードが存在しません', - '70300006': '引換コードの呼び出しエラーです', - '70300007': 'この引換コードグループのロールごとの利用回数を使い切りました', - '70400001': 'この決済チャネルはサポートされていません', + '70100002': 'コールバック注文が存在しません', + '70100003': '支払い金額が注文と一致しません', + '70300001': '引き換えコードの有効期限が切れています', + '70300002': '引き換えコードの利用回数を使い切りました', + '70300003': '引き換えコードが未アクティブ化です', + '70300004': '引き換えコードは既に使用されました', + '70300005': '引き換えコードが存在しません', + '70300006': '引き換えコードの呼び出しエラーです', + '70300007': 'この引き換えコードグループのロールごとの利用回数を使い切りました', + '70400001': 'この支払いチャネルはサポートされていません', + '70400002': 'この支払いチャネルは加盟店からの返金開始をサポートしていません', + '70400003': '返金に失敗しました:チャネルの支払い設定がありません', + '70400004': '支払いチャネルの返金に失敗しました', }, }, }; diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ko.ts index 50da28a4..8fb13880 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/ko.ts @@ -1,90 +1,79 @@ export default { errors: { codes: { - '10000001': '내부 오류가 발생했습니다', + '10000001': '내부 오류입니다', + '10000002': '플랫폼 시스템 메일 테스트 전송에 실패했습니다', '20000001': '찾을 수 없습니다', '20000002': '매개변수 검증에 실패했습니다', '20000003': '레코드가 존재하지 않습니다', '20000004': '데이터가 이미 존재합니다', - '20000005': '데이터가 다른 사용자에 의해 수정되었습니다. 새로고침 후 다시 시도하세요', - '20100001': '인증이 유효하지 않습니다', + '20000005': '데이터가 다른 사용자에 의해 수정되었습니다. 새로 고침 후 다시 시도하세요', + '20100001': '권한이 유효하지 않습니다', '20100002': '토큰이 유효하지 않습니다', '20100003': '토큰이 만료되었습니다', '20100004': '권한이 없습니다', '20100005': '서명 검증에 실패했습니다', - '20200001': '열거형 타입이 아닙니다', + '20200001': '열거형이 아닙니다', '30000001': '인증 코드가 올바르지 않습니다', '30000002': '계정이 존재하지 않습니다', - '30000003': '잘못된 조작입니다. 자기 자신은 삭제할 수 없습니다', + '30000003': '잘못된 조작입니다. 자기 자신을 삭제할 수 없습니다', '30000004': '계정이 이미 존재합니다', - '30000005': '기존 비밀번호가 올바르지 않습니다', + '30000005': '이전 비밀번호가 올바르지 않습니다', '30000006': '잘못된 조작입니다. 로그인되어 있지 않습니다', - '30000007': '최고 관리자는 삭제할 수 없습니다', - '30000008': '최고 관리자 상태는 변경할 수 없습니다', + '30000007': '슈퍼 관리자를 삭제할 수 없습니다', + '30000008': '슈퍼 관리자 상태를 변경할 수 없습니다', '30000009': '권한이 없습니다', '30000010': '계정이 동결되었습니다', - '30000011': '최고 관리자에게 역할을 할당할 수 없습니다', - '30000017': '플랫폼 관리자 비밀번호가 초기화되지 않았습니다. 먼저 초기화를 완료해 주세요', - '30000018': '플랫폼 관리자 비밀번호가 이미 초기화되었습니다. 반복 설정은 금지됩니다', - '30000019': '입력한 두 비밀번호가 일치하지 않습니다', - '30000020': '작업이 너무 빈번합니다. 잠시 후 다시 시도해 주세요', - '30000021': '오늘 작업 횟수 상한에 도달했습니다', - '30100001': '시스템 관리자 역할은 삭제할 수 없습니다', + '30000011': '슈퍼 관리자에게 역할을 할당할 수 없습니다', + '30000012': '이메일 셀프 서비스 등록이 비활성화되어 있습니다', + '30000013': '인증 코드가 올바르지 않거나 만료되었습니다', + '30000014': '인증 코드 전송이 너무 잦습니다. 잠시 후 다시 시도하세요', + '30000015': '오늘 인증 코드 전송 횟수 한도에 도달했습니다', + '30000016': '메일 전송에 실패했습니다. 잠시 후 다시 시도하세요', + '30000017': '플랫폼 관리자 비밀번호가 초기화되지 않았습니다. 먼저 초기 설정을 완료하세요', + '30000018': '플랫폼 관리자 비밀번호가 이미 초기화되었습니다. 중복 설정할 수 없습니다', + '30000019': '두 번 입력한 비밀번호가 일치하지 않습니다', + '30000020': '조작이 너무 잦습니다. 잠시 후 다시 시도하세요', + '30000021': '오늘 조작 횟수 한도에 도달했습니다', + '30100001': '시스템 관리자 역할을 삭제할 수 없습니다', '30100002': '메뉴가 이미 존재합니다', '30100003': '권한 식별자가 비어 있습니다', - '30100004': '노드와 상위 노드가 같을 수 없습니다', - '30100005': '경로 이름이 중복됩니다', - '30200001': '사전 타입이 존재하지 않습니다', - '30200002': '사전 타입이 이미 존재합니다(이름 또는 코드 중복)', + '30100004': '노드가 자기 자신의 부모가 될 수 없습니다', + '30100005': '라우트 이름이 중복됩니다', + '30200001': '사전 유형이 존재하지 않습니다', + '30200002': '사전 유형이 이미 존재합니다(이름 또는 코드 중복)', '30200003': '사전 값이 이미 존재합니다(이름 또는 코드 중복)', '30200004': '사전 값이 존재하지 않습니다', - '30500001': '같은 이름 또는 같은 코드의 매개변수 설정이 이미 존재합니다', - '30500002': '시스템 매개변수는 삭제할 수 없습니다', - '30600001': '기본 테넌트는 삭제할 수 없습니다', - '30600002': '같은 이름의 테넌트가 이미 존재합니다', - '30600003': '같은 이름의 테넌트 관리자가 이미 존재합니다', - '30600004': '기본 테넌트 상태는 변경할 수 없습니다', - '30600005': '이 유형의 데이터베이스는 생성할 수 없습니다', - '30600006': '테넌트가 비활성화되었습니다', - '30600007': '일반 테넌트는 ID 격리를 사용할 수 없습니다', - '30600008': '테넌트 데이터베이스가 이미 생성되어 중복 생성할 수 없습니다', - '30600009': '테넌트가 만료되었습니다', - '30700001': '상위 조직이 존재하지 않습니다', - '30700002': '현재 조직 ID는 상위 조직 ID와 같을 수 없습니다', - '30700003': '같은 코드 또는 이름의 운영 조직이 이미 존재합니다', - '30700004': '조직을 조작할 권한이 없습니다', - '30700005': '이 조직에 사용자가 있어 삭제할 수 없습니다', - '30700006': '소속 조직에 사용자가 있어 삭제할 수 없습니다', - '30700007': '하위 조직에 사용자가 있어 삭제할 수 없습니다', - '30700008': '테넌트 기본 조직은 삭제할 수 없습니다', - '30700009': '루트 조직 추가는 금지되어 있습니다', - '30900001': '같은 이름 또는 같은 코드의 직책이 이미 존재합니다', - '30900002': '이 직책에 사용자가 있어 삭제할 수 없습니다', - '30900003': '이 직책을 수정할 권한이 없습니다', - '30900004': '직책이 존재하지 않습니다', + '30500001': '같은 이름 또는 코드의 매개변수 설정이 이미 존재합니다', + '30500002': '시스템 매개변수를 삭제할 수 없습니다', '31000001': '파일이 존재하지 않습니다', '31000002': '허용되지 않는 파일 형식입니다', '31000003': '파일 크기가 허용 한도를 초과했습니다', '31000004': '파일 확장자가 올바르지 않습니다', - '31100001': '스크립트 코드는 필수입니다', - '31100002': '스크립트 코드의 작업 클래스에는 [JobDetail] 특성을 정의해야 합니다', - '31100003': '작업 ID는 스크립트 코드의 작업 클래스 [JobDetail(\'jobId\')]와 일치해야 합니다', - '31100004': '작업 ID는 변경할 수 없습니다', + '31100001': '스크립트 코드는 비워둘 수 없습니다', + '31100002': '스크립트의 작업 클래스에는 [JobDetail] 특성을 정의해야 합니다', + '31100003': '작업 ID는 스크립트의 [JobDetail(\'jobId\')]와 일치해야 합니다', + '31100004': '작업 ID를 변경할 수 없습니다', '31100005': '작업 실행에 실패했습니다', '31200001': '데이터 열을 추가하세요', - '31200002': '같은 필드 이름 추가는 허용되지 않습니다', + '31200002': '동일한 필드 이름을 추가할 수 없습니다', '31300001': '신원 식별자가 이미 존재합니다', - '31300002': '앱이 존재하지 않거나 현재 테넌트에 속하지 않습니다', - '31300003': '바인딩된 사용자가 존재하지 않거나 현재 테넌트에 속하지 않습니다', + '31300003': '바인딩된 사용자가 존재하지 않습니다', '31300004': '자격 증명이 존재하지 않거나 현재 앱에 속하지 않습니다', '31300005': '자격 증명이 취소되어 활성화할 수 없습니다', - '31300006': '스코프가 비어 있거나 형식이 유효하지 않습니다', + '31300006': '범위가 비어 있거나 유효하지 않습니다', '31400001': '메일 캠페인이 게시되어 본문 필드를 수정할 수 없습니다', '31400002': '메일 캠페인이 이미 회수되었습니다', - '31400003': '메일 기록이 존재하지 않습니다', + '31400003': '메일 캠페인이 존재하지 않습니다', '31400004': '메일 캠페인 매개변수 검증에 실패했습니다', '31400005': '현재 메일 캠페인 상태에서는 이 작업을 수행할 수 없습니다', - '31400006': '메일 캠페인 게시 중 서버 호출에 실패했습니다', + '31400006': '메일 캠페인 게시의 서버 호출에 실패했습니다', + '31700001': '처벌이 활성 상태가 아니어 Online 런타임과 연동할 수 없습니다', + '31700002': '이 처벌 동작에 대응하는 Online 연동 명령이 없습니다', + '31700003': '앱 아래에 연동 가능한 게임 영역이 없습니다', + '31800001': '동일 패키지의 광고 플랫폼 콜백 설정이 이미 존재합니다', + '31800002': '패키지 Id는 양수여야 합니다', + '31800003': '패키지가 존재하지 않거나 활성화되어 있지 않습니다', '32000001': 'Online 시스템 내부 오류입니다', '32000002': 'Online 네트워크 시간이 초과되었습니다', '32000003': 'Online 네트워크 오류가 발생했습니다', @@ -110,40 +99,41 @@ export default { '32700002': 'Online 의존 서비스를 일시적으로 사용할 수 없습니다', '60100001': '계정 또는 비밀번호가 올바르지 않습니다', '60100002': '계정이 이미 존재합니다', - '60100003': '계정을 찾을 수 없습니다', + '60100003': '계정이 존재하지 않습니다', '60100004': '계정이 비활성화되었습니다', - '60100005': '계정에 Google ID가 연동되어 있지 않습니다', - '60100006': 'Google ID가 이미 다른 사용자에게 연동되어 있습니다', + '60100005': '계정에 Google ID가 바인딩되어 있지 않습니다', + '60100006': 'Google ID가 이미 다른 사용자에게 바인딩되어 있습니다', '60100007': '이메일 계정 또는 비밀번호가 올바르지 않습니다', '60100008': '이메일이 이미 존재합니다', - '60100009': '계정에 Apple ID가 연동되어 있지 않습니다', - '60100010': '계정에 Facebook ID가 연동되어 있지 않습니다', - '60100011': '계정에 Twitter ID가 연동되어 있지 않습니다', - '60100012': '계정에 Discord ID가 연동되어 있지 않습니다', - '60100013': '계정 연동 해제 대상을 찾을 수 없습니다', - '60100014': '이메일이 이미 다른 사용자에게 연동되어 있습니다', - '60100015': '이메일 연동 해제 대상을 찾을 수 없습니다', - '60100016': '계정에 이메일이 연동되어 있지 않습니다', - '60100017': 'Apple ID가 이미 다른 사용자에게 연동되어 있습니다', - '60100018': 'Facebook ID가 이미 다른 사용자에게 연동되어 있습니다', - '60100019': '계정에 Facebook이 연동되어 있지 않습니다', - '60100020': 'QQ ID가 이미 다른 사용자에게 연동되어 있습니다', - '60100021': '계정에 QQ가 연동되어 있지 않습니다', - '60100022': 'WeChat ID가 이미 다른 사용자에게 연동되어 있습니다', - '60100023': '계정에 WeChat가 연동되어 있지 않습니다', - '60100024': '사용자 메일 인증 코드가 존재하지 않거나 만료되었습니다', - '60100300': '계정이 탈퇴 처리 중입니다', - '60100301': '계정이 이용 제한 또는 로그인 제한되었습니다', + '60100009': '계정에 Apple ID가 바인딩되어 있지 않습니다', + '60100010': '계정에 Facebook ID가 바인딩되어 있지 않습니다', + '60100011': '계정에 Twitter ID가 바인딩되어 있지 않습니다', + '60100012': '계정에 Discord ID가 바인딩되어 있지 않습니다', + '60100013': '계정 바인딩 해제 대상을 찾을 수 없습니다', + '60100014': '이메일이 이미 다른 사용자에게 바인딩되어 있습니다', + '60100015': '이메일 바인딩 해제 대상을 찾을 수 없습니다', + '60100016': '계정에 이메일이 바인딩되어 있지 않습니다', + '60100017': 'Apple ID가 이미 다른 사용자에게 바인딩되어 있습니다', + '60100018': 'Facebook ID가 이미 다른 사용자에게 바인딩되어 있습니다', + '60100019': '계정에 Facebook가 바인딩되어 있지 않습니다', + '60100020': 'QQ ID가 이미 다른 사용자에게 바인딩되어 있습니다', + '60100021': '계정에 QQ가 바인딩되어 있지 않습니다', + '60100022': 'WeChat ID가 이미 다른 사용자에게 바인딩되어 있습니다', + '60100023': '계정에 WeChat가 바인딩되어 있지 않습니다', + '60100024': '사용자 메일 인증 코드가 없거나 만료되었습니다', + '60100300': '계정이 삭제 처리 중입니다', + '60100301': '계정이 차단되거나 로그인이 제한되었습니다', '60200001': '역할이 존재하지 않습니다', - '60200002': '역할 이름은 필수입니다', - '60200003': '역할이 이용 제한 또는 로그인 제한되었습니다', - '60300001': '서버 영역이 이미 존재합니다', - '60300002': '서버 영역이 존재하지 않습니다', + '60200002': '역할 이름은 비워둘 수 없습니다', + '60200003': '역할이 차단되거나 로그인이 제한되었습니다', + '60300001': '게임 영역이 이미 존재합니다', + '60300002': '게임 영역이 존재하지 않습니다', '60300003': '현재 상태에서는 등록할 수 없습니다', - '60300004': '이 서버 영역은 만원입니다', + '60300004': '현재 게임 영역이 가득 찼습니다', '60300005': '현재 상태에서는 로그인할 수 없습니다', '60300006': '현재 상태에서는 구매할 수 없습니다', - '60400001': '아카이브 동기화 충돌이 발생했습니다. 최신 아카이브를 다운로드한 후 다시 시도하세요', + '60400001': '아카이브 동기화 충돌. 최신 아카이브를 내려받은 후 다시 시도하세요', + '60500002': '데이터베이스 연결을 사용할 수 없어 홈 지표를 읽을 수 없습니다', '60600001': '서버 개설 매개변수가 유효하지 않습니다', '60600002': '템플릿 서버를 찾을 수 없습니다', '60600003': '서버 번호가 사용 중이거나 재시도 매개변수가 다릅니다', @@ -164,14 +154,19 @@ export default { '60700009': '통합 호출에 실패했습니다. 확인 후 다시 모의 실행하세요', '60700010': '통합 계획을 취소할 수 없습니다', '70100001': '상품이 존재하지 않습니다', + '70100002': '콜백 주문이 존재하지 않습니다', + '70100003': '결제 금액이 주문과 일치하지 않습니다', '70300001': '교환 코드가 만료되었습니다', - '70300002': '교환 코드 사용 횟수가 소진되었습니다', + '70300002': '교환 코드 사용 횟수를 모두 소진했습니다', '70300003': '교환 코드가 활성화되지 않았습니다', '70300004': '교환 코드가 이미 사용되었습니다', '70300005': '교환 코드가 존재하지 않습니다', '70300006': '교환 코드 호출 오류입니다', - '70300007': '이 교환 코드 그룹의 역할별 사용 횟수가 소진되었습니다', + '70300007': '이 교환 코드 그룹의 역할별 사용 횟수를 모두 소진했습니다', '70400001': '지원되지 않는 결제 채널입니다', + '70400002': '이 결제 채널은 판매자가 시작하는 환불을 지원하지 않습니다', + '70400003': '환불 실패: 채널 결제 구성이 누락되었습니다', + '70400004': '결제 채널 환불이 실패했습니다', }, }, }; 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..e78d48ab 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 @@ -2,6 +2,7 @@ export default { errors: { codes: { '10000001': '内部错误', + '10000002': '平台系统邮件测试发送失败', '20000001': '没有找到', '20000002': '参数校验失败', '20000003': '记录不存在', @@ -24,6 +25,11 @@ export default { '30000009': '没有权限', '30000010': '账号已冻结', '30000011': '禁止为超级管理员分配角色', + '30000012': '邮箱自助注册未开启', + '30000013': '验证码错误或已过期', + '30000014': '验证码发送太频繁,请稍后再试', + '30000015': '今日验证码发送次数已达上限', + '30000016': '邮件发送失败,请稍后重试', '30000017': '平台管理员密码尚未初始化,请先完成初始化设置', '30000018': '平台管理员密码已初始化,禁止重复设置', '30000019': '两次输入的密码不一致', @@ -40,28 +46,6 @@ export default { '30200004': '字典值不存在', '30500001': '已存在同名或同编码参数配置', '30500002': '禁止删除系统参数', - '30600001': '禁止删除默认租户', - '30600002': '已存在同名的租户', - '30600003': '已存在同名的租户管理员', - '30600004': '默认租户状态禁止修改', - '30600005': '禁止创建此类型的数据库', - '30600006': '租户已禁用', - '30600007': '普通租户禁止使用ID隔离', - '30600008': '租户数据库已创建,禁止重复创建', - '30600009': '租户已过期', - '30700001': '上级组织不存在', - '30700002': '当前组织Id不能与上级组织Id相同', - '30700003': '已有相同运营组织,编码或名称相同', - '30700004': '没有权限操作组织', - '30700005': '该组织下有用户禁止删除', - '30700006': '附属组织下有用户禁止删除', - '30700007': '下级组织下有用户禁止删除', - '30700008': '租户默认组织禁止删除', - '30700009': '禁止增加根节点组织', - '30900001': '已存在同名或同编码职位', - '30900002': '该职位下有用户禁止删除', - '30900003': '无权修改本职位', - '30900004': '职位不存在', '31000001': '文件不存在', '31000002': '不允许的文件类型', '31000003': '文件超过允许大小', @@ -74,8 +58,7 @@ export default { '31200001': '请添加数据列', '31200002': '不允许添加相同字段名', '31300001': '身份标识已存在', - '31300002': '应用不存在或不属于当前租户', - '31300003': '绑定用户不存在或不属于当前租户', + '31300003': '绑定用户不存在', '31300004': '凭证不存在或不属于当前应用', '31300005': '凭证已撤销,不可启用', '31300006': '接口范围为空或格式无效', @@ -85,6 +68,12 @@ export default { '31400004': '邮件参数校验失败', '31400005': '邮件当前状态不允许该操作', '31400006': '邮件发布调用服务端失败', + '31700001': '处罚不是生效状态,无法联动 Online 运行时', + '31700002': '该处罚动作无对应 Online 联动命令', + '31700003': '应用下没有可联动的区服', + '31800001': '同一分包下的广告平台回调配置已存在', + '31800002': '分包 Id 必须为正数', + '31800003': '分包不存在或未启用', '32000001': 'Online 系统内部错误', '32000002': 'Online 网络超时', '32000003': 'Online 网络错误', @@ -144,6 +133,7 @@ export default { '60300005': '当前状态不能登录', '60300006': '当前状态不能购买', '60400001': '存档同步冲突,请先下载最新存档后重试', + '60500002': '数据库连接不可用,无法读取首页读数', '60600001': '开服参数无效', '60600002': '模板区服不存在', '60600003': '区服编号已占用或重试参数不一致', @@ -164,6 +154,8 @@ export default { '60700009': '合服调用失败,请核查后重新预演', '60700010': '合服计划不允许取消', '70100001': '商品不存在', + '70100002': '回调订单不存在', + '70100003': '支付金额与订单不符', '70300001': '兑换码已过期', '70300002': '兑换码次数已用完', '70300003': '兑换码未激活', @@ -172,6 +164,9 @@ export default { '70300006': '兑换码调用错误', '70300007': '兑换码分组每角色次数已用完', '70400001': '支付渠道不支持', + '70400002': '该支付渠道不支持商家主动发起退款', + '70400003': '退款失败:渠道支付配置缺失', + '70400004': '渠道退款失败', }, }, }; diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-tw.ts index 6d61570b..0272ac02 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/errors/zh-tw.ts @@ -2,6 +2,7 @@ export default { errors: { codes: { '10000001': '內部錯誤', + '10000002': '平台系統郵件測試發送失敗', '20000001': '沒有找到', '20000002': '參數校驗失敗', '20000003': '記錄不存在', @@ -14,16 +15,21 @@ export default { '20100005': '簽名驗證失敗', '20200001': '不是枚舉類型', '30000001': '驗證碼錯誤', - '30000002': '帳號不存在', + '30000002': '賬號不存在', '30000003': '非法操作,禁止刪除自己', - '30000004': '帳號已存在', + '30000004': '賬號已存在', '30000005': '舊密碼輸入錯誤', '30000006': '非法操作,未登錄', '30000007': '禁止刪除超級管理員', '30000008': '禁止修改超級管理員狀態', '30000009': '沒有權限', - '30000010': '帳號已凍結', + '30000010': '賬號已凍結', '30000011': '禁止為超級管理員分配角色', + '30000012': '郵箱自助註冊未開啟', + '30000013': '驗證碼錯誤或已過期', + '30000014': '驗證碼發送太頻繁,請稍後再試', + '30000015': '今日驗證碼發送次數已達上限', + '30000016': '郵件發送失敗,請稍後重試', '30000017': '平台管理員密碼尚未初始化,請先完成初始化設置', '30000018': '平台管理員密碼已初始化,禁止重複設置', '30000019': '兩次輸入的密碼不一致', @@ -40,51 +46,34 @@ export default { '30200004': '字典值不存在', '30500001': '已存在同名或同編碼參數配置', '30500002': '禁止刪除系統參數', - '30600001': '禁止刪除預設租戶', - '30600002': '已存在同名的租戶', - '30600003': '已存在同名的租戶管理員', - '30600004': '預設租戶狀態禁止修改', - '30600005': '禁止創建此類型的數據庫', - '30600006': '租戶已停用', - '30600007': '普通租戶禁止使用ID隔離', - '30600008': '租戶數據庫已創建,禁止重複創建', - '30600009': '租戶已過期', - '30700001': '上級組織不存在', - '30700002': '當前組織Id不能與上級組織Id相同', - '30700003': '已有相同運營組織,編碼或名稱相同', - '30700004': '沒有權限操作組織', - '30700005': '該組織下有用戶禁止刪除', - '30700006': '附屬組織下有用戶禁止刪除', - '30700007': '下級組織下有用戶禁止刪除', - '30700008': '租戶預設組織禁止刪除', - '30700009': '禁止增加根節點組織', - '30900001': '已存在同名或同編碼職位', - '30900002': '該職位下有用戶禁止刪除', - '30900003': '無權修改本職位', - '30900004': '職位不存在', - '31000001': '檔案不存在', - '31000002': '不允許的檔案類型', - '31000003': '檔案超過允許大小', - '31000004': '檔案副檔名錯誤', + '31000001': '文件不存在', + '31000002': '不允許的文件類型', + '31000003': '文件超過允許大小', + '31000004': '文件後綴錯誤', '31100001': '腳本代碼不能為空', '31100002': '腳本代碼中的作業類,需要定義 [JobDetail] 特性', '31100003': '作業編號需要與腳本代碼中的作業類 [JobDetail(\'jobId\')] 一致', '31100004': '禁止修改作業編號', '31100005': '執行作業失敗', '31200001': '請添加數據列', - '31200002': '不允許添加相同字段名', - '31300001': '身分標識已存在', - '31300002': '應用不存在或不屬於當前租戶', - '31300003': '綁定用戶不存在或不屬於當前租戶', + '31200002': '不允許添加相同欄位名', + '31300001': '身份標識已存在', + '31300003': '綁定用戶不存在', '31300004': '憑證不存在或不屬於當前應用', '31300005': '憑證已撤銷,不可啟用', - '31300006': '接口範圍為空或格式無效', - '31400001': '郵件已發布,主體字段不可修改', + '31300006': '介面範圍為空或格式無效', + '31400001': '郵件已發佈,主體欄位不可修改', '31400002': '郵件已撤回,不可重複撤回', '31400003': '郵件記錄不存在', '31400004': '郵件參數校驗失敗', '31400005': '郵件當前狀態不允許該操作', - '31400006': '郵件發布調用服務端失敗', + '31400006': '郵件發佈調用服務端失敗', + '31700001': '處罰不是生效狀態,無法聯動 Online 運行時', + '31700002': '該處罰動作無對應 Online 聯動命令', + '31700003': '應用下沒有可聯動的區服', + '31800001': '同一分包下的廣告平台回調配置已存在', + '31800002': '分包 Id 必須為正數', + '31800003': '分包不存在或未啟用', '32000001': 'Online 系統內部錯誤', '32000002': 'Online 網絡超時', '32000003': 'Online 網絡錯誤', @@ -108,32 +97,32 @@ export default { '32600003': 'Online 帳號已被封禁', '32700001': 'Online 服務忙碌,請稍後重試', '32700002': 'Online 依賴服務暫不可用', - '60100001': '帳號或密碼錯誤', - '60100002': '帳號已存在', - '60100003': '帳號不存在', - '60100004': '帳號已被停用', - '60100005': '帳號未綁定Google ID', - '60100006': 'Google ID已被其他用戶綁定', - '60100007': '郵箱的帳號或密碼錯誤', + '60100001': '賬號或密碼錯誤', + '60100002': '賬號已存在', + '60100003': '賬號不存在', + '60100004': '賬號已被禁用', + '60100005': '賬號未綁定谷歌Id', + '60100006': '谷歌Id已被其他用戶綁定', + '60100007': '郵箱的賬號或密碼錯誤', '60100008': '郵箱已存在', - '60100009': '帳號未綁定Apple ID', - '60100010': '帳號未綁定Facebook ID', - '60100011': '帳號未綁定Twitter ID', - '60100012': '帳號未綁定Discord ID', - '60100013': '帳號解綁找不到', + '60100009': '賬號未綁定AppleId', + '60100010': '賬號未綁定FacebookId', + '60100011': '賬號未綁定TwitterId', + '60100012': '賬號未綁定DiscordId', + '60100013': '賬號解綁找不到', '60100014': '郵箱已被其他用戶綁定', '60100015': '郵箱解綁找不到', - '60100016': '帳號未綁定郵箱', - '60100017': 'Apple ID已被其他用戶綁定', - '60100018': 'Facebook ID已被其他用戶綁定', - '60100019': '帳號未綁定Facebook', - '60100020': 'QQ ID已被其他用戶綁定', - '60100021': '帳號未綁定QQ', - '60100022': 'WeChat ID已被其他用戶綁定', - '60100023': '帳號未綁定WeChat', + '60100016': '賬號未綁定郵箱', + '60100017': 'Apple Id已被其他用戶綁定', + '60100018': 'Facebook Id已被其他用戶綁定', + '60100019': '賬號未綁定Facebook', + '60100020': 'QQ Id已被其他用戶綁定', + '60100021': '賬號未綁定QQ', + '60100022': 'WeChat Id已被其他用戶綁定', + '60100023': '賬號未綁定WeChat', '60100024': '用戶郵件驗證碼不存在或已過期', - '60100300': '帳號處於註銷狀態', - '60100301': '帳號已被封禁/限制登錄', + '60100300': '賬號處於註銷狀態', + '60100301': '賬號已被封禁/限制登錄', '60200001': '角色不存在', '60200002': '角色名稱不能為空', '60200003': '角色已被封禁/限制登錄', @@ -144,6 +133,7 @@ export default { '60300005': '當前狀態不能登錄', '60300006': '當前狀態不能購買', '60400001': '存檔同步衝突,請先下載最新存檔後重試', + '60500002': '資料庫連接不可用,無法讀取首頁讀數', '60600001': '開服參數無效', '60600002': '模板區服不存在', '60600003': '區服編號已佔用或重試參數不一致', @@ -164,6 +154,8 @@ export default { '60700009': '合服呼叫失敗,請核查後重新預演', '60700010': '合服計畫不允許取消', '70100001': '商品不存在', + '70100002': '回調訂單不存在', + '70100003': '支付金額與訂單不符', '70300001': '兌換碼已過期', '70300002': '兌換碼次數已用完', '70300003': '兌換碼未激活', @@ -171,7 +163,10 @@ export default { '70300005': '兌換碼不存在', '70300006': '兌換碼調用錯誤', '70300007': '兌換碼分組每角色次數已用完', - '70400001': '支付渠道不支持', + '70400001': '支付渠道不支援', + '70400002': '該支付渠道不支持商家主動發起退款', + '70400003': '退款失敗:渠道支付配置缺失', + '70400004': '支付渠道退款失敗', }, }, }; diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/en.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/en.ts index 7b6ec670..bc433df3 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/en.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/en.ts @@ -33,7 +33,8 @@ export default { subjectNameRequired: 'Subject name is required', scopesRequired: 'Please select at least one scope', - scopePackageReport: 'Package Report (package-report)', + scopePackageBuildReport: 'Package Build Report (PackageBuildReport)', + scopeFeatureSwitchSync: 'Feature Switch Sync (FeatureSwitchSync)', revoke: 'Revoke', enable: 'Enable', disable: 'Disable', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ja.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ja.ts index 978c01a1..369a96ee 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ja.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ja.ts @@ -33,7 +33,8 @@ export default { subjectNameRequired: 'サブジェクト名は必須です', scopesRequired: '少なくとも1つのスコープを選択してください', - scopePackageReport: 'パッケージレポート (package-report)', + scopePackageBuildReport: 'パッケージビルド報告 (PackageBuildReport)', + scopeFeatureSwitchSync: '機能スイッチ同期 (FeatureSwitchSync)', revoke: '失効', enable: '有効化', disable: '無効化', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ko.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ko.ts index b06b8597..a0efa703 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ko.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/ko.ts @@ -33,7 +33,8 @@ export default { subjectNameRequired: '주체 이름은 필수입니다', scopesRequired: '최소한 하나의 스코프를 선택하세요', - scopePackageReport: '패키지 리포트 (package-report)', + scopePackageBuildReport: '패키지 빌드 리포트 (PackageBuildReport)', + scopeFeatureSwitchSync: '기능 스위치 동기화 (FeatureSwitchSync)', revoke: '취소', enable: '활성화', disable: '비활성화', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-cn.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-cn.ts index 42cd180c..4b0a86fa 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-cn.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-cn.ts @@ -38,7 +38,8 @@ export default { scopesRequired: '请至少选择一个接口范围', // Scopes 选项 - scopePackageReport: '分包上报 (package-report)', + scopePackageBuildReport: '分包上报 (PackageBuildReport)', + scopeFeatureSwitchSync: '功能开关服务器同步 (FeatureSwitchSync)', revoke: '吊销', enable: '启用', disable: '禁用', diff --git a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-tw.ts b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-tw.ts index 0ba89045..d85c4108 100644 --- a/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-tw.ts +++ b/GameFrameX.Admin.Unified.Vue/src/i18n/pages/gameAppOpenAccess/zh-tw.ts @@ -33,7 +33,8 @@ export default { subjectNameRequired: '責任主體不能為空', scopesRequired: '請至少選擇一個接口範圍', - scopePackageReport: '分包上報 (package-report)', + scopePackageBuildReport: '分包上報 (PackageBuildReport)', + scopeFeatureSwitchSync: '功能開關伺服器同步 (FeatureSwitchSync)', revoke: '吊銷', enable: '啟用', disable: '禁用', 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..9a734c9d 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', @@ -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', @@ -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..db392b1e 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: 'スコープ', @@ -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: 'サーバーイベント', @@ -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..a25c72ac 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: '스코프', @@ -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: '서버 이벤트', @@ -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..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 @@ -42,7 +42,7 @@ export default { // Current application context (game business pages) - // Config scope (tenant default / app override) + // 配置作用域(默认 / 覆盖) configScope: { gameDefault: '默认配置', scope: '作用域', @@ -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: '特定服务器举行的事件或活动信息', @@ -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..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 @@ -42,7 +42,7 @@ export default { // Current application context (game business pages) - // Config scope (tenant default / app override) + // 配置作用域(預設 / 覆蓋) configScope: { gameDefault: '預設設定', scope: '作用域', @@ -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: '特定伺服器舉行的事件或活動信息', @@ -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/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/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/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/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/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/utils/channelDefinition.ts b/GameFrameX.Admin.Unified.Vue/src/utils/channelDefinition.ts index 0466281a..c4491f7a 100644 --- a/GameFrameX.Admin.Unified.Vue/src/utils/channelDefinition.ts +++ b/GameFrameX.Admin.Unified.Vue/src/utils/channelDefinition.ts @@ -1,4 +1,4 @@ -// 租户渠道定义下拉映射:available 接口返回的渠道列表 → { label, value } 选项。 +// 渠道定义下拉映射:available 接口返回的渠道列表 → { label, value } 选项。 // 025cf914 手写 API 层回迁 gen:api 时,原 src/api/channelDefinition.ts 内的该工具被删而引用未迁,此处恢复。 export const mapAvailableChannelDefinitions = (channels: any[] = [], valueKey: 'id' | 'code' = 'code') => channels.map((channel: any) => ({ diff --git a/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.test.ts b/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.test.ts index a9a07c07..01b6edbc 100644 --- a/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.test.ts +++ b/GameFrameX.Admin.Unified.Vue/src/utils/fileUrl.test.ts @@ -17,7 +17,7 @@ afterEach(() => { window.__env__ = originalEnv; }); -test('resolves tenant avatar object key (no leading slash) against the API origin', () => { +test('resolves user avatar object key (no leading slash) against the API origin', () => { expect(resolveBackendFileUrl('Upload/Avatar/1300000000111.png')).toBe( 'http://127.0.0.1:20802/Upload/Avatar/1300000000111.png' ); 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 87% 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 index f19f71cd..f64c0f94 100644 --- a/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/tenantAdvertisementCallbackConfigEntity/component/EditDialog.vue +++ b/GameFrameX.Admin.Unified.Vue/src/views/clientDelivery/advertisementCallbackConfigEntity/component/EditDialog.vue @@ -30,6 +30,13 @@ {{ error }} + 分包 + +