新增上报失败短信推送

This commit is contained in:
2023-09-15 09:18:22 +08:00
parent 094696df2c
commit 9d454e9ad6
4 changed files with 132 additions and 2 deletions
+29 -2
View File
@@ -2270,8 +2270,6 @@ class MessagePush extends BaseService
* 订阅发送失败发送短信
* @param string $order_detection_id
* @return void
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function patientDetectionResultNotice(string $order_detection_id): void
{
@@ -2389,4 +2387,33 @@ class MessagePush extends BaseService
throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE));
}
}
/**
* 客服-通知客服
* 短信
* @param string $order_no
* @param string $mobile
* @return void
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function noticeReport(string $order_no,string $mobile): void
{
// 获取系统接诊配置
$data = array();
$data['template_code'] = "SMS_463525093";
$data['scene_desc'] = "通知客服";
$data['phone'] = $mobile;
$template_param = array();
$template_param['code'] = $order_no;
$data['template_param'] = $template_param;
$message = new SendSmsMessageProducer($data);
$producer = ApplicationContext::getContainer()->get(Producer::class);
$result = $producer->produce($message);
if (!$result) {
throw new BusinessException("加入推送队列失败" . json_encode($data, JSON_UNESCAPED_UNICODE));
}
}
}