style: 添加信息打印
This commit is contained in:
@@ -27,11 +27,10 @@ namespace Yi.Framework.Rbac.Application.Services.System
|
||||
public class UserService : YiCrudAppService<UserEntity, UserGetOutputDto, UserGetListOutputDto, Guid, UserGetListInputVo, UserCreateInputVo, UserUpdateInputVo>,IUserService
|
||||
//IUserService
|
||||
{
|
||||
private IDistributedCache<UserInfoCacheItem, UserInfoCacheKey> _userCache;
|
||||
public UserService(ISqlSugarRepository<UserEntity, Guid> repository, UserManager userManager, IUserRepository userRepository, ICurrentUser currentUser, IDeptService deptService, ILocalEventBus localEventBus, IDistributedCache<UserInfoCacheItem, UserInfoCacheKey> userCache) : base(repository)
|
||||
=>
|
||||
(_userManager, _userRepository, _currentUser, _deptService, _repository, _localEventBus, _userCache) =
|
||||
(userManager, userRepository, currentUser, deptService, repository, localEventBus, userCache);
|
||||
(_userManager, _userRepository, _currentUser, _deptService, _repository, _localEventBus) =
|
||||
(userManager, userRepository, currentUser, deptService, repository, localEventBus);
|
||||
private UserManager _userManager { get; set; }
|
||||
private ISqlSugarRepository<UserEntity, Guid> _repository;
|
||||
private IUserRepository _userRepository { get; set; }
|
||||
@@ -171,9 +170,6 @@ namespace Yi.Framework.Rbac.Application.Services.System
|
||||
var res1 = await _repository.UpdateAsync(entity);
|
||||
await _userManager.GiveUserSetRoleAsync(new List<Guid> { id }, input.RoleIds);
|
||||
await _userManager.GiveUserSetPostAsync(new List<Guid> { id }, input.PostIds);
|
||||
|
||||
await _userCache.RefreshAsync(new UserInfoCacheKey(_currentUser.GetId()));
|
||||
|
||||
return await MapToGetOutputDtoAsync(entity);
|
||||
}
|
||||
|
||||
@@ -190,7 +186,6 @@ namespace Yi.Framework.Rbac.Application.Services.System
|
||||
|
||||
await _repository.UpdateAsync(entity);
|
||||
var dto = await MapToGetOutputDtoAsync(entity);
|
||||
await _userCache.RefreshAsync(new UserInfoCacheKey(_currentUser.GetId()));
|
||||
return dto;
|
||||
}
|
||||
|
||||
@@ -212,7 +207,6 @@ namespace Yi.Framework.Rbac.Application.Services.System
|
||||
}
|
||||
entity.State = state;
|
||||
await _repository.UpdateAsync(entity);
|
||||
await _userCache.RefreshAsync(new UserInfoCacheKey(id));
|
||||
return await MapToGetOutputDtoAsync(entity);
|
||||
}
|
||||
[OperLog("删除用户", OperEnum.Delete)]
|
||||
@@ -221,7 +215,6 @@ namespace Yi.Framework.Rbac.Application.Services.System
|
||||
{
|
||||
|
||||
await base.DeleteAsync(id);
|
||||
await _userCache.RefreshAsync(new UserInfoCacheKey(id));
|
||||
}
|
||||
|
||||
[Permission("system:user:export")]
|
||||
|
||||
Reference in New Issue
Block a user