OapiAttendanceGroupMemberListbyidsRequest.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.attendance.group.member.listbyids request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.08.16
  7. */
  8. class OapiAttendanceGroupMemberListbyidsRequest
  9. {
  10. /**
  11. * 考勤组id
  12. **/
  13. private $groupId;
  14. /**
  15. * 成员id,可以是userId或者deptId
  16. **/
  17. private $memberIds;
  18. /**
  19. * 0 表示员工,1表示部门
  20. **/
  21. private $memberType;
  22. /**
  23. * 操作人userId
  24. **/
  25. private $opUserId;
  26. private $apiParas = array();
  27. public function setGroupId($groupId)
  28. {
  29. $this->groupId = $groupId;
  30. $this->apiParas["group_id"] = $groupId;
  31. }
  32. public function getGroupId()
  33. {
  34. return $this->groupId;
  35. }
  36. public function setMemberIds($memberIds)
  37. {
  38. $this->memberIds = $memberIds;
  39. $this->apiParas["member_ids"] = $memberIds;
  40. }
  41. public function getMemberIds()
  42. {
  43. return $this->memberIds;
  44. }
  45. public function setMemberType($memberType)
  46. {
  47. $this->memberType = $memberType;
  48. $this->apiParas["member_type"] = $memberType;
  49. }
  50. public function getMemberType()
  51. {
  52. return $this->memberType;
  53. }
  54. public function setOpUserId($opUserId)
  55. {
  56. $this->opUserId = $opUserId;
  57. $this->apiParas["op_user_id"] = $opUserId;
  58. }
  59. public function getOpUserId()
  60. {
  61. return $this->opUserId;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.attendance.group.member.listbyids";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->groupId,"groupId");
  74. RequestCheckUtil::checkNotNull($this->memberIds,"memberIds");
  75. RequestCheckUtil::checkMaxListSize($this->memberIds,20,"memberIds");
  76. RequestCheckUtil::checkNotNull($this->memberType,"memberType");
  77. RequestCheckUtil::checkNotNull($this->opUserId,"opUserId");
  78. }
  79. public function putOtherTextParam($key, $value) {
  80. $this->apiParas[$key] = $value;
  81. $this->$key = $value;
  82. }
  83. }