初始化提交

This commit is contained in:
2023-02-17 17:10:16 +08:00
commit 4ca844f470
152 changed files with 20390 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
<?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);
}
}