diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
index 3fa3d858..f379b62e 100644
--- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
+++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
@@ -32,7 +32,7 @@
-
+
diff --git a/Admin.NET/Admin.NET.Core/Const/CommonConst.cs b/Admin.NET/Admin.NET.Core/Const/CommonConst.cs
index b71025af..544b2c87 100644
--- a/Admin.NET/Admin.NET.Core/Const/CommonConst.cs
+++ b/Admin.NET/Admin.NET.Core/Const/CommonConst.cs
@@ -33,12 +33,12 @@ public class CommonConst
public const string SendErrorMail = "Send:ErrorMail";
///
- /// 事件-新增租户事件
+ /// 事件-增加租户
///
- public const string InitTenant = "Init:Tenant";
+ public const string InitTenant = "Add:Tenant";
///
- /// 事件-删除租户事件
+ /// 事件-删除租户
///
public const string DeleteTenant = "Delete:Tenant";
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs
index 1e476a8f..ac2395cf 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs
@@ -27,7 +27,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
IOptions codeGenOptions)
{
_db = db;
- this._codeGetTemplateRep = codeGetTemplateRep;
+ _codeGetTemplateRep = codeGetTemplateRep;
_codeGenConfigService = codeGenConfigService;
_viewEngine = viewEngine;
_codeGenOptions = codeGenOptions.Value;
@@ -713,6 +713,9 @@ public class SysCodeGenService : IDynamicApiController, ITransient
}
await _db.Insertable(menus).ExecuteCommandAsync();
+
+ // 删除角色菜单按钮缓存
+ App.GetRequiredService().RemoveByPrefixKey(CacheConst.KeyUserApi);
}
///
diff --git a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs
index f5bb5388..840ee077 100644
--- a/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs
@@ -258,7 +258,7 @@ public class SysTenantService : IDynamicApiController, ITransient
};
await _sysRoleMenuService.GrantRoleMenu(new RoleMenuInput() { Id = newRole.Id, MenuIdList = menuIdList });
- //发布新增租户事件
+ // 发布新增租户事件
await _eventPublisher.PublishAsync(CommonConst.InitTenant, tenant);
}
@@ -302,7 +302,7 @@ public class SysTenantService : IDynamicApiController, ITransient
await _sysPosRep.AsDeleteable().Where(u => u.TenantId == input.Id).ExecuteCommandAsync();
- //发布删除租户事件
+ // 发布删除租户事件
await _eventPublisher.PublishAsync(CommonConst.DeleteTenant, input);
}