27 changed files with 1472 additions and 1000 deletions
@ -0,0 +1,62 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace CompanyName.ProjectName.Settings |
||||
|
{ |
||||
|
public class SettingOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 分组
|
||||
|
/// </summary>
|
||||
|
public string Group { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 分组显示名称
|
||||
|
/// </summary>
|
||||
|
public string GroupDisplayName { get; set; } |
||||
|
|
||||
|
public List<SettingItemOutput> SettingItemOutput { get; set; } |
||||
|
|
||||
|
public SettingOutput() |
||||
|
{ |
||||
|
SettingItemOutput = new List<SettingItemOutput>(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class SettingItemOutput |
||||
|
{ |
||||
|
public SettingItemOutput(string name, string displayName, string value, string type,string description) |
||||
|
{ |
||||
|
Name = name; |
||||
|
DisplayName = displayName; |
||||
|
Value = value; |
||||
|
Type = type ?? "Text"; |
||||
|
Description = description; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 名称
|
||||
|
/// </summary>
|
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 显示名称
|
||||
|
/// </summary>
|
||||
|
public string DisplayName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 描述
|
||||
|
/// </summary>
|
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 值
|
||||
|
/// </summary>
|
||||
|
public string Value { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 前端控件类型
|
||||
|
/// </summary>
|
||||
|
public string Type { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using CompanyName.ProjectName.Extension.Customs.Dtos; |
||||
|
using CompanyName.ProjectName.Tenants.Dtos; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.AspNetCore.Mvc.MultiTenancy; |
||||
|
using Volo.Abp.TenantManagement; |
||||
|
|
||||
|
namespace CompanyName.ProjectName.Tenants |
||||
|
{ |
||||
|
public interface IVoloTenantAppService : IApplicationService |
||||
|
{ |
||||
|
Task<FindTenantResultDto> FindTenantByNameAsync(FindTenantByNameInput input); |
||||
|
|
||||
|
Task<PagedResultDto<TenantDto>> ListAsync(PagingTenantInput input); |
||||
|
|
||||
|
Task<TenantDto> CreateAsync(TenantCreateDto input); |
||||
|
|
||||
|
Task<TenantDto> UpdateAsync(UpdateTenantInput input); |
||||
|
|
||||
|
Task DeleteAsync(IdInput input); |
||||
|
|
||||
|
Task<string> GetDefaultConnectionStringAsync(IdInput input); |
||||
|
|
||||
|
Task UpdateDefaultConnectionStringAsync(UpdateConnectionStringInput input); |
||||
|
|
||||
|
Task DeleteDefaultConnectionStringAsync(IdInput input); |
||||
|
} |
||||
|
} |
||||
@ -1,31 +1,113 @@ |
|||||
using System.Collections.Generic; |
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using EasyAbp.Abp.SettingUi; |
using CompanyName.ProjectName.Localization; |
||||
using EasyAbp.Abp.SettingUi.Authorization; |
using CompanyName.ProjectName.Permissions; |
||||
using EasyAbp.Abp.SettingUi.Dto; |
|
||||
using Microsoft.AspNetCore.Authorization; |
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.Extensions.Localization; |
||||
|
using Volo.Abp.Localization; |
||||
|
using Volo.Abp.SettingManagement; |
||||
|
using Volo.Abp.Settings; |
||||
|
|
||||
namespace CompanyName.ProjectName.Settings |
namespace CompanyName.ProjectName.Settings |
||||
{ |
{ |
||||
[Authorize(Policy = SettingUiPermissions.ShowSettingPage)] |
[Authorize(policy: ProjectNamePermissions.SystemManagement.Setting)] |
||||
public class SettingAppService : ProjectNameAppService, ISettingAppService |
public class SettingAppService : ProjectNameAppService, ISettingAppService |
||||
{ |
{ |
||||
private readonly ISettingUiAppService _settingUiAppService; |
private readonly ISettingDefinitionManager _settingDefinitionManager; |
||||
|
private readonly ISettingManager _settingManager; |
||||
|
private readonly IStringLocalizer<ProjectNameResource> _localizer; |
||||
|
private readonly IStringLocalizerFactory _factory; |
||||
|
|
||||
public SettingAppService(ISettingUiAppService settingUiAppService) |
public SettingAppService( |
||||
|
ISettingDefinitionManager settingDefinitionManager, |
||||
|
ISettingManager settingManager, |
||||
|
IStringLocalizer<ProjectNameResource> localizer, |
||||
|
IStringLocalizerFactory factory) |
||||
{ |
{ |
||||
_settingUiAppService = settingUiAppService; |
_settingDefinitionManager = settingDefinitionManager; |
||||
|
_settingManager = settingManager; |
||||
|
_localizer = localizer; |
||||
|
_factory = factory; |
||||
} |
} |
||||
|
|
||||
|
public async Task<List<SettingOutput>> GetAsync() |
||||
public async Task<List<SettingGroup>> GetAsync() |
|
||||
{ |
{ |
||||
return await _settingUiAppService.GroupSettingDefinitions(); |
var ss = _localizer.GetAllStrings(); |
||||
|
var s = _localizer["Setting:Group:System"]; |
||||
|
var s2 = _localizer["Volo.Abp.Identity:PasswordRequiresDigit"]; |
||||
|
var allSettings = _settingDefinitionManager.GetAll().ToList(); |
||||
|
var settings = allSettings |
||||
|
.Where(e => e.Properties.ContainsKey(ProjectNameSettings.Group.Defalut)).ToList(); |
||||
|
|
||||
|
var settingOutput = settings |
||||
|
.GroupBy(e => e.Properties[ProjectNameSettings.Group.Defalut].ToString()).Select(s => |
||||
|
new SettingOutput |
||||
|
{ |
||||
|
Group = s.Key, |
||||
|
GroupDisplayName = _localizer[s.Key] |
||||
|
}).ToList(); |
||||
|
|
||||
|
foreach (var item in settingOutput) |
||||
|
{ |
||||
|
var currentSettings = settings.Where(e => e.Properties.ContainsValue(item.Group)); |
||||
|
foreach (var itemDefinition in currentSettings) |
||||
|
{ |
||||
|
|
||||
|
var value = await SettingProvider.GetOrNullAsync(itemDefinition.Name); |
||||
|
var type = itemDefinition.Properties |
||||
|
.FirstOrDefault(f => f.Key == ProjectNameSettings.ControlType.Defalut).Value |
||||
|
.ToString(); |
||||
|
|
||||
|
item.SettingItemOutput.Add(new SettingItemOutput( |
||||
|
itemDefinition.Name, |
||||
|
L["DisplayName:" + itemDefinition.Name], |
||||
|
value, |
||||
|
type, |
||||
|
itemDefinition.Description.Localize(_factory))); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return await Task.FromResult(settingOutput); |
||||
} |
} |
||||
|
|
||||
public async Task UpdateAsync(UpdateSettingInput input) |
public async Task UpdateAsync(UpdateSettingInput input) |
||||
{ |
{ |
||||
await _settingUiAppService.SetSettingValues(input.Values); |
foreach (var kv in input.Values) |
||||
|
{ |
||||
|
// The key of the settingValues is in camel_Case, like "setting_Abp_Localization_DefaultLanguage",
|
||||
|
// change it to "Abp.Localization.DefaultLanguage" form
|
||||
|
if (!kv.Key.StartsWith(ProjectNameSettings.Prefix)) |
||||
|
{ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
string name = kv.Key.RemovePreFix(ProjectNameSettings.Prefix); |
||||
|
var setting = _settingDefinitionManager.GetOrNull(name); |
||||
|
if (setting == null) |
||||
|
{ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
await SetSetting(setting, kv.Value); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private Task SetSetting(SettingDefinition setting, string value) |
||||
|
{ |
||||
|
if (setting.Providers.Any(p => p == UserSettingValueProvider.ProviderName)) |
||||
|
{ |
||||
|
return _settingManager.SetForCurrentUserAsync(setting.Name, value); |
||||
|
} |
||||
|
|
||||
|
if (setting.Providers.Any(p => p == GlobalSettingValueProvider.ProviderName)) |
||||
|
{ |
||||
|
return _settingManager.SetGlobalAsync(setting.Name, value); |
||||
|
} |
||||
|
|
||||
|
//Default
|
||||
|
return _settingManager.SetForCurrentTenantAsync(setting.Name, value); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,81 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using CompanyName.ProjectName.Extension.Customs.Dtos; |
||||
|
using CompanyName.ProjectName.Tenants.Dtos; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.AspNetCore.Mvc.MultiTenancy; |
||||
|
using Volo.Abp.TenantManagement; |
||||
|
|
||||
|
namespace CompanyName.ProjectName.Tenants |
||||
|
{ |
||||
|
public class VoloTenantAppService : ProjectNameAppService, IVoloTenantAppService |
||||
|
{ |
||||
|
private readonly IAbpTenantAppService _abpTenantAppService; |
||||
|
private readonly ITenantAppService _tenantAppService; |
||||
|
|
||||
|
public VoloTenantAppService( |
||||
|
IAbpTenantAppService abpTenantAppService, |
||||
|
ITenantAppService tenantAppService) |
||||
|
{ |
||||
|
_abpTenantAppService = abpTenantAppService; |
||||
|
_tenantAppService = tenantAppService; |
||||
|
} |
||||
|
|
||||
|
public async Task<FindTenantResultDto> FindTenantByNameAsync(FindTenantByNameInput input) |
||||
|
{ |
||||
|
return await _abpTenantAppService.FindTenantByNameAsync(input.Name); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
[Authorize(policy:TenantManagementPermissions.Tenants.Default)] |
||||
|
public Task<PagedResultDto<TenantDto>> ListAsync(PagingTenantInput input) |
||||
|
{ |
||||
|
var request = new GetTenantsInput |
||||
|
{ |
||||
|
Filter = input.Filter, SkipCount = input.SkipCount, MaxResultCount = input.PageSize |
||||
|
}; |
||||
|
return _tenantAppService.GetListAsync(request); |
||||
|
} |
||||
|
|
||||
|
[Authorize(policy:TenantManagementPermissions.Tenants.Create)] |
||||
|
public Task<TenantDto> CreateAsync(TenantCreateDto input) |
||||
|
{ |
||||
|
return _tenantAppService.CreateAsync(input); |
||||
|
} |
||||
|
|
||||
|
[Authorize(policy:TenantManagementPermissions.Tenants.Update)] |
||||
|
public Task<TenantDto> UpdateAsync(UpdateTenantInput input) |
||||
|
{ |
||||
|
var request = new TenantUpdateDto() |
||||
|
{ |
||||
|
Name = input.Name.Trim() |
||||
|
}; |
||||
|
return _tenantAppService.UpdateAsync(input.Id, request); |
||||
|
} |
||||
|
|
||||
|
[Authorize(policy:TenantManagementPermissions.Tenants.Delete)] |
||||
|
public Task DeleteAsync(IdInput input) |
||||
|
{ |
||||
|
return _tenantAppService.DeleteAsync(input.Id); |
||||
|
} |
||||
|
|
||||
|
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] |
||||
|
public Task<string> GetDefaultConnectionStringAsync(IdInput input) |
||||
|
{ |
||||
|
return _tenantAppService.GetDefaultConnectionStringAsync(input.Id); |
||||
|
} |
||||
|
|
||||
|
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] |
||||
|
public Task UpdateDefaultConnectionStringAsync(UpdateConnectionStringInput input) |
||||
|
{ |
||||
|
return _tenantAppService.UpdateDefaultConnectionStringAsync(input.Id, |
||||
|
input.ConnectionString); |
||||
|
} |
||||
|
|
||||
|
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] |
||||
|
public Task DeleteDefaultConnectionStringAsync(IdInput input) |
||||
|
{ |
||||
|
return _tenantAppService.DeleteDefaultConnectionStringAsync(input.Id); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,25 +1,29 @@ |
|||||
{ |
{ |
||||
"culture": "zh-Hans", |
"culture": "zh-Hans", |
||||
"texts": { |
"texts": { |
||||
"Menu:Home": "首页", |
"Menu:Home": "首页", |
||||
"Welcome": "欢迎", |
"Welcome": "欢迎", |
||||
"Test": "测试", |
"Test": "测试", |
||||
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io.", |
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io.", |
||||
"Permission:Query": "查询", |
"Permission:Query": "查询", |
||||
"Permission:Create": "创建", |
"Permission:Create": "创建", |
||||
"Permission:Update": "编辑", |
"Permission:Update": "编辑", |
||||
"Permission:Delete": "删除", |
"Permission:Delete": "删除", |
||||
"Permission:Enable": "启用|禁用", |
"Permission:Enable": "启用|禁用", |
||||
"Permission:AuditLogManagement": "审计日志", |
"Permission:AuditLogManagement": "审计日志", |
||||
"Permission:SystemManagement": "系统管理", |
"Permission:SystemManagement": "系统管理", |
||||
"Permission:HangfireManagement": "后台任务", |
"Permission:HangfireManagement": "后台任务", |
||||
"Permission:CapManagement": "集成事件", |
"Permission:CapManagement": "集成事件", |
||||
"Permission:ESManagement": "ES日志", |
"Permission:ESManagement": "ES日志", |
||||
"Permission:IdentityServerManagement": "IdentityServer", |
"Permission:SettingManagement": "设置管理", |
||||
"Permission:IdentityServerManagement:Client": "客户端", |
"Permission:IdentityServerManagement": "IdentityServer", |
||||
"Permission:IdentityServerManagement:ApiResource": "Api资源", |
"Permission:IdentityServerManagement:Client": "客户端", |
||||
"Permission:IdentityServerManagement:ApiScope": "ApiScope", |
"Permission:IdentityServerManagement:ApiResource": "Api资源", |
||||
"Permission:IdentityServerManagement:IdentityResources": "Identity资源", |
"Permission:IdentityServerManagement:ApiScope": "ApiScope", |
||||
"Permission:SettingUi:ShowSettingPage": "设置管理" |
"Permission:IdentityServerManagement:IdentityResources": "Identity资源", |
||||
} |
"Setting.Group.System": "系统", |
||||
} |
"Setting.Group.Other": "其它", |
||||
|
"DisplayName:Setting.Group.Other.Github": "Github", |
||||
|
"Description:Setting.Group.Other.Github": "Github" |
||||
|
} |
||||
|
} |
||||
@ -1,26 +1,28 @@ |
|||||
using System.Threading.Tasks; |
// using System;
|
||||
using CompanyName.ProjectName.Tenants.Dtos; |
// using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc; |
// using CompanyName.ProjectName.Tenants.Dtos;
|
||||
using Swashbuckle.AspNetCore.Annotations; |
// using Microsoft.AspNetCore.Mvc;
|
||||
using Volo.Abp.AspNetCore.Mvc.MultiTenancy; |
// using Swashbuckle.AspNetCore.Annotations;
|
||||
|
// using Volo.Abp.Application.Services;
|
||||
namespace CompanyName.ProjectName.Controllers.Tenants |
// using Volo.Abp.AspNetCore.Mvc.MultiTenancy;
|
||||
{ |
//
|
||||
[Route("Tenants")] |
// namespace CompanyName.ProjectName.Controllers.Tenants
|
||||
public class AbpTenantController : ProjectNameController |
// {
|
||||
{ |
// [Route("Tenants")]
|
||||
private readonly IAbpTenantAppService _abpTenantAppService; |
// public class AbpTenantController : ProjectNameController,IApplicationService
|
||||
|
// {
|
||||
public AbpTenantController(IAbpTenantAppService abpTenantAppService) |
// private readonly IAbpTenantAppService _abpTenantAppService;
|
||||
{ |
//
|
||||
_abpTenantAppService = abpTenantAppService; |
// public AbpTenantController(IAbpTenantAppService abpTenantAppService)
|
||||
} |
// {
|
||||
|
// _abpTenantAppService = abpTenantAppService;
|
||||
[HttpPost("find")] |
// }
|
||||
[SwaggerOperation(summary: "通过名称获取租户信息", Tags = new[] {"Tenants"})] |
//
|
||||
public async Task<FindTenantResultDto> FindTenantByNameAsync(FindTenantByNameInput input) |
// [HttpPost("find")]
|
||||
{ |
// [SwaggerOperation(summary: "通过名称获取租户信息", Tags = new[] {"Tenants"})]
|
||||
return await _abpTenantAppService.FindTenantByNameAsync(input.Name); |
// public async Task<FindTenantResultDto> FindTenantByNameAsync(FindTenantByNameInput input)
|
||||
} |
// {
|
||||
} |
// return await _abpTenantAppService.FindTenantByNameAsync(input.Name);
|
||||
} |
// }
|
||||
|
// }
|
||||
|
// }
|
||||
@ -1,77 +1,83 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using CompanyName.ProjectName.Tenants.Dtos; |
using CompanyName.ProjectName.Tenants.Dtos; |
||||
using CompanyName.ProjectName.Extension.Customs.Dtos; |
using CompanyName.ProjectName.Extension.Customs.Dtos; |
||||
using Microsoft.AspNetCore.Authorization; |
using CompanyName.ProjectName.Tenants; |
||||
using Microsoft.AspNetCore.Mvc; |
using Microsoft.AspNetCore.Mvc; |
||||
using Swashbuckle.AspNetCore.Annotations; |
using Swashbuckle.AspNetCore.Annotations; |
||||
using Volo.Abp.Application.Dtos; |
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.AspNetCore.Mvc.MultiTenancy; |
||||
using Volo.Abp.TenantManagement; |
using Volo.Abp.TenantManagement; |
||||
|
|
||||
namespace CompanyName.ProjectName.Controllers.Tenants |
namespace CompanyName.ProjectName.Controllers.Tenants |
||||
{ |
{ |
||||
[Route("Tenants")] |
[Route("Tenants")] |
||||
public class TenantController : ProjectNameController |
public class TenantController : ProjectNameController, IVoloTenantAppService |
||||
{ |
{ |
||||
private readonly ITenantAppService _tenantAppService; |
private readonly IVoloTenantAppService _voloTenantAppService; |
||||
|
|
||||
public TenantController(ITenantAppService tenantAppService) |
public TenantController(IVoloTenantAppService voloTenantAppService) |
||||
{ |
{ |
||||
_tenantAppService = tenantAppService; |
_voloTenantAppService = voloTenantAppService; |
||||
|
} |
||||
|
|
||||
|
[HttpPost("find")] |
||||
|
[SwaggerOperation(summary: "通过名称获取租户信息", Tags = new[] {"Tenants"})] |
||||
|
public Task<FindTenantResultDto> FindTenantByNameAsync(FindTenantByNameInput input) |
||||
|
{ |
||||
|
return _voloTenantAppService.FindTenantByNameAsync(input); |
||||
} |
} |
||||
|
|
||||
[HttpPost("page")] |
[HttpPost("page")] |
||||
[SwaggerOperation(summary: "分页获取租户信息", Tags = new[] {"Tenants"})] |
[SwaggerOperation(summary: "分页获取租户信息", Tags = new[] { "Tenants" })] |
||||
public Task<PagedResultDto<TenantDto>> ListAsync(PagingTenantInput input) |
public Task<PagedResultDto<TenantDto>> ListAsync(PagingTenantInput input) |
||||
{ |
{ |
||||
var request = new GetTenantsInput {Filter = input.Filter, SkipCount = input.SkipCount, MaxResultCount = input.PageSize}; |
return _voloTenantAppService.ListAsync(input); |
||||
return _tenantAppService.GetListAsync(request); |
|
||||
} |
} |
||||
|
|
||||
[HttpPost("create")] |
[HttpPost("create")] |
||||
[SwaggerOperation(summary: "创建租户", Tags = new[] {"Tenants"})] |
[SwaggerOperation(summary: "创建租户", Tags = new[] { "Tenants" })] |
||||
public Task<TenantDto> CreateAsync(TenantCreateDto input) |
public Task<TenantDto> CreateAsync(TenantCreateDto input) |
||||
{ |
{ |
||||
return _tenantAppService.CreateAsync(input); |
return _voloTenantAppService.CreateAsync(input); |
||||
} |
} |
||||
|
|
||||
[HttpPost("update")] |
[HttpPost("update")] |
||||
[SwaggerOperation(summary: "更新租户", Tags = new[] {"Tenants"})] |
[SwaggerOperation(summary: "更新租户", Tags = new[] { "Tenants" })] |
||||
public Task<TenantDto> UpdateAsync(UpdateTenantInput input) |
public Task<TenantDto> UpdateAsync(UpdateTenantInput input) |
||||
{ |
{ |
||||
var request = new TenantUpdateDto() |
var request = new TenantUpdateDto() |
||||
{ |
{ |
||||
Name = input.Name.Trim() |
Name = input.Name.Trim() |
||||
}; |
}; |
||||
return _tenantAppService.UpdateAsync(input.Id, request); |
return _voloTenantAppService.UpdateAsync(input); |
||||
} |
} |
||||
|
|
||||
[HttpPost("delete")] |
[HttpPost("delete")] |
||||
[SwaggerOperation(summary: "删除租户", Tags = new[] {"Tenants"})] |
[SwaggerOperation(summary: "删除租户", Tags = new[] { "Tenants" })] |
||||
public Task DeleteAsync(IdInput input) |
public Task DeleteAsync(IdInput input) |
||||
{ |
{ |
||||
return _tenantAppService.DeleteAsync(input.Id); |
return _voloTenantAppService.DeleteAsync(input); |
||||
} |
} |
||||
|
|
||||
[HttpPost("getConnectionString")] |
[HttpPost("getConnectionString")] |
||||
[SwaggerOperation(summary: "获取租户连接字符串", Tags = new[] {"Tenants"})] |
[SwaggerOperation(summary: "获取租户连接字符串", Tags = new[] { "Tenants" })] |
||||
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] |
|
||||
public Task<string> GetDefaultConnectionStringAsync(IdInput input) |
public Task<string> GetDefaultConnectionStringAsync(IdInput input) |
||||
{ |
{ |
||||
return _tenantAppService.GetDefaultConnectionStringAsync(input.Id); |
return _voloTenantAppService.GetDefaultConnectionStringAsync(input); |
||||
} |
} |
||||
|
|
||||
[HttpPost("updateConnectionString")] |
[HttpPost("updateConnectionString")] |
||||
[SwaggerOperation(summary: "更新租户连接字符串", Tags = new[] {"Tenants"})] |
[SwaggerOperation(summary: "更新租户连接字符串", Tags = new[] { "Tenants" })] |
||||
public Task UpdateDefaultConnectionStringAsync(UpdateConnectionStringInput input) |
public Task UpdateDefaultConnectionStringAsync(UpdateConnectionStringInput input) |
||||
{ |
{ |
||||
return _tenantAppService.UpdateDefaultConnectionStringAsync(input.Id, input.ConnectionString); |
return _voloTenantAppService.UpdateDefaultConnectionStringAsync(input); |
||||
} |
} |
||||
|
|
||||
[HttpPost("deleteConnectionString")] |
[HttpPost("deleteConnectionString")] |
||||
[SwaggerOperation(summary: "删除租户连接字符串", Tags = new[] {"Tenants"})] |
[SwaggerOperation(summary: "删除租户连接字符串", Tags = new[] { "Tenants" })] |
||||
public Task DeleteDefaultConnectionStringAsync(IdInput input) |
public Task DeleteDefaultConnectionStringAsync(IdInput input) |
||||
{ |
{ |
||||
return _tenantAppService.DeleteDefaultConnectionStringAsync(input.Id); |
return _voloTenantAppService.DeleteDefaultConnectionStringAsync(input); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
File diff suppressed because it is too large
Loading…
Reference in new issue