|  |  |  | 
|---|
|  |  |  | using Microsoft.AspNetCore.Authorization; | 
|---|
|  |  |  | using Microsoft.AspNetCore.Mvc; | 
|---|
|  |  |  | using System; | 
|---|
|  |  |  | using System.Collections.Generic; | 
|---|
|  |  |  | using System.Threading.Tasks; | 
|---|
|  |  |  | using Volo.Abp.AspNetCore.Mvc; | 
|---|
|  |  |  | using Volo.Abp.Identity; | 
|---|
|  |  |  | 
|---|
|  |  |  | [HttpPost] | 
|---|
|  |  |  | public async Task<Guid> CreateBackClientUser(CreateBackClientUserInput input) | 
|---|
|  |  |  | { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return await _accountService.CreateAccount(ObjectMapper.Map<CreateBackClientUserInput, CreateAccountInput>(input), isAdminCreate: true); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | PhoneNumber = input.PhoneNumber, | 
|---|
|  |  |  | UserName = input.UserName, | 
|---|
|  |  |  | RoleNames = input.RoleNames, | 
|---|
|  |  |  | Password = input.Password, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// 获取用户账号详情 | 
|---|
|  |  |  | /// </summary> | 
|---|
|  |  |  | /// <returns></returns> | 
|---|
|  |  |  | [HttpGet] | 
|---|
|  |  |  | public async Task<BackClientUserInfoOutput> GetBackClientUserInfo() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return await _accountService.GetBackClientUserInfo(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|