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/User/AccountService.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs
index 946210a..11dcf39 100644
--- a/LifePayment/LifePayment.Application/User/AccountService.cs
+++ b/LifePayment/LifePayment.Application/User/AccountService.cs
@@ -78,7 +78,7 @@
                 {
                     await _distributedCache.SetAsync(code, res.OpenId, options: new Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions()
                     {
-                        AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5)
+                        AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(24)
                     });
                 }
 
@@ -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