|
|
@@ -182,7 +182,7 @@ namespace DataVAPI.ServerDB.MongoDB |
|
|
|
|
|
|
|
public List<T> QueryClientId(string clientId) |
|
|
|
{ |
|
|
|
return collection.Find(a => a.ClientId == clientId && a.CreateTime >= DateTime.Now.Date && a.State == "y")?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); |
|
|
|
return collection.Find(a => a.ClientId == clientId && a.CreateTime >= DateTime.Now.Date)?.ToList().OrderByDescending(a => a.CreateTime)?.ToList(); |
|
|
|
} |
|
|
|
|
|
|
|
public T QueryClientIdMax(string clientId) |
|
|
@@ -201,6 +201,11 @@ namespace DataVAPI.ServerDB.MongoDB |
|
|
|
return collection.Find(a => a.State.Equals("y"))?.ToList(); |
|
|
|
} |
|
|
|
|
|
|
|
public T QueryKeyID(string key) |
|
|
|
{ |
|
|
|
return collection.Find(a => a.KeyID== key)?.ToList().FirstOrDefault(); |
|
|
|
} |
|
|
|
|
|
|
|
public PaginationListModel<T> BasePagQuery(string clientId, string deviceId, DateTime datesta, DateTime datastop, int PageNumber, int PageSize) |
|
|
|
{ |
|
|
|
BasePaginationModel pagination = new BasePaginationModel() |
|
|
@@ -261,6 +266,10 @@ namespace DataVAPI.ServerDB.MongoDB |
|
|
|
/// </summary> |
|
|
|
[BsonDateTimeOptions(Kind = DateTimeKind.Local)] |
|
|
|
public DateTime UpdateTime { get; set; } |
|
|
|
/// <summary> |
|
|
|
/// key |
|
|
|
/// </summary> |
|
|
|
public string KeyID { get; set; } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|