/// <summary> /// 系统日志 /// </summary> /// <returns></returns> public IActionResult Logs(string sdate = "", string edate = "") { if (!DateTime.TryParse(sdate, out DateTime sdt)) { sdt = DateTime.Now.AddDays(-30); } if (!DateTime.TryParse(edate, out DateTime edt)) { edt = DateTime.Now; } if (edt < sdt) { return(ShowError("查询条件不正确,结束时间不能小于开始时间")); } var logs = actionLog.GetLogs(sdt, edt); return(View(logs)); }