Browse Source

answers 查询投影

CrazyIter_Bin 4 years ago
parent
commit
3e97123f26

+ 1 - 1
TEAMModelOS.SDK/Models/Cosmos/Common/Vote.cs

@@ -40,7 +40,7 @@ namespace TEAMModelOS.SDK.Models
         [Required(ErrorMessage = "creatorId 必须设置")]
         public string creatorId { get; set; }
         /// <summary>
-        /// 投票描述
+        /// 投票描述 
         /// </summary>
         public string description { get; set; }
         /// <summary>

+ 1 - 1
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.ans , 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.owner, 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;