AlibabaAlihealthSynergyYzwSavedatabucketRequest.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * TOP API: alibaba.alihealth.synergy.yzw.savedatabucket request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2025.10.22
  7. */
  8. class AlibabaAlihealthSynergyYzwSavedatabucketRequest
  9. {
  10. /**
  11. * 文件字节数组转base64: 1)读取文件转成byte[], 然后拆分字节数组分批上传。类似分页,每一页字节数组大小建议设置2000000(即2M),之后转成base64,调用此接口上传。 2)循环N次后,把接口返回的结果使用逗号拼接隔开,传给其他接口作为文件URL。
  12. **/
  13. private $base64Data;
  14. /**
  15. * 文件名,支持pdf , png ,jpg 等
  16. **/
  17. private $fileName;
  18. /**
  19. * 企业ID
  20. **/
  21. private $refEntId;
  22. private $apiParas = array();
  23. public function setBase64Data($base64Data)
  24. {
  25. $this->base64Data = $base64Data;
  26. $this->apiParas["base64_data"] = $base64Data;
  27. }
  28. public function getBase64Data()
  29. {
  30. return $this->base64Data;
  31. }
  32. public function setFileName($fileName)
  33. {
  34. $this->fileName = $fileName;
  35. $this->apiParas["file_name"] = $fileName;
  36. }
  37. public function getFileName()
  38. {
  39. return $this->fileName;
  40. }
  41. public function setRefEntId($refEntId)
  42. {
  43. $this->refEntId = $refEntId;
  44. $this->apiParas["ref_ent_id"] = $refEntId;
  45. }
  46. public function getRefEntId()
  47. {
  48. return $this->refEntId;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "alibaba.alihealth.synergy.yzw.savedatabucket";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->base64Data,"base64Data");
  61. RequestCheckUtil::checkNotNull($this->fileName,"fileName");
  62. RequestCheckUtil::checkNotNull($this->refEntId,"refEntId");
  63. }
  64. public function putOtherTextParam($key, $value) {
  65. $this->apiParas[$key] = $value;
  66. $this->$key = $value;
  67. }
  68. }