diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index d6e6fa1..a08270a 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -88,15 +88,18 @@ class OrderService extends BaseService if ($order['order_type'] == 1) { // 问诊订单 $InquiryService = new InquiryService(); - $result = $InquiryService->cancelUnpayInquiryOrder($order['order_id'], $cancel_reason, $cancel_remarks); + $result = $InquiryService->cancelUnpayInquiryOrder($order['order_no'], $cancel_reason, $cancel_remarks); } elseif ($order['order_type'] == 2) { // 药品订单 $OrderProductService = new OrderProductService(); - $result = $OrderProductService->cancelUnpayProductOrder($order['order_id'], $cancel_reason, $cancel_remarks); + $result = $OrderProductService->cancelUnpayProductOrder($order['order_no'], $cancel_reason, $cancel_remarks); } elseif ($order['order_type'] == 3) { // 检测订单 $DetectionService = new DetectionService(); - $result = $DetectionService->cancelUnpayDetectionOrder($order['order_id'], $cancel_reason, $cancel_remarks); + $result = $DetectionService->cancelUnpayDetectionOrder($order['order_no'], $cancel_reason, $cancel_remarks); + }else{ + $result['status'] = 0; + $result['message'] = "订单类型错误"; } } catch (\Throwable $e) { $result['status'] = 0;