|
|
@ -3,6 +3,7 @@ using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Account; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
using Volo.Abp.Identity; |
|
|
|
using Win_in.Sfs.Auth.Domain; |
|
|
@ -15,13 +16,15 @@ namespace Win_in.Sfs.Auth.Users; |
|
|
|
public class SfsUserAppService : ApplicationService, ISfsUserAppService |
|
|
|
{ |
|
|
|
private readonly IIdentityUserRepository _userRepository; |
|
|
|
private readonly IProfileAppService _profileAppService; |
|
|
|
protected readonly IdentityUserManager _userManager; |
|
|
|
public SfsUserAppService( |
|
|
|
IIdentityUserRepository userRepository, |
|
|
|
IdentityUserManager userManager |
|
|
|
) |
|
|
|
IdentityUserManager userManager, |
|
|
|
IProfileAppService profileAppService) |
|
|
|
{ |
|
|
|
_userManager = userManager; |
|
|
|
_profileAppService = profileAppService; |
|
|
|
_userRepository = userRepository; |
|
|
|
} |
|
|
|
|
|
|
@ -77,4 +80,18 @@ public class SfsUserAppService : ApplicationService, ISfsUserAppService |
|
|
|
return userresult; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 修改密码
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="userId"></param>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("change-password/{userId}")] |
|
|
|
public virtual async Task ChangePasswordAsync(Guid userId,ChangePasswordInput input) |
|
|
|
{ |
|
|
|
var user=await _userManager.GetByIdAsync(userId); |
|
|
|
var ttt = user.PasswordHash; |
|
|
|
var t=await _userManager.ResetPasswordAsync(user, input.CurrentPassword, input.NewPassword); |
|
|
|
} |
|
|
|
} |
|
|
|