From 69e9ce6ae24fce670fb8d7af0e1f132e2e009dbc Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期三, 12 七月 2023 13:44:21 +0800
Subject: [PATCH] 提交

---
 zhengcaioa/Services/IntentionCustomerService.cs |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/zhengcaioa/Services/IntentionCustomerService.cs b/zhengcaioa/Services/IntentionCustomerService.cs
index 9c77a76..41c2739 100644
--- a/zhengcaioa/Services/IntentionCustomerService.cs
+++ b/zhengcaioa/Services/IntentionCustomerService.cs
@@ -142,9 +142,9 @@
 
                 var listPosition = _context.IntentionCustomers.Where(r => r.RecStatus == "A").ToList();
 
-              var  intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition);
-                CacheHelperNetCore.CacheInsert("intentionCustomerDTOs", intentionCustomerDTOs);
-
+                // var  intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition);
+                //CacheHelperNetCore.CacheInsert("intentionCustomerDTOs", intentionCustomerDTOs);
+                CacheHelperNetCore.CacheNull("intentionCustomerDTOs");
                 resultEntity.ReturnID = intentionCustomer.Id;
             resultEntity.Result = true;
         }
@@ -527,8 +527,9 @@
         /// <returns></returns>
         public List<IntentionCustomerDTO> GetList(string huiyuanId = null)
         {
+
+
             List<IntentionCustomerDTO> intentionCustomerDTOs = (List<IntentionCustomerDTO>)CacheHelperNetCore.CacheValue("intentionCustomerDTOs");
-             
 
             if (intentionCustomerDTOs != null && intentionCustomerDTOs.Count > 0)
             {
@@ -537,22 +538,18 @@
                     intentionCustomerDTOs = intentionCustomerDTOs.Where(x => x.HuiyuanId == huiyuanId).ToList();
                 }
 
-                
                 return intentionCustomerDTOs;
             }
 
-
             var listPosition = _context.IntentionCustomers.Where(r => r.RecStatus == "A").ToList();
-
             intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition);
             CacheHelperNetCore.CacheInsert("intentionCustomerDTOs", intentionCustomerDTOs);
 
-
             if (!string.IsNullOrEmpty(huiyuanId))
             {
-                intentionCustomerDTOs = intentionCustomerDTOs.Where(x => x.HuiyuanId == huiyuanId).ToList();
+                listPosition = listPosition.Where(x => x.HuiyuanId == huiyuanId).ToList();
             }
-
+            intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition);
             return intentionCustomerDTOs;
         }
 

--
Gitblit v1.9.1