59 lines
1.7 KiB
PHP
59 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Request\DoctorAccountRequest;
|
|
use App\Request\UserDoctorRequest;
|
|
use App\Services\DoctorAccountService;
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
use Psr\Container\NotFoundExceptionInterface;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
/**
|
|
* 医生账户
|
|
*/
|
|
class DoctorAccountController extends AbstractController
|
|
{
|
|
/**
|
|
* 获取我的账户数据
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function getDoctorAccount(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(DoctorAccountRequest::class);
|
|
$request->scene('getDoctorAccount')->validateResolved();
|
|
|
|
$DoctorAccountService = new DoctorAccountService();
|
|
$data = $DoctorAccountService->getDoctorAccount();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取我的账户日账单明细数据
|
|
* @return ResponseInterface
|
|
* @throws ContainerExceptionInterface
|
|
* @throws NotFoundExceptionInterface
|
|
*/
|
|
public function getDoctorAccountInfo(): ResponseInterface
|
|
{
|
|
$request = $this->container->get(DoctorAccountRequest::class);
|
|
$request->scene('getDoctorAccountInfo')->validateResolved();
|
|
|
|
$DoctorAccountService = new DoctorAccountService();
|
|
$data = $DoctorAccountService->getDoctorAccountInfo();
|
|
return $this->response->json($data);
|
|
}
|
|
|
|
/**
|
|
* 获取提现数据
|
|
* @return ResponseInterface
|
|
*/
|
|
public function getDoctorWithdrawal(): ResponseInterface
|
|
{
|
|
$DoctorAccountService = new DoctorAccountService();
|
|
$data = $DoctorAccountService->getDoctorWithdrawal();
|
|
return $this->response->json($data);
|
|
}
|
|
} |