123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626 |
- using System;
- using System.IO;
- using System.Threading.Tasks;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.Azure.WebJobs;
- using Microsoft.Azure.WebJobs.Extensions.Http;
- using Microsoft.AspNetCore.Http;
- using Microsoft.Extensions.Logging;
- using TEAMModelOS.SDK.DI;
- using Azure.Cosmos;
- using System.Text.Json;
- using System.Collections.Generic;
- using TEAMModelOS.SDK.Models;
- using TEAMModelOS.SDK.Extension;
- using TEAMModelOS.SDK.Helper.Common.CollectionHelper;
- using TEAMModelOS.SDK.Models.Cosmos;
- using TEAMModelOS.SDK.Models.Cosmos.Common;
- using System.Linq;
- using TEAMModelOS.Services.Common;
- namespace TEAMModelFunction
- {
- public class ActivityHttpTrigger
- {
- private readonly AzureCosmosFactory _azureCosmos;
- private readonly DingDing _dingDing;
- private readonly AzureStorageFactory _azureStorage;
- private readonly AzureRedisFactory _azureRedis;
- public ActivityHttpTrigger(AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage
- , AzureRedisFactory azureRedis)
- {
- _azureCosmos = azureCosmos;
- _dingDing = dingDing;
- _azureStorage = azureStorage;
- _azureRedis = azureRedis;
- }
- /// <summary>
- /// 修复已存在的课程且未初始化学生课程列表的业务。
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("fix-stu-course")]
- public async Task<IActionResult> StuCourse([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, ILogger log)
- {
- log.LogInformation("fix-stu-course...");
- string originCode = await new StreamReader(req.Body).ReadToEndAsync();
- List<Course> courses = new List<Course>();
- var client = _azureCosmos.GetCosmosClient();
- var query = $"select * from c ";
- await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<Course>(queryText: query,
- requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Course-{originCode}") }))
- {
- courses.Add(item);
- }
- await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryIterator<Course>(queryText: query,
- requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Course-{originCode}") }))
- {
- courses.Add(item);
- }
- //2.获取课程的id 并尝试添加或移除对应的学生课程记录StuCourse。
- foreach (var course in courses)
- {
- if (course.schedule.IsNotEmpty())
- {
- foreach (var sc in course.schedule)
- {
- if (!string.IsNullOrEmpty(sc.stulist))
- {
- (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string>() { sc.stulist }, course.school);
- foreach (var addStu in studentss)
- {
- var stuCourse = new StuCourse
- {
- id = course.id,
- scode = course.code,
- name = course.name,
- code = $"StuCourse-{course.school}-{addStu.id}",
- scope = course.scope,
- school = course.school,
- creatorId = course.creatorId,
- pk = "StuCourse"
- };
- await client.GetContainer("TEAMModelOS", "Student").UpsertItemAsync(stuCourse, new PartitionKey(stuCourse.code));
- }
- foreach (var addTmd in tmdids)
- {
- var tmdCourse = new StuCourse
- {
- id = course.id,
- scode = course.code,
- name = course.name,
- code = $"StuCourse-{addTmd}",
- scope = course.scope,
- //school = courseChange.school,
- creatorId = course.creatorId,
- pk = "StuCourse"
- };
- await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync(tmdCourse, new PartitionKey(tmdCourse.code));
- }
- }
- }
- }
- }
- return new OkObjectResult(new { });
- }
- /// <summary>
- /// 设置评测未初始化学生列表的
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("fix-exam-activity")]
- public async Task<IActionResult> ExamActivity([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req,ILogger log)
- {
- log.LogInformation("fix-exam-activity...");
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- List<string> datas = JsonSerializer.Deserialize<List<string>>(requestBody);
- var client = _azureCosmos.GetCosmosClient();
-
- var query = $"select * from c ";
- foreach (string data in datas) {
- List<ExamInfo> exams = new List<ExamInfo>();
- await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
- queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Exam-{data}") }))
- {
- using var json = await JsonDocument.ParseAsync(item.ContentStream);
- if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
- {
- foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
- {
- exams.Add(obj.ToObject<ExamInfo>());
- }
- }
- }
- log.LogInformation($"{exams.ToJsonString()}");
- foreach (var info in exams)
- {
- if (!info.classes.IsNotEmpty())
- {
- continue;
- }
- List<string> sub = new List<string>();
- foreach (ExamSubject subject in info.subjects)
- {
- sub.Add(subject.id);
- }
- (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, _dingDing, info.classes, info.school);
- List<StuActivity> stuActivities = new List<StuActivity>();
- List<StuActivity> tmdActivities = new List<StuActivity>();
- if (tmdids.IsNotEmpty())
- {
- tmdids.ForEach(x => {
- tmdActivities.Add(new StuActivity
- {
- pk = "Activity",
- id = info.id,
- code = $"Activity-{x}",
- type = "exam",
- name = info.name,
- startTime = info.startTime,
- endTime = info.endTime,
- scode = info.code,
- scope = info.scope,
- school = info.school,
- creatorId = info.creatorId,
- subjects = sub,
- blob = null,
- owner = info.owner
- });
- });
- }
- if (studentss.IsNotEmpty())
- {
- studentss.ForEach(x => {
- stuActivities.Add(new StuActivity
- {
- pk = "Activity",
- id = info.id,
- code = $"Activity-{info.school}-{x.id}",
- type = "exam",
- name = info.name,
- startTime = info.startTime,
- endTime = info.endTime,
- scode = info.code,
- scope = info.scope,
- school = info.school,
- creatorId = info.creatorId,
- subjects = sub,
- blob=null,
- owner = info.owner
- });
- });
- }
- await TriggerStuActivity.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities);
- }
- }
- return new OkObjectResult(new { });
- }
- /// <summary>
- /// 设置投票未初始化学生列表的业务
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("fix-vote-activity")]
- public async Task<IActionResult> VoteActivity(
- [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
- ILogger log)
- {
- log.LogInformation("fix-vote-activity...");
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- List<string> datas = JsonSerializer.Deserialize<List<string>>(requestBody);
- var client = _azureCosmos.GetCosmosClient();
- var query = $"select * from c ";
- foreach (string data in datas)
- {
- List<Vote> votes = new List<Vote>();
- await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
- queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Vote-{data}") }))
- {
- using var json = await JsonDocument.ParseAsync(item.ContentStream);
- if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
- {
- foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
- {
- votes.Add(obj.ToObject<Vote>());
- }
- }
- }
- log.LogInformation($"{votes.ToJsonString()}");
- foreach (var info in votes)
- {
- if (!info.classes.IsNotEmpty())
- {
- continue;
- }
-
- (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, _dingDing, info.classes, info.school);
- List<StuActivity> stuActivities = new List<StuActivity>();
- List<StuActivity> tmdActivities = new List<StuActivity>();
- if (tmdids.IsNotEmpty())
- {
- tmdids.ForEach(x => {
- tmdActivities.Add(new StuActivity
- {
- pk = "Activity",
- id = info.id,
- code = $"Activity-{x}",
- type = "vote",
- name = info.name,
- startTime = info.startTime,
- endTime = info.endTime,
- scode = info.code,
- scope = info.scope,
- school = info.school,
- creatorId = info.creatorId,
- subjects = new List<string>() { "" },
- blob = null,
- owner = info.owner
- });
- });
- }
- if (studentss.IsNotEmpty())
- {
- studentss.ForEach(x => {
- stuActivities.Add(new StuActivity
- {
- pk = "Activity",
- id = info.id,
- code = $"Activity-{info.school}-{x.id}",
- type = "vote",
- name = info.name,
- startTime = info.startTime,
- endTime = info.endTime,
- scode = info.code,
- scope = info.scope,
- school = info.school,
- creatorId = info.creatorId,
- subjects = new List<string>() { "" },
- blob = null,
- owner = info.owner
- });
- });
- }
- await TriggerStuActivity.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities);
- }
- }
- return new OkObjectResult(new { });
- }
- /// <summary>
- /// 设置问卷调查未初始化学生列表的业务
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("fix-survey-activity")]
- public async Task<IActionResult> SurveyActivity(
- [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
- ILogger log)
- {
- log.LogInformation("fix-survey-activity...");
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- List<string> datas = JsonSerializer.Deserialize<List<string>>(requestBody);
- var client = _azureCosmos.GetCosmosClient();
- var query = $"select * from c ";
- foreach (string data in datas)
- {
- List<Survey> surveys = new List<Survey>();
- await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
- queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Survey-{data}") }))
- {
- using var json = await JsonDocument.ParseAsync(item.ContentStream);
- if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
- {
- foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
- {
- surveys.Add(obj.ToObject<Survey>());
- }
- }
- }
- log.LogInformation($"{surveys.ToJsonString()}");
- foreach (var info in surveys)
- {
- if (!info.classes.IsNotEmpty())
- {
- continue;
- }
- (List<string> tmdids, List<Students> studentss) = await TriggerStuActivity.GetStuList(client, _dingDing, info.classes, info.school);
- List<StuActivity> stuActivities = new List<StuActivity>();
- List<StuActivity> tmdActivities = new List<StuActivity>();
- if (tmdids.IsNotEmpty())
- {
- tmdids.ForEach(x => {
- tmdActivities.Add(new StuActivity
- {
- pk = "Activity",
- id = info.id,
- code = $"Activity-{x}",
- type = "survey",
- name = info.name,
- startTime = info.startTime,
- endTime = info.endTime,
- scode = info.code,
- scope = info.scope,
- school = info.school,
- creatorId = info.creatorId,
- subjects = new List<string>() { "" },
- blob = info.blob,
- owner=info.owner
-
- });
- });
- }
- if (studentss.IsNotEmpty())
- {
- studentss.ForEach(x => {
- stuActivities.Add(new StuActivity
- {
- pk = "Activity",
- id = info.id,
- code = $"Activity-{info.school}-{x.id}",
- type = "survey",
- name = info.name,
- startTime = info.startTime,
- endTime = info.endTime,
- scode = info.code,
- scope = info.scope,
- school = info.school,
- creatorId = info.creatorId,
- subjects = new List<string>() { "" },
- blob=info.blob,
- owner = info.owner
- });
- });
- }
- await TriggerStuActivity.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities);
- }
- }
- return new OkObjectResult(new { });
- }
- /// <summary>
- //获取题目摘要信息
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- [ProducesDefaultResponseType]
- //[AuthToken(Roles = "teacher")]
- [FunctionName("fix-itemcond")]
- public async Task<IActionResult> FixItemCond(
- [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
- ILogger log)
- {
- try {
- var client = _azureCosmos.GetCosmosClient();
- List<ItemInfo> items = new List<ItemInfo>();
- var queryslt = $"SELECT value(c) FROM c where c.pid = null ";
- await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<ItemInfo>(queryText: queryslt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Item-hbcn") }))
- {
- items.Add(item);
- }
- List<ItemCond> itemConds = new List<ItemCond>();
- items.GroupBy(x => x.periodId).Select(y=>new {key= y.Key,list=y.ToList() }).ToList().ForEach(z => {
- ItemCond cond = new ItemCond() { id = z.key, code = $"ItemCond-hbcn", pk = "ItemCond", ttl = -1, count = 0, grades = new List<GradeCount>(), subjects = new List<SubjectCount>() };
- z.list.ForEach(y => {
-
- ItemService.CountItemCond(y, null, cond);
- });
- itemConds.Add(cond);
- });
- itemConds.ForEach(async cond =>
- {
- await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ItemCond>(cond, new PartitionKey(cond.code));
- });
- return new OkObjectResult(new { itemConds });
- } catch (Exception ex) { await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,fix-itemcond()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組); }
- return new OkObjectResult(new { });
- }
- /// <summary>
- /// 设置问卷调查未初始化学生列表的业务
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("refresh-stu-activity")]
- public async Task<IActionResult> RefreshStuActivity(
- [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
- ILogger log)
- {
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- dynamic json = JsonSerializer.Deserialize<dynamic>(requestBody);
- string id = json.id;
- string code = json.code;
- if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(code)) {
- return new BadRequestResult();
- }
- var client = _azureCosmos.GetCosmosClient();
- // var query = $"SELECT distinct c.owner, c.id,c.code, c.classes,c.subjects,c.progress,c.scope,c.startTime,c.school,c.creatorId,c.name,c.pk ,c.endTime FROM c join A1 in c.classes where c.pk='{type}' and A1 in('{stuListChange.listid}') ";
- MQActivity activity = null;
- try {
- var aactivity= await client.GetContainer("TEAMModelOS", "Common").ReadItemStreamAsync(id, new Azure.Cosmos.PartitionKey(code));
- using var da = await JsonDocument.ParseAsync(aactivity.ContentStream);
- activity = da.ToObject<MQActivity>();
- } catch (Exception ex) {
- }
- if (activity != null)
- {
- (List<string> tmdids, List<Students> students) = await TriggerStuActivity.GetStuList(client, _dingDing, activity.classes, activity.school);
- if (tmdids.IsNotEmpty())
- {
- foreach (string tmdid in tmdids)
- {
- var stucourse = new StuActivity
- {
- id = activity.id,
- scode = activity.code,
- name = activity.name,
- code = $"Activity-{tmdid}",
- scope = activity.scope,
- school = activity.school,
- creatorId = activity.creatorId,
- pk = "Activity",
- type = activity.pk,
- subjects = activity.pk.ToLower().Equals("exam") && activity.subjects.IsNotEmpty() ? new List<string>() { activity.subjects[0].id } : new List<string>() { "" },
- startTime = activity.startTime,
- endTime = activity.endTime,
- blob = activity.blob,
- owner = activity.owner
- };
- await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync(stucourse, new PartitionKey(stucourse.code));
- }
- }
- if (students.IsNotEmpty())
- {
- foreach (Students student in students)
- {
- var stucourse = new StuActivity
- {
- id = activity.id,
- scode = activity.code,
- name = activity.name,
- code = $"Activity-{activity.school}-{student.id}",
- scope = activity.scope,
- school = activity.school,
- creatorId = activity.creatorId,
- pk = "Activity",
- type = activity.pk,
- subjects = activity.pk.ToLower().Equals("exam") && activity.subjects.IsNotEmpty() ? new List<string>() { activity.subjects[0].id } : new List<string>() { "" },
- startTime = activity.startTime,
- endTime = activity.endTime,
- blob = activity.blob,
- owner = activity.owner
- };
- await client.GetContainer("TEAMModelOS", "Student").UpsertItemAsync(stucourse, new PartitionKey(stucourse.code));
- }
- }
- return new OkObjectResult(new { code = 200 });
- }
- else {
- return new BadRequestResult();
- }
- }
- /// <summary>
- ///获取单个目录的大小,用于获取评测,试题,试卷,问卷,投票等 文件层级超过两层的文件。
- ///例如 /exam/uuid/xxx /item/uuid/xxx /paper/uuid/xxx /vote/uuid/xxx /suervy/uuid/xxx
- /// {"name":"hbcn","/item/uuid/xxx"}
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("get-prefixsize")]
- public async Task<IActionResult> GetPrefixsize(
- [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
- ILogger log)
- {
- try {
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
- if (data.TryGetProperty("name", out JsonElement name) && data.TryGetProperty("root", out JsonElement root))
- {
- var size = await _azureStorage.GetBlobContainerClient($"{name}").GetBlobsSize($"{root}");
- return new OkObjectResult(new { size = size });
- }
- else
- {
- return new BadRequestResult();
- }
- } catch (Exception ex) {
- await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,get-prefixsize()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
- return new BadRequestResult();
- }
- }
- /// <summary>
- ///获取多个blob路径的文件大小
- /// {"name":"hbcn","blobs":["/paper/uuid/xxx.json","/paper/uuid/aaa.json"]}
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("get-blobsize")]
- public async Task<IActionResult> GetBlobsize(
- [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
- ILogger log)
- {
- try {
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
- if (data.TryGetProperty("name", out JsonElement name) && data.TryGetProperty("blobs", out JsonElement blob))
- {
- List<string> blobs = JsonSerializer.Deserialize<List<string>>(blob.ToJsonString());
- var size= await _azureStorage.GetBlobContainerClient($"{name}").GetBlobsSize(blobs);
- return new OkObjectResult(new { size = size });
- }
- else {
- return new BadRequestResult();
- }
-
- } catch (Exception ex)
- {
- await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,get-blobsize()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
- return new BadRequestResult();
- }
- }
- /// <summary>
- /// 修复容器的内容显示
- /// </summary>
- /// <param name="req"></param>
- /// <param name="log"></param>
- /// <returns></returns>
- [FunctionName("fix-blob-content")]
- public async Task<IActionResult> FixBlobContent(
- [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
- ILogger log)
- {
- try
- {
- string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
- var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
- if (data.TryGetProperty("name", out JsonElement name) ) {
- var client = _azureCosmos.GetCosmosClient();
- List<string> prefixs = new List<string>() { "audio","doc","image","other","res","video", "thum" };
- var ContainerClient = _azureStorage.GetBlobContainerClient($"{name}");
- string scope = "private";
- if (data.TryGetProperty("scope", out JsonElement _scope)){
- scope = $"{_scope}";
- }
- var tb = "Teacher";
- if (scope != "private") {
- tb = "School";
- }
- long now = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
- // List<Task<ItemResponse<Bloblog>>> responses = new List<Task<ItemResponse<Bloblog>>>();
- foreach (var prefix in prefixs) {
- List<string> items = await ContainerClient.List(prefix);
- foreach (var item in items) {
- var urlsSize = await ContainerClient.GetBlobsSize(item);
- Bloblog bloblog = new Bloblog { id = Guid.NewGuid().ToString(),code= $"Bloblog-{name}", pk = "Bloblog", time = now,url= item, size = urlsSize != null && urlsSize.HasValue ? urlsSize.Value : 0, type = prefix};
- await client.GetContainer("TEAMModelOS", tb).UpsertItemAsync(bloblog, new Azure.Cosmos.PartitionKey(bloblog.code)) ;
- }
- }
- // await Task.WhenAll(responses);
- }
- return new OkObjectResult(new { });
- }
- catch (Exception ex)
- {
- await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,fix-blob-content()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
- return new BadRequestResult();
- }
- }
- }
- }
|