diff --git a/Yi.Abp.Net8/Yi.Abp.sln b/Yi.Abp.Net8/Yi.Abp.sln
index 03343e50..7a75e175 100644
--- a/Yi.Abp.Net8/Yi.Abp.sln
+++ b/Yi.Abp.Net8/Yi.Abp.sln
@@ -107,13 +107,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.TenantManageme
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "code-gen", "code-gen", "{4FFE7212-21F2-476D-B628-3C65E6C5075E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application", "module\code-gen\Yi.Framework.Codegen.Application\Yi.Framework.CodeGen.Application.csproj", "{97EC40D7-DBFA-467A-98CB-221AF27B14F2}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application", "module\code-gen\Yi.Framework.CodeGen.Application\Yi.Framework.CodeGen.Application.csproj", "{97EC40D7-DBFA-467A-98CB-221AF27B14F2}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application.Contracts", "module\code-gen\Yi.Framework.Codegen.Application.Contracts\Yi.Framework.CodeGen.Application.Contracts.csproj", "{882BC563-2F75-4B95-AC96-F4BF23F5E69D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Application.Contracts", "module\code-gen\Yi.Framework.CodeGen.Application.Contracts\Yi.Framework.CodeGen.Application.Contracts.csproj", "{882BC563-2F75-4B95-AC96-F4BF23F5E69D}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain", "module\code-gen\Yi.Framework.Codegen.Domain\Yi.Framework.CodeGen.Domain.csproj", "{85CB8517-2B80-42D8-B954-081079AC9BA0}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain", "module\code-gen\Yi.Framework.CodeGen.Domain\Yi.Framework.CodeGen.Domain.csproj", "{85CB8517-2B80-42D8-B954-081079AC9BA0}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain.Shared", "module\code-gen\Yi.Framework.Codegen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj", "{EEFF0F05-2709-4151-A8CE-667935CEAE0B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.CodeGen.Domain.Shared", "module\code-gen\Yi.Framework.CodeGen.Domain.Shared\Yi.Framework.CodeGen.Domain.Shared.csproj", "{EEFF0F05-2709-4151-A8CE-667935CEAE0B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yi.Framework.Caching.FreeRedis", "framework\Yi.Framework.Caching.FreeRedis\Yi.Framework.Caching.FreeRedis.csproj", "{862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yi.Framework.CodeGen.SqlSugarCore", "module\code-gen\Yi.Framework.CodeGen.SqlSugarCore\Yi.Framework.CodeGen.SqlSugarCore.csproj", "{FB09ACC2-A27D-4D87-8D85-1435FDED4D04}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -289,6 +293,14 @@ Global
{EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEFF0F05-2709-4151-A8CE-667935CEAE0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {862BB0EF-3D4E-44FF-AB15-0EB74CE553D3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FB09ACC2-A27D-4D87-8D85-1435FDED4D04}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -341,6 +353,8 @@ Global
{882BC563-2F75-4B95-AC96-F4BF23F5E69D} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
{85CB8517-2B80-42D8-B954-081079AC9BA0} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
{EEFF0F05-2709-4151-A8CE-667935CEAE0B} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
+ {862BB0EF-3D4E-44FF-AB15-0EB74CE553D3} = {77B949E9-530E-45A5-9657-20F7D5C6875C}
+ {FB09ACC2-A27D-4D87-8D85-1435FDED4D04} = {4FFE7212-21F2-476D-B628-3C65E6C5075E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {23D6FBC9-C970-4641-BC1E-2AEA59F51C18}
diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/FreeSqlOptions.cs b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/FreeSqlOptions.cs
new file mode 100644
index 00000000..f87d54ec
--- /dev/null
+++ b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/FreeSqlOptions.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using FreeRedis;
+
+namespace Yi.Framework.Caching.FreeRedis
+{
+ ///
+ /// 便于转到定义
+ ///
+ public class FreeSqlOptions: ConnectionStringBuilder
+ {
+
+ }
+}
diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/Yi.Framework.Caching.FreeRedis.csproj b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/Yi.Framework.Caching.FreeRedis.csproj
new file mode 100644
index 00000000..fe61ba31
--- /dev/null
+++ b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/Yi.Framework.Caching.FreeRedis.csproj
@@ -0,0 +1,16 @@
+
+
+
+
+ net8.0
+ enable
+ enable
+
+
+
+
+
+
+
+
+
diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/YiDistributedCacheKeyNormalizer.cs b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/YiDistributedCacheKeyNormalizer.cs
new file mode 100644
index 00000000..e3e0e22e
--- /dev/null
+++ b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/YiDistributedCacheKeyNormalizer.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Options;
+using Volo.Abp.Caching;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.MultiTenancy;
+
+namespace Yi.Framework.Caching.FreeRedis
+{
+ [Dependency(ReplaceServices =true)]
+ public class YiDistributedCacheKeyNormalizer : IDistributedCacheKeyNormalizer, ITransientDependency
+ {
+ protected ICurrentTenant CurrentTenant { get; }
+
+ protected AbpDistributedCacheOptions DistributedCacheOptions { get; }
+
+ public YiDistributedCacheKeyNormalizer(
+ ICurrentTenant currentTenant,
+ IOptions distributedCacheOptions)
+ {
+ CurrentTenant = currentTenant;
+ DistributedCacheOptions = distributedCacheOptions.Value;
+ }
+
+ public virtual string NormalizeKey(DistributedCacheKeyNormalizeArgs args)
+ {
+ var normalizedKey = $"{DistributedCacheOptions.KeyPrefix}{args.Key}";
+
+ //if (!args.IgnoreMultiTenancy && CurrentTenant.Id.HasValue)
+ //{
+ // normalizedKey = $"t:{CurrentTenant.Id.Value},{normalizedKey}";
+ //}
+
+ return normalizedKey;
+ }
+ }
+}
diff --git a/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/YiFrameworkCachingFreeRedisModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/YiFrameworkCachingFreeRedisModule.cs
new file mode 100644
index 00000000..85b65e44
--- /dev/null
+++ b/Yi.Abp.Net8/framework/Yi.Framework.Caching.FreeRedis/YiFrameworkCachingFreeRedisModule.cs
@@ -0,0 +1,32 @@
+using FreeRedis;
+using Microsoft.Extensions.Caching.Distributed;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
+using Volo.Abp.Caching;
+
+namespace Yi.Framework.Caching.FreeRedis
+{
+ ///
+ /// 此模块得益于FreeRedis作者支持IDistributedCache,使用湿滑
+ ///
+ [DependsOn(typeof(AbpCachingModule))]
+ public class YiFrameworkCachingFreeRedisModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+
+ var configuration = context.Services.GetConfiguration();
+
+ var redisEnabled = configuration["Redis:IsEnabled"];
+ if (redisEnabled.IsNullOrEmpty() || bool.Parse(redisEnabled))
+ {
+ var redisConfiguration = configuration["Redis:Configuration"];
+ RedisClient redisClient = new RedisClient(redisConfiguration);
+
+ context.Services.AddSingleton(redisClient);
+ context.Services.Replace(ServiceDescriptor.Singleton(new
+ DistributedCache(redisClient)));
+ }
+ }
+ }
+}
diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarDbContext.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarDbContext.cs
index a2b5016c..edfcf258 100644
--- a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarDbContext.cs
+++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/SqlSugarDbContext.cs
@@ -60,6 +60,7 @@ namespace Yi.Framework.SqlSugarCore
{
options.ConnectionString = currentConnection;
}));
+ connectionCreator.SetDbAop(SqlSugarClient);
}
///
@@ -242,6 +243,11 @@ namespace Yi.Framework.SqlSugarCore
///
protected virtual void OnLogExecuted(string sql, SugarParameter[] pars)
{
+ if (Options.EnabledSqlLog)
+ {
+ var sqllog = $"=========Yi-SQL耗时{SqlSugarClient.Ado.SqlExecutionTime.TotalMilliseconds}毫秒=====";
+ Logger.CreateLogger().LogDebug(sqllog.ToString());
+ }
}
///
@@ -251,7 +257,14 @@ namespace Yi.Framework.SqlSugarCore
///
protected virtual void EntityService(PropertyInfo property, EntityColumnInfo column)
{
-
+ if (property.PropertyType == typeof(ExtraPropertyDictionary))
+ {
+ column.IsIgnore = true;
+ }
+ if (property.Name == nameof(Entity
[Navigate(NavigateType.OneToMany, nameof(FieldEntity.TableId))]
public List Fields { get; set; }
+
+ [SugarColumn(IsIgnore =true)]
+ public override ExtraPropertyDictionary ExtraProperties { get; protected set; }
}
}
diff --git a/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/TemplateDataSeed.cs b/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/TemplateDataSeed.cs
new file mode 100644
index 00000000..06b01136
--- /dev/null
+++ b/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/TemplateDataSeed.cs
@@ -0,0 +1,116 @@
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Guids;
+using Yi.Framework.CodeGen.Domain.Entities;
+using Yi.Framework.SqlSugarCore.Abstractions;
+
+namespace Yi.Framework.CodeGen.SqlSugarCore
+{
+ public class TemplateDataSeed : IDataSeedContributor, ITransientDependency
+ {
+ private ISqlSugarRepository _repository;
+ public TemplateDataSeed(ISqlSugarRepository repository)
+ {
+ _repository = repository;
+ }
+ public async Task SeedAsync(DataSeedContext context)
+ {
+ if (!await _repository.IsAnyAsync(x => true))
+ {
+ await _repository.InsertManyAsync(GetSeedData());
+ }
+ }
+ public List GetSeedData()
+ {
+ var entities = new List();
+ TemplateEntity entityTemplate = new TemplateEntity()
+ {
+ Name = "Entity",
+ BuildPath = "D:\\code\\Entities\\@ModelEntity.cs",
+ Remarks = "实体",
+ TemplateStr = "using SqlSugar;\r\nusing lo.Abp;\r\nusing lo.Abp.Auditing;\r\nusing lo.Abp.Domain.Entities;\r\nusing Yi.Framework.Core.Data;\r\n\r\nnamespace Yi.Framework.Rbac.Domain.Entities\r\n{\r\n /// \r\n /// 实体\r\n /// \r\n [SugarTable(\"@Model\")]\r\n public class @ModelEntity : Entity\r\n {\r\n@field\r\n }\r\n}\r\n"
+ };
+ entities.Add(entityTemplate);
+
+
+ TemplateEntity getListInputTemplate = new TemplateEntity()
+ {
+ Name = "GetListInput",
+ BuildPath = "D:\\code\\Dtos\\@Model\\@ModelGetListInput.cs",
+ Remarks = "列表查询参数",
+ TemplateStr = "using Yi.Framework.Ddd;\r\nusing Yi.Framework.Ddd.Application.Contracts;\r\n\r\nnamespace Yi.Framework.Rbac.Application.Contracts.Dtos.@Model\r\n{\r\n /// \r\n /// 查询参数\r\n /// \r\n public class @ModelGetListInput : PagedAllResultRequestDto\r\n {\r\n@field\r\n }\r\n}\r\n"
+ };
+ entities.Add(getListInputTemplate);
+
+
+ TemplateEntity getListOutputDtoTemplate = new TemplateEntity()
+ {
+ Name = "GetListOutputDto",
+ BuildPath = "D:\\code\\Dtos\\@Model\\@ModelGetListOutputDto.cs",
+ Remarks = "列表返回dto",
+ TemplateStr = "using lo.Abp.Application.Dtos;\r\n\r\nnamespace Yi.Framework.Rbac.Application.Contracts.Dtos.@Model\r\n{\r\n public class @ModelGetListOutputDto : EntityDto\r\n {\r\n@field\r\n }\r\n}\r\n"
+ };
+ entities.Add(getListOutputDtoTemplate);
+
+
+ TemplateEntity getOutputDtoTemplate = new TemplateEntity()
+ {
+ Name = "GetOutputDto",
+ BuildPath = "D:\\code\\Dtos\\@Model\\@ModelGetOutputDto.cs",
+ Remarks = "单返回dto",
+ TemplateStr = "using lo.Abp.Application.Dtos;\r\n\r\nnamespace Yi.Framework.Rbac.Application.Contracts.Dtos.@Model\r\n{\r\n public class @ModelGetOutputDto : EntityDto\r\n {\r\n@field\r\n }\r\n}\r\n"
+ };
+ entities.Add(getOutputDtoTemplate);
+
+ TemplateEntity updateInputTemplate = new TemplateEntity()
+ {
+ Name = "UpdateInput",
+ BuildPath = "D:\\code\\Dtos\\@Model\\@ModelUpdateInput.cs",
+ Remarks = "更新输入",
+ TemplateStr = "namespace Yi.Framework.Rbac.Application.Contracts.Dtos.@Model\r\n{\r\n public class @ModelUpdateInput\r\n {\r\n@field\r\n }\r\n}\r\n"
+ };
+ entities.Add(updateInputTemplate);
+
+ TemplateEntity createInputTemplate = new TemplateEntity()
+ {
+ Name = "CreateInput",
+ BuildPath = "D:\\code\\Dtos\\@Model\\@ModelCreateInput.cs",
+ Remarks = "创建dto",
+ TemplateStr = "namespace Yi.Framework.Rbac.Application.Contracts.Dtos.@Model\r\n{\r\n /// \r\n /// @Model输入创建对象\r\n /// \r\n public class @ModelCreateInput\r\n {\r\n@field\r\n }\r\n}\r\n"
+ };
+ entities.Add(createInputTemplate);
+
+
+ TemplateEntity iServicesTemplate = new TemplateEntity()
+ {
+ Name = "IServices",
+ BuildPath = "D:\\code\\IServices\\I@ModelService.cs",
+ Remarks = "应用服务抽象",
+ TemplateStr = "using lo.Abp.Application.Services;\r\nusing Yi.Framework.Ddd.Application.Contracts;\r\nusing Yi.Framework.Rbac.Application.Contracts.Dtos.@Model;\r\n\r\nnamespace Yi.Framework.Rbac.Application.Contracts.IServices\r\n{\r\n /// \r\n /// @Model服务抽象\r\n /// \r\n public interface I@ModelService : IYiCrudAppService<@ModelGetOutputDto, @ModelGetListOutputDto, Guid, @ModelGetListInput, @ModelCreateInput, @ModelUpdateInput>\r\n {\r\n\r\n }\r\n}\r\n"
+ };
+ entities.Add(iServicesTemplate);
+
+
+
+ TemplateEntity servicesTemplate = new TemplateEntity()
+ {
+ Name = "Service",
+ BuildPath = "D:\\code\\Services\\@ModelService.cs",
+ Remarks = "应用服务",
+ TemplateStr = "using SqlSugar;\r\nusing lo.Abp.Application.Dtos;\r\nusing lo.Abp.Application.Services;\r\nusing Yi.Framework.Ddd.Application;\r\nusing Yi.Framework.Rbac.Application.Contracts.Dtos.@Model;\r\nusing Yi.Framework.Rbac.Application.Contracts.IServices;\r\nusing Yi.Framework.Rbac.Domain.Entities;\r\nusing Yi.Framework.SqlSugarCore.Abstractions;\r\n\r\nnamespace Yi.Framework.Rbac.Application.Services\r\n{\r\n /// \r\n /// @Model服务实现\r\n /// \r\n public class @ModelService : YiCrudAppService<@ModelEntity, @ModelGetOutputDto, @ModelGetListOutputDto, Guid, @ModelGetListInput, @ModelCreateInput, @ModelUpdateInput>,\r\n I@ModelService\r\n {\r\n private ISqlSugarRepository<@ModelEntity, Guid> _repository;\r\n public @ModelService(ISqlSugarRepository<@ModelEntity, Guid> repository) : base(repository)\r\n {\r\n _repository = repository;\r\n }\r\n\r\n /// \r\n /// 多查\r\n /// \r\n /// \r\n /// \r\n public override async Task> GetListAsync(@ModelGetListInput input)\r\n {\r\n RefAsync total = 0;\r\n\r\n var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.@ModelKey), x => x.@ModelKey.Contains(input.@ModelKey!))\r\n .WhereIF(!string.IsNullOrEmpty(input.@ModelName), x => x.@ModelName!.Contains(input.@ModelName!))\r\n .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime)\r\n .ToPageListAsync(input.SkipCount, input.MaxResultCount, total);\r\n return new PagedResultDto<@ModelGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));\r\n }\r\n }\r\n}\r\n"
+ };
+ entities.Add(servicesTemplate);
+
+ TemplateEntity apiTemplate = new TemplateEntity()
+ {
+ TemplateStr = "import request from '@/utils/request'\r\n\r\n// 分页查询\r\nexport function listData(query) {\r\n return request({\r\n url: '/@model',\r\n method: 'get',\r\n params: query\r\n })\r\n}\r\n\r\n// id查询\r\nexport function getData(id) {\r\n return request({\r\n url: `/@model/${id}`,\r\n method: 'get'\r\n })\r\n}\r\n\r\n// 新增\r\nexport function addData(data) {\r\n return request({\r\n url: '/@model',\r\n method: 'post',\r\n data: data\r\n })\r\n}\r\n\r\n// 修改\r\nexport function updateData(id,data) {\r\n return request({\r\n url: `/@model/${id}`,\r\n method: 'put',\r\n data: data\r\n })\r\n}\r\n\r\n// 删除\r\nexport function delData(ids) {\r\n return request({\r\n url: `/@model`,\r\n method: 'delete',\r\n params:{id:ids}\r\n })\r\n}\r\n",
+ Name = "api",
+ BuildPath = "D:\\code\\Api\\@ModelApi.vue",
+ Remarks = "前端api"
+ };
+ entities.Add(apiTemplate);
+
+ return entities;
+ }
+ }
+}
diff --git a/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/Yi.Framework.CodeGen.SqlSugarCore.csproj b/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/Yi.Framework.CodeGen.SqlSugarCore.csproj
new file mode 100644
index 00000000..00c88c1d
--- /dev/null
+++ b/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/Yi.Framework.CodeGen.SqlSugarCore.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net8.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/YiFrameworkCodeGenSqlSugarCoreModule.cs b/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/YiFrameworkCodeGenSqlSugarCoreModule.cs
new file mode 100644
index 00000000..7e47a1d6
--- /dev/null
+++ b/Yi.Abp.Net8/module/code-gen/Yi.Framework.CodeGen.SqlSugarCore/YiFrameworkCodeGenSqlSugarCoreModule.cs
@@ -0,0 +1,10 @@
+using Yi.Framework.SqlSugarCore;
+
+namespace Yi.Framework.CodeGen.SqlSugarCore
+{
+ [DependsOn(typeof(YiFrameworkSqlSugarCoreModule))]
+ public class YiFrameworkCodeGenSqlSugarCoreModule:AbpModule
+ {
+
+ }
+}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeCreateInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeCreateInput.cs
new file mode 100644
index 00000000..cb420612
--- /dev/null
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeCreateInput.cs
@@ -0,0 +1,17 @@
+using Yi.Framework.Rbac.Domain.Shared.Enums;
+
+namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Notice
+{
+ ///
+ /// Notice输入创建对象
+ ///
+ public class NoticeCreateInput
+ {
+ public string Title { get; set; }
+ public NoticeTypeEnum Type { get; set; }
+ public string Content { get; set; }
+ public int OrderNum { get; set; }
+ public bool State { get; set; }
+
+ }
+}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetListInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetListInput.cs
new file mode 100644
index 00000000..7884d073
--- /dev/null
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetListInput.cs
@@ -0,0 +1,14 @@
+using Yi.Framework.Ddd.Application.Contracts;
+using Yi.Framework.Rbac.Domain.Shared.Enums;
+
+namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Notice
+{
+ ///
+ /// 查询参数
+ ///
+ public class NoticeGetListInput : PagedAllResultRequestDto
+ {
+ public string? Title { get; set; }
+ public NoticeTypeEnum? Type { get; set; }
+ }
+}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetListOutputDto.cs
new file mode 100644
index 00000000..20521adf
--- /dev/null
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetListOutputDto.cs
@@ -0,0 +1,20 @@
+using Volo.Abp.Application.Dtos;
+using Yi.Framework.Rbac.Domain.Shared.Enums;
+
+namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Notice
+{
+ public class NoticeGetListOutputDto : EntityDto
+ {
+ public string Title { get; set; }
+ public NoticeTypeEnum Type { get; set; }
+ public string Content { get; set; }
+ public bool IsDeleted { get; set; }
+ public DateTime CreationTime { get; set; }
+ public Guid? CreatorId { get; set; }
+ public Guid? LastModifierId { get; set; }
+ public DateTime? LastModificationTime { get; set; }
+ public int OrderNum { get; set; }
+ public bool State { get; set; }
+
+ }
+}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetOutputDto.cs
new file mode 100644
index 00000000..423e07b9
--- /dev/null
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeGetOutputDto.cs
@@ -0,0 +1,20 @@
+using Volo.Abp.Application.Dtos;
+using Yi.Framework.Rbac.Domain.Shared.Enums;
+
+namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Notice
+{
+ public class NoticeGetOutputDto : EntityDto
+ {
+ public string Title { get; set; }
+ public NoticeTypeEnum Type { get; set; }
+ public string Content { get; set; }
+ public bool IsDeleted { get; set; }
+ public DateTime CreationTime { get; set; }
+ public Guid? CreatorId { get; set; }
+ public Guid? LastModifierId { get; set; }
+ public DateTime? LastModificationTime { get; set; }
+ public int OrderNum { get; set; }
+ public bool State { get; set; }
+
+ }
+}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeUpdateInput.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeUpdateInput.cs
new file mode 100644
index 00000000..8bf8f4db
--- /dev/null
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Notice/NoticeUpdateInput.cs
@@ -0,0 +1,13 @@
+using Yi.Framework.Rbac.Domain.Shared.Enums;
+
+namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Notice
+{
+ public class NoticeUpdateInput
+ {
+ public string? Title { get; set; }
+ public NoticeTypeEnum? Type { get; set; }
+ public string? Content { get; set; }
+ public int? OrderNum { get; set; }
+ public bool? State { get; set; }
+ }
+}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/INoticeService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/INoticeService.cs
new file mode 100644
index 00000000..c42e1b75
--- /dev/null
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/IServices/INoticeService.cs
@@ -0,0 +1,13 @@
+using Yi.Framework.Ddd.Application.Contracts;
+using Yi.Framework.Rbac.Application.Contracts.Dtos.Notice;
+
+namespace Yi.Framework.Rbac.Application.Contracts.IServices
+{
+ ///
+ /// Notice服务抽象
+ ///
+ public interface INoticeService : IYiCrudAppService
+ {
+
+ }
+}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs
index 3d7c79e2..116d27c5 100644
--- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/AccountService.cs
@@ -3,6 +3,7 @@ using Lazy.Captcha.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using SqlSugar;
using Volo.Abp;
@@ -33,15 +34,17 @@ namespace Yi.Framework.Rbac.Application.Services
private readonly IGuidGenerator _guidGenerator;
private readonly RbacOptions _rbacOptions;
private readonly IAliyunManger _aliyunManger;
+ private IDistributedCache _userCache;
public AccountService(IUserRepository userRepository,
ICurrentUser currentUser,
IAccountManager accountManager,
ISqlSugarRepository menuRepository,
IDistributedCache phoneCache,
+ IDistributedCache userCache,
ICaptcha captcha,
IGuidGenerator guidGenerator,
IOptions options,
- IAliyunManger aliyunManger )
+ IAliyunManger aliyunManger)
{
_userRepository = userRepository;
_currentUser = currentUser;
@@ -52,6 +55,7 @@ namespace Yi.Framework.Rbac.Application.Services
_guidGenerator = guidGenerator;
_rbacOptions = options.Value;
_aliyunManger = aliyunManger;
+ _userCache = userCache;
}
@@ -113,10 +117,10 @@ namespace Yi.Framework.Rbac.Application.Services
[Authorize(AuthenticationSchemes = TokenTypeConst.Refresh)]
public async Task