ActivityStudentService.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text.Json;
  5. using System.Threading.Tasks;
  6. using TEAMModelOS.SDK.Models.Cosmos;
  7. using TEAMModelOS.SDK.Extension;
  8. using Azure.Cosmos;
  9. using TEAMModelOS.SDK.DI;
  10. using HTEXLib.COMM.Helpers;
  11. using System.Text;
  12. using TEAMModelOS.SDK.Models;
  13. using TEAMModelOS.SDK.Models.Cosmos.Common.Inner;
  14. using StackExchange.Redis;
  15. namespace TEAMModelOS.Services.Common
  16. {
  17. public static class ActivityStudentService
  18. {
  19. /// <summary>
  20. /// 活动委托
  21. /// </summary>
  22. /// <param name="data"></param>
  23. /// <returns></returns>
  24. delegate dynamic DoActivityTips(ActivityData data, AzureCosmosFactory _azureCosmos,string id, AzureRedisFactory _azureRedis);
  25. public static async Task<int> Decide(JsonElement request,AzureCosmosFactory _azureCosmos,AzureRedisFactory _azureRedis,string userid ) {
  26. DateTimeOffset now = DateTimeOffset.UtcNow;
  27. long curr = now.ToUnixTimeMilliseconds();
  28. byte msgid = 0;//0投票失败,1投票成功,2不在时间范围内,3不在发布范围内,4投票周期内重复投票,5周期内的可投票数不足,6未设置投票项
  29. //活动id
  30. if (!request.TryGetProperty("id", out JsonElement id)) {
  31. return msgid;
  32. }
  33. //活动分区
  34. if (!request.TryGetProperty("code", out JsonElement code)) {
  35. return msgid;
  36. }
  37. List<string> option = new List<string>();
  38. if (request.TryGetProperty("option", out JsonElement joption))
  39. {
  40. option = joption.ToObject<List<string>>();
  41. if (option.IsEmpty())
  42. {
  43. msgid = 6;
  44. return msgid;
  45. }
  46. }
  47. else
  48. {
  49. return msgid;
  50. }
  51. try
  52. {
  53. //1.再次检查投票
  54. var client = _azureCosmos.GetCosmosClient();
  55. Vote vote = null;
  56. ///TODO 检查是否在投票范围内,包括在tmdids 及班级 但是需要处理认证金钥中的班级问题
  57. await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<Vote>(queryText: $"select c.id,c.code , c.progress,c.times,c.voteNum,c.startTime,c.endTime from c where c.id = '{id}'",
  58. requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"{code}") }))
  59. {
  60. vote = item;
  61. break;
  62. }
  63. if (vote != null)
  64. {
  65. //判断投票时间是否在起止时间内
  66. if (curr >= vote.startTime && curr <= vote.endTime)
  67. {
  68. string Field = "";
  69. RedisValue value;
  70. switch (vote.times) {
  71. case "once":
  72. // //如果是只能投票一次的活动则直接获取Redis的第一条 只能投一次
  73. Field = $"{userid}-once";
  74. HashEntry[] values = _azureRedis.GetRedisClient(8).HashGetAll($"Vote:Record:{vote.id}_{vote.code}");
  75. if (values != null && values.Length > 0)
  76. {
  77. value = new RedisValue();
  78. foreach (var val in values) {
  79. if (val.Name.ToString() == Field) {
  80. value = val.Value;
  81. break;
  82. }
  83. }
  84. msgid = await VoteIng(vote, value, msgid, option, Field, curr, _azureRedis, userid);
  85. }
  86. else
  87. {
  88. msgid = await VoteIng(vote, new RedisValue(), msgid, option, Field, curr, _azureRedis, userid);
  89. }
  90. break;
  91. case "day": //周期内每天
  92. Field = $"{userid}-day-{now.ToString("yyyyMMdd")}";
  93. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  94. msgid = await VoteIng(vote, value, msgid, option, Field, curr, _azureRedis,userid);
  95. break;
  96. case "week": //自然周
  97. Field = $"{userid}-week-{now.ToString("yyyy")}{GetWeek(now)}";
  98. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  99. msgid = await VoteIng(vote, value, msgid, option, Field, curr, _azureRedis, userid);
  100. break;
  101. case "month": //月份
  102. Field = $"{userid}-month-{now.ToString("yyyyMM")}";
  103. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  104. msgid = await VoteIng(vote, value, msgid, option, Field, curr, _azureRedis, userid);
  105. break;
  106. case "year"://年份
  107. Field = $"{userid}-year-{now.ToString("yyyy")}";
  108. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  109. msgid = await VoteIng(vote, value, msgid, option, Field, curr, _azureRedis, userid);
  110. break;
  111. }
  112. }
  113. else
  114. {
  115. msgid = 2;
  116. }
  117. }
  118. }
  119. catch (Exception e)
  120. {
  121. throw new Exception(e.StackTrace);
  122. }
  123. return msgid;
  124. }
  125. public static async Task<byte> VoteIng(Vote vote, RedisValue value, byte msgid, List<string> option, string Field, long curr, AzureRedisFactory _azureRedis,string userid)
  126. {
  127. if (!value.IsNullOrEmpty)
  128. {
  129. VoteRecord record=value.ToString().ToObject<VoteRecord>();
  130. //处理记录投票+当前设置的投票是否小于等于周期内最大投票数
  131. if (record.opt.Count + option.Count <= vote.voteNum)
  132. {
  133. record.opt.AddRange(option);
  134. record.time = curr;
  135. record.userid = userid;
  136. //保存投票记录
  137. bool status = await _azureRedis.GetRedisClient(8).HashSetAsync($"Vote:Record:{vote.id}_{vote.code}", Field, record.ToJsonString());
  138. //单独保存每个人方便查询的记录
  139. bool stuallstatus = await _azureRedis.GetRedisClient(8).HashSetAsync($"Vote:Record:{vote.id}_{vote.code}:{userid}", Field, record.ToJsonString());
  140. //当前投票分组计数存入活动的Redis
  141. var group_opt= option.GroupBy(x => x);
  142. foreach (var opt in group_opt) {
  143. await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Vote:Count:{vote.id}_{vote.code}", opt.Key, opt.Count());
  144. }
  145. msgid = 1;
  146. }
  147. else
  148. {
  149. msgid = 5;
  150. }
  151. }
  152. else
  153. {
  154. if (option.Count <= vote.voteNum)
  155. {
  156. //保存投票记录
  157. VoteRecord record = new VoteRecord { opt = option, time = curr, userid = userid };
  158. bool status = await _azureRedis.GetRedisClient(8).HashSetAsync($"Vote:Record:{vote.id}_{vote.code}", Field, record.ToJsonString());
  159. //单独保存每个人方便查询的记录
  160. bool stuallstatus = await _azureRedis.GetRedisClient(8).HashSetAsync($"Vote:Record:{vote.id}_{vote.code}:{userid}", Field, record.ToJsonString());
  161. //当前投票分组计数存入活动的Redis
  162. var group_opt = option.GroupBy(x => x);
  163. foreach (var opt in group_opt)
  164. {
  165. await _azureRedis.GetRedisClient(8).SortedSetIncrementAsync($"Vote:Count:{vote.id}_{vote.code}", opt.Key, opt.Count());
  166. }
  167. if (status)
  168. {
  169. msgid = 1;
  170. }
  171. }
  172. else {
  173. msgid = 5;
  174. }
  175. }
  176. return msgid;
  177. }
  178. /// <summary>
  179. /// 获取时间的在当年的第几周
  180. /// </summary>
  181. /// <param name="dt"></param>
  182. /// <returns></returns>
  183. public static int GetWeek(DateTimeOffset dt)
  184. {
  185. DateTimeOffset time = Convert.ToDateTime(dt.ToString("yyyy") + "-01-01");
  186. TimeSpan ts = dt - time;
  187. int iii = (int)time.DayOfWeek;
  188. int day = int.Parse(ts.TotalDays.ToString("F0"));
  189. if (iii == 0)
  190. {
  191. day--;
  192. }
  193. else
  194. {
  195. day = day - (7 - iii) - 1;
  196. }
  197. int week = ((day + 7) / 7) + 1;
  198. return week;
  199. }
  200. /// <summary>
  201. /// 学生端查询
  202. /// </summary>
  203. /// <param name="containerId">容器</param>
  204. /// <param name="requert"></param>
  205. /// <param name="id">登录者ID</param>
  206. /// <param name="_azureCosmos"></param>
  207. /// <returns></returns>
  208. public static async Task<(List<ActivityData> datas, string continuationTokenSchool,string continuationTokenTeacher)> FindAsStu( JsonElement requert, string id,string school, AzureCosmosFactory _azureCosmos,AzureRedisFactory _azureRedis)
  209. {
  210. if (string.IsNullOrWhiteSpace(id)) {
  211. id = requert.GetProperty("userid").GetString();
  212. }
  213. if (string.IsNullOrWhiteSpace(school))
  214. {
  215. school = requert.GetProperty("school").GetString();
  216. }
  217. //开始时间,默认最近三十天
  218. var stimestamp = DateTimeOffset.UtcNow.AddDays(-30).ToUnixTimeMilliseconds();
  219. if (!requert.TryGetProperty("stime", out JsonElement stime))
  220. {
  221. if (!stime.ValueKind.Equals(JsonValueKind.Undefined) && !stime.ValueKind.Equals(JsonValueKind.Null) &&stime.TryGetInt64(out long data))
  222. {
  223. stimestamp = data;
  224. }
  225. }
  226. string stimesql = $" c.startTime >= {stimestamp} ";
  227. //默认当前时间, 未开始的不能查询
  228. var etimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
  229. string etimesql = $" and c.startTime <= {etimestamp} ";
  230. var progresssql = "";
  231. if (!requert.TryGetProperty("progress", out JsonElement progress))
  232. {
  233. if (!progress.ValueKind.Equals(JsonValueKind.Undefined) && !progress.ValueKind.Equals(JsonValueKind.Null) && progress.ValueKind.Equals(JsonValueKind.String))
  234. {
  235. progresssql = $" and c.progress='{progresssql}' ";
  236. }
  237. }
  238. var typesql = "";
  239. if (!requert.TryGetProperty("type", out JsonElement type))
  240. {
  241. if (!type.ValueKind.Equals(JsonValueKind.Undefined) && !type.ValueKind.Equals(JsonValueKind.Null) && type.ValueKind.Equals(JsonValueKind.String))
  242. {
  243. typesql = $" and c.type='{typesql}' ";
  244. }
  245. }
  246. string continuationTokenSchool = null;
  247. string continuationTokenTeacher = null;
  248. //默认不指定返回大小
  249. int? topcout = null;
  250. if (!requert.TryGetProperty("count", out JsonElement jcount))
  251. {
  252. if (!jcount.ValueKind.Equals(JsonValueKind.Undefined) && !jcount.ValueKind.Equals(JsonValueKind.Null) && jcount.TryGetInt32(out int data))
  253. {
  254. topcout = data;
  255. }
  256. }
  257. //是否需要进行分页查询,默认不分页
  258. bool iscontinuation = false;
  259. //如果指定了返回大小
  260. if (!requert.TryGetProperty("continuationTokenSchool", out JsonElement continuationSchool))
  261. {
  262. //指定了cancellationToken continuationSchool
  263. if (!continuationSchool.ValueKind.Equals(JsonValueKind.Null) && continuationSchool.ValueKind.Equals(JsonValueKind.String))
  264. {
  265. continuationTokenSchool = continuationSchool.GetString();
  266. iscontinuation = true;
  267. }
  268. }
  269. //如果指定了返回大小
  270. if (!requert.TryGetProperty("continuationTokenTeacher", out JsonElement continuationTeacher))
  271. {
  272. //指定了cancellationToken 表示需要进行分页
  273. if (!continuationTeacher.ValueKind.Equals(JsonValueKind.Null) && continuationTeacher.ValueKind.Equals(JsonValueKind.String))
  274. {
  275. continuationTokenTeacher = continuationTeacher.GetString();
  276. iscontinuation = true;
  277. }
  278. }
  279. //个人tmdid
  280. string joinSqlTmdids = $"join A0 in c.tmdids";
  281. string andSqlTmdids = $" A0 in('{id}')";
  282. //班级
  283. string joinSqlClasses = "";
  284. string andSqlClasses = "";
  285. List<string> classes=null;
  286. if ( requert.TryGetProperty("classes", out JsonElement jclasses))
  287. {
  288. if (jclasses.ValueKind is JsonValueKind.Array ) {
  289. classes = jclasses.ToObject<List<string>>();
  290. if (classes.IsNotEmpty()) {
  291. joinSqlClasses = " join A1 in c.classes ";
  292. List<string> sqlList = new List<string>();
  293. classes.ForEach(x => { sqlList.Add($" '{x}' "); });
  294. string sql = string.Join(" , ", sqlList);
  295. andSqlClasses = $" A1 in ({sql}) ";
  296. }
  297. }
  298. }
  299. string tgSql = "";
  300. if (!string.IsNullOrWhiteSpace(joinSqlClasses))
  301. {
  302. tgSql = $"and ({andSqlTmdids} or {andSqlClasses } )";
  303. }
  304. else {
  305. tgSql = $"and {andSqlTmdids}";
  306. }
  307. //科目
  308. string joinSqlSubjects = "";
  309. string andSqlSubjects = "";
  310. if ( requert.TryGetProperty("subjects", out JsonElement jsubjects))
  311. {
  312. if (jsubjects.ValueKind is JsonValueKind.Array)
  313. {
  314. List<string> subjects = jsubjects.ToObject<List<string>>();
  315. if (subjects.IsNotEmpty()) {
  316. joinSqlSubjects = " join A2 in c.subjects ";
  317. List<string> sqlList = new List<string>();
  318. subjects.ForEach(x => { sqlList.Add($" '{x}' "); });
  319. string sql = string.Join(" , ", sqlList);
  320. andSqlSubjects = $" and A2 in ({sql}) ";
  321. }
  322. }
  323. }
  324. List<ActivityData> datas = new List<ActivityData>();
  325. var client = _azureCosmos.GetCosmosClient();
  326. if (!string.IsNullOrWhiteSpace(school)) {
  327. string querySchool = $" SELECT distinct value c FROM c {joinSqlTmdids} {joinSqlClasses} {joinSqlSubjects} where {stimesql} {etimesql} and c.pk='Activity' {progresssql} {typesql} {andSqlSubjects} {tgSql}";
  328. //查询数据归属学校的
  329. await foreach (var item in client.GetContainer("TEAMModelOS", "School").GetItemQueryStreamIterator(querySchool, continuationToken: continuationTokenSchool, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"Activity-{school}") }))
  330. {
  331. using var json = await JsonDocument.ParseAsync(item.ContentStream);
  332. if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
  333. {
  334. foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
  335. {
  336. datas.Add(obj.ToObject<ActivityData>());
  337. }
  338. //如果需要分页则跳出
  339. if (iscontinuation)
  340. {
  341. continuationTokenSchool = item.GetContinuationToken();
  342. break;
  343. }
  344. }
  345. }
  346. }
  347. //TODO会处理掉科目相关的
  348. //查询数据归属Common 私人教室的。
  349. string queryTeacher = $" SELECT distinct value c FROM c {joinSqlTmdids} {joinSqlClasses} where {stimesql} {etimesql} and c.pk='Activity' {progresssql} {typesql} {tgSql} ";
  350. await foreach (var item in client.GetContainer("TEAMModelOS", "Teacher").GetItemQueryStreamIterator(queryTeacher, continuationToken: continuationTokenTeacher, requestOptions: new QueryRequestOptions() { MaxItemCount = topcout, PartitionKey = new PartitionKey($"Activity-Common") }))
  351. {
  352. using var json = await JsonDocument.ParseAsync(item.ContentStream);
  353. if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
  354. {
  355. foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
  356. {
  357. datas.Add(obj.ToObject<ActivityData>());
  358. }
  359. //如果需要分页则跳出
  360. if (iscontinuation)
  361. {
  362. continuationTokenTeacher = item.GetContinuationToken();
  363. break;
  364. }
  365. }
  366. }
  367. bool tips = false;
  368. if (!requert.TryGetProperty("tips", out JsonElement jtips))
  369. {
  370. if (!jtips.ValueKind.Equals(JsonValueKind.Undefined) && !jtips.ValueKind.Equals(JsonValueKind.Null) && !jtips.ValueKind.Equals(JsonValueKind.True))
  371. {
  372. tips = jtips.GetBoolean();
  373. }
  374. }
  375. if (tips)
  376. {
  377. DoActivityTips activityTips;
  378. //TODO 处理活动tips 的res
  379. dynamic res = default;
  380. foreach (var data in datas)
  381. {
  382. switch (data.type)
  383. {
  384. //投票
  385. case "vote":
  386. activityTips = DoVoteTips;
  387. //msgid, //0不能投票,1可以投票,2不在时间范围内,3周期内的可投票数不足
  388. //voteCount 可用投票数
  389. res = activityTips(data, _azureCosmos, id, _azureRedis);
  390. break;
  391. //问卷
  392. case "survey":
  393. //msgid 0 已作答, 1未作答,2,未完成
  394. activityTips = DoSurveyTips;
  395. res = activityTips(data, _azureCosmos, id, _azureRedis);
  396. break;
  397. //评测
  398. case "exam":
  399. //msgid 0 已作答, 1未作答,2,未完成, 用时间控制 相关发布状态,并且展示相应的结果
  400. activityTips = DoExamTips;
  401. res = activityTips(data, _azureCosmos, id, _azureRedis);
  402. break;
  403. //学习活动
  404. case "learn":
  405. //msgid 0 已完成, 1未开始,2,未完成
  406. activityTips = DoLearnTips;
  407. res = activityTips(data, _azureCosmos, id, _azureRedis);
  408. break;
  409. //作业活动
  410. case "homework":
  411. //msgid 0 已作答, 1未作答,2,未完成,3已批改,且有错误,4已批改,已完成
  412. //index:0,1,5 错误题序
  413. activityTips = DoHomeworkTips;
  414. res = activityTips(data, _azureCosmos, id, _azureRedis);
  415. break;
  416. default: break;
  417. }
  418. }
  419. }
  420. return (datas, continuationTokenSchool,continuationTokenTeacher);
  421. }
  422. private async static Task<dynamic> DoVoteTips(ActivityData commonData , AzureCosmosFactory _azureCosmos,string userid,AzureRedisFactory _azureRedis)
  423. {
  424. Vote vote=null;
  425. var client = _azureCosmos.GetCosmosClient();
  426. await foreach (var item in client.GetContainer("TEAMModelOS", "Common").GetItemQueryIterator<Vote>($"select value c from c where c.id='{commonData.id}'",
  427. requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey(commonData.scode) }))
  428. {
  429. vote = item;
  430. break;
  431. }
  432. byte msgid = 0;
  433. int voteCount = 0;
  434. if (vote != null) {
  435. DateTimeOffset now = DateTimeOffset.UtcNow;
  436. long curr = now.ToUnixTimeMilliseconds();
  437. //判断投票时间是否在起止时间内
  438. if (curr >= vote.startTime && curr <= vote.endTime)
  439. {
  440. string Field = "";
  441. RedisValue value = default;
  442. switch (vote.times)
  443. {
  444. case "once":
  445. // //如果是只能投票一次的活动则直接获取Redis的第一条 只能投一次
  446. Field = $"{userid}-once";
  447. RedisValue[] values = _azureRedis.GetRedisClient(8).HashValues($"Vote:Record:{vote.id}_{vote.code}");
  448. if (values != null && values.Length>0)
  449. {
  450. value = values[0];
  451. }
  452. break;
  453. case "day": //周期内每天
  454. Field = $"{userid}-day-{now.ToString("yyyyMMdd")}";
  455. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  456. break;
  457. case "week": //自然周
  458. Field = $"{userid}-week-{now.ToString("yyyy")}{GetWeek(now)}";
  459. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  460. break;
  461. case "month": //月份
  462. Field = $"{userid}-month-{now.ToString("yyyyMM")}";
  463. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  464. break;
  465. case "year"://年份
  466. Field = $"{userid}-year-{now.ToString("yyyy")}";
  467. value = _azureRedis.GetRedisClient(8).HashGet($"Vote:Record:{vote.id}_{vote.code}", Field);
  468. break;
  469. }
  470. if (value != default && !value.IsNullOrEmpty)
  471. {
  472. List<string> opt = null;
  473. JsonElement record = value.ToString().ToObject<JsonElement>();
  474. if (record.TryGetProperty("opt", out JsonElement jopt)) {
  475. opt = jopt.ToObject<List<string>>();
  476. }
  477. if (opt != null)
  478. {
  479. //处理记录投票是否小于等于周期内最大投票数
  480. if (opt.Count <= vote.voteNum)
  481. {
  482. voteCount = vote.voteNum - opt.Count;
  483. msgid = 1;
  484. }
  485. else
  486. {
  487. //3周期内的可投票数不足
  488. msgid = 3;
  489. voteCount = 0;
  490. }
  491. }
  492. else {
  493. msgid = 1;
  494. voteCount = vote.voteNum;
  495. }
  496. }
  497. else {
  498. //未投票,可以投票
  499. msgid = 1;
  500. voteCount = vote.voteNum;
  501. }
  502. }
  503. else
  504. {
  505. msgid = 2;
  506. voteCount = 0;
  507. }
  508. }
  509. return new {msgid,voteCount };
  510. }
  511. private static dynamic DoHomeworkTips(ActivityData commonData, AzureCosmosFactory _azureCosmos, string id, AzureRedisFactory _azureRedis)
  512. {
  513. return null;
  514. }
  515. private static dynamic DoLearnTips(ActivityData commonData, AzureCosmosFactory _azureCosmos, string id, AzureRedisFactory _azureRedis)
  516. {
  517. return null;
  518. }
  519. private static dynamic DoExamTips(ActivityData commonData, AzureCosmosFactory _azureCosmos, string id, AzureRedisFactory _azureRedis)
  520. {
  521. return null;
  522. }
  523. private static dynamic DoSurveyTips(ActivityData commonData, AzureCosmosFactory _azureCosmos, string id, AzureRedisFactory _azureRedis)
  524. {
  525. return null;
  526. }
  527. }
  528. }