/// <summary> /// 更新模块信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task <ActionResult> UpdateModule(CarProductsHomePageModuleConfig model) { if (model.PKID <= 0) { return(Json(false)); } var result = _manager.UpdateHomePageModuleConfig(model); if (result) { using (var client = new ConfigLogClient()) { client.InsertDefaultLogQueue("CommonConfigLog", JsonConvert.SerializeObject(new { ObjectId = model.PKID, ObjectType = "CarProductsModule", BeforeValue = JsonConvert.SerializeObject(model), AfterValue = "", Remark = "更新", Creator = User.Identity.Name, })); } using (var client = new RefreshClient()) { var refResult = await client.RefreshSelectHomePageConfigAsync(); refResult.ThrowIfException(true); return(Json(refResult.Result)); } } return(Json(result)); }
/// <summary> /// 刷新缓存 /// </summary> /// <returns></returns> public async Task <ActionResult> RefreshHomePageConfig() { using (var client = new RefreshClient()) { var result = await client.RefreshSelectHomePageConfigAsync(); result.ThrowIfException(true); return(Json(result.Result)); } }