|
@@ -134,7 +134,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
}
|
|
|
//老師個人試題
|
|
|
List<object> items = new List<object>();
|
|
|
- await foreach (var item in client.GetContainer("TEAMModelOSTemp", "Teacher").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.blob, c.type, c.points, c.field, c.subjectName, c.level, c.usageCount, c.scope from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Item-{id}") }))
|
|
|
+ await foreach (var item in client.GetContainer("TEAMModelOSTemp", "Teacher").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.blob, c.type, c.points, c.field, c.subjectName, c.level, c.useCount, c.createDate from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Item-{id}") }))
|
|
|
{
|
|
|
using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
@@ -147,7 +147,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
}
|
|
|
//老師個人試券
|
|
|
List<object> papers = new List<object>();
|
|
|
- await foreach (var item in client.GetContainer("TEAMModelOSTemp", "Teacher").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.name, c.blob, c.index, c.items, c.subjectName, c.score, c.scope from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Paper-{id}") }))
|
|
|
+ await foreach (var item in client.GetContainer("TEAMModelOSTemp", "Teacher").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.name, c.blob, c.subjectName, c.score, c.useCount, c.createDate from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Paper-{id}") }))
|
|
|
{
|
|
|
using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
@@ -322,7 +322,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
|
|
|
//校本試題
|
|
|
List<object> items = new List<object>();
|
|
|
- await foreach (var item in client.GetContainer("TEAMModelOSTemp", "School").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.blob, c.type, c.points, c.field, c.periodId, c.gradeIds, c.subjectId, c.level, c.usageCount, c.scope from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Item-{school_code}") }))
|
|
|
+ await foreach (var item in client.GetContainer("TEAMModelOSTemp", "School").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.blob, c.type, c.points, c.field, c.periodId, c.gradeIds, c.subjectId, c.level, c.useCount, c.createDate from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Item-{school_code}") }))
|
|
|
{
|
|
|
using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
@@ -335,7 +335,7 @@ namespace TEAMModelOS.Controllers.Client
|
|
|
}
|
|
|
//校本試券
|
|
|
List<object> papers = new List<object>();
|
|
|
- await foreach (var item in client.GetContainer("TEAMModelOSTemp", "School").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.name, c.blob, c.index, c.items, c.periodId, c.gradeIds, c.subjectId, c.score, c.level, c.useCount, c.scope from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Paper-{school_code}") }))
|
|
|
+ await foreach (var item in client.GetContainer("TEAMModelOSTemp", "School").GetItemQueryStreamIterator(queryText: $"SELECT c.id, c.name, c.blob, c.periodId, c.gradeIds, c.subjectId, c.score, c.useCount, c.createDate from c ", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Paper-{school_code}") }))
|
|
|
{
|
|
|
using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|