using BaseService.Controllers; using BaseService.Systems.UserManagement; using BaseService.Systems.UserManagement.Dto; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using System; using System.Runtime.InteropServices; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Identity; namespace BaseService.HttpApi.Systems { [Area("base")] [Route("api/base/user")] public class UserController: BaseServiceController,IUserAppService { private readonly IUserAppService _userAppService; public UserController(IUserAppService userAppService) { _userAppService = userAppService; } /// /// 获取当前登录用户信息 /// /// [HttpGet] [Route("current")] public async Task GetCurrentUserAsync() { return await _userAppService.GetCurrentUserAsync(); } /// /// 重置密码功能 /// /// /// [HttpPut] [Route("{userId}/reset-password")] public async Task ResetPasswordAsync(Guid userId) { return await _userAppService.ResetPasswordAsync(userId); } [HttpPost] public Task Create(BaseIdentityUserCreateDto input) { return _userAppService.Create(input); } [HttpGet] [Route("{id}")] public Task Get(Guid id) { return _userAppService.Get(id); } [HttpGet] public Task> GetAll(GetBaseIdentityUsersInput input) { return _userAppService.GetAll(input); } [HttpPut] [Route("{id}")] public Task UpdateAsync(Guid id, BaseIdentityUserUpdateDto input) { return _userAppService.UpdateAsync(id, input); } } }