初始化仓库
This commit is contained in:
63
member/modules/v1/controllers/PrescripOrderController.php
Normal file
63
member/modules/v1/controllers/PrescripOrderController.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace member\modules\v1\controllers;
|
||||
|
||||
use common\core\BaseAppController;
|
||||
use common\forms\PrescripRefundForm;
|
||||
use common\models\DrugUseWay;
|
||||
use member\models\forms\PrescripOrderSubmitForm;
|
||||
|
||||
/**
|
||||
* @doc-module 处方支付订单
|
||||
*/
|
||||
class PrescripOrderController extends BaseAppController
|
||||
{
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
public function actionSubmit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @doc-name 支付处方
|
||||
* @doc-param int order_id 订单id
|
||||
* @doc-return int is_paid 1已支付0未支付
|
||||
* @doc-return int order_id 订单id
|
||||
* @doc-return array config 支付配置参数,在is_paid=0时返回
|
||||
*/
|
||||
public function actionPay()
|
||||
{
|
||||
$post = \Yii::$app->request->post();
|
||||
$this->requestValidate($post,[
|
||||
['order_id','required']
|
||||
]);
|
||||
$form = new PrescripOrderSubmitForm();
|
||||
return $form->getPayData($post['order_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
*@doc-name 处方退款
|
||||
*@doc-param int order_id 订单id
|
||||
*/
|
||||
public function actionCancel()
|
||||
{
|
||||
$post = \Yii::$app->request->post();
|
||||
$this->requestValidate($post,[
|
||||
['order_id','required']
|
||||
]);
|
||||
$form= new PrescripRefundForm();
|
||||
return $form->refund($post['order_id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @doc-name 中药的使用煎熬方式
|
||||
* @doc-return mixed @drug-use-way{*}
|
||||
*/
|
||||
public function actionUseWay()
|
||||
{
|
||||
return DrugUseWay::find()->all();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user