Browse Source

增加租户管理服务;引入Abp.Cap模块;修复一些语法错误

pull/1/head
cKey 6 years ago
parent
commit
abd378e7a0
  1. 4
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/.gitignore
  2. 110
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/DotNetCore/CAP/ConsumerServiceSelector.cs
  3. 24
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LICENSE.txt
  4. 13
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj
  5. 21
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusModule.cs
  6. 149
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CAPDistributedEventBus.cs
  7. 14
      aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
  8. 4
      aspnet-core/modules/common/LINGYUN.Common.EventBus/.gitignore
  9. 12
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN.Common.EventBus.csproj
  10. 11
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/CommonEventBusModule.cs
  11. 15
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/CreateConnectionStringEventData.cs
  12. 17
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/CreateEventData.cs
  13. 13
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/DeleteConnectionStringEventData.cs
  14. 11
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/DeleteEventData.cs
  15. 19
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/TenantEventNames.cs
  16. 19
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/UpdateConnectionStringEventData.cs
  17. 15
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/UpdateEventData.cs
  18. 83
      aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerPermissionDefinitionProvider.cs
  19. 2
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj
  20. 2
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementApplicationContractsModule.cs
  21. 4
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementPermissionProvider.cs
  22. 8
      aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/zh-CN.json
  23. 4
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/.gitignore
  24. 3
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionStringCreateOrUpdateDto.cs
  25. 2
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantDto.cs
  26. 2
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/ITenantAppService.cs
  27. 1766
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.deps.json
  28. 23
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.AssemblyInfo.cs
  29. 1
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.AssemblyInfoInputs.cache
  30. BIN
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.assets.cache
  31. 5
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.csproj.FileListAbsolute.txt
  32. BIN
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.csprojAssemblyReference.cache
  33. 77
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/LINGYUN.TenantManagement.Application.Contracts.csproj.nuget.dgspec.json
  34. 15
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/LINGYUN.TenantManagement.Application.Contracts.csproj.nuget.g.props
  35. 9
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/LINGYUN.TenantManagement.Application.Contracts.csproj.nuget.g.targets
  36. 4174
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/project.assets.json
  37. 104
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/project.nuget.cache
  38. 4
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/.gitignore
  39. 1
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/LINGYUN.TenantManagement.Application.csproj
  40. 2
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/LINGYUN/Abp/TenantManagement/AbpTenantManagementApplicationAutoMapperProfile.cs
  41. 55
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs
  42. 47
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/bin/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.deps.json
  43. 23
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.AssemblyInfo.cs
  44. 1
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.AssemblyInfoInputs.cache
  45. BIN
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.assets.cache
  46. 4
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.csproj.FileListAbsolute.txt
  47. BIN
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.csprojAssemblyReference.cache
  48. 146
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/LINGYUN.TenantManagement.Application.csproj.nuget.dgspec.json
  49. 15
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/LINGYUN.TenantManagement.Application.csproj.nuget.g.props
  50. 9
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/LINGYUN.TenantManagement.Application.csproj.nuget.g.targets
  51. 4385
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/project.assets.json
  52. 109
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/project.nuget.cache
  53. 4
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/.gitignore
  54. 8
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/LINGYUN/Abp/TenantManagement/TenantController.cs
  55. 23
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.AssemblyInfo.cs
  56. 1
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.AssemblyInfoInputs.cache
  57. BIN
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.assets.cache
  58. BIN
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.csprojAssemblyReference.cache
  59. 148
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/LINGYUN.TenantManagement.HttpApi.csproj.nuget.dgspec.json
  60. 27
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/LINGYUN.TenantManagement.HttpApi.csproj.nuget.g.props
  61. 9
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/LINGYUN.TenantManagement.HttpApi.csproj.nuget.g.targets
  62. 4754
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/project.assets.json
  63. 122
      aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/project.nuget.cache
  64. 34
      aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs
  65. 8
      aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
  66. 44
      aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs
  67. 23
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/Ocelot/Middleware/Multiplexer/AbpApiDefinitionAggregator.cs
  68. 4
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/.gitignore
  69. 110
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs
  70. 82
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs
  71. 47
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
  72. 35
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/MultiTenancy/AuthorizationTenantResolveContributor.cs
  73. 168
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs
  74. 49
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Program.cs
  75. 20
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Properties/launchSettings.json
  76. 18
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Startup.cs
  77. 6
      aspnet-core/services/start-all-service.bat
  78. 6
      aspnet-core/services/start-all.bat
  79. 1
      aspnet-core/services/start-apigateway-admin.bat
  80. 0
      aspnet-core/services/start-apigateway-host.bat
  81. 1
      aspnet-core/services/start-identity-server.bat
  82. 29
      aspnet-core/services/start-platform.bat
  83. 4
      vueJs/src/api/apigateway.ts
  84. 2
      vueJs/src/api/permission.ts
  85. 88
      vueJs/src/api/tenant.ts
  86. 34
      vueJs/src/lang/zh.ts
  87. 12
      vueJs/src/router/index.ts
  88. 4
      vueJs/src/store/modules/permission.ts
  89. 2
      vueJs/src/store/modules/user.ts
  90. 2
      vueJs/src/utils/request.ts
  91. 75
      vueJs/src/views/admin/apigateway/aggregateRoute.vue
  92. 193
      vueJs/src/views/admin/apigateway/components/AggregateRouteConfigEditForm.vue
  93. 6
      vueJs/src/views/admin/apigateway/components/RouteCreateOrEditForm.vue
  94. 142
      vueJs/src/views/admin/tenants/components/TenantCreateOrEditForm.vue
  95. 189
      vueJs/src/views/admin/tenants/components/TenantEditConnectionForm.vue
  96. 309
      vueJs/src/views/admin/tenants/index.vue

4
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/.gitignore

@ -0,0 +1,4 @@
bin
obj
Logs
appsettings.*.json

110
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/DotNetCore/CAP/ConsumerServiceSelector.cs

@ -0,0 +1,110 @@
using DotNetCore.CAP;
using DotNetCore.CAP.Internal;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Distributed;
namespace EasyAbp.Abp.EventBus.Cap
{
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
[ExposeServices(typeof(IConsumerServiceSelector), typeof(ConsumerServiceSelector))]
public class ConsumerServiceSelector : DotNetCore.CAP.Internal.ConsumerServiceSelector
{
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
protected IServiceProvider ServiceProvider { get; }
/// <summary>
/// Creates a new <see cref="T:DotNetCore.CAP.Internal.ConsumerServiceSelector" />.
/// </summary>
public ConsumerServiceSelector(IServiceProvider serviceProvider, IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions) : base(serviceProvider)
{
ServiceProvider = serviceProvider;
AbpDistributedEventBusOptions = distributedEventBusOptions.Value;
}
protected override IEnumerable<ConsumerExecutorDescriptor> FindConsumersFromInterfaceTypes(IServiceProvider provider)
{
var executorDescriptorList =
base.FindConsumersFromInterfaceTypes(provider).ToList();
//handlers
var handlers = AbpDistributedEventBusOptions.Handlers;
foreach (var handler in handlers)
{
var interfaces = handler.GetInterfaces();
foreach (var @interface in interfaces)
{
if (!typeof(IEventHandler).GetTypeInfo().IsAssignableFrom(@interface))
{
continue;
}
var genericArgs = @interface.GetGenericArguments();
if (genericArgs.Length == 1)
{
executorDescriptorList.AddRange(
GetHandlerDescription(genericArgs[0], handler));
//Subscribe(genericArgs[0], new IocEventHandlerFactory(ServiceScopeFactory, handler));
}
}
}
return executorDescriptorList;
}
protected virtual IEnumerable<ConsumerExecutorDescriptor> GetHandlerDescription(Type eventType, Type typeInfo)
{
var serviceTypeInfo = typeof(IDistributedEventHandler<>)
.MakeGenericType(eventType);
var method = typeInfo
.GetMethod(
nameof(IDistributedEventHandler<object>.HandleEventAsync),
new[] { eventType }
);
var eventName = EventNameAttribute.GetNameOrDefault(eventType);
var topicAttr = method.GetCustomAttributes<TopicAttribute>(true);
var topicAttributes = topicAttr.ToList();
topicAttributes.Add(new CapSubscribeAttribute(eventName));
foreach (var attr in topicAttributes)
{
SetSubscribeAttribute(attr);
var parameters = method.GetParameters()
.Select(parameter => new ParameterDescriptor
{
Name = parameter.Name,
ParameterType = parameter.ParameterType,
IsFromCap = parameter.GetCustomAttributes(typeof(FromCapAttribute)).Any()
}).ToList();
yield return InitDescriptor(attr, method, typeInfo.GetTypeInfo(), serviceTypeInfo.GetTypeInfo(), parameters);
}
}
private static ConsumerExecutorDescriptor InitDescriptor(
TopicAttribute attr,
MethodInfo methodInfo,
TypeInfo implType,
TypeInfo serviceTypeInfo,
IList<ParameterDescriptor> parameters)
{
var descriptor = new ConsumerExecutorDescriptor
{
Attribute = attr,
MethodInfo = methodInfo,
ImplTypeInfo = implType,
ServiceTypeInfo = serviceTypeInfo,
Parameters = parameters
};
return descriptor;
}
}
}

24
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LICENSE.txt

@ -0,0 +1,24 @@
MIT License
Copyright (c) 2020 Goxiaoy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Ä£¿éÀ´Ô´
https://github.com/EasyAbp/Abp.EventBus.CAP

13
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetCore.CAP" Version="3.0.3" />
<PackageReference Include="Volo.Abp.EventBus" Version="2.7.0" />
</ItemGroup>
</Project>

21
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/AbpCAPEventBusModule.cs

@ -0,0 +1,21 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.EventBus.CAP
{
[DependsOn(typeof(AbpEventBusModule))]
public class AbpCAPEventBusModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
context.Services.AddCAPEventBus(options =>
{
configuration.GetSection("CAP:EventBus").Bind(options);
context.Services.ExecutePreConfiguredActions(options);
});
}
}
}

149
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN/Abp/EventBus/CAP/CAPDistributedEventBus.cs

@ -0,0 +1,149 @@
using DotNetCore.CAP;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Threading;
namespace LINGYUN.Abp.EventBus.CAP
{
[Dependency(ServiceLifetime.Singleton, ReplaceServices = true)]
[ExposeServices(typeof(IDistributedEventBus), typeof(CAPDistributedEventBus))]
public class CAPDistributedEventBus : EventBusBase, IDistributedEventBus
{
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
protected readonly ICapPublisher CapPublisher;
//TODO: Accessing to the List<IEventHandlerFactory> may not be thread-safe!
protected ConcurrentDictionary<Type, List<IEventHandlerFactory>> HandlerFactories { get; }
protected ConcurrentDictionary<string, Type> EventTypes { get; }
public CAPDistributedEventBus(IServiceScopeFactory serviceScopeFactory,
IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions,
ICapPublisher capPublisher) : base(serviceScopeFactory)
{
CapPublisher = capPublisher;
AbpDistributedEventBusOptions = distributedEventBusOptions.Value;
HandlerFactories = new ConcurrentDictionary<Type, List<IEventHandlerFactory>>();
EventTypes = new ConcurrentDictionary<string, Type>();
}
public override IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
{
//This is handled by CAP ConsumerServiceSelector
throw new NotImplementedException();
}
public override void Unsubscribe<TEvent>(Func<TEvent, Task> action)
{
Check.NotNull(action, nameof(action));
GetOrCreateHandlerFactories(typeof(TEvent))
.Locking(factories =>
{
factories.RemoveAll(
factory =>
{
var singleInstanceFactory = factory as SingleInstanceHandlerFactory;
if (singleInstanceFactory == null)
{
return false;
}
var actionHandler = singleInstanceFactory.HandlerInstance as ActionEventHandler<TEvent>;
if (actionHandler == null)
{
return false;
}
return actionHandler.Action == action;
});
});
}
public override void Unsubscribe(Type eventType, IEventHandler handler)
{
GetOrCreateHandlerFactories(eventType)
.Locking(factories =>
{
factories.RemoveAll(
factory =>
factory is SingleInstanceHandlerFactory &&
(factory as SingleInstanceHandlerFactory).HandlerInstance == handler
);
});
}
public override void Unsubscribe(Type eventType, IEventHandlerFactory factory)
{
GetOrCreateHandlerFactories(eventType).Locking(factories => factories.Remove(factory));
}
public override void UnsubscribeAll(Type eventType)
{
GetOrCreateHandlerFactories(eventType).Locking(factories => factories.Clear());
}
public IDisposable Subscribe<TEvent>(IDistributedEventHandler<TEvent> handler) where TEvent : class
{
return Subscribe(typeof(TEvent), handler);
}
public override async Task PublishAsync(Type eventType, object eventData)
{
var eventName = EventNameAttribute.GetNameOrDefault(eventType);
await CapPublisher.PublishAsync(eventName, eventData);
}
protected override IEnumerable<EventTypeWithEventHandlerFactories> GetHandlerFactories(Type eventType)
{
var handlerFactoryList = new List<EventTypeWithEventHandlerFactories>();
foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key)))
{
handlerFactoryList.Add(new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value));
}
return handlerFactoryList.ToArray();
}
private List<IEventHandlerFactory> GetOrCreateHandlerFactories(Type eventType)
{
return HandlerFactories.GetOrAdd(
eventType,
type =>
{
var eventName = EventNameAttribute.GetNameOrDefault(type);
EventTypes[eventName] = type;
return new List<IEventHandlerFactory>();
}
);
}
private static bool ShouldTriggerEventForHandler(Type targetEventType, Type handlerEventType)
{
//Should trigger same type
if (handlerEventType == targetEventType)
{
return true;
}
//TODO: Support inheritance? But it does not support on subscription to RabbitMq!
//Should trigger for inherited types
if (handlerEventType.IsAssignableFrom(targetEventType))
{
return true;
}
return false;
}
}
}

14
aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs

@ -0,0 +1,14 @@
using DotNetCore.CAP;
using System;
namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddCAPEventBus(this IServiceCollection services, Action<CapOptions> capAction)
{
services.AddCap(capAction);
return services;
}
}
}

4
aspnet-core/modules/common/LINGYUN.Common.EventBus/.gitignore

@ -0,0 +1,4 @@
bin
obj
Logs
appsettings.*.json

12
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN.Common.EventBus.csproj

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EventBus" Version="2.7.0" />
</ItemGroup>
</Project>

11
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/CommonEventBusModule.cs

@ -0,0 +1,11 @@
using Volo.Abp.EventBus;
using Volo.Abp.Modularity;
namespace LINGYUN.Common.EventBus
{
[DependsOn(typeof(AbpEventBusModule))]
public class CommonEventBusModule : AbpModule
{
}
}

15
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/CreateConnectionStringEventData.cs

@ -0,0 +1,15 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
{
[EventName(TenantEventNames.CreateConnectionString)]
public class CreateConnectionStringEventData
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Value { get; set; }
}
}

17
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/CreateEventData.cs

@ -0,0 +1,17 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
{
[EventName(TenantEventNames.Create)]
public class CreateEventData
{
public Guid Id { get; set; }
public string Name { get; set; }
public string AdminEmailAddress { get; set; }
public string AdminPassword { get; set; }
}
}

13
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/DeleteConnectionStringEventData.cs

@ -0,0 +1,13 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
{
[EventName(TenantEventNames.DeleteConnectionString)]
public class DeleteConnectionStringEventData
{
public Guid Id { get; set; }
public string Name { get; set; }
}
}

11
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/DeleteEventData.cs

@ -0,0 +1,11 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
{
[EventName(TenantEventNames.Delete)]
public class DeleteEventData
{
public Guid Id { get; set; }
}
}

19
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/TenantEventNames.cs

@ -0,0 +1,19 @@
namespace LINGYUN.Common.EventBus.Tenants
{
public class TenantEventNames
{
public const string Default = "TenantEvent";
public const string Create = Default + ".Create";
public const string Update = Default + ".Update";
public const string Delete = Default + ".Delete";
public const string CreateConnectionString = Default + ".CreateConnectionString";
public const string UpdateConnectionString = Default + ".UpdateConnectionString";
public const string DeleteConnectionString = Default + ".DeleteConnectionString";
}
}

19
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/UpdateConnectionStringEventData.cs

@ -0,0 +1,19 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
{
[EventName(TenantEventNames.UpdateConnectionString)]
public class UpdateConnectionStringEventData
{
public Guid Id { get; set; }
public string OriginName { get; set; }
public string Name { get; set; }
public string OriginValue { get; set; }
public string Value { get; set; }
}
}

15
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/UpdateEventData.cs

@ -0,0 +1,15 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
{
[EventName(TenantEventNames.Update)]
public class UpdateEventData
{
public Guid Id { get; set; }
public string OriginName { get; set; }
public string Name { get; set; }
}
}

83
aspnet-core/modules/identityServer/LINGYUN.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/AbpIdentityServerPermissionDefinitionProvider.cs

@ -1,6 +1,7 @@
using Volo.Abp.Authorization.Permissions; using Volo.Abp.Authorization.Permissions;
using Volo.Abp.IdentityServer.Localization; using Volo.Abp.IdentityServer.Localization;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
namespace LINGYUN.Abp.IdentityServer namespace LINGYUN.Abp.IdentityServer
{ {
@ -8,64 +9,66 @@ namespace LINGYUN.Abp.IdentityServer
{ {
public override void Define(IPermissionDefinitionContext context) public override void Define(IPermissionDefinitionContext context)
{ {
var identityServerGroup = context.AddGroup(AbpIdentityServerPermissions.GroupName, L("Permissions:IdentityServer")); // TODO: 身份认证服务器应该只能主机管辖
// 增加 MultiTenancySides.Host
var identityServerGroup = context.AddGroup(AbpIdentityServerPermissions.GroupName, L("Permissions:IdentityServer"), MultiTenancySides.Host);
// 客户端权限 // 客户端权限
var clientPermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.Clients.Default, L("Permissions:Clients")); var clientPermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.Clients.Default, L("Permissions:Clients"), MultiTenancySides.Host);
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Create, L("Permissions:Create")); clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Create, L("Permissions:Create"), MultiTenancySides.Host);
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Update, L("Permissions:Update")); clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Update, L("Permissions:Update"), MultiTenancySides.Host);
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Clone, L("Permissions:Clone")); clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Clone, L("Permissions:Clone"), MultiTenancySides.Host);
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Enabled, L("Permissions:Enabled")); clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Enabled, L("Permissions:Enabled"), MultiTenancySides.Host);
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Disabled, L("Permissions:Disabled")); clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Disabled, L("Permissions:Disabled"), MultiTenancySides.Host);
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Delete, L("Permissions:Delete")); clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.ManagePermissions, L("Permissions:ManagePermissions")); clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.ManagePermissions, L("Permissions:ManagePermissions"), MultiTenancySides.Host);
// 客户端声明权限 // 客户端声明权限
var clientClaimPermissiosn = clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Claims.Default, L("Permissions:Clients:Claims")); var clientClaimPermissiosn = clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Claims.Default, L("Permissions:Clients:Claims"), MultiTenancySides.Host);
clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Create, L("Permissions:Create")); clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Create, L("Permissions:Create"), MultiTenancySides.Host);
clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Update, L("Permissions:Update")); clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Update, L("Permissions:Update"), MultiTenancySides.Host);
clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Delete, L("Permissions:Delete")); clientClaimPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Claims.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
// 客户端密钥权限 // 客户端密钥权限
var clientSecretPermissiosn = clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Default, L("Permissions:Clients:Secrets")); var clientSecretPermissiosn = clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Default, L("Permissions:Clients:Secrets"), MultiTenancySides.Host);
clientSecretPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Create, L("Permissions:Create")); clientSecretPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Create, L("Permissions:Create"), MultiTenancySides.Host);
clientSecretPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Update, L("Permissions:Update")); clientSecretPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Update, L("Permissions:Update"), MultiTenancySides.Host);
clientSecretPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Delete, L("Permissions:Delete")); clientSecretPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Secrets.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
// 客户端属性权限 // 客户端属性权限
var clientPropertyPermissiosn = clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Properties.Default, L("Permissions:Clients:Properties")); var clientPropertyPermissiosn = clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Properties.Default, L("Permissions:Clients:Properties"), MultiTenancySides.Host);
clientPropertyPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Properties.Create, L("Permissions:Create")); clientPropertyPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Properties.Create, L("Permissions:Create"), MultiTenancySides.Host);
clientPropertyPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Properties.Update, L("Permissions:Update")); clientPropertyPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Properties.Update, L("Permissions:Update"), MultiTenancySides.Host);
clientPropertyPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Properties.Delete, L("Permissions:Delete")); clientPropertyPermissiosn.AddChild(AbpIdentityServerPermissions.Clients.Properties.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
// Api资源权限 // Api资源权限
var apiResourcePermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.ApiResources.Default, L("Permissions:ApiResources")); var apiResourcePermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.ApiResources.Default, L("Permissions:ApiResources"), MultiTenancySides.Host);
apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Create, L("Permissions:Create")); apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Create, L("Permissions:Create"), MultiTenancySides.Host);
apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Update, L("Permissions:Update")); apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Update, L("Permissions:Update"), MultiTenancySides.Host);
apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Delete, L("Permissions:Delete")); apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
// Api作用域权限 // Api作用域权限
var apiResourceScopePermissions = apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Default, L("Permissions:ApiResources:Scope")); var apiResourceScopePermissions = apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Default, L("Permissions:ApiResources:Scope"), MultiTenancySides.Host);
apiResourceScopePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Create, L("Permissions:Create")); apiResourceScopePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Create, L("Permissions:Create"), MultiTenancySides.Host);
apiResourceScopePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Update, L("Permissions:Update")); apiResourceScopePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Update, L("Permissions:Update"), MultiTenancySides.Host);
apiResourceScopePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Delete, L("Permissions:Delete")); apiResourceScopePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Scope.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
// Api密钥权限 // Api密钥权限
var apiResourceSecretPermissions = apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Default, L("Permissions:ApiResources:Secrets")); var apiResourceSecretPermissions = apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Default, L("Permissions:ApiResources:Secrets"), MultiTenancySides.Host);
apiResourceSecretPermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Create, L("Permissions:Create")); apiResourceSecretPermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Create, L("Permissions:Create"), MultiTenancySides.Host);
apiResourceSecretPermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Update, L("Permissions:Update")); apiResourceSecretPermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Update, L("Permissions:Update"), MultiTenancySides.Host);
apiResourceSecretPermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Delete, L("Permissions:Delete")); apiResourceSecretPermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Secrets.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
// 身份资源权限 // 身份资源权限
var identityResourcePermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.IdentityResources.Default, L("Permissions:IdentityResources")); var identityResourcePermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.IdentityResources.Default, L("Permissions:IdentityResources"), MultiTenancySides.Host);
identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Create, L("Permissions:Create")); identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Create, L("Permissions:Create"), MultiTenancySides.Host);
identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Update, L("Permissions:Update")); identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Update, L("Permissions:Update"), MultiTenancySides.Host);
identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Delete, L("Permissions:Delete")); identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
// 身份资源属性权限 // 身份资源属性权限
var identityResourcePropertyPermissiosn = identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Properties.Default, L("Permissions:IdentityResources:Properties")); var identityResourcePropertyPermissiosn = identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Properties.Default, L("Permissions:IdentityResources:Properties"), MultiTenancySides.Host);
identityResourcePropertyPermissiosn.AddChild(AbpIdentityServerPermissions.IdentityResources.Properties.Create, L("Permissions:Create")); identityResourcePropertyPermissiosn.AddChild(AbpIdentityServerPermissions.IdentityResources.Properties.Create, L("Permissions:Create"), MultiTenancySides.Host);
identityResourcePropertyPermissiosn.AddChild(AbpIdentityServerPermissions.IdentityResources.Properties.Delete, L("Permissions:Delete")); identityResourcePropertyPermissiosn.AddChild(AbpIdentityServerPermissions.IdentityResources.Properties.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
} }
protected virtual LocalizableString L(string name) protected virtual LocalizableString L(string name)

2
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj

@ -7,13 +7,11 @@
<ItemGroup> <ItemGroup>
<None Remove="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\en.json" /> <None Remove="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\en.json" />
<None Remove="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\zh-CN.json" />
<None Remove="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\zh-Hans.json" /> <None Remove="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\zh-Hans.json" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\en.json" /> <EmbeddedResource Include="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\en.json" />
<EmbeddedResource Include="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\zh-CN.json" />
<EmbeddedResource Include="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\zh-Hans.json" /> <EmbeddedResource Include="LINGYUN\Abp\SettingManagement\Localization\ApplicationContracts\zh-Hans.json" />
</ItemGroup> </ItemGroup>

2
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementApplicationContractsModule.cs

@ -22,7 +22,7 @@ namespace LINGYUN.Abp.SettingManagement
{ {
options.Resources options.Resources
.Get<AbpSettingManagementResource>() .Get<AbpSettingManagementResource>()
.AddVirtualJson("/Multicolin/Abp/SettingManagement/Localization/ApplicationContracts"); .AddVirtualJson("/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts");
}); });
} }
} }

4
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/AbpSettingManagementPermissionProvider.cs

@ -13,8 +13,8 @@ namespace LINGYUN.Abp.SettingManagement
{ {
var settingPermissionGroup = context.AddGroup(AbpSettingManagementPermissions.GroupName, L("Permission:SettingManagement")); var settingPermissionGroup = context.AddGroup(AbpSettingManagementPermissions.GroupName, L("Permission:SettingManagement"));
settingPermissionGroup.AddPermission(AbpSettingManagementPermissions.Settings.Default, L("Permission:Settings")); var settingPermissions = settingPermissionGroup.AddPermission(AbpSettingManagementPermissions.Settings.Default, L("Permission:Settings"));
settingPermissionGroup.AddPermission(AbpSettingManagementPermissions.Settings.Update, L("Permission:Update")); settingPermissions.AddChild(AbpSettingManagementPermissions.Settings.Update, L("Permission:Update"));
} }
private static LocalizableString L(string name) private static LocalizableString L(string name)

8
aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/Localization/ApplicationContracts/zh-CN.json

@ -1,8 +0,0 @@
{
"culture": "zh-CN",
"texts": {
"Permission:SettingManagement": "系统设置",
"Permission:Settings": "配置管理",
"Permission:Update": "变更"
}
}

4
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/.gitignore

@ -0,0 +1,4 @@
bin
obj
Logs
appsettings.*.json

3
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantConnectionStringCreateOrUpdateDto.cs

@ -6,9 +6,6 @@ namespace LINGYUN.Abp.TenantManagement
{ {
public class TenantConnectionStringCreateOrUpdateDto public class TenantConnectionStringCreateOrUpdateDto
{ {
[Required]
public Guid Id { get; set; }
[Required] [Required]
[StringLength(TenantConnectionStringConsts.MaxNameLength)] [StringLength(TenantConnectionStringConsts.MaxNameLength)]
public string Name { get; set; } public string Name { get; set; }

2
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/Dto/TenantDto.cs

@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.TenantManagement namespace LINGYUN.Abp.TenantManagement
{ {
public class TenantDto : ExtensibleEntityDto<Guid> public class TenantDto : ExtensibleFullAuditedEntityDto<Guid>
{ {
public string Name { get; set; } public string Name { get; set; }
} }

2
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/LINGYUN/Abp/TenantManagement/ITenantAppService.cs

@ -11,7 +11,7 @@ namespace LINGYUN.Abp.TenantManagement
Task<ListResultDto<TenantConnectionStringDto>> GetConnectionStringAsync(Guid id); Task<ListResultDto<TenantConnectionStringDto>> GetConnectionStringAsync(Guid id);
Task SetConnectionStringAsync(TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate); Task<TenantConnectionStringDto> SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate);
Task DeleteConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName); Task DeleteConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName);
} }

1766
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/bin/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.deps.json

File diff suppressed because it is too large

23
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.AssemblyInfo.cs

@ -1,23 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("LINGYUN.TenantManagement.Application.Contracts")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("LINGYUN.TenantManagement.Application.Contracts")]
[assembly: System.Reflection.AssemblyTitleAttribute("LINGYUN.TenantManagement.Application.Contracts")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

1
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.AssemblyInfoInputs.cache

@ -1 +0,0 @@
77579c10756a0f27717dc51f367bec05fe131eea

BIN
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.assets.cache

Binary file not shown.

5
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.csproj.FileListAbsolute.txt

@ -1,5 +0,0 @@
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.Contracts.deps.json
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application.Contracts\bin\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.Contracts.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.Contracts.csprojAssemblyReference.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.Contracts.AssemblyInfoInputs.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application.Contracts\obj\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.Contracts.AssemblyInfo.cs

BIN
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.Contracts.csprojAssemblyReference.cache

Binary file not shown.

77
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/LINGYUN.TenantManagement.Application.Contracts.csproj.nuget.dgspec.json

@ -1,77 +0,0 @@
{
"format": 1,
"restore": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj": {}
},
"projects": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj",
"projectName": "LINGYUN.TenantManagement.Application.Contracts",
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj",
"packagesPath": "C:\\Users\\iVarKey\\.nuget\\packages\\",
"outputPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\Microsoft\\Xamarin\\NuGet\\",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\iVarKey\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"D:\\NugetLocal": {},
"http://10.21.15.28:8081/repository/nuget-hosted/": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.0": {
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"Volo.Abp.Ddd.Application": {
"target": "Package",
"version": "[2.7.0, )"
},
"Volo.Abp.TenantManagement.Domain.Shared": {
"target": "Package",
"version": "[2.7.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files (x86)\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json"
}
}
}
}
}

15
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/LINGYUN.TenantManagement.Application.Contracts.csproj.nuget.g.props

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>

9
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/LINGYUN.TenantManagement.Application.Contracts.csproj.nuget.g.targets

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
</ImportGroup>
</Project>

4174
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/project.assets.json

File diff suppressed because it is too large

104
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application.Contracts/obj/project.nuget.cache

@ -1,104 +0,0 @@
{
"version": 2,
"dgSpecHash": "Xqy69gfHIl8WcY1JyoFl5td0d3842rqoW793xWNtbBGiHwrv/WGcj+wOFV9hxcBXy4/8IO9R+tAPMBfl85Z53A==",
"success": true,
"projectFilePath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj",
"expectedPackageFiles": [
"C:\\Users\\iVarKey\\.nuget\\packages\\configureawait.fody\\3.3.1\\configureawait.fody.3.3.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\fody\\6.0.2\\fody.6.0.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\jetbrains.annotations\\2019.1.3\\jetbrains.annotations.2019.1.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.authorization\\3.1.2\\microsoft.aspnetcore.authorization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.metadata\\3.1.2\\microsoft.aspnetcore.metadata.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\1.1.0\\microsoft.bcl.asyncinterfaces.1.1.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration\\3.1.2\\microsoft.extensions.configuration.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\3.1.2\\microsoft.extensions.configuration.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.binder\\3.1.2\\microsoft.extensions.configuration.binder.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.commandline\\3.1.2\\microsoft.extensions.configuration.commandline.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\3.1.2\\microsoft.extensions.configuration.environmentvariables.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\3.1.2\\microsoft.extensions.configuration.fileextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.json\\3.1.2\\microsoft.extensions.configuration.json.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.usersecrets\\3.1.2\\microsoft.extensions.configuration.usersecrets.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\3.1.2\\microsoft.extensions.dependencyinjection.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\3.1.2\\microsoft.extensions.dependencyinjection.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\3.1.2\\microsoft.extensions.fileproviders.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.composite\\3.1.2\\microsoft.extensions.fileproviders.composite.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\3.1.2\\microsoft.extensions.fileproviders.physical.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\3.1.2\\microsoft.extensions.filesystemglobbing.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.hosting.abstractions\\3.1.2\\microsoft.extensions.hosting.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization\\3.1.2\\microsoft.extensions.localization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization.abstractions\\3.1.2\\microsoft.extensions.localization.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging\\3.1.2\\microsoft.extensions.logging.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\3.1.2\\microsoft.extensions.logging.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options\\3.1.2\\microsoft.extensions.options.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options.configurationextensions\\3.1.2\\microsoft.extensions.options.configurationextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.primitives\\3.1.2\\microsoft.extensions.primitives.3.1.2.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.platforms\\1.1.0\\microsoft.netcore.platforms.1.1.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\netstandard.library\\2.0.3\\netstandard.library.2.0.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\newtonsoft.json\\12.0.3\\newtonsoft.json.12.0.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.context\\5.0.0\\nito.asyncex.context.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.coordination\\5.0.0\\nito.asyncex.coordination.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.tasks\\5.0.0\\nito.asyncex.tasks.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.collections.deque\\1.0.4\\nito.collections.deque.1.0.4.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.disposables\\2.0.0\\nito.disposables.2.0.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.buffers\\4.5.0\\system.buffers.4.5.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.collections.immutable\\1.7.0\\system.collections.immutable.1.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.componentmodel.annotations\\4.7.0\\system.componentmodel.annotations.4.7.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.dynamic.core\\1.0.19\\system.linq.dynamic.core.1.0.19.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.queryable\\4.3.0\\system.linq.queryable.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.memory\\4.5.3\\system.memory.4.5.3.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.numerics.vectors\\4.5.0\\system.numerics.vectors.4.5.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.typeextensions\\4.3.0\\system.reflection.typeextensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\4.7.0\\system.runtime.compilerservices.unsafe.4.7.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.loader\\4.3.0\\system.runtime.loader.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.encodings.web\\4.7.0\\system.text.encodings.web.4.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.json\\4.7.1\\system.text.json.4.7.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.2\\system.threading.tasks.extensions.4.5.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.auditing\\2.7.0\\volo.abp.auditing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.authorization\\2.7.0\\volo.abp.authorization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.core\\2.7.0\\volo.abp.core.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.data\\2.7.0\\volo.abp.data.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application\\2.7.0\\volo.abp.ddd.application.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application.contracts\\2.7.0\\volo.abp.ddd.application.contracts.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.domain\\2.7.0\\volo.abp.ddd.domain.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.eventbus\\2.7.0\\volo.abp.eventbus.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.features\\2.7.0\\volo.abp.features.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.guids\\2.7.0\\volo.abp.guids.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.http.abstractions\\2.7.0\\volo.abp.http.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.json\\2.7.0\\volo.abp.json.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization\\2.7.0\\volo.abp.localization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization.abstractions\\2.7.0\\volo.abp.localization.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.multitenancy\\2.7.0\\volo.abp.multitenancy.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectextending\\2.7.0\\volo.abp.objectextending.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectmapping\\2.7.0\\volo.abp.objectmapping.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.security\\2.7.0\\volo.abp.security.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.settings\\2.7.0\\volo.abp.settings.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.tenantmanagement.domain.shared\\2.7.0\\volo.abp.tenantmanagement.domain.shared.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.threading\\2.7.0\\volo.abp.threading.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.timing\\2.7.0\\volo.abp.timing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.uow\\2.7.0\\volo.abp.uow.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation\\2.7.0\\volo.abp.validation.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation.abstractions\\2.7.0\\volo.abp.validation.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.virtualfilesystem\\2.7.0\\volo.abp.virtualfilesystem.2.7.0.nupkg.sha512"
],
"logs": []
}

4
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/.gitignore

@ -0,0 +1,4 @@
bin
obj
Logs
appsettings.*.json

1
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/LINGYUN.TenantManagement.Application.csproj

@ -10,6 +10,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\common\LINGYUN.Common.EventBus\LINGYUN.Common.EventBus.csproj" />
<ProjectReference Include="..\LINGYUN.TenantManagement.Application.Contracts\LINGYUN.TenantManagement.Application.Contracts.csproj" /> <ProjectReference Include="..\LINGYUN.TenantManagement.Application.Contracts\LINGYUN.TenantManagement.Application.Contracts.csproj" />
</ItemGroup> </ItemGroup>

2
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/LINGYUN/Abp/TenantManagement/AbpTenantManagementApplicationAutoMapperProfile.cs

@ -7,6 +7,8 @@ namespace LINGYUN.Abp.TenantManagement
{ {
public AbpTenantManagementApplicationAutoMapperProfile() public AbpTenantManagementApplicationAutoMapperProfile()
{ {
CreateMap<TenantConnectionString, TenantConnectionStringDto>();
CreateMap<Tenant, TenantDto>() CreateMap<Tenant, TenantDto>()
.MapExtraProperties(); .MapExtraProperties();
} }

55
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs

@ -1,9 +1,10 @@
using Microsoft.AspNetCore.Authorization; using LINGYUN.Common.EventBus.Tenants;
using Microsoft.AspNetCore.Authorization;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Data; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.ObjectExtending; using Volo.Abp.ObjectExtending;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
@ -12,16 +13,16 @@ namespace LINGYUN.Abp.TenantManagement
[Authorize(TenantManagementPermissions.Tenants.Default)] [Authorize(TenantManagementPermissions.Tenants.Default)]
public class TenantAppService : TenantManagementAppServiceBase, ITenantAppService public class TenantAppService : TenantManagementAppServiceBase, ITenantAppService
{ {
protected IDataSeeder DataSeeder { get; } protected IDistributedEventBus EventBus { get; }
protected ITenantRepository TenantRepository { get; } protected ITenantRepository TenantRepository { get; }
protected ITenantManager TenantManager { get; } protected ITenantManager TenantManager { get; }
public TenantAppService( public TenantAppService(
ITenantRepository tenantRepository, ITenantRepository tenantRepository,
ITenantManager tenantManager, ITenantManager tenantManager,
IDataSeeder dataSeeder) IDistributedEventBus eventBus)
{ {
DataSeeder = dataSeeder; EventBus = eventBus;
TenantRepository = tenantRepository; TenantRepository = tenantRepository;
TenantManager = tenantManager; TenantManager = tenantManager;
} }
@ -58,16 +59,16 @@ namespace LINGYUN.Abp.TenantManagement
await CurrentUnitOfWork.SaveChangesAsync(); await CurrentUnitOfWork.SaveChangesAsync();
using (CurrentTenant.Change(tenant.Id, tenant.Name)) var createEventData = new CreateEventData
{ {
//TODO: Handle database creation? Id = tenant.Id,
Name = tenant.Name,
await DataSeeder.SeedAsync( AdminEmailAddress = input.AdminEmailAddress,
new DataSeedContext(tenant.Id) AdminPassword = input.AdminPassword
.WithProperty("AdminEmail", input.AdminEmailAddress) };
.WithProperty("AdminPassword", input.AdminPassword) // 因为项目各自独立,租户增加时添加管理用户必须通过事件总线
); // 而 TenantEto 对象没有包含所需的用户名密码,需要独立发布事件
} await EventBus.PublishAsync(createEventData);
return ObjectMapper.Map<Tenant, TenantDto>(tenant); return ObjectMapper.Map<Tenant, TenantDto>(tenant);
} }
@ -75,10 +76,18 @@ namespace LINGYUN.Abp.TenantManagement
[Authorize(TenantManagementPermissions.Tenants.Update)] [Authorize(TenantManagementPermissions.Tenants.Update)]
public virtual async Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input) public virtual async Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
{ {
var tenant = await TenantRepository.GetAsync(id); var tenant = await TenantRepository.GetAsync(id, false);
var updateEventData = new UpdateEventData
{
Id = tenant.Id,
OriginName = tenant.Name,
Name = input.Name
};
await TenantManager.ChangeNameAsync(tenant, input.Name); await TenantManager.ChangeNameAsync(tenant, input.Name);
input.MapExtraPropertiesTo(tenant); input.MapExtraPropertiesTo(tenant);
await TenantRepository.UpdateAsync(tenant); await TenantRepository.UpdateAsync(tenant);
await EventBus.PublishAsync(updateEventData);
return ObjectMapper.Map<Tenant, TenantDto>(tenant); return ObjectMapper.Map<Tenant, TenantDto>(tenant);
} }
@ -90,8 +99,12 @@ namespace LINGYUN.Abp.TenantManagement
{ {
return; return;
} }
var deleteEventData = new DeleteEventData
{
Id = id
};
await TenantRepository.DeleteAsync(tenant); await TenantRepository.DeleteAsync(tenant);
await EventBus.PublishAsync(deleteEventData);
} }
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]
@ -118,10 +131,16 @@ namespace LINGYUN.Abp.TenantManagement
} }
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]
public virtual async Task SetConnectionStringAsync(TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate) public virtual async Task<TenantConnectionStringDto> SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate)
{ {
var tenant = await TenantRepository.GetAsync(tenantConnectionStringCreateOrUpdate.Id); var tenant = await TenantRepository.GetAsync(id);
tenant.SetConnectionString(tenantConnectionStringCreateOrUpdate.Name, tenantConnectionStringCreateOrUpdate.Value); tenant.SetConnectionString(tenantConnectionStringCreateOrUpdate.Name, tenantConnectionStringCreateOrUpdate.Value);
return new TenantConnectionStringDto
{
Name = tenantConnectionStringCreateOrUpdate.Name,
Value = tenantConnectionStringCreateOrUpdate.Value
};
} }
[Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)] [Authorize(TenantManagementPermissions.Tenants.ManageConnectionStrings)]

47
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/bin/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.deps.json

@ -1,47 +0,0 @@
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.0/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"LINGYUN.TenantManagement.Application/1.0.0": {
"dependencies": {
"NETStandard.Library": "2.0.3"
},
"runtime": {
"LINGYUN.TenantManagement.Application.dll": {}
}
},
"Microsoft.NETCore.Platforms/1.1.0": {},
"NETStandard.Library/2.0.3": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0"
}
}
}
},
"libraries": {
"LINGYUN.TenantManagement.Application/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.NETCore.Platforms/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
"path": "microsoft.netcore.platforms/1.1.0",
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
},
"NETStandard.Library/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
"path": "netstandard.library/2.0.3",
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
}
}
}

23
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.AssemblyInfo.cs

@ -1,23 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("LINGYUN.TenantManagement.Application")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("LINGYUN.TenantManagement.Application")]
[assembly: System.Reflection.AssemblyTitleAttribute("LINGYUN.TenantManagement.Application")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

1
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.AssemblyInfoInputs.cache

@ -1 +0,0 @@
9d5617a3cbf2d91ca8ec140f1673a85e716a926f

BIN
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.assets.cache

Binary file not shown.

4
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.csproj.FileListAbsolute.txt

@ -1,4 +0,0 @@
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application\bin\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.deps.json
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application\bin\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.dll
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application\obj\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.AssemblyInfoInputs.cache
D:\Projects\MicroService\CRM\Vue\vue-abp\aspnet-core\modules\tenants\LINGYUN.TenantManagement.Application\obj\Debug\netstandard2.0\LINGYUN.TenantManagement.Application.AssemblyInfo.cs

BIN
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/Debug/netstandard2.0/LINGYUN.TenantManagement.Application.csprojAssemblyReference.cache

Binary file not shown.

146
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/LINGYUN.TenantManagement.Application.csproj.nuget.dgspec.json

@ -1,146 +0,0 @@
{
"format": 1,
"restore": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application\\LINGYUN.TenantManagement.Application.csproj": {}
},
"projects": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj",
"projectName": "LINGYUN.TenantManagement.Application.Contracts",
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj",
"packagesPath": "C:\\Users\\iVarKey\\.nuget\\packages\\",
"outputPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\Microsoft\\Xamarin\\NuGet\\",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\iVarKey\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"D:\\NugetLocal": {},
"http://10.21.15.28:8081/repository/nuget-hosted/": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.0": {
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"Volo.Abp.Ddd.Application": {
"target": "Package",
"version": "[2.7.0, )"
},
"Volo.Abp.TenantManagement.Domain.Shared": {
"target": "Package",
"version": "[2.7.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files (x86)\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json"
}
}
},
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application\\LINGYUN.TenantManagement.Application.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application\\LINGYUN.TenantManagement.Application.csproj",
"projectName": "LINGYUN.TenantManagement.Application",
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application\\LINGYUN.TenantManagement.Application.csproj",
"packagesPath": "C:\\Users\\iVarKey\\.nuget\\packages\\",
"outputPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\Microsoft\\Xamarin\\NuGet\\",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\iVarKey\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"D:\\NugetLocal": {},
"http://10.21.15.28:8081/repository/nuget-hosted/": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"projectReferences": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj": {
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.0": {
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"Volo.Abp.TenantManagement.Domain": {
"target": "Package",
"version": "[2.7.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files (x86)\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json"
}
}
}
}
}

15
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/LINGYUN.TenantManagement.Application.csproj.nuget.g.props

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
</Project>

9
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/LINGYUN.TenantManagement.Application.csproj.nuget.g.targets

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
</ImportGroup>
</Project>

4385
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/project.assets.json

File diff suppressed because it is too large

109
aspnet-core/modules/tenants/LINGYUN.TenantManagement.Application/obj/project.nuget.cache

@ -1,109 +0,0 @@
{
"version": 2,
"dgSpecHash": "d/WoIUJcwSFsheJYDT6158mmlupHZV2pTKKnFIa9x2zd+G20+d8fYrsQDGifroGiSYCLYuwpqWHEbxIGsK+j3Q==",
"success": true,
"projectFilePath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application\\LINGYUN.TenantManagement.Application.csproj",
"expectedPackageFiles": [
"C:\\Users\\iVarKey\\.nuget\\packages\\automapper\\9.0.0\\automapper.9.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\configureawait.fody\\3.3.1\\configureawait.fody.3.3.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\fody\\6.0.2\\fody.6.0.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\jetbrains.annotations\\2019.1.3\\jetbrains.annotations.2019.1.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.authorization\\3.1.2\\microsoft.aspnetcore.authorization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.metadata\\3.1.2\\microsoft.aspnetcore.metadata.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\1.1.0\\microsoft.bcl.asyncinterfaces.1.1.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.csharp\\4.5.0\\microsoft.csharp.4.5.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration\\3.1.2\\microsoft.extensions.configuration.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\3.1.2\\microsoft.extensions.configuration.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.binder\\3.1.2\\microsoft.extensions.configuration.binder.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.commandline\\3.1.2\\microsoft.extensions.configuration.commandline.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\3.1.2\\microsoft.extensions.configuration.environmentvariables.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\3.1.2\\microsoft.extensions.configuration.fileextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.json\\3.1.2\\microsoft.extensions.configuration.json.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.usersecrets\\3.1.2\\microsoft.extensions.configuration.usersecrets.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\3.1.2\\microsoft.extensions.dependencyinjection.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\3.1.2\\microsoft.extensions.dependencyinjection.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\3.1.2\\microsoft.extensions.fileproviders.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.composite\\3.1.2\\microsoft.extensions.fileproviders.composite.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\3.1.2\\microsoft.extensions.fileproviders.physical.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\3.1.2\\microsoft.extensions.filesystemglobbing.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.hosting.abstractions\\3.1.2\\microsoft.extensions.hosting.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization\\3.1.2\\microsoft.extensions.localization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization.abstractions\\3.1.2\\microsoft.extensions.localization.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging\\3.1.2\\microsoft.extensions.logging.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\3.1.2\\microsoft.extensions.logging.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options\\3.1.2\\microsoft.extensions.options.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options.configurationextensions\\3.1.2\\microsoft.extensions.options.configurationextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.primitives\\3.1.2\\microsoft.extensions.primitives.3.1.2.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.platforms\\1.1.0\\microsoft.netcore.platforms.1.1.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\netstandard.library\\2.0.3\\netstandard.library.2.0.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\newtonsoft.json\\12.0.3\\newtonsoft.json.12.0.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.context\\5.0.0\\nito.asyncex.context.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.coordination\\5.0.0\\nito.asyncex.coordination.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.tasks\\5.0.0\\nito.asyncex.tasks.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.collections.deque\\1.0.4\\nito.collections.deque.1.0.4.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.disposables\\2.0.0\\nito.disposables.2.0.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.buffers\\4.5.0\\system.buffers.4.5.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.collections.immutable\\1.7.0\\system.collections.immutable.1.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.componentmodel.annotations\\4.7.0\\system.componentmodel.annotations.4.7.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.dynamic.core\\1.0.19\\system.linq.dynamic.core.1.0.19.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.queryable\\4.3.0\\system.linq.queryable.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.memory\\4.5.3\\system.memory.4.5.3.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.numerics.vectors\\4.5.0\\system.numerics.vectors.4.5.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.typeextensions\\4.3.0\\system.reflection.typeextensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\4.7.0\\system.runtime.compilerservices.unsafe.4.7.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.loader\\4.3.0\\system.runtime.loader.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.encodings.web\\4.7.0\\system.text.encodings.web.4.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.json\\4.7.1\\system.text.json.4.7.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.2\\system.threading.tasks.extensions.4.5.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.auditing\\2.7.0\\volo.abp.auditing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.authorization\\2.7.0\\volo.abp.authorization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.automapper\\2.7.0\\volo.abp.automapper.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.core\\2.7.0\\volo.abp.core.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.data\\2.7.0\\volo.abp.data.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application\\2.7.0\\volo.abp.ddd.application.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application.contracts\\2.7.0\\volo.abp.ddd.application.contracts.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.domain\\2.7.0\\volo.abp.ddd.domain.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.eventbus\\2.7.0\\volo.abp.eventbus.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.features\\2.7.0\\volo.abp.features.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.guids\\2.7.0\\volo.abp.guids.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.http.abstractions\\2.7.0\\volo.abp.http.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.json\\2.7.0\\volo.abp.json.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization\\2.7.0\\volo.abp.localization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization.abstractions\\2.7.0\\volo.abp.localization.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.multitenancy\\2.7.0\\volo.abp.multitenancy.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectextending\\2.7.0\\volo.abp.objectextending.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectmapping\\2.7.0\\volo.abp.objectmapping.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.security\\2.7.0\\volo.abp.security.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.settings\\2.7.0\\volo.abp.settings.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.tenantmanagement.domain\\2.7.0\\volo.abp.tenantmanagement.domain.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.tenantmanagement.domain.shared\\2.7.0\\volo.abp.tenantmanagement.domain.shared.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.threading\\2.7.0\\volo.abp.threading.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.timing\\2.7.0\\volo.abp.timing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ui\\2.7.0\\volo.abp.ui.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.uow\\2.7.0\\volo.abp.uow.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation\\2.7.0\\volo.abp.validation.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation.abstractions\\2.7.0\\volo.abp.validation.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.virtualfilesystem\\2.7.0\\volo.abp.virtualfilesystem.2.7.0.nupkg.sha512"
],
"logs": []
}

4
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/.gitignore

@ -0,0 +1,4 @@
bin
obj
Logs
appsettings.*.json

8
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/LINGYUN/Abp/TenantManagement/TenantController.cs

@ -54,7 +54,7 @@ namespace LINGYUN.Abp.TenantManagement
} }
[HttpGet] [HttpGet]
[Route("{id}/connection-string")] [Route("{id}/connection-string/{name}")]
public virtual Task<TenantConnectionStringDto> GetConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName) public virtual Task<TenantConnectionStringDto> GetConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName)
{ {
return TenantAppService.GetConnectionStringAsync(tenantConnectionGetByName); return TenantAppService.GetConnectionStringAsync(tenantConnectionGetByName);
@ -69,13 +69,13 @@ namespace LINGYUN.Abp.TenantManagement
[HttpPut] [HttpPut]
[Route("{id}/connection-string")] [Route("{id}/connection-string")]
public virtual Task SetConnectionStringAsync(TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate) public virtual Task<TenantConnectionStringDto> SetConnectionStringAsync(Guid id, TenantConnectionStringCreateOrUpdateDto tenantConnectionStringCreateOrUpdate)
{ {
return TenantAppService.SetConnectionStringAsync(tenantConnectionStringCreateOrUpdate); return TenantAppService.SetConnectionStringAsync(id, tenantConnectionStringCreateOrUpdate);
} }
[HttpDelete] [HttpDelete]
[Route("{id}/connection-string")] [Route("{id}/connection-string/{name}")]
public virtual Task DeleteConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName) public virtual Task DeleteConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName)
{ {
return TenantAppService.DeleteConnectionStringAsync(tenantConnectionGetByName); return TenantAppService.DeleteConnectionStringAsync(tenantConnectionGetByName);

23
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.AssemblyInfo.cs

@ -1,23 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("LINGYUN.TenantManagement.HttpApi")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("LINGYUN.TenantManagement.HttpApi")]
[assembly: System.Reflection.AssemblyTitleAttribute("LINGYUN.TenantManagement.HttpApi")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

1
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.AssemblyInfoInputs.cache

@ -1 +0,0 @@
65e28ee4eecd7dbb63a4128a1f9a6ab2a9b0c42d

BIN
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.assets.cache

Binary file not shown.

BIN
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/Debug/netcoreapp3.1/LINGYUN.TenantManagement.HttpApi.csprojAssemblyReference.cache

Binary file not shown.

148
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/LINGYUN.TenantManagement.HttpApi.csproj.nuget.dgspec.json

@ -1,148 +0,0 @@
{
"format": 1,
"restore": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.HttpApi\\LINGYUN.TenantManagement.HttpApi.csproj": {}
},
"projects": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj",
"projectName": "LINGYUN.TenantManagement.Application.Contracts",
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj",
"packagesPath": "C:\\Users\\iVarKey\\.nuget\\packages\\",
"outputPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\Microsoft\\Xamarin\\NuGet\\",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\iVarKey\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
],
"originalTargetFrameworks": [
"netstandard2.0"
],
"sources": {
"D:\\NugetLocal": {},
"http://10.21.15.28:8081/repository/nuget-hosted/": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netstandard2.0": {
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netstandard2.0": {
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
},
"Volo.Abp.Ddd.Application": {
"target": "Package",
"version": "[2.7.0, )"
},
"Volo.Abp.TenantManagement.Domain.Shared": {
"target": "Package",
"version": "[2.7.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files (x86)\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json"
}
}
},
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.HttpApi\\LINGYUN.TenantManagement.HttpApi.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.HttpApi\\LINGYUN.TenantManagement.HttpApi.csproj",
"projectName": "LINGYUN.TenantManagement.HttpApi",
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.HttpApi\\LINGYUN.TenantManagement.HttpApi.csproj",
"packagesPath": "C:\\Users\\iVarKey\\.nuget\\packages\\",
"outputPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.HttpApi\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"D:\\Microsoft\\Xamarin\\NuGet\\",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder"
],
"configFilePaths": [
"C:\\Users\\iVarKey\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Xamarin.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"D:\\NugetLocal": {},
"http://10.21.15.28:8081/repository/nuget-hosted/": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {
"D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj": {
"projectPath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.Application.Contracts\\LINGYUN.TenantManagement.Application.Contracts.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"dependencies": {
"Volo.Abp.AspNetCore.Mvc": {
"target": "Package",
"version": "[2.7.0, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.AspNetCore.App": {
"privateAssets": "none"
},
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files (x86)\\dotnet\\sdk\\3.1.100\\RuntimeIdentifierGraph.json"
}
}
}
}
}

27
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/LINGYUN.TenantManagement.HttpApi.csproj.nuget.g.props

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\iVarKey\.nuget\packages\;D:\Microsoft\Xamarin\NuGet\;C:\Program Files (x86)\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Content Include="$(NuGetPackageRoot)volo.abp.aspnetcore.mvc\2.7.0\contentFiles\any\netcoreapp3.1\Properties\launchSettings.json" Condition="Exists('$(NuGetPackageRoot)volo.abp.aspnetcore.mvc\2.7.0\contentFiles\any\netcoreapp3.1\Properties\launchSettings.json')">
<NuGetPackageId>Volo.Abp.AspNetCore.Mvc</NuGetPackageId>
<NuGetPackageVersion>2.7.0</NuGetPackageVersion>
<NuGetItemType>Content</NuGetItemType>
<Private>False</Private>
<Link>Properties\launchSettings.json</Link>
</Content>
</ItemGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\iVarKey\.nuget\packages\microsoft.codeanalysis.analyzers\2.9.3</PkgMicrosoft_CodeAnalysis_Analyzers>
</PropertyGroup>
</Project>

9
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/LINGYUN.TenantManagement.HttpApi.csproj.nuget.g.targets

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.aspnetcore.mvc.razor.runtimecompilation\3.1.2\buildTransitive\netcoreapp3.1\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.aspnetcore.mvc.razor.runtimecompilation\3.1.2\buildTransitive\netcoreapp3.1\Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.targets')" />
</ImportGroup>
</Project>

4754
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/project.assets.json

File diff suppressed because it is too large

122
aspnet-core/modules/tenants/LINGYUN.TenantManagement.HttpApi/obj/project.nuget.cache

@ -1,122 +0,0 @@
{
"version": 2,
"dgSpecHash": "r0dmU6zCYwD9bEkyDCjXupeRq0tRdVdRk1NJFUEWfIWItVDV7HkVGEGku1LkpEiD/v+vja7VQpX7dbu8tXA5mQ==",
"success": true,
"projectFilePath": "D:\\Projects\\MicroService\\CRM\\Vue\\vue-abp\\aspnet-core\\modules\\tenants\\LINGYUN.TenantManagement.HttpApi\\LINGYUN.TenantManagement.HttpApi.csproj",
"expectedPackageFiles": [
"C:\\Users\\iVarKey\\.nuget\\packages\\configureawait.fody\\3.3.1\\configureawait.fody.3.3.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\fody\\6.0.2\\fody.6.0.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\jetbrains.annotations\\2019.1.3\\jetbrains.annotations.2019.1.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.authorization\\3.1.2\\microsoft.aspnetcore.authorization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.jsonpatch\\3.1.2\\microsoft.aspnetcore.jsonpatch.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.metadata\\3.1.2\\microsoft.aspnetcore.metadata.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.mvc.newtonsoftjson\\3.1.2\\microsoft.aspnetcore.mvc.newtonsoftjson.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.mvc.razor.extensions\\3.1.2\\microsoft.aspnetcore.mvc.razor.extensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.mvc.razor.runtimecompilation\\3.1.2\\microsoft.aspnetcore.mvc.razor.runtimecompilation.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.mvc.versioning\\4.1.0\\microsoft.aspnetcore.mvc.versioning.4.1.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.aspnetcore.razor.language\\3.1.2\\microsoft.aspnetcore.razor.language.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.codeanalysis.analyzers\\2.9.3\\microsoft.codeanalysis.analyzers.2.9.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.codeanalysis.common\\3.3.0\\microsoft.codeanalysis.common.3.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.codeanalysis.csharp\\3.3.0\\microsoft.codeanalysis.csharp.3.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.codeanalysis.razor\\3.1.2\\microsoft.codeanalysis.razor.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration\\3.1.2\\microsoft.extensions.configuration.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\3.1.2\\microsoft.extensions.configuration.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.binder\\3.1.2\\microsoft.extensions.configuration.binder.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.commandline\\3.1.2\\microsoft.extensions.configuration.commandline.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\3.1.2\\microsoft.extensions.configuration.environmentvariables.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\3.1.2\\microsoft.extensions.configuration.fileextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.json\\3.1.2\\microsoft.extensions.configuration.json.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.configuration.usersecrets\\3.1.2\\microsoft.extensions.configuration.usersecrets.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\3.1.2\\microsoft.extensions.dependencyinjection.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\3.1.2\\microsoft.extensions.dependencyinjection.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.dependencymodel\\3.1.2\\microsoft.extensions.dependencymodel.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\3.1.2\\microsoft.extensions.fileproviders.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.composite\\3.1.2\\microsoft.extensions.fileproviders.composite.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\3.1.2\\microsoft.extensions.fileproviders.physical.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\3.1.2\\microsoft.extensions.filesystemglobbing.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.hosting.abstractions\\3.1.2\\microsoft.extensions.hosting.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization\\3.1.2\\microsoft.extensions.localization.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.localization.abstractions\\3.1.2\\microsoft.extensions.localization.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging\\3.1.2\\microsoft.extensions.logging.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\3.1.2\\microsoft.extensions.logging.abstractions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options\\3.1.2\\microsoft.extensions.options.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.options.configurationextensions\\3.1.2\\microsoft.extensions.options.configurationextensions.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.extensions.primitives\\3.1.2\\microsoft.extensions.primitives.3.1.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\microsoft.netcore.platforms\\2.1.2\\microsoft.netcore.platforms.2.1.2.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\newtonsoft.json\\12.0.3\\newtonsoft.json.12.0.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\newtonsoft.json.bson\\1.0.2\\newtonsoft.json.bson.1.0.2.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.context\\5.0.0\\nito.asyncex.context.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.coordination\\5.0.0\\nito.asyncex.coordination.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.asyncex.tasks\\5.0.0\\nito.asyncex.tasks.5.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.collections.deque\\1.0.4\\nito.collections.deque.1.0.4.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nito.disposables\\2.0.0\\nito.disposables.2.0.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\nuglify\\1.5.13\\nuglify.1.5.13.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.collections.immutable\\1.7.0\\system.collections.immutable.1.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.componentmodel.annotations\\4.7.0\\system.componentmodel.annotations.4.7.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.dynamic.core\\1.0.19\\system.linq.dynamic.core.1.0.19.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.linq.queryable\\4.3.0\\system.linq.queryable.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.memory\\4.5.3\\system.memory.4.5.3.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.metadata\\1.6.0\\system.reflection.metadata.1.6.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.reflection.typeextensions\\4.3.0\\system.reflection.typeextensions.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\4.5.2\\system.runtime.compilerservices.unsafe.4.5.2.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.runtime.loader\\4.3.0\\system.runtime.loader.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.encoding.codepages\\4.5.1\\system.text.encoding.codepages.4.5.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.text.json\\4.7.1\\system.text.json.4.7.1.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512",
"C:\\Program Files (x86)\\dotnet\\sdk\\NuGetFallbackFolder\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.3\\system.threading.tasks.extensions.4.5.3.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.apiversioning.abstractions\\2.7.0\\volo.abp.apiversioning.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.aspnetcore\\2.7.0\\volo.abp.aspnetcore.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.aspnetcore.mvc\\2.7.0\\volo.abp.aspnetcore.mvc.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.aspnetcore.mvc.contracts\\2.7.0\\volo.abp.aspnetcore.mvc.contracts.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.auditing\\2.7.0\\volo.abp.auditing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.authorization\\2.7.0\\volo.abp.authorization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.core\\2.7.0\\volo.abp.core.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.data\\2.7.0\\volo.abp.data.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application\\2.7.0\\volo.abp.ddd.application.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.application.contracts\\2.7.0\\volo.abp.ddd.application.contracts.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ddd.domain\\2.7.0\\volo.abp.ddd.domain.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.eventbus\\2.7.0\\volo.abp.eventbus.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.features\\2.7.0\\volo.abp.features.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.guids\\2.7.0\\volo.abp.guids.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.http\\2.7.0\\volo.abp.http.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.http.abstractions\\2.7.0\\volo.abp.http.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.json\\2.7.0\\volo.abp.json.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization\\2.7.0\\volo.abp.localization.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.localization.abstractions\\2.7.0\\volo.abp.localization.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.minify\\2.7.0\\volo.abp.minify.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.multitenancy\\2.7.0\\volo.abp.multitenancy.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectextending\\2.7.0\\volo.abp.objectextending.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.objectmapping\\2.7.0\\volo.abp.objectmapping.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.security\\2.7.0\\volo.abp.security.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.settings\\2.7.0\\volo.abp.settings.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.tenantmanagement.domain.shared\\2.7.0\\volo.abp.tenantmanagement.domain.shared.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.threading\\2.7.0\\volo.abp.threading.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.timing\\2.7.0\\volo.abp.timing.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.ui\\2.7.0\\volo.abp.ui.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.uow\\2.7.0\\volo.abp.uow.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation\\2.7.0\\volo.abp.validation.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.validation.abstractions\\2.7.0\\volo.abp.validation.abstractions.2.7.0.nupkg.sha512",
"C:\\Users\\iVarKey\\.nuget\\packages\\volo.abp.virtualfilesystem\\2.7.0\\volo.abp.virtualfilesystem.2.7.0.nupkg.sha512"
],
"logs": []
}

34
aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs

@ -1,12 +1,13 @@
using IdentityServer4.Validation; using DotNetCore.CAP;
using LINGYUN.ApiGateway; using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.IdentityServer;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
using StackExchange.Redis; using StackExchange.Redis;
using System; using System;
@ -25,26 +26,18 @@ using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL; using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer;
using Volo.Abp.IdentityServer.EntityFrameworkCore; using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore; using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Threading; using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation.Urls; using Volo.Abp.UI.Navigation.Urls;
using LINGYUN.Abp.IdentityServer;
using AbpPermissionManagementApplicationModule = LINGYUN.Abp.PermissionManagement.AbpPermissionManagementApplicationModule;
namespace AuthServer.Host namespace AuthServer.Host
{ {
[DependsOn( [DependsOn(
typeof(ApiGatewayApplicationContractsModule),
typeof(AbpIdentityServerApplicationModule), typeof(AbpIdentityServerApplicationModule),
typeof(AbpIdentityServerHttpApiModule), typeof(AbpIdentityServerHttpApiModule),
typeof(AbpAccountApplicationModule), typeof(AbpAccountApplicationModule),
@ -53,6 +46,7 @@ namespace AuthServer.Host
typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMvcModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAutofacModule), typeof(AbpAutofacModule),
typeof(AbpCAPEventBusModule),
typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpIdentityHttpApiModule), typeof(AbpIdentityHttpApiModule),
typeof(AbpIdentityApplicationModule), typeof(AbpIdentityApplicationModule),
@ -60,9 +54,6 @@ namespace AuthServer.Host
typeof(AbpIdentityServerEntityFrameworkCoreModule), typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule), typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule) typeof(AbpAspNetCoreAuthenticationJwtBearerModule)
)] )]
@ -70,6 +61,21 @@ namespace AuthServer.Host
{ {
private const string DefaultCorsPolicyName = "Default"; private const string DefaultCorsPolicyName = "Default";
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
PreConfigure<CapOptions>(options =>
{
options
.UseMySql(configuration.GetConnectionString("Default"))
.UseRabbitMQ(rabbitMQOptions =>
{
configuration.GetSection("CAP:RabbitMQ").Bind(rabbitMQOptions);
});
});
}
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var hostingEnvironment = context.Services.GetHostingEnvironment(); var hostingEnvironment = context.Services.GetHostingEnvironment();

8
aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj

@ -6,6 +6,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetCore.CAP.MySql" Version="3.0.3" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="3.0.3" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> <PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Enrichers.Assembly" Version="2.0.0" /> <PackageReference Include="Serilog.Enrichers.Assembly" Version="2.0.0" />
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.1" /> <PackageReference Include="Serilog.Enrichers.Process" Version="2.0.1" />
@ -34,16 +36,14 @@
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="2.7.0" /> <PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="2.7.0" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="2.7.0" /> <PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="2.7.0" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="2.7.0" /> <PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="2.7.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="2.7.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="2.7.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="2.7.0" /> <PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="2.7.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\LINGYUN.ApiGateway.Application.Contracts.csproj" /> <ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Common.EventBus\LINGYUN.Common.EventBus.csproj" />
<ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.IdentityServer.Application\LINGYUN.IdentityServer.Application.csproj" /> <ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.IdentityServer.Application\LINGYUN.IdentityServer.Application.csproj" />
<ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.IdentityServer.HttpApi\LINGYUN.IdentityServer.HttpApi.csproj" /> <ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.IdentityServer.HttpApi\LINGYUN.IdentityServer.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\permissions\LINGYUN.Abp.PermissionManagement.Application\LINGYUN.Abp.PermissionManagement.Application.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

44
aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs

@ -0,0 +1,44 @@
using LINGYUN.Common.EventBus.Tenants;
using System.Threading.Tasks;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Identity;
using Volo.Abp.DependencyInjection;
using Microsoft.Extensions.Logging;
using Volo.Abp.MultiTenancy;
namespace AuthServer.Host.EventBus.Handlers
{
public class TenantCreateEventHandler : IDistributedEventHandler<CreateEventData>, ITransientDependency
{
protected ILogger<TenantCreateEventHandler> Logger { get; }
protected ICurrentTenant CurrentTenant { get; }
protected IIdentityDataSeeder IdentityDataSeeder { get; }
public TenantCreateEventHandler(
ICurrentTenant currentTenant,
IIdentityDataSeeder identityDataSeeder,
ILogger<TenantCreateEventHandler> logger)
{
Logger = logger;
CurrentTenant = currentTenant;
IdentityDataSeeder = identityDataSeeder;
}
public async Task HandleEventAsync(CreateEventData eventData)
{
using (CurrentTenant.Change(eventData.Id, eventData.Name))
{
var identitySeedResult = await IdentityDataSeeder
.SeedAsync(eventData.AdminEmailAddress, eventData.AdminPassword, eventData.Id);
if (!identitySeedResult.CreatedAdminUser)
{
Logger.LogWarning("Tenant {0} admin user {1} not created!", eventData.Name, eventData.AdminEmailAddress);
}
if (!identitySeedResult.CreatedAdminRole)
{
Logger.LogWarning("Tenant {0} admin role not created!", eventData.Name);
}
}
}
}
}

23
aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/Ocelot/Middleware/Multiplexer/AbpApiDefinitionResponseAggregator.cs → aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/Ocelot/Middleware/Multiplexer/AbpApiDefinitionAggregator.cs

@ -14,22 +14,18 @@ namespace Ocelot.Middleware.Multiplexer
{ {
public async Task<DownstreamResponse> Aggregate(List<DownstreamContext> responses) public async Task<DownstreamResponse> Aggregate(List<DownstreamContext> responses)
{ {
var isAbpResponse = responses.Any(response => response.DownstreamResponse.Headers.Any(h => h.Key.Equals("_abperrorformat"))); // Ocelot抛弃了下游主机返回的HttpHeaders,所以没法判断是否为abp返回格式
// var isAbpResponse = responses.Any(response => response.DownstreamResponse.Headers.Any(h => h.Key.Equals("_abperrorformat")));
return await MapAbpApiDefinitionAggregateContentAsync(responses); return await MapAbpApiDefinitionAggregateContentAsync(responses);
//if (isAbpResponse)
//{
// return await MapAbpApiDefinitionAggregateContentAsync(responses);
//}
//else
//{
// return await MapSimpleJsonAggregateContentAsync(responses);
//}
} }
protected virtual async Task<DownstreamResponse> MapAbpApiDefinitionAggregateContentAsync(List<DownstreamContext> downstreamContexts) protected virtual async Task<DownstreamResponse> MapAbpApiDefinitionAggregateContentAsync(List<DownstreamContext> downstreamContexts)
{ {
var responseKeys = downstreamContexts.Select(s => s.DownstreamReRoute.Key).Distinct().ToList(); var responseKeys = downstreamContexts.Select(s => s.DownstreamReRoute.Key).Distinct().ToList();
JObject responseObject = null; JObject responseObject = null;
JsonMergeSettings mergeSetting = new JsonMergeSettings();
mergeSetting.MergeArrayHandling = MergeArrayHandling.Union;
mergeSetting.PropertyNameComparison = System.StringComparison.CurrentCultureIgnoreCase;
for (var k = 0; k < responseKeys.Count; k++) for (var k = 0; k < responseKeys.Count; k++)
{ {
var contexts = downstreamContexts.Where(w => w.DownstreamReRoute.Key == responseKeys[k]).ToList(); var contexts = downstreamContexts.Where(w => w.DownstreamReRoute.Key == responseKeys[k]).ToList();
@ -48,7 +44,7 @@ namespace Ocelot.Middleware.Multiplexer
} }
else else
{ {
responseObject.Merge(contentObject); responseObject.Merge(contentObject, mergeSetting);
} }
} }
else else
@ -68,7 +64,7 @@ namespace Ocelot.Middleware.Multiplexer
} }
else else
{ {
responseObject.Merge(contentObject); responseObject.Merge(contentObject, mergeSetting);
} }
} }
} }
@ -79,7 +75,8 @@ namespace Ocelot.Middleware.Multiplexer
Headers = { ContentType = new MediaTypeHeaderValue("application/json") } Headers = { ContentType = new MediaTypeHeaderValue("application/json") }
}; };
stringContent.Headers.Add("_abperrorformat", "true"); stringContent.Headers.Add("_abperrorformat", "true");
return new DownstreamResponse(stringContent, HttpStatusCode.OK, new List<KeyValuePair<string, IEnumerable<string>>>(), "cannot return from aggregate..which reason phrase would you use?"); return new DownstreamResponse(stringContent, HttpStatusCode.OK,
new List<KeyValuePair<string, IEnumerable<string>>>(), "OK");
} }
protected virtual async Task<DownstreamResponse> MapSimpleJsonAggregateContentAsync(List<DownstreamContext> downstreamContexts) protected virtual async Task<DownstreamResponse> MapSimpleJsonAggregateContentAsync(List<DownstreamContext> downstreamContexts)
@ -145,7 +142,7 @@ namespace Ocelot.Middleware.Multiplexer
Headers = { ContentType = new MediaTypeHeaderValue("application/json") } Headers = { ContentType = new MediaTypeHeaderValue("application/json") }
}; };
return new DownstreamResponse(stringContent, HttpStatusCode.OK, new List<KeyValuePair<string, IEnumerable<string>>>(), "cannot return from aggregate..which reason phrase would you use?"); return new DownstreamResponse(stringContent, HttpStatusCode.OK, new List<KeyValuePair<string, IEnumerable<string>>>(), "OK");
} }
} }

4
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/.gitignore

@ -0,0 +1,4 @@
bin
obj
Logs
appsettings.*.json

110
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs

@ -0,0 +1,110 @@
using LINGYUN.Common.EventBus.Tenants;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
namespace LINGYUN.Platform.EventBus.Handlers
{
public class TenantCreateEventHandler : IDistributedEventHandler<CreateEventData>, ITransientDependency
{
protected ICurrentTenant CurrentTenant { get; }
protected IGuidGenerator GuidGenerator { get; }
protected IUnitOfWorkManager UnitOfWorkManager { get; }
protected IPermissionGrantRepository PermissionGrantRepository { get; }
protected IPermissionDefinitionManager PermissionDefinitionManager { get; }
public TenantCreateEventHandler(
ICurrentTenant currentTenant,
IGuidGenerator guidGenerator,
IUnitOfWorkManager unitOfWorkManager,
IPermissionGrantRepository permissionGrantRepository,
IPermissionDefinitionManager permissionDefinitionManager)
{
CurrentTenant = currentTenant;
GuidGenerator = guidGenerator;
UnitOfWorkManager = unitOfWorkManager;
PermissionGrantRepository = permissionGrantRepository;
PermissionDefinitionManager = permissionDefinitionManager;
}
public async Task HandleEventAsync(CreateEventData eventData)
{
using (var unitOfWork = UnitOfWorkManager.Begin())
{
// 订阅租户新增事件,置入管理员角色所有权限
using (CurrentTenant.Change(eventData.Id, eventData.Name))
{
var definitionPermissions = PermissionDefinitionManager.GetPermissions();
var grantPermissions = definitionPermissions.Select(p => p.Name).ToArray();
//var grantPermissions = new List<PermissionGrant>();
//foreach (var permission in definitionPermissions)
//{
// var permissionGrant = new PermissionGrant(GuidGenerator.Create(),
// permission.Name, "R", "admin", eventData.Id);
// grantPermissions.Add(permissionGrant);
//}
// TODO: MySql 批量新增还是一条一条的语句?
// await PermissionGrantRepository.GetDbSet().AddRangeAsync(grantPermissions);
var permissionEntityType = PermissionGrantRepository.GetDbContext()
.Model.FindEntityType(typeof(PermissionGrant));
var permissionTableName = permissionEntityType.GetTableName();
var batchInsertPermissionSql = string.Empty;
if (PermissionGrantRepository.GetDbContext().Database.IsMySql())
{
batchInsertPermissionSql = BuildMySqlBatchInsertScript(permissionTableName, eventData.Id, grantPermissions);
}
else
{
batchInsertPermissionSql = BuildSqlServerBatchInsertScript(permissionTableName, eventData.Id, grantPermissions);
}
await PermissionGrantRepository.GetDbContext().Database.ExecuteSqlRawAsync(batchInsertPermissionSql);
await unitOfWork.CompleteAsync();
}
}
}
protected virtual string BuildMySqlBatchInsertScript(string tableName, Guid tenantId, string[] permissions)
{
var batchRmovePermissionSql = new StringBuilder(128);
batchRmovePermissionSql.AppendLine($"INSERT INTO `{tableName}`(`Id`, `TenantId`, `Name`, `ProviderName`, `ProviderKey`)");
batchRmovePermissionSql.AppendLine("VALUES");
for (int i = 0; i < permissions.Length; i++)
{
batchRmovePermissionSql.AppendLine($"(UUID(), '{tenantId}','{permissions[i]}','R','admin')");
if(i < permissions.Length - 1)
{
batchRmovePermissionSql.AppendLine(",");
}
}
return batchRmovePermissionSql.ToString();
}
protected virtual string BuildSqlServerBatchInsertScript(string tableName, Guid tenantId, string[] permissions)
{
var batchRmovePermissionSql = new StringBuilder(128);
batchRmovePermissionSql.AppendLine($"INSERT INTO {tableName}(Id, TenantId, Name, ProviderName, ProviderKey)");
batchRmovePermissionSql.Append("VALUES");
for (int i = 0; i < permissions.Length; i++)
{
batchRmovePermissionSql.AppendLine($"(NEWID(), '{tenantId}','{permissions[i]}','R','admin')");
if (i < permissions.Length - 1)
{
batchRmovePermissionSql.AppendLine(",");
}
}
return batchRmovePermissionSql.ToString();
}
}
}

82
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs

@ -0,0 +1,82 @@
using LINGYUN.Common.EventBus.Tenants;
using Microsoft.EntityFrameworkCore;
using System;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
namespace LINGYUN.Platform.EventBus.Handlers
{
public class TenantDeleteEventHandler : IDistributedEventHandler<DeleteEventData>, ITransientDependency
{
protected ICurrentTenant CurrentTenant { get; }
protected IGuidGenerator GuidGenerator { get; }
protected IUnitOfWorkManager UnitOfWorkManager { get; }
protected IPermissionGrantRepository PermissionGrantRepository { get; }
public TenantDeleteEventHandler(
ICurrentTenant currentTenant,
IGuidGenerator guidGenerator,
IUnitOfWorkManager unitOfWorkManager,
IPermissionGrantRepository permissionGrantRepository)
{
CurrentTenant = currentTenant;
GuidGenerator = guidGenerator;
UnitOfWorkManager = unitOfWorkManager;
PermissionGrantRepository = permissionGrantRepository;
}
public async Task HandleEventAsync(DeleteEventData eventData)
{
using (var unitOfWork = UnitOfWorkManager.Begin())
{
// 订阅租户删除事件,删除管理员角色所有权限
// TODO: 租户貌似不存在了,删除应该会失败
using (CurrentTenant.Change(eventData.Id))
{
var grantPermissions = await PermissionGrantRepository.GetListAsync("R", "admin");
// EfCore MySql 批量删除还是一条一条的语句?
// PermissionGrantRepository.GetDbSet().RemoveRange(grantPermissions);
var permissionEntityType = PermissionGrantRepository.GetDbContext().Model.FindEntityType(typeof(PermissionGrant));
var permissionTableName = permissionEntityType.GetTableName();
var batchRmovePermissionSql = string.Empty;
if (PermissionGrantRepository.GetDbContext().Database.IsMySql())
{
batchRmovePermissionSql = BuildMySqlBatchDeleteScript(permissionTableName, eventData.Id);
}
else
{
batchRmovePermissionSql = BuildSqlServerBatchDeleteScript(permissionTableName, eventData.Id);
}
await PermissionGrantRepository.GetDbContext().Database
.ExecuteSqlRawAsync(batchRmovePermissionSql);
await unitOfWork.CompleteAsync();
}
}
}
protected virtual string BuildMySqlBatchDeleteScript(string tableName, Guid tenantId)
{
var batchRmovePermissionSql = new StringBuilder(128);
batchRmovePermissionSql.AppendLine($"DELETE FROM `{tableName}` WHERE `TenantId` = '{tenantId}'");
batchRmovePermissionSql.AppendLine("AND `ProviderName`='R' AND `ProviderKey`='admin'");
return batchRmovePermissionSql.ToString();
}
protected virtual string BuildSqlServerBatchDeleteScript(string tableName, Guid tenantId)
{
var batchRmovePermissionSql = new StringBuilder(128);
batchRmovePermissionSql.AppendLine($"DELETE {tableName} WHERE TenantId = '{tenantId}'");
batchRmovePermissionSql.AppendLine("AND ProviderName='R' AND ProviderKey='admin'");
return batchRmovePermissionSql.ToString();
}
}
}

47
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj

@ -0,0 +1,47 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>LINGYUN.Platform</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNetCore.CAP.MySql" Version="3.0.3" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="3.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.1.3" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.1.3" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Enrichers.Assembly" Version="2.0.0" />
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.1" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.4.1" />
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="2.7.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="2.7.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" Version="2.7.0" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="2.7.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="2.7.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="2.7.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="2.7.0" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="2.7.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="2.7.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\modules\apigateway\LINGYUN.ApiGateway.Application.Contracts\LINGYUN.ApiGateway.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.IdentityServer.Application.Contracts\LINGYUN.IdentityServer.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\modules\permissions\LINGYUN.Abp.PermissionManagement.Application\LINGYUN.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\settings\LINGYUN.Abp.SettingManagement.Application.Contracts\LINGYUN.Abp.SettingManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\modules\tenants\LINGYUN.TenantManagement.Application\LINGYUN.TenantManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\tenants\LINGYUN.TenantManagement.HttpApi\LINGYUN.TenantManagement.HttpApi.csproj" />
</ItemGroup>
</Project>

35
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/MultiTenancy/AuthorizationTenantResolveContributor.cs

@ -0,0 +1,35 @@
using Microsoft.AspNetCore.Http;
using System.Linq;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
namespace LINGYUN.Platform.MultiTenancy
{
public class AuthorizationTenantResolveContributor : HttpTenantResolveContributorBase
{
public override string Name => "Authorization";
protected override string GetTenantIdOrNameFromHttpContextOrNull(ITenantResolveContext context, HttpContext httpContext)
{
if (httpContext.User?.Identity == null)
{
return null;
}
if (!httpContext.User.Identity.IsAuthenticated)
{
return null;
}
var tenantIdKey = context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey;
var tenantClaim = httpContext.User.Claims.FirstOrDefault(x => x.Type.Equals(AbpClaimTypes.TenantId));
if (tenantClaim == null)
{
return null;
}
return tenantClaim.Value;
}
}
}

168
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/PlatformHttpApiHostModule.cs

@ -0,0 +1,168 @@
using DotNetCore.CAP;
using IdentityModel;
using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.IdentityServer;
using LINGYUN.Abp.SettingManagement;
using LINGYUN.Abp.TenantManagement;
using LINGYUN.ApiGateway;
using LINGYUN.Platform.MultiTenancy;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using Volo.Abp;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.Autofac;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.PermissionManagement.IdentityServer;
using Volo.Abp.Security.Claims;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using AbpPermissionManagementApplicationModule = LINGYUN.Abp.PermissionManagement.AbpPermissionManagementApplicationModule;
namespace LINGYUN.Platform
{
[DependsOn(
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpPermissionManagementDomainIdentityServerModule),
typeof(ApiGatewayApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpIdentityServerApplicationContractsModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpTenantManagementHttpApiModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpCAPEventBusModule),
typeof(AbpAutofacModule)
)]
public class PlatformHttpApiHostModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
PreConfigure<CapOptions>(options =>
{
options
.UseMySql(configuration.GetConnectionString("Default"))
.UseRabbitMQ(rabbitMQOptions =>
{
configuration.GetSection("CAP:RabbitMQ").Bind(rabbitMQOptions);
});
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = hostingEnvironment.BuildConfiguration();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
// 多租户
Configure<AbpMultiTenancyOptions>(options =>
{
options.IsEnabled = true;
});
Configure<AbpTenantResolveOptions>(options =>
{
options.TenantResolvers.Insert(0, new AuthorizationTenantResolveContributor());
});
// Swagger
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "Platform API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
// 支持本地化语言类型
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
});
context.Services.AddAuthentication("Bearer")
.AddIdentityServerAuthentication(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.ApiName = configuration["AuthServer:ApiName"];
AbpClaimTypes.UserId = JwtClaimTypes.Subject;
AbpClaimTypes.UserName = JwtClaimTypes.Name;
AbpClaimTypes.Role = JwtClaimTypes.Role;
AbpClaimTypes.Email = JwtClaimTypes.Email;
});
context.Services.AddStackExchangeRedisCache(options =>
{
options.Configuration = configuration["RedisCache:ConnectString"];
var instanceName = configuration["RedisCache:RedisPrefix"];
options.InstanceName = instanceName.IsNullOrEmpty() ? "Platform_Cache" : instanceName;
});
if (!hostingEnvironment.IsDevelopment())
{
var redis = ConnectionMultiplexer.Connect(configuration["RedisCache:ConnectString"]);
context.Services
.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "Platform-Protection-Keys");
}
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
// http调用链
app.UseCorrelationId();
// 虚拟文件系统
app.UseVirtualFiles();
// 本地化
app.UseAbpRequestLocalization();
//路由
app.UseRouting();
// 认证
app.UseAuthentication();
// 多租户
app.UseMultiTenancy();
// Swagger
app.UseSwagger();
// Swagger可视化界面
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support Platform API");
});
// 审计日志
app.UseAuditing();
// 路由
app.UseMvcWithDefaultRouteAndArea();
}
}
}

49
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Program.cs

@ -0,0 +1,49 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Serilog;
using System;
using System.IO;
namespace LINGYUN.Platform
{
public class Program
{
public static int Main(string[] args)
{
var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production";
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile($"appsettings.{env}.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(configuration)
.CreateLogger();
try
{
Log.Information("Starting web host.");
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseSerilog()
.UseAutofac();
}
}

20
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Properties/launchSettings.json

@ -0,0 +1,20 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:54521",
"sslPort": 0
}
},
"profiles": {
"LINGYUN.Platform.HttpApi.Host": {
"commandName": "Project",
"launchBrowser": false,
"applicationUrl": "http://localhost:30010",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

18
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Startup.cs

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace LINGYUN.Platform
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<PlatformHttpApiHostModule>();
}
public void Configure(IApplicationBuilder app)
{
app.InitializeApplication();
}
}
}

6
aspnet-core/services/start-all-service.bat

@ -0,0 +1,6 @@
@echo off
cls
start .\start-identity-server.bat --run
start .\start-apigateway-admin.bat --run
start .\start-platform.bat --run

6
aspnet-core/services/start-all.bat

@ -1,6 +0,0 @@
@echo off
cls
start .\start-identity-server.bat --run
start .\start-apigateway-admin.cmd --run
start .\start-apigateway-host.cmd --run

1
aspnet-core/services/start-apigateway-admin.cmd → aspnet-core/services/start-apigateway-admin.bat

@ -9,6 +9,7 @@ cd .\apigateway\LINGYUN.ApiGateway.HttpApi.Host
if '%1' equ '--publish' goto publish if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore if '%1' equ '--restore' goto restore
if '%1' equ '' goto run
:publish :publish

0
aspnet-core/services/start-apigateway-host.cmd → aspnet-core/services/start-apigateway-host.bat

1
aspnet-core/services/start-identity-server.bat

@ -9,6 +9,7 @@ cd .\account\AuthServer.Host
if '%1' equ '--publish' goto publish if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore if '%1' equ '--restore' goto restore
if '%1' equ '' goto run
exit exit
:publish :publish

29
aspnet-core/services/start-platform.bat

@ -0,0 +1,29 @@
@echo off
cls
chcp 65001
echo. 启动平台管理服务
cd .\platform\LINGYUN.Platform.HttpApi.Host
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore
if '%1' equ '' goto run
exit
:publish
dotnet publish -c Release -o ..\..\Publish\platform --no-cache --no-restore
copy Dockerfile ..\..\Publish\platform\Dockerfile
pause
exit
:run
dotnet run
pause
exit
:restore
dotnet restore
pause
exit

4
vueJs/src/api/apigateway.ts

@ -465,6 +465,10 @@ export class AggregateReRouteConfig {
export class AggregateReRouteConfigCreate extends AggregateReRouteConfig { export class AggregateReRouteConfigCreate extends AggregateReRouteConfig {
routeId = '' routeId = ''
public static empty() {
return new AggregateReRouteConfigCreate()
}
} }
export class AggregateReRouteBase { export class AggregateReRouteBase {

2
vueJs/src/api/permission.ts

@ -1,7 +1,7 @@
import { IPermission } from './types' import { IPermission } from './types'
import ApiService from './serviceBase' import ApiService from './serviceBase'
const serviceUrl = process.env.VUE_APP_BASE_IDENTITY_SERVICE const serviceUrl = process.env.VUE_APP_BASE_API
export default class PermissionService { export default class PermissionService {
/** /**

88
vueJs/src/api/tenant.ts

@ -1,8 +1,8 @@
import { pagerFormat } from '@/utils' import { pagerFormat } from '@/utils'
import { PagedResultDto, PagedAndSortedResultRequestDto } from './types' import { ListResultDto, PagedResultDto, PagedAndSortedResultRequestDto, FullAuditedEntityDto } from './types'
import ApiService from './serviceBase' import ApiService from './serviceBase'
const serviceUrl = process.env.VUE_APP_BASE_IDENTITY_SERVICE const serviceUrl = process.env.VUE_APP_BASE_API
export default class TenantService { export default class TenantService {
public static getTenantByName(name: string) { public static getTenantByName(name: string) {
@ -11,7 +11,13 @@ export default class TenantService {
return ApiService.Get<FindTenantResult>(_url, serviceUrl) return ApiService.Get<FindTenantResult>(_url, serviceUrl)
} }
public static getTenants(payload: TenantGetRequestDto) { public static getTenantById(id: string) {
let _url = '/api/multi-tenancy/tenants/'
_url += id
return ApiService.Get<TenantDto>(_url, serviceUrl)
}
public static getTenants(payload: TenantGetByPaged) {
let _url = '/api/multi-tenancy/tenants' let _url = '/api/multi-tenancy/tenants'
_url += '?filter=' + payload.filter _url += '?filter=' + payload.filter
_url += '&sorting=' + payload.sorting _url += '&sorting=' + payload.sorting
@ -19,10 +25,53 @@ export default class TenantService {
_url += '&maxResultCount=' + payload.maxResultCount _url += '&maxResultCount=' + payload.maxResultCount
return ApiService.Get<PagedResultDto<TenantDto>>(_url, serviceUrl) return ApiService.Get<PagedResultDto<TenantDto>>(_url, serviceUrl)
} }
public static createTenant(payload: TenantCreateOrEdit) {
const _url = '/api/multi-tenancy/tenants'
return ApiService.Post<TenantDto>(_url, payload, serviceUrl)
}
public static changeTenantName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/'
_url += id
return ApiService.Put<TenantDto>(_url, { name: name }, serviceUrl)
}
public static deleteTenant(id: string) {
let _url = '/api/multi-tenancy/tenants/'
_url += id
return ApiService.Delete(_url, serviceUrl)
}
public static getTenantConnections(id: string) {
let _url = '/api/multi-tenancy/tenants/'
_url += id + '/concatenation'
return ApiService.Get<ListResultDto<TenantConnectionString>>(_url, serviceUrl)
}
public static getTenantConnectionByName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/'
_url += id + '/concatenation/'
_url += name
return ApiService.Get<TenantConnectionString>(_url, serviceUrl)
}
public static setTenantConnection(id: string, payload: TenantConnectionString) {
let _url = '/api/multi-tenancy/tenants/'
_url += id + '/concatenation'
return ApiService.Put<TenantConnectionString>(_url, payload, serviceUrl)
}
public static deleteTenantConnectionByName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/'
_url += id + '/concatenation/'
_url += name
return ApiService.Delete(_url, serviceUrl)
}
} }
/** 租户查询过滤对象 */ /** 租户查询过滤对象 */
export class TenantGetRequestDto extends PagedAndSortedResultRequestDto { export class TenantGetByPaged extends PagedAndSortedResultRequestDto {
/** 查询过滤字段 */ /** 查询过滤字段 */
filter: string | undefined filter: string | undefined
@ -35,14 +84,43 @@ export class TenantGetRequestDto extends PagedAndSortedResultRequestDto {
} }
} }
/** 租户创建对象 */
export class TenantCreateOrEdit {
/** 管理员邮件地址 */
adminEmailAddress = ''
/** 管理员密码 */
adminPassword = ''
/** 租户名称 */
name = ''
public static empty() {
return new TenantCreateOrEdit()
}
}
/** 租户对象 */ /** 租户对象 */
export class TenantDto { export class TenantDto extends FullAuditedEntityDto {
/** 租户标识 */ /** 租户标识 */
id!: string id!: string
/** 租户名称 */ /** 租户名称 */
name!: string name!: string
} }
/** 租户连接字符串 */
export class TenantConnectionString {
/** 名称 */
name!: string
/** 值 */
value!: string
public static empty() {
const tenantConnection = new TenantConnectionString()
tenantConnection.name = ''
tenantConnection.value = ''
return tenantConnection
}
}
export class FindTenantResult { export class FindTenantResult {
name!: string name!: string
tenantId!: string tenantId!: string

34
vueJs/src/lang/zh.ts

@ -67,6 +67,7 @@ export default {
admin: '管理页', admin: '管理页',
users: '用户管理', users: '用户管理',
roles: '角色管理', roles: '角色管理',
tenants: '租户管理',
settings: '配置管理', settings: '配置管理',
apigateway: '网关管理', apigateway: '网关管理',
group: '路由分组', group: '路由分组',
@ -376,13 +377,19 @@ export default {
aggregateRouteName: '聚合名称', aggregateRouteName: '聚合名称',
reRouteKeys: '路由标识列表', reRouteKeys: '路由标识列表',
aggregateOptions: '聚合选项', aggregateOptions: '聚合选项',
routeKeysConfig: '路由配置',
updateAggregateRoute: '编辑聚合', updateAggregateRoute: '编辑聚合',
updateAggregateRouteByName: '编辑聚合 {name}', updateAggregateRouteByName: '编辑聚合 {name}',
deleteAggregateRoute: '删除聚合', deleteAggregateRoute: '删除聚合',
deleteAggregateRouteByName: '删除聚合 {name}', deleteAggregateRouteByName: '删除聚合 {name}',
deleteAggregateRouteSuccess: '聚合路由 {name} 已删除!', deleteAggregateRouteSuccess: '聚合路由 {name} 已删除!',
createAggregateRouteKey: '新建聚合参数', createAggregateRouteKey: '新建聚合参数',
aggregateRouteKey: '聚合路由标识', deleteAggregateRouteConfig: '删除配置',
deleteAggregateRouteConfigByKey: '删除路由配置 {key}',
deleteAggregateRouteConfigSuccess: '路由配置 {key} 已删除!',
createAggregateRouteConfigSuccess: '路由配置 {key} 已添加!',
createAggregateRouteConfig: '新建路由配置',
aggregateRouteKey: '路由标识',
aggregateParameter: '聚合参数', aggregateParameter: '聚合参数',
aggregateJsonPath: 'Json路径' aggregateJsonPath: 'Json路径'
}, },
@ -528,6 +535,28 @@ export default {
createIdentityPropertySuccess: '身份资源属性: {key} 已添加!', createIdentityPropertySuccess: '身份资源属性: {key} 已添加!',
createIdentityProperty: '添加身份资源属性' createIdentityProperty: '添加身份资源属性'
}, },
tenant: {
createTenant: '创建租户',
updateTenant: '编辑租户',
deleteTenant: '删除租户',
createTenantSuccess: '租户 {name} 已添加!',
deleteTenantByName: '删除租户 {name}',
deleteTenantSuccess: '租户 {name} 已删除!',
tenantNameChanged: '租户名称 {name} 已变更!',
id: '租户标识',
name: '租户名称',
changeTenantName: '变更租户名称',
connectionOptions: '连接配置',
adminEmailAddress: '管理员邮件',
adminPassword: '管理员密码',
connectionName: '连接名称',
connectionString: '连接字符串',
setTenantConnection: '设置连接',
deleteConnection: '删除连接',
setTenantConnectionSuccess: '租户连接 {name} 已添加!',
deleteTenantConnectionName: '删除租户连接 {name}',
deleteTenantConnectionSuccess: '租户连接 {name} 已删除!',
},
global: { global: {
name: '名称', name: '名称',
displayName: '显示名称', displayName: '显示名称',
@ -552,6 +581,7 @@ export default {
lastModificationTime: '修改时间', lastModificationTime: '修改时间',
otherOpera: '更多操作', otherOpera: '更多操作',
cancel: '取 消', cancel: '取 消',
confirm: '确 定' confirm: '确 定',
correctEmailAddress: '正确的邮件地址'
} }
} }

12
vueJs/src/router/index.ts

@ -309,7 +309,7 @@ export const asyncRoutes: RouteConfig[] = [
meta: { meta: {
title: 'admin', title: 'admin',
icon: 'manager', icon: 'manager',
roles: ['AbpIdentity.Users', 'AbpIdentity.Roles'], // you can set roles in root nav roles: ['AbpIdentity.Users', 'AbpIdentity.Roles', 'AbpSettingManagement.Settings', 'AbpTenantManagement.Tenants'], // you can set roles in root nav
alwaysShow: true // will always show the root menu alwaysShow: true // will always show the root menu
}, },
children: [ children: [
@ -342,6 +342,16 @@ export const asyncRoutes: RouteConfig[] = [
icon: 'role', icon: 'role',
roles: ['AbpIdentity.Roles'] roles: ['AbpIdentity.Roles']
} }
},
{
path: 'tenants',
component: () => import('@/views/admin/tenants/index.vue'),
name: 'tenants',
meta: {
title: 'tenants',
icon: 'tenants',
roles: ['AbpTenantManagement.Tenants']
}
} }
] ]
}, },

4
vueJs/src/store/modules/permission.ts

@ -78,6 +78,10 @@ class Permission extends VuexModule implements IPermissionState {
@Action ResetPermissions() { @Action ResetPermissions() {
this.SET_AUTHPERMISSIONS([]) this.SET_AUTHPERMISSIONS([])
} }
@Action ResetRoutes() {
this.SET_ROUTES([])
}
} }
export const PermissionModule = getModule(Permission) export const PermissionModule = getModule(Permission)

2
vueJs/src/store/modules/user.ts

@ -115,10 +115,12 @@ class User extends VuexModule implements IUserState {
} }
await UserApiService.userLogout(getRefreshToken()) await UserApiService.userLogout(getRefreshToken())
removeToken() removeToken()
removeTenant()
resetRouter() resetRouter()
// Reset visited views and cached views // Reset visited views and cached views
TagsViewModule.delAllViews() TagsViewModule.delAllViews()
PermissionModule.ResetPermissions() PermissionModule.ResetPermissions()
PermissionModule.ResetRoutes()
this.SET_TOKEN('') this.SET_TOKEN('')
this.SET_ROLES([]) this.SET_ROLES([])
} }

2
vueJs/src/utils/request.ts

@ -72,8 +72,6 @@ service.interceptors.response.use(
let message = error.message let message = error.message
if (error.response.headers._abperrorformat) { if (error.response.headers._abperrorformat) {
message = error.response.data.error.message + error.response.data.error.details message = error.response.data.error.message + error.response.data.error.details
} else if (error.response.headers._abperrorformat) {
message = error.response.data.error_description
} }
Message({ Message({

75
vueJs/src/views/admin/apigateway/aggregateRoute.vue

@ -140,14 +140,33 @@
> >
{{ $t('apiGateWay.updateAggregateRoute') }} {{ $t('apiGateWay.updateAggregateRoute') }}
</el-button> </el-button>
<el-dropdown
class="options"
@command="handleCommand"
>
<el-button <el-button
:disabled="!checkPermission(['ApiGateway.AggregateRoute.Delete'])" v-permission="['ApiGateway.AggregateRoute']"
size="mini" size="mini"
type="warning" type="info"
@click="handleDeleteAggregateRoute(row.reRouteId, row.name)"
> >
{{ $t('apiGateWay.deleteAggregateRoute') }} {{ $t('global.otherOpera') }}<i class="el-icon-arrow-down el-icon--right" />
</el-button> </el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
:command="{key: 'config', row}"
:disabled="!checkPermission(['ApiGateway.AggregateRoute.ManageRouteConfig'])"
>
{{ $t('apiGateWay.routeKeysConfig') }}
</el-dropdown-item>
<el-dropdown-item
divided
:command="{key: 'delete', row}"
:disabled="!checkPermission(['ApiGateway.AggregateRoute.Delete'])"
>
{{ $t('apiGateWay.deleteAggregateRoute') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -177,6 +196,20 @@
@closed="handleAggregateRouteEditFormClosed" @closed="handleAggregateRouteEditFormClosed"
/> />
</el-dialog> </el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditAggregateRouteConfigDialog"
:title="$t('apiGateWay.routeKeysConfig')"
custom-class="modal-form"
:show-close="false"
>
<AggregateRouteConfigEditForm
:aggregate-route-id="editAggregateRouteId"
@closed="handleAggregateRouteConfigFormClosed"
/>
</el-dialog>
</div> </div>
</template> </template>
@ -184,6 +217,7 @@
import { checkPermission } from '@/utils/permission' import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator' import { Component, Vue } from 'vue-property-decorator'
import Pagination from '@/components/Pagination/index.vue' import Pagination from '@/components/Pagination/index.vue'
import AggregateRouteConfigEditForm from './components/AggregateRouteConfigEditForm.vue'
import AggregateRouteCreateOrEditForm from './components/AggregateRouteCreateOrEditForm.vue' import AggregateRouteCreateOrEditForm from './components/AggregateRouteCreateOrEditForm.vue'
import ApiGatewayService, { RouteGroupAppIdDto, AggregateReRoute, AggregateReRouteGetByPaged } from '@/api/apigateway' import ApiGatewayService, { RouteGroupAppIdDto, AggregateReRoute, AggregateReRouteGetByPaged } from '@/api/apigateway'
@ -191,6 +225,7 @@ import ApiGatewayService, { RouteGroupAppIdDto, AggregateReRoute, AggregateReRou
name: 'AggregateRoute', name: 'AggregateRoute',
components: { components: {
Pagination, Pagination,
AggregateRouteConfigEditForm,
AggregateRouteCreateOrEditForm AggregateRouteCreateOrEditForm
}, },
methods: { methods: {
@ -215,20 +250,24 @@ export default class extends Vue {
private editRouteTitle: any private editRouteTitle: any
private aggregateRouteList: AggregateReRoute[] private aggregateRouteList: AggregateReRoute[]
private aggregateRouteListLoading: boolean private aggregateRouteListLoading: boolean
private showEditAggregateRouteDialog: boolean
private aggregateRouteGetPagedFilter: AggregateReRouteGetByPaged private aggregateRouteGetPagedFilter: AggregateReRouteGetByPaged
private routeGroupAppIdOptions: RouteGroupAppIdDto[] private routeGroupAppIdOptions: RouteGroupAppIdDto[]
private showEditAggregateRouteDialog: boolean
private showEditAggregateRouteConfigDialog: boolean
constructor() { constructor() {
super() super()
this.editAggregateRouteId = '' this.editAggregateRouteId = ''
this.routesCount = 0 this.routesCount = 0
this.editRouteTitle = '' this.editRouteTitle = ''
this.aggregateRouteListLoading = false this.aggregateRouteListLoading = false
this.showEditAggregateRouteDialog = false
this.aggregateRouteList = new Array<AggregateReRoute>() this.aggregateRouteList = new Array<AggregateReRoute>()
this.aggregateRouteGetPagedFilter = new AggregateReRouteGetByPaged() this.aggregateRouteGetPagedFilter = new AggregateReRouteGetByPaged()
this.routeGroupAppIdOptions = new Array<RouteGroupAppIdDto>() this.routeGroupAppIdOptions = new Array<RouteGroupAppIdDto>()
this.showEditAggregateRouteDialog = false
this.showEditAggregateRouteConfigDialog = false
} }
mounted() { mounted() {
@ -256,6 +295,18 @@ export default class extends Vue {
this.aggregateRouteGetPagedFilter.sorting = column.prop this.aggregateRouteGetPagedFilter.sorting = column.prop
} }
private handleCommand(command: {key: string, row: AggregateReRoute }) {
this.editAggregateRouteId = command.row.reRouteId
switch (command.key) {
case 'config':
this.showEditAggregateRouteConfigDialog = true
break
case 'delete':
this.handleDeleteAggregateRoute(this.editAggregateRouteId, command.row.name)
break
}
}
private handleDeleteAggregateRoute(reRouteId: string, name: string) { private handleDeleteAggregateRoute(reRouteId: string, name: string) {
this.$confirm(this.l('apiGateWay.deleteAggregateRouteByName', { name: name }), this.$confirm(this.l('apiGateWay.deleteAggregateRouteByName', { name: name }),
this.l('apiGateWay.deleteAggregateRoute'), { this.l('apiGateWay.deleteAggregateRoute'), {
@ -288,8 +339,20 @@ export default class extends Vue {
} }
} }
private handleAggregateRouteConfigFormClosed() {
this.editAggregateRouteId = ''
this.showEditAggregateRouteConfigDialog = false
}
private l(name: string, values?: any[] | { [key: string]: any }) { private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString() return this.$t(name, values).toString()
} }
} }
</script> </script>
<style scoped>
.options {
vertical-align: top;
margin-left: 20px;
}
</style>

193
vueJs/src/views/admin/apigateway/components/AggregateRouteConfigEditForm.vue

@ -0,0 +1,193 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form
v-if="checkPermission(['ApiGateway.AggregateRoute.ManageRouteConfig'])"
ref="formAggregateRouteConfig"
label-width="100px"
:model="routeConfig"
:rules="routeConfigRules"
>
<el-form-item
prop="reRouteKey"
:label="$t('apiGateWay.aggregateRouteKey')"
>
<el-input
v-model="routeConfig.reRouteKey"
:placeholder="$t('pleaseInputBy', {key: $t('apiGateWay.aggregateRouteKey')})"
/>
</el-form-item>
<el-form-item
prop="parameter"
:label="$t('apiGateWay.aggregateParameter')"
>
<el-input
v-model="routeConfig.parameter"
/>
</el-form-item>
<el-form-item
prop="jsonPath"
:label="$t('apiGateWay.aggregateJsonPath')"
>
<el-input
v-model="routeConfig.jsonPath"
/>
</el-form-item>
<el-form-item
style="text-align: center;"
label-width="0px"
>
<el-button
type="primary"
style="width:180px"
@click="onSaveAggregateRouteConfig"
>
{{ $t('apiGateWay.createAggregateRouteConfig') }}
</el-button>
</el-form-item>
<el-divider />
</el-form>
</div>
<el-table
row-key="key"
:data="aggregateRoute.reRouteKeysConfig"
border
fit
highlight-current-row
style="width: 100%;"
>
<el-table-column
:label="$t('apiGateWay.aggregateRouteKey')"
prop="aggregateRouteKey"
sortable
width="200px"
align="center"
>
<template slot-scope="{row}">
<span>{{ row.aggregateRouteKey }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('apiGateWay.aggregateParameter')"
prop="parameter"
sortable
min-width="200px"
align="center"
>
<template slot-scope="{row}">
<span>{{ row.parameter }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('apiGateWay.aggregateJsonPath')"
prop="jsonPath"
sortable
min-width="200px"
align="center"
>
<template slot-scope="{row}">
<span>{{ row.jsonPath }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('global.operaActions')"
align="center"
width="150px"
fixed="right"
>
<template slot-scope="{row}">
<el-button
:disabled="!checkPermission(['ApiGateway.AggregateRoute.ManageRouteConfig'])"
size="mini"
type="primary"
@click="handleDeleteAggregateRouteConfig(row.reRouteKey)"
>
{{ $t('apiGateWay.deleteAggregateRouteConfig') }}
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script lang="ts">
import ApiGatewayService, { AggregateReRouteConfigCreate, AggregateReRoute } from '@/api/apigateway'
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'
import { checkPermission } from '@/utils/permission'
@Component({
name: 'AggregateRouteConfigEditForm',
methods: {
checkPermission
}
})
export default class extends Vue {
@Prop({ default: '' })
private aggregateRouteId!: string
private aggregateRoute!: AggregateReRoute
private routeConfig: AggregateReRouteConfigCreate
private routeConfigRules = {
reRouteKey: [
{ required: true, message: this.l('pleaseInputBy', { key: this.l('apiGateWay.aggregateRouteKey') }), trigger: 'blur' }
]
}
constructor() {
super()
this.aggregateRoute = AggregateReRoute.empty()
this.routeConfig = AggregateReRouteConfigCreate.empty()
}
@Watch('aggregateRouteId', { immediate: true })
private onAggregateRouteIdChanged() {
if (this.aggregateRouteId) {
ApiGatewayService.getAggregateReRouteByRouteId(this.aggregateRouteId).then(route => {
this.aggregateRoute = route
})
}
}
private handleDeleteAggregateRouteConfig(key: string) {
this.$confirm(this.l('apiGateWay.deleteAggregateRouteConfigByKey', { key: key }),
this.l('apiGateWay.deleteAggregateRouteConfig'), {
callback: (action) => {
if (action === 'confirm') {
ApiGatewayService.deleteAggregateRouteConfig(this.aggregateRoute.reRouteId, key).then(() => {
const deleteRouteConfigIndex = this.aggregateRoute.reRouteKeysConfig.findIndex(p => p.reRouteKey === key)
this.aggregateRoute.reRouteKeysConfig.splice(deleteRouteConfigIndex, 1)
this.$message.success(this.l('apiGateWay.deleteAggregateRouteConfigSuccess', { key: key }))
this.$emit('closed', true)
})
}
}
})
}
private onSaveAggregateRouteConfig() {
const frmIdentityProperty = this.$refs.formIdentityProperty as any
frmIdentityProperty.validate((valid: boolean) => {
if (valid) {
this.routeConfig.routeId = this.aggregateRoute.reRouteId
ApiGatewayService.createAggregateRouteConfig(this.routeConfig).then(routeConfig => {
this.aggregateRoute.reRouteKeysConfig.push(routeConfig)
const successMessage = this.l('apiGateWay.createAggregateRouteConfigSuccess', { key: routeConfig.reRouteKey })
this.$message.success(successMessage)
this.resetFields()
this.$emit('closed', true)
})
}
})
}
public resetFields() {
this.aggregateRouteId = ''
this.routeConfig = AggregateReRouteConfigCreate.empty()
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script>

6
vueJs/src/views/admin/apigateway/components/RouteCreateOrEditForm.vue

@ -146,8 +146,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item <el-form-item
prop="upstreamPathTemplate" prop="upstreamPathTemplate"
:label="$t('apiGateWay.upstreamPathTemplate')" :label="$t('apiGateWay.upstreamPathTemplate')"
@ -157,8 +155,6 @@
:placeholder="$t('pleaseInputBy', {key: $t('apiGateWay.upstreamPathTemplate')})" :placeholder="$t('pleaseInputBy', {key: $t('apiGateWay.upstreamPathTemplate')})"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item <el-form-item
prop="downstreamPathTemplate" prop="downstreamPathTemplate"
:label="$t('apiGateWay.downstreamPathTemplate')" :label="$t('apiGateWay.downstreamPathTemplate')"
@ -168,8 +164,6 @@
:placeholder="$t('pleaseInputBy', {key: $t('apiGateWay.downstreamPathTemplate')})" :placeholder="$t('pleaseInputBy', {key: $t('apiGateWay.downstreamPathTemplate')})"
/> />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item

142
vueJs/src/views/admin/tenants/components/TenantCreateOrEditForm.vue

@ -0,0 +1,142 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form
ref="formTenant"
label-width="120px"
:model="tenant"
:rules="tenantRules"
>
<el-form-item
prop="name"
:label="$t('tenant.name')"
>
<el-input
v-model="tenant.name"
:placeholder="$t('pleaseInputBy', {key: $t('tenant.name')})"
/>
</el-form-item>
<el-form-item
v-if="!isEditTenant"
prop="adminEmailAddress"
:label="$t('tenant.adminEmailAddress')"
>
<el-input
v-model="tenant.adminEmailAddress"
/>
</el-form-item>
<el-form-item
v-if="!isEditTenant"
prop="adminPassword"
:label="$t('tenant.adminPassword')"
>
<el-input
v-model="tenant.adminPassword"
/>
</el-form-item>
<el-form-item>
<el-button
class="cancel"
style="width:100px;right: 120px;position: absolute;"
@click="onCancel"
>
{{ $t('global.cancel') }}
</el-button>
<el-button
class="confirm"
type="primary"
style="width:100px;right: 10px;position: absolute;"
@click="onSaveTenant"
>
{{ $t('global.confirm') }}
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script lang="ts">
import TenantService, { TenantCreateOrEdit } from '@/api/tenant'
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
@Component({
name: 'TenantCreateOrEditForm'
})
export default class extends Vue {
@Prop({ default: '' })
private tenantId!: string
private tenant!: TenantCreateOrEdit
get isEditTenant() {
if (this.tenantId) {
return true
}
return false
}
private tenantRules = {
name: [
{ required: true, message: this.l('pleaseInputBy', { key: this.l('tenant.name') }), trigger: 'blur' }
],
adminEmailAddress: [
{ required: true, message: this.l('pleaseInputBy', { key: this.l('tenant.adminEmailAddress') }), trigger: 'blur' },
{ type: 'email', message: this.l('pleaseInputBy', { key: this.l('global.correctEmailAddress') }), trigger: 'blur' }
]
}
constructor() {
super()
this.tenant = TenantCreateOrEdit.empty()
}
@Watch('tenantId', { immediate: true })
private onTenantIdChanged() {
if (this.tenantId) {
TenantService.getTenantById(this.tenantId).then(tenant => {
this.tenant.name = tenant.name
})
} else {
this.tenant = TenantCreateOrEdit.empty()
}
}
private onSaveTenant() {
const frmTenant = this.$refs.formTenant as any
frmTenant.validate((valid: boolean) => {
if (valid) {
if (this.isEditTenant) {
TenantService.changeTenantName(this.tenantId, this.tenant.name).then(tenant => {
const message = this.l('tenant.tenantNameChanged', { name: tenant.name })
this.$message.success(message)
this.reset()
this.$emit('closed', true)
})
} else {
TenantService.createTenant(this.tenant).then(tenant => {
const message = this.l('tenant.createTenantSuccess', { name: tenant.name })
this.$message.success(message)
this.reset()
this.$emit('closed', true)
})
}
}
})
}
private onCancel() {
this.reset()
this.$emit('closed', false)
}
private reset() {
this.tenant = TenantCreateOrEdit.empty()
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script>

189
vueJs/src/views/admin/tenants/components/TenantEditConnectionForm.vue

@ -0,0 +1,189 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form
v-if="checkPermission(['AbpTenantManagement.Tenants.ManageConnectionStrings'])"
ref="formTenantConnection"
label-width="100px"
:model="tenantConnection"
:rules="tenantConnectionRules"
>
<el-form-item
prop="name"
:label="$t('tenant.connectionName')"
>
<el-input
v-model="tenantConnection.name"
:placeholder="$t('pleaseInputBy', {key: $t('tenant.connectionName')})"
/>
</el-form-item>
<el-form-item
prop="value"
:label="$t('tenant.connectionString')"
>
<el-input
v-model="tenantConnection.value"
:placeholder="$t('pleaseInputBy', {key: $t('tenant.connectionString')})"
/>
</el-form-item>
<el-form-item
style="text-align: center;"
label-width="0px"
>
<el-button
type="primary"
style="width:180px"
@click="onSaveTenantConnection"
>
{{ $t('tenant.setTenantConnection') }}
</el-button>
</el-form-item>
<el-divider />
</el-form>
</div>
<el-table
row-key="key"
:data="tenantConnections"
border
fit
highlight-current-row
style="width: 100%;"
>
<el-table-column
:label="$t('tenant.connectionName')"
prop="name"
sortable
width="200px"
align="center"
>
<template slot-scope="{row}">
<span>{{ row.name }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('tenant.connectionString')"
prop="value"
sortable
min-width="400px"
align="center"
>
<template slot-scope="{row}">
<span>{{ row.value }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('operaActions')"
align="center"
width="150px"
fixed="right"
>
<template slot-scope="{row}">
<el-button
:disabled="!checkPermission(['AbpTenantManagement.Tenants.ManageConnectionStrings'])"
size="mini"
type="primary"
@click="handleDeleteTenantConnection(row.name)"
>
{{ $t('tenant.deleteConnection') }}
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script lang="ts">
import TenantService, { TenantConnectionString } from '@/api/tenant'
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'
import { checkPermission } from '@/utils/permission'
@Component({
name: 'TenantEditConnectionForm',
methods: {
checkPermission
}
})
export default class extends Vue {
@Prop({ default: '' })
private tenantId!: string
private tenantConnection: TenantConnectionString
private tenantConnections: TenantConnectionString[]
private tenantConnectionRules = {
name: [
{ required: true, message: this.l('pleaseInputBy', { key: this.l('tenant.connectionName') }), trigger: 'blur' }
],
value: [
{ required: true, message: this.l('pleaseInputBy', { key: this.l('tenant.connectionString') }), trigger: 'blur' }
]
}
constructor() {
super()
this.tenantConnection = TenantConnectionString.empty()
this.tenantConnections = new Array<TenantConnectionString>()
}
@Watch('tenantId', { immediate: true })
private onTenantIdChanged() {
if (this.tenantId) {
TenantService.getTenantConnections(this.tenantId).then(connections => {
this.tenantConnections = connections.items
})
} else {
this.tenantConnection = TenantConnectionString.empty()
this.tenantConnections = new Array<TenantConnectionString>()
}
}
private handleDeleteTenantConnection(name: string) {
this.$confirm(this.l('tenant.deleteTenantConnectionName', { name: name }),
this.l('tenant.deleteConnection'), {
callback: (action) => {
if (action === 'confirm') {
TenantService.deleteTenantConnectionByName(this.tenantId, name).then(() => {
const deleteTenantConnectionIndex = this.tenantConnections.findIndex(p => p.name === name)
this.tenantConnections.splice(deleteTenantConnectionIndex, 1)
this.$message.success(this.l('tenant.deleteTenantConnectionSuccess', { name: name }))
this.resetFields()
this.$emit('closed', true)
})
}
}
})
}
private onSaveTenantConnection() {
const frmTenantConnection = this.$refs.formTenantConnection as any
frmTenantConnection.validate((valid: boolean) => {
if (valid) {
TenantService.setTenantConnection(this.tenantId, this.tenantConnection).then(connection => {
const tenantConnection = this.tenantConnections.find(tc => tc.name === connection.name)
if (tenantConnection) {
tenantConnection.value = connection.value
} else {
this.tenantConnections.push(connection)
}
this.$message.success(this.l('tenant.setTenantConnectionSuccess', { name: name }))
this.resetFields()
})
}
})
}
public resetFields() {
this.tenantConnection = TenantConnectionString.empty()
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script>
<style lang="scss" scoped>
.full-select {
width: 100%;
}
</style>

309
vueJs/src/views/admin/tenants/index.vue

@ -1,2 +1,311 @@
<template>
<div class="app-container">
<div class="filter-container">
<label
class="radio-label"
style="padding-left:10px;"
>{{ $t('global.queryFilter') }}</label>
<el-input
v-model="tenantGetPagedFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
/>
<el-button
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetTenants"
>
{{ $t('global.searchList') }}
</el-button>
<el-button
class="filter-item"
type="primary"
:disabled="!checkPermission(['AbpTenantManagement.Tenants.Create'])"
@click="handleShowCreateOrEditTenantDialog('')"
>
{{ $t('tenant.createTenant') }}
</el-button>
</div>
<el-table
v-loading="tenantListLoading"
row-key="id"
:data="tenantList"
border
fit
highlight-current-row
style="width: 100%;"
@sort-change="handleSortChange"
>
<el-table-column
:label="$t('tenant.id')"
prop="id"
sortable
width="150px"
align="center"
>
<template slot-scope="{row}">
<span>{{ row.id }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('tenant.name')"
prop="name"
sortable
width="150px"
align="center"
>
<template slot-scope="{row}">
<span>{{ row.name }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('global.creationTime')"
prop="creationTime"
width="170px"
align="center"
>
<template slot-scope="{row}">
<span>
<el-tag>
{{ row.creationTime | datetimeFilter }}
</el-tag>
</span>
</template>
</el-table-column>
<el-table-column
:label="$t('global.lastModificationTime')"
prop="lastModificationTime"
width="170px"
align="center"
>
<template slot-scope="{row}">
<span>
<el-tag type="warning">
{{ row.lastModificationTime | datetimeFilter }}
</el-tag>
</span>
</template>
</el-table-column>
<el-table-column
:label="$t('global.operaActions')"
align="center"
width="250px"
fixed="right"
>
<template slot-scope="{row}">
<el-button
:disabled="!checkPermission(['AbpTenantManagement.Tenants.Update'])"
size="mini"
type="primary"
@click="handleShowCreateOrEditTenantDialog(row.id)"
>
{{ $t('tenant.updateTenant') }}
</el-button>
<el-dropdown
class="options"
@command="handleCommand"
>
<el-button
v-permission="['AbpTenantManagement.Tenants']"
size="mini"
type="info"
>
{{ $t('global.otherOpera') }}<i class="el-icon-arrow-down el-icon--right" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
:command="{key: 'connection', row}"
:disabled="!checkPermission(['AbpTenantManagement.Tenants.ManageConnectionStrings'])"
>
{{ $t('tenant.connectionOptions') }}
</el-dropdown-item>
<el-dropdown-item
divided
:command="{key: 'delete', row}"
:disabled="!checkPermission(['AbpTenantManagement.Tenants.Delete'])"
>
{{ $t('tenant.deleteTenant') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<Pagination
v-show="tenantListCount>0"
:total="tenantListCount"
:page.sync="tenantGetPagedFilter.skipCount"
:limit.sync="tenantGetPagedFilter.maxResultCount"
@pagination="handleGetTenants"
@sort-change="handleSortChange"
/>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showCreateOrEditTenantDialog"
:title="$t('tenant.updateTenant')"
custom-class="modal-form"
:show-close="false"
@closed="handleCreateOrEditTenantFormClosed"
>
<TenantCreateOrEditForm
ref="formCreateOrEditTenant"
:tenant-id="editTenantId"
@closed="handleCreateOrEditTenantFormClosed"
/>
</el-dialog>
<el-dialog
v-el-draggable-dialog
width="800px"
:visible.sync="showEditTenantConnectionDialog"
:title="$t('tenant.connectionOptions')"
custom-class="modal-form"
:show-close="false"
@closed="handleTenantConnectionEditFormClosed"
>
<TenantEditConnectionForm
ref="formEditTenantConnection"
:tenant-id="editTenantId"
@closed="handleTenantConnectionEditFormClosed"
/>
</el-dialog>
</div>
</template>
<script lang="ts"> <script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import TenantService, { TenantDto, TenantGetByPaged } from '@/api/tenant'
import { dateFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import Pagination from '@/components/Pagination/index.vue'
import TenantCreateOrEditForm from './components/TenantCreateOrEditForm.vue'
import TenantEditConnectionForm from './components/TenantEditConnectionForm.vue'
@Component({
name: 'RoleList',
components: {
Pagination,
TenantCreateOrEditForm,
TenantEditConnectionForm
},
methods: {
checkPermission
},
filters: {
datetimeFilter(val: string) {
const date = new Date(val)
return dateFormat(date, 'YYYY-mm-dd HH:MM')
}
}
})
export default class extends Vue {
private editTenantId: string
private tenantList: TenantDto[]
private tenantListCount: number
private tenantListLoading: boolean
private tenantGetPagedFilter: TenantGetByPaged
private showEditTenantConnectionDialog: boolean
private showCreateOrEditTenantDialog: boolean
constructor() {
super()
this.editTenantId = ''
this.tenantListCount = 0
this.tenantListLoading = false
this.tenantList = new Array<TenantDto>()
this.tenantGetPagedFilter = new TenantGetByPaged()
this.showCreateOrEditTenantDialog = false
this.showEditTenantConnectionDialog = false
}
mounted() {
this.handleGetTenants()
}
private handleGetTenants() {
this.tenantListLoading = true
TenantService.getTenants(this.tenantGetPagedFilter).then(tenants => {
this.tenantList = tenants.items
this.tenantListCount = tenants.totalCount
this.tenantListLoading = false
})
}
private handleCommand(command: {key: string, row: TenantDto}) {
switch (command.key) {
case 'connection' :
this.editTenantId = command.row.id
this.showEditTenantConnectionDialog = true
break
case 'delete' :
this.handleDeleteTenant(command.row.id, command.row.name)
break
default: break
}
}
private handleShowCreateOrEditTenantDialog(id: string) {
this.editTenantId = id
this.showCreateOrEditTenantDialog = true
}
private handleDeleteTenant(id: string, name: string) {
this.$confirm(this.l('tenant.deleteTenantByName', { name: name }),
this.l('tenant.deleteTenant'), {
callback: (action) => {
if (action === 'confirm') {
TenantService.deleteTenant(id).then(() => {
this.$message.success(this.l('tenant.deleteTenantSuccess', { name: name }))
this.handleGetTenants()
})
}
}
})
}
private handleTenantConnectionEditFormClosed(changed: boolean) {
this.showEditTenantConnectionDialog = false
this.editTenantId = ''
if (changed) {
this.handleGetTenants()
}
}
private handleCreateOrEditTenantFormClosed(changed: boolean) {
this.showCreateOrEditTenantDialog = false
this.editTenantId = ''
if (changed) {
this.handleGetTenants()
}
}
private handleSortChange(column: any) {
this.tenantGetPagedFilter.sorting = column.prop
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script> </script>
<style lang="scss" scoped>
.options {
vertical-align: top;
margin-left: 20px;
}
.el-dropdown + .el-dropdown {
margin-left: 15px;
}
.el-icon-arrow-down {
font-size: 12px;
}
</style>

Loading…
Cancel
Save