1. 推广员用户挂号

This commit is contained in:
李琦
2026-07-03 09:35:12 +08:00
parent 5f5ef87b44
commit da00506088

View File

@@ -32,6 +32,30 @@ class PrescriptionCreated extends BaseJob implements JobInterface
throw new Exception('处方不存在或已取消');
}
PrescriptionLog::saveLog($this->orderId,'处方订单生成通知用户支付订阅消息发送队列 load');
PrescriptionLog::saveLog($this->orderId,json_encode([
'touser' => $Prescription->user->openid,
'template_id' => \Yii::$app->params['template']['user']['prescription_created'],
'page' => 'subPackages/my/myrecord-detail?id='.$Prescription->id.'&no='.$Prescription->prescription_no,
'data' => [
'name1' => [
'value' => $Prescription->userPatient->name,
],
'thing2' => [
'value' => $Prescription->clinical_diagnose,
],
'name4' => [
'value' => $Prescription->doctorInfo->name,
],
'time9' => [
'value' => date('Y-m-d H:i:s',$Prescription->created_at),
],
'thing11' => [
'value' => '医生已为您开具处方,请尽快前往支付!',
]
]
]));
PrescriptionLog::saveLog($this->orderId,'处方订单生成通知用户支付订阅消息发送队列 load end');
$result = WechatService::getInstance()->app->subscribe_message->send([
'touser' => $Prescription->user->openid,
'template_id' => \Yii::$app->params['template']['user']['prescription_created'],