Skip to content

Commit

Permalink
Upgrade to ABP 7.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlcf88 committed Jul 24, 2023
1 parent 418b21b commit 6374d4f
Show file tree
Hide file tree
Showing 24 changed files with 100 additions and 57 deletions.
6 changes: 3 additions & 3 deletions Directory.Build.props
@@ -1,9 +1,9 @@
<Project>
<PropertyGroup>

<AbpVersion>7.2.1</AbpVersion>
<EasyAbpAbpTagHelperPlusModuleVersion>1.5.0</EasyAbpAbpTagHelperPlusModuleVersion>
<EasyAbpAbpWeChatModuleVersion>2.5.0</EasyAbpAbpWeChatModuleVersion>
<AbpVersion>7.3.0</AbpVersion>
<EasyAbpAbpTagHelperPlusModuleVersion>1.6.0</EasyAbpAbpTagHelperPlusModuleVersion>
<EasyAbpAbpWeChatModuleVersion>2.7.0</EasyAbpAbpWeChatModuleVersion>

</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion common.props
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>2.3.0</Version>
<Version>2.4.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
Expand Down
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" />
</ItemGroup>

Expand Down
@@ -1,4 +1,5 @@
using Volo.Abp.Modularity;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
using Volo.Abp.Localization;
using EasyAbp.WeChatManagement.Common.Localization;
using Volo.Abp.Localization.ExceptionHandling;
Expand All @@ -9,7 +10,8 @@
namespace EasyAbp.WeChatManagement.Common
{
[DependsOn(
typeof(AbpValidationModule)
typeof(AbpValidationModule),
typeof(AbpDddDomainSharedModule)
)]
public class WeChatManagementCommonDomainSharedModule : AbpModule
{
Expand Down
Expand Up @@ -7,7 +7,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Mongo2Go" Version="3.1.3" />
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" />
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" />
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" />
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" />
<ProjectReference Include="..\..\src\EasyAbp.WeChatManagement.Common.MongoDB\EasyAbp.WeChatManagement.Common.MongoDB.csproj" />
<ProjectReference Include="..\EasyAbp.WeChatManagement.Common.TestBase\EasyAbp.WeChatManagement.Common.TestBase.csproj" />
</ItemGroup>
Expand Down
Expand Up @@ -13,14 +13,9 @@ public class CommonMongoDbTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];

Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString();
});
}
}
Expand Down
@@ -1,17 +1,30 @@
using System;
using Mongo2Go;
using EphemeralMongo;

namespace EasyAbp.WeChatManagement.Common.MongoDB
{
public class MongoDbFixture : IDisposable
{
private static readonly MongoDbRunner MongoDbRunner;
public static readonly string ConnectionString;
public readonly static IMongoRunner MongoDbRunner;

static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions
{
UseSingleNodeReplicaSet = true
});
}

public static string GetRandomConnectionString()
{
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N"));
}

public static string GetConnectionString(string databaseName)
{
var stringArray = MongoDbRunner.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1];
return connectionString;
}

public void Dispose()
Expand Down
Expand Up @@ -32,8 +32,8 @@ public virtual async Task<IActionResult> HandleAsync(ExtensionGrantContext conte
var identityUserManager = context.HttpContext.RequestServices.GetRequiredService<IdentityUserManager>();
var signInManager = context.HttpContext.RequestServices.GetRequiredService<SignInManager<IdentityUser>>();
var scopeManager = context.HttpContext.RequestServices.GetRequiredService<IOpenIddictScopeManager>();
var openIddictClaimDestinationsManager = context.HttpContext.RequestServices
.GetRequiredService<AbpOpenIddictClaimDestinationsManager>();
var abpOpenIddictClaimsPrincipalManager = context.HttpContext.RequestServices
.GetRequiredService<AbpOpenIddictClaimsPrincipalManager>();
var identitySecurityLogManager =
context.HttpContext.RequestServices.GetRequiredService<IdentitySecurityLogManager>();

Expand Down Expand Up @@ -96,7 +96,7 @@ public virtual async Task<IActionResult> HandleAsync(ExtensionGrantContext conte
principal.SetResources(await GetResourcesAsync(context.Request.GetScopes(), scopeManager));
principal.SetClaim(WeChatMiniProgramConsts.AppIdClaim, appId); // 记录 appid

await openIddictClaimDestinationsManager.SetAsync(principal);
await abpOpenIddictClaimsPrincipalManager.HandleAsync(context.Request, principal);

await identitySecurityLogManager.SaveAsync(
new IdentitySecurityLogContext
Expand Down
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" />
</ItemGroup>

Expand Down
@@ -1,5 +1,6 @@
using EasyAbp.WeChatManagement.Common;
using EasyAbp.WeChatManagement.Common.Localization;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
using Volo.Abp.Localization;
using EasyAbp.WeChatManagement.MiniPrograms.Localization;
Expand All @@ -12,6 +13,7 @@ namespace EasyAbp.WeChatManagement.MiniPrograms
{
[DependsOn(
typeof(AbpValidationModule),
typeof(AbpDddDomainSharedModule),
typeof(WeChatManagementCommonDomainSharedModule)
)]
public class WeChatManagementMiniProgramsDomainSharedModule : AbpModule
Expand Down
Expand Up @@ -7,7 +7,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Mongo2Go" Version="3.1.3" />
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" />
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" />
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" />
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" />
<ProjectReference Include="..\..\src\EasyAbp.WeChatManagement.MiniPrograms.MongoDB\EasyAbp.WeChatManagement.MiniPrograms.MongoDB.csproj" />
<ProjectReference Include="..\EasyAbp.WeChatManagement.MiniPrograms.TestBase\EasyAbp.WeChatManagement.MiniPrograms.TestBase.csproj" />
</ItemGroup>
Expand Down
@@ -1,17 +1,30 @@
using System;
using Mongo2Go;
using EphemeralMongo;

namespace EasyAbp.WeChatManagement.MiniPrograms.MongoDB
{
public class MongoDbFixture : IDisposable
{
private static readonly MongoDbRunner MongoDbRunner;
public static readonly string ConnectionString;
public readonly static IMongoRunner MongoDbRunner;

static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
ConnectionString = MongoDbRunner.ConnectionString;
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions
{
UseSingleNodeReplicaSet = true
});
}

public static string GetRandomConnectionString()
{
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N"));
}

public static string GetConnectionString(string databaseName)
{
var stringArray = MongoDbRunner.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1];
return connectionString;
}

public void Dispose()
Expand Down
Expand Up @@ -12,13 +12,9 @@ public class WeChatManagementMiniProgramsMongoDbTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");

Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString();
});
}
}
Expand Down
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.Validation" Version="$(AbpVersion)" />
</ItemGroup>

Expand Down
@@ -1,4 +1,5 @@
using EasyAbp.WeChatManagement.Common;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
using Volo.Abp.Localization;
using EasyAbp.WeChatManagement.ThirdPartyPlatforms.Localization;
Expand All @@ -11,7 +12,8 @@ namespace EasyAbp.WeChatManagement.ThirdPartyPlatforms;

[DependsOn(
typeof(WeChatManagementCommonDomainSharedModule),
typeof(AbpValidationModule)
typeof(AbpValidationModule),
typeof(AbpDddDomainSharedModule)
)]
public class WeChatManagementThirdPartyPlatformsDomainSharedModule : AbpModule
{
Expand Down
Expand Up @@ -7,7 +7,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Mongo2Go" Version="3.1.3" />
<PackageReference Include="EphemeralMongo.Core" Version="1.1.0" />
<PackageReference Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Linux'))" />
<PackageReference Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('OSX'))" />
<PackageReference Include="EphemeralMongo6.runtime.win-x64" Version="1.1.0" Condition="$([MSBuild]::IsOSPlatform('Windows'))" />
<ProjectReference Include="..\..\src\EasyAbp.WeChatManagement.ThirdPartyPlatforms.MongoDB\EasyAbp.WeChatManagement.ThirdPartyPlatforms.MongoDB.csproj" />
<ProjectReference Include="..\EasyAbp.WeChatManagement.ThirdPartyPlatforms.TestBase\EasyAbp.WeChatManagement.ThirdPartyPlatforms.TestBase.csproj" />
</ItemGroup>
Expand Down
@@ -1,17 +1,30 @@
using System;
using Mongo2Go;
using EphemeralMongo;

namespace EasyAbp.WeChatManagement.ThirdPartyPlatforms.MongoDB;

public class MongoDbFixture : IDisposable
{
private static readonly MongoDbRunner MongoDbRunner;
public static readonly string ConnectionString;
public readonly static IMongoRunner MongoDbRunner;

static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions
{
UseSingleNodeReplicaSet = true
});
}

public static string GetRandomConnectionString()
{
return GetConnectionString("Db_" + Guid.NewGuid().ToString("N"));
}

public static string GetConnectionString(string databaseName)
{
var stringArray = MongoDbRunner.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1];
return connectionString;
}

public void Dispose()
Expand Down
Expand Up @@ -13,14 +13,9 @@ public class ThirdPartyPlatformsMongoDbTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];

Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString();
});
}
}
Expand Up @@ -41,7 +41,7 @@
<ProjectReference Include="..\WeChatManagementSample.HttpApi\WeChatManagementSample.HttpApi.csproj" />
<ProjectReference Include="..\WeChatManagementSample.EntityFrameworkCore\WeChatManagementSample.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\MiniPrograms\src\EasyAbp.WeChatManagement.MiniPrograms.Web\EasyAbp.WeChatManagement.MiniPrograms.Web.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="2.2.*-*" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="2.3.*-*" />
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(AbpVersion)" />
Expand Down
Expand Up @@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.2.0-rc.1"
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.3.0"
}
}
Expand Up @@ -2,10 +2,10 @@
# yarn lockfile v1


"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.2.0-rc.1":
version "2.2.0"
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.2.0.tgz#dc76d1d869e16876288c90f5fec31df3a99bb628"
integrity sha512-mAAptSqGWQu+GefI1XHlP7KF8PncWreuC9u09rUdZ1cixFURy7PaG/n/QMNj9YJSVIb+vPsnFjYDeTtNbrxU/g==
"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.3.0":
version "2.3.0"
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.3.0.tgz#7e05ce2a897de0f0bb016e0ae4a9adfd0260e7be"
integrity sha512-d7p8Pv6g8aocjBIBKHMF8fFDeVzWqkriz6uKy3oowCKSe5tqzq3j35Um7kEu7DapPf9MyBPq8+z9VsGbxJCjww==
dependencies:
"@abp/aspnetcore.mvc.ui.theme.shared" "~7.2.1"

Expand Down
Expand Up @@ -42,7 +42,7 @@
<ProjectReference Include="..\WeChatManagementSample.HttpApi\WeChatManagementSample.HttpApi.csproj" />
<ProjectReference Include="..\WeChatManagementSample.EntityFrameworkCore\WeChatManagementSample.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\MiniPrograms\src\EasyAbp.WeChatManagement.MiniPrograms.Web\EasyAbp.WeChatManagement.MiniPrograms.Web.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="2.2.*-*" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="2.3.*-*" />
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="$(AbpVersion)" />
Expand Down
Expand Up @@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.2.0-rc.1"
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.3.0"
}
}
Expand Up @@ -2,10 +2,10 @@
# yarn lockfile v1


"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.2.0-rc.1":
version "2.2.0"
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.2.0.tgz#dc76d1d869e16876288c90f5fec31df3a99bb628"
integrity sha512-mAAptSqGWQu+GefI1XHlP7KF8PncWreuC9u09rUdZ1cixFURy7PaG/n/QMNj9YJSVIb+vPsnFjYDeTtNbrxU/g==
"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.3.0":
version "2.3.0"
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.3.0.tgz#7e05ce2a897de0f0bb016e0ae4a9adfd0260e7be"
integrity sha512-d7p8Pv6g8aocjBIBKHMF8fFDeVzWqkriz6uKy3oowCKSe5tqzq3j35Um7kEu7DapPf9MyBPq8+z9VsGbxJCjww==
dependencies:
"@abp/aspnetcore.mvc.ui.theme.shared" "~7.2.1"

Expand Down

0 comments on commit 6374d4f

Please sign in to comment.