From ca33be9533c9c50732dd59038c9678530813bcdf Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Thu, 4 Jun 2020 14:43:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E9=87=8D=E5=A4=8D=E6=B3=A8=E5=86=8C=E9=AA=8C=E8=AF=81?= =?UTF-8?q?;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LINGYUN/Abp/Account/AccountAppService.cs | 20 ++++++-- .../Abp/Account/AbpAccountDomainModule.cs | 3 +- .../Abp/Account/IIdentityUserRepository.cs | 2 + .../Account/Localization/Resources/en.json | 5 +- .../Localization/Resources/zh-Hans.json | 5 +- .../Identity/PhoneNumberUserValidator.cs | 48 +++++++++++++++++++ .../LINGYUN.Abp.DistributedLock.csproj | 7 +++ .../LINGYUN.Abp.IM.SignalR.csproj | 6 +++ .../LINGYUN/Abp/IM/SignalR/Hubs/MessageHub.cs | 6 +++ .../LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj | 8 +++- ...INGYUN.Abp.Identity.OverrideOptions.csproj | 6 +++ .../LINGYUN.Abp.Notifications.SignalR.csproj | 6 +++ .../LINGYUN.Abp.Notifications.csproj | 7 +++ .../LINGYUN.Abp.RealTime.csproj | 6 +++ .../LINGYUN.Abp.RedisLock.csproj | 6 +++ .../UserCreateSendWelcomeEventHandler.cs | 33 +++++++------ .../EfCoreIdentityUserExtensionRepository.cs | 7 ++- aspnet-core/services/cleanup-logs.bat | 7 ++- .../EfCoreIdentityUserExtensionRepository.cs | 7 ++- .../PlatformHttpApiHostMigrationsDbContext.cs | 35 ++++++++++++++ ...rmHttpApiHostMigrationsDbContextFactory.cs | 29 +++++++++++ ...enantConnectionStringCreateEventHandler.cs | 11 +++++ .../Handlers/TenantCreateEventHandler.cs | 2 +- .../Handlers/TenantDeleteEventHandler.cs | 2 +- 24 files changed, 246 insertions(+), 28 deletions(-) create mode 100644 aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs create mode 100644 aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContext.cs create mode 100644 aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContextFactory.cs create mode 100644 aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs index 0ec05b642..2c8412887 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs @@ -18,18 +18,21 @@ namespace LINGYUN.Abp.Account { protected ISmsSender SmsSender { get; } protected IdentityUserManager UserManager { get; } + protected IdentityUserStore UserStore { get; } protected IIdentityUserRepository UserRepository { get; } protected IDistributedCache Cache { get; } protected PhoneNumberTokenProvider PhoneNumberTokenProvider { get; } public AccountAppService( ISmsSender smsSender, IdentityUserManager userManager, + IdentityUserStore userStore, IIdentityUserRepository userRepository, IDistributedCache cache, PhoneNumberTokenProvider phoneNumberTokenProvider) { Cache = cache; SmsSender = smsSender; + UserStore = userStore; UserManager = userManager; UserRepository = userRepository; PhoneNumberTokenProvider = phoneNumberTokenProvider; @@ -57,16 +60,27 @@ namespace LINGYUN.Abp.Account await CheckSelfRegistrationAsync(); - var userEmail = input.EmailAddress ?? input.PhoneNumber + "@abp.io"; + // 需要用户输入邮箱? + //if (UserManager.Options.User.RequireUniqueEmail) + //{ + // if (input.EmailAddress.IsNullOrWhiteSpace()) + // { + // throw new UserFriendlyException(L["RequiredEmailAddress"]); + // } + //} + + var userEmail = input.EmailAddress ?? $"{input.PhoneNumber}@{new Random().Next(1000, 99999)}.com";//如果邮件地址不验证,随意写入一个 var userName = input.UserName ?? input.PhoneNumber; var user = new IdentityUser(GuidGenerator.Create(), userName, userEmail, CurrentTenant.Id) { Name = input.Name ?? input.PhoneNumber }; + // 写入手机号要在创建用户之前,因为有一个自定义的手机号验证 + await UserStore.SetPhoneNumberAsync(user, input.PhoneNumber); + await UserStore.SetPhoneNumberConfirmedAsync(user, true); + (await UserManager.CreateAsync(user, input.Password)).CheckErrors(); - (await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); - (await UserManager.SetEmailAsync(user, userEmail)).CheckErrors(); (await UserManager.AddDefaultRolesAsync(user)).CheckErrors(); await Cache.RemoveAsync(phoneVerifyCacheKey); diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountDomainModule.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountDomainModule.cs index 0ad58c817..38693428c 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountDomainModule.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountDomainModule.cs @@ -1,4 +1,5 @@ -using Volo.Abp.Localization; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Localization; using Volo.Abp.Modularity; using Volo.Abp.VirtualFileSystem; diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs index 54817fc92..16fd24b24 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs @@ -7,6 +7,8 @@ namespace LINGYUN.Abp.Account { public interface IIdentityUserRepository : IReadOnlyRepository { + Task PhoneNumberHasRegistedAsync(string phoneNumber); + Task FindByPhoneNumberAsync(string phoneNumber); } } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json index 488ddc52f..011e17b0d 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json @@ -9,6 +9,9 @@ "DisplayName:SmsSigninTemplateCode": "Signin sms template", "Description:SmsSigninTemplateCode": "When the user logs in, he/she should send the template number of the SMS verification code and fill in the template number of the corresponding cloud platform registration", "DisplayName:PhoneVerifyCodeExpiration": "SMS verification code validity", - "Description:PhoneVerifyCodeExpiration": "The valid time for the user to send SMS verification code, unit m, default 3m" + "Description:PhoneVerifyCodeExpiration": "The valid time for the user to send SMS verification code, unit m, default 3m", + "RequiredEmailAddress": "Email address required", + "InvalidPhoneNumber": "Invalid phone number", + "DuplicatePhoneNumber": "The phone number {0} has been registered!" } } \ No newline at end of file diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json index 479cf69fa..153fc9e6f 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json @@ -9,6 +9,9 @@ "DisplayName:SmsSigninTemplateCode": "用户登录短信模板", "Description:SmsSigninTemplateCode": "用户登录时发送短信验证码的模板号,填写对应云平台注册的模板号", "DisplayName:PhoneVerifyCodeExpiration": "短信验证码有效期", - "Description:PhoneVerifyCodeExpiration": "用户发送短信验证码的有效时长,单位m,默认3m" + "Description:PhoneVerifyCodeExpiration": "用户发送短信验证码的有效时长,单位m,默认3m", + "RequiredEmailAddress": "邮件地址必须输入", + "InvalidPhoneNumber": "手机号无效", + "DuplicatePhoneNumber": "手机号已经注册过!" } } \ No newline at end of file diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs new file mode 100644 index 000000000..861de3343 --- /dev/null +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/Microsoft/AspNetCore/Identity/PhoneNumberUserValidator.cs @@ -0,0 +1,48 @@ +using LINGYUN.Abp.Account.Localization; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; +using System; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Identity; +using IIdentityUserRepository = LINGYUN.Abp.Account.IIdentityUserRepository; + +namespace Microsoft.AspNetCore.Identity +{ + [Dependency(ServiceLifetime.Scoped, ReplaceServices = true)] + [ExposeServices(typeof(IUserValidator))] + public class PhoneNumberUserValidator : UserValidator + { + private readonly IStringLocalizer _stringLocalizer; + private readonly IIdentityUserRepository _identityUserRepository; + + public PhoneNumberUserValidator( + IStringLocalizer stringLocalizer, + IIdentityUserRepository identityUserRepository) + { + _stringLocalizer = stringLocalizer; + _identityUserRepository = identityUserRepository; + } + public override async Task ValidateAsync(UserManager manager, IdentityUser user) + { + await ValidatePhoneNumberAsync(manager, user); + return await base.ValidateAsync(manager, user); + } + + protected virtual async Task ValidatePhoneNumberAsync(UserManager manager, IdentityUser user) + { + var phoneNumber = await manager.GetPhoneNumberAsync(user); + if (phoneNumber.IsNullOrWhiteSpace()) + { + throw new UserFriendlyException(_stringLocalizer["InvalidPhoneNumber"].Value, "InvalidPhoneNumber"); + } + + var phoneNumberHasRegisted = await _identityUserRepository.PhoneNumberHasRegistedAsync(phoneNumber); + if (phoneNumberHasRegisted) + { + throw new UserFriendlyException(_stringLocalizer["DuplicatePhoneNumber", phoneNumber].Value, "DuplicatePhoneNumber"); + } + } + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj index 9115b80b6..fde3b4b65 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj @@ -3,6 +3,13 @@ netstandard2.0 + false + true + 2.8.0 + + + + D:\LocalNuget diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj index 7718a5418..3247899f8 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj @@ -3,6 +3,12 @@ netcoreapp3.1 + true + 2.8.0 + + + + D:\LocalNuget diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessageHub.cs b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessageHub.cs index 75b05f35e..cf47eeaa5 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessageHub.cs +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN/Abp/IM/SignalR/Hubs/MessageHub.cs @@ -65,6 +65,12 @@ namespace LINGYUN.Abp.IM.SignalR.Hubs { var onlineClientContext = new OnlineClientContext(chatMessage.TenantId, chatMessage.ToUserId.GetValueOrDefault()); var onlineClients = OnlineClientManager.GetAllByContext(onlineClientContext); + + // 需要捕捉每一个发送任务的异常吗? + // var onlineClientConnections = onlineClients.Select(c => c.ConnectionId).ToImmutableList(); + // var signalRClient = Clients.Clients(onlineClientConnections); + // await signalRClient.SendAsync("getChatMessage", chatMessage); + foreach (var onlineClient in onlineClients) { try diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj index db4635ca9..6816a06e0 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj @@ -1,8 +1,14 @@ - + netstandard2.0 + true + 2.8.0 + + + + D:\LocalNuget diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj index 5260b1752..7aa706913 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj @@ -3,6 +3,12 @@ netstandard2.0 + true + 2.8.0 + + + + D:\LocalNuget diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj index 1d4d15feb..6064b8b2e 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj @@ -3,6 +3,12 @@ netcoreapp3.1 + true + 2.8.0 + + + + D:\LocalNuget diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj index 60d5efeb9..cacc267e4 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj @@ -3,6 +3,13 @@ netstandard2.0 + false + true + 2.8.0 + + + + D:\LocalNuget diff --git a/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj b/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj index 268dae169..40c98d45b 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj @@ -3,6 +3,12 @@ netstandard2.0 + 2.8.0 + true + + + + D:\LocalNuget diff --git a/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj b/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj index b9df59cc8..f615b282b 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj @@ -3,6 +3,12 @@ netstandard2.0 + true + 2.8.0 + + + + D:\LocalNuget diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserCreateSendWelcomeEventHandler.cs b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserCreateSendWelcomeEventHandler.cs index 6bea621c6..0b2cb061e 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserCreateSendWelcomeEventHandler.cs +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/EventBus/Local/UserCreateSendWelcomeEventHandler.cs @@ -44,26 +44,29 @@ namespace LINGYUN.Abp.MessageService.EventBus { // 获取默认语言 var userDefaultCultureName = await _settingProvider.GetOrNullAsync(LocalizationSettingNames.DefaultLanguage); - if (!userDefaultCultureName.IsNullOrWhiteSpace()) + if (userDefaultCultureName.IsNullOrWhiteSpace()) { - CultureInfo.CurrentUICulture = CultureInfo.GetCultureInfo(userDefaultCultureName); + userDefaultCultureName = CultureInfo.CurrentUICulture.Name; // CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo(userDefaultCultureName); } - // 订阅用户欢迎消息 - await _notificationStore.InsertUserSubscriptionAsync(eventData.Entity.TenantId, - eventData.Entity.Id, UserNotificationNames.WelcomeToApplication); - - var userWelcomeNotifiction = new NotificationInfo + using (CultureHelper.Use(userDefaultCultureName, userDefaultCultureName)) { - CreationTime = DateTime.Now, - Name = UserNotificationNames.WelcomeToApplication, - NotificationSeverity = NotificationSeverity.Info, - NotificationType = NotificationType.System, - TenantId = eventData.Entity.TenantId - }; - userWelcomeNotifiction.Data.Properties["message"] = L("WelcomeToApplicationFormUser", eventData.Entity.UserName); + // 订阅用户欢迎消息 + await _notificationStore.InsertUserSubscriptionAsync(eventData.Entity.TenantId, + eventData.Entity.Id, UserNotificationNames.WelcomeToApplication); + + var userWelcomeNotifiction = new NotificationInfo + { + CreationTime = DateTime.Now, + Name = UserNotificationNames.WelcomeToApplication, + NotificationSeverity = NotificationSeverity.Info, + NotificationType = NotificationType.System, + TenantId = eventData.Entity.TenantId + }; + userWelcomeNotifiction.Data.Properties["message"] = L("WelcomeToApplicationFormUser", eventData.Entity.UserName); - await _notificationDispatcher.DispatcheAsync(userWelcomeNotifiction); + await _notificationDispatcher.DispatcheAsync(userWelcomeNotifiction); + } } //public async Task HandleEventAsync(EntityCreatedEventData eventData) diff --git a/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs b/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs index 62593211a..22163ee4e 100644 --- a/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs +++ b/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs @@ -19,7 +19,12 @@ namespace AuthServer.Host.EntityFrameworkCore.Identity { } - public async Task FindByPhoneNumberAsync(string phoneNumber) + public virtual async Task PhoneNumberHasRegistedAsync(string phoneNumber) + { + return await DbSet.AnyAsync(x => x.PhoneNumberConfirmed && x.PhoneNumber.Equals(phoneNumber)); + } + + public virtual async Task FindByPhoneNumberAsync(string phoneNumber) { return await WithDetails() .Where(usr => usr.PhoneNumber.Equals(phoneNumber)) diff --git a/aspnet-core/services/cleanup-logs.bat b/aspnet-core/services/cleanup-logs.bat index 56d1f3d39..6375621d7 100644 --- a/aspnet-core/services/cleanup-logs.bat +++ b/aspnet-core/services/cleanup-logs.bat @@ -2,7 +2,10 @@ cls chcp 65001 -echo. 启动平台管理服务 +echo. 清理所有服务日志 -cd .\platform\LINGYUN.Platform.HttpApi.Host +del .\platform\LINGYUN.Platform.HttpApi.Host\Logs /y +del .\apigateway\LINGYUN.ApiGateway.Host\Logs /y +del .\apigateway\LINGYUN.ApiGateway.HttpApi.Host\Logs /y +del .\account\AuthServer.Host\Logs /y diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs index 7809d6795..f1e2a7121 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs @@ -19,7 +19,12 @@ namespace LINGYUN.Platform.EntityFrameworkCore.Identity { } - public async Task FindByPhoneNumberAsync(string phoneNumber) + public virtual async Task PhoneNumberHasRegistedAsync(string phoneNumber) + { + return await DbSet.AnyAsync(x => x.PhoneNumberConfirmed && x.PhoneNumber.Equals(phoneNumber)); + } + + public virtual async Task FindByPhoneNumberAsync(string phoneNumber) { return await DbSet.Where(usr => usr.PhoneNumber.Equals(phoneNumber)).FirstOrDefaultAsync(); } diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContext.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContext.cs new file mode 100644 index 000000000..8c7382a55 --- /dev/null +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContext.cs @@ -0,0 +1,35 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Identity.EntityFrameworkCore; +using Volo.Abp.IdentityServer.EntityFrameworkCore; +using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; +using Volo.Abp.TenantManagement.EntityFrameworkCore; + +namespace LINGYUN.Platform.EntityFrameworkCore +{ + public class PlatformHttpApiHostMigrationsDbContext : AbpDbContext + { + public PlatformHttpApiHostMigrationsDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.ConfigureIdentity(); + modelBuilder.ConfigureIdentityServer(options => + { + options.TablePrefix = "IdentityServer"; + options.Schema = null; + options.DatabaseProvider = EfCoreDatabaseProvider.MySql; + }); + modelBuilder.ConfigureTenantManagement(); + modelBuilder.ConfigureSettingManagement(); + modelBuilder.ConfigurePermissionManagement(); + } + } +} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContextFactory.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContextFactory.cs new file mode 100644 index 000000000..9dd641cfd --- /dev/null +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/PlatformHttpApiHostMigrationsDbContextFactory.cs @@ -0,0 +1,29 @@ +using System.IO; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.Extensions.Configuration; + +namespace LINGYUN.Platform.EntityFrameworkCore +{ + public class PlatformHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory + { + public PlatformHttpApiHostMigrationsDbContext CreateDbContext(string[] args) + { + var configuration = BuildConfiguration(); + + var builder = new DbContextOptionsBuilder() + .UseMySql(configuration.GetConnectionString("Default")); + + return new PlatformHttpApiHostMigrationsDbContext(builder.Options); + } + + private static IConfigurationRoot BuildConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.Development.json", optional: false); + + return builder.Build(); + } + } +} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs new file mode 100644 index 000000000..6b70ba77a --- /dev/null +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace LINGYUN.Platform.EventBus.Handlers +{ + public class TenantConnectionStringCreateEventHandler + { + } +} diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs index 52467ef6f..2eb2c586d 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs @@ -70,7 +70,7 @@ namespace LINGYUN.Platform.EventBus.Handlers } await PermissionGrantRepository.GetDbContext().Database.ExecuteSqlRawAsync(batchInsertPermissionSql); - await unitOfWork.CompleteAsync(); + await unitOfWork.SaveChangesAsync(); } } } diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs index aae3df09a..d642b1eea 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs @@ -57,7 +57,7 @@ namespace LINGYUN.Platform.EventBus.Handlers await PermissionGrantRepository.GetDbContext().Database .ExecuteSqlRawAsync(batchRmovePermissionSql); - await unitOfWork.CompleteAsync(); + await unitOfWork.SaveChangesAsync(); } } From d15ed558bb89ea18270e13bcef621fb0cc63a6f5 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 5 Jun 2020 17:01:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E6=A8=A1=E5=9D=97,=E9=9B=86=E6=88=90?= =?UTF-8?q?=E4=B8=83=E7=89=9B=E4=BA=91=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LINGYUN.Abp.FileStorage.Qiniu.csproj | 16 +++ .../Qiniu/AbpQiniuFileStorageModule.cs | 10 ++ .../Qiniu/QiniuFileStorageOptions.cs | 40 +++++++ .../Qiniu/QiniuFileStorageProvider.cs | 111 ++++++++++++++++++ .../LINGYUN.Abp.FileStorage.csproj | 12 ++ .../Abp/FileStorage/AbpFileStorageModule.cs | 8 ++ .../FileDownloadCompletedEventArges.cs | 8 ++ .../FileDownloadProgressEventArges.cs | 11 ++ .../LINGYUN/Abp/FileStorage/FileInfo.cs | 59 ++++++++++ .../Abp/FileStorage/FileStorageProvider.cs | 63 ++++++++++ .../FileUploadCompletedEventArges.cs | 8 ++ .../FileUploadProgressEventArges.cs | 21 ++++ .../Abp/FileStorage/IFileStorageProvider.cs | 41 +++++++ .../LINGYUN/Abp/FileStorage/IFileStore.cs | 39 ++++++ .../LINGYUN/Abp/FileStorage/MediaType.cs | 25 ++++ 15 files changed, 472 insertions(+) create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/AbpQiniuFileStorageModule.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageOptions.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageProvider.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/AbpFileStorageModule.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadCompletedEventArges.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadProgressEventArges.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileInfo.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileStorageProvider.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadCompletedEventArges.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadProgressEventArges.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStorageProvider.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStore.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/MediaType.cs diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj new file mode 100644 index 000000000..f9f7278ba --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj @@ -0,0 +1,16 @@ + + + + netstandard2.0 + + + + + + + + + + + + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/AbpQiniuFileStorageModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/AbpQiniuFileStorageModule.cs new file mode 100644 index 000000000..2568f6cd5 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/AbpQiniuFileStorageModule.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.FileStorage.Qiniu +{ + [DependsOn(typeof(AbpFileStorageModule))] + public class AbpQiniuFileStorageModule : AbpModule + { + + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageOptions.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageOptions.cs new file mode 100644 index 000000000..7a7838a0b --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageOptions.cs @@ -0,0 +1,40 @@ +namespace LINGYUN.Abp.FileStorage.Qiniu +{ + public class QiniuFileStorageOptions + { + /// + /// Api授权码 + /// + public string AccessKey { get; set; } + /// + /// Api密钥 + /// + public string SecretKey { get; set; } + /// + /// 默认自动删除该文件天数 + /// 默认 0,不删除 + /// + public int DeleteAfterDays { get; set; } + /// + /// 上传成功后,七牛云向业务服务器发送 POST 请求的 URL。 + /// 必须是公网上可以正常进行 POST 请求并能响应 HTTP/1.1 200 OK 的有效 URL + /// + public string UploadCallbackUrl { get; set; } + /// + /// 上传成功后,七牛云向业务服务器发送回调通知时的 Host 值。 + /// 与 callbackUrl 配合使用,仅当设置了 callbackUrl 时才有效。 + /// + public string UploadCallbackHost { get; set; } + /// + /// 上传成功后,七牛云向业务服务器发送回调通知 callbackBody 的 Content-Type。 + /// 默认为 application/x-www-form-urlencoded,也可设置为 application/json。 + /// + public string UploadCallbackBodyType { get; set; } + /// + /// 上传成功后,自定义七牛云最终返回給上传端(在指定 returnUrl 时是携带在跳转路径参数中)的数据。 + /// 支持魔法变量和自定义变量。returnBody 要求是合法的 JSON 文本。 + /// 例如 {"key": $(key), "hash": $(etag), "w": $(imageInfo.width), "h": $(imageInfo.height)}。 + /// + public string UploadCallbackBody { get; set; } + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageProvider.cs new file mode 100644 index 000000000..2a19b2d4e --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN/Abp/FileStorage/Qiniu/QiniuFileStorageProvider.cs @@ -0,0 +1,111 @@ +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 options) + : base(store) + { + Options = options.Value; + } + + protected override async Task 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); + } + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj new file mode 100644 index 000000000..76ce15181 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj @@ -0,0 +1,12 @@ + + + + netstandard2.0 + + + + + + + + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/AbpFileStorageModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/AbpFileStorageModule.cs new file mode 100644 index 000000000..57147498e --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/AbpFileStorageModule.cs @@ -0,0 +1,8 @@ +using Volo.Abp.Modularity; + +namespace LINGYUN.Abp.FileStorage +{ + public class AbpFileStorageModule : AbpModule + { + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadCompletedEventArges.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadCompletedEventArges.cs new file mode 100644 index 000000000..8d41bafa5 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadCompletedEventArges.cs @@ -0,0 +1,8 @@ +using System; + +namespace LINGYUN.Abp.FileStorage +{ + public class FileDownloadCompletedEventArges : EventArgs + { + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadProgressEventArges.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadProgressEventArges.cs new file mode 100644 index 000000000..d254b4461 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileDownloadProgressEventArges.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace LINGYUN.Abp.FileStorage +{ + public class FileDownloadProgressEventArges : EventArgs + { + + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileInfo.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileInfo.cs new file mode 100644 index 000000000..7376e7297 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileInfo.cs @@ -0,0 +1,59 @@ +using System; + +namespace LINGYUN.Abp.FileStorage +{ + /// + /// 文件信息 + /// + public class FileInfo + { + /// + /// 名称 + /// + public string Name { get; set; } + /// + /// 大小 + /// + public long Size { get; set; } + /// + /// 文件路径 + /// + public string Directory { get; set; } + /// + /// 文件扩展名 + /// + public string Extension { get; set; } + /// + /// 文件哈希码,用于唯一标识 + /// + public string Hash { get; set; } + /// + /// 文件链接 + /// + public string Url { get; set; } + /// + /// 文件数据 + /// + public byte[] Data { get; set; } + /// + /// 媒体类型 + /// + public MediaType MediaType { get; set; } + /// + /// 创建时间 + /// + public DateTime CreationTime { get; set; } + /// + /// 创建人 + /// + public Guid? CreatorId { get; set; } + /// + /// 上次变更时间 + /// + public DateTime? LastModificationTime { get; set; } + /// + /// 上次变更人 + /// + public Guid? LastModifierId { get; set; } + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileStorageProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileStorageProvider.cs new file mode 100644 index 000000000..57d33ca5e --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileStorageProvider.cs @@ -0,0 +1,63 @@ +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace LINGYUN.Abp.FileStorage +{ + public abstract class FileStorageProvider : IFileStorageProvider + { + public event EventHandler FileDownloadProgressChanged; + public event EventHandler FileDownloadCompleted; + public event EventHandler FileUploadProgressChanged; + public event EventHandler 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 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 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()); + } + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadCompletedEventArges.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadCompletedEventArges.cs new file mode 100644 index 000000000..eb23f111d --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadCompletedEventArges.cs @@ -0,0 +1,8 @@ +using System; + +namespace LINGYUN.Abp.FileStorage +{ + public class FileUploadCompletedEventArges : EventArgs + { + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadProgressEventArges.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadProgressEventArges.cs new file mode 100644 index 000000000..9ae7def26 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/FileUploadProgressEventArges.cs @@ -0,0 +1,21 @@ +using System; + +namespace LINGYUN.Abp.FileStorage +{ + public class FileUploadProgressEventArges : EventArgs + { + /// + /// 上传数据大小 + /// + public long BytesSent { get; } + /// + /// 总数据大小 + /// + public long TotalBytesSent { get; } + public FileUploadProgressEventArges(long sent, long total) + { + BytesSent = sent; + TotalBytesSent = total; + } + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStorageProvider.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStorageProvider.cs new file mode 100644 index 000000000..b7c892b45 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStorageProvider.cs @@ -0,0 +1,41 @@ +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace LINGYUN.Abp.FileStorage +{ + /// + /// 文件存储提供者 + /// + public interface IFileStorageProvider + { + event EventHandler FileDownloadProgressChanged; + event EventHandler FileDownloadCompleted; + + event EventHandler FileUploadProgressChanged; + event EventHandler FileUploadCompleted; + + /// + /// 存储文件 + /// + /// 文件信息 + /// 过期时间,单位(s) + /// + /// + Task StorageAsync(FileInfo fileInfo, int? expireIn = null, CancellationToken cancellationToken = default); + /// + /// 获取文件 + /// + /// 文件唯一标识 + /// 保存到本地路径 + /// + Task GetFileAsync(string hash, string saveLocalPath); + /// + /// 删除文件 + /// + /// 文件唯一标识 + /// + /// + Task DeleteFileAsync(string hash, CancellationToken cancellationToken = default); + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStore.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStore.cs new file mode 100644 index 000000000..f4b12a87b --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/IFileStore.cs @@ -0,0 +1,39 @@ +using System.Threading; +using System.Threading.Tasks; + +namespace LINGYUN.Abp.FileStorage +{ + /// + /// 文件存储接口 + /// + public interface IFileStore + { + /// + /// 存储文件 + /// + /// 文件信息 + /// 过期时间,单位(s) + /// + /// + Task StorageAsync(FileInfo fileInfo, int? expireIn = null, CancellationToken cancellationToken = default); + /// + /// 获取文件 + /// + /// 文件唯一标识 + /// + Task GetFileAsync(string hash); + /// + /// 文件是否存在 + /// + /// 文件唯一标识 + /// + Task FileHasExistsAsync(string hash); + /// + /// 删除文件 + /// + /// 文件唯一标识 + /// + /// + Task DeleteFileAsync(string hash, CancellationToken cancellationToken = default); + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/MediaType.cs b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/MediaType.cs new file mode 100644 index 000000000..ebabe6fda --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN/Abp/FileStorage/MediaType.cs @@ -0,0 +1,25 @@ +namespace LINGYUN.Abp.FileStorage +{ + /// + /// 媒体类型 + /// + public enum MediaType + { + /// + /// 文档 + /// + Document = 0, + /// + /// 图像 + /// + Image = 2, + /// + /// 影像 + /// + Video = 3, + /// + /// 音乐 + /// + Music = 4 + } +} From 9367bc58e7be02a087057e33f4637b09961c5204 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Fri, 5 Jun 2020 22:13:31 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Abp/Account/Dto/PasswordResetDto.cs | 24 ++ .../LINGYUN/Abp/Account/IAccountAppService.cs | 2 + .../LINGYUN/Abp/Account/AccountAppService.cs | 99 ++++- .../Account/AccountRegisterVerifyCacheItem.cs | 1 + .../Abp/Account/AccountSettingNames.cs | 4 + .../Abp/Account/PhoneNumberVerifyType.cs | 3 +- .../AbpAccountSettingDefinitionProvider.cs | 2 + .../Abp/Account/IIdentityUserRepository.cs | 2 + .../Account/Localization/Resources/en.json | 2 + .../Localization/Resources/zh-Hans.json | 2 + .../LINGYUN/Abp/Account/AccountController.cs | 7 + .../LINGYUN.Abp.FileStorage.Qiniu.csproj | 4 + .../Class1.cs | 8 + ....Abp.IdentityServer.WeChatValidator.csproj | 12 + .../EfCoreIdentityUserExtensionRepository.cs | 9 + .../EfCoreIdentityUserExtensionRepository.cs | 12 +- vueJs/src/api/users.ts | 24 +- vueJs/src/components/LangSelect/index.vue | 1 + vueJs/src/lang/zh.ts | 2 + vueJs/src/permission.ts | 2 +- vueJs/src/router/index.ts | 5 + vueJs/src/views/login/index.vue | 51 ++- vueJs/src/views/register/index.vue | 4 +- vueJs/src/views/reset-password/index.vue | 339 ++++++++++++++++++ 24 files changed, 585 insertions(+), 36 deletions(-) create mode 100644 aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/Class1.cs create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj create mode 100644 vueJs/src/views/reset-password/index.vue diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs new file mode 100644 index 000000000..a64affca6 --- /dev/null +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/PasswordResetDto.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Auditing; +using Volo.Abp.Identity; + +namespace LINGYUN.Abp.Account +{ + public class PasswordResetDto + { + [Required] + [Phone] + [StringLength(IdentityUserConsts.MaxPhoneNumberLength)] + public string PhoneNumber { get; set; } + + [Required] + [StringLength(IdentityUserConsts.MaxPasswordLength)] + [DataType(DataType.Password)] + [DisableAuditing] + public string NewPassword { get; set; } + + [Required] + [StringLength(6)] + public string VerifyCode { get; set; } + } +} diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/IAccountAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/IAccountAppService.cs index 031b76359..eee5ab984 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/IAccountAppService.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/IAccountAppService.cs @@ -8,6 +8,8 @@ namespace LINGYUN.Abp.Account { Task RegisterAsync(RegisterVerifyDto input); + Task ResetPasswordAsync(PasswordResetDto passwordReset); + Task VerifyPhoneNumberAsync(VerifyDto input); } } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs index 2c8412887..e73ac96ac 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AccountAppService.cs @@ -8,6 +8,7 @@ using Volo.Abp.Caching; using Volo.Abp.Identity; using Volo.Abp.Settings; using Volo.Abp.Sms; +using Volo.Abp.Uow; namespace LINGYUN.Abp.Account { @@ -87,6 +88,34 @@ namespace LINGYUN.Abp.Account return ObjectMapper.Map(user); } + + // TODO: 是否有必要移动到ProfileService + /// + /// 重置用户密码 + /// + /// + /// + public virtual async Task ResetPasswordAsync(PasswordResetDto passwordReset) + { + // 本来可以不需要的,令牌算法有一个有效期 + // 不过这里采用令牌强制过期策略,避免一个令牌多次使用 + var phoneVerifyCacheKey = NormalizeCacheKey(passwordReset.PhoneNumber); + + var phoneVerifyCacheItem = await Cache.GetAsync(phoneVerifyCacheKey); + if (phoneVerifyCacheItem == null || !phoneVerifyCacheItem.VerifyCode.Equals(passwordReset.VerifyCode)) + { + throw new UserFriendlyException(L["PhoneVerifyCodeInvalid"]); + } + + var userId = await GetUserIdByPhoneNumberAsync(passwordReset.PhoneNumber); + + var user = await UserManager.GetByIdAsync(userId); + + (await UserManager.ResetPasswordAsync(user, phoneVerifyCacheItem.VerifyToken, passwordReset.NewPassword)).CheckErrors(); + + + await Cache.RemoveAsync(phoneVerifyCacheKey); + } /// /// 验证手机号码 /// @@ -124,18 +153,26 @@ namespace LINGYUN.Abp.Account { PhoneNumber = input.PhoneNumber, }; - if (input.VerifyType == PhoneNumberVerifyType.Register) - { - var phoneVerifyCode = new Random().Next(100000, 999999); - verifyCacheItem.VerifyCode = phoneVerifyCode.ToString(); - var templateCode = await SettingProvider.GetOrNullAsync(AccountSettingNames.SmsRegisterTemplateCode); - await SendPhoneVerifyMessageAsync(templateCode, input.PhoneNumber, phoneVerifyCode.ToString()); - } - else + switch (input.VerifyType) { - var phoneVerifyCode = await SendSigninVerifyCodeAsync(input.PhoneNumber); - verifyCacheItem.VerifyCode = phoneVerifyCode; + case PhoneNumberVerifyType.Register: + var phoneVerifyCode = new Random().Next(100000, 999999); + verifyCacheItem.VerifyCode = phoneVerifyCode.ToString(); + var templateCode = await SettingProvider.GetOrNullAsync(AccountSettingNames.SmsRegisterTemplateCode); + await SendPhoneVerifyMessageAsync(templateCode, input.PhoneNumber, phoneVerifyCode.ToString()); + return; + case PhoneNumberVerifyType.Signin: + var phoneSigninCode = await SendSigninVerifyCodeAsync(input.PhoneNumber); + verifyCacheItem.VerifyCode = phoneSigninCode; + break; + case PhoneNumberVerifyType.ResetPassword: + var resetPasswordCode = new Random().Next(100000, 999999); + verifyCacheItem.VerifyCode = resetPasswordCode.ToString(); + var resetPasswordToken = await SendResetPasswordVerifyCodeAsync(input.PhoneNumber, verifyCacheItem.VerifyCode); + verifyCacheItem.VerifyToken = resetPasswordToken; + break; } + var cacheOptions = new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(verifyCodeExpiration) @@ -151,11 +188,7 @@ namespace LINGYUN.Abp.Account protected virtual async Task SendSigninVerifyCodeAsync(string phoneNumber) { // 查找用户信息 - var user = await UserRepository.FindByPhoneNumberAsync(phoneNumber); - if (user == null) - { - throw new UserFriendlyException(L["PhoneNumberNotRegisterd"]); - } + var user = await GetUserByPhoneNumberAsync(phoneNumber); // 获取登录验证码模板号 var templateCode = await SettingProvider.GetOrNullAsync(AccountSettingNames.SmsSigninTemplateCode); // 生成手机验证码 @@ -165,6 +198,42 @@ namespace LINGYUN.Abp.Account return phoneVerifyCode; } + + protected virtual async Task SendResetPasswordVerifyCodeAsync(string phoneNumber, string phoneVerifyCode) + { + // 查找用户信息 + var user = await GetUserByPhoneNumberAsync(phoneNumber); + // 获取登录验证码模板号 + var templateCode = await SettingProvider.GetOrNullAsync(AccountSettingNames.SmsResetPasswordTemplateCode); + // 生成重置密码验证码 + var phoneVerifyToken = await UserManager.GeneratePasswordResetTokenAsync(user); + // 发送短信验证码 + await SendPhoneVerifyMessageAsync(templateCode, user.PhoneNumber, phoneVerifyCode); + + return phoneVerifyToken; + } + + protected virtual async Task GetUserByPhoneNumberAsync(string phoneNumber) + { + // 查找用户信息 + var user = await UserRepository.FindByPhoneNumberAsync(phoneNumber); + if (user == null) + { + throw new UserFriendlyException(L["PhoneNumberNotRegisterd"]); + } + return user; + } + + protected virtual async Task GetUserIdByPhoneNumberAsync(string phoneNumber) + { + // 查找用户信息 + var userId = await UserRepository.GetIdByPhoneNumberAsync(phoneNumber); + if (!userId.HasValue) + { + throw new UserFriendlyException(L["PhoneNumberNotRegisterd"]); + } + return userId.Value; + } /// /// 检查是否允许用户注册 /// diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountRegisterVerifyCacheItem.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountRegisterVerifyCacheItem.cs index faf78244a..ea74bbe66 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountRegisterVerifyCacheItem.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountRegisterVerifyCacheItem.cs @@ -4,5 +4,6 @@ { public string PhoneNumber { get; set; } public string VerifyCode { get; set; } + public string VerifyToken { get; set; } } } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountSettingNames.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountSettingNames.cs index d3bf2abd9..b5599c281 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountSettingNames.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/AccountSettingNames.cs @@ -15,5 +15,9 @@ /// 用户登录短信验证码模板号 /// public const string SmsSigninTemplateCode = GroupName + ".SmsSigninTemplateCode"; + /// + /// 用户重置密码短信验证码模板号 + /// + public const string SmsResetPasswordTemplateCode = GroupName + ".SmsResetPasswordTemplateCode"; } } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/PhoneNumberVerifyType.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/PhoneNumberVerifyType.cs index 3fb05ebcd..4c01f3b55 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/PhoneNumberVerifyType.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN/Abp/Account/PhoneNumberVerifyType.cs @@ -3,6 +3,7 @@ public enum PhoneNumberVerifyType : sbyte { Register = 0, - Signin = 10 + Signin = 10, + ResetPassword = 20 } } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountSettingDefinitionProvider.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountSettingDefinitionProvider.cs index b8f347730..5ea113e60 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountSettingDefinitionProvider.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/AbpAccountSettingDefinitionProvider.cs @@ -20,6 +20,8 @@ namespace LINGYUN.Abp.Account "SMS_190728520", L("DisplayName:SmsRegisterTemplateCode"), L("Description:SmsRegisterTemplateCode")), new SettingDefinition(AccountSettingNames.SmsSigninTemplateCode, "SMS_190728516", L("DisplayName:SmsSigninTemplateCode"), L("Description:SmsSigninTemplateCode")), + new SettingDefinition(AccountSettingNames.SmsResetPasswordTemplateCode, + "SMS_192530831", L("DisplayName:SmsResetPasswordTemplateCode"), L("Description:SmsResetPasswordTemplateCode")), new SettingDefinition(AccountSettingNames.PhoneVerifyCodeExpiration, "3", L("DisplayName:PhoneVerifyCodeExpiration"), L("Description:PhoneVerifyCodeExpiration")), }; diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs index 16fd24b24..360c2f22b 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/IIdentityUserRepository.cs @@ -10,5 +10,7 @@ namespace LINGYUN.Abp.Account Task PhoneNumberHasRegistedAsync(string phoneNumber); Task FindByPhoneNumberAsync(string phoneNumber); + + Task GetIdByPhoneNumberAsync(string phoneNumber); } } diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json index 011e17b0d..d94881919 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/en.json @@ -8,6 +8,8 @@ "Description:SmsRegisterTemplateCode": "When the user registers, he/she should send the template number of the SMS verification code and fill in the template number of the corresponding cloud platform registration", "DisplayName:SmsSigninTemplateCode": "Signin sms template", "Description:SmsSigninTemplateCode": "When the user logs in, he/she should send the template number of the SMS verification code and fill in the template number of the corresponding cloud platform registration", + "DisplayName:SmsResetPasswordTemplateCode": "Reset password sms template", + "Description:SmsResetPasswordTemplateCode": "When the user resets the password, he/she sends the template number of SMS verification code and fills in the template number registered on the cloud platform", "DisplayName:PhoneVerifyCodeExpiration": "SMS verification code validity", "Description:PhoneVerifyCodeExpiration": "The valid time for the user to send SMS verification code, unit m, default 3m", "RequiredEmailAddress": "Email address required", diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json index 153fc9e6f..114e36d31 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN/Abp/Account/Localization/Resources/zh-Hans.json @@ -8,6 +8,8 @@ "Description:SmsRegisterTemplateCode": "用户注册时发送短信验证码的模板号,填写对应云平台注册的模板号", "DisplayName:SmsSigninTemplateCode": "用户登录短信模板", "Description:SmsSigninTemplateCode": "用户登录时发送短信验证码的模板号,填写对应云平台注册的模板号", + "DisplayName:SmsResetPasswordTemplateCode": "用户重置密码短信模板", + "Description:SmsResetPasswordTemplateCode": "用户重置密码时发送短信验证码的模板号,填写对应云平台注册的模板号", "DisplayName:PhoneVerifyCodeExpiration": "短信验证码有效期", "Description:PhoneVerifyCodeExpiration": "用户发送短信验证码的有效时长,单位m,默认3m", "RequiredEmailAddress": "邮件地址必须输入", diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/AccountController.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/AccountController.cs index f1cc98255..af5b83b4a 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/AccountController.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/AccountController.cs @@ -32,5 +32,12 @@ namespace LINGYUN.Abp.Account { await AccountAppService.VerifyPhoneNumberAsync(input); } + + [HttpPut] + [Route("reset-password")] + public virtual async Task ResetPasswordAsync(PasswordResetDto passwordReset) + { + await AccountAppService.ResetPasswordAsync(passwordReset); + } } } diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj index f9f7278ba..7a4dbebec 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage.Qiniu/LINGYUN.Abp.FileStorage.Qiniu.csproj @@ -13,4 +13,8 @@ + + + + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/Class1.cs b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/Class1.cs new file mode 100644 index 000000000..ea63efae8 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/Class1.cs @@ -0,0 +1,8 @@ +using System; + +namespace LINGYUN.Abp.IdentityServer.WeChatValidator +{ + public class Class1 + { + } +} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj new file mode 100644 index 000000000..15534e458 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj @@ -0,0 +1,12 @@ + + + + netcoreapp3.1 + + + + + + + + diff --git a/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs b/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs index 22163ee4e..69727933e 100644 --- a/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs +++ b/aspnet-core/services/account/AuthServer.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs @@ -24,10 +24,19 @@ namespace AuthServer.Host.EntityFrameworkCore.Identity return await DbSet.AnyAsync(x => x.PhoneNumberConfirmed && x.PhoneNumber.Equals(phoneNumber)); } + public virtual async Task GetIdByPhoneNumberAsync(string phoneNumber) + { + return await DbSet + .Where(x => x.PhoneNumber.Equals(phoneNumber)) + .Select(x => x.Id) + .FirstOrDefaultAsync(); + } + public virtual async Task FindByPhoneNumberAsync(string phoneNumber) { return await WithDetails() .Where(usr => usr.PhoneNumber.Equals(phoneNumber)) + .AsNoTracking() .FirstOrDefaultAsync(); } diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs index f1e2a7121..c9fd962c4 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/EntityFrameworkCore/Identity/EfCoreIdentityUserExtensionRepository.cs @@ -24,9 +24,19 @@ namespace LINGYUN.Platform.EntityFrameworkCore.Identity return await DbSet.AnyAsync(x => x.PhoneNumberConfirmed && x.PhoneNumber.Equals(phoneNumber)); } + public virtual async Task GetIdByPhoneNumberAsync(string phoneNumber) + { + return await DbSet + .Where(x => x.PhoneNumber.Equals(phoneNumber)) + .Select(x => x.Id) + .FirstOrDefaultAsync(); + } + public virtual async Task FindByPhoneNumberAsync(string phoneNumber) { - return await DbSet.Where(usr => usr.PhoneNumber.Equals(phoneNumber)).FirstOrDefaultAsync(); + return await DbSet.Where(usr => usr.PhoneNumber.Equals(phoneNumber)) + .AsNoTracking() + .FirstOrDefaultAsync(); } } } diff --git a/vueJs/src/api/users.ts b/vueJs/src/api/users.ts index 70cf9e68f..f7555d49e 100644 --- a/vueJs/src/api/users.ts +++ b/vueJs/src/api/users.ts @@ -79,6 +79,16 @@ export default class UserApiService { }) } + public static resetPassword(input: UserResetPasswordData) { + const _url = '/api/account/phone/reset-password' + return ApiService.HttpRequest({ + baseURL: IdentityServiceUrl, + url: _url, + data: input, + method: 'PUT' + }) + } + public static userRegister(registerData: UserRegisterData) { const _url = '/api/account/phone/register' return ApiService.HttpRequest({ @@ -224,8 +234,9 @@ export class UserLoginData { } export enum VerifyType { - register = 0, - signin = 10 + Register = 0, + Signin = 10, + ResetPassword = 20 } export class PhoneVerify { @@ -233,6 +244,15 @@ export class PhoneVerify { verifyType!:VerifyType } +export class UserResetPasswordData { + /** 手机号码 */ + phoneNumber!: string + /** 手机验证码 */ + verifyCode!: string + /** 新密码 */ + newPassword!: string +} + /** 用户手机登录对象 */ export class UserLoginPhoneData { /** 手机号码 */ diff --git a/vueJs/src/components/LangSelect/index.vue b/vueJs/src/components/LangSelect/index.vue index c96add06d..7ecc4778b 100644 --- a/vueJs/src/components/LangSelect/index.vue +++ b/vueJs/src/components/LangSelect/index.vue @@ -30,6 +30,7 @@ + + From 733f1c148055bb77137ea9ded7c35c8e976663e7 Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Sat, 6 Jun 2020 08:56:10 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0abp=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E5=88=B02.9.0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...YUN.Abp.MessageService.HttpApi.Host.csproj | 14 ++++---- ...N.Abp.Account.Application.Contracts.csproj | 2 +- .../LINGYUN.Abp.Account.Application.csproj | 4 +-- .../LINGYUN.Abp.Account.Domain.Shared.csproj | 2 +- .../LINGYUN.Abp.Account.Domain.csproj | 2 +- .../LINGYUN.Abp.Account.HttpApi.csproj | 2 +- ...UN.ApiGateway.Application.Contracts.csproj | 2 +- .../LINGYUN.ApiGateway.Application.csproj | 2 +- .../LINGYUN.ApiGateway.Domain.Shared.csproj | 2 +- .../LINGYUN.ApiGateway.Domain.csproj | 4 +-- ...GYUN.ApiGateway.EntityFrameworkCore.csproj | 2 +- .../LINGYUN.ApiGateway.HttpApi.Client.csproj | 2 +- .../LINGYUN.ApiGateway.HttpApi.csproj | 2 +- .../LINGYUN.Abp.DistributedLock.csproj | 2 +- .../LINGYUN.Abp.EventBus.CAP.csproj | 6 ++-- .../LINGYUN.Abp.FileStorage.csproj | 2 +- .../LINGYUN.Abp.IM.SignalR.csproj | 4 +-- .../LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj | 4 +-- ...INGYUN.Abp.Identity.OverrideOptions.csproj | 4 +-- ....Abp.IdentityServer.WeChatValidator.csproj | 4 +-- .../LINGYUN.Abp.Location.Baidu.csproj | 8 ++--- .../LINGYUN.Abp.Location.csproj | 4 +-- .../LINGYUN.Abp.Notifications.SignalR.csproj | 6 ++-- .../LINGYUN.Abp.Notifications.csproj | 4 +-- .../LINGYUN.Abp.RealTime.csproj | 4 +-- .../LINGYUN.Abp.RedisLock.csproj | 4 +-- .../LINGYUN.Abp.Sms.Aliyun.csproj | 8 ++--- .../LINGYUN.Common.EventBus.csproj | 2 +- ...dentityServer.Application.Contracts.csproj | 4 +-- .../Clients/Dto/ClientGetByPagedInputDto.cs | 1 + ...GYUN.Abp.IdentityServer.Application.csproj | 2 +- .../Clients/ClientAppService.cs | 3 +- .../IdentityResourceAppService.cs | 3 +- .../LINGYUN.Abp.IdentityServer.HttpApi.csproj | 2 +- ...YUN.Abp.IdentityServer.SmsValidator.csproj | 2 +- ...UN.Abp.MessageService.Domain.Shared.csproj | 2 +- .../LINGYUN.Abp.MessageService.Domain.csproj | 8 ++--- ....MessageService.EntityFrameworkCore.csproj | 2 +- .../LINGYUN.Abp.MessageService.HttpApi.csproj | 2 +- ...ionManagement.Application.Contracts.csproj | 4 +-- ...bp.PermissionManagement.Application.csproj | 4 +-- ...ingManagement.Application.Contracts.csproj | 4 +-- ...N.Abp.SettingManagement.Application.csproj | 2 +- ...NGYUN.Abp.SettingManagement.HttpApi.csproj | 2 +- ...antManagement.Application.Contracts.csproj | 4 +-- ...UN.Abp.TenantManagement.Application.csproj | 2 +- ...INGYUN.Abp.TenantManagement.HttpApi.csproj | 2 +- .../AuthServer.Host/AuthServer.Host.csproj | 18 +++++------ .../LINGYUN.ApiGateway.Host.csproj | 8 ++--- .../LINGYUN.ApiGateway.HttpApi.Host.csproj | 10 +++--- .../LINGYUN.Platform.HttpApi.Host.csproj | 32 +++++++++---------- 51 files changed, 117 insertions(+), 114 deletions(-) diff --git a/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj index 7443bfa12..240b2809a 100644 --- a/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj +++ b/aspnet-core/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj @@ -22,13 +22,13 @@ - - - - - - - + + + + + + + diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj index 24ba91acc..bbb2d6ffd 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application.Contracts/LINGYUN.Abp.Account.Application.Contracts.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj index 3ddea3d7a..a10c5a38b 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN.Abp.Account.Application.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj index 815f27437..99e8f8e0f 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain.Shared/LINGYUN.Abp.Account.Domain.Shared.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj index 74d1df10d..b34fbca1d 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.Domain/LINGYUN.Abp.Account.Domain.csproj @@ -16,7 +16,7 @@ - + diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj index b2242b858..6725c1982 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN.Abp.Account.HttpApi.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj index a66598500..24a4fe1a7 100644 --- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj +++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application.Contracts/LINGYUN.ApiGateway.Application.Contracts.csproj @@ -16,7 +16,7 @@ - + diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj index e87e99db2..acb418ada 100644 --- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj +++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Application/LINGYUN.ApiGateway.Application.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj index f6eb8b1c0..9e3de3ff0 100644 --- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj +++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain.Shared/LINGYUN.ApiGateway.Domain.Shared.csproj @@ -16,7 +16,7 @@ - + diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj index 72e481122..13ed4360f 100644 --- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj +++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.Domain/LINGYUN.ApiGateway.Domain.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj index ab90b85d8..3a6c97777 100644 --- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.EntityFrameworkCore/LINGYUN.ApiGateway.EntityFrameworkCore.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj index 9239a7892..684658912 100644 --- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj +++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi.Client/LINGYUN.ApiGateway.HttpApi.Client.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj index a9dc687be..fc07ebac2 100644 --- a/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj +++ b/aspnet-core/modules/apigateway/LINGYUN.ApiGateway.HttpApi/LINGYUN.ApiGateway.HttpApi.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj index fde3b4b65..e5287dda7 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.DistributedLock/LINGYUN.Abp.DistributedLock.csproj @@ -5,7 +5,7 @@ false true - 2.8.0 + 2.9.0 diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj index 86262fec0..1087610d0 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.csproj @@ -5,7 +5,7 @@ true false - 2.8.0 + 2.9.0 Cap分布式事件总线 @@ -16,8 +16,8 @@ - - + + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj index 76ce15181..248eb0396 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.FileStorage/LINGYUN.Abp.FileStorage.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj index 3247899f8..ec878f1a4 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM.SignalR/LINGYUN.Abp.IM.SignalR.csproj @@ -4,7 +4,7 @@ netcoreapp3.1 true - 2.8.0 + 2.9.0 @@ -12,7 +12,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj index 6816a06e0..a6e3faca2 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.IM/LINGYUN.Abp.IM.csproj @@ -4,7 +4,7 @@ netstandard2.0 true - 2.8.0 + 2.9.0 @@ -12,7 +12,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj index 7aa706913..0e9f60648 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Identity.OverrideOptions/LINGYUN.Abp.Identity.OverrideOptions.csproj @@ -4,7 +4,7 @@ netstandard2.0 true - 2.8.0 + 2.9.0 @@ -12,7 +12,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj index 15534e458..c15204a42 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.IdentityServer.WeChatValidator/LINGYUN.Abp.IdentityServer.WeChatValidator.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj index 7296996eb..277add8ca 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Location.Baidu/LINGYUN.Abp.Location.Baidu.csproj @@ -4,7 +4,7 @@ netstandard2.0 false - 2.8.0 + 2.9.0 百度位置服务 true @@ -25,9 +25,9 @@ - - - + + + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj index b2ee23223..c09b27d58 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Location/LINGYUN.Abp.Location.csproj @@ -4,7 +4,7 @@ netstandard2.0 true - 2.8.0 + 2.9.0 位置服务 false @@ -14,7 +14,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj index 6064b8b2e..96d5e3069 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.SignalR/LINGYUN.Abp.Notifications.SignalR.csproj @@ -4,7 +4,7 @@ netcoreapp3.1 true - 2.8.0 + 2.9.0 @@ -12,8 +12,8 @@ - - + + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj index cacc267e4..a6f38bfc2 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN.Abp.Notifications.csproj @@ -5,7 +5,7 @@ false true - 2.8.0 + 2.9.0 @@ -13,7 +13,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj b/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj index 40c98d45b..25dfe142c 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.RealTime/LINGYUN.Abp.RealTime.csproj @@ -3,7 +3,7 @@ netstandard2.0 - 2.8.0 + 2.9.0 true @@ -12,7 +12,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj b/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj index f615b282b..cf62619e3 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.RedisLock/LINGYUN.Abp.RedisLock.csproj @@ -4,7 +4,7 @@ netstandard2.0 true - 2.8.0 + 2.9.0 @@ -15,7 +15,7 @@ - + diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj index 5e43f4810..8c6bc0335 100644 --- a/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj +++ b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/LINGYUN.Abp.Sms.Aliyun.csproj @@ -4,7 +4,7 @@ netstandard2.0 false - 2.8.0 + 2.9.0 阿里云短信服务 true @@ -25,9 +25,9 @@ - - - + + + diff --git a/aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN.Common.EventBus.csproj b/aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN.Common.EventBus.csproj index 7b0206dd6..44af410ff 100644 --- a/aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN.Common.EventBus.csproj +++ b/aspnet-core/modules/common/LINGYUN.Common.EventBus/LINGYUN.Common.EventBus.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj index 0e784b770..fc3f707e6 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN.Abp.IdentityServer.Application.Contracts.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByPagedInputDto.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByPagedInputDto.cs index 0f5629048..1205c96f3 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByPagedInputDto.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/Clients/Dto/ClientGetByPagedInputDto.cs @@ -4,5 +4,6 @@ namespace LINGYUN.Abp.IdentityServer.Clients { public class ClientGetByPagedInputDto : PagedAndSortedResultRequestDto { + public string Filter { get; set; } } } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj index 86577be15..eac54b786 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN.Abp.IdentityServer.Application.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs index 455c83798..091c9988a 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/Clients/ClientAppService.cs @@ -141,7 +141,8 @@ namespace LINGYUN.Abp.IdentityServer.Clients { // Abp官方IdentityServer项目不支持Filter过滤... var clients = await ClientRepository.GetListAsync(clientGetByPaged.Sorting, - clientGetByPaged.SkipCount, clientGetByPaged.MaxResultCount, true); + clientGetByPaged.SkipCount, clientGetByPaged.MaxResultCount, + clientGetByPaged.Filter, true); var clientCount = await ClientRepository.GetCountAsync(); diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs index 30ffec299..fa444fd4e 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceAppService.cs @@ -28,7 +28,8 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources public virtual async Task> GetAsync(IdentityResourceGetByPagedInputDto identityResourceGetByPaged) { var identityResources = await IdentityResourceRepository.GetListAsync(identityResourceGetByPaged.Sorting, - identityResourceGetByPaged.SkipCount, identityResourceGetByPaged.MaxResultCount, true); + identityResourceGetByPaged.SkipCount, identityResourceGetByPaged.MaxResultCount, + identityResourceGetByPaged.Filter, true); var identityResourceCount = await IdentityResourceRepository.GetCountAsync(); return new PagedResultDto(identityResourceCount, diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj index 9c4eafc5c..24db66037 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN.Abp.IdentityServer.HttpApi.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj index e79d7fe1b..9eb0d5c96 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj @@ -16,7 +16,7 @@ - + diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj index 799cfdfd1..71e468153 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain.Shared/LINGYUN.Abp.MessageService.Domain.Shared.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj index 30ef08749..8ae03890c 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj @@ -16,10 +16,10 @@ - - - - + + + + diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj index 3ce788c0a..f2ad8207b 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.EntityFrameworkCore/LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj index fd6a1743a..40cfdbeb3 100644 --- a/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj +++ b/aspnet-core/modules/message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN.Abp.MessageService.HttpApi.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj index e904bdfa4..05b157138 100644 --- a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application.Contracts/LINGYUN.Abp.PermissionManagement.Application.Contracts.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj index 1485e2519..0230360fb 100644 --- a/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj +++ b/aspnet-core/modules/permissions/LINGYUN.Abp.PermissionManagement.Application/LINGYUN.Abp.PermissionManagement.Application.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj index 15a6eb018..baf88ac49 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN.Abp.SettingManagement.Application.Contracts.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj index a4667a898..1554fb551 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN.Abp.SettingManagement.Application.csproj @@ -5,7 +5,7 @@ - + diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj index 5dba8495c..439c131aa 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN.Abp.SettingManagement.HttpApi.csproj @@ -5,7 +5,7 @@ - + diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj index 77e7ab38d..0cac8b4d5 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application.Contracts/LINGYUN.Abp.TenantManagement.Application.Contracts.csproj @@ -6,8 +6,8 @@ - - + + diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj index 447d25c85..1a8b4c03b 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.Application/LINGYUN.Abp.TenantManagement.Application.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj index 2a0839fe6..ea4bb4399 100644 --- a/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj +++ b/aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN.Abp.TenantManagement.HttpApi.csproj @@ -6,7 +6,7 @@ - + diff --git a/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj b/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj index c23a9923f..2443966f8 100644 --- a/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj +++ b/aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj @@ -20,15 +20,15 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - + + + + + + + + + diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj index 9578d5f3b..69f88f285 100644 --- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj +++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj @@ -17,10 +17,10 @@ - - - - + + + + diff --git a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj index a0ab01d18..572a7f95e 100644 --- a/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj +++ b/aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj @@ -28,11 +28,11 @@ - - - - - + + + + + diff --git a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj index 04e995be5..4bc6d412b 100644 --- a/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj +++ b/aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj @@ -32,22 +32,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +