Browse Source

Merge pull request #19090 from abpframework/rel-8.1-PRs

Cherry pick commits from `prerel-8.1` to `rel-8.1`.
pull/19091/head
liangshiwei 3 years ago
committed by GitHub
parent
commit
992b383f24
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 10
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcRemoteTenantStore.cs
  2. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Microservice/MicroserviceTemplateBase.cs
  3. 4
      modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs

10
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcRemoteTenantStore.cs

@ -40,9 +40,9 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = await Cache.GetAsync(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
await TenantAppService.FindTenantByNameAsync(normalizedName);
var tenant = await TenantAppService.FindTenantByNameAsync(normalizedName);
tenantConfiguration = await Cache.GetAsync(cacheKey);
}
@ -65,7 +65,7 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = await Cache.GetAsync(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
await TenantAppService.FindTenantByIdAsync(id);
tenantConfiguration = await Cache.GetAsync(cacheKey);
@ -90,7 +90,7 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = Cache.Get(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
AsyncHelper.RunSync(async () => await TenantAppService.FindTenantByNameAsync(normalizedName));
tenantConfiguration = Cache.Get(cacheKey);
@ -115,7 +115,7 @@ public class MvcRemoteTenantStore : ITenantStore, ITransientDependency
}
var tenantConfiguration = Cache.Get(cacheKey);
if (tenantConfiguration == null)
if (tenantConfiguration?.Value == null)
{
AsyncHelper.RunSync(async () => await TenantAppService.FindTenantByIdAsync(id));
tenantConfiguration = Cache.Get(cacheKey);

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/Microservice/MicroserviceTemplateBase.cs

@ -131,6 +131,14 @@ public abstract class MicroserviceTemplateBase : TemplateInfo
private static void DeleteUnrelatedProjects(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps)
{
if (!context.BuildArgs.PublicWebSite)
{
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.PublicWeb", null, "apps/public-web/src/MyCompanyName.MyProjectName.PublicWeb"));
steps.Add(new RemoveFolderStep("/apps/public-web"));
steps.Add(new RemoveProjectFromTyeStep("public-web"));
steps.Add(new RemoveProjectFromPrometheusStep("public-web"));
}
//TODO: move common tasks to methods
switch (context.BuildArgs.UiFramework)
{

4
modules/tenant-management/src/Volo.Abp.TenantManagement.Domain/Volo/Abp/TenantManagement/TenantStore.cs

@ -54,7 +54,7 @@ public class TenantStore : ITenantStore, ITransientDependency
var cacheKey = CalculateCacheKey(id, normalizedName);
var cacheItem = await Cache.GetAsync(cacheKey, considerUow: true);
if (cacheItem != null)
if (cacheItem?.Value != null)
{
return cacheItem;
}
@ -94,7 +94,7 @@ public class TenantStore : ITenantStore, ITransientDependency
var cacheKey = CalculateCacheKey(id, normalizedName);
var cacheItem = Cache.Get(cacheKey, considerUow: true);
if (cacheItem != null)
if (cacheItem?.Value != null)
{
return cacheItem;
}

Loading…
Cancel
Save