From d5fe1b8b4de07a9ceeee5bba65677f5c0b5e9d5d Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 31 三月 2025 10:14:56 +0800 Subject: [PATCH] Merge branch 'dev-lifepay-v1.3' of http://120.26.58.240:8888/r/LifePaymentApi into dev-lifepay-v1.3 --- LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs b/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs index aec1d39..a0e2a9f 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs @@ -40,6 +40,8 @@ [HttpPost] public async Task<Guid> CreateBackClientUser(CreateBackClientUserInput input) { + + return await _accountService.CreateAccount(ObjectMapper.Map<CreateBackClientUserInput, CreateAccountInput>(input), isAdminCreate: true); } @@ -62,6 +64,11 @@ [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, @@ -73,6 +80,19 @@ } /// <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> /// 鍒犻櫎鍚庡彴绠$悊璐︽埛 /// </summary> /// <param name="id">鐢ㄦ埛Id</param> -- Gitblit v1.9.1