From 68af68bf2993e1c29b9165f549723701fe03a509 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期三, 19 三月 2025 17:02:16 +0800 Subject: [PATCH] 合并 --- LifePayment/LifePayment.Application/User/AccountService.cs | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs index 0837679..2c46855 100644 --- a/LifePayment/LifePayment.Application/User/AccountService.cs +++ b/LifePayment/LifePayment.Application/User/AccountService.cs @@ -134,7 +134,7 @@ return result; } - public async Task<Guid> CreateAccount(CreateAccountInput input, bool isSend, bool isAdminCreate = false, string password = null) + public async Task<Guid> CreateAccount(CreateAccountInput input, bool isSend, bool isAdminCreate = false) { if (input.ClientId == LifePaymentConstant.ClientId.Back) { @@ -146,8 +146,10 @@ CheckExtensions.IfTrueThrowUserFriendlyException(any, CustomeErrorMessage.PhoneNumberRepeatSaveFail); - password ??= GlobalRandom.GetRandomPassword(); + /// input.Password ??= GlobalRandom.GetRandomPassword(); + CheckExtensions.IfTrueThrowUserFriendlyException(string.IsNullOrEmpty(input.Password), + "璇疯緭鍏ュ瘑鐮�"); var res = await _identityUserService.CreateAsync(new IdentityUserCreateDto { Name = input.Name, @@ -155,7 +157,7 @@ UserName = input.UserName, RoleNames = input.RoleNames, ClientId = input.ClientId, - Password = password, + Password = input.Password, }); var user = await _userRepository.InsertAsync(new User { -- Gitblit v1.9.1