From 7ff298c6834275b63b612af49651673689a39660 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期三, 27 十一月 2024 11:33:18 +0800
Subject: [PATCH] 更新

---
 WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs b/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
index a8bd1b5..90ad0f0 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -48,7 +48,7 @@
                 List<string> cacheDicNos = new List<string>();
                 foreach (string n in dicNos.Where(x => !selectDicNos.Contains(x)))
                 {
-                    string str = _cacheService.Get(n);
+                    string? str = _cacheService.Get(n);
                     if (!string.IsNullOrEmpty(str))
                     {
                         VueDictionaryDTO? vueDictionary = JsonConvert.DeserializeObject<VueDictionaryDTO>(str);
@@ -81,11 +81,11 @@
 
                         foreach (var item in cusDics)
                         {
-                            VueDictionaryDTO vueDictionaryDTO = GetVueDictionary(item.Trim());
+                            VueDictionaryDTO? vueDictionaryDTO = GetVueDictionary(item.Trim());
                             if (vueDictionaryDTO != null)
                             {
                                 vueDictionaryDTOs.Add(vueDictionaryDTO);
-                                if (!_cacheService.Exists(item))
+                                if (!_cacheService.Exists(item) && vueDictionaryDTO.SaveCache)
                                 {
                                     _cacheService.Add(item, vueDictionaryDTO.Serialize());
                                 }
@@ -127,6 +127,8 @@
                                 }
                             }
 
+                            data.Add(new { key = "", value = "鏃�" });
+
                             result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                         }
                         break;

--
Gitblit v1.9.3