public ActionRes Update([FromBody] Update_Sys_Interface_WhiteList_Input model) { var instance = AllServices.SysInterfaceWhiteListService.GetByKey(model.Id); if (instance == null) { throw new Exception($"没有找到指定的数据[{model.Id}]"); } var res = AllServices.SysInterfaceWhiteListService.Update(model); return(ActionRes.Success(res)); }
/// <summary> /// 新增 /// </summary> /// <param name="entity"></param> /// <returns></returns> public Sys_Interface_WhiteList Update(Update_Sys_Interface_WhiteList_Input model) { if (model.Id.IsNullOrEmpty() || model.Appid.IsNullOrEmpty()) { throw new Exception("不能为空"); } Sys_Interface_WhiteList instance = base.GetByKey(model.Id); instance.Update_Time = DateTime.Now; instance.Validity_Time = model.Validity_Time; instance.Remark = model.Remark; base.Update(instance); return(instance); }