This commit is contained in:
wucongxing 2023-04-07 17:00:01 +08:00
parent ff03d3b1e6
commit 5cb91fd4b6
4 changed files with 24 additions and 1 deletions

View File

@ -89,4 +89,20 @@ class DoctorAccountController extends AbstractController
$data = $DoctorAccountService->getDoctorWithdrawalRecordList(); $data = $DoctorAccountService->getDoctorWithdrawalRecordList();
return $this->response->json($data); return $this->response->json($data);
} }
/**
* 发起提现
* @return ResponseInterface
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function addDoctorWithdrawal(): ResponseInterface
{
$request = $this->container->get(DoctorAccountRequest::class);
$request->scene('addDoctorWithdrawal')->validateResolved();
$DoctorAccountService = new DoctorAccountService();
$data = $DoctorAccountService->addDoctorWithdrawal();
return $this->response->json($data);
}
} }

View File

@ -174,7 +174,7 @@ class OrderInquiry extends Model
public static function getDoctorOrderInquiryPage(array $params,array $fields = ["*"], int $page = null, ?int $per_page = 10): mixed public static function getDoctorOrderInquiryPage(array $params,array $fields = ["*"], int $page = null, ?int $per_page = 10): mixed
{ {
$raw = self::where($params) $raw = self::where($params)
->orderBy('finish_time') ->orderBy('finish_time','desc')
->paginate($per_page, $fields, "page", $page); ->paginate($per_page, $fields, "page", $page);
$data = array(); $data = array();

View File

@ -22,6 +22,10 @@ class DoctorAccountRequest extends FormRequest
'getDoctorWithdrawalInfo' => [ // 获取提现数据 'getDoctorWithdrawalInfo' => [ // 获取提现数据
'order_inquiry_ids', 'order_inquiry_ids',
], ],
'addDoctorWithdrawal' => [ // 发起提现
'order_inquiry_ids',
'order_inquiry_ids',
],
]; ];
/** /**

View File

@ -135,6 +135,9 @@ Router::addGroup('/doctor', function () {
// 获取医生提现记录列表 // 获取医生提现记录列表
Router::get('/record', [DoctorAccountController::class, 'getDoctorWithdrawalRecordList']); Router::get('/record', [DoctorAccountController::class, 'getDoctorWithdrawalRecordList']);
// 发起提现
Router::post('', [DoctorAccountController::class, 'addDoctorWithdrawal']);
}); });
// 订单 // 订单