|
@@ -629,7 +629,7 @@ namespace TEAMModelOS.Controllers
|
|
|
List<string> ids = new List<string>();
|
|
|
ids = classId.ToObject<List<string>>();
|
|
|
var client = _azureCosmos.GetCosmosClient();
|
|
|
- ExamInfo info = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<ExamInfo>(id.GetString(), new PartitionKey($"Exam-{code}"));
|
|
|
+ ExamInfo info = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Common").ReadItemAsync<ExamInfo>(id.GetString(), new PartitionKey($"{scode}"));
|
|
|
//确定当前学生所在班级且该班级参与该活动
|
|
|
List<string> cIds = new();
|
|
|
foreach (string cId in ids)
|
|
@@ -637,7 +637,7 @@ namespace TEAMModelOS.Controllers
|
|
|
List<string> stus = new List<string>();
|
|
|
await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Student").GetItemQueryStreamIterator(
|
|
|
queryText: $"select c.classId as id from c where c.classId = '{cId}' and c.id = '{studentId}'",
|
|
|
- requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Class-{info.school}") }))
|
|
|
+ requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Base-{info.school}") }))
|
|
|
{
|
|
|
using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|