46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Request\DoctorPharmacyRequest;
|
|
use App\Services\DoctorPharmacyService;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
class DoctorPharmacyController extends AbstractController
|
|
{
|
|
/**
|
|
* 获取医生绑定的药房列表
|
|
*/
|
|
public function getDoctorPharmacyList(): ResponseInterface
|
|
{
|
|
$service = new DoctorPharmacyService();
|
|
$data = $service->getDoctorPharmacyList();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 设置医生默认药房
|
|
*/
|
|
public function setDoctorDefaultPharmacy(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(DoctorPharmacyRequest::class);
|
|
$request->scene('setDefault')->validateResolved();
|
|
|
|
$service = new DoctorPharmacyService();
|
|
$data = $service->setDoctorDefaultPharmacy();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取平台公开正常运营的药房列表
|
|
*/
|
|
public function getPublicPharmacyList(): ResponseInterface
|
|
{
|
|
$service = new DoctorPharmacyService();
|
|
$data = $service->getPublicPharmacyList();
|
|
return $this->response->json($data);
|
|
}
|
|
}
|