From 88037202a8ef8b836dd432244d190bfb47c104a9 Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Sun, 25 Nov 2018 14:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9AException?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6DateTime?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=9B=B4=E6=94=B9=E4=B8=BA=E5=8F=AF=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Query/QueryExceptionOption.cs | 8 ++++---- Bootstrap.Admin/Query/QueryLogOption.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Bootstrap.Admin/Query/QueryExceptionOption.cs b/Bootstrap.Admin/Query/QueryExceptionOption.cs index d0824737..d41556fe 100644 --- a/Bootstrap.Admin/Query/QueryExceptionOption.cs +++ b/Bootstrap.Admin/Query/QueryExceptionOption.cs @@ -13,11 +13,11 @@ namespace Bootstrap.Admin.Query /// /// /// - public DateTime StartTime { get; set; } + public DateTime? StartTime { get; set; } /// /// /// - public DateTime EndTime { get; set; } + public DateTime? EndTime { get; set; } /// /// /// @@ -27,11 +27,11 @@ namespace Bootstrap.Admin.Query var data = ExceptionsHelper.RetrieveExceptions(); if (StartTime > DateTime.MinValue) { - data = data.Where(t => t.LogTime > StartTime); + data = data.Where(t => t.LogTime > StartTime.Value); } if (EndTime > DateTime.MinValue) { - data = data.Where(t => t.LogTime < EndTime.AddDays(1)); + data = data.Where(t => t.LogTime < EndTime.Value.AddDays(1)); } var ret = new QueryData(); ret.total = data.Count(); diff --git a/Bootstrap.Admin/Query/QueryLogOption.cs b/Bootstrap.Admin/Query/QueryLogOption.cs index c3f22150..6c718bff 100644 --- a/Bootstrap.Admin/Query/QueryLogOption.cs +++ b/Bootstrap.Admin/Query/QueryLogOption.cs @@ -17,11 +17,11 @@ namespace Bootstrap.Admin.Query /// /// /// - public DateTime OperateTimeStart { get; set; } + public DateTime? OperateTimeStart { get; set; } /// /// /// - public DateTime OperateTimeEnd { get; set; } + public DateTime? OperateTimeEnd { get; set; } /// /// /// @@ -40,7 +40,7 @@ namespace Bootstrap.Admin.Query } if (OperateTimeEnd > DateTime.MinValue) { - data = data.Where(t => t.LogTime < OperateTimeEnd.AddDays(1)); + data = data.Where(t => t.LogTime < OperateTimeEnd.Value.AddDays(1)); } var ret = new QueryData();