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); }