OapiEduSubjectListRequest.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.edu.subject.list request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.10.14
  7. */
  8. class OapiEduSubjectListRequest
  9. {
  10. /**
  11. * 游标
  12. **/
  13. private $cursor;
  14. /**
  15. * 排序依赖字段类型
  16. **/
  17. private $dataOrderType;
  18. /**
  19. * 用户id
  20. **/
  21. private $operatorUserid;
  22. /**
  23. * 学段编码
  24. **/
  25. private $periodCode;
  26. /**
  27. * 每页数据条数
  28. **/
  29. private $size;
  30. /**
  31. * 排序规则(0:升序,1:降序)
  32. **/
  33. private $sortType;
  34. /**
  35. * 学科编码列表
  36. **/
  37. private $subjectCodeList;
  38. private $apiParas = array();
  39. public function setCursor($cursor)
  40. {
  41. $this->cursor = $cursor;
  42. $this->apiParas["cursor"] = $cursor;
  43. }
  44. public function getCursor()
  45. {
  46. return $this->cursor;
  47. }
  48. public function setDataOrderType($dataOrderType)
  49. {
  50. $this->dataOrderType = $dataOrderType;
  51. $this->apiParas["data_order_type"] = $dataOrderType;
  52. }
  53. public function getDataOrderType()
  54. {
  55. return $this->dataOrderType;
  56. }
  57. public function setOperatorUserid($operatorUserid)
  58. {
  59. $this->operatorUserid = $operatorUserid;
  60. $this->apiParas["operator_userid"] = $operatorUserid;
  61. }
  62. public function getOperatorUserid()
  63. {
  64. return $this->operatorUserid;
  65. }
  66. public function setPeriodCode($periodCode)
  67. {
  68. $this->periodCode = $periodCode;
  69. $this->apiParas["period_code"] = $periodCode;
  70. }
  71. public function getPeriodCode()
  72. {
  73. return $this->periodCode;
  74. }
  75. public function setSize($size)
  76. {
  77. $this->size = $size;
  78. $this->apiParas["size"] = $size;
  79. }
  80. public function getSize()
  81. {
  82. return $this->size;
  83. }
  84. public function setSortType($sortType)
  85. {
  86. $this->sortType = $sortType;
  87. $this->apiParas["sort_type"] = $sortType;
  88. }
  89. public function getSortType()
  90. {
  91. return $this->sortType;
  92. }
  93. public function setSubjectCodeList($subjectCodeList)
  94. {
  95. $this->subjectCodeList = $subjectCodeList;
  96. $this->apiParas["subject_code_list"] = $subjectCodeList;
  97. }
  98. public function getSubjectCodeList()
  99. {
  100. return $this->subjectCodeList;
  101. }
  102. public function getApiMethodName()
  103. {
  104. return "dingtalk.oapi.edu.subject.list";
  105. }
  106. public function getApiParas()
  107. {
  108. return $this->apiParas;
  109. }
  110. public function check()
  111. {
  112. RequestCheckUtil::checkNotNull($this->cursor,"cursor");
  113. RequestCheckUtil::checkNotNull($this->operatorUserid,"operatorUserid");
  114. RequestCheckUtil::checkNotNull($this->periodCode,"periodCode");
  115. RequestCheckUtil::checkNotNull($this->size,"size");
  116. RequestCheckUtil::checkMaxListSize($this->subjectCodeList,999,"subjectCodeList");
  117. }
  118. public function putOtherTextParam($key, $value) {
  119. $this->apiParas[$key] = $value;
  120. $this->$key = $value;
  121. }
  122. }