feat: 后台手动新增租户并直接入驻接口
This commit is contained in:
@@ -35,6 +35,22 @@ public sealed class TenantsController(IMediator mediator) : BaseApiController
|
||||
return ApiResponse<TenantDto>.Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后台手动新增租户并直接入驻(创建租户 + 认证 + 订阅 + 管理员账号)。
|
||||
/// </summary>
|
||||
/// <returns>新增后的租户详情。</returns>
|
||||
[HttpPost("manual")]
|
||||
[PermissionAuthorize("tenant:create")]
|
||||
[ProducesResponseType(typeof(ApiResponse<TenantDetailDto>), StatusCodes.Status200OK)]
|
||||
public async Task<ApiResponse<TenantDetailDto>> CreateManually([FromBody] CreateTenantManuallyCommand command, CancellationToken cancellationToken)
|
||||
{
|
||||
// 1. 后台手动新增租户(直接可用)
|
||||
var result = await mediator.Send(command, cancellationToken);
|
||||
|
||||
// 2. 返回创建结果
|
||||
return ApiResponse<TenantDetailDto>.Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询租户。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user