Selaa lähdekoodia

Revert "增加只查3天内数据"

This reverts commit ed0a9a172a.
master
fyf 2 vuotta sitten
vanhempi
commit
7334e965ff
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. +3
    -3
      DataVAPI.ServerDB/MongoDB/MongodbHelper.cs

+ 3
- 3
DataVAPI.ServerDB/MongoDB/MongodbHelper.cs Näytä tiedosto

@@ -211,7 +211,7 @@ namespace DataVAPI.ServerDB.MongoDB

public List<T> 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<T> 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<T> 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<T> 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<T> QueryAll()


Ladataan…
Peruuta
Tallenna