style: 升级全部包,abp 8.0.5
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Volo.Abp;
|
||||
using Volo.Abp.Caching;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
@@ -24,10 +25,14 @@ namespace Yi.Framework.Bbs.Domain
|
||||
{
|
||||
//加载等级缓存
|
||||
var services = context.ServiceProvider;
|
||||
|
||||
var logger = services.GetRequiredService<ILogger<YiFrameworkBbsDomainModule>>();
|
||||
logger.LogInformation("正在初始化【BBS-等级数据】......");
|
||||
var levelRepository = services.GetRequiredService<IRepository<LevelEntity>>();
|
||||
var levelCache = services.GetRequiredService<IDistributedCache<List<LevelCacheItem>>>();
|
||||
var cacheItem = (await levelRepository.GetListAsync()).Adapt<List<LevelCacheItem>>();
|
||||
await levelCache.SetAsync(LevelConst.LevelCacheKey, cacheItem);
|
||||
logger.LogInformation("已完成初始化【BBS-等级数据】");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user