feat:增加内存刷新接口,优化rule日志记录,不再使用EXception。非ACTIVE的rule不再编译。
This commit is contained in:
@@ -568,6 +568,30 @@ 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")]
|
||||
|
||||
@@ -2480,7 +2480,7 @@ namespace YLErp.Web.Controllers
|
||||
{
|
||||
return JsonSuccessData(new { proccessType = "AdditionalProcessing", type = tradeBLL.LackOfMoney, TrialDataId = result.TrialDataId, message = result.errorMsg, typecode = result.type });
|
||||
}
|
||||
//限额试算不通过(老风控检查失败),展示详情但不允许审批
|
||||
//限额试算不通过(老风控,新风控检查失败),展示详情但不允许审批
|
||||
if (result.type == TradeOpenRetCode.QuotaTrialError.ToString())
|
||||
{
|
||||
return JsonSuccessData(new { proccessType = "QuotaTrialError", TrialDataId = result.TrialDataId, message = result.errorMsg, typecode = result.type });
|
||||
|
||||
Reference in New Issue
Block a user