From 66381e5dc43f86be6f9057907e3fa7a74d31f4fc Mon Sep 17 00:00:00 2001 From: ruisu Date: Thu, 9 Jul 2026 17:41:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=9C=A8=E7=B3=BB=E7=BB=9F=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=88=B7=E6=96=B0=E5=8A=9F=E8=83=BD=E5=86=85=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A3=8E=E6=8E=A7=E5=BC=95=E6=93=8E=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YLErpWeb/Controllers/RiskRuleController.cs | 24 ---------------------- YLErpWeb/Controllers/SystemController.cs | 3 +++ 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/YLErpWeb/Controllers/RiskRuleController.cs b/YLErpWeb/Controllers/RiskRuleController.cs index c6f238a3..bbb5a6fb 100644 --- a/YLErpWeb/Controllers/RiskRuleController.cs +++ b/YLErpWeb/Controllers/RiskRuleController.cs @@ -568,30 +568,6 @@ namespace YLErp.Web.Controllers #endregion - #region Cache Management - - [HttpGet("riskCache/refresh")] - [MyAuthorize("风险控制-异常交易监控")] - public JsonResult RefreshRiskEngineCache() - { - try - { - RiskEngineService.GetInstance().RefreshCache(); - return Json(new { success = true, message = "风控缓存刷新成功" }); - } - catch (ServiceException ex) - { - return Json(new { success = false, message = ex.Message }); - } - catch (Exception ex) - { - _logger.Error(ex, "刷新风控缓存"); - return Json(new { success = false, message = "系统异常,请联系管理员" }); - } - } - - #endregion - #region Trade Types [HttpGet("trade-types")] diff --git a/YLErpWeb/Controllers/SystemController.cs b/YLErpWeb/Controllers/SystemController.cs index 5b7d0681..1ee0bd83 100644 --- a/YLErpWeb/Controllers/SystemController.cs +++ b/YLErpWeb/Controllers/SystemController.cs @@ -15,6 +15,7 @@ using YLErp.BLL; using YLErp.DBModels; using YLErp.DBModels.Consts; using YLErp.Modules.DictionaryModule; +using YLErp.Modules.RiskEngine; using YLErp.Modules.SystemModule; using YLErp.Web.Models; @@ -1356,6 +1357,8 @@ namespace YLErp.Web.Controllers Providers.MemoryCacheProvider.Default.FlushAll(); Server.CacheProvider.FlushAll(); Modules.DataCacheModule.DataCacheManager.ResetDataCache(); + // 刷新风控引擎缓存 + RiskEngineService.GetInstance().RefreshCache(); return Json(1); }