From 9719a7f0ccbb70e4e51a93cbe1733d1424c16f6d Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期五, 06 十二月 2024 12:03:56 +0800
Subject: [PATCH] 优化Api数据库缓存模块,增加MES岗位缓存跟不良代码缓存

---
 Tiger.Controllers.System/Controllers/Base/CacheController.SysParam.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Tiger.Controllers.System/Controllers/Base/CacheController.SysParam.cs b/Tiger.Controllers.System/Controllers/Base/CacheController.SysParam.cs
index f628c39..156a085 100644
--- a/Tiger.Controllers.System/Controllers/Base/CacheController.SysParam.cs
+++ b/Tiger.Controllers.System/Controllers/Base/CacheController.SysParam.cs
@@ -4,6 +4,7 @@
 using Tiger.IBusiness;
 using System.Linq;
 using System.Threading.Tasks;
+using Tiger.Api.DbCache;
 
 namespace Tiger.Api.Controllers.Base
 {
@@ -21,7 +22,7 @@
             ApiAction response;
             try
             {
-                response = action.GetResponse(DI.Resolve<IDbCacheBus>().GetSysParamCache()[action.Data?.ToString() ?? ""]);
+                response = action.GetResponse(Cache.SysParam[action.Data?.ToString() ?? ""]);
             }
             catch (System.Exception ex)
             {
@@ -42,7 +43,7 @@
             ApiAction response;
             try
             {
-                response = action.GetResponse(DI.Resolve<IDbCacheBus>().GetSysParamCache().Groups.FirstOrDefault(q => q.PRMG_CODE == (action.Data?.ToString() ?? "")));
+                response = action.GetResponse(Cache.SysParam.Groups.FirstOrDefault(q => q.PRMG_CODE == (action.Data?.ToString() ?? "")));
             }
             catch (Exception ex)
             {
@@ -63,7 +64,7 @@
             ApiAction response;
             try
             {
-                response = action.GetResponse(DI.Resolve<IDbCacheBus>().GetSysParamCache().Groups.Where(q => q.PRMG_TYPE == (action.Data?.ToString() ?? "")).ToList());
+                response = action.GetResponse(Cache.SysParam.Groups.Where(q => q.PRMG_TYPE == (action.Data?.ToString() ?? "")).ToList());
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3