diff --git a/src/OpenPlatform/Authorizer/Mini/Model/VersionAuditContentBuilder.php b/src/OpenPlatform/Authorizer/Mini/Model/VersionAuditContentBuilder.php index 7868ac3..765683f 100644 --- a/src/OpenPlatform/Authorizer/Mini/Model/VersionAuditContentBuilder.php +++ b/src/OpenPlatform/Authorizer/Mini/Model/VersionAuditContentBuilder.php @@ -7,7 +7,9 @@ */ namespace EasyAlipay\OpenPlatform\Authorizer\Mini\Model; -class VersionAuditContentBuilder +use EasyAlipay\Kernel\AppRequest; + +class VersionAuditContentBuilder extends AppRequest { /** * @var string 小程序版本号 @@ -25,22 +27,6 @@ class VersionAuditContentBuilder * @var array 省市区信息,当区域类型为LOCATION时,不能为空 */ private $serviceRegionInfo; - /** - * @var array 参数数组 - */ - private $bizContentarr = []; - /** - * @var string 参数字符串 - */ - private $bizContent = NULL; - - public function getBizContent() - { - if (!empty($this->bizContentarr)) { - $this->bizContent = json_encode($this->bizContentarr, JSON_UNESCAPED_UNICODE); - } - return $this->bizContent; - } /** * @param $appVersion @@ -48,7 +34,7 @@ class VersionAuditContentBuilder public function setAppVersion($appVersion) { $this->appVersion = $appVersion; - $this->bizContentarr['app_version'] = $appVersion; + $this->apiParas['app_version'] = $appVersion; } /** @@ -65,7 +51,7 @@ class VersionAuditContentBuilder public function setVersionDesc($versionDesc) { $this->versionDesc = $versionDesc; - $this->bizContentarr['version_desc'] = $versionDesc; + $this->apiParas['version_desc'] = $versionDesc; } /** @@ -82,7 +68,7 @@ class VersionAuditContentBuilder public function setRegionType($regionType) { $this->regionType = $regionType; - $this->bizContentarr['region_type'] = $regionType; + $this->apiParas['region_type'] = $regionType; } /** @@ -99,7 +85,7 @@ class VersionAuditContentBuilder public function setServiceRegionInfo($serviceRegionInfo) { $this->serviceRegionInfo = $serviceRegionInfo; - $this->bizContentarr['service_region_info'] = $serviceRegionInfo; + $this->apiParas['service_region_info'] = $serviceRegionInfo; } /** @@ -117,7 +103,7 @@ class VersionAuditContentBuilder public function setParams($params) { foreach ($params as $k => $v) { - $this->bizContentarr[$k] = $v; + $this->apiParas[$k] = $v; } } } \ No newline at end of file diff --git a/src/OpenPlatform/Authorizer/Mini/Version/Client.php b/src/OpenPlatform/Authorizer/Mini/Version/Client.php index 275b770..d9bfc33 100644 --- a/src/OpenPlatform/Authorizer/Mini/Version/Client.php +++ b/src/OpenPlatform/Authorizer/Mini/Version/Client.php @@ -63,16 +63,14 @@ class Client extends AppClient */ public function audit(string $appVersion, string $versionDesc, string $regionType, array $serviceRegionInfo = [], array $params = []) { - $contentBuilder = new VersionAuditContentBuilder(); - $contentBuilder->setAppVersion($appVersion); - $contentBuilder->setVersionDesc($versionDesc); - $contentBuilder->setRegionType($regionType); + $request = new VersionAuditContentBuilder(); + $request->setAppVersion($appVersion); + $request->setVersionDesc($versionDesc); + $request->setRegionType($regionType); if ($regionType == 'LOCATION') { - $contentBuilder->setServiceRegionInfo($serviceRegionInfo); + $request->setServiceRegionInfo($serviceRegionInfo); } - $contentBuilder->setParams($params); - $request = new AppRequest(); - $request->setBizContent($contentBuilder->getBizContent()); + $request->setParams($params); $request->setApiMethodName("alipay.open.mini.version.audit.apply"); return ($this->execute($request)); }