Browse Source

用户签名缓存

master
wxd 9 months ago
parent
commit
ff0d60498c
  1. 6
      src/Shentun.Peis.Domain/CacheService.cs

6
src/Shentun.Peis.Domain/CacheService.cs

@ -203,7 +203,11 @@ namespace Shentun.Peis
var userExtension = (IdentityUserWithExtensionDto)_userExtensionCache.Get(cacheKey);
if (userExtension == null)
{
var userEntity = await _userRepository.GetAsync(o => o.Id == id);
var userEntity = await _userRepository.FirstOrDefaultAsync(o => o.Id == id);
if (userEntity == null)
{
return "";
}
var userSign = userEntity.GetProperty<string>("user_sign");
var userPhoto = userEntity.GetProperty<string>("user_photo");
userExtension = new IdentityUserWithExtensionDto

Loading…
Cancel
Save