diff --git a/src/Application/TakeoutSaaS.Application/Identity/Commands/BatchIdentityUserOperationCommand.cs b/src/Application/TakeoutSaaS.Application/Identity/Commands/BatchIdentityUserOperationCommand.cs index a627339..827e1ed 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Commands/BatchIdentityUserOperationCommand.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Commands/BatchIdentityUserOperationCommand.cs @@ -10,7 +10,7 @@ namespace TakeoutSaaS.Application.Identity.Commands; public sealed record BatchIdentityUserOperationCommand : IRequest { /// - /// 目标租户 ID(超级管理员可选)。 + /// 目标租户 ID(可选,默认当前登录租户;禁止跨租户操作)。 /// public long? TenantId { get; init; } diff --git a/src/Application/TakeoutSaaS.Application/Identity/Commands/ChangeIdentityUserStatusCommand.cs b/src/Application/TakeoutSaaS.Application/Identity/Commands/ChangeIdentityUserStatusCommand.cs index 3220376..1e6dd30 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Commands/ChangeIdentityUserStatusCommand.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Commands/ChangeIdentityUserStatusCommand.cs @@ -14,7 +14,7 @@ public sealed record ChangeIdentityUserStatusCommand : IRequest public long UserId { get; init; } /// - /// 目标租户 ID(超级管理员可选)。 + /// 目标租户 ID(可选,默认当前登录租户;禁止跨租户操作)。 /// public long? TenantId { get; init; } diff --git a/src/Application/TakeoutSaaS.Application/Identity/Commands/CreateIdentityUserCommand.cs b/src/Application/TakeoutSaaS.Application/Identity/Commands/CreateIdentityUserCommand.cs index c9f7c3d..e528df1 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Commands/CreateIdentityUserCommand.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Commands/CreateIdentityUserCommand.cs @@ -11,7 +11,7 @@ namespace TakeoutSaaS.Application.Identity.Commands; public sealed record CreateIdentityUserCommand : IRequest { /// - /// 目标租户 ID(超级管理员可选)。 + /// 目标租户 ID(可选,默认当前登录租户;禁止跨租户操作)。 /// public long? TenantId { get; init; } diff --git a/src/Application/TakeoutSaaS.Application/Identity/Commands/DeleteIdentityUserCommand.cs b/src/Application/TakeoutSaaS.Application/Identity/Commands/DeleteIdentityUserCommand.cs index 5fc1ce5..bf056f6 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Commands/DeleteIdentityUserCommand.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Commands/DeleteIdentityUserCommand.cs @@ -13,7 +13,7 @@ public sealed record DeleteIdentityUserCommand : IRequest public long UserId { get; init; } /// - /// 目标租户 ID(超级管理员可选)。 + /// 目标租户 ID(可选,默认当前登录租户;禁止跨租户操作)。 /// public long? TenantId { get; init; } } diff --git a/src/Application/TakeoutSaaS.Application/Identity/Commands/ResetIdentityUserPasswordCommand.cs b/src/Application/TakeoutSaaS.Application/Identity/Commands/ResetIdentityUserPasswordCommand.cs index 124f1e6..9cda914 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Commands/ResetIdentityUserPasswordCommand.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Commands/ResetIdentityUserPasswordCommand.cs @@ -14,7 +14,7 @@ public sealed record ResetIdentityUserPasswordCommand : IRequest - /// 目标租户 ID(超级管理员可选)。 + /// 目标租户 ID(可选,默认当前登录租户;禁止跨租户操作)。 /// public long? TenantId { get; init; } } diff --git a/src/Application/TakeoutSaaS.Application/Identity/Commands/RestoreIdentityUserCommand.cs b/src/Application/TakeoutSaaS.Application/Identity/Commands/RestoreIdentityUserCommand.cs index 6d6515a..c28ae28 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Commands/RestoreIdentityUserCommand.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Commands/RestoreIdentityUserCommand.cs @@ -13,7 +13,7 @@ public sealed record RestoreIdentityUserCommand : IRequest public long UserId { get; init; } /// - /// 目标租户 ID(超级管理员可选)。 + /// 目标租户 ID(可选,默认当前登录租户;禁止跨租户操作)。 /// public long? TenantId { get; init; } } diff --git a/src/Application/TakeoutSaaS.Application/Identity/Commands/UpdateIdentityUserCommand.cs b/src/Application/TakeoutSaaS.Application/Identity/Commands/UpdateIdentityUserCommand.cs index 99025bd..9fd7734 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Commands/UpdateIdentityUserCommand.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Commands/UpdateIdentityUserCommand.cs @@ -15,7 +15,7 @@ public sealed record UpdateIdentityUserCommand : IRequest public long UserId { get; init; } /// - /// 目标租户 ID(超级管理员可选)。 + /// 目标租户 ID(可选,默认当前登录租户;禁止跨租户操作)。 /// public long? TenantId { get; init; } diff --git a/src/Application/TakeoutSaaS.Application/Identity/Queries/SearchIdentityUsersQuery.cs b/src/Application/TakeoutSaaS.Application/Identity/Queries/SearchIdentityUsersQuery.cs index 6067610..9ab3288 100644 --- a/src/Application/TakeoutSaaS.Application/Identity/Queries/SearchIdentityUsersQuery.cs +++ b/src/Application/TakeoutSaaS.Application/Identity/Queries/SearchIdentityUsersQuery.cs @@ -11,7 +11,7 @@ namespace TakeoutSaaS.Application.Identity.Queries; public sealed record SearchIdentityUsersQuery : IRequest> { /// - /// 租户 ID(超级管理员可选)。 + /// 租户 ID(可选,默认当前登录租户;禁止跨租户查询)。 /// public long? TenantId { get; init; } diff --git a/src/Infrastructure/TakeoutSaaS.Infrastructure/Dictionary/Persistence/Seeds/InitialDictionaries.sql b/src/Infrastructure/TakeoutSaaS.Infrastructure/Dictionary/Persistence/Seeds/InitialDictionaries.sql index 10dd21d..a8f6d33 100644 --- a/src/Infrastructure/TakeoutSaaS.Infrastructure/Dictionary/Persistence/Seeds/InitialDictionaries.sql +++ b/src/Infrastructure/TakeoutSaaS.Infrastructure/Dictionary/Persistence/Seeds/InitialDictionaries.sql @@ -73,12 +73,11 @@ ON CONFLICT ("TenantId", "GroupId", "Key") DO NOTHING; -- ======================================== INSERT INTO dictionary_groups ("Id", "TenantId", "Code", "Name", "Scope", "AllowOverride", "IsEnabled", "Description", "CreatedAt", "CreatedBy") VALUES - (1005, 0, 'user_role', '用户角色', 1, false, true, '系统用户角色类型 (平台级,不可覆盖)', CURRENT_TIMESTAMP, 0) + (1005, 0, 'user_role', '用户角色', 1, false, true, '系统用户角色类型 (系统级,不可覆盖)', CURRENT_TIMESTAMP, 0) ON CONFLICT ("TenantId", "Code") DO NOTHING; INSERT INTO dictionary_items ("Id", "TenantId", "GroupId", "Key", "Value", "IsDefault", "IsEnabled", "SortOrder", "Description", "CreatedAt", "CreatedBy") VALUES - (10051, 0, 1005, 'PLATFORM_ADMIN', '{"zh-CN":"平台管理员","en":"Platform Admin"}', false, true, 10, '平台超级管理员', CURRENT_TIMESTAMP, 0), (10052, 0, 1005, 'TENANT_ADMIN', '{"zh-CN":"租户管理员","en":"Tenant Admin"}', false, true, 20, '租户企业管理员', CURRENT_TIMESTAMP, 0), (10053, 0, 1005, 'TENANT_USER', '{"zh-CN":"租户员工","en":"Tenant User"}', true, true, 30, '租户普通员工', CURRENT_TIMESTAMP, 0), (10054, 0, 1005, 'CUSTOMER', '{"zh-CN":"顾客","en":"Customer"}', false, true, 40, '终端用户/顾客', CURRENT_TIMESTAMP, 0)