| | |
| | | [HttpPost] |
| | | public async Task<Guid> CreateBackClientUser(CreateBackClientUserInput input) |
| | | { |
| | | |
| | | |
| | | return await _accountService.CreateAccount(ObjectMapper.Map<CreateBackClientUserInput, CreateAccountInput>(input), isAdminCreate: true); |
| | | } |
| | | |
| | |
| | | [HttpPost] |
| | | public async Task<int> UpdateBackClientUser(UpdateBackClientUserInput input) |
| | | { |
| | | |
| | | var identityUser = await _identityUserService.GetAsync(input.Id); |
| | | |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(identityUser == null, |
| | | "用户不存在"); |
| | | await _identityUserService.UpdateAsync(input.Id, new IdentityUserUpdateDto |
| | | { |
| | | Name = input.Name, |
| | |
| | | RoleNames = input.RoleNames, |
| | | }); |
| | | return await _userRoleService.UpdateBackClientUser(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重置密码 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public virtual async Task<int> ResetUserPassword(ResetPasswordBaseInput input) |
| | | { |
| | | await _userRoleService.ResetPassword(input); |
| | | |
| | | return Constant.SUCCESS; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | await _identityRoleService.DeleteAsync(id); |
| | | return await _userRoleService.DeleteRole(id); |
| | | } |
| | | |
| | | //[HttpGet] |
| | | //public async Task<UserChannelOutput> GetUserChannel() |
| | | //{ |
| | | // return await _accountService.GetUserChannel(); |
| | | //} |
| | | } |
| | | } |