ActivityHttpTrigger.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. using System;
  2. using System.IO;
  3. using System.Threading.Tasks;
  4. using Microsoft.AspNetCore.Mvc;
  5. using Microsoft.Azure.WebJobs;
  6. using Microsoft.Azure.WebJobs.Extensions.Http;
  7. using Microsoft.AspNetCore.Http;
  8. using Microsoft.Extensions.Logging;
  9. using TEAMModelOS.SDK.DI;
  10. using Azure.Cosmos;
  11. using System.Text.Json;
  12. using System.Collections.Generic;
  13. using TEAMModelOS.SDK.Models;
  14. using TEAMModelOS.SDK.Extension;
  15. using TEAMModelOS.SDK;
  16. using TEAMModelOS.SDK.Models.Cosmos;
  17. using TEAMModelOS.SDK.Models.Cosmos.Common;
  18. using System.Linq;
  19. using TEAMModelOS.Services.Common;
  20. using TEAMModelOS.SDK.Models.Service;
  21. namespace TEAMModelFunction
  22. {
  23. public class ActivityHttpTrigger
  24. {
  25. private readonly AzureCosmosFactory _azureCosmos;
  26. private readonly DingDing _dingDing;
  27. private readonly AzureStorageFactory _azureStorage;
  28. private readonly AzureRedisFactory _azureRedis;
  29. public ActivityHttpTrigger(AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage
  30. , AzureRedisFactory azureRedis)
  31. {
  32. _azureCosmos = azureCosmos;
  33. _dingDing = dingDing;
  34. _azureStorage = azureStorage;
  35. _azureRedis = azureRedis;
  36. }
  37. /// <summary>
  38. /// 修复已存在的课程且未初始化学生课程列表的业务。
  39. /// </summary>
  40. /// <param name="req"></param>
  41. /// <param name="log"></param>
  42. /// <returns></returns>
  43. [FunctionName("fix-stu-course")]
  44. public async Task<IActionResult> StuCourse([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, ILogger log)
  45. {
  46. log.LogInformation("fix-stu-course...");
  47. string originCode = await new StreamReader(req.Body).ReadToEndAsync();
  48. List<Course> courses = new List<Course>();
  49. var client = _azureCosmos.GetCosmosClient();
  50. var query = $"select * from c ";
  51. await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<Course>(queryText: query,
  52. requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Course-{originCode}") }))
  53. {
  54. courses.Add(item);
  55. }
  56. await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryIterator<Course>(queryText: query,
  57. requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Course-{originCode}") }))
  58. {
  59. courses.Add(item);
  60. }
  61. //2.获取课程的id 并尝试添加或移除对应的学生课程记录StuCourse。
  62. foreach (var course in courses)
  63. {
  64. if (course.schedule.IsNotEmpty())
  65. {
  66. foreach (var sc in course.schedule)
  67. {
  68. if (!string.IsNullOrEmpty(sc.stulist))
  69. {
  70. (List<TmdInfo> tmdids, List<StuInfo> students, List<ClassListInfo> classLists) = await TriggerStuActivity.GetStuList(client, _dingDing, new List<string>() { sc.stulist }, course.school);
  71. foreach (var addStu in students)
  72. {
  73. var stuCourse = new StuCourse
  74. {
  75. id = course.id,
  76. scode = course.code,
  77. name = course.name,
  78. code = $"StuCourse-{course.school}-{addStu.id}",
  79. scope = course.scope,
  80. school = course.school,
  81. creatorId = course.creatorId,
  82. pk = "StuCourse"
  83. };
  84. await client.GetContainer("TEAMModelOS", "Student").UpsertItemAsync(stuCourse, new PartitionKey(stuCourse.code));
  85. }
  86. foreach (var addTmd in tmdids)
  87. {
  88. var tmdCourse = new StuCourse
  89. {
  90. id = course.id,
  91. scode = course.code,
  92. name = course.name,
  93. code = $"StuCourse-{addTmd}",
  94. scope = course.scope,
  95. //school = courseChange.school,
  96. creatorId = course.creatorId,
  97. pk = "StuCourse"
  98. };
  99. await client.GetContainer("TEAMModelOS", "Teacher").UpsertItemAsync(tmdCourse, new PartitionKey(tmdCourse.code));
  100. }
  101. }
  102. }
  103. }
  104. }
  105. return new OkObjectResult(new { });
  106. }
  107. /// <summary>
  108. /// 设置评测未初始化学生列表的
  109. /// </summary>
  110. /// <param name="req"></param>
  111. /// <param name="log"></param>
  112. /// <returns></returns>
  113. [FunctionName("fix-exam-activity")]
  114. public async Task<IActionResult> ExamActivity([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req,ILogger log)
  115. {
  116. log.LogInformation("fix-exam-activity...");
  117. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  118. List<string> datas = JsonSerializer.Deserialize<List<string>>(requestBody);
  119. var client = _azureCosmos.GetCosmosClient();
  120. var query = $"select * from c ";
  121. foreach (string data in datas) {
  122. List<ExamInfo> exams = new List<ExamInfo>();
  123. await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
  124. queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Exam-{data}") }))
  125. {
  126. using var json = await JsonDocument.ParseAsync(item.ContentStream);
  127. if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
  128. {
  129. foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
  130. {
  131. exams.Add(obj.ToObject<ExamInfo>());
  132. }
  133. }
  134. }
  135. log.LogInformation($"{exams.ToJsonString()}");
  136. foreach (var info in exams)
  137. {
  138. if (!info.classes.IsNotEmpty())
  139. {
  140. continue;
  141. }
  142. List<string> sub = new List<string>();
  143. foreach (ExamSubject subject in info.subjects)
  144. {
  145. sub.Add(subject.id);
  146. }
  147. (List<TmdInfo> tmdids, List<StuInfo> studentss, List<ClassListInfo> classLists) = await TriggerStuActivity.GetStuList(client, _dingDing, info.classes, info.school);
  148. List<StuActivity> stuActivities = new List<StuActivity>();
  149. List<StuActivity> tmdActivities = new List<StuActivity>();
  150. if (tmdids.IsNotEmpty())
  151. {
  152. tmdids.ForEach(x => {
  153. tmdActivities.Add(new StuActivity
  154. {
  155. pk = "Activity",
  156. id = info.id,
  157. code = $"Activity-{x.id}",
  158. type = "exam",
  159. name = info.name,
  160. startTime = info.startTime,
  161. endTime = info.endTime,
  162. scode = info.code,
  163. scope = info.scope,
  164. school = info.school,
  165. creatorId = info.creatorId,
  166. subjects = sub,
  167. blob = null,
  168. owner = info.owner
  169. });
  170. });
  171. }
  172. if (studentss.IsNotEmpty())
  173. {
  174. studentss.ForEach(x => {
  175. stuActivities.Add(new StuActivity
  176. {
  177. pk = "Activity",
  178. id = info.id,
  179. code = $"Activity-{info.school}-{x.id}",
  180. type = "exam",
  181. name = info.name,
  182. startTime = info.startTime,
  183. endTime = info.endTime,
  184. scode = info.code,
  185. scope = info.scope,
  186. school = info.school,
  187. creatorId = info.creatorId,
  188. subjects = sub,
  189. blob=null,
  190. owner = info.owner
  191. });
  192. });
  193. }
  194. await TriggerStuActivity.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities);
  195. }
  196. }
  197. return new OkObjectResult(new { });
  198. }
  199. /// <summary>
  200. /// 设置投票未初始化学生列表的业务
  201. /// </summary>
  202. /// <param name="req"></param>
  203. /// <param name="log"></param>
  204. /// <returns></returns>
  205. [FunctionName("fix-vote-activity")]
  206. public async Task<IActionResult> VoteActivity(
  207. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  208. ILogger log)
  209. {
  210. log.LogInformation("fix-vote-activity...");
  211. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  212. List<string> datas = JsonSerializer.Deserialize<List<string>>(requestBody);
  213. var client = _azureCosmos.GetCosmosClient();
  214. var query = $"select * from c ";
  215. foreach (string data in datas)
  216. {
  217. List<Vote> votes = new List<Vote>();
  218. await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
  219. queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Vote-{data}") }))
  220. {
  221. using var json = await JsonDocument.ParseAsync(item.ContentStream);
  222. if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
  223. {
  224. foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
  225. {
  226. votes.Add(obj.ToObject<Vote>());
  227. }
  228. }
  229. }
  230. log.LogInformation($"{votes.ToJsonString()}");
  231. foreach (var info in votes)
  232. {
  233. if (!info.classes.IsNotEmpty())
  234. {
  235. continue;
  236. }
  237. (List<TmdInfo> tmdids, List<StuInfo> studentss, List<ClassListInfo> classLists) = await TriggerStuActivity.GetStuList(client, _dingDing, info.classes, info.school);
  238. List<StuActivity> stuActivities = new List<StuActivity>();
  239. List<StuActivity> tmdActivities = new List<StuActivity>();
  240. if (tmdids.IsNotEmpty())
  241. {
  242. tmdids.ForEach(x => {
  243. tmdActivities.Add(new StuActivity
  244. {
  245. pk = "Activity",
  246. id = info.id,
  247. code = $"Activity-{x.id}",
  248. type = "vote",
  249. name = info.name,
  250. startTime = info.startTime,
  251. endTime = info.endTime,
  252. scode = info.code,
  253. scope = info.scope,
  254. school = info.school,
  255. creatorId = info.creatorId,
  256. subjects = new List<string>() { "" },
  257. blob = null,
  258. owner = info.owner
  259. });
  260. });
  261. }
  262. if (studentss.IsNotEmpty())
  263. {
  264. studentss.ForEach(x => {
  265. stuActivities.Add(new StuActivity
  266. {
  267. pk = "Activity",
  268. id = info.id,
  269. code = $"Activity-{info.school}-{x.id}",
  270. type = "vote",
  271. name = info.name,
  272. startTime = info.startTime,
  273. endTime = info.endTime,
  274. scode = info.code,
  275. scope = info.scope,
  276. school = info.school,
  277. creatorId = info.creatorId,
  278. subjects = new List<string>() { "" },
  279. blob = null,
  280. owner = info.owner
  281. });
  282. });
  283. }
  284. await TriggerStuActivity.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities);
  285. }
  286. }
  287. return new OkObjectResult(new { });
  288. }
  289. /// <summary>
  290. /// 设置问卷调查未初始化学生列表的业务
  291. /// </summary>
  292. /// <param name="req"></param>
  293. /// <param name="log"></param>
  294. /// <returns></returns>
  295. [FunctionName("fix-survey-activity")]
  296. public async Task<IActionResult> SurveyActivity(
  297. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  298. ILogger log)
  299. {
  300. log.LogInformation("fix-survey-activity...");
  301. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  302. List<string> datas = JsonSerializer.Deserialize<List<string>>(requestBody);
  303. var client = _azureCosmos.GetCosmosClient();
  304. var query = $"select * from c ";
  305. foreach (string data in datas)
  306. {
  307. List<Survey> surveys = new List<Survey>();
  308. await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryStreamIterator(
  309. queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Survey-{data}") }))
  310. {
  311. using var json = await JsonDocument.ParseAsync(item.ContentStream);
  312. if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
  313. {
  314. foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
  315. {
  316. surveys.Add(obj.ToObject<Survey>());
  317. }
  318. }
  319. }
  320. log.LogInformation($"{surveys.ToJsonString()}");
  321. foreach (var info in surveys)
  322. {
  323. if (!info.classes.IsNotEmpty())
  324. {
  325. continue;
  326. }
  327. (List<TmdInfo> tmdids, List<StuInfo> studentss, List<ClassListInfo> classLists) = await TriggerStuActivity.GetStuList(client, _dingDing, info.classes, info.school);
  328. List<StuActivity> stuActivities = new List<StuActivity>();
  329. List<StuActivity> tmdActivities = new List<StuActivity>();
  330. if (tmdids.IsNotEmpty())
  331. {
  332. tmdids.ForEach(x => {
  333. tmdActivities.Add(new StuActivity
  334. {
  335. pk = "Activity",
  336. id = info.id,
  337. code = $"Activity-{x.id}",
  338. type = "survey",
  339. name = info.name,
  340. startTime = info.startTime,
  341. endTime = info.endTime,
  342. scode = info.code,
  343. scope = info.scope,
  344. school = info.school,
  345. creatorId = info.creatorId,
  346. subjects = new List<string>() { "" },
  347. blob = info.blob,
  348. owner=info.owner
  349. });
  350. });
  351. }
  352. if (studentss.IsNotEmpty())
  353. {
  354. studentss.ForEach(x => {
  355. stuActivities.Add(new StuActivity
  356. {
  357. pk = "Activity",
  358. id = info.id,
  359. code = $"Activity-{info.school}-{x.id}",
  360. type = "survey",
  361. name = info.name,
  362. startTime = info.startTime,
  363. endTime = info.endTime,
  364. scode = info.code,
  365. scope = info.scope,
  366. school = info.school,
  367. creatorId = info.creatorId,
  368. subjects = new List<string>() { "" },
  369. blob=info.blob,
  370. owner = info.owner
  371. });
  372. });
  373. }
  374. await TriggerStuActivity.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities);
  375. }
  376. }
  377. return new OkObjectResult(new { });
  378. }
  379. /// <summary>
  380. //获取题目摘要信息
  381. /// </summary>
  382. /// <param name="request"></param>
  383. /// <returns></returns>
  384. [ProducesDefaultResponseType]
  385. //[AuthToken(Roles = "teacher")]
  386. [FunctionName("fix-itemcond")]
  387. public async Task<IActionResult> FixItemCond(
  388. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  389. ILogger log)
  390. {
  391. try {
  392. var client = _azureCosmos.GetCosmosClient();
  393. List<ItemInfo> items = new List<ItemInfo>();
  394. var queryslt = $"SELECT value(c) FROM c where c.pid = null ";
  395. await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryIterator<ItemInfo>(queryText: queryslt, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Item-hbcn") }))
  396. {
  397. items.Add(item);
  398. }
  399. List<ItemCond> itemConds = new List<ItemCond>();
  400. items.GroupBy(x => x.periodId).Select(y=>new {key= y.Key,list=y.ToList() }).ToList().ForEach(z => {
  401. ItemCond cond = new ItemCond() { id = z.key, code = $"ItemCond-hbcn", pk = "ItemCond", ttl = -1, count = 0, grades = new List<GradeCount>(), subjects = new List<SubjectCount>() };
  402. z.list.ForEach(y => {
  403. ItemService.CountItemCond(y, null, cond);
  404. });
  405. itemConds.Add(cond);
  406. });
  407. itemConds.ForEach(async cond =>
  408. {
  409. await client.GetContainer("TEAMModelOS", "School").UpsertItemAsync<ItemCond>(cond, new PartitionKey(cond.code));
  410. });
  411. return new OkObjectResult(new { itemConds });
  412. } catch (Exception ex) { await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,fix-itemcond()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組); }
  413. return new OkObjectResult(new { });
  414. }
  415. /// <summary>
  416. /// 设置问卷调查未初始化学生列表的业务
  417. /// </summary>
  418. /// <param name="req"></param>
  419. /// <param name="log"></param>
  420. /// <returns></returns>
  421. [FunctionName("refresh-stu-activity")]
  422. public async Task<IActionResult> RefreshStuActivity(
  423. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  424. ILogger log)
  425. {
  426. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  427. dynamic json = JsonSerializer.Deserialize<dynamic>(requestBody);
  428. string id = json.id;
  429. string code = json.code;
  430. if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(code)) {
  431. return new BadRequestResult();
  432. }
  433. var client = _azureCosmos.GetCosmosClient();
  434. await TriggerStuActivity.RefreshStuActivity(client, _dingDing, id, code);
  435. return new OkObjectResult(new {code=200 });
  436. }
  437. /// <summary>
  438. ///获取单个目录的大小,用于获取评测,试题,试卷,问卷,投票等 文件层级超过两层的文件。
  439. ///例如 /exam/uuid/xxx /item/uuid/xxx /paper/uuid/xxx /vote/uuid/xxx /suervy/uuid/xxx
  440. /// {"name":"hbcn","/item/uuid/xxx"}
  441. /// </summary>
  442. /// <param name="req"></param>
  443. /// <param name="log"></param>
  444. /// <returns></returns>
  445. [FunctionName("get-prefixsize")]
  446. public async Task<IActionResult> GetPrefixsize(
  447. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  448. ILogger log)
  449. {
  450. try {
  451. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  452. var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
  453. if (data.TryGetProperty("name", out JsonElement name) && data.TryGetProperty("root", out JsonElement root))
  454. {
  455. var size = await _azureStorage.GetBlobContainerClient($"{name}").GetBlobsSize($"{root}");
  456. return new OkObjectResult(new { size = size });
  457. }
  458. else
  459. {
  460. return new BadRequestResult();
  461. }
  462. } catch (Exception ex) {
  463. await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,get-prefixsize()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
  464. return new BadRequestResult();
  465. }
  466. }
  467. /// <summary>
  468. ///获取多个blob路径的文件大小
  469. /// {"name":"hbcn","blobs":["/paper/uuid/xxx.json","/paper/uuid/aaa.json"]}
  470. /// </summary>
  471. /// <param name="req"></param>
  472. /// <param name="log"></param>
  473. /// <returns></returns>
  474. [FunctionName("get-blobsize")]
  475. public async Task<IActionResult> GetBlobsize(
  476. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  477. ILogger log)
  478. {
  479. try {
  480. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  481. var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
  482. if (data.TryGetProperty("name", out JsonElement name) && data.TryGetProperty("blobs", out JsonElement blob))
  483. {
  484. List<string> blobs = JsonSerializer.Deserialize<List<string>>(blob.ToJsonString());
  485. var size= await _azureStorage.GetBlobContainerClient($"{name}").GetBlobsSize(blobs);
  486. return new OkObjectResult(new { size = size });
  487. }
  488. else {
  489. return new BadRequestResult();
  490. }
  491. } catch (Exception ex)
  492. {
  493. await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,get-blobsize()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
  494. return new BadRequestResult();
  495. }
  496. }
  497. /// <summary>
  498. /// 修复容器的内容显示
  499. /// </summary>
  500. /// <param name="req"></param>
  501. /// <param name="log"></param>
  502. /// <returns></returns>
  503. [FunctionName("fix-blob-content")]
  504. public async Task<IActionResult> FixBlobContent(
  505. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  506. ILogger log)
  507. {
  508. try
  509. {
  510. var client = _azureCosmos.GetCosmosClient();
  511. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  512. var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
  513. await FixDataService.FixBlobContent(client, _dingDing, _azureStorage, data);
  514. return new OkObjectResult(new { });
  515. }
  516. catch (Exception ex)
  517. {
  518. await _dingDing.SendBotMsg($"TEAMModelFunction,ActivityHttpTrigger,fix-blob-content()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
  519. return new BadRequestResult();
  520. }
  521. }
  522. /// <summary>
  523. /// 修复容器的内容显示
  524. /// </summary>
  525. /// <param name="req"></param>
  526. /// <param name="log"></param>
  527. /// <returns></returns>
  528. [FunctionName("fix-student-info")]
  529. public async Task<IActionResult> FixStudentInfo(
  530. [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
  531. ILogger log)
  532. {
  533. var client = _azureCosmos.GetCosmosClient();
  534. string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
  535. var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(requestBody);
  536. await FixDataService.FixStudentInfo(client, _dingDing, _azureStorage, data);
  537. return new OkObjectResult(new { });
  538. }
  539. }
  540. }