初始化提交
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Request\DoctorAuthRequest;
|
||||
use App\Request\UserDoctorRequest;
|
||||
use App\Services\DoctorAuthService;
|
||||
use App\Services\DoctorInquiryService;
|
||||
use App\Services\UserDoctorService;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
class UserDoctorController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* 获取医生专长列表
|
||||
* 身份认证
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function getAuthDoctorExpertise(): ResponseInterface
|
||||
{
|
||||
$UserDoctorService = new UserDoctorService();
|
||||
$data = $UserDoctorService->getAuthDoctorExpertise();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取医生问诊配置
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function getInquiryConfig(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(UserDoctorRequest::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(UserDoctorRequest::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(UserDoctorRequest::class);
|
||||
$request->scene('putInquiryConfig')->validateResolved();
|
||||
|
||||
$DoctorInquiryService = new DoctorInquiryService();
|
||||
$data = $DoctorInquiryService->putInquiryConfig();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user