From 257d09aff7ec7b858b037607869d23ec61ac75bc Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期二, 19 八月 2025 09:03:49 +0800
Subject: [PATCH] 1
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs | 26 +++++---------------------
1 files changed, 5 insertions(+), 21 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs"
index ebb2da4..8814ec7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs"
@@ -7,6 +7,7 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Caches;
@@ -39,7 +40,7 @@
List<string> cacheDicNos = new List<string>();
foreach (string n in dicNos)
{
- string str = _cacheService.Get(n);
+ string? str = _cacheService.Get(n);
if (!string.IsNullOrEmpty(str))
{
VueDictionaryDTO? vueDictionary = JsonConvert.DeserializeObject<VueDictionaryDTO>(str);
@@ -75,14 +76,15 @@
{
Config = v.Config,
DicNo = v.DicNo,
- Data = BaseDal.QueryDynamicDataBySql(v.DBSql)
+ Data = BaseDal.QueryDynamicDataBySql(v.DBSql),
+ SaveCache = false,
});
}
}
foreach (var item in selectDics)
{
- if (!_cacheService.Exists(item.DicNo))
+ if (!_cacheService.Exists(item.DicNo) && item.SaveCache)
{
_cacheService.Add(item.DicNo, item.Serialize());
}
@@ -90,25 +92,7 @@
vueDictionaryDTOs.AddRange(selectDics);
}
- //object GetSourceData(string dicNo, string dbSql, object data)
- //{
- // if (string.IsNullOrEmpty(dbSql))
- // {
- // return data;
- // }
- // return BaseDal.QueryObjectDataBySql(dbSql, null);
- //}
- //List<VueDictionaryDTO> vueDictionaryDTOs = dicConfig.Select(item => new VueDictionaryDTO
- //{
- // DicNo = item.dicNo,
- // Config = item.config,
- // Data = GetSourceData(item.dicNo, item.dbSql, item.list)
- //}).ToList();
-
-
return vueDictionaryDTOs;
}
-
-
}
}
--
Gitblit v1.9.3