feat: 新增VIP过期自动卸载功能
- 新增`AiRechargeManager`类,实现VIP过期用户的自动卸载逻辑。 - 新增`AiHubConst`常量类,统一管理角色名称。 - 在`IRoleService`中添加`RemoveUserRoleByRoleCodeAsync`方法,用于移除指定用户的角色。 - 在`RoleManager`中实现`RemoveUserRoleByRoleCodeAsync`方法。 - 优化`CurrentExtensions`中VIP角色判断逻辑,使用常量替代硬编码。 - 调整`YiAbpWebModule`中部分代码格式,提升可读性。
This commit is contained in:
@@ -77,23 +77,23 @@ namespace Yi.Abp.Web
|
||||
PreConfigure<AbpAspNetCoreMvcOptions>(options =>
|
||||
{
|
||||
options.ConventionalControllers.Create(typeof(YiAbpApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "default");
|
||||
option => option.RemoteServiceName = "default");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkRbacApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "rbac");
|
||||
option => option.RemoteServiceName = "rbac");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkBbsApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "bbs");
|
||||
option => option.RemoteServiceName = "bbs");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkChatHubApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "chat-hub");
|
||||
option => option.RemoteServiceName = "chat-hub");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkTenantManagementApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "tenant-management");
|
||||
option => option.RemoteServiceName = "tenant-management");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkCodeGenApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "code-gen");
|
||||
option => option.RemoteServiceName = "code-gen");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkDigitalCollectiblesApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "digital-collectibles");
|
||||
option => option.RemoteServiceName = "digital-collectibles");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkStockApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "ai-stock");
|
||||
option => option.RemoteServiceName = "ai-stock");
|
||||
options.ConventionalControllers.Create(typeof(YiFrameworkAiHubApplicationModule).Assembly,
|
||||
options => options.RemoteServiceName = "ai-hub");
|
||||
option => option.RemoteServiceName = "ai-hub");
|
||||
//统一前缀
|
||||
options.ConventionalControllers.ConventionalControllerSettings.ForEach(x => x.RootPath = "api/app");
|
||||
});
|
||||
@@ -105,12 +105,12 @@ namespace Yi.Abp.Web
|
||||
var host = context.Services.GetHostingEnvironment();
|
||||
var service = context.Services;
|
||||
|
||||
//本地开发环境,禁用作业执行
|
||||
//本地开发环境,可以禁用作业执行
|
||||
if (host.IsDevelopment())
|
||||
{
|
||||
Configure<AbpBackgroundWorkerOptions> (options =>
|
||||
{
|
||||
options.IsEnabled = false;
|
||||
options.IsEnabled = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user