public bool UpdateGlobalConfig(BargainGlobalConfigModel request) { var oldGlobal = new BargainGlobalConfigModel(); try { oldGlobal = ShareBargainManager.FetchBargainProductGlobalConfig(); } catch (Exception ex) { Logger.Log(Level.Error, $"全局配置修改前获取数据失败ex:{ex}"); } request.QAData = JsonConvert.SerializeObject(request.BargainRule); var result = ShareBargainManager.UpdateGlobalConfig(request); if (result) { using (var client = new ShareBargainClient()) { var refreshResult = client.RefreshShareBargainCache(); if (!refreshResult.Success) { Logger.Log(Level.Warning, $"UpdateGlobalConfig,刷新缓存失败,ErrorMessage:{refreshResult.ErrorMessage}"); } } //操作日志 UpdateGlobalConfiguctLog(oldGlobal, request); } return(result); }
public JsonResult FetchBargainProductGlobalConfig() { return(Json(ShareBargainManager.FetchBargainProductGlobalConfig(), JsonRequestBehavior.AllowGet)); }