From 9f3ead22a8198d33891a0f8f23faec15dcfc731a Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期五, 25 七月 2025 09:10:11 +0800
Subject: [PATCH] no message

---
 Admin.NET/FZCTB.NET.API.Application/User/CustomerService.cs |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Admin.NET/FZCTB.NET.API.Application/User/CustomerService.cs b/Admin.NET/FZCTB.NET.API.Application/User/CustomerService.cs
index de4747c..9c5cf91 100644
--- a/Admin.NET/FZCTB.NET.API.Application/User/CustomerService.cs
+++ b/Admin.NET/FZCTB.NET.API.Application/User/CustomerService.cs
@@ -51,12 +51,14 @@
     /// 
     /// </summary>
     public CustomerService(SysCacheService cacheService, CustomerManagerS managerS,SqlSugarRepository<FBS_Customer>  repository
-        , SqlSugarRepository<FBS_EnterpriseType> fbsenrep,IMapper mapper )
+        , SqlSugarRepository<FBS_EnterpriseType> fbsenrep,IMapper mapper,SqlSugarRepository<FBS_ExRole> exroles , SqlSugarRepository<FBS_CusExtend> cusrep)
     {
         _sysCacheService= cacheService;
          _customerManager = managerS;
         _fBS_CustomerRep = repository;
         _fBS_EnterpriseTypeRep = fbsenrep;
+        _fBS_ExRoleRep = exroles;
+        _fBS_CusExtendRep = cusrep;
         _mapper = mapper;
     }
 
@@ -144,7 +146,7 @@
     [AllowAnonymous]
     public async Task<List<EnterpriseTypeVM>> EnterpriseTypes()
     {
-        return await _fBS_EnterpriseTypeRep.AsQueryable().Select<EnterpriseTypeVM>().ToTreeAsync(x=>x.Child,x=>x.ParentId,null,x=>x.Id);
+        return await _fBS_EnterpriseTypeRep.AsQueryable().Select<EnterpriseTypeVM>().ToTreeAsync(x=>x.Child,x=>x.ParentId,0,x=>x.Id);
     }
 
     /// <summary>
@@ -172,7 +174,7 @@
             throw Oops.Oh("浜ゆ槗涓讳綋涓嶅瓨鍦�");
         }
 
-        if(user.CoutomerExRols.Any(x=>x.ExRole.Code==cusExtend.TransactionCode&& x.HasFlsh==true))
+        if(user.CoutomerExRols?.Any(x=>x.ExRole.Code==cusExtend.TransactionCode&& x.HasFlsh==true)==true)
         {
             throw Oops.Oh("鐢ㄦ埛宸茬粡娉ㄥ唽浜嗚涓讳綋");
         }
@@ -291,13 +293,13 @@
             tab.RegisteredCapital = tab.RegisteredCapital;
             tab.Residence = tab.Residence;
             tab.MainBusiness = InParam.MainBusiness;
-            tab.EnterpriseType = InParam.EnterpriseType;
+           
             tab.EnterpriseName = InParam.EnterpriseName;
             tab.BusinessLicense = InParam.BusinessLicense;
             //閲嶆柊瀹℃牳?
             tab.steps = CusExtendStep.Change;
         }
-      
+        tab.EnterpriseType = InParam.EnterpriseType;
 
         //鑱旂郴鐢佃瘽
         tab.EnterprisePhone = InParam.EnterprisePhone;
@@ -315,6 +317,7 @@
             tab.OperatorName = InParam.OperatorName;
             tab.OperatorPhone = InParam.OperatorPhone;
         }
+       
 
         return await _fBS_CusExtendRep.UpdateAsync(tab);
 

--
Gitblit v1.9.1