Browse Source

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

zhouj1203@hotmail.com 3 years ago
parent
commit
8668112efb
1 changed files with 5 additions and 5 deletions
  1. 5 5
      TEAMModelOS/Controllers/Both/LessonRecordController.cs

+ 5 - 5
TEAMModelOS/Controllers/Both/LessonRecordController.cs

@@ -199,7 +199,7 @@ namespace TEAMModelOS.Controllers
                         LessonRecord lessonRecord ;
                         var doc = JsonDocument.Parse(response.ContentStream);
                         lessonRecord = doc.RootElement.ToObject<LessonRecord>();
-                        lessonRecord.status = -1;
+                        lessonRecord.status =404;
                         await client.GetContainer(Constant.TEAMModelOS, tbname).ReplaceItemAsync(lessonRecord, lessonRecord.id, new PartitionKey(lessonRecord.code));
                         var ActiveTask = _configuration.GetValue<string>("Azure:ServiceBus:ActiveTask");
                         var messageChange = new ServiceBusMessage(request.ToJsonString());
@@ -219,7 +219,7 @@ namespace TEAMModelOS.Controllers
 
 
         /// <summary>
-        /// 获取开课记录 (c.status<>-1 or IS_DEFINED(c.status)=false )
+        /// 获取开课记录 (c.status<>404 or IS_DEFINED(c.status)=false )
         /// </summary>
         /// <param name="request"></param>
         /// <returns></returns>
@@ -268,7 +268,7 @@ namespace TEAMModelOS.Controllers
                 return BadRequest();
             }
             int count=0;
-            cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("where", " where (c.status<>-1 or IS_DEFINED(c.status) = false ) and  ");
+            cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("where", " where (c.status<>404 or IS_DEFINED(c.status) = false ) and  ");
             await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname).GetItemQueryIterator<int>(queryDefinition: cosmosDbQuery.CosmosQueryDefinition, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey(code) }))
             {
                 count = item;
@@ -351,7 +351,7 @@ namespace TEAMModelOS.Controllers
             List<LessonRecord> lessonRecords = new List<LessonRecord>();
             try
             {
-                cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("where", " where (c.status<>-1 or IS_DEFINED(c.status) = false ) and  ");
+                cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("where", " where (c.status<>404 or IS_DEFINED(c.status) = false ) and  ");
                 await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname)
                    .GetItemQueryStreamIterator(queryDefinition: cosmosDbQuery.CosmosQueryDefinition, continuationToken: continuationToken,
                    requestOptions: new QueryRequestOptions() { MaxItemCount = pageCount, PartitionKey = new PartitionKey(code) }))
@@ -520,7 +520,7 @@ namespace TEAMModelOS.Controllers
             Dictionary<string, object> dict = GetLessonCond(request);
             AzureCosmosQuery cosmosDbQuery = SQLHelper.GetSQL(dict, sql);
             List<LessonRecord> lessonRecords = new List<LessonRecord>();
-            cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("where", " where (c.status<>-1 or IS_DEFINED(c.status) = false ) and  ");
+            cosmosDbQuery.QueryText = cosmosDbQuery.QueryText.Replace("where", " where (c.status<>404 or IS_DEFINED(c.status) = false ) and  ");
             await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, tbname)
                .GetItemQueryStreamIterator(queryDefinition: cosmosDbQuery.CosmosQueryDefinition,
                requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey(code) }))