zhengyuxuan
2025-03-24 537b0bbcb6e531c7f42a4f062ee3cd2da52cd02c
fix:去除创建用户时部门公司限制
2个文件已修改
12 ■■■■ 已修改文件
LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.Application/User/AccountService.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
        /// 备注
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,