OapiCheckinRecordGetRequest.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.checkin.record.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.07.09
  7. */
  8. class OapiCheckinRecordGetRequest
  9. {
  10. /**
  11. * 分页查询的游标,最开始可以传0
  12. **/
  13. private $cursor;
  14. /**
  15. * 截止时间,单位毫秒。如果是取1个人的数据,时间范围最大到10天,如果是取多个人的数据,时间范围最大1天。
  16. **/
  17. private $endTime;
  18. /**
  19. * 分页查询的每页大小,最大100
  20. **/
  21. private $size;
  22. /**
  23. * 起始时间,单位毫秒
  24. **/
  25. private $startTime;
  26. /**
  27. * 需要查询的用户列表
  28. **/
  29. private $useridList;
  30. private $apiParas = array();
  31. public function setCursor($cursor)
  32. {
  33. $this->cursor = $cursor;
  34. $this->apiParas["cursor"] = $cursor;
  35. }
  36. public function getCursor()
  37. {
  38. return $this->cursor;
  39. }
  40. public function setEndTime($endTime)
  41. {
  42. $this->endTime = $endTime;
  43. $this->apiParas["end_time"] = $endTime;
  44. }
  45. public function getEndTime()
  46. {
  47. return $this->endTime;
  48. }
  49. public function setSize($size)
  50. {
  51. $this->size = $size;
  52. $this->apiParas["size"] = $size;
  53. }
  54. public function getSize()
  55. {
  56. return $this->size;
  57. }
  58. public function setStartTime($startTime)
  59. {
  60. $this->startTime = $startTime;
  61. $this->apiParas["start_time"] = $startTime;
  62. }
  63. public function getStartTime()
  64. {
  65. return $this->startTime;
  66. }
  67. public function setUseridList($useridList)
  68. {
  69. $this->useridList = $useridList;
  70. $this->apiParas["userid_list"] = $useridList;
  71. }
  72. public function getUseridList()
  73. {
  74. return $this->useridList;
  75. }
  76. public function getApiMethodName()
  77. {
  78. return "dingtalk.oapi.checkin.record.get";
  79. }
  80. public function getApiParas()
  81. {
  82. return $this->apiParas;
  83. }
  84. public function check()
  85. {
  86. RequestCheckUtil::checkNotNull($this->cursor,"cursor");
  87. RequestCheckUtil::checkNotNull($this->endTime,"endTime");
  88. RequestCheckUtil::checkNotNull($this->size,"size");
  89. RequestCheckUtil::checkNotNull($this->startTime,"startTime");
  90. RequestCheckUtil::checkNotNull($this->useridList,"useridList");
  91. RequestCheckUtil::checkMaxListSize($this->useridList,10,"useridList");
  92. }
  93. public function putOtherTextParam($key, $value) {
  94. $this->apiParas[$key] = $value;
  95. $this->$key = $value;
  96. }
  97. }