From 7334e965ff52f763562db01d18ae2e179f0f94ab Mon Sep 17 00:00:00 2001 From: fyf Date: Wed, 1 Jun 2022 11:58:51 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=A2=9E=E5=8A=A0=E5=8F=AA=E6=9F=A53?= =?UTF-8?q?=E5=A4=A9=E5=86=85=E6=95=B0=E6=8D=AE"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ed0a9a172a2ff2dbdd4f9508b038ab4a90f147b4. --- DataVAPI.ServerDB/MongoDB/MongodbHelper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DataVAPI.ServerDB/MongoDB/MongodbHelper.cs b/DataVAPI.ServerDB/MongoDB/MongodbHelper.cs index de4cda4..71c208c 100644 --- a/DataVAPI.ServerDB/MongoDB/MongodbHelper.cs +++ b/DataVAPI.ServerDB/MongoDB/MongodbHelper.cs @@ -211,7 +211,7 @@ namespace DataVAPI.ServerDB.MongoDB public List QueryClientIdName(string clientId,string name) { - return collection.Find(a => a.ClientId == clientId && a.devicename==name && a.CreateTime >= DateTime.Now.Date)?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); + return collection.Find(a => a.ClientId == clientId && a.devicename==name)?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); } public T QueryClientIdMax(string clientId) @@ -222,13 +222,13 @@ namespace DataVAPI.ServerDB.MongoDB public T QueryClientIdMaxName(string clientId,string name) { - List clo = collection.Find(a => a.ClientId == clientId && a.devicename==name && a.CreateTime >= DateTime.Now.AddDays(-3).Date && a.State == "y")?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); + List clo = collection.Find(a => a.ClientId == clientId && a.devicename==name && a.State == "y")?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); return clo.Count > 0 ? clo[0] : null; } public List QueryDeviceId(string clientId, string deviceId) { - return collection.Find(a => a.DeviceId == deviceId && a.ClientId == clientId && a.CreateTime >= DateTime.Now.AddDays(-3).Date && a.State == "y")?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); + return collection.Find(a => a.DeviceId == deviceId && a.ClientId == clientId && a.CreateTime >= DateTime.Now.Date && a.State == "y")?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); } public List QueryAll()