OverallEducationService.cs 796 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Text.Json;
  6. using System.Threading.Tasks;
  7. namespace TEAMModelOS.SDK.Models
  8. {
  9. public static class OverallEducationService
  10. {
  11. public static Dictionary<string, object> GetQueryCond(JsonElement request) {
  12. Dictionary<string, object> dict = new Dictionary<string, object>();
  13. if (request.TryGetProperty("periodId", out JsonElement periodId) && !string.IsNullOrWhiteSpace($"{periodId}"))
  14. {
  15. dict.Add("periodId", periodId);
  16. }
  17. if (request.TryGetProperty("classIds", out JsonElement classIds))
  18. {
  19. dict.Add("classId[*]", classIds);
  20. }
  21. return dict;
  22. }
  23. }
  24. }