| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace App\Services;
- use AlibabaAlihealthSynergyYzwQuerysealdrugreportRequest;
- use TopClient;
- class AlihealthService
- {
- private $client;
- private $config;
- public function __construct()
- {
- $this->config = config('taobao');
- $this->client = new TopClient;
- $this->client->appkey = $this->config['app_key'];
- $this->client->secretKey = $this->config['secret_key'];
- $this->client->format = "json";
- }
- /**
- * 查询上传报告信息接口(@link https://open.taobao.com/api.htm?docId=70145&docType=2&scopeId=30361)
- * @param string $beginTime
- * @param string $endTime
- * @param int $page
- * @param int $pageSize
- * @param int $isSeal
- * @return void
- */
- public function querySealDrugReport(string $beginTime, string $endTime, int $page = 1, int $pageSize = 20, int $isSeal = 0)
- {
- $req = new AlibabaAlihealthSynergyYzwQuerysealdrugreportRequest;
- $req->setRefEntId($this->config['enterprise_id']);
- $req->setBeginTime($beginTime);
- $req->setEndTime($endTime);
- $req->setPage($page);
- $req->setPageSize($pageSize);
- if ($isSeal) {
- $req->setStatus($isSeal);
- }
- $resp = $this->client->execute($req);
- dd($resp);
- }
- }
|