feat: 构建
This commit is contained in:
@@ -31,6 +31,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
end.sh = end.sh
|
||||
start.sh = start.sh
|
||||
usings.props = usings.props
|
||||
version.props = version.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SqlSugarCore.Abstractions", "framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj", "{FD6D6860-3753-4747-8A26-977E4A3001F9}"
|
||||
@@ -127,6 +128,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Client.Console", "cl
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Abp.Client.WebApi", "client\Yi.Abp.Client.WebApi\Yi.Abp.Client.WebApi.csproj", "{00E49781-C6A0-491C-86A1-46F685C90915}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "setting-management", "setting-management", "{8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.SettingManagement.Domain", "module\setting-management\Yi.Framework.SettingManagement.Domain\Yi.Framework.SettingManagement.Domain.csproj", "{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.SettingManagement.SqlSugarCore", "module\setting-management\Yi.Framework.SettingManagement.SqlSugarCore\Yi.Framework.SettingManagement.SqlSugarCore.csproj", "{495C4643-39D4-46E7-BDC8-237589627BE4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -321,6 +328,14 @@ Global
|
||||
{00E49781-C6A0-491C-86A1-46F685C90915}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00E49781-C6A0-491C-86A1-46F685C90915}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{00E49781-C6A0-491C-86A1-46F685C90915}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{495C4643-39D4-46E7-BDC8-237589627BE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{495C4643-39D4-46E7-BDC8-237589627BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{495C4643-39D4-46E7-BDC8-237589627BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{495C4643-39D4-46E7-BDC8-237589627BE4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -378,6 +393,9 @@ Global
|
||||
{6B554DCC-3A81-4624-9141-4E39365ADA35} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
|
||||
{2D23B44A-DFA3-4C36-8516-4F5AE442403C} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
|
||||
{00E49781-C6A0-491C-86A1-46F685C90915} = {8B27846A-043D-4F2F-8140-5CEC9D1863B5}
|
||||
{8C68059E-F3B1-4D28-A1C9-A5830F53E5D3} = {2317227D-7796-4E7B-BEDB-7CD1CAE7B853}
|
||||
{6FEE0EB3-EAD2-47F8-B6FC-3D0FD3CCABFF} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
|
||||
{495C4643-39D4-46E7-BDC8-237589627BE4} = {8C68059E-F3B1-4D28-A1C9-A5830F53E5D3}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {23D6FBC9-C970-4641-BC1E-2AEA59F51C18}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
@@ -8,7 +8,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Yi.Abp.HttpApi.Client\Yi.Abp.HttpApi.Client.csproj" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<Import Project="..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageReference Include="Volo.Abp.Http.Client" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Http.Client" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<Project>
|
||||
<Import Project="usings.props" />
|
||||
<Import Project="version.props" />
|
||||
|
||||
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
@@ -27,5 +31,9 @@
|
||||
<ItemGroup>
|
||||
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -8,8 +8,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Json" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Swashbuckle" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Json" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Swashbuckle" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FreeRedis" Version="1.2.14" />
|
||||
<PackageReference Include="FreeRedis.DistributedCache" Version="1.2.5" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Volo.Abp.Core" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Core" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
<Import Project="..\..\common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||
<PackageReference Include="MiniExcel" Version="1.31.3" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Application" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Mapster" Version="7.4.0" />
|
||||
<PackageReference Include="Volo.Abp.ObjectMapping" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.ObjectMapping" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.1.4.146" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.5" />
|
||||
<PackageReference Include="SqlSugarCoreNoDrive" Version="$(SqlSugarVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySqlBackup.NET.MySqlConnector" Version="2.3.8" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.146" />
|
||||
<PackageReference Include="SqlSugarCore" Version="$(SqlSugarVersion)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
@@ -7,12 +7,12 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Auditing" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Auditing" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.SqlSugarCore\Yi.Framework.SqlSugarCore.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.AuditLogging.Domain.Shared\Yi.Framework.AuditLogging.Domain.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Yi.Framework.Bbs.Domain.Managers.BankValue
|
||||
{
|
||||
public class BiyingBankValueProvider : IBankValueProvider, ITransientDependency
|
||||
{
|
||||
private const string Url = "https://api.biyingapi.com/hsrl/ssjy/600519/504d30854dbd93312d";
|
||||
private const string Url = "https://api.biyingapi.com/hsrl/ssjy/600519/006566735102404165";
|
||||
public async Task<decimal> GetValueAsync()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||
<PackageReference Include="Lazy.Captcha.Core" Version="2.0.7" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.7" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundWorkers.Quartz" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundWorkers.Quartz" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.SignalR" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.SignalR" Version="$(AbpVersion)" />
|
||||
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="$(AbpVersion)" />
|
||||
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using Volo.Abp.Data;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public static class AbpSettingManagementDbProperties
|
||||
{
|
||||
public static string DbTablePrefix { get; set; } = AbpCommonDbProperties.DbTablePrefix;
|
||||
|
||||
public static string DbSchema { get; set; } = AbpCommonDbProperties.DbSchema;
|
||||
|
||||
public const string ConnectionStringName = "AbpSettingManagement";
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class ConfigurationSettingManagementProvider : ISettingManagementProvider, ITransientDependency
|
||||
{
|
||||
public string Name => ConfigurationSettingValueProvider.ProviderName;
|
||||
|
||||
protected IConfiguration Configuration { get; }
|
||||
|
||||
public ConfigurationSettingManagementProvider(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public virtual Task<string> GetOrNullAsync(SettingDefinition setting, string providerKey)
|
||||
{
|
||||
return Task.FromResult(Configuration[ConfigurationSettingValueProvider.ConfigurationNamePrefix + setting.Name]);
|
||||
}
|
||||
|
||||
public virtual Task SetAsync(SettingDefinition setting, string value, string providerKey)
|
||||
{
|
||||
throw new AbpException($"Can not set a setting value to the application configuration.");
|
||||
}
|
||||
|
||||
public virtual Task ClearAsync(SettingDefinition setting, string providerKey)
|
||||
{
|
||||
throw new AbpException($"Can not set a setting value to the application configuration.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public static class ConfigurationValueSettingManagerExtensions
|
||||
{
|
||||
public static Task<string> GetOrNullConfigurationAsync(this ISettingManager settingManager, [NotNull] string name, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetOrNullAsync(name, ConfigurationSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task<List<SettingValue>> GetAllConfigurationAsync(this ISettingManager settingManager, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetAllAsync(ConfigurationSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class DefaultValueSettingManagementProvider : ISettingManagementProvider, ISingletonDependency
|
||||
{
|
||||
public string Name => DefaultValueSettingValueProvider.ProviderName;
|
||||
|
||||
public virtual Task<string> GetOrNullAsync(SettingDefinition setting, string providerKey)
|
||||
{
|
||||
return Task.FromResult(setting.DefaultValue);
|
||||
}
|
||||
|
||||
public virtual Task SetAsync(SettingDefinition setting, string value, string providerKey)
|
||||
{
|
||||
throw new AbpException($"Can not set default value of a setting. It is only possible while defining the setting in a {typeof(ISettingDefinitionProvider)} implementation.");
|
||||
}
|
||||
|
||||
public virtual Task ClearAsync(SettingDefinition setting, string providerKey)
|
||||
{
|
||||
throw new AbpException($"Can not clear default value of a setting. It is only possible while defining the setting in a {typeof(ISettingDefinitionProvider)} implementation.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public static class DefaultValueSettingManagerExtensions
|
||||
{
|
||||
public static Task<string> GetOrNullDefaultAsync(this ISettingManager settingManager, [NotNull] string name, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetOrNullAsync(name, DefaultValueSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task<List<SettingValue>> GetAllDefaultAsync(this ISettingManager settingManager, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetAllAsync(DefaultValueSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class GlobalSettingManagementProvider : SettingManagementProvider, ITransientDependency
|
||||
{
|
||||
public override string Name => GlobalSettingValueProvider.ProviderName;
|
||||
|
||||
public GlobalSettingManagementProvider(ISettingManagementStore settingManagementStore)
|
||||
: base(settingManagementStore)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override string NormalizeProviderKey(string providerKey)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public static class GlobalSettingManagerExtensions
|
||||
{
|
||||
public static Task<string> GetOrNullGlobalAsync(this ISettingManager settingManager, [NotNull] string name, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetOrNullAsync(name, GlobalSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task<List<SettingValue>> GetAllGlobalAsync(this ISettingManager settingManager, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetAllAsync(GlobalSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task SetGlobalAsync(this ISettingManager settingManager, [NotNull] string name, [CanBeNull] string value)
|
||||
{
|
||||
return settingManager.SetAsync(name, value, GlobalSettingValueProvider.ProviderName, null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public interface ISettingManagementProvider
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
Task<string> GetOrNullAsync([NotNull] SettingDefinition setting, [CanBeNull] string providerKey);
|
||||
|
||||
Task SetAsync([NotNull] SettingDefinition setting, [NotNull] string value, [CanBeNull] string providerKey);
|
||||
|
||||
Task ClearAsync([NotNull] SettingDefinition setting, [CanBeNull] string providerKey);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public interface ISettingManagementStore
|
||||
{
|
||||
Task<string> GetOrNullAsync(string name, string providerName, string providerKey);
|
||||
|
||||
Task<List<SettingValue>> GetListAsync(string providerName, string providerKey);
|
||||
|
||||
Task<List<SettingValue>> GetListAsync(string[] names, string providerName, string providerKey);
|
||||
|
||||
Task SetAsync(string name, string value, string providerName, string providerKey);
|
||||
|
||||
Task DeleteAsync(string name, string providerName, string providerKey);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public interface ISettingManager
|
||||
{
|
||||
Task<string> GetOrNullAsync([NotNull] string name, [NotNull] string providerName, [CanBeNull] string providerKey, bool fallback = true);
|
||||
|
||||
Task<List<SettingValue>> GetAllAsync([NotNull] string providerName, [CanBeNull] string providerKey, bool fallback = true);
|
||||
|
||||
Task SetAsync([NotNull] string name, [CanBeNull] string value, [NotNull] string providerName, [CanBeNull] string providerKey, bool forceToSet = false);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public interface ISettingRepository : IBasicRepository<SettingEntity, Guid>
|
||||
{
|
||||
Task<SettingEntity> FindAsync(
|
||||
string name,
|
||||
string providerName,
|
||||
string providerKey,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<List<SettingEntity>> GetListAsync(
|
||||
string providerName,
|
||||
string providerKey,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<List<SettingEntity>> GetListAsync(
|
||||
string[] names,
|
||||
string providerName,
|
||||
string providerKey,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
using Volo.Abp.Text.Formatting;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
[Serializable]
|
||||
[IgnoreMultiTenancy]
|
||||
public class SettingCacheItem
|
||||
{
|
||||
private const string CacheKeyFormat = "pn:{0},pk:{1},n:{2}";
|
||||
|
||||
public string Value { get; set; }
|
||||
|
||||
public SettingCacheItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SettingCacheItem(string value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public static string CalculateCacheKey(string name, string providerName, string providerKey)
|
||||
{
|
||||
return string.Format(CacheKeyFormat, providerName, providerKey, name);
|
||||
}
|
||||
|
||||
public static string GetSettingNameFormCacheKeyOrNull(string cacheKey)
|
||||
{
|
||||
var result = FormattedStringValueExtracter.Extract(cacheKey, CacheKeyFormat, true);
|
||||
return result.IsMatch ? result.Matches.Last().Value : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Caching;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Domain.Entities.Events;
|
||||
using Volo.Abp.EventBus;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class SettingCacheItemInvalidator : ILocalEventHandler<EntityChangedEventData<SettingEntity>>, ITransientDependency
|
||||
{
|
||||
protected IDistributedCache<SettingCacheItem> Cache { get; }
|
||||
|
||||
public SettingCacheItemInvalidator(IDistributedCache<SettingCacheItem> cache)
|
||||
{
|
||||
Cache = cache;
|
||||
}
|
||||
|
||||
public virtual async Task HandleEventAsync(EntityChangedEventData<SettingEntity> eventData)
|
||||
{
|
||||
var cacheKey = CalculateCacheKey(
|
||||
eventData.Entity.Name,
|
||||
eventData.Entity.ProviderName,
|
||||
eventData.Entity.ProviderKey
|
||||
);
|
||||
|
||||
await Cache.RemoveAsync(cacheKey, considerUow: true);
|
||||
}
|
||||
|
||||
protected virtual string CalculateCacheKey(string name, string providerName, string providerKey)
|
||||
{
|
||||
return SettingCacheItem.CalculateCacheKey(name, providerName, providerKey);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Domain.Entities;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class SettingEntity : Entity<Guid>, IAggregateRoot<Guid>
|
||||
{
|
||||
[NotNull]
|
||||
public virtual string Name { get; protected set; }
|
||||
|
||||
[NotNull]
|
||||
public virtual string Value { get; internal set; }
|
||||
|
||||
[CanBeNull]
|
||||
public virtual string ProviderName { get; protected set; }
|
||||
|
||||
[CanBeNull]
|
||||
public virtual string ProviderKey { get; protected set; }
|
||||
|
||||
public SettingEntity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SettingEntity(
|
||||
Guid id,
|
||||
[NotNull] string name,
|
||||
[NotNull] string value,
|
||||
[CanBeNull] string providerName = null,
|
||||
[CanBeNull] string providerKey = null)
|
||||
{
|
||||
Check.NotNull(name, nameof(name));
|
||||
Check.NotNull(value, nameof(value));
|
||||
|
||||
Id = id;
|
||||
Name = name;
|
||||
Value = value;
|
||||
ProviderName = providerName;
|
||||
ProviderKey = providerKey;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{base.ToString()}, Name = {Name}, Value = {Value}, ProviderName = {ProviderName}, ProviderKey = {ProviderKey}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Volo.Abp.Collections;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class SettingManagementOptions
|
||||
{
|
||||
public ITypeList<ISettingManagementProvider> Providers { get; }
|
||||
|
||||
public SettingManagementOptions()
|
||||
{
|
||||
Providers = new TypeList<ISettingManagementProvider>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public abstract class SettingManagementProvider : ISettingManagementProvider
|
||||
{
|
||||
public abstract string Name { get; }
|
||||
|
||||
//TODO: Rename to Store
|
||||
protected ISettingManagementStore SettingManagementStore { get; }
|
||||
|
||||
protected SettingManagementProvider(ISettingManagementStore settingManagementStore)
|
||||
{
|
||||
SettingManagementStore = settingManagementStore;
|
||||
}
|
||||
|
||||
public virtual async Task<string> GetOrNullAsync(SettingDefinition setting, string providerKey)
|
||||
{
|
||||
return await SettingManagementStore.GetOrNullAsync(setting.Name, Name, NormalizeProviderKey(providerKey));
|
||||
}
|
||||
|
||||
public virtual async Task SetAsync(SettingDefinition setting, string value, string providerKey)
|
||||
{
|
||||
await SettingManagementStore.SetAsync(setting.Name, value, Name, NormalizeProviderKey(providerKey));
|
||||
}
|
||||
|
||||
public virtual async Task ClearAsync(SettingDefinition setting, string providerKey)
|
||||
{
|
||||
await SettingManagementStore.DeleteAsync(setting.Name, Name, NormalizeProviderKey(providerKey));
|
||||
}
|
||||
|
||||
protected virtual string NormalizeProviderKey(string providerKey)
|
||||
{
|
||||
return providerKey;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Caching;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Guids;
|
||||
using Volo.Abp.Settings;
|
||||
using Volo.Abp.Uow;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class SettingManagementStore : ISettingManagementStore, ITransientDependency
|
||||
{
|
||||
protected IDistributedCache<SettingCacheItem> Cache { get; }
|
||||
protected ISettingDefinitionManager SettingDefinitionManager { get; }
|
||||
protected ISettingRepository SettingRepository { get; }
|
||||
protected IGuidGenerator GuidGenerator { get; }
|
||||
|
||||
public SettingManagementStore(
|
||||
ISettingRepository settingRepository,
|
||||
IGuidGenerator guidGenerator,
|
||||
IDistributedCache<SettingCacheItem> cache,
|
||||
ISettingDefinitionManager settingDefinitionManager)
|
||||
{
|
||||
SettingRepository = settingRepository;
|
||||
GuidGenerator = guidGenerator;
|
||||
Cache = cache;
|
||||
SettingDefinitionManager = settingDefinitionManager;
|
||||
}
|
||||
|
||||
[UnitOfWork]
|
||||
public virtual async Task<string> GetOrNullAsync(string name, string providerName, string providerKey)
|
||||
{
|
||||
return (await GetCacheItemAsync(name, providerName, providerKey)).Value;
|
||||
}
|
||||
|
||||
[UnitOfWork]
|
||||
public virtual async Task SetAsync(string name, string value, string providerName, string providerKey)
|
||||
{
|
||||
var setting = await SettingRepository.FindAsync(name, providerName, providerKey);
|
||||
if (setting == null)
|
||||
{
|
||||
setting = new SettingEntity(GuidGenerator.Create(), name, value, providerName, providerKey);
|
||||
await SettingRepository.InsertAsync(setting);
|
||||
}
|
||||
else
|
||||
{
|
||||
setting.Value = value;
|
||||
await SettingRepository.UpdateAsync(setting);
|
||||
}
|
||||
|
||||
await Cache.SetAsync(CalculateCacheKey(name, providerName, providerKey), new SettingCacheItem(setting?.Value), considerUow: true);
|
||||
}
|
||||
|
||||
public virtual async Task<List<SettingValue>> GetListAsync(string providerName, string providerKey)
|
||||
{
|
||||
var settings = await SettingRepository.GetListAsync(providerName, providerKey);
|
||||
return settings.Select(s => new SettingValue(s.Name, s.Value)).ToList();
|
||||
}
|
||||
|
||||
[UnitOfWork]
|
||||
public virtual async Task DeleteAsync(string name, string providerName, string providerKey)
|
||||
{
|
||||
var setting = await SettingRepository.FindAsync(name, providerName, providerKey);
|
||||
if (setting != null)
|
||||
{
|
||||
await SettingRepository.DeleteAsync(setting);
|
||||
await Cache.RemoveAsync(CalculateCacheKey(name, providerName, providerKey), considerUow: true);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual async Task<SettingCacheItem> GetCacheItemAsync(string name, string providerName, string providerKey)
|
||||
{
|
||||
var cacheKey = CalculateCacheKey(name, providerName, providerKey);
|
||||
var cacheItem = await Cache.GetAsync(cacheKey, considerUow: true);
|
||||
|
||||
if (cacheItem != null)
|
||||
{
|
||||
return cacheItem;
|
||||
}
|
||||
|
||||
cacheItem = new SettingCacheItem(null);
|
||||
|
||||
await SetCacheItemsAsync(providerName, providerKey, name, cacheItem);
|
||||
|
||||
return cacheItem;
|
||||
}
|
||||
|
||||
private async Task SetCacheItemsAsync(
|
||||
string providerName,
|
||||
string providerKey,
|
||||
string currentName,
|
||||
SettingCacheItem currentCacheItem)
|
||||
{
|
||||
var settingDefinitions =await SettingDefinitionManager.GetAllAsync();
|
||||
var settingsDictionary = (await SettingRepository.GetListAsync(providerName, providerKey))
|
||||
.ToDictionary(s => s.Name, s => s.Value);
|
||||
|
||||
var cacheItems = new List<KeyValuePair<string, SettingCacheItem>>();
|
||||
|
||||
foreach (var settingDefinition in settingDefinitions)
|
||||
{
|
||||
var settingValue = settingsDictionary.GetOrDefault(settingDefinition.Name);
|
||||
|
||||
cacheItems.Add(
|
||||
new KeyValuePair<string, SettingCacheItem>(
|
||||
CalculateCacheKey(settingDefinition.Name, providerName, providerKey),
|
||||
new SettingCacheItem(settingValue)
|
||||
)
|
||||
);
|
||||
|
||||
if (settingDefinition.Name == currentName)
|
||||
{
|
||||
currentCacheItem.Value = settingValue;
|
||||
}
|
||||
}
|
||||
|
||||
await Cache.SetManyAsync(cacheItems, considerUow: true);
|
||||
}
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<List<SettingValue>> GetListAsync(string[] names, string providerName, string providerKey)
|
||||
{
|
||||
Check.NotNullOrEmpty(names, nameof(names));
|
||||
|
||||
var result = new List<SettingValue>();
|
||||
|
||||
if (names.Length == 1)
|
||||
{
|
||||
var name = names.First();
|
||||
result.Add(new SettingValue(name, (await GetCacheItemAsync(name, providerName, providerKey)).Value));
|
||||
return result;
|
||||
}
|
||||
|
||||
var cacheItems = await GetCacheItemsAsync(names, providerName, providerKey);
|
||||
foreach (var item in cacheItems)
|
||||
{
|
||||
result.Add(new SettingValue(GetSettingNameFormCacheKeyOrNull(item.Key), item.Value?.Value));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
protected virtual async Task<List<KeyValuePair<string, SettingCacheItem>>> GetCacheItemsAsync(string[] names, string providerName, string providerKey)
|
||||
{
|
||||
var cacheKeys = names.Select(x => CalculateCacheKey(x, providerName, providerKey)).ToList();
|
||||
|
||||
var cacheItems = (await Cache.GetManyAsync(cacheKeys, considerUow: true)).ToList();
|
||||
|
||||
if (cacheItems.All(x => x.Value != null))
|
||||
{
|
||||
return cacheItems;
|
||||
}
|
||||
|
||||
var notCacheKeys = cacheItems.Where(x => x.Value == null).Select(x => x.Key).ToList();
|
||||
|
||||
var newCacheItems = await SetCacheItemsAsync(providerName, providerKey, notCacheKeys);
|
||||
|
||||
var result = new List<KeyValuePair<string, SettingCacheItem>>();
|
||||
foreach (var key in cacheKeys)
|
||||
{
|
||||
var item = newCacheItems.FirstOrDefault(x => x.Key == key);
|
||||
if (item.Value == null)
|
||||
{
|
||||
item = cacheItems.FirstOrDefault(x => x.Key == key);
|
||||
}
|
||||
|
||||
result.Add(new KeyValuePair<string, SettingCacheItem>(key, item.Value));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private async Task<List<KeyValuePair<string, SettingCacheItem>>> SetCacheItemsAsync(
|
||||
string providerName,
|
||||
string providerKey,
|
||||
List<string> notCacheKeys)
|
||||
{
|
||||
var settingDefinitions =(await SettingDefinitionManager.GetAllAsync()).Where(x => notCacheKeys.Any(k => GetSettingNameFormCacheKeyOrNull(k) == x.Name));
|
||||
|
||||
var settingsDictionary = (await SettingRepository.GetListAsync(notCacheKeys.Select(GetSettingNameFormCacheKeyOrNull).ToArray(), providerName, providerKey))
|
||||
.ToDictionary(s => s.Name, s => s.Value);
|
||||
|
||||
var cacheItems = new List<KeyValuePair<string, SettingCacheItem>>();
|
||||
|
||||
foreach (var settingDefinition in settingDefinitions)
|
||||
{
|
||||
var settingValue = settingsDictionary.GetOrDefault(settingDefinition.Name);
|
||||
cacheItems.Add(
|
||||
new KeyValuePair<string, SettingCacheItem>(
|
||||
CalculateCacheKey(settingDefinition.Name, providerName, providerKey),
|
||||
new SettingCacheItem(settingValue)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
await Cache.SetManyAsync(cacheItems, considerUow: true);
|
||||
|
||||
return cacheItems;
|
||||
}
|
||||
|
||||
|
||||
protected virtual string CalculateCacheKey(string name, string providerName, string providerKey)
|
||||
{
|
||||
return SettingCacheItem.CalculateCacheKey(name, providerName, providerKey);
|
||||
}
|
||||
|
||||
protected virtual string GetSettingNameFormCacheKeyOrNull(string key)
|
||||
{
|
||||
//TODO: throw ex when name is null?
|
||||
return SettingCacheItem.GetSettingNameFormCacheKeyOrNull(key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class SettingManager : ISettingManager, ISingletonDependency
|
||||
{
|
||||
protected ISettingDefinitionManager SettingDefinitionManager { get; }
|
||||
protected ISettingEncryptionService SettingEncryptionService { get; }
|
||||
protected List<ISettingManagementProvider> Providers => _lazyProviders.Value;
|
||||
protected SettingManagementOptions Options { get; }
|
||||
private readonly Lazy<List<ISettingManagementProvider>> _lazyProviders;
|
||||
|
||||
public SettingManager(
|
||||
IOptions<SettingManagementOptions> options,
|
||||
IServiceProvider serviceProvider,
|
||||
ISettingDefinitionManager settingDefinitionManager,
|
||||
ISettingEncryptionService settingEncryptionService)
|
||||
{
|
||||
SettingDefinitionManager = settingDefinitionManager;
|
||||
SettingEncryptionService = settingEncryptionService;
|
||||
Options = options.Value;
|
||||
|
||||
//TODO: Instead, use IServiceScopeFactory and create a scope..?
|
||||
|
||||
_lazyProviders = new Lazy<List<ISettingManagementProvider>>(
|
||||
() => Options
|
||||
.Providers
|
||||
.Select(c => serviceProvider.GetRequiredService(c) as ISettingManagementProvider)
|
||||
.ToList(),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public virtual Task<string> GetOrNullAsync(string name, string providerName, string providerKey, bool fallback = true)
|
||||
{
|
||||
Check.NotNull(name, nameof(name));
|
||||
Check.NotNull(providerName, nameof(providerName));
|
||||
|
||||
return GetOrNullInternalAsync(name, providerName, providerKey, fallback);
|
||||
}
|
||||
|
||||
public virtual async Task<List<SettingValue>> GetAllAsync(string providerName, string providerKey, bool fallback = true)
|
||||
{
|
||||
Check.NotNull(providerName, nameof(providerName));
|
||||
|
||||
var settingDefinitions =await SettingDefinitionManager.GetAllAsync();
|
||||
var providers = Enumerable.Reverse(Providers)
|
||||
.SkipWhile(c => c.Name != providerName);
|
||||
|
||||
if (!fallback)
|
||||
{
|
||||
providers = providers.TakeWhile(c => c.Name == providerName);
|
||||
}
|
||||
|
||||
var providerList = providers.Reverse().ToList();
|
||||
|
||||
if (!providerList.Any())
|
||||
{
|
||||
return new List<SettingValue>();
|
||||
}
|
||||
|
||||
var settingValues = new Dictionary<string, SettingValue>();
|
||||
|
||||
foreach (var setting in settingDefinitions)
|
||||
{
|
||||
string value = null;
|
||||
|
||||
if (setting.IsInherited)
|
||||
{
|
||||
foreach (var provider in providerList)
|
||||
{
|
||||
var providerValue = await provider.GetOrNullAsync(
|
||||
setting,
|
||||
provider.Name == providerName ? providerKey : null
|
||||
);
|
||||
if (providerValue != null)
|
||||
{
|
||||
value = providerValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
value = await providerList[0].GetOrNullAsync(
|
||||
setting,
|
||||
providerKey
|
||||
);
|
||||
}
|
||||
|
||||
if (setting.IsEncrypted)
|
||||
{
|
||||
value = SettingEncryptionService.Decrypt(setting, value);
|
||||
}
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
settingValues[setting.Name] = new SettingValue(setting.Name, value);
|
||||
}
|
||||
}
|
||||
|
||||
return settingValues.Values.ToList();
|
||||
}
|
||||
|
||||
public virtual async Task SetAsync(string name, string value, string providerName, string providerKey, bool forceToSet = false)
|
||||
{
|
||||
Check.NotNull(name, nameof(name));
|
||||
Check.NotNull(providerName, nameof(providerName));
|
||||
|
||||
var setting =await SettingDefinitionManager.GetAsync(name);
|
||||
|
||||
var providers = Enumerable
|
||||
.Reverse(Providers)
|
||||
.SkipWhile(p => p.Name != providerName)
|
||||
.ToList();
|
||||
|
||||
if (!providers.Any())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (setting.IsEncrypted)
|
||||
{
|
||||
value = SettingEncryptionService.Encrypt(setting, value);
|
||||
}
|
||||
|
||||
if (providers.Count > 1 && !forceToSet && setting.IsInherited && value != null)
|
||||
{
|
||||
var fallbackValue = await GetOrNullInternalAsync(name, providers[1].Name, null);
|
||||
if (fallbackValue == value)
|
||||
{
|
||||
//Clear the value if it's same as it's fallback value
|
||||
value = null;
|
||||
}
|
||||
}
|
||||
|
||||
providers = providers
|
||||
.TakeWhile(p => p.Name == providerName)
|
||||
.ToList(); //Getting list for case of there are more than one provider with same providerName
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
foreach (var provider in providers)
|
||||
{
|
||||
await provider.ClearAsync(setting, providerKey);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var provider in providers)
|
||||
{
|
||||
await provider.SetAsync(setting, value, providerKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual async Task<string> GetOrNullInternalAsync(string name, string providerName, string providerKey, bool fallback = true)
|
||||
{
|
||||
var setting =await SettingDefinitionManager.GetAsync(name);
|
||||
var providers = Enumerable
|
||||
.Reverse(Providers);
|
||||
|
||||
if (providerName != null)
|
||||
{
|
||||
providers = providers.SkipWhile(c => c.Name != providerName);
|
||||
}
|
||||
|
||||
if (!fallback || !setting.IsInherited)
|
||||
{
|
||||
providers = providers.TakeWhile(c => c.Name == providerName);
|
||||
}
|
||||
|
||||
string value = null;
|
||||
foreach (var provider in providers)
|
||||
{
|
||||
value = await provider.GetOrNullAsync(
|
||||
setting,
|
||||
provider.Name == providerName ? providerKey : null
|
||||
);
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (setting.IsEncrypted)
|
||||
{
|
||||
value = SettingEncryptionService.Decrypt(setting, value);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class SettingStore : ISettingStore, ITransientDependency
|
||||
{
|
||||
protected ISettingManagementStore ManagementStore { get; }
|
||||
|
||||
public SettingStore(ISettingManagementStore managementStore)
|
||||
{
|
||||
ManagementStore = managementStore;
|
||||
}
|
||||
|
||||
public virtual Task<string> GetOrNullAsync(string name, string providerName, string providerKey)
|
||||
{
|
||||
return ManagementStore.GetOrNullAsync(name, providerName, providerKey);
|
||||
}
|
||||
|
||||
public virtual Task<List<SettingValue>> GetAllAsync(string[] names, string providerName, string providerKey)
|
||||
{
|
||||
return ManagementStore.GetListAsync(names, providerName, providerKey);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public static class TenantSettingManagerExtensions
|
||||
{
|
||||
public static Task<string> GetOrNullForTenantAsync(this ISettingManager settingManager, [NotNull] string name, Guid tenantId, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetOrNullAsync(name, TenantSettingValueProvider.ProviderName, tenantId.ToString(), fallback);
|
||||
}
|
||||
|
||||
public static Task<string> GetOrNullForCurrentTenantAsync(this ISettingManager settingManager, [NotNull] string name, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetOrNullAsync(name, TenantSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task<List<SettingValue>> GetAllForTenantAsync(this ISettingManager settingManager, Guid tenantId, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetAllAsync(TenantSettingValueProvider.ProviderName, tenantId.ToString(), fallback);
|
||||
}
|
||||
|
||||
public static Task<List<SettingValue>> GetAllForCurrentTenantAsync(this ISettingManager settingManager, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetAllAsync(TenantSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task SetForTenantAsync(this ISettingManager settingManager, Guid tenantId, [NotNull] string name, [CanBeNull] string value, bool forceToSet = false)
|
||||
{
|
||||
return settingManager.SetAsync(name, value, TenantSettingValueProvider.ProviderName, tenantId.ToString(), forceToSet);
|
||||
}
|
||||
|
||||
public static Task SetForCurrentTenantAsync(this ISettingManager settingManager, [NotNull] string name, [CanBeNull] string value, bool forceToSet = false)
|
||||
{
|
||||
return settingManager.SetAsync(name, value, TenantSettingValueProvider.ProviderName, null, forceToSet);
|
||||
}
|
||||
|
||||
public static Task SetForTenantOrGlobalAsync(this ISettingManager settingManager, Guid? tenantId, [NotNull] string name, [CanBeNull] string value, bool forceToSet = false)
|
||||
{
|
||||
if (tenantId.HasValue)
|
||||
{
|
||||
return settingManager.SetForTenantAsync(tenantId.Value, name, value, forceToSet);
|
||||
}
|
||||
|
||||
return settingManager.SetGlobalAsync(name, value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Settings;
|
||||
using Volo.Abp.Users;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
public class UserSettingManagementProvider : SettingManagementProvider, ITransientDependency
|
||||
{
|
||||
public override string Name => UserSettingValueProvider.ProviderName;
|
||||
|
||||
protected ICurrentUser CurrentUser { get; }
|
||||
|
||||
public UserSettingManagementProvider(
|
||||
ISettingManagementStore settingManagementStore,
|
||||
ICurrentUser currentUser)
|
||||
: base(settingManagementStore)
|
||||
{
|
||||
CurrentUser = currentUser;
|
||||
}
|
||||
|
||||
protected override string NormalizeProviderKey(string providerKey)
|
||||
{
|
||||
if (providerKey != null)
|
||||
{
|
||||
return providerKey;
|
||||
}
|
||||
|
||||
return CurrentUser.Id?.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Volo.Abp.Settings;
|
||||
using Volo.Abp.Users;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain;
|
||||
|
||||
//TODO: Consider to move to another package?
|
||||
|
||||
public static class UserSettingManagerExtensions
|
||||
{
|
||||
public static Task<string> GetOrNullForUserAsync(this ISettingManager settingManager, [NotNull] string name, Guid userId, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetOrNullAsync(name, UserSettingValueProvider.ProviderName, userId.ToString(), fallback);
|
||||
}
|
||||
|
||||
public static Task<string> GetOrNullForCurrentUserAsync(this ISettingManager settingManager, [NotNull] string name, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetOrNullAsync(name, UserSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task<List<SettingValue>> GetAllForUserAsync(this ISettingManager settingManager, Guid userId, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetAllAsync(UserSettingValueProvider.ProviderName, userId.ToString(), fallback);
|
||||
}
|
||||
|
||||
public static Task<List<SettingValue>> GetAllForCurrentUserAsync(this ISettingManager settingManager, bool fallback = true)
|
||||
{
|
||||
return settingManager.GetAllAsync(UserSettingValueProvider.ProviderName, null, fallback);
|
||||
}
|
||||
|
||||
public static Task SetForUserAsync(this ISettingManager settingManager, Guid userId, [NotNull] string name, [CanBeNull] string value, bool forceToSet = false)
|
||||
{
|
||||
return settingManager.SetAsync(name, value, UserSettingValueProvider.ProviderName, userId.ToString(), forceToSet);
|
||||
}
|
||||
|
||||
public static Task SetForCurrentUserAsync(this ISettingManager settingManager, [NotNull] string name, [CanBeNull] string value, bool forceToSet = false)
|
||||
{
|
||||
return settingManager.SetAsync(name, value, UserSettingValueProvider.ProviderName, null, forceToSet);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,30 @@
|
||||
using Volo.Abp.Caching;
|
||||
using Volo.Abp.Domain;
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.SettingManagement;
|
||||
using Volo.Abp.Settings;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.Domain
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(AbpSettingsModule),
|
||||
typeof(AbpDddDomainModule),
|
||||
typeof(AbpSettingManagementDomainSharedModule),
|
||||
typeof(AbpCachingModule)
|
||||
)]
|
||||
public class YiFrameworkSettingManagementDomainModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<SettingManagementOptions>(options =>
|
||||
{
|
||||
options.Providers.Add<DefaultValueSettingManagementProvider>();
|
||||
options.Providers.Add<ConfigurationSettingManagementProvider>();
|
||||
options.Providers.Add<GlobalSettingManagementProvider>();
|
||||
options.Providers.Add<TenantSettingManagementProvider>();
|
||||
options.Providers.Add<UserSettingManagementProvider>();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using Yi.Framework.SettingManagement.Domain;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
using Yi.Framework.SqlSugarCore.Repositories;
|
||||
|
||||
namespace Volo.Abp.SettingManagement.EntityFrameworkCore;
|
||||
|
||||
public class SqlSugarCoreSettingRepository : SqlSugarRepository<SettingEntity, Guid>,
|
||||
ISettingRepository
|
||||
{
|
||||
public SqlSugarCoreSettingRepository(ISugarDbContextProvider<ISqlSugarDbContext> sugarDbContextProvider) : base(sugarDbContextProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual async Task<SettingEntity> FindAsync(
|
||||
string name,
|
||||
string providerName,
|
||||
string providerKey,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
return await _DbQueryable
|
||||
.Where(s => s.Name == name && s.ProviderName == providerName && s.ProviderKey == providerKey)
|
||||
.OrderBy(x => x.Id)
|
||||
.FirstAsync();
|
||||
}
|
||||
|
||||
public virtual async Task<List<SettingEntity>> GetListAsync(
|
||||
string providerName,
|
||||
string providerKey,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
return await _DbQueryable
|
||||
.Where(
|
||||
s => s.ProviderName == providerName && s.ProviderKey == providerKey
|
||||
).ToListAsync();
|
||||
}
|
||||
|
||||
public virtual async Task<List<SettingEntity>> GetListAsync(
|
||||
string[] names,
|
||||
string providerName,
|
||||
string providerKey,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
return await _DbQueryable
|
||||
.Where(
|
||||
s => names.Contains(s.Name) && s.ProviderName == providerName && s.ProviderKey == providerKey
|
||||
).ToListAsync();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\..\common.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\framework\Yi.Framework.SqlSugarCore\Yi.Framework.SqlSugarCore.csproj" />
|
||||
<ProjectReference Include="..\Yi.Framework.SettingManagement.Domain\Yi.Framework.SettingManagement.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,21 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.SettingManagement.EntityFrameworkCore;
|
||||
using Yi.Framework.SettingManagement.Domain;
|
||||
using Yi.Framework.SqlSugarCore;
|
||||
|
||||
namespace Yi.Framework.SettingManagement.SqlSugarCore
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(YiFrameworkSettingManagementDomainModule),
|
||||
typeof(YiFrameworkSqlSugarCoreModule)
|
||||
)]
|
||||
public class YiFrameworkSettingManagementSqlSugarCoreModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
var services = context.Services;
|
||||
services.AddTransient<ISettingRepository, SqlSugarCoreSettingRepository>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="$(AbpVersion)" />
|
||||
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="$(AbpVersion)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\common.props" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="$(AbpVersion)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.3" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\framework\Yi.Framework.Ddd.Application\Yi.Framework.Ddd.Application.csproj" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Import Project="..\..\common.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\common.props" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Caching" Version="$(AbpVersion)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
|
||||
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||
<PackageReference Include="NSubstitute" Version="5.1.0" />
|
||||
@@ -25,7 +25,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Shouldly" Version="4.2.1" />
|
||||
<PackageReference Include="Volo.Abp.TestBase" Version="8.0.5" />
|
||||
<PackageReference Include="Volo.Abp.TestBase" Version="$(AbpVersion)" />
|
||||
<PackageReference Include="xunit" Version="2.7.0" />
|
||||
<PackageReference Include="xunit.extensibility.execution" Version="2.7.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
|
||||
|
||||
6
Yi.Abp.Net8/version.props
Normal file
6
Yi.Abp.Net8/version.props
Normal file
@@ -0,0 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AbpVersion>8.0.5</AbpVersion>
|
||||
<SqlSugarVersion>5.1.4.149</SqlSugarVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user