新增获取用户地址。修改获取检测机构合作医生列表接口,拆分为两个接口

This commit is contained in:
2023-08-23 17:19:17 +08:00
parent e56e4c2606
commit fac54d3287
6 changed files with 123 additions and 108 deletions
+6
View File
@@ -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);
+11
View File
@@ -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);
}
}