zhengyuxuan
2025-04-02 2b6e63ae8a4af6f612e431c57d2f2f08fb9b9135
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);
        }
@@ -73,9 +76,21 @@
                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>
@@ -185,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();
        }
    }
}