Forráskód Böngészése

调整blobcntr投影

CrazyIter_Bin 4 éve
szülő
commit
41c682dba5
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      TEAMModelOS/Services/Common/ActivityStudentService.cs

+ 2 - 2
TEAMModelOS/Services/Common/ActivityStudentService.cs

@@ -476,7 +476,7 @@ namespace TEAMModelOS.Services.Common
                 var client = _azureCosmos.GetCosmosClient();
                 Survey survey = null;
                 ///TODO 检查是否在投票范围内,包括在tmdids 及班级  但是需要处理认证金钥中的班级问题
-                await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<Survey>(queryText: $"select c.id,c.owner, c.code ,c.answers , c.progress,c.times,c.startTime,c.endTime from c where c.id = '{id}'",
+                await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<Survey>(queryText: $"select c.id,c.blobcntr, c.code ,c.answers , c.progress,c.times,c.startTime,c.endTime from c where c.id = '{id}'",
                     requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{code}") }))
                 {
                     survey = item;
@@ -547,7 +547,7 @@ namespace TEAMModelOS.Services.Common
                                 //处理other ,这里暂不处理, 结算再处理other 
                                 //await Task.WhenAll(tasks);
                                 //保存当前提交人的记录
-                                await _azureStorage.UploadFileByContainer(survey.school,new SurveyRecord { ans= recs, userid=userid, time = curr }.ToJsonString(), "survey", $"{survey.id}/urecord/{userid}.json");
+                                await _azureStorage.UploadFileByContainer(survey.blobcntr, new SurveyRecord { ans= recs, userid=userid, time = curr }.ToJsonString(), "survey", $"{survey.id}/urecord/{userid}.json");
                                 await azureRedis.GetRedisClient(8).SetAddAsync($"Survey:Submit:{survey.id}", userid);
                                 msgid = 1;
                             }