mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-03 00:00:58 +08:00
31 lines
816 B
C#
31 lines
816 B
C#
using Volo.Abp.DependencyInjection;
|
|
using Volo.Abp.MultiTenancy;
|
|
using Volo.Abp.Settings;
|
|
|
|
namespace Yi.Framework.SettingManagement.Domain;
|
|
|
|
public class TenantSettingManagementProvider : SettingManagementProvider, ITransientDependency
|
|
{
|
|
public override string Name => TenantSettingValueProvider.ProviderName;
|
|
|
|
protected ICurrentTenant CurrentTenant { get; }
|
|
|
|
public TenantSettingManagementProvider(
|
|
ISettingManagementStore settingManagementStore,
|
|
ICurrentTenant currentTenant)
|
|
: base(settingManagementStore)
|
|
{
|
|
CurrentTenant = currentTenant;
|
|
}
|
|
|
|
protected override string NormalizeProviderKey(string providerKey)
|
|
{
|
|
if (providerKey != null)
|
|
{
|
|
return providerKey;
|
|
}
|
|
|
|
return CurrentTenant.Id?.ToString();
|
|
}
|
|
}
|