Merge branch 'refs/heads/abp' into digital-collectibles

This commit is contained in:
橙子
2024-11-10 17:33:34 +08:00
2 changed files with 8 additions and 3 deletions

View File

@@ -78,7 +78,12 @@ namespace Yi.Framework.ChatHub.Domain.Managers
public async Task<ChatOnlineUserCacheItem?> GetUserAsync(Guid userId)
{
var key = new ChatOnlineUserCacheKey(CacheKeyPrefix);
var cacheUser = System.Text.Json.JsonSerializer.Deserialize<ChatOnlineUserCacheItem>(await RedisClient.HGetAsync(key.GetKey(), key.GetField(userId)));
var cacheUserOrNull= await RedisClient.HGetAsync(key.GetKey(), key.GetField(userId));
if (cacheUserOrNull is null)
{
return null;
}
var cacheUser = System.Text.Json.JsonSerializer.Deserialize<ChatOnlineUserCacheItem>(cacheUserOrNull);
return cacheUser;
}
}

View File

@@ -76,8 +76,8 @@ namespace Yi.Abp.Web
{
//默认关闭,开启会有大量的审计日志
optios.IsEnabled = true;
//审计日志过滤器
optios.AlwaysLogSelectors.Add(x => Task.FromResult(!x.Url.StartsWith("/api/app/file/")));
//审计日志过滤器,符合条件的才记录
optios.AlwaysLogSelectors.Add(x => Task.FromResult(x.Url is null?true:!x.Url.StartsWith("/api/app/file/")));
});
//采用furion格式的规范化api默认不开启使用abp优雅的方式