迁移并合并医生问诊评价接口

This commit is contained in:
2023-02-24 16:11:51 +08:00
parent d944b04536
commit c128a3724d
16 changed files with 414 additions and 222 deletions
+40
View File
@@ -3,7 +3,9 @@
namespace App\Controller;
use App\Request\BasicDataRequest;
use App\Request\DiseaseRequest;
use App\Services\BasicDataService;
use App\Services\DiseaseService;
use App\Services\SafeService;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
@@ -73,4 +75,42 @@ class BasicDataController extends AbstractController
$data = $BasicDataService->getOperationManualInfo();
return $this->response->json($data);
}
/**
* 搜索疾病分类
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getDiseaseSearch(): ResponseInterface
{
$request = $this->container->get(BasicDataRequest::class);
$request->scene('getDiseaseSearch')->validateResolved();
$BasicDataService = new BasicDataService();
$data = $BasicDataService->getDiseaseSearch();
return $this->response->json($data);
}
/**
* 获取常见疾病分类
* @return ResponseInterface
*/
public function getDiseaseHot(): ResponseInterface
{
$BasicDataService = new BasicDataService();
$data = $BasicDataService->getDiseaseHot();
return $this->response->json($data);
}
/**
* 专长列表
* @return ResponseInterface
*/
public function getDiseaseExpertiseList(): ResponseInterface
{
$BasicDataService = new BasicDataService();
$data = $BasicDataService->getDiseaseExpertiseList();
return $this->response->json($data);
}
}
-50
View File
@@ -1,50 +0,0 @@
<?php
namespace App\Controller;
use App\Request\DiseaseRequest;
use App\Services\DiseaseService;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;
class DiseaseController extends AbstractController
{
/**
* 专长列表
* @return ResponseInterface
*/
public function getDiseaseExpertiseList(): ResponseInterface
{
$DiseaseService = new DiseaseService();
$data = $DiseaseService->getDiseaseExpertiseList();
return $this->response->json($data);
}
/**
* 搜索疾病分类
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getDiseaseSearch(): ResponseInterface
{
$request = $this->container->get(DiseaseRequest::class);
$request->scene('getDiseaseSearch')->validateResolved();
$DiseaseService = new DiseaseService();
$data = $DiseaseService->getDiseaseSearch();
return $this->response->json($data);
}
/**
* 获取常见疾病分类
* @return ResponseInterface
*/
public function getDiseaseHot(): ResponseInterface
{
$DiseaseService = new DiseaseService();
$data = $DiseaseService->getDiseaseHot();
return $this->response->json($data);
}
}
@@ -42,17 +42,6 @@ class PatientDoctorController extends AbstractController
return $this->response->json($data);
}
/**
* 获取医生评价
* @return ResponseInterface
*/
public function getDoctorEvaluationList(): ResponseInterface
{
$PatientDoctorService = new PatientDoctorService();
$data = $PatientDoctorService->getDoctorEvaluationList();
return $this->response->json($data);
}
/**
* 医生详情简介-详情中的简介
* @return ResponseInterface
+46
View File
@@ -154,5 +154,51 @@ class UserDoctorController extends AbstractController
return $this->response->json($data);
}
/**
* 获取常用语列表
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getDoctorWords(): ResponseInterface
{
$request = $this->container->get(UserDoctorRequest::class);
$request->scene('getDoctorWords')->validateResolved();
$UserDoctorService = new UserDoctorService();
$data = $UserDoctorService->getDoctorWords();
return $this->response->json($data);
}
/**
* 新增常用语列表
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function addDoctorWords(): ResponseInterface
{
$request = $this->container->get(UserDoctorRequest::class);
$request->scene('addDoctorWords')->validateResolved();
$UserDoctorService = new UserDoctorService();
$data = $UserDoctorService->addDoctorWords();
return $this->response->json($data);
}
/**
* 获取医生评价
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getDoctorEvaluationList(): ResponseInterface
{
$request = $this->container->get(UserDoctorRequest::class);
$request->scene('getDoctorEvaluationList')->validateResolved();
$UserDoctorService = new UserDoctorService();
$data = $UserDoctorService->getDoctorEvaluationList();
return $this->response->json($data);
}
}