From 1243f9cdb1ce367af05caabbb71ce81e38d5a1af Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 16 四月 2025 16:16:43 +0800 Subject: [PATCH] 增加一种报名类型 --- zhengcaioa/Services/IntentionCustomerService.cs | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/zhengcaioa/Services/IntentionCustomerService.cs b/zhengcaioa/Services/IntentionCustomerService.cs index d2c17b1..41c2739 100644 --- a/zhengcaioa/Services/IntentionCustomerService.cs +++ b/zhengcaioa/Services/IntentionCustomerService.cs @@ -144,7 +144,7 @@ // var intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition); //CacheHelperNetCore.CacheInsert("intentionCustomerDTOs", intentionCustomerDTOs); - + CacheHelperNetCore.CacheNull("intentionCustomerDTOs"); resultEntity.ReturnID = intentionCustomer.Id; resultEntity.Result = true; } @@ -527,19 +527,29 @@ /// <returns></returns> public List<IntentionCustomerDTO> GetList(string huiyuanId = null) { - + + + List<IntentionCustomerDTO> intentionCustomerDTOs = (List<IntentionCustomerDTO>)CacheHelperNetCore.CacheValue("intentionCustomerDTOs"); + + if (intentionCustomerDTOs != null && intentionCustomerDTOs.Count > 0) + { + if (!string.IsNullOrEmpty(huiyuanId)) + { + 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)) { listPosition = listPosition.Where(x => x.HuiyuanId == huiyuanId).ToList(); } - - var intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition); + intentionCustomerDTOs = _mapper.Map<List<IntentionCustomerDTO>>(listPosition); return intentionCustomerDTOs; } -- Gitblit v1.9.1