feat: 优化首页样式

This commit is contained in:
橙子
2024-08-09 00:39:39 +08:00
parent 29f9cb6b4a
commit 07d82e508e
6 changed files with 138 additions and 62 deletions

View File

@@ -23,16 +23,6 @@ namespace Yi.Framework.Bbs.Domain
{
public override async Task OnPostApplicationInitializationAsync(ApplicationInitializationContext context)
{
//加载等级缓存
var services = context.ServiceProvider;
var logger = services.GetRequiredService<ILogger<YiFrameworkBbsDomainModule>>();
logger.LogInformation("正在初始化【BBS-等级数据】......");
var levelRepository = services.GetRequiredService<IRepository<LevelAggregateRoot>>();
var levelCache = services.GetRequiredService<IDistributedCache<List<LevelCacheItem>>>();
var cacheItem = (await levelRepository.GetListAsync()).Adapt<List<LevelCacheItem>>();
await levelCache.SetAsync(LevelConst.LevelCacheKey, cacheItem);
logger.LogInformation("已完成初始化【BBS-等级数据】");
}
}
}