Merge branch 'refs/heads/abp' into digital-collectibles

This commit is contained in:
橙子
2025-02-03 10:30:26 +08:00
20 changed files with 593 additions and 481 deletions

View File

@@ -2,7 +2,7 @@
namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Role
{
public class UpdateDataScpoceInput
public class UpdateDataScopeInput
{
public Guid RoleId { get; set; }

View File

@@ -39,7 +39,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
private ISqlSugarRepository<UserRoleEntity> _userRoleRepository;
public async Task UpdateDataScpoceAsync(UpdateDataScpoceInput input)
public async Task UpdateDataScopeAsync(UpdateDataScopeInput input)
{
//只有自定义的需要特殊处理
if (input.DataScope == DataScopeEnum.CUSTOM)

View File

@@ -20,7 +20,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="DistributedLock.Redis" Version="1.0.3" />
<PackageReference Include="Volo.Abp.DistributedLocking" Version="$(AbpVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\Yi.Framework.Caching.FreeRedis\Yi.Framework.Caching.FreeRedis.csproj" />
<ProjectReference Include="..\..\..\framework\Yi.Framework.SqlSugarCore.Abstractions\Yi.Framework.SqlSugarCore.Abstractions.csproj" />

View File

@@ -1,6 +1,10 @@
using Microsoft.Extensions.DependencyInjection;
using Medallion.Threading;
using Medallion.Threading.Redis;
using Microsoft.Extensions.DependencyInjection;
using StackExchange.Redis;
using Volo.Abp.AspNetCore.SignalR;
using Volo.Abp.Caching;
using Volo.Abp.DistributedLocking;
using Volo.Abp.Domain;
using Volo.Abp.Imaging;
using Volo.Abp.Modularity;
@@ -20,7 +24,8 @@ namespace Yi.Framework.Rbac.Domain
typeof(AbpAspNetCoreSignalRModule),
typeof(AbpDddDomainModule),
typeof(AbpCachingModule),
typeof(AbpImagingImageSharpModule)
typeof(AbpImagingImageSharpModule),
typeof(AbpDistributedLockingModule)
)]
public class YiFrameworkRbacDomainModule : AbpModule
{
@@ -36,6 +41,15 @@ namespace Yi.Framework.Rbac.Domain
//配置阿里云短信
Configure<AliyunOptions>(configuration.GetSection(nameof(AliyunOptions)));
//分布式锁
context.Services.AddSingleton<IDistributedLockProvider>(sp =>
{
var connection = ConnectionMultiplexer
.Connect(configuration["Redis:Configuration"]);
return new
RedisDistributedSynchronizationProvider(connection.GetDatabase());
});
}
}
}