修改推送
This commit is contained in:
parent
2f666ff37c
commit
80a0285705
@ -381,4 +381,27 @@ function inquiryModeToString(int|string $inquiry_mode): string
|
||||
$result = "未知";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换订单类型为汉字
|
||||
* @param int|string $order_type
|
||||
* @return string
|
||||
*/
|
||||
function orderTypeToString(int|string $order_type): string
|
||||
{
|
||||
if ($order_type == 1) {
|
||||
$result = "问诊订单";
|
||||
} elseif ($order_type == 2) {
|
||||
$result = "药品订单";
|
||||
} elseif ($order_type == 3) {
|
||||
$result = "检测订单";
|
||||
} elseif ($order_type == 4) {
|
||||
$result = "随访包";
|
||||
} elseif ($order_type == 5) {
|
||||
$result = "健康包";
|
||||
} else {
|
||||
$result = "未知";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@ -2403,14 +2403,9 @@ class CallBackController extends AbstractController
|
||||
// 发送推送消息
|
||||
if ($message['refund_status'] == "SUCCESS") {
|
||||
try {
|
||||
$params = array();
|
||||
$params['order_service_id'] = $order_service_package['order_service_id'];
|
||||
$order_service_package_inquiry = OrderServicePackageInquiry::getOne($params);
|
||||
if (!empty($order_service_package_inquiry)){
|
||||
// 患者-服务包服务退款成功
|
||||
$MessagePush = new MessagePush($order_service_package['user_id'], $order_service_package_inquiry['inquiry_no']);
|
||||
$MessagePush->refundServicePackageSuccess();
|
||||
}
|
||||
// 患者-服务包服务退款成功
|
||||
$MessagePush = new MessagePush($order_service_package['user_id'], $order_service_package['order_service_no']);
|
||||
$MessagePush->refundServicePackageSuccess();
|
||||
} catch (\Exception $e) {
|
||||
// 验证失败
|
||||
Log::getInstance("CallBack-wxPayInquiryRefund")->error("微信退款回调处理成功,推送消息失败:" . $e->getMessage());
|
||||
|
||||
@ -3580,7 +3580,7 @@ class MessagePush extends BaseService
|
||||
|
||||
$link_params = array();
|
||||
$link_params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id'];
|
||||
$link_params['order_no'] = $this->order['order_no'];
|
||||
$link_params['order_no'] = $this->order_service_package['order_no'];
|
||||
$link_params['inquiry_type'] = $this->order_inquiry['inquiry_type'];
|
||||
$link_params['doctor_user_id'] = $user_doctor['user_id'];
|
||||
$link_params['patient_user_id'] = $this->order_inquiry['user_id'];
|
||||
@ -3631,7 +3631,7 @@ class MessagePush extends BaseService
|
||||
try {
|
||||
// 获取医生数据
|
||||
$params = array();
|
||||
$params['doctor_id'] = $this->order_inquiry['doctor_id'];
|
||||
$params['doctor_id'] = $this->order['doctor_id'];
|
||||
$user_doctor = UserDoctor::getOne($params);
|
||||
if (empty($user_doctor)) {
|
||||
Log::getInstance("MessagePush")->error("医生数据为空");
|
||||
@ -3639,7 +3639,7 @@ class MessagePush extends BaseService
|
||||
}
|
||||
|
||||
// 转换问诊订单订单接诊方式-字符串
|
||||
$inquiry_mode = orderServiceTypeToString($this->order_inquiry['inquiry_mode']);
|
||||
$order_type = orderTypeToString($this->order['order_type']);
|
||||
|
||||
// 站内
|
||||
$data = array();
|
||||
@ -3647,17 +3647,16 @@ class MessagePush extends BaseService
|
||||
$data['notice_type'] = 3;
|
||||
$data['notice_system_type'] = 1;
|
||||
$data['from_name'] = "肝胆小秘书";
|
||||
$data['notice_brief_title'] = "您购买的{$inquiry_mode}服务,订单取消成功,点击查看详情。";
|
||||
$data['notice_title'] = "您购买的{$inquiry_mode}服务,订单取消成功,点击查看详情。";
|
||||
$data['notice_content'] = "您购买的{$inquiry_mode}服务,订单取消成功,平台已自动发起退款,请注意查看账户信息。";
|
||||
$data['notice_brief_title'] = "您购买的{$order_type}服务,订单取消成功,点击查看详情。";
|
||||
$data['notice_title'] = "您购买的{$order_type}服务,订单取消成功,点击查看详情。";
|
||||
$data['notice_content'] = "您购买的{$order_type}服务,订单取消成功,平台已自动发起退款,请注意查看账户信息。";
|
||||
$data['link_type'] = 15;
|
||||
|
||||
$link_params = array();
|
||||
$link_params['order_inquiry_id'] = $this->order_inquiry['order_inquiry_id'];
|
||||
$link_params['order_no'] = $this->order['order_no'];
|
||||
$link_params['inquiry_type'] = $this->order_inquiry['inquiry_type'];
|
||||
$link_params['inquiry_type'] = 1;
|
||||
$link_params['doctor_user_id'] = $user_doctor['user_id'];
|
||||
$link_params['patient_user_id'] = $this->order_inquiry['user_id'];
|
||||
$link_params['patient_user_id'] = $this->order['user_id'];
|
||||
$data['link_params'] = json_encode($link_params, JSON_UNESCAPED_UNICODE);// 跳转参数
|
||||
$data['button_type'] = 4;
|
||||
|
||||
@ -3674,7 +3673,7 @@ class MessagePush extends BaseService
|
||||
$sub_data['wx_template_id'] = "9v6dZhjg09CttLd3W9nEUV_-eshNc4BYYNy59jglvZE";// 问诊提醒
|
||||
$sub_data['params']['page'] = "healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id={$this->order['order_no']}";
|
||||
$sub_data['params']['data'] = [
|
||||
"thing1" => "{$inquiry_mode}服务",// 问诊内容
|
||||
"thing1" => "{$order_type}服务",// 问诊内容
|
||||
"thing2" => "取消订单成功",// 提醒内容
|
||||
"name3" => (string)$user_doctor['user_name'],// 问诊医生
|
||||
"thing4" => "平台已自动发起退款,请注意查看账户信息",// 提示说明
|
||||
@ -3688,7 +3687,7 @@ class MessagePush extends BaseService
|
||||
$sms_data['user_id'] = $this->user['user_id'];
|
||||
|
||||
$template_param = array();
|
||||
$template_param['type'] = $inquiry_mode;
|
||||
$template_param['type'] = $order_type;
|
||||
$template_param['name'] = (string)$user_doctor['user_name'];
|
||||
$sms_data['template_param'] = $template_param;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user