Browse Source

323

master
fyf 2 years ago
parent
commit
af5e289082
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      DataVAPI.ServerDB/MongoDB/MongodbHelper.cs

+ 7
- 7
DataVAPI.ServerDB/MongoDB/MongodbHelper.cs View File

@@ -147,14 +147,14 @@ namespace DataVAPI.ServerDB.MongoDB
{
if (datastop >= datesta && datastop > DateTime.Parse("2011-10-11 00:00:00"))
{
if (string.IsNullOrEmpty(deviceId))
{
//if (string.IsNullOrEmpty(deviceId))
//{
return collection.Find(a => a.ClientId == clientId && a.CreateTime >= datesta && a.CreateTime <= datastop)?.ToList().OrderByDescending(a => a.CreateTime).ToList();
}
else
{
return collection.Find(a => a.ClientId == clientId && a.DeviceId == deviceId && a.CreateTime >= datesta && a.CreateTime <= datastop)?.ToList().OrderByDescending(a => a.CreateTime).ToList();
}
//}
//else
//{
// return collection.Find(a => a.ClientId == clientId && a.DeviceId == deviceId && a.CreateTime >= datesta && a.CreateTime <= datastop)?.ToList().OrderByDescending(a => a.CreateTime).ToList();
//}
}
else
{


Loading…
Cancel
Save