diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b829f7c12..c947e5371 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,7 +2,7 @@ name: "Publish" on: push: - branches: [ rel-8.0.3 ] + branches: [ rel-8.1.0 ] env: DOTNET_VERSION: "8.0.200" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63dab17c4..2d8261e13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: "Tagged Release" on: push: - branches: [ rel-8.0.3 ] + branches: [ rel-8.1.0 ] jobs: tagged-release: @@ -14,4 +14,4 @@ jobs: with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - automatic_release_tag: "8.0.3" + automatic_release_tag: "8.1.0" diff --git a/aspnet-core/Directory.Build.props b/aspnet-core/Directory.Build.props index 7edc2a259..88cba33d2 100644 --- a/aspnet-core/Directory.Build.props +++ b/aspnet-core/Directory.Build.props @@ -1,11 +1,11 @@  - 8.0.4 + 8.1.0 3.0.0 - 8.0.4 + 8.1.0 1.12.0 1.0.2 - 8.0.0 + 8.1.0 2.14.1 1.5.10 2.13.0 @@ -15,11 +15,11 @@ 1.8.6 7.15.1 13.0.1 - 1.0.0-rc8 - 1.3.1 - 1.0.0-rc8 - 1.0.0-rc8 - 1.0.0-beta2 + 1.8.0 + 1.8.0 + 1.8.1 + 1.8.1 + 1.0.0-beta.11 3.7.0 2.7.4 3.1.1 diff --git a/aspnet-core/common.props b/aspnet-core/common.props index c43094db9..9a5de77bd 100644 --- a/aspnet-core/common.props +++ b/aspnet-core/common.props @@ -1,12 +1,12 @@ latest - 8.0.4 + 8.1.0 colin $(NoWarn);CS1591;CS0436;CS8618;NU1803 https://github.com/colinin/abp-next-admin $(SolutionDir)LocalNuget - 8.0.3 + 8.1.0 MIT git https://github.com/colinin/abp-next-admin diff --git a/aspnet-core/framework/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs b/aspnet-core/framework/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs index 3d50dad6d..014d9986d 100644 --- a/aspnet-core/framework/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs +++ b/aspnet-core/framework/cloud-aliyun/LINGYUN.Abp.Aliyun.SettingManagement/LINGYUN/Abp/Aliyun/SettingManagement/AliyunSettingController.cs @@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; using Volo.Abp; -using Volo.Abp.Application.Dtos; using Volo.Abp.AspNetCore.Mvc; namespace LINGYUN.Abp.Aliyun.SettingManagement @@ -10,7 +9,7 @@ namespace LINGYUN.Abp.Aliyun.SettingManagement [RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)] [Area("settingManagement")] [Route("api/setting-management/aliyun")] - public class AliyunSettingController : AbpController, IAliyunSettingAppService + public class AliyunSettingController : AbpControllerBase, IAliyunSettingAppService { protected IAliyunSettingAppService AppService { get; } diff --git a/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageController.cs b/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageController.cs index 14045f3c2..fcb9b199e 100644 --- a/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageController.cs +++ b/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/LanguageController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization [Area("abp")] [RemoteService(Name = "abp")] [Route("api/abp/localization/languages")] - public class LanguageController : AbpController, ILanguageAppService + public class LanguageController : AbpControllerBase, ILanguageAppService { private readonly ILanguageAppService _service; diff --git a/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceController.cs b/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceController.cs index 1c2d951b5..c867ee506 100644 --- a/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceController.cs +++ b/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/ResourceController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization [Area("abp")] [RemoteService(Name = "abp")] [Route("api/abp/localization/resources")] - public class ResourceController : AbpController, IResourceAppService + public class ResourceController : AbpControllerBase, IResourceAppService { private readonly IResourceAppService _service; diff --git a/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/TextController.cs b/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/TextController.cs index 7eda7c0f6..54540641a 100644 --- a/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/TextController.cs +++ b/aspnet-core/framework/localization/LINGYUN.Abp.AspNetCore.Mvc.Localization/LINGYUN/Abp/AspNetCore/Mvc/Localization/TextController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.AspNetCore.Mvc.Localization [Area("abp")] [RemoteService(Name = "abp")] [Route("api/abp/localization/texts")] - public class TextController : AbpController, ITextAppService + public class TextController : AbpControllerBase, ITextAppService { private readonly ITextAppService _service; diff --git a/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/LINGYUN/Abp/PushPlus/SettingManagement/PushPlusSettingController.cs b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/LINGYUN/Abp/PushPlus/SettingManagement/PushPlusSettingController.cs index 70ea9750c..a27f1c2dc 100644 --- a/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/LINGYUN/Abp/PushPlus/SettingManagement/PushPlusSettingController.cs +++ b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/LINGYUN/Abp/PushPlus/SettingManagement/PushPlusSettingController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.PushPlus.SettingManagement [RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)] [Area(AbpSettingManagementRemoteServiceConsts.ModuleName)] [Route($"api/{AbpSettingManagementRemoteServiceConsts.ModuleName}/push-plus")] - public class WxPusherSettingController : AbpController, IPushPlusSettingAppService + public class WxPusherSettingController : AbpControllerBase, IPushPlusSettingAppService { protected IPushPlusSettingAppService Service { get; } diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs index 3ac4ecd87..da92d40f7 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.WeChat.SettingManagement [RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)] [Area("settingManagement")] [Route("api/setting-management/wechat")] - public class WeChatSettingController : AbpController, IWeChatSettingAppService + public class WeChatSettingController : AbpControllerBase, IWeChatSettingAppService { protected IWeChatSettingAppService WeChatSettingAppService { get; } diff --git a/aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher.SettingManagement/LINGYUN/Abp/WxPusher/SettingManagement/WxPusherSettingController.cs b/aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher.SettingManagement/LINGYUN/Abp/WxPusher/SettingManagement/WxPusherSettingController.cs index 453020c31..be5896e36 100644 --- a/aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher.SettingManagement/LINGYUN/Abp/WxPusher/SettingManagement/WxPusherSettingController.cs +++ b/aspnet-core/framework/wx-pusher/LINGYUN.Abp.WxPusher.SettingManagement/LINGYUN/Abp/WxPusher/SettingManagement/WxPusherSettingController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.WxPusher.SettingManagement [RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)] [Area(AbpSettingManagementRemoteServiceConsts.ModuleName)] [Route($"api/{AbpSettingManagementRemoteServiceConsts.ModuleName}/wx-pusher")] - public class WxPusherSettingController : AbpController, IWxPusherSettingAppService + public class WxPusherSettingController : AbpControllerBase, IWxPusherSettingAppService { protected IWxPusherSettingAppService Service { get; } diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs new file mode 100644 index 000000000..6859f8036 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.Designer.cs @@ -0,0 +1,1179 @@ +// +using System; +using LY.MicroService.AuthServer.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(AuthServerMigrationsDbContext))] + [Migration("20240413021934_Upgrade-Abp-Framework-To-8-1-0")] + partial class UpgradeAbpFrameworkTo810 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Required") + .HasColumnType("tinyint(1)"); + + b.Property("ValueType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("SourceTenantId") + .HasColumnType("char(36)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("TargetTenantId") + .HasColumnType("char(36)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("tinyint(1)") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("varchar(96)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LastPasswordChangeTime") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("varchar(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("SecurityStamp"); + + b.Property("ShouldChangePasswordOnNextLogin") + .HasColumnType("tinyint(1)"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserDelegation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("EndTime") + .HasColumnType("datetime(6)"); + + b.Property("SourceUserId") + .HasColumnType("char(36)"); + + b.Property("StartTime") + .HasColumnType("datetime(6)"); + + b.Property("TargetUserId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.ToTable("AbpUserDelegations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("varchar(196)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("varchar(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("DisplayName"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("char(36)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("longtext"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ClientUri") + .HasColumnType("longtext"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("longtext"); + + b.Property("Permissions") + .HasColumnType("longtext"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedirectUris") + .HasColumnType("longtext"); + + b.Property("Requirements") + .HasColumnType("longtext"); + + b.Property("Settings") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Scopes") + .HasColumnType("longtext"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Descriptions") + .HasColumnType("longtext"); + + b.Property("DisplayName") + .HasColumnType("longtext"); + + b.Property("DisplayNames") + .HasColumnType("longtext"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("Resources") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("AuthorizationId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("datetime(6)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("longtext"); + + b.Property("Properties") + .HasColumnType("longtext"); + + b.Property("RedemptionDate") + .HasColumnType("datetime(6)"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("varchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs new file mode 100644 index 000000000..b630cd430 --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20240413021934_Upgrade-Abp-Framework-To-8-1-0.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo810 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Type", + table: "OpenIddictApplications", + newName: "ClientType"); + + migrationBuilder.AddColumn( + name: "ApplicationType", + table: "OpenIddictApplications", + type: "varchar(50)", + maxLength: 50, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "JsonWebKeySet", + table: "OpenIddictApplications", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "Settings", + table: "OpenIddictApplications", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ApplicationType", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "JsonWebKeySet", + table: "OpenIddictApplications"); + + migrationBuilder.DropColumn( + name: "Settings", + table: "OpenIddictApplications"); + + migrationBuilder.RenameColumn( + name: "ClientType", + table: "OpenIddictApplications", + newName: "Type"); + } + } +} diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs index 4f248aea9..ac0dc50eb 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs @@ -18,7 +18,7 @@ namespace LY.MicroService.AuthServer.DbMigrator.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) - .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -689,6 +689,10 @@ namespace LY.MicroService.AuthServer.DbMigrator.Migrations .ValueGeneratedOnAdd() .HasColumnType("char(36)"); + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + b.Property("ClientId") .HasMaxLength(100) .HasColumnType("varchar(100)"); @@ -696,6 +700,10 @@ namespace LY.MicroService.AuthServer.DbMigrator.Migrations b.Property("ClientSecret") .HasColumnType("longtext"); + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + b.Property("ClientUri") .HasColumnType("longtext"); @@ -743,6 +751,9 @@ namespace LY.MicroService.AuthServer.DbMigrator.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("JsonWebKeySet") + .HasColumnType("longtext"); + b.Property("LastModificationTime") .HasColumnType("datetime(6)") .HasColumnName("LastModificationTime"); @@ -769,9 +780,8 @@ namespace LY.MicroService.AuthServer.DbMigrator.Migrations b.Property("Requirements") .HasColumnType("longtext"); - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("Settings") + .HasColumnType("longtext"); b.HasKey("Id"); diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs new file mode 100644 index 000000000..d8d5ecbbe --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.Designer.cs @@ -0,0 +1,653 @@ +// +using System; +using LY.MicroService.BackendAdmin.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations +{ + [DbContext(typeof(BackendAdminMigrationsDbContext))] + [Migration("20240413021854_Upgrade-Abp-Framework-To-8-1-0")] + partial class UpgradeAbpFrameworkTo810 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Editions.Edition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("DisplayName"); + + b.ToTable("AbpEditions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("char(36)") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime(6)") + .HasColumnName("DeletionTime"); + + b.Property("DisableTime") + .HasColumnType("datetime(6)"); + + b.Property("EditionId") + .HasColumnType("char(36)"); + + b.Property("EnableTime") + .HasColumnType("datetime(6)"); + + b.Property("EntityVersion") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("tinyint(1)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("EditionId"); + + b.HasIndex("Name"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("char(36)"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .HasMaxLength(1048576) + .HasColumnType("longtext") + .HasColumnName("Content"); + + b.Property("CreationTime") + .HasColumnType("datetime(6)") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("char(36)") + .HasColumnName("CreatorId"); + + b.Property("Culture") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("Culture"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("DisplayName"); + + b.Property("LastModificationTime") + .HasColumnType("datetime(6)") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("char(36)") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("Name"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name") + .HasDatabaseName("IX_Tenant_Text_Template_Name"); + + b.ToTable("AbpTextTemplates", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.TextTemplating.TextTemplateDefinition", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("DefaultCultureName") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("DefaultCultureName"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(512) + .HasColumnType("varchar(512)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsInlineLocalized") + .HasColumnType("tinyint(1)"); + + b.Property("IsLayout") + .HasColumnType("tinyint(1)"); + + b.Property("IsStatic") + .HasColumnType("tinyint(1)"); + + b.Property("Layout") + .HasMaxLength(60) + .HasColumnType("varchar(60)") + .HasColumnName("Layout"); + + b.Property("LocalizationResourceName") + .HasMaxLength(64) + .HasColumnType("varchar(64)") + .HasColumnName("LocalizationResourceName"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)") + .HasColumnName("Name"); + + b.Property("RenderEngine") + .HasMaxLength(30) + .HasColumnType("varchar(30)") + .HasColumnName("RenderEngine"); + + b.HasKey("Id"); + + b.ToTable("AbpTextTemplateDefinitions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedProviders") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DefaultValue") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsAvailableToHost") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ValueType") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatures", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpFeatureGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("GroupName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MultiTenancySide") + .HasColumnType("tinyint unsigned"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ParentName") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("StateCheckers") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("GroupName"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("TenantId") + .HasColumnType("char(36)") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpPermissionGroups", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.SettingDefinitionRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("DefaultValue") + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("varchar(512)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ExtraProperties") + .HasColumnType("longtext") + .HasColumnName("ExtraProperties"); + + b.Property("IsEncrypted") + .HasColumnType("tinyint(1)"); + + b.Property("IsInherited") + .HasColumnType("tinyint(1)"); + + b.Property("IsVisibleToClients") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("Providers") + .HasMaxLength(1024) + .HasColumnType("varchar(1024)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("AbpSettingDefinitions", (string)null); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition") + .WithMany() + .HasForeignKey("EditionId"); + + b.Navigation("Edition"); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.TenantConnectionString", b => + { + b.HasOne("LINGYUN.Abp.Saas.Tenants.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs new file mode 100644 index 000000000..ae399c93e --- /dev/null +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20240413021854_Upgrade-Abp-Framework-To-8-1-0.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations +{ + /// + public partial class UpgradeAbpFrameworkTo810 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "NormalizedName", + table: "AbpTenants", + type: "varchar(64)", + maxLength: 64, + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants", + column: "NormalizedName"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_AbpTenants_NormalizedName", + table: "AbpTenants"); + + migrationBuilder.DropColumn( + name: "NormalizedName", + table: "AbpTenants"); + } + } +} diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs index 0e2903d77..31ebd2d4d 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs @@ -152,12 +152,18 @@ namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations .HasMaxLength(64) .HasColumnType("varchar(64)"); + b.Property("NormalizedName") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + b.HasKey("Id"); b.HasIndex("EditionId"); b.HasIndex("Name"); + b.HasIndex("NormalizedName"); + b.ToTable("AbpTenants", (string)null); }); 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 7ae3ef60f..bb992283f 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 @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.Account [RemoteService(Name = AccountRemoteServiceConsts.RemoteServiceName)] [Area("account")] [Route("api/account")] - public class AccountController : AbpController, IAccountAppService + public class AccountController : AbpControllerBase, IAccountAppService { protected IAccountAppService AccountAppService { get; } public AccountController( diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs index 50bf7a048..f3b95ab97 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyClaimController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Account; @@ -8,9 +9,9 @@ namespace LINGYUN.Abp.Account { [RemoteService(Name = AccountRemoteServiceConsts.RemoteServiceName)] [Area("account")] - [ControllerName("Profile")] + [ControllerName("Claim")] [Route("/api/account/my-claim")] - public class MyClaimController : AbpController, IMyClaimAppService + public class MyClaimController : AbpControllerBase, IMyClaimAppService { private readonly IMyClaimAppService _service; diff --git a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs index db9c9274a..8915f1456 100644 --- a/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs +++ b/aspnet-core/modules/account/LINGYUN.Abp.Account.HttpApi/LINGYUN/Abp/Account/MyProfileController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Account; @@ -10,7 +11,7 @@ namespace LINGYUN.Abp.Account [Area("account")] [ControllerName("Profile")] [Route("/api/account/my-profile")] - public class MyProfileController : AbpController, IMyProfileAppService + public class MyProfileController : AbpControllerBase, IMyProfileAppService { protected IMyProfileAppService MyProfileAppService { get; } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs index 9411cefe0..45c6bbe07 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/AuditLogController.cs @@ -1,4 +1,5 @@ -using LINGYUN.Abp.Auditing.Permissions; +using Asp.Versioning; +using LINGYUN.Abp.Auditing.Permissions; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; @@ -14,7 +15,7 @@ namespace LINGYUN.Abp.Auditing.AuditLogs [ControllerName("audit-log")] [Route("api/auditing/audit-log")] [Authorize(AuditingPermissionNames.AuditLog.Default)] - public class AuditLogController : AbpController, IAuditLogAppService + public class AuditLogController : AbpControllerBase, IAuditLogAppService { protected IAuditLogAppService AuditLogAppService { get; } diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/EntityChangesController.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/EntityChangesController.cs index fffea9658..0879d8892 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/EntityChangesController.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/AuditLogs/EntityChangesController.cs @@ -1,4 +1,5 @@ -using LINGYUN.Abp.Auditing.Permissions; +using Asp.Versioning; +using LINGYUN.Abp.Auditing.Permissions; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs index 52ead46b0..035455930 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/Logging/LogController.cs @@ -1,4 +1,5 @@ -using LINGYUN.Abp.Auditing.Permissions; +using Asp.Versioning; +using LINGYUN.Abp.Auditing.Permissions; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; @@ -13,7 +14,7 @@ namespace LINGYUN.Abp.Auditing.Logging [ControllerName("logging")] [Route("api/auditing/logging")] [Authorize(AuditingPermissionNames.SystemLog.Default)] - public class LogController : AbpController, ILogAppService + public class LogController : AbpControllerBase, ILogAppService { private readonly ILogAppService _service; diff --git a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs index 35178057c..c4500293e 100644 --- a/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs +++ b/aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.HttpApi/LINGYUN/Abp/Auditing/SecurityLogs/SecurityLogController.cs @@ -1,4 +1,5 @@ -using LINGYUN.Abp.Auditing.Permissions; +using Asp.Versioning; +using LINGYUN.Abp.Auditing.Permissions; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; @@ -14,7 +15,7 @@ namespace LINGYUN.Abp.Auditing.SecurityLogs [ControllerName("security-log")] [Route("api/auditing/security-log")] [Authorize(AuditingPermissionNames.SecurityLog.Default)] - public class SecurityLogController : AbpController, ISecurityLogAppService + public class SecurityLogController : AbpControllerBase, ISecurityLogAppService { protected ISecurityLogAppService SecurityLogAppService { get; } diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Server/LINGYUN/Abp/Elsa/AbpElsaServerModule.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Server/LINGYUN/Abp/Elsa/AbpElsaServerModule.cs index 7041b4aef..762afef26 100644 --- a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Server/LINGYUN/Abp/Elsa/AbpElsaServerModule.cs +++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Server/LINGYUN/Abp/Elsa/AbpElsaServerModule.cs @@ -1,7 +1,7 @@ -using Elsa.Server.Api; +using Asp.Versioning; +using Elsa.Server.Api; using Elsa.Server.Api.Mapping; using Elsa.Server.Api.Services; -using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AutoMapper; diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs index 6bcaa0c07..59d52f492 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityClaimTypeController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks; using Volo.Abp; @@ -12,7 +13,7 @@ namespace LINGYUN.Abp.Identity [Area("identity")] [ControllerName("ClaimType")] [Route("api/identity/claim-types")] - public class IdentityClaimTypeController : AbpController, IIdentityClaimTypeAppService + public class IdentityClaimTypeController : AbpControllerBase, IIdentityClaimTypeAppService { protected IIdentityClaimTypeAppService IdentityClaimTypeAppService { get; } public IdentityClaimTypeController(IIdentityClaimTypeAppService identityClaimTypeAppService) diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs index 9096f7563..6ffba7de7 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityRoleController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks; using Volo.Abp; @@ -12,7 +13,7 @@ namespace LINGYUN.Abp.Identity [Area("identity")] [ControllerName("Role")] [Route("api/identity/roles")] - public class IdentityRoleController : AbpController, IIdentityRoleAppService + public class IdentityRoleController : AbpControllerBase, IIdentityRoleAppService { protected IIdentityRoleAppService RoleAppService { get; } public IdentityRoleController( diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs index 5aa5b5953..39b308156 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/IdentityUserController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks; using Volo.Abp; @@ -12,7 +13,7 @@ namespace LINGYUN.Abp.Identity [Area("identity")] [ControllerName("User")] [Route("api/identity/users")] - public class IdentityUserController : AbpController, IIdentityUserAppService + public class IdentityUserController : AbpControllerBase, IIdentityUserAppService { protected IIdentityUserAppService UserAppService { get; } public IdentityUserController( diff --git a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs index 2b37172f3..6b9aa62f3 100644 --- a/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs +++ b/aspnet-core/modules/identity/LINGYUN.Abp.Identity.HttpApi/LINGYUN/Abp/Identity/OrganizationUnitController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks; using Volo.Abp; @@ -12,7 +13,7 @@ namespace LINGYUN.Abp.Identity [Area("identity")] [ControllerName("organization-units")] [Route("api/identity/organization-units")] - public class OrganizationUnitController : AbpController, IOrganizationUnitAppService + public class OrganizationUnitController : AbpControllerBase, IOrganizationUnitAppService { protected IOrganizationUnitAppService OrganizationUnitAppService { get; } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs index 4ed063cd4..9c899eec0 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiResources/ApiResourceController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiResources [RemoteService(Name = AbpIdentityServerConsts.RemoteServiceName)] [Area("identity-server")] [Route("api/identity-server/api-resources")] - public class ApiResourceController : AbpController, IApiResourceAppService + public class ApiResourceController : AbpControllerBase, IApiResourceAppService { protected IApiResourceAppService ApiResourceAppService { get; } public ApiResourceController( diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs index 2c1681002..ee5ab6156 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/ApiScopes/ApiScopeController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.IdentityServer.ApiScopes [RemoteService(Name = AbpIdentityServerConsts.RemoteServiceName)] [Area("identity-server")] [Route("api/identity-server/api-scopes")] - public class ApiScopeController : AbpController, IApiScopeAppService + public class ApiScopeController : AbpControllerBase, IApiScopeAppService { protected IApiScopeAppService ApiScopeAppService { get; } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs index fc4e1336e..14885f6a5 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Clients/ClientController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.IdentityServer.Clients [RemoteService(Name = AbpIdentityServerConsts.RemoteServiceName)] [Area("identity-server")] [Route("api/identity-server/clients")] - public class ClientController : AbpController, IClientAppService + public class ClientController : AbpControllerBase, IClientAppService { protected IClientAppService ClientAppService { get; } public ClientController(IClientAppService clientAppService) diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs index 3a7626966..31fdd30bb 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/Grants/PersistedGrantController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.IdentityServer.Grants [RemoteService(Name = AbpIdentityServerConsts.RemoteServiceName)] [Area("identity-server")] [Route("api/identity-server/persisted-grants")] - public class PersistedGrantController : AbpController, IPersistedGrantAppService + public class PersistedGrantController : AbpControllerBase, IPersistedGrantAppService { protected IPersistedGrantAppService PersistedGrantAppService { get; } diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs index 3840d0a7f..0e47bc5f1 100644 --- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs +++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.HttpApi/LINGYUN/Abp/IdentityServer/IdentityResources/IdentityResourceController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.IdentityServer.IdentityResources [RemoteService(Name = AbpIdentityServerConsts.RemoteServiceName)] [Area("identity-server")] [Route("api/identity-server/identity-resources")] - public class IdentityResourceController : AbpController, IIdentityResourceAppService + public class IdentityResourceController : AbpControllerBase, IIdentityResourceAppService { protected IIdentityResourceAppService IdentityResourceAppService { get; } public IdentityResourceController( diff --git a/aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/TextController.cs b/aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/TextController.cs index 2008abc32..23e5ba0a0 100644 --- a/aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/TextController.cs +++ b/aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.HttpApi/LINGYUN/Abp/LocalizationManagement/TextController.cs @@ -8,7 +8,7 @@ namespace LINGYUN.Abp.LocalizationManagement [RemoteService(Name = LocalizationRemoteServiceConsts.RemoteServiceName)] [Area("localization")] [Route("api/localization/texts")] - public class TextController : AbpController, ITextAppService + public class TextController : AbpControllerBase, ITextAppService { private readonly ITextAppService _service; diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs index f586bd6a1..01d311081 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssContainerController.cs @@ -8,7 +8,7 @@ namespace LINGYUN.Abp.OssManagement [RemoteService(Name = OssManagementRemoteServiceConsts.RemoteServiceName)] [Area("oss-management")] [Route("api/oss-management/containes")] - public class OssContainerController : AbpController, IOssContainerAppService + public class OssContainerController : AbpControllerBase, IOssContainerAppService { protected IOssContainerAppService OssContainerAppService { get; } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs index c20bbd609..f79a81bd9 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/OssObjectController.cs @@ -12,7 +12,7 @@ namespace LINGYUN.Abp.OssManagement [RemoteService(Name = OssManagementRemoteServiceConsts.RemoteServiceName)] [Area("oss-management")] [Route("api/oss-management/objects")] - public class OssObjectController : AbpController, IOssObjectAppService + public class OssObjectController : AbpControllerBase, IOssObjectAppService { protected IFileUploader FileUploader { get; } protected IOssObjectAppService OssObjectAppService { get; } diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs index 101710016..cfce7ba9d 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PrivateFilesController.cs @@ -14,7 +14,7 @@ namespace LINGYUN.Abp.OssManagement [RemoteService(Name = OssManagementRemoteServiceConsts.RemoteServiceName)] [Area("oss-management")] [Route("api/files/private")] - public class PrivateFilesController : AbpController, IPrivateFileAppService + public class PrivateFilesController : AbpControllerBase, IPrivateFileAppService { private readonly IPrivateFileAppService _service; diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs index c59dacdb8..c6066e909 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/PublicFilesController.cs @@ -11,7 +11,7 @@ namespace LINGYUN.Abp.OssManagement [RemoteService(Name = OssManagementRemoteServiceConsts.RemoteServiceName)] [Area("oss-management")] [Route("api/files/public")] - public class PublicFilesController : AbpController, IPublicFileAppService + public class PublicFilesController : AbpControllerBase, IPublicFileAppService { private readonly IPublicFileAppService _publicFileAppService; diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs index c09e85131..102e29849 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/ShareFilesController.cs @@ -11,7 +11,7 @@ namespace LINGYUN.Abp.OssManagement [Route("api/files/share")] [RemoteService(false)] [ApiExplorerSettings(IgnoreApi = true)] - public class ShareFilesController : AbpController, IShareFileAppService + public class ShareFilesController : AbpControllerBase, IShareFileAppService { private readonly IShareFileAppService _service; diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs index d0e0ec318..0f395f73d 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/StaticFilesController.cs @@ -12,7 +12,7 @@ namespace LINGYUN.Abp.OssManagement [RemoteService(Name = OssManagementRemoteServiceConsts.RemoteServiceName)] [Area("oss-management")] [Route("api/files/static")] - public class StaticFilesController : AbpController, IStaticFilesAppService + public class StaticFilesController : AbpControllerBase, IStaticFilesAppService { private readonly IOssObjectAppService _ossObjectAppService; private readonly IStaticFilesAppService _staticFilesAppServic; diff --git a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs index d17994308..d8076135f 100644 --- a/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs +++ b/aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.SettingManagement/LINGYUN/Abp/OssManagement/SettingManagement/OssManagementSettingController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.OssManagement.SettingManagement [RemoteService(Name = OssManagementRemoteServiceConsts.RemoteServiceName)] [Area("settingManagement")] [Route("api/setting-management/oss-management")] - public class OssManagementSettingController : AbpController, IOssManagementSettingAppService + public class OssManagementSettingController : AbpControllerBase, IOssManagementSettingAppService { protected IOssManagementSettingAppService WeChatSettingAppService { get; } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs index b6b506a3e..bbb53327b 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/DataController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Platform.Datas [RemoteService(Name = PlatformRemoteServiceConsts.RemoteServiceName)] [Area("platform")] [Route("api/platform/datas")] - public class DataController : AbpController, IDataAppService + public class DataController : AbpControllerBase, IDataAppService { protected IDataAppService DataAppService { get; } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs index 94429c7fa..2a8778de1 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Layouts/LayoutController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Platform.Layouts [RemoteService(Name = PlatformRemoteServiceConsts.RemoteServiceName)] [Area("platform")] [Route("api/platform/layouts")] - public class LayoutController : AbpController, ILayoutAppService + public class LayoutController : AbpControllerBase, ILayoutAppService { protected ILayoutAppService LayoutAppService { get; } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs index dd14a474c..5155635d2 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Menus/MenuController.cs @@ -11,7 +11,7 @@ namespace LINGYUN.Platform.Menus [RemoteService(Name = PlatformRemoteServiceConsts.RemoteServiceName)] [Area("platform")] [Route("api/platform/menus")] - public class MenuController : AbpController, IMenuAppService + public class MenuController : AbpControllerBase, IMenuAppService { protected IMenuAppService MenuAppService { get; } protected IUserRoleFinder UserRoleFinder { get; } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/PlatformControllerBase.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/PlatformControllerBase.cs index 035e709eb..5c783f101 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/PlatformControllerBase.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/PlatformControllerBase.cs @@ -4,7 +4,7 @@ using Volo.Abp.Settings; namespace LINGYUN.Platform { - public abstract class PlatformControllerBase : AbpController + public abstract class PlatformControllerBase : AbpControllerBase { protected ISettingProvider SettingProvider => LazyServiceProvider.LazyGetRequiredService(); diff --git a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs index fd9ff0e67..e1fb98fbe 100644 --- a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs +++ b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/ChatController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.MessageService.Chat { [RemoteService(Name = AbpMessageServiceConsts.RemoteServiceName)] [Route("api/im/chat")] - public class ChatController : AbpController, IChatAppService + public class ChatController : AbpControllerBase, IChatAppService { private readonly IChatAppService _chatAppService; diff --git a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs index 37876143c..6a837ad91 100644 --- a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs +++ b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Chat/MyFriendController.cs @@ -10,7 +10,7 @@ namespace LINGYUN.Abp.MessageService.Chat { [RemoteService(Name = AbpMessageServiceConsts.RemoteServiceName)] [Route("api/im/my-friends")] - public class MyFriendController : AbpController, IMyFriendAppService + public class MyFriendController : AbpControllerBase, IMyFriendAppService { protected IMyFriendAppService MyFriendAppService { get; } diff --git a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs index c1c91b824..587b2a62d 100644 --- a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs +++ b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/GroupController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.MessageService.Groups { [RemoteService(Name = AbpMessageServiceConsts.RemoteServiceName)] [Route("api/im/groups")] - public class GroupController : AbpController, IGroupAppService + public class GroupController : AbpControllerBase, IGroupAppService { private readonly IGroupAppService _service; diff --git a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs index c560c40ad..2cbacff90 100644 --- a/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs +++ b/aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.HttpApi/LINGYUN/Abp/MessageService/Groups/UserGroupController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.MessageService.Groups { [RemoteService(Name = AbpMessageServiceConsts.RemoteServiceName)] [Route("api/im/user-groups")] - public class UserGroupController : AbpController, IUserGroupAppService + public class UserGroupController : AbpControllerBase, IUserGroupAppService { private readonly IUserGroupAppService _service; diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MyNotificationController.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MyNotificationController.cs index a13671f16..b324b42d7 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MyNotificationController.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MyNotificationController.cs @@ -12,7 +12,7 @@ namespace LINGYUN.Abp.Notifications; [RemoteService(Name = AbpNotificationsRemoteServiceConsts.RemoteServiceName)] [Area(AbpNotificationsRemoteServiceConsts.ModuleName)] [Route("api/notifications/my-notifilers")] -public class MyNotificationController : AbpController, IMyNotificationAppService +public class MyNotificationController : AbpControllerBase, IMyNotificationAppService { protected IMyNotificationAppService MyNotificationAppService { get; } diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MySubscriptionController.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MySubscriptionController.cs index 1a1462f67..46b0d741a 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MySubscriptionController.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/MySubscriptionController.cs @@ -12,7 +12,7 @@ namespace LINGYUN.Abp.Notifications; [RemoteService(Name = AbpNotificationsRemoteServiceConsts.RemoteServiceName)] [Area(AbpNotificationsRemoteServiceConsts.ModuleName)] [Route("api/notifications/my-subscribes")] -public class MySubscriptionController : AbpController, IMySubscriptionAppService +public class MySubscriptionController : AbpControllerBase, IMySubscriptionAppService { private readonly IMySubscriptionAppService _subscriptionAppService; diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/NotificationController.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/NotificationController.cs index 658582f65..69e98fbae 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/NotificationController.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/NotificationController.cs @@ -12,7 +12,7 @@ namespace LINGYUN.Abp.Notifications; [RemoteService(Name = AbpNotificationsRemoteServiceConsts.RemoteServiceName)] [Area(AbpNotificationsRemoteServiceConsts.ModuleName)] [Route("api/notifications")] -public class NotificationController : AbpController, INotificationAppService +public class NotificationController : AbpControllerBase, INotificationAppService { protected INotificationAppService NotificationAppService { get; } diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs b/aspnet-core/modules/saas/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs index 1dbe33320..650b6f72b 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.MultiTenancy.Saas/LINGYUN/Abp/MultiTenancy/Saas/TenantStore.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Caching; +using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; using Volo.Abp.Threading; @@ -16,6 +17,7 @@ public class TenantStore : ITenantStore, ITransientDependency { protected ICurrentTenant CurrentTenant { get; } protected ITenantAppService TenantAppService { get; } + protected IDistributedCache Cache { get; } public TenantStore( @@ -38,6 +40,33 @@ public class TenantStore : ITenantStore, ITransientDependency return (await GetCacheItemAsync(id, null)).Value; } + public async virtual Task> GetListAsync(bool includeDetails = false) + { + var result = new List(); + var dto = await TenantAppService.GetListAsync(new TenantGetListInput()); + foreach (var item in dto.Items) + { + var tenantConfiguration = new TenantConfiguration(item.Id, item.Name, item.NormalizedName) + { + ConnectionStrings = new ConnectionStrings(), + }; + if (includeDetails) + { + var connectionStringsResult = await TenantAppService.GetConnectionStringAsync(item.Id); + + foreach (var connectionString in connectionStringsResult.Items) + { + tenantConfiguration.ConnectionStrings.Add( + connectionString.Name, + connectionString.Value); + } + } + result.Add(tenantConfiguration); + } + + return result; + } + [Obsolete("Use FindAsync method.")] public virtual TenantConfiguration Find(string name) { @@ -94,7 +123,7 @@ public class TenantStore : ITenantStore, ITransientDependency [CanBeNull] IReadOnlyList connectionStrings) { var tenantConfiguration = tenant != null - ? new TenantConfiguration(tenant.Id, tenant.Name) + ? new TenantConfiguration(tenant.Id, tenant.Name, tenant.NormalizedName) { IsActive = tenant.IsActive, } diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantConnectionStringCreateOrUpdate.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantConnectionStringCreateOrUpdate.cs index 7158a3b97..39db85f8a 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantConnectionStringCreateOrUpdate.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantConnectionStringCreateOrUpdate.cs @@ -1,8 +1,8 @@ -using System.ComponentModel.DataAnnotations; -using Volo.Abp.Validation; - -namespace LINGYUN.Abp.Saas.Tenants; - +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Validation; + +namespace LINGYUN.Abp.Saas.Tenants; + public class TenantConnectionStringCreateOrUpdate { [Required] @@ -12,4 +12,4 @@ public class TenantConnectionStringCreateOrUpdate [Required] [DynamicStringLength(typeof(TenantConnectionStringConsts), nameof(TenantConnectionStringConsts.MaxValueLength))] public string Value { get; set; } -} +} diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantDto.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantDto.cs index 436469ef5..0da8799ea 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantDto.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application.Contracts/LINGYUN/Abp/Saas/Tenants/Dto/TenantDto.cs @@ -8,6 +8,8 @@ public class TenantDto : ExtensibleAuditedEntityDto, IHasConcurrencyStamp { public string Name { get; set; } + public string NormalizedName { get; set; } + public Guid? EditionId { get; set; } public string EditionName { get; set; } @@ -17,5 +19,6 @@ public class TenantDto : ExtensibleAuditedEntityDto, IHasConcurrencyStamp public DateTime? EnableTime { get; set; } public DateTime? DisableTime { get; set; } + public string ConcurrencyStamp { get; set; } } \ No newline at end of file diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/Tenant.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/Tenant.cs index 34e5d3ceb..8ad2f1176 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/Tenant.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/Tenant.cs @@ -7,6 +7,7 @@ using System.Linq; using Volo.Abp; using Volo.Abp.Auditing; using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; namespace LINGYUN.Abp.Saas.Tenants; @@ -16,6 +17,8 @@ public class Tenant : FullAuditedAggregateRoot, IHasEntityVersion public virtual string Name { get; protected set; } + public virtual string NormalizedName { get; protected set; } + public virtual bool IsActive { get; set; } public virtual DateTime? EnableTime { get; protected set; } @@ -35,10 +38,11 @@ public class Tenant : FullAuditedAggregateRoot, IHasEntityVersion ConnectionStrings = new Collection(); } - protected internal Tenant(Guid id, [NotNull] string name) + protected internal Tenant(Guid id, [NotNull] string name, [CanBeNull] string normalizedName) : base(id) { SetName(name); + SetNormalizedName(normalizedName); ConnectionStrings = new Collection(); } @@ -103,4 +107,10 @@ public class Tenant : FullAuditedAggregateRoot, IHasEntityVersion { Name = Check.NotNullOrWhiteSpace(name, nameof(name), TenantConsts.MaxNameLength); } + + protected internal virtual void SetNormalizedName([CanBeNull] string normalizedName) + { + NormalizedName = normalizedName; + AddLocalEvent(new TenantChangedEvent(Id, NormalizedName)); + } } diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs index bfce496dd..810af0a9a 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantManager.cs @@ -2,43 +2,52 @@ using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Domain.Services; +using Volo.Abp.MultiTenancy; namespace LINGYUN.Abp.Saas.Tenants; public class TenantManager : DomainService, ITenantManager { protected ITenantRepository TenantRepository { get; } + protected ITenantNormalizer TenantNormalizer { get; } - public TenantManager(ITenantRepository tenantRepository) + public TenantManager( + ITenantRepository tenantRepository, + ITenantNormalizer tenantNormalizer) { TenantRepository = tenantRepository; - + TenantNormalizer = tenantNormalizer; } - public async virtual Task CreateAsync(string name) + public virtual async Task CreateAsync(string name) { Check.NotNull(name, nameof(name)); - await ValidateNameAsync(name); - return new Tenant(GuidGenerator.Create(), name); + var normalizedName = TenantNormalizer.NormalizeName(name); + await ValidateNameAsync(normalizedName); + return new Tenant(GuidGenerator.Create(), name, normalizedName); } - public async virtual Task ChangeNameAsync(Tenant tenant, string name) + public virtual async Task ChangeNameAsync(Tenant tenant, string name) { Check.NotNull(tenant, nameof(tenant)); Check.NotNull(name, nameof(name)); - await ValidateNameAsync(name, tenant.Id); + var normalizedName = TenantNormalizer.NormalizeName(name); + + await ValidateNameAsync(normalizedName, tenant.Id); tenant.SetName(name); + tenant.SetNormalizedName(normalizedName); + } - protected async virtual Task ValidateNameAsync(string name, Guid? expectedId = null) + protected virtual async Task ValidateNameAsync(string normalizeName, Guid? expectedId = null) { - var tenant = await TenantRepository.FindByNameAsync(name); + var tenant = await TenantRepository.FindByNameAsync(normalizeName); if (tenant != null && tenant.Id != expectedId) { throw new BusinessException(AbpSaasErrorCodes.DuplicateTenantName) - .WithData(nameof(Tenant.Name), name); + .WithData("Name", normalizeName); } } } diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs index cbeedbc60..fcc2ff27e 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/Tenants/TenantStore.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Threading.Tasks; using JetBrains.Annotations; using Volo.Abp; @@ -38,6 +39,12 @@ public class TenantStore : ITenantStore, ITransientDependency return (await GetCacheItemAsync(id, null)).Value; } + public async virtual Task> GetListAsync(bool includeDetails = false) + { + return ObjectMapper.Map, List>( + await TenantRepository.GetListAsync(includeDetails)); + } + [Obsolete("Use FindAsync method.")] public virtual TenantConfiguration Find(string name) { diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/AbpSaasDbContextModelCreatingExtensions.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/AbpSaasDbContextModelCreatingExtensions.cs index 4931d6891..b44e74440 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/AbpSaasDbContextModelCreatingExtensions.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.EntityFrameworkCore/LINGYUN/Abp/Saas/EntityFrameworkCore/AbpSaasDbContextModelCreatingExtensions.cs @@ -1,67 +1,69 @@ using LINGYUN.Abp.Saas.Editions; using LINGYUN.Abp.Saas.Tenants; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Volo.Abp; -using Volo.Abp.EntityFrameworkCore.Modeling; - -namespace LINGYUN.Abp.Saas.EntityFrameworkCore; - -public static class AbpSaasDbContextModelCreatingExtensions -{ - public static void ConfigureSaas( - this ModelBuilder builder) - { - Check.NotNull(builder, nameof(builder)); - - if (builder.IsTenantOnlyDatabase()) - { - return; - } - - builder.Entity(b => - { - b.ToTable(AbpSaasDbProperties.DbTablePrefix + "Editions", AbpSaasDbProperties.DbSchema); - - b.ConfigureByConvention(); - - b.Property(t => t.DisplayName) - .HasMaxLength(EditionConsts.MaxDisplayNameLength) - .IsRequired(); - - b.HasIndex(u => u.DisplayName); - - b.ApplyObjectExtensionMappings(); - }); - - builder.Entity(b => - { - b.ToTable(AbpSaasDbProperties.DbTablePrefix + "Tenants", AbpSaasDbProperties.DbSchema); - - b.ConfigureByConvention(); - - b.Property(t => t.Name).IsRequired().HasMaxLength(TenantConsts.MaxNameLength); - - b.HasMany(u => u.ConnectionStrings).WithOne().HasForeignKey(uc => uc.TenantId).IsRequired(); - - b.HasIndex(u => u.Name); - - b.ApplyObjectExtensionMappings(); - }); - - builder.Entity(b => - { - b.ToTable(AbpSaasDbProperties.DbTablePrefix + "TenantConnectionStrings", AbpSaasDbProperties.DbSchema); - - b.ConfigureByConvention(); - - b.HasKey(x => new { x.TenantId, x.Name }); - - b.Property(cs => cs.Name).IsRequired().HasMaxLength(TenantConnectionStringConsts.MaxNameLength); - b.Property(cs => cs.Value).IsRequired().HasMaxLength(TenantConnectionStringConsts.MaxValueLength); - - b.ApplyObjectExtensionMappings(); - }); - - builder.TryConfigureObjectExtensions(); - } -} +using Volo.Abp.EntityFrameworkCore.Modeling; + +namespace LINGYUN.Abp.Saas.EntityFrameworkCore; + +public static class AbpSaasDbContextModelCreatingExtensions +{ + public static void ConfigureSaas( + this ModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + + if (builder.IsTenantOnlyDatabase()) + { + return; + } + + builder.Entity(b => + { + b.ToTable(AbpSaasDbProperties.DbTablePrefix + "Editions", AbpSaasDbProperties.DbSchema); + + b.ConfigureByConvention(); + + b.Property(t => t.DisplayName) + .HasMaxLength(EditionConsts.MaxDisplayNameLength) + .IsRequired(); + + b.HasIndex(u => u.DisplayName); + + b.ApplyObjectExtensionMappings(); + }); + + builder.Entity(b => + { + b.ToTable(AbpSaasDbProperties.DbTablePrefix + "Tenants", AbpSaasDbProperties.DbSchema); + + b.ConfigureByConvention(); + + b.Property(t => t.Name).IsRequired().HasMaxLength(TenantConsts.MaxNameLength); + b.Property(t => t.NormalizedName).HasMaxLength(TenantConsts.MaxNameLength); + + b.HasMany(u => u.ConnectionStrings).WithOne().HasForeignKey(uc => uc.TenantId).IsRequired(); + + b.HasIndex(u => u.Name); + b.HasIndex(u => u.NormalizedName); + + b.ApplyObjectExtensionMappings(); + }); + + builder.Entity(b => + { + b.ToTable(AbpSaasDbProperties.DbTablePrefix + "TenantConnectionStrings", AbpSaasDbProperties.DbSchema); + + b.ConfigureByConvention(); + + b.HasKey(x => new { x.TenantId, x.Name }); + + b.Property(cs => cs.Name).IsRequired().HasMaxLength(TenantConnectionStringConsts.MaxNameLength); + b.Property(cs => cs.Value).IsRequired().HasMaxLength(TenantConnectionStringConsts.MaxValueLength); + + b.ApplyObjectExtensionMappings(); + }); + + builder.TryConfigureObjectExtensions(); + } +} diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs index ee98bb130..09064a146 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs @@ -9,7 +9,7 @@ namespace LINGYUN.Abp.SettingManagement; [RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)] [Area("SettingManagement")] [Route("api/setting-management/settings")] -public class SettingController : AbpController, ISettingAppService, ISettingTestAppService +public class SettingController : AbpControllerBase, ISettingAppService, ISettingTestAppService { private readonly ISettingAppService _settingAppService; private readonly ISettingTestAppService _settingTestAppService; diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs index c211307f9..dc39fc76d 100644 --- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs +++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/UserSettingController.cs @@ -8,7 +8,7 @@ namespace LINGYUN.Abp.SettingManagement; [RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)] [Area("SettingManagement")] [Route("api/setting-management/settings")] -public class UserSettingController : AbpController, IUserSettingAppService +public class UserSettingController : AbpControllerBase, IUserSettingAppService { private readonly IUserSettingAppService _service; diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs index 07c68b7b7..7cd9298de 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs @@ -288,8 +288,9 @@ public partial class MicroServiceApplicationsSingleModule //options.ApiVersionReader = new HeaderApiVersionReader("api-version"); //Supports header too //options.ApiVersionReader = new MediaTypeApiVersionReader(); //Supports accept header too - - options.ConfigureAbp(preActions.Configure()); + }, mvcOptions => + { + mvcOptions.ConfigureAbp(preActions.Configure()); }); //services.AddApiVersioning(config => diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/EmailConfirmConfirmation.cshtml.cs b/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/EmailConfirmConfirmation.cshtml.cs index 88cbaa684..1787b949e 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/EmailConfirmConfirmation.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/EmailConfirmConfirmation.cshtml.cs @@ -14,10 +14,10 @@ public class EmailConfirmConfirmationModel : AccountPageModel [BindProperty(SupportsGet = true)] public string ReturnUrlHash { get; set; } - public virtual Task OnGetAsync() + public async virtual Task OnGetAsync() { - ReturnUrl = GetRedirectUrl(ReturnUrl, ReturnUrlHash); + ReturnUrl = await GetRedirectUrlAsync(ReturnUrl, ReturnUrlHash); - return Task.FromResult(Page()); + return Page(); } } diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyAuthenticatorCode.cshtml.cs b/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyAuthenticatorCode.cshtml.cs index 786ff2b42..c4f00379c 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyAuthenticatorCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyAuthenticatorCode.cshtml.cs @@ -37,7 +37,7 @@ namespace LY.MicroService.Applications.Single.Pages.Account var result = await SignInManager.TwoFactorAuthenticatorSignInAsync(Input.VerifyCode, RememberMe, RememberBrowser); if (result.Succeeded) { - return RedirectSafely(ReturnUrl, ReturnUrlHash); + return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash); } if (result.IsLockedOut) { diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyCode.cshtml.cs b/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyCode.cshtml.cs index 539d906aa..b2663b53e 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.Applications.Single/Pages/Account/VerifyCode.cshtml.cs @@ -61,7 +61,7 @@ namespace LY.MicroService.Applications.Single.Pages.Account var result = await SignInManager.TwoFactorSignInAsync(Provider, Input.VerifyCode, RememberMe, Input.RememberBrowser); if (result.Succeeded) { - return RedirectSafely(ReturnUrl, ReturnUrlHash); + return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash); } if (result.IsLockedOut) { diff --git a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Controllers/HomeController.cs index 8aa4e7006..6e7428a3c 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.AuthServer.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public ActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirm.cshtml.cs b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirm.cshtml.cs index f52a188d9..8b9257684 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirm.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirm.cshtml.cs @@ -1,17 +1,17 @@ using LINGYUN.Abp.Account; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System; using System.ComponentModel.DataAnnotations; -using System.Threading.Tasks; -using Volo.Abp.Account.Localization; -using Volo.Abp.Account.Web.Pages.Account; +using System.Threading.Tasks; +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Web.Pages.Account; using Volo.Abp.Identity; using Volo.Abp.Validation; -namespace LY.MicroService.AuthServer.Pages.Account -{ - public class EmailConfirmModel : AccountPageModel - { +namespace LY.MicroService.AuthServer.Pages.Account +{ + public class EmailConfirmModel : AccountPageModel + { [Required] [HiddenInput] [BindProperty(SupportsGet = true)] @@ -28,22 +28,22 @@ namespace LY.MicroService.AuthServer.Pages.Account [HiddenInput] [BindProperty(SupportsGet = true)] - public string ReturnUrlHash { get; set; } - - public IMyProfileAppService MyProfileAppService { get; set; } - - public EmailConfirmModel() - { - LocalizationResourceType = typeof(AccountResource); - } - - public async virtual Task OnPostAsync() - { + public string ReturnUrlHash { get; set; } + + public IMyProfileAppService MyProfileAppService { get; set; } + + public EmailConfirmModel() + { + LocalizationResourceType = typeof(AccountResource); + } + + public async virtual Task OnPostAsync() + { try { ValidateModel(); - await MyProfileAppService.ConfirmEmailAsync( + await MyProfileAppService.ConfirmEmailAsync( new ConfirmEmailInput { ConfirmToken = ConfirmToken, @@ -62,13 +62,13 @@ namespace LY.MicroService.AuthServer.Pages.Account catch (AbpValidationException) { return Page(); - } - + } + return RedirectToPage("./ConfirmEmailConfirmation", new { returnUrl = ReturnUrl, returnUrlHash = ReturnUrlHash - }); - } - } -} + }); + } + } +} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs index 08f14f190..f6dfe0f8d 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs @@ -1,23 +1,23 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using System.Threading.Tasks; using Volo.Abp.Account.Web.Pages.Account; -namespace LY.MicroService.AuthServer.Pages.Account; - -[AllowAnonymous] -public class EmailConfirmConfirmationModel : AccountPageModel -{ - [BindProperty(SupportsGet = true)] - public string ReturnUrl { get; set; } - - [BindProperty(SupportsGet = true)] - public string ReturnUrlHash { get; set; } - - public virtual Task OnGetAsync() - { - ReturnUrl = GetRedirectUrl(ReturnUrl, ReturnUrlHash); - - return Task.FromResult(Page()); - } -} +namespace LY.MicroService.AuthServer.Pages.Account; + +[AllowAnonymous] +public class EmailConfirmConfirmationModel : AccountPageModel +{ + [BindProperty(SupportsGet = true)] + public string ReturnUrl { get; set; } + + [BindProperty(SupportsGet = true)] + public string ReturnUrlHash { get; set; } + + public async virtual Task OnGetAsync() + { + ReturnUrl = await GetRedirectUrlAsync(ReturnUrl, ReturnUrlHash); + + return Page(); + } +} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendCode.cshtml.cs b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendCode.cshtml.cs index 92b69bb3e..6c748df76 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendCode.cshtml.cs @@ -1,128 +1,128 @@ using LINGYUN.Abp.Account.Emailing; -using LINGYUN.Abp.Identity.Settings; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Rendering; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp; -using Volo.Abp.Account.Localization; -using Volo.Abp.Account.Web.Pages.Account; -using Volo.Abp.Sms; - -namespace LY.MicroService.AuthServer.Pages.Account -{ - public class SendCodeModel : AccountPageModel - { - [BindProperty] - public SendCodeInputModel Input { get; set; } - - [HiddenInput] - [BindProperty(SupportsGet = true)] - public string ReturnUrl { get; set; } - - [HiddenInput] - [BindProperty(SupportsGet = true)] - public string ReturnUrlHash { get; set; } - - [HiddenInput] - [BindProperty(SupportsGet = true)] - public bool RememberMe { get; set; } - - public IEnumerable Providers { get; set; } - - protected ISmsSender SmsSender { get; } - - protected IAccountEmailVerifySender AccountEmailVerifySender { get; } - - public SendCodeModel( - ISmsSender smsSender, - IAccountEmailVerifySender accountEmailVerifySender) - { - SmsSender = smsSender; - AccountEmailVerifySender = accountEmailVerifySender; - - LocalizationResourceType = typeof(AccountResource); - } - - public virtual async Task OnGetAsync() - { - Input = new SendCodeInputModel(); - - var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); - if (user == null) - { - // ˫Ϣ֤ʧ,һ㶼dzʱ˻ûϢ - Alerts.Warning(L["TwoFactorAuthenticationInvaidUser"]); - return Page(); - } - var userFactors = await UserManager.GetValidTwoFactorProvidersAsync(user); - Providers = userFactors.Select(purpose => new SelectListItem { Text = purpose, Value = purpose }).ToList(); - - return Page(); - } - - public virtual async Task OnPostAsync() - { - var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); - if (user == null) - { - Alerts.Warning(L["TwoFactorAuthenticationInvaidUser"]); - return Page(); - } - - if (Input.SelectedProvider == "Authenticator") - { - // ûͨʼ/ӽȨҳ - return RedirectToPage("VerifyAuthenticatorCode", new - { - returnUrl = ReturnUrl, - returnUrlHash = ReturnUrlHash, - rememberMe = RememberMe - }); - } - // ֤ - var code = await UserManager.GenerateTwoFactorTokenAsync(user, Input.SelectedProvider); - if (string.IsNullOrWhiteSpace(code)) - { - Alerts.Warning(L["InvaidGenerateTwoFactorToken"]); - return Page(); - } - - if (Input.SelectedProvider == "Email") - { - await AccountEmailVerifySender - .SendMailLoginVerifyCodeAsync( - code, - user.UserName, - user.Email); - } - else if (Input.SelectedProvider == "Phone") - { - var phoneNumber = await UserManager.GetPhoneNumberAsync(user); - var templateCode = await SettingProvider.GetOrNullAsync(IdentitySettingNames.User.SmsUserSignin); - Check.NotNullOrWhiteSpace(templateCode, nameof(IdentitySettingNames.User.SmsUserSignin)); - - // TODO: Ժչģ巢 - var smsMessage = new SmsMessage(phoneNumber, code); - smsMessage.Properties.Add("code", code); - smsMessage.Properties.Add("TemplateCode", templateCode); - - await SmsSender.SendAsync(smsMessage); - } - - return RedirectToPage("VerifyCode", new - { - provider = Input.SelectedProvider, - returnUrl = ReturnUrl, - returnUrlHash = ReturnUrlHash, - rememberMe = RememberMe - }); - } - } - - public class SendCodeInputModel - { - public string SelectedProvider { get; set; } - } -} +using LINGYUN.Abp.Identity.Settings; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Rendering; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Web.Pages.Account; +using Volo.Abp.Sms; + +namespace LY.MicroService.AuthServer.Pages.Account +{ + public class SendCodeModel : AccountPageModel + { + [BindProperty] + public SendCodeInputModel Input { get; set; } + + [HiddenInput] + [BindProperty(SupportsGet = true)] + public string ReturnUrl { get; set; } + + [HiddenInput] + [BindProperty(SupportsGet = true)] + public string ReturnUrlHash { get; set; } + + [HiddenInput] + [BindProperty(SupportsGet = true)] + public bool RememberMe { get; set; } + + public IEnumerable Providers { get; set; } + + protected ISmsSender SmsSender { get; } + + protected IAccountEmailVerifySender AccountEmailVerifySender { get; } + + public SendCodeModel( + ISmsSender smsSender, + IAccountEmailVerifySender accountEmailVerifySender) + { + SmsSender = smsSender; + AccountEmailVerifySender = accountEmailVerifySender; + + LocalizationResourceType = typeof(AccountResource); + } + + public virtual async Task OnGetAsync() + { + Input = new SendCodeInputModel(); + + var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); + if (user == null) + { + // ˫Ϣ֤ʧ,һ㶼dzʱ˻ûϢ + Alerts.Warning(L["TwoFactorAuthenticationInvaidUser"]); + return Page(); + } + var userFactors = await UserManager.GetValidTwoFactorProvidersAsync(user); + Providers = userFactors.Select(purpose => new SelectListItem { Text = purpose, Value = purpose }).ToList(); + + return Page(); + } + + public virtual async Task OnPostAsync() + { + var user = await SignInManager.GetTwoFactorAuthenticationUserAsync(); + if (user == null) + { + Alerts.Warning(L["TwoFactorAuthenticationInvaidUser"]); + return Page(); + } + + if (Input.SelectedProvider == "Authenticator") + { + // ûͨʼ/ӽȨҳ + return RedirectToPage("VerifyAuthenticatorCode", new + { + returnUrl = ReturnUrl, + returnUrlHash = ReturnUrlHash, + rememberMe = RememberMe + }); + } + // ֤ + var code = await UserManager.GenerateTwoFactorTokenAsync(user, Input.SelectedProvider); + if (string.IsNullOrWhiteSpace(code)) + { + Alerts.Warning(L["InvaidGenerateTwoFactorToken"]); + return Page(); + } + + if (Input.SelectedProvider == "Email") + { + await AccountEmailVerifySender + .SendMailLoginVerifyCodeAsync( + code, + user.UserName, + user.Email); + } + else if (Input.SelectedProvider == "Phone") + { + var phoneNumber = await UserManager.GetPhoneNumberAsync(user); + var templateCode = await SettingProvider.GetOrNullAsync(IdentitySettingNames.User.SmsUserSignin); + Check.NotNullOrWhiteSpace(templateCode, nameof(IdentitySettingNames.User.SmsUserSignin)); + + // TODO: Ժչģ巢 + var smsMessage = new SmsMessage(phoneNumber, code); + smsMessage.Properties.Add("code", code); + smsMessage.Properties.Add("TemplateCode", templateCode); + + await SmsSender.SendAsync(smsMessage); + } + + return RedirectToPage("VerifyCode", new + { + provider = Input.SelectedProvider, + returnUrl = ReturnUrl, + returnUrlHash = ReturnUrlHash, + rememberMe = RememberMe + }); + } + } + + public class SendCodeInputModel + { + public string SelectedProvider { get; set; } + } +} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendEmailConfirm.cshtml.cs b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendEmailConfirm.cshtml.cs index 029c414e7..54e2f699e 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendEmailConfirm.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/SendEmailConfirm.cshtml.cs @@ -1,15 +1,15 @@ using LINGYUN.Abp.Account; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System.ComponentModel.DataAnnotations; -using System.Threading.Tasks; -using Volo.Abp.Account.Localization; -using Volo.Abp.Account.Web.Pages.Account; +using System.Threading.Tasks; +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Web.Pages.Account; using Volo.Abp.Identity; using Volo.Abp.Validation; -namespace LY.MicroService.AuthServer.Pages.Account -{ - public class SendEmailConfirmModel : AccountPageModel +namespace LY.MicroService.AuthServer.Pages.Account +{ + public class SendEmailConfirmModel : AccountPageModel { [BindProperty(SupportsGet = true)] public string Email { get; set; } @@ -20,29 +20,29 @@ namespace LY.MicroService.AuthServer.Pages.Account [HiddenInput] [BindProperty(SupportsGet = true)] - public string ReturnUrlHash { get; set; } - - public IMyProfileAppService MyProfileAppService { get; set; } - - public SendEmailConfirmModel() - { - LocalizationResourceType = typeof(AccountResource); - } - + public string ReturnUrlHash { get; set; } + + public IMyProfileAppService MyProfileAppService { get; set; } + + public SendEmailConfirmModel() + { + LocalizationResourceType = typeof(AccountResource); + } + public virtual Task OnGetAsync() { Email = CurrentUser.Email; return Task.FromResult(Page()); - } - - public async virtual Task OnPostAsync() - { + } + + public async virtual Task OnPostAsync() + { try { ValidateModel(); - await MyProfileAppService.SendEmailConfirmLinkAsync( + await MyProfileAppService.SendEmailConfirmLinkAsync( new SendEmailConfirmCodeDto { Email = Email, @@ -64,12 +64,12 @@ namespace LY.MicroService.AuthServer.Pages.Account catch (AbpValidationException) { return Page(); - } - + } + return RedirectToPage("~/Account/Manage", new { returnUrl = ReturnUrl - }); - } - } -} + }); + } + } +} diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs index 6ab3fd65f..0742c5c0d 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs @@ -37,7 +37,7 @@ namespace LY.MicroService.AuthServer.Pages.Account var result = await SignInManager.TwoFactorAuthenticatorSignInAsync(Input.VerifyCode, RememberMe, RememberBrowser); if (result.Succeeded) { - return RedirectSafely(ReturnUrl, ReturnUrlHash); + return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash); } if (result.IsLockedOut) { diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyCode.cshtml.cs b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyCode.cshtml.cs index cd9424679..f920f3ebf 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.AuthServer/Pages/Account/VerifyCode.cshtml.cs @@ -61,7 +61,7 @@ namespace LY.MicroService.AuthServer.Pages.Account var result = await SignInManager.TwoFactorSignInAsync(Provider, Input.VerifyCode, RememberMe, Input.RememberBrowser); if (result.Succeeded) { - return RedirectSafely(ReturnUrl, ReturnUrlHash); + return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash); } if (result.IsLockedOut) { diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Controllers/HomeController.cs index 914e6f70c..c75e845f5 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.BackendAdmin.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public ActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Controllers/HomeController.cs index 2f8b087ff..b3f21a6c2 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.IdentityServer.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public ActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirm.cshtml.cs b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirm.cshtml.cs index 65334348d..a971f0df8 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirm.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirm.cshtml.cs @@ -1,17 +1,17 @@ using LINGYUN.Abp.Account; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System; using System.ComponentModel.DataAnnotations; -using System.Threading.Tasks; -using Volo.Abp.Account.Localization; -using Volo.Abp.Account.Web.Pages.Account; +using System.Threading.Tasks; +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Web.Pages.Account; using Volo.Abp.Identity; using Volo.Abp.Validation; -namespace LY.MicroService.IdentityServer.Pages.Account -{ - public class EmailConfirmModel : AccountPageModel - { +namespace LY.MicroService.IdentityServer.Pages.Account +{ + public class EmailConfirmModel : AccountPageModel + { [Required] [HiddenInput] [BindProperty(SupportsGet = true)] @@ -28,22 +28,22 @@ namespace LY.MicroService.IdentityServer.Pages.Account [HiddenInput] [BindProperty(SupportsGet = true)] - public string ReturnUrlHash { get; set; } - - public IMyProfileAppService MyProfileAppService { get; set; } - - public EmailConfirmModel() - { - LocalizationResourceType = typeof(AccountResource); - } - - public async virtual Task OnPostAsync() - { + public string ReturnUrlHash { get; set; } + + public IMyProfileAppService MyProfileAppService { get; set; } + + public EmailConfirmModel() + { + LocalizationResourceType = typeof(AccountResource); + } + + public async virtual Task OnPostAsync() + { try { ValidateModel(); - await MyProfileAppService.ConfirmEmailAsync( + await MyProfileAppService.ConfirmEmailAsync( new ConfirmEmailInput { ConfirmToken = ConfirmToken, @@ -62,13 +62,13 @@ namespace LY.MicroService.IdentityServer.Pages.Account catch (AbpValidationException) { return Page(); - } - + } + return RedirectToPage("EmailConfirmConfirmation", new { returnUrl = ReturnUrl, returnUrlHash = ReturnUrlHash - }); - } - } -} + }); + } + } +} diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs index 810f54fc5..57084736e 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/EmailConfirmConfirmation.cshtml.cs @@ -1,17 +1,17 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; using System; -using System.Threading.Tasks; +using System.Threading.Tasks; using Volo.Abp.Account.Web.Pages.Account; -namespace LY.MicroService.IdentityServer.Pages.Account; - -[AllowAnonymous] -public class EmailConfirmConfirmationModel : AccountPageModel -{ - [BindProperty(SupportsGet = true)] - public string ReturnUrl { get; set; } - - [BindProperty(SupportsGet = true)] - public string ReturnUrlHash { get; set; } -} +namespace LY.MicroService.IdentityServer.Pages.Account; + +[AllowAnonymous] +public class EmailConfirmConfirmationModel : AccountPageModel +{ + [BindProperty(SupportsGet = true)] + public string ReturnUrl { get; set; } + + [BindProperty(SupportsGet = true)] + public string ReturnUrlHash { get; set; } +} diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/SendEmailConfirm.cshtml.cs b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/SendEmailConfirm.cshtml.cs index 046edbeaa..8db8a73e9 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/SendEmailConfirm.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/SendEmailConfirm.cshtml.cs @@ -1,15 +1,15 @@ using LINGYUN.Abp.Account; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System.ComponentModel.DataAnnotations; -using System.Threading.Tasks; -using Volo.Abp.Account.Localization; -using Volo.Abp.Account.Web.Pages.Account; +using System.Threading.Tasks; +using Volo.Abp.Account.Localization; +using Volo.Abp.Account.Web.Pages.Account; using Volo.Abp.Identity; using Volo.Abp.Validation; -namespace LY.MicroService.IdentityServer.Pages.Account -{ - public class SendEmailConfirmModel : AccountPageModel +namespace LY.MicroService.IdentityServer.Pages.Account +{ + public class SendEmailConfirmModel : AccountPageModel { [BindProperty(SupportsGet = true)] public string Email { get; set; } @@ -20,29 +20,29 @@ namespace LY.MicroService.IdentityServer.Pages.Account [HiddenInput] [BindProperty(SupportsGet = true)] - public string ReturnUrlHash { get; set; } - - public IMyProfileAppService MyProfileAppService { get; set; } - - public SendEmailConfirmModel() - { - LocalizationResourceType = typeof(AccountResource); - } - + public string ReturnUrlHash { get; set; } + + public IMyProfileAppService MyProfileAppService { get; set; } + + public SendEmailConfirmModel() + { + LocalizationResourceType = typeof(AccountResource); + } + public virtual Task OnGetAsync() { Email = CurrentUser.Email; return Task.FromResult(Page()); - } - - public async virtual Task OnPostAsync() - { + } + + public async virtual Task OnPostAsync() + { try { ValidateModel(); - await MyProfileAppService.SendEmailConfirmLinkAsync( + await MyProfileAppService.SendEmailConfirmLinkAsync( new SendEmailConfirmCodeDto { Email = Email, @@ -64,12 +64,12 @@ namespace LY.MicroService.IdentityServer.Pages.Account catch (AbpValidationException) { return Page(); - } - + } + return RedirectToPage("~/Account/Manage", new { returnUrl = ReturnUrl - }); - } - } -} + }); + } + } +} diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/TwoFactorSupportedLoginModel.cs b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/TwoFactorSupportedLoginModel.cs index 26675a6bf..006ebd069 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/TwoFactorSupportedLoginModel.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/TwoFactorSupportedLoginModel.cs @@ -1,40 +1,40 @@ -using IdentityServer4.Services; -using IdentityServer4.Stores; -using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Options; +using IdentityServer4.Services; +using IdentityServer4.Stores; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Options; using System.Collections.Generic; -using System.Threading.Tasks; -using Volo.Abp.Account.Web; -using Volo.Abp.Account.Web.Pages.Account; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Identity; -using IdentityOptions = Microsoft.AspNetCore.Identity.IdentityOptions; - -namespace LY.MicroService.IdentityServer.Pages.Account -{ - /// - /// 重写登录模型,实现双因素登录 - /// - [Dependency(ReplaceServices = true)] - [ExposeServices(typeof(LoginModel), typeof(IdentityServerSupportedLoginModel))] - public class TwoFactorSupportedLoginModel : IdentityServerSupportedLoginModel - { - public TwoFactorSupportedLoginModel( - IAuthenticationSchemeProvider schemeProvider, - IOptions accountOptions, - IOptions identityOptions, - IIdentityServerInteractionService interaction, - IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache, - IClientStore clientStore, - IEventService identityServerEvents) - : base(schemeProvider, accountOptions, identityOptions, identityDynamicClaimsPrincipalContributorCache, interaction, clientStore, identityServerEvents) - { - - } - - protected async override Task> GetExternalProviders() - { +using System.Threading.Tasks; +using Volo.Abp.Account.Web; +using Volo.Abp.Account.Web.Pages.Account; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Identity; +using IdentityOptions = Microsoft.AspNetCore.Identity.IdentityOptions; + +namespace LY.MicroService.IdentityServer.Pages.Account +{ + /// + /// 重写登录模型,实现双因素登录 + /// + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(LoginModel), typeof(IdentityServerSupportedLoginModel))] + public class TwoFactorSupportedLoginModel : IdentityServerSupportedLoginModel + { + public TwoFactorSupportedLoginModel( + IAuthenticationSchemeProvider schemeProvider, + IOptions accountOptions, + IOptions identityOptions, + IIdentityServerInteractionService interaction, + IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache, + IClientStore clientStore, + IEventService identityServerEvents) + : base(schemeProvider, accountOptions, identityOptions, identityDynamicClaimsPrincipalContributorCache, interaction, clientStore, identityServerEvents) + { + + } + + protected async override Task> GetExternalProviders() + { var providers = await base.GetExternalProviders(); foreach (var provider in providers) @@ -51,18 +51,18 @@ namespace LY.MicroService.IdentityServer.Pages.Account } } - return providers; - } - - protected override Task TwoFactorLoginResultAsync() - { - // 重定向双因素认证页面 - return Task.FromResult(RedirectToPage("SendCode", new - { - returnUrl = ReturnUrl, - returnUrlHash = ReturnUrlHash, - rememberMe = LoginInput.RememberMe - })); - } - } -} + return providers; + } + + protected override Task TwoFactorLoginResultAsync() + { + // 重定向双因素认证页面 + return Task.FromResult(RedirectToPage("SendCode", new + { + returnUrl = ReturnUrl, + returnUrlHash = ReturnUrlHash, + rememberMe = LoginInput.RememberMe + })); + } + } +} diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs index de98773a0..659d676fd 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyAuthenticatorCode.cshtml.cs @@ -37,7 +37,7 @@ namespace LY.MicroService.IdentityServer.Pages.Account var result = await SignInManager.TwoFactorAuthenticatorSignInAsync(Input.VerifyCode, RememberMe, RememberBrowser); if (result.Succeeded) { - return RedirectSafely(ReturnUrl, ReturnUrlHash); + return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash); } if (result.IsLockedOut) { diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyCode.cshtml.cs b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyCode.cshtml.cs index f1f29d1e0..f11728bbf 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyCode.cshtml.cs +++ b/aspnet-core/services/LY.MicroService.IdentityServer/Pages/Account/VerifyCode.cshtml.cs @@ -61,7 +61,7 @@ namespace LY.MicroService.IdentityServer.Pages.Account var result = await SignInManager.TwoFactorSignInAsync(Provider, Input.VerifyCode, RememberMe, Input.RememberBrowser); if (result.Succeeded) { - return RedirectSafely(ReturnUrl, ReturnUrlHash); + return await RedirectSafelyAsync(ReturnUrl, ReturnUrlHash); } if (result.IsLockedOut) { diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Controllers/HomeController.cs index 0a7b1b0bf..b3464f2ba 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.LocalizationManagement.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public ActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Controllers/HomeController.cs index 384bf5bf7..9e4344047 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.PlatformManagement.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public ActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Controllers/HomeController.cs index e2514de8e..285695b82 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.RealtimeMessage.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public ActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Controllers/HomeController.cs index f98d6c1ca..dae5e1e16 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.TaskManagement.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public IActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Controllers/HomeController.cs index 97e94bcfe..3c5710321 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.WebhooksManagement.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public IActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj index 64353b7bd..5b76a49b9 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/LY.MicroService.WebhooksManagement.HttpApi.Host.csproj @@ -17,7 +17,7 @@ - + diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs index af1f1627e..d37cf44e5 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs @@ -22,6 +22,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.IdentityModel.Logging; using Microsoft.OpenApi.Models; +using OpenTelemetry.Metrics; using OpenTelemetry.Resources; using OpenTelemetry.Trace; using Quartz; @@ -212,24 +213,31 @@ public partial class WebhooksManagementHttpApiHostModule var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"]; if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled)) { - services.AddOpenTelemetryTracing(cfg => - { - cfg.AddSource(ApplicationName) - .SetResourceBuilder( - ResourceBuilder.CreateDefault().AddService(ApplicationName)) - .AddHttpClientInstrumentation() - .AddAspNetCoreInstrumentation() - .AddEntityFrameworkCoreInstrumentation() - .AddCapInstrumentation() - .AddZipkinExporter(zipKinOptions => - { - var endpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; - if (!endpoint.IsNullOrWhiteSpace()) - { - zipKinOptions.Endpoint = new Uri(configuration["OpenTelemetry:ZipKin:Endpoint"]); - } - }); - }); + services.AddOpenTelemetry() + .ConfigureResource(builder => + { + builder.AddService(ApplicationName); + }) + .WithTracing(builder => + { + builder.AddHttpClientInstrumentation(); + builder.AddAspNetCoreInstrumentation(); + builder.AddCapInstrumentation(); + builder.AddEntityFrameworkCoreInstrumentation(); + builder.AddZipkinExporter(zipKinOptions => + { + var endpoint = configuration["OpenTelemetry:ZipKin:Endpoint"]; + if (!endpoint.IsNullOrWhiteSpace()) + { + zipKinOptions.Endpoint = new Uri(configuration["OpenTelemetry:ZipKin:Endpoint"]); + } + }); + }) + .WithMetrics(builder => + { + builder.AddHttpClientInstrumentation(); + builder.AddAspNetCoreInstrumentation(); + }); } } diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Controllers/HomeController.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Controllers/HomeController.cs index e1e61391a..957cb7ff6 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Controllers/HomeController.cs +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Controllers/HomeController.cs @@ -3,7 +3,7 @@ using Volo.Abp.AspNetCore.Mvc; namespace LY.MicroService.WorkflowManagement.Controllers; -public class HomeController : AbpController +public class HomeController : AbpControllerBase { public IActionResult Index() { diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs index c4454c830..487c3bbd5 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.Configure.cs @@ -205,8 +205,9 @@ public partial class WorkflowManagementHttpApiHostModule //options.ApiVersionReader = new HeaderApiVersionReader("api-version"); //Supports header too //options.ApiVersionReader = new MediaTypeApiVersionReader(); //Supports accept header too - - options.ConfigureAbp(preActions.Configure()); + }, mvcOptions => + { + mvcOptions.ConfigureAbp(preActions.Configure()); }); } diff --git a/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj b/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj index cc65e7965..6c5211795 100644 --- a/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj +++ b/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj @@ -40,7 +40,7 @@ - + diff --git a/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.Configure.cs b/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.Configure.cs index 3583bb67d..0094a93ca 100644 --- a/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.Configure.cs +++ b/aspnet-core/templates/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.Configure.cs @@ -146,7 +146,7 @@ public partial class ProjectNameHttpApiHostModule ResourceBuilder.CreateDefault().AddService(ApplicationName)) .AddHttpClientInstrumentation() .AddAspNetCoreInstrumentation() - .AddEntityFrameworkCoreInstrumentation() + //.AddEntityFrameworkCoreInstrumentation() .AddCapInstrumentation() .AddZipkinExporter(zipKinOptions => { diff --git a/gateways/Directory.Build.props b/gateways/Directory.Build.props index 93d8350b8..868fcc510 100644 --- a/gateways/Directory.Build.props +++ b/gateways/Directory.Build.props @@ -1,9 +1,9 @@  - 8.0.4 - 8.0.4 + 8.1.0 + 8.1.0 1.12.0 - 8.0.0 + 8.1.0 1.5.10 2.13.0 1.6.9 diff --git a/gateways/common.props b/gateways/common.props index 6fd12b72f..40cbfcc66 100644 --- a/gateways/common.props +++ b/gateways/common.props @@ -1,7 +1,7 @@ latest - 8.0.4 + 8.1.0 colin $(NoWarn);CS1591;CS0436;CS8618;NU1803 https://github.com/colinin/abp-next-admin