zhouj1203@hotmail.com преди 2 години
родител
ревизия
b255044896
променени са 2 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 1 0
      TEAMModelOS.SDK/Models/Cosmos/Common/ArtRecord.cs
  2. 1 1
      TEAMModelOS/Controllers/Common/ArtController.cs

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/ArtRecord.cs

@@ -22,6 +22,7 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Common
         public long createTime { get; set; }
         //0未作答 1已作答
         public int isAnswer { get; set; } = 0;
+        public string url { get; set; }
         public List<Attachment> attachments { get; set; } = new List<Attachment>();
     }
 }

+ 1 - 1
TEAMModelOS/Controllers/Common/ArtController.cs

@@ -883,7 +883,7 @@ namespace TEAMModelOS.Controllers.Common
                 var (userid, _, _, school) = HttpContext.GetAuthTokenInfo();
                 List<object> works = new();
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Student").GetItemQueryStreamIterator(
-                queryText: $"select c.stuId,c.attachments from c where c.classId = '{classId}' and c.acId = '{id}' and c.subject = '{subject}'",
+                queryText: $"select c.stuId,c.attachments,c.isAnswer,c.createTime,c.url from c where c.classId = '{classId}' and c.acId = '{id}' and c.subject = '{subject}'",
                 requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ArtRecord") }))
                 {
                     using var json = await JsonDocument.ParseAsync(item.ContentStream);