From 537b0bbcb6e531c7f42a4f062ee3cd2da52cd02c Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期一, 24 三月 2025 19:51:58 +0800 Subject: [PATCH] fix:去除创建用户时部门公司限制 --- LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs | 2 +- LifePayment/LifePayment.Application/User/AccountService.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs b/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs index 386b8ae..ff5a602 100644 --- a/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs +++ b/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs @@ -57,7 +57,7 @@ /// <summary> /// 鐢ㄦ埛鍚� /// </summary> - [RegularExpression(LifePaymentConstant.RegularExpression.UserNameEx, ErrorMessage = "璐﹀彿鏍煎紡涓嶆纭�")] + //[RegularExpression(LifePaymentConstant.RegularExpression.UserNameEx, ErrorMessage = "璐﹀彿鏍煎紡涓嶆纭�")] public string UserName { get; set; } /// <summary> /// 澶囨敞 diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs index f0af87b..11dcf39 100644 --- a/LifePayment/LifePayment.Application/User/AccountService.cs +++ b/LifePayment/LifePayment.Application/User/AccountService.cs @@ -160,11 +160,11 @@ public async Task<Guid> CreateAccount(CreateAccountInput input, bool isSend, bool isAdminCreate = false) { - if (input.ClientId == LifePaymentConstant.ClientId.Back) - { - CheckExtensions.IfTrueThrowUserFriendlyException(!input.CompanyOrgId.HasValue || !input.DepartmentOrgId.HasValue, - "鎵�灞炲叕鍙稿拰閮ㄩ棬涓嶈兘涓虹┖"); - } + //if (input.ClientId == LifePaymentConstant.ClientId.Back) + //{ + // CheckExtensions.IfTrueThrowUserFriendlyException(!input.CompanyOrgId.HasValue || !input.DepartmentOrgId.HasValue, + // "鎵�灞炲叕鍙稿拰閮ㄩ棬涓嶈兘涓虹┖"); + //} var any = await _userRepository.Where(x => x.PhoneNumber == input.PhoneNumber && x.ClientId == input.ClientId).AnyAsync(); CheckExtensions.IfTrueThrowUserFriendlyException(any, -- Gitblit v1.9.1