新增获取订单问诊评价
This commit is contained in:
@@ -91,11 +91,12 @@ class regulatoryPlatform
|
||||
/**
|
||||
* 上报 网络咨询(网络门诊)服务
|
||||
* @param array $arg
|
||||
* @return mixed
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function uploadConsult(array $arg){
|
||||
public function uploadConsult(array $arg): array
|
||||
{
|
||||
try {
|
||||
$this->redis = $this->container->get(Redis::class);
|
||||
|
||||
@@ -120,7 +121,46 @@ class regulatoryPlatform
|
||||
}
|
||||
}
|
||||
|
||||
return $response['data'];
|
||||
return $response;
|
||||
} catch (GuzzleException $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上报 网络复诊服务
|
||||
* @param array $arg
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function uploadFurtherConsult(array $arg): array
|
||||
{
|
||||
try {
|
||||
$this->redis = $this->container->get(Redis::class);
|
||||
|
||||
$access_token = $this->redis->get("regulatory_platform_access_token");
|
||||
if (empty($access_token)) {
|
||||
$access_token = $this->getAccessToken();
|
||||
}
|
||||
|
||||
$arg['accessToken'] = $access_token;
|
||||
$arg['clientId'] = $this->client_id;
|
||||
|
||||
$option = [
|
||||
"json" => $arg
|
||||
];
|
||||
|
||||
$response = $this->httpRequest($this->api_url . '/wjw/upload/uploadFurtherConsult', $option);
|
||||
if (isset($response['status'])) {
|
||||
if ($response['status'] != 0) {
|
||||
if (!empty($response['message'])) {
|
||||
throw new BusinessException($response['message']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $response;
|
||||
} catch (GuzzleException $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user