OapiProjectPointAddRequest.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.project.point.add request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.08.09
  7. */
  8. class OapiProjectPointAddRequest
  9. {
  10. /**
  11. * 增加积分的时间戳毫秒数,如果为空使用系统当前毫秒数
  12. **/
  13. private $actionTime;
  14. /**
  15. * 规则代码(可空),如果不为空的话,score值使用ruleCode对应的score增加分数
  16. **/
  17. private $ruleCode;
  18. /**
  19. * 规则名称
  20. **/
  21. private $ruleName;
  22. /**
  23. * 本次增加积分:正数表示增加/负数表示扣减
  24. **/
  25. private $score;
  26. /**
  27. * 业务ID(固定值,农村积分传7001)
  28. **/
  29. private $tenantId;
  30. /**
  31. * 用户id
  32. **/
  33. private $userid;
  34. /**
  35. * 加积分的唯一幂等标志,建议使用UUID
  36. **/
  37. private $uuid;
  38. private $apiParas = array();
  39. public function setActionTime($actionTime)
  40. {
  41. $this->actionTime = $actionTime;
  42. $this->apiParas["action_time"] = $actionTime;
  43. }
  44. public function getActionTime()
  45. {
  46. return $this->actionTime;
  47. }
  48. public function setRuleCode($ruleCode)
  49. {
  50. $this->ruleCode = $ruleCode;
  51. $this->apiParas["rule_code"] = $ruleCode;
  52. }
  53. public function getRuleCode()
  54. {
  55. return $this->ruleCode;
  56. }
  57. public function setRuleName($ruleName)
  58. {
  59. $this->ruleName = $ruleName;
  60. $this->apiParas["rule_name"] = $ruleName;
  61. }
  62. public function getRuleName()
  63. {
  64. return $this->ruleName;
  65. }
  66. public function setScore($score)
  67. {
  68. $this->score = $score;
  69. $this->apiParas["score"] = $score;
  70. }
  71. public function getScore()
  72. {
  73. return $this->score;
  74. }
  75. public function setTenantId($tenantId)
  76. {
  77. $this->tenantId = $tenantId;
  78. $this->apiParas["tenant_id"] = $tenantId;
  79. }
  80. public function getTenantId()
  81. {
  82. return $this->tenantId;
  83. }
  84. public function setUserid($userid)
  85. {
  86. $this->userid = $userid;
  87. $this->apiParas["userid"] = $userid;
  88. }
  89. public function getUserid()
  90. {
  91. return $this->userid;
  92. }
  93. public function setUuid($uuid)
  94. {
  95. $this->uuid = $uuid;
  96. $this->apiParas["uuid"] = $uuid;
  97. }
  98. public function getUuid()
  99. {
  100. return $this->uuid;
  101. }
  102. public function getApiMethodName()
  103. {
  104. return "dingtalk.oapi.project.point.add";
  105. }
  106. public function getApiParas()
  107. {
  108. return $this->apiParas;
  109. }
  110. public function check()
  111. {
  112. RequestCheckUtil::checkNotNull($this->actionTime,"actionTime");
  113. RequestCheckUtil::checkNotNull($this->ruleName,"ruleName");
  114. RequestCheckUtil::checkNotNull($this->score,"score");
  115. RequestCheckUtil::checkNotNull($this->tenantId,"tenantId");
  116. RequestCheckUtil::checkNotNull($this->userid,"userid");
  117. RequestCheckUtil::checkNotNull($this->uuid,"uuid");
  118. }
  119. public function putOtherTextParam($key, $value) {
  120. $this->apiParas[$key] = $value;
  121. $this->$key = $value;
  122. }
  123. }