新增获取用户地址。修改获取检测机构合作医生列表接口,拆分为两个接口
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Request\DetectionRequest;
|
||||
use App\Request\UserRequest;
|
||||
use App\Services\DetectionService;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
@@ -35,9 +36,14 @@ class DetectionController extends AbstractController
|
||||
/**
|
||||
* 获取检测机构合作医生列表
|
||||
* @return ResponseInterface
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function getDetectionDoctorList(): ResponseInterface
|
||||
{
|
||||
$request = $this->container->get(DetectionRequest::class);
|
||||
$request->scene('getDetectionDoctorList')->validateResolved();
|
||||
|
||||
$detectionService = new DetectionService();
|
||||
$data = $detectionService->getDetectionDoctorList();
|
||||
return $this->response->json($data);
|
||||
|
||||
@@ -178,4 +178,15 @@ class UserController extends AbstractController
|
||||
$data = $UserService->postLocation();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户地址
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function getLocation(): ResponseInterface
|
||||
{
|
||||
$UserService = new UserService();
|
||||
$data = $UserService->getLocation();
|
||||
return $this->response->json($data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user