Browse Source

Merge pull request #15 from colinin/2.9

renamed LINGYUN.Abp.RedisLock
pull/21/head
cKey 6 years ago
committed by GitHub
parent
commit
4b130241dc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 0
      aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN.Abp.DistributedLock.Redis.csproj
  2. 2
      aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN/Abp/DistributedLock/Redis/AbpRedisLockModule.cs
  3. 2
      aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN/Abp/DistributedLock/Redis/RedisDistributedLock.cs
  4. 2
      aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN/Abp/DistributedLock/Redis/RedisLockOptions.cs
  5. 4
      aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj
  6. 2
      aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN/Abp/DistributedLock/DistributedLockException.cs
  7. 2
      aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN/Abp/DistributedLock/IDistributedLock.cs
  8. 16
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj
  9. 10
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/AbpQiniuFileStorageModule.cs
  10. 40
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageOptions.cs
  11. 111
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageProvider.cs
  12. 12
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj
  13. 8
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/AbpFileStorageModule.cs
  14. 8
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadCompletedEventArges.cs
  15. 11
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadProgressEventArges.cs
  16. 59
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileInfo.cs
  17. 63
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileStorageProvider.cs
  18. 8
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadCompletedEventArges.cs
  19. 21
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadProgressEventArges.cs
  20. 41
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStorageProvider.cs
  21. 39
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStore.cs
  22. 25
      aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/MediaType.cs
  23. 4
      aspnet-core/modules/common/LINGYUN.Common.EventBus/.gitignore
  24. 12
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN.Common.EventBus.csproj
  25. 11
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/CommonEventBusModule.cs
  26. 11
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/DeleteEventData.cs
  27. 19
      aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/TenantEventNames.cs
  28. 8
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN.Abp.MultiTenancy.csproj
  29. 4
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/CreateConnectionStringEventData.cs
  30. 4
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/CreateEventData.cs
  31. 4
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteConnectionStringEventData.cs
  32. 9
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteEventData.cs
  33. 4
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateConnectionStringEventData.cs
  34. 4
      aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateEventData.cs
  35. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj
  36. 2
      aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN/Abp/TenantManagement/TenantAppService.cs
  37. 7
      aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN/Abp/TenantManagement/TenantController.cs
  38. 2
      aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
  39. 2
      aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantCreateEventHandler.cs
  40. 18
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs
  41. 2
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj
  42. 2
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs
  43. 450
      vueJs/src/lang/en.ts
  44. 3
      vueJs/src/lang/zh.ts
  45. 165
      vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue

0
aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj → aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN.Abp.DistributedLock.Redis.csproj

2
aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN/Abp/Distributed/Redis/AbpRedisLockModule.cs → aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN/Abp/DistributedLock/Redis/AbpRedisLockModule.cs

@ -1,7 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Distributed.Redis
namespace LINGYUN.Abp.DistributedLock.Redis
{
public class AbpRedisLockModule : AbpModule
{

2
aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN/Abp/Distributed/Redis/RedisDistributedLock.cs → aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN/Abp/DistributedLock/Redis/RedisDistributedLock.cs

@ -10,7 +10,7 @@ using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.Distributed.Redis
namespace LINGYUN.Abp.DistributedLock.Redis
{
[ExposeServices(typeof(IDistributedLock))]
[Dependency(ServiceLifetime.Singleton, TryRegister = true)]

2
aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN/Abp/Distributed/Redis/RedisLockOptions.cs → aspnet-core/modules/common/LINGYUN.Abp.DistributedLock.Redis/LINGYUN/Abp/DistributedLock/Redis/RedisLockOptions.cs

@ -1,7 +1,7 @@
using Microsoft.Extensions.Options;
using StackExchange.Redis;
namespace LINGYUN.Abp.Distributed.Redis
namespace LINGYUN.Abp.DistributedLock.Redis
{
public class RedisLockOptions : IOptions<RedisLockOptions>
{

4
aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj

@ -12,4 +12,8 @@
<OutputPath>D:\LocalNuget</OutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.ExceptionHandling\LINGYUN.Abp.ExceptionHandling.csproj" />
</ItemGroup>
</Project>

2
aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN/Abp/Distributed/DistributedLockException.cs → aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN/Abp/DistributedLock/DistributedLockException.cs

@ -1,7 +1,7 @@
using LINGYUN.Abp.ExceptionHandling;
using System;
namespace LINGYUN.Abp.Distributed
namespace LINGYUN.Abp.DistributedLock
{
public class DistributedLockException : Exception, IHasNotifierErrorMessage
{

2
aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN/Abp/Distributed/IDistributedLock.cs → aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN/Abp/DistributedLock/IDistributedLock.cs

@ -2,7 +2,7 @@
using System.Threading;
using System.Threading.Tasks;
namespace LINGYUN.Abp.Distributed
namespace LINGYUN.Abp.DistributedLock
{
/// <summary>
/// 分布式锁接口

16
aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Qiniu.Shared" Version="7.2.15" />
</ItemGroup>
<ItemGroup>
<Folder Include="Qiniu\Http\" />
</ItemGroup>
</Project>

10
aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/AbpQiniuFileStorageModule.cs

@ -1,10 +0,0 @@
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.FileStorage.Qiniu
{
[DependsOn(typeof(AbpFileStorageModule))]
public class AbpQiniuFileStorageModule : AbpModule
{
}
}

40
aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageOptions.cs

@ -1,40 +0,0 @@
namespace LINGYUN.Abp.FileStorage.Qiniu
{
public class QiniuFileStorageOptions
{
/// <summary>
/// Api授权码
/// </summary>
public string AccessKey { get; set; }
/// <summary>
/// Api密钥
/// </summary>
public string SecretKey { get; set; }
/// <summary>
/// 默认自动删除该文件天数
/// 默认 0,不删除
/// </summary>
public int DeleteAfterDays { get; set; }
/// <summary>
/// 上传成功后,七牛云向业务服务器发送 POST 请求的 URL。
/// 必须是公网上可以正常进行 POST 请求并能响应 HTTP/1.1 200 OK 的有效 URL
/// </summary>
public string UploadCallbackUrl { get; set; }
/// <summary>
/// 上传成功后,七牛云向业务服务器发送回调通知时的 Host 值。
/// 与 callbackUrl 配合使用,仅当设置了 callbackUrl 时才有效。
/// </summary>
public string UploadCallbackHost { get; set; }
/// <summary>
/// 上传成功后,七牛云向业务服务器发送回调通知 callbackBody 的 Content-Type。
/// 默认为 application/x-www-form-urlencoded,也可设置为 application/json。
/// </summary>
public string UploadCallbackBodyType { get; set; }
/// <summary>
/// 上传成功后,自定义七牛云最终返回給上传端(在指定 returnUrl 时是携带在跳转路径参数中)的数据。
/// 支持魔法变量和自定义变量。returnBody 要求是合法的 JSON 文本。
/// 例如 {"key": $(key), "hash": $(etag), "w": $(imageInfo.width), "h": $(imageInfo.height)}。
/// </summary>
public string UploadCallbackBody { get; set; }
}
}

111
aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageProvider.cs

@ -1,111 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Qiniu.IO;
using Qiniu.IO.Model;
using Qiniu.RS;
using Qiniu.Util;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace LINGYUN.Abp.FileStorage.Qiniu
{
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
[ExposeServices(typeof(IFileStorageProvider), typeof(FileStorageProvider))]
public class QiniuFileStorageProvider : FileStorageProvider
{
protected QiniuFileStorageOptions Options { get; }
public QiniuFileStorageProvider(
IFileStore store,
IOptions<QiniuFileStorageOptions> options)
: base(store)
{
Options = options.Value;
}
protected override async Task<FileInfo> DownloadFileAsync(FileInfo fileInfo, string saveLocalPath)
{
Mac mac = new Mac(Options.AccessKey, Options.SecretKey);
int expireInSeconds = 3600;
string accUrl = DownloadManager.CreateSignedUrl(mac, fileInfo.Url, expireInSeconds);
var saveLocalFile = Path.Combine(saveLocalPath, fileInfo.Name);
var httpResult = await DownloadManager.DownloadAsync(accUrl, saveLocalFile);
if(httpResult.Code == 200)
{
using (var fs = new FileStream(saveLocalFile, FileMode.Open, FileAccess.Read))
{
fileInfo.Data = new byte[fs.Length];
await fs.ReadAsync(fileInfo.Data, 0, fileInfo.Data.Length).ConfigureAwait(false);
}
}
else
{
// TODO: 处理响应代码
Console.WriteLine(httpResult.Code);
}
return fileInfo;
}
protected override async Task RemoveFileAsync(FileInfo fileInfo, CancellationToken cancellationToken = default)
{
Mac mac = new Mac(Options.AccessKey, Options.SecretKey);
var bucket = fileInfo.Directory + ":" + fileInfo.Name;
var backetManager = new BucketManager(mac);
await backetManager.DeleteAsync(bucket, fileInfo.Name);
throw new NotImplementedException();
}
protected override async Task UploadFileAsync(FileInfo fileInfo, int? expireIn = null, CancellationToken cancellationToken = default)
{
Mac mac = new Mac(Options.AccessKey, Options.SecretKey);
PutPolicy putPolicy = new PutPolicy
{
Scope = fileInfo.Directory + ":" + fileInfo.Name,
CallbackBody = Options.UploadCallbackBody,
CallbackBodyType = Options.UploadCallbackBodyType,
CallbackHost = Options.UploadCallbackHost,
CallbackUrl = Options.UploadCallbackUrl
};
if (expireIn.HasValue)
{
putPolicy.SetExpires(expireIn.Value);
}
if (Options.DeleteAfterDays > 0)
{
putPolicy.DeleteAfterDays = Options.DeleteAfterDays;
}
string jstr = putPolicy.ToJsonString();
string token = Auth.CreateUploadToken(mac, jstr);
UploadProgressHandler handler = (uploadByte, totalByte) =>
{
OnFileUploadProgressChanged(uploadByte, totalByte);
};
// 带进度的上传
ResumableUploader uploader = new ResumableUploader();
var httpResult = await uploader.UploadDataAsync(fileInfo.Data, fileInfo.Name, token, handler);
// 普通上传
//FormUploader fu = new FormUploader();
//var httpResult = await fu.UploadDataAsync(fileInfo.Data, fileInfo.Name, token);
// TODO: 处理响应代码
Console.WriteLine(httpResult.Code);
}
}
}

12
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj

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

8
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/AbpFileStorageModule.cs

@ -1,8 +0,0 @@
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.FileStorage
{
public class AbpFileStorageModule : AbpModule
{
}
}

8
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadCompletedEventArges.cs

@ -1,8 +0,0 @@
using System;
namespace LINGYUN.Abp.FileStorage
{
public class FileDownloadCompletedEventArges : EventArgs
{
}
}

11
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadProgressEventArges.cs

@ -1,11 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace LINGYUN.Abp.FileStorage
{
public class FileDownloadProgressEventArges : EventArgs
{
}
}

59
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileInfo.cs

@ -1,59 +0,0 @@
using System;
namespace LINGYUN.Abp.FileStorage
{
/// <summary>
/// 文件信息
/// </summary>
public class FileInfo
{
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 大小
/// </summary>
public long Size { get; set; }
/// <summary>
/// 文件路径
/// </summary>
public string Directory { get; set; }
/// <summary>
/// 文件扩展名
/// </summary>
public string Extension { get; set; }
/// <summary>
/// 文件哈希码,用于唯一标识
/// </summary>
public string Hash { get; set; }
/// <summary>
/// 文件链接
/// </summary>
public string Url { get; set; }
/// <summary>
/// 文件数据
/// </summary>
public byte[] Data { get; set; }
/// <summary>
/// 媒体类型
/// </summary>
public MediaType MediaType { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreationTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public Guid? CreatorId { get; set; }
/// <summary>
/// 上次变更时间
/// </summary>
public DateTime? LastModificationTime { get; set; }
/// <summary>
/// 上次变更人
/// </summary>
public Guid? LastModifierId { get; set; }
}
}

63
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileStorageProvider.cs

@ -1,63 +0,0 @@
using System;
using System.Threading;
using System.Threading.Tasks;
namespace LINGYUN.Abp.FileStorage
{
public abstract class FileStorageProvider : IFileStorageProvider
{
public event EventHandler<FileDownloadProgressEventArges> FileDownloadProgressChanged;
public event EventHandler<FileDownloadCompletedEventArges> FileDownloadCompleted;
public event EventHandler<FileUploadProgressEventArges> FileUploadProgressChanged;
public event EventHandler<FileUploadCompletedEventArges> FileUploadCompleted;
protected IFileStore Store { get; }
public FileStorageProvider(IFileStore store)
{
Store = store;
}
public async Task DeleteFileAsync(string hash, CancellationToken cancellationToken = default)
{
// 获取文件信息
var file = await Store.GetFileAsync(hash);
// 删除文件
await RemoveFileAsync(file, cancellationToken);
// 删除文件信息
await Store.DeleteFileAsync(hash, cancellationToken);
}
public async Task<FileInfo> GetFileAsync(string hash, string saveLocalPath)
{
// 获取文件信息
var file = await Store.GetFileAsync(hash);
// 下载文件
return await DownloadFileAsync(file, saveLocalPath);
}
public async Task StorageAsync(FileInfo fileInfo, int? expireIn = null, CancellationToken cancellationToken = default)
{
// step1 上传文件
await UploadFileAsync(fileInfo, expireIn, cancellationToken);
// step2 保存文件信息
await Store.StorageAsync(fileInfo, expireIn, cancellationToken);
}
protected abstract Task UploadFileAsync(FileInfo fileInfo, int? expireIn = null, CancellationToken cancellationToken = default);
protected abstract Task<FileInfo> DownloadFileAsync(FileInfo fileInfo, string saveLocalPath);
protected abstract Task RemoveFileAsync(FileInfo fileInfo, CancellationToken cancellationToken = default);
protected virtual void OnFileUploadProgressChanged(long sent, long total)
{
FileUploadProgressChanged?.Invoke(this, new FileUploadProgressEventArges(sent, total));
}
protected virtual void OnFileUploadConpleted()
{
FileUploadCompleted?.Invoke(this, new FileUploadCompletedEventArges());
}
}
}

8
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadCompletedEventArges.cs

@ -1,8 +0,0 @@
using System;
namespace LINGYUN.Abp.FileStorage
{
public class FileUploadCompletedEventArges : EventArgs
{
}
}

21
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadProgressEventArges.cs

@ -1,21 +0,0 @@
using System;
namespace LINGYUN.Abp.FileStorage
{
public class FileUploadProgressEventArges : EventArgs
{
/// <summary>
/// 上传数据大小
/// </summary>
public long BytesSent { get; }
/// <summary>
/// 总数据大小
/// </summary>
public long TotalBytesSent { get; }
public FileUploadProgressEventArges(long sent, long total)
{
BytesSent = sent;
TotalBytesSent = total;
}
}
}

41
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStorageProvider.cs

@ -1,41 +0,0 @@
using System;
using System.Threading;
using System.Threading.Tasks;
namespace LINGYUN.Abp.FileStorage
{
/// <summary>
/// 文件存储提供者
/// </summary>
public interface IFileStorageProvider
{
event EventHandler<FileDownloadProgressEventArges> FileDownloadProgressChanged;
event EventHandler<FileDownloadCompletedEventArges> FileDownloadCompleted;
event EventHandler<FileUploadProgressEventArges> FileUploadProgressChanged;
event EventHandler<FileUploadCompletedEventArges> FileUploadCompleted;
/// <summary>
/// 存储文件
/// </summary>
/// <param name="fileInfo">文件信息</param>
/// <param name="expireIn">过期时间,单位(s)</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task StorageAsync(FileInfo fileInfo, int? expireIn = null, CancellationToken cancellationToken = default);
/// <summary>
/// 获取文件
/// </summary>
/// <param name="hash">文件唯一标识</param>
/// <param name="saveLocalPath">保存到本地路径</param>
/// <returns></returns>
Task<FileInfo> GetFileAsync(string hash, string saveLocalPath);
/// <summary>
/// 删除文件
/// </summary>
/// <param name="hash">文件唯一标识</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task DeleteFileAsync(string hash, CancellationToken cancellationToken = default);
}
}

39
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStore.cs

@ -1,39 +0,0 @@
using System.Threading;
using System.Threading.Tasks;
namespace LINGYUN.Abp.FileStorage
{
/// <summary>
/// 文件存储接口
/// </summary>
public interface IFileStore
{
/// <summary>
/// 存储文件
/// </summary>
/// <param name="fileInfo">文件信息</param>
/// <param name="expireIn">过期时间,单位(s)</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task StorageAsync(FileInfo fileInfo, int? expireIn = null, CancellationToken cancellationToken = default);
/// <summary>
/// 获取文件
/// </summary>
/// <param name="hash">文件唯一标识</param>
/// <returns></returns>
Task<FileInfo> GetFileAsync(string hash);
/// <summary>
/// 文件是否存在
/// </summary>
/// <param name="hash">文件唯一标识</param>
/// <returns></returns>
Task<bool> FileHasExistsAsync(string hash);
/// <summary>
/// 删除文件
/// </summary>
/// <param name="hash">文件唯一标识</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task DeleteFileAsync(string hash, CancellationToken cancellationToken = default);
}
}

25
aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/MediaType.cs

@ -1,25 +0,0 @@
namespace LINGYUN.Abp.FileStorage
{
/// <summary>
/// 媒体类型
/// </summary>
public enum MediaType
{
/// <summary>
/// 文档
/// </summary>
Document = 0,
/// <summary>
/// 图像
/// </summary>
Image = 2,
/// <summary>
/// 影像
/// </summary>
Video = 3,
/// <summary>
/// 音乐
/// </summary>
Music = 4
}
}

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

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

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

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

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

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

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

@ -1,11 +0,0 @@
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

@ -1,19 +0,0 @@
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";
}
}

8
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN.Abp.MultiTenancy.csproj

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
</Project>

4
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/CreateConnectionStringEventData.cs → aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/CreateConnectionStringEventData.cs

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

4
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/CreateEventData.cs → aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/CreateEventData.cs

@ -1,9 +1,7 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
namespace LINGYUN.Abp.MultiTenancy
{
[EventName(TenantEventNames.Create)]
public class CreateEventData
{
public Guid Id { get; set; }

4
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/DeleteConnectionStringEventData.cs → aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteConnectionStringEventData.cs

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

9
aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/DeleteEventData.cs

@ -0,0 +1,9 @@
using System;
namespace LINGYUN.Abp.MultiTenancy
{
public class DeleteEventData
{
public Guid Id { get; set; }
}
}

4
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/UpdateConnectionStringEventData.cs → aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateConnectionStringEventData.cs

@ -1,9 +1,7 @@
using System;
using Volo.Abp.EventBus;
namespace LINGYUN.Common.EventBus.Tenants
namespace LINGYUN.Abp.MultiTenancy
{
[EventName(TenantEventNames.UpdateConnectionString)]
public class UpdateConnectionStringEventData
{
public Guid Id { get; set; }

4
aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN/Common/EventBus/Tenants/UpdateEventData.cs → aspnet-core/modules/tenants/LINGYUN.Abp.MultiTenancy/LINGYUN/Abp/MultiTenancy/UpdateEventData.cs

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

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

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

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

@ -1,4 +1,4 @@
using LINGYUN.Common.EventBus.Tenants;
using LINGYUN.Abp.MultiTenancy;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;

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

@ -80,5 +80,12 @@ namespace LINGYUN.Abp.TenantManagement
{
return TenantAppService.DeleteConnectionStringAsync(tenantConnectionGetByName);
}
[HttpGet]
[Route("name/{name}")]
public virtual Task<TenantDto> GetAsync(TenantGetByNameInputDto tenantGetByNameInput)
{
return TenantAppService.GetAsync(tenantGetByNameInput);
}
}
}

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

@ -36,8 +36,8 @@
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.EventBus.CAP\LINGYUN.Abp.EventBus.CAP.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.Identity.OverrideOptions\LINGYUN.Abp.Identity.OverrideOptions.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.IdentityServer.WeChatValidator\LINGYUN.Abp.IdentityServer.WeChatValidator.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Common.EventBus\LINGYUN.Common.EventBus.csproj" />
<ProjectReference Include="..\..\..\modules\identityServer\LINGYUN.Abp.IdentityServer.SmsValidator\LINGYUN.Abp.IdentityServer.SmsValidator.csproj" />
<ProjectReference Include="..\..\..\modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" />
</ItemGroup>
<ItemGroup>

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

@ -1,4 +1,4 @@
using LINGYUN.Common.EventBus.Tenants;
using LINGYUN.Abp.MultiTenancy;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
using System;

18
aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/EventBus/Distributed/TenantCreateEventHandler.cs

@ -1,16 +1,16 @@
using LINGYUN.Common.EventBus.Tenants;
using System.Threading.Tasks;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.DependencyInjection;
using Microsoft.Extensions.Logging;
using Volo.Abp.MultiTenancy;
using LINGYUN.Abp.MessageService.Localization;
using LINGYUN.Abp.MultiTenancy;
using LINGYUN.Abp.Notifications;
using Microsoft.Extensions.Localization;
using LINGYUN.Abp.MessageService.Localization;
using Microsoft.Extensions.Logging;
using System;
using Volo.Abp.Settings;
using Volo.Abp.Localization;
using System.Globalization;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Settings;
namespace LINGYUN.Abp.MessageService.EventBus.Distributed
{

2
aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj

@ -50,10 +50,10 @@
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.IM.SignalR\LINGYUN.Abp.IM.SignalR.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.Notifications.SignalR\LINGYUN.Abp.Notifications.SignalR.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Abp.Notifications.WeChat\LINGYUN.Abp.Notifications.WeChat.WeApp.csproj" />
<ProjectReference Include="..\..\..\modules\common\LINGYUN.Common.EventBus\LINGYUN.Common.EventBus.csproj" />
<ProjectReference Include="..\..\..\modules\message\LINGYUN.Abp.MessageService.Application\LINGYUN.Abp.MessageService.Application.csproj" />
<ProjectReference Include="..\..\..\modules\message\LINGYUN.Abp.MessageService.EntityFrameworkCore\LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\modules\message\LINGYUN.Abp.MessageService.HttpApi\LINGYUN.Abp.MessageService.HttpApi.csproj" />
<ProjectReference Include="..\..\..\modules\tenants\LINGYUN.Abp.MultiTenancy\LINGYUN.Abp.MultiTenancy.csproj" />
</ItemGroup>
</Project>

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

@ -1,4 +1,4 @@
using LINGYUN.Common.EventBus.Tenants;
using LINGYUN.Abp.MultiTenancy;
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;

450
vueJs/src/lang/en.ts

@ -62,7 +62,22 @@ export default {
clipboard: 'Clipboard',
i18n: 'I18n',
externalLink: 'External Link',
profile: 'Profile'
profile: 'Profile',
tasks: 'tasks',
admin: 'administration',
users: 'users',
roles: 'roles',
tenants: 'tenants',
settings: 'settings',
apigateway: 'apigateway',
group: 'group',
global: 'global',
route: 'route',
aggregateRoute: 'aggregate',
identityServer: 'identity server',
clients: 'clients',
apiresources: 'api resources',
identityresources: 'id resources'
},
navbar: {
logOut: 'Log Out',
@ -75,12 +90,28 @@ export default {
login: {
title: 'Login Form',
logIn: 'Login',
register: 'register',
notAccount: 'not account?',
existsAccount: 'exists account?',
forgotPassword: 'forgot password?',
userLogin: 'password login',
phoneLogin: 'phone login',
resetpassword: 'reset password',
tenantName: 'Tenantname',
username: 'Username',
password: 'Password',
phoneNumber: 'phone number',
phoneVerifyCode: 'phone verify code',
sendVerifyCode: 'send verify code',
afterSendVerifyCode: ' s resend after',
any: 'any',
thirdparty: 'Or connect with',
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !'
thirdpartyTips: 'Can not be simulated on local, so please combine you own business simulation! ! !',
tokenExprition: 'The identity token has expired. Please log in again!',
confirmLogout: 'confirm',
relogin: 'relogin',
cancel: 'cancel',
tenantIsNotAvailable: 'tenant is not available: {name}'
},
documentation: {
documentation: 'Documentation',
@ -171,6 +202,419 @@ export default {
showTagsView: 'Open Tags-View',
showSidebarLogo: 'Sidebar Logo',
fixedHeader: 'Fixed Header',
sidebarTextTheme: 'Sidebar Text Theme'
sidebarTextTheme: 'Sidebar Text Theme',
globalSetting: 'global',
tenantSetting: 'tenant',
userSetting: 'user',
passwordSecurity: 'security',
systemSetting: 'system',
userAccount: 'user account',
mailing: "mailing"
},
task: {
title: 'task'
},
users: {
queryFilter: 'filter:',
filterString: 'filter',
searchList: 'search',
createUser: 'create',
userName: 'user name',
name: 'name',
surname: 'nick name',
email: 'email',
phoneNumber: 'phone pumber',
lockoutEnd: 'lockout',
creationTime: 'creation time',
operaActions: 'opera',
updateUser: 'update',
updateUserBy: 'update {name}',
otherOpera: 'other',
lockUser: 'lock',
deleteUser: 'delete',
delNotRecoverData: 'Please note that the deletion is not recoverable!',
whetherDeleteUser: 'Do you want to delete user {name}?',
userHasBeenDeleted: 'User {name} has been deleted!',
twoFactorEnabled: 'Two-factor',
lockoutEnabled: 'Logon failure locks',
createUserSuccess: 'User {name} added successfully!',
updateUserSuccess: 'User {name} modify successfully!'
},
userProfile: {
basic: 'basic',
security: 'security',
roles: 'role',
roleList: 'roles',
hasRoles: 'existing role',
permission: 'permissions',
password: 'password',
confirmPassword: 'confirm password',
pleaseInputName: 'input name',
pleaseInputUserName: 'input username',
pleaseInputSurname: 'input nick name',
pleaseInputPhoneNumber: 'input phonenumber',
pleaseInputEmail: 'input email',
pleaseInputPassword: 'input password',
pleaseConfirmPassword: 'confirm password'
},
roles: {
refreshList: 'refresh',
id: 'id',
name: 'name',
type: 'type',
system: 'system',
custom: 'custom',
isDefault: 'default',
isPublic: 'public',
isPrivate: 'private',
operaActions: 'opera',
updateRole: 'update',
deleteRole: 'delete',
createRole: 'create',
permission: 'permissions',
otherOpera: 'other',
setDefault: 'set default',
unSetDefault: 'cancel default',
delNotRecoverData: 'Please note that the deletion is not recoverable!',
whetherDeleteRole: 'Do you want to delete the role {name}?',
roleHasBeenDeleted: 'The role {name} has been deleted!',
roleHasBeenSetDefault: '{name} is set to the default role!',
createRoleSuccess: 'Role {name} added successfully!',
pleaseInputRoleName: 'Please enter a role name',
roleNameIsRequired: 'The role name cannot be empty!'
},
operaActions: 'opera',
queryFilter: 'filter',
filterString: 'filter',
searchList: 'search',
creationTime: 'creation time',
successful: 'successful',
pleaseInputBy: 'Please enter the {key}',
pleaseSelectBy: 'Please select a {key}',
none: 'none',
questingDeleteByMessage: 'Whether to delete{message}?',
delNotRecoverData: 'Please note that the deletion is not recoverable!',
whetherDeleteData: 'Delete the selected record {name}?',
dataHasBeenDeleted: 'The selected record {name} has been deleted!',
fieldLengthMustBeRange: 'The field length must be between {min} and {Max}!',
enabled: 'enabled',
disbled: 'disbled',
lastModificationTime: 'modify time',
apiGateWay: {
createGroup: 'create',
updateGroup: 'update',
updateGroupByApp: 'update {name}',
deleteGroup: 'delete',
createGlobal: 'create',
updateGlobal: 'update',
updateGlobalByApp: 'update {name}',
deleteGlobal: 'delete',
createRoute: 'create',
updateRoute: 'update',
updateRouteByApp: 'update {name}',
deleteRoute: 'delete',
deleteRouteByName: 'delete {name}',
deleteRouteSuccess: 'Route {name} has been deleted!',
groupName: 'group',
pleaseInputGroupName: 'Please enter the routing group name',
appId: 'appid',
pleaseInputAppId: 'Please enter the appid',
appName: 'appName',
pleaseInputAppName: 'Please enter the appName',
appIpAddress: 'ip address',
description: 'description',
isActive: 'actived',
active: 'active',
dnActive: 'disable',
basicOptions: 'basic',
routingForward: 'foeward',
requestProcessing: 'request handler',
httpOptions: 'http handler',
rateLimitOptions: 'limit',
authorization: 'security',
qoSOptions: 'qos',
loadBalancerOptions: 'load balancer',
serviceDiscovery: 'discovery',
baseUrl: 'baseUrl',
downstreamScheme: 'downstream scheme',
requestIdKey: 'request key',
maxConnectionsPerServer: 'max connections',
useProxy: 'proxy',
useTracing: 'tracing',
allowAutoRedirect: 'redirect',
useCookieContainer: 'cookie',
clientIdHeader: '客户端请求头',
httpStatusCode: 'Http错误代码',
quotaExceededMessage: '过载错误消息',
rateLimitCounterPrefix: '速率限制器前缀',
disableRateLimitHeaders: '禁用速率限制头',
timeoutValue: '超时时间(ms)',
durationOfBreak: '熔断时间(ms)',
exceptionsAllowedBeforeBreaking: '允许的最大异常次数',
loadBalancerType: '轮询方式',
leastConnection: '总是空闲服务器',
roundRobin: '服务器轮询',
noLoadBalance: '发往首个服务器',
loadBalancerKey: '轮询标识',
loadBalancerExpiry: '到期时间',
discoverType: '实例类型',
discoverHost: '主机地址',
discoverPort: '主机端口',
discoverToken: '访问标识',
configurationKey: '配置标识',
pollingInterval: '轮询间隔',
namespace: '命名空间',
discoverScheme: '协议类型',
downstreamHttpVersion: '下游服务版本',
reRouteName: '路由名称',
appIdHasRequired: '应用标识不能为空!',
upstreamPathTemplate: '上游请求路径',
upstreamHttpMethod: '上游请求方式',
upstreamHost: '上游主机地址',
downstreamHostAndPorts: '下游请求地址',
downstreamPathTemplate: '下游请求路径',
serviceName: '服务名称',
serviceNamespace: '命名空间',
addDownHost: '添加下游主机',
priority: '优先级',
downHostPortFormat: '输入格式: Ip地址:端口号',
aggrefateKey: '聚合标识',
downstreamHttpMethod: '下游请求方法',
changeDownstreamPathTemplate: '下游路径声明转换',
downstreamHeaderTransform: '添加下游响应标头',
addHeadersToRequest: '添加请求标头转换',
addClaimsToRequest: '添加请求声明转换',
addQueriesToRequest: '添加查询参数转换',
upstreamHeaderTransform: '添加上游请求标头',
routeClaimsRequirement: '路由必要声明',
delegatingHandlers: '委托处理程序',
reRouteIsCaseSensitive: '忽略大小写',
dangerousAcceptAnyServerCertificateValidator: '忽略SSL错误',
enableRateLimiting: '启用流量控制',
rateLimitCount: '最大请求数量',
period: '速率限制时间',
periodTimespan: '允许错开时间重试(s)',
clientWhitelist: '客户端白名单',
ipAllowedList: 'Ip白名单',
ipBlockedList: 'Ip黑名单',
authenticationProviderKey: '身份认证程序',
allowedScopes: '允许认证范围',
createAggregateRoute: '新建聚合',
aggregateRouteName: '聚合名称',
reRouteKeys: '路由标识列表',
aggregateOptions: '聚合选项',
routeKeysConfig: '路由配置',
updateAggregateRoute: '编辑聚合',
updateAggregateRouteByName: '编辑聚合 {name}',
deleteAggregateRoute: '删除聚合',
deleteAggregateRouteByName: '删除聚合 {name}',
deleteAggregateRouteSuccess: '聚合路由 {name} 已删除!',
createAggregateRouteKey: '新建聚合参数',
deleteAggregateRouteConfig: '删除配置',
deleteAggregateRouteConfigByKey: '删除路由配置 {key}',
deleteAggregateRouteConfigSuccess: '路由配置 {key} 已删除!',
createAggregateRouteConfigSuccess: '路由配置 {key} 已添加!',
createAggregateRouteConfig: '新建路由配置',
aggregateRouteKey: '路由标识',
aggregateParameter: '聚合参数',
aggregateJsonPath: 'Json路径'
},
identityServer: {
otherOpera: '更多操作',
enabled: '启用客户端',
disbled: '停用客户端',
clientStatus: '客户端状态',
deleteClient: '删除客户端',
updateClient: '编辑客户端',
updateClientByName: '编辑客户端 {name}',
deleteClientById: '是否要删除客户端: {id}',
deleteClientSuccess: '客户端: {id} 已删除!',
createClientSuccess: '客户端: {id} 已添加!',
updateClientSuccess: '客户端: {id} 已修改!',
clientClaim: '客户端声明',
clientProperty: '客户端属性',
clientSecret: '客户端密钥',
clientPermission: '客户端权限',
deleteSecret: '删除密钥',
deleteSecretByType: '是否要删除客户端密钥: {type}',
deleteSecretSuccess: '客户端密钥: {type} 已删除!',
createSecretSuccess: '客户端密钥: {type} 已添加!',
createSecret: '添加客户端密钥',
deleteClaim: '删除声明',
deleteClaimByType: '是否要删除客户端声明: {type}',
deleteClaimSuccess: '客户端声明: {type} 已删除!',
createClaimSuccess: '客户端声明: {type} 已添加!',
createClaim: '添加客户端声明',
deleteProperty: '删除属性',
deleteClientPropertyByType: '是否要删除客户端属性: {key}',
deleteClientPropertySuccess: '客户端属性: {key} 已删除!',
createClientPropertySuccess: '客户端属性: {key} 已添加!',
createClientProperty: '添加客户端属性',
createClient: '添加客户端',
clientId: '客户端标识',
clientName: '客户端名称',
description: '客户端说明',
cloneClint: '克隆客户端',
copyAllowedGrantType: '复制客户端授权类型',
copyRedirectUri: '复制客户端重定向Uri',
copyAllowedScope: '复制客户端作用域',
copyClaim: '复制客户端声明',
copyAllowedCorsOrigin: '复制客户端跨域来源',
copyPostLogoutRedirectUri: '复制客户端注销重定向Uri',
copyPropertie: '复制客户端属性',
copyIdentityProviderRestriction: '复制身份提供程序限制',
protocolType: '协议类型',
requireClientSecret: '需要客户端密钥',
requirePkce: '需要Pkce',
allowPlainTextPkce: '允许纯文本Pkce',
allowOfflineAccess: '允许离线访问',
allowedScopes: '允许的作用域',
redirectUris: '重定向Uri',
allowedGrantTypes: '允许的授权类型',
allowAccessTokensViaBrowser: '允许通过浏览器访问令牌',
identityTokenLifetime: '身份令牌有效期(s)',
accessTokenLifetime: '访问令牌有效期(s)',
authorizationCodeLifetime: '授权码有效期(s)',
absoluteRefreshTokenLifetime: '绝对刷新令牌有效期(s)',
slidingRefreshTokenLifetime: '滚动刷新令牌有效期(s)',
deviceCodeLifetime: '设备授权码有效期(s)',
clientClaimsPrefix: '客户端声明前缀',
basicOptions: '基本设置',
frontChannelLogoutUri: '前端通道注销 Uri',
frontChannelLogoutSessionRequired: '需要前端通道注销会话',
backChannelLogoutUri: '后端通道退出 Uri',
backChannelLogoutSessionRequired: '需要后端通道注销会话',
enableLocalLogin: '启用本地登录',
postLogoutRedirectUris: '注销重定向 Uri',
identityProviderRestrictions: '身份提供程序限制',
userSsoLifetime: '用户 SSO 生命周期',
accessTokenType: '访问令牌类型',
refreshTokenUsage: '刷新令牌使用情况',
refreshTokenExpiration: '刷新令牌过期方式',
allowedCorsOrigins: '允许跨域来源',
updateAccessTokenClaimsOnRefresh: '刷新时更新访问令牌声明',
includeJwtId: '包括 Jwt 标识',
alwaysSendClientClaims: '始终发送客户端声明',
alwaysIncludeUserClaimsInIdToken: '始终在标识令牌中包含用户声明',
pairWiseSubjectSalt: '配对主体盐',
requireConsent: '需要同意',
allowRememberConsent: '允许记住同意',
clientUri: '客户端 Uri',
logoUri: '徽标 Uri',
userCodeType: '用户代码类型',
secretType: '密钥类型',
secretValue: '密钥值',
secretHashType: '哈希类型',
hashOnlySharedSecret: '哈希类型仅适用于 SharedSecret 类型',
secretDescription: '密钥说明',
expiration: '过期日期',
claimType: '声明类型',
claimValue: '声明值',
propertyKey: '属性名称',
propertyValue: '属性值',
createApiResource: '添加Api资源',
updateApiResource: '编辑Api资源',
updateApiResourceByName: '编辑Api资源 {name}',
deleteApiResourceByName: '删除Api资源 {name}',
createApiResourceSuccess: 'Api资源 {name} 已添加!',
deleteApiResourceSuccess: 'Api资源 {name} 已删除!',
updateApiResourceSuccess: 'Api资源 {name} 已修改!',
createApiSecret: '添加Api密钥',
deleteApiSecret: '删除Api密钥',
deleteApiSecretByType: '删除Api密钥 {type}',
createApiSecretSuccess: 'Api密钥 {type} 已添加!',
deleteApiSecretSuccess: 'Api密钥 {type} 已删除!',
apiResourceSecret: 'Api 密钥',
createApiScope: '添加Api作用域',
deleteApiScope: '删除Api作用域',
deleteApiScopeByName: '删除Api作用域 {name}',
createApiScopeSuccess: 'Api作用域 {name} 已添加!',
deleteApiScopeSuccess: 'Api作用域 {name} 已删除!',
apiResourceScope: 'Api 作用域',
deleteApiResource: '删除资源',
resourceName: '资源名称',
resourceDisplayName: '显示名称',
enabledResource: '启用资源',
resourceStatus: '资源状态',
resourceDescription: '资源说明',
resourceUserClaims: '用户声明',
apiScopeName: '名称',
apiScopeDisplayName: '显示名称',
apiScopeDescription: '描述',
apiScopeRequired: '必须',
apiScopeEmphasize: '强调',
apiScopeShowInDiscoveryDocument: '在发现文档显示',
createIdentityResource: '添加身份资源',
updateIdentityResource: '编辑身份资源',
identityResourceProperties: '资源属性',
deleteIdentityResource: '删除资源',
updateIdentityResourceByName: '编辑身份资源 {name}',
deleteIdentityResourceByName: '删除身份资源 {name}',
createIdentityResourceSuccess: '身份资源 {name} 已添加!',
deleteIdentityResourceSuccess: '身份资源 {name} 已删除!',
updateIdentityResourceSuccess: '身份资源 {name} 已修改!',
identityResourceRequired: '必须',
identityResourceEmphasize: '强调',
identityResourceShowInDiscoveryDocument: '在发现文档显示',
deleteIdentityPropertyByKey: '是否要删除身份资源属性: {key}',
deleteIdentityPropertySuccess: '身份资源属性: {key} 已删除!',
createIdentityPropertySuccess: '身份资源属性: {key} 已添加!',
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: {
name: '名称',
displayName: '显示名称',
description: '说明',
operaActions: '操作方法',
queryFilter: '查询过滤',
filterString: '过滤字符',
searchList: '查询列表',
creationTime: '创建时间',
successful: '提交成功',
pleaseInputBy: '请输入{key}',
pleaseSelectBy: '请选择{key}',
none: '未定义',
charLengthRange: '长度在 {min} 到 {max} 个字符!',
questingDeleteByMessage: '是否要删除{message}?',
delNotRecoverData: '请注意,删除后不可恢复!',
whetherDeleteData: '是否删除选择的记录 {name} ?',
dataHasBeenDeleted: '选定的记录 {name} 已删除!',
fieldLengthMustBeRange: '字段的长度必须在{min}到{max}之间!',
enabled: '启用',
disbled: '停用',
status: '状态',
lastModificationTime: '修改时间',
otherOpera: '更多操作',
cancel: '取 消',
confirm: '确 定',
correctEmailAddress: '正确的邮件地址',
correctPhoneNumber: '正确的手机号码',
operatingFast: '您的操作过快,请稍后再试!'
},
messages: {
noNotifications: '没有通知',
noMessages: '没有消息'
}
}

3
vueJs/src/lang/zh.ts

@ -208,7 +208,8 @@ export default {
userSetting: '用户设置',
passwordSecurity: '密码安全',
systemSetting: '系统配置',
userAccount: '用户账户'
userAccount: '用户账户',
mailing: "邮件配置"
},
task: {
title: '任务管理'

165
vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue

@ -486,6 +486,162 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane
v-if="hasSettingExistsed('Abp.Mailing.Smtp.Host')"
:label="$t('settings.mailing')"
>
<el-form-item>
<el-popover
ref="SmtpHost"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Host'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Host'].description"
/>
<span
slot="label"
v-popover:SmtpHost
>{{ globalSetting['Abp.Mailing.Smtp.Host'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Host'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Host'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Host', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpPort"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Port'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Port'].description"
/>
<span
slot="label"
v-popover:SmtpPort
>{{ globalSetting['Abp.Mailing.Smtp.Port'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Port'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Port'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Port', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpUserName"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.UserName'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.UserName'].description"
/>
<span
slot="label"
v-popover:SmtpUserName
>{{ globalSetting['Abp.Mailing.Smtp.UserName'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.UserName'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.UserName'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.UserName', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpPassword"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Password'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Password'].description"
/>
<span
slot="label"
v-popover:SmtpPassword
>{{ globalSetting['Abp.Mailing.Smtp.Password'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Password'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Password'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Password', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpDomain"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.Domain'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.Domain'].description"
/>
<span
slot="label"
v-popover:SmtpDomain
>{{ globalSetting['Abp.Mailing.Smtp.Domain'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.Smtp.Domain'].value"
:placeholder="globalSetting['Abp.Mailing.Smtp.Domain'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.Domain', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpEnableSsl"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.EnableSsl'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.EnableSsl'].description"
/>
<span
slot="label"
v-popover:SmtpEnableSsl
>{{ globalSetting['Abp.Mailing.Smtp.EnableSsl'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Mailing.Smtp.EnableSsl'].value"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.EnableSsl', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="SmtpUseDefaultCredentials"
trigger="hover"
:title="globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].displayName"
:content="globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].description"
/>
<span
slot="label"
v-popover:SmtpUseDefaultCredentials
>{{ globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].displayName }}</span>
<el-switch
v-model="globalSetting['Abp.Mailing.Smtp.UseDefaultCredentials'].value"
@input="(value) => handleSettingValueChanged('Abp.Mailing.Smtp.UseDefaultCredentials', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="MailingDefaultFromAddress"
trigger="hover"
:title="globalSetting['Abp.Mailing.DefaultFromAddress'].displayName"
:content="globalSetting['Abp.Mailing.DefaultFromAddress'].description"
/>
<span
slot="label"
v-popover:MailingDefaultFromAddress
>{{ globalSetting['Abp.Mailing.DefaultFromAddress'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.DefaultFromAddress'].value"
:placeholder="globalSetting['Abp.Mailing.DefaultFromAddress'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.DefaultFromAddress', value)"
/>
</el-form-item>
<el-form-item>
<el-popover
ref="MailingDefaultFromDisplayName"
trigger="hover"
:title="globalSetting['Abp.Mailing.DefaultFromDisplayName'].displayName"
:content="globalSetting['Abp.Mailing.DefaultFromDisplayName'].description"
/>
<span
slot="label"
v-popover:MailingDefaultFromDisplayName
>{{ globalSetting['Abp.Mailing.DefaultFromDisplayName'].displayName }}</span>
<el-input
v-model="globalSetting['Abp.Mailing.DefaultFromDisplayName'].value"
:placeholder="globalSetting['Abp.Mailing.DefaultFromDisplayName'].description"
@input="(value) => handleSettingValueChanged('Abp.Mailing.DefaultFromDisplayName', value)"
/>
</el-form-item>
</el-tab-pane>
</el-tabs>
<el-form-item>
@ -544,6 +700,7 @@ export default class extends Vue {
private handleGetGlobalSettings() {
SettingService.getSettings('G', '').then(settings => {
console.log(settings)
settings.items.forEach(setting => {
if (setting.value) {
const value = setting.value.toLowerCase()
@ -551,9 +708,11 @@ export default class extends Vue {
setting.value = value === 'true'
}
} else {
const defaultValue = setting.defaultValue.toLowerCase()
if (booleanStrings.includes(defaultValue)) {
setting.value = defaultValue === 'true'
if (setting.defaultValue) {
const defaultValue = setting.defaultValue.toLowerCase()
if (booleanStrings.includes(defaultValue)) {
setting.value = defaultValue === 'true'
}
}
}
this.globalSetting[setting.name] = setting

Loading…
Cancel
Save