From 1447caa6b184ee1e80970740e30fa970c3d08a78 Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 31 三月 2025 13:54:38 +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 | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs b/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
index aec1d39..2be205b 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/UserRoleController.cs
@@ -3,6 +3,7 @@
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;
@@ -40,6 +41,8 @@
[HttpPost]
public async Task<Guid> CreateBackClientUser(CreateBackClientUserInput input)
{
+
+
return await _accountService.CreateAccount(ObjectMapper.Map<CreateBackClientUserInput, CreateAccountInput>(input), isAdminCreate: true);
}
@@ -62,6 +65,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,
@@ -70,6 +78,19 @@
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>
@@ -179,5 +200,15 @@
await _identityRoleService.DeleteAsync(id);
return await _userRoleService.DeleteRole(id);
}
+
+ /// <summary>
+ /// 鑾峰彇鐢ㄦ埛璐﹀彿璇︽儏
+ /// </summary>
+ /// <returns></returns>
+ [HttpGet]
+ public async Task<BackClientUserInfoOutput> GetBackClientUserInfo()
+ {
+ return await _accountService.GetBackClientUserInfo();
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1