新增api通知处方生成功能
This commit is contained in:
@@ -701,7 +701,6 @@ class PrescriptionController extends BaseAppController
|
||||
|
||||
public function actionNotifyOrderGeneration()
|
||||
{
|
||||
return ['测试'];
|
||||
$param = \Yii::$app->request->post();
|
||||
$this->requestValidate($param, [
|
||||
['prescription', 'required'],
|
||||
@@ -709,18 +708,18 @@ class PrescriptionController extends BaseAppController
|
||||
]);
|
||||
$prescription = $param['prescription'];
|
||||
$productOrder = $param['product_order'];
|
||||
// //触发处方自动失效事件
|
||||
// $prescriptionEvent = new PrescriptionEvent();
|
||||
// $prescriptionEvent->prescription = $prescription;
|
||||
// $prescriptionEvent->sender = $this;
|
||||
// \Yii::$app->trigger(Prescription::AUTO_EXPIRE, $prescriptionEvent);
|
||||
//触发处方自动失效事件
|
||||
$prescriptionEvent = new PrescriptionEvent();
|
||||
$prescriptionEvent->prescription = $prescription;
|
||||
$prescriptionEvent->sender = $this;
|
||||
\Yii::$app->trigger(Prescription::AUTO_EXPIRE, $prescriptionEvent);
|
||||
|
||||
|
||||
//触发订单创建事件
|
||||
// $event = new ProductOrderEvent();
|
||||
// $event->order = $productOrder;
|
||||
// $event->sender = $this;
|
||||
// \Yii::$app->trigger(ProductOrder::EVENT_CREATED, $event);
|
||||
$event = new ProductOrderEvent();
|
||||
$event->order = $productOrder;
|
||||
$event->sender = $this;
|
||||
\Yii::$app->trigger(ProductOrder::EVENT_CREATED, $event);
|
||||
|
||||
//处方开具待支付订阅消息通知
|
||||
\Yii::$app->queue->push(new PrescriptionCreated([
|
||||
|
||||
Reference in New Issue
Block a user