|
@@ -23,6 +23,7 @@ using System.Linq;
|
|
|
using System.Net;
|
|
|
using System.Net.Http;
|
|
|
using System.Net.Http.Json;
|
|
|
+using System.Security.Policy;
|
|
|
using System.Text;
|
|
|
using System.Text.Json;
|
|
|
using System.Text.RegularExpressions;
|
|
@@ -77,9 +78,9 @@ namespace TEAMModelOS.Controllers
|
|
|
public async Task<IActionResult> CheckPjx(JsonElement json)
|
|
|
{
|
|
|
|
|
|
- BlobDownloadResult baseblobDownload = await _azureStorage.GetBlobContainerClient("0-public").GetBlobClient($"optlog/03827ee5-d498-4ce1-b36f-2aa7cf31fa61-Log-tabledd-update.json").DownloadContentAsync();
|
|
|
+ //BlobDownloadResult baseblobDownload = await _azureStorage.GetBlobContainerClient("0-public").GetBlobClient($"optlog/03827ee5-d498-4ce1-b36f-2aa7cf31fa61-Log-tabledd-update.json").DownloadContentAsync();
|
|
|
//attendStatehttps://teammodeltest.blob.core.chinacloudapi.cn/0-public
|
|
|
- string s = baseblobDownload.Content.ToString();
|
|
|
+ //string s = baseblobDownload.Content.ToString();
|
|
|
//var areaId = json.GetProperty("areaId");
|
|
|
//var table = _azureStorage.GetCloudTableClient().GetTableReference("ScYxpt");
|
|
|
//List<ScTeacher> teachers = await table.FindListByDict<ScTeacher>(new Dictionary<string, object> { { "PartitionKey", "ScTeacher" }, { "areaId", $"{areaId}" } });
|
|
@@ -90,7 +91,16 @@ namespace TEAMModelOS.Controllers
|
|
|
// teacherTrains.Add(item);
|
|
|
//}
|
|
|
//var more= teachers.Select(z => z.tmdid).Except(teacherTrains.Select(x => x.id));
|
|
|
- return Ok();
|
|
|
+
|
|
|
+ QueryDefinition queryDefinition = new QueryDefinition($"SELECT value(c) FROM c WHERE c.id=@id");
|
|
|
+ queryDefinition.WithParameter("@id", "1595321354");
|
|
|
+ List<Teacher> teachers = new List<Teacher>();
|
|
|
+ await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
|
|
|
+ .GetItemQueryIterator<Teacher>(queryDefinition: queryDefinition,requestOptions: new QueryRequestOptions { PartitionKey= new PartitionKey("Base") }))
|
|
|
+ {
|
|
|
+ teachers.Add(item);
|
|
|
+ }
|
|
|
+ return Ok(teachers);
|
|
|
}
|
|
|
|
|
|
|