Browse Source

修改SQL

zhouj1203@hotmail.com 3 years ago
parent
commit
063f1e256c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      TEAMModelOS/Controllers/Common/AreaController.cs

+ 2 - 2
TEAMModelOS/Controllers/Common/AreaController.cs

@@ -342,10 +342,10 @@ namespace TEAMModelOS.Controllers
                // List<string> baseIds = await getId(client, id.GetString());
                 List<object> studies = new();
 
-                var query = $"select c.id,c.img,c.name,c.type,.startTime,c.endTime,c.presenter,c.topic,c.address,c.owner,c.school from c ";
+                var query = $"select c.id,c.img,c.name,c.type,c.startTime,c.endTime,c.presenter,c.topic,c.address,c.owner,c.school from c ";
 
 
-                await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator(queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Study-{id}") }))
+                await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Study-{id}") }))
                 {
 
                     using var json = await JsonDocument.ParseAsync(item.ContentStream);