新增医生问诊配置相关接口
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
// 医生问诊配置
|
||||
use App\Request\DoctorInquiryConfigRequest;
|
||||
use App\Request\UserDoctorRequest;
|
||||
use App\Services\DoctorInquiryService;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class DoctorInquiryConfigController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* 获取医生问诊配置
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function getInquiryConfig(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DoctorInquiryConfigRequest::class);
|
||||
$request->scene('getInquiryConfig')->validateResolved();
|
||||
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
$data = $DoctorInquiryService->getInquiryConfig();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 医生问诊开关
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function putInquiryOpen(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DoctorInquiryConfigRequest::class);
|
||||
$request->scene('putInquiryOpen')->validateResolved();
|
||||
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
$data = $DoctorInquiryService->putInquiryOpen();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改医生问诊配置
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function putInquiryConfig(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DoctorInquiryConfigRequest::class);
|
||||
$request->scene('putInquiryConfig')->validateResolved();
|
||||
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
$data = $DoctorInquiryService->putInquiryConfig();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医生问诊配置-服务设置
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function getInquiryServiceConfig(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DoctorInquiryConfigRequest::class);
|
||||
$request->scene('getInquiryServiceConfig')->validateResolved();
|
||||
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
$data = $DoctorInquiryService->getInquiryServiceConfig();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增医生问诊配置-服务设置
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function addInquiryServiceConfig(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DoctorInquiryConfigRequest::class);
|
||||
$request->scene('addInquiryServiceConfig')->validateResolved();
|
||||
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
$data = $DoctorInquiryService->addInquiryServiceConfig();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改医生问诊配置-服务设置
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function putInquiryServiceConfig(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DoctorInquiryConfigRequest::class);
|
||||
$request->scene('putInquiryServiceConfig')->validateResolved();
|
||||
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
$data = $DoctorInquiryService->putInquiryServiceConfig();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user