修改订单取消成功通知 问题
This commit is contained in:
@@ -1869,6 +1869,47 @@ class PatientOrderService extends BaseService
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测订单取消支付
|
||||
* @return array
|
||||
*/
|
||||
public function putPatientDetectionOrderCancelPay(): array
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
$order_detection_id = $this->request->route('order_detection_id');
|
||||
|
||||
Db::beginTransaction();
|
||||
|
||||
try {
|
||||
// 获取订单数据
|
||||
$params = array();
|
||||
$params['patient_id'] = $user_info['client_user_id'];
|
||||
$params['order_detection_id'] = $order_detection_id;
|
||||
$params['is_delete'] = 0;
|
||||
$order_detection = OrderDetection::getOne($params);
|
||||
if (empty($order_detection)) {
|
||||
return fail();
|
||||
}
|
||||
|
||||
// 检测订单取消
|
||||
// 取消订单原因(1:主动取消 2:客服取消 3:支付超时)
|
||||
$DetectionService = new DetectionService();
|
||||
$result = $DetectionService->cancelUnpayDetectionOrder($order_detection['detection_no'], 3, "支付超时");
|
||||
if ($result['status'] != 1) {
|
||||
Db::rollBack();
|
||||
return fail();
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
} catch (\Exception $e) {
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::HTTP_ERROR, $e->getMessage());
|
||||
}
|
||||
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取患者未完成订单
|
||||
* @param string $patient_id
|
||||
|
||||
Reference in New Issue
Block a user