修正取消未支付的订单
This commit is contained in:
parent
c918a8a31e
commit
b9a22ea667
@ -821,7 +821,7 @@ class DetectionService extends BaseService
|
||||
* @param string|int $cancel_remarks 取消备注
|
||||
* @return array
|
||||
*/
|
||||
public function cancelUnpayDetectionOrder(string|int $order_id, string|int $cancel_reason, string|int $cancel_remarks): array
|
||||
public function cancelUnpayDetectionOrder(string|int $order_no, string|int $cancel_reason, string|int $cancel_remarks): array
|
||||
{
|
||||
$result = array();
|
||||
$result['status'] = 1;
|
||||
@ -829,7 +829,7 @@ class DetectionService extends BaseService
|
||||
|
||||
// 获取检测订单数据
|
||||
$params = array();
|
||||
$params['order_id'] = $order_id;
|
||||
$params['detection_no'] = $order_no;
|
||||
$order_detection = OrderDetection::getOne($params);
|
||||
if (empty($order_detection)) {
|
||||
$result['status'] = 0;
|
||||
|
||||
@ -1842,7 +1842,7 @@ class InquiryService extends BaseService
|
||||
|
||||
// 获取问诊订单数据
|
||||
$params = array();
|
||||
$params['order_no'] = $order_no;
|
||||
$params['inquiry_no'] = $order_no;
|
||||
$order_inquiry = OrderInquiry::getOne($params);
|
||||
if (empty($order_inquiry)) {
|
||||
throw new BusinessException("未查询到对应订单数据");
|
||||
|
||||
@ -488,7 +488,7 @@ class PatientOrderService extends BaseService
|
||||
$result = $OrderService->cancelUnpayOrder($order_inquiry['inquiry_no'],2,"主动取消");
|
||||
if ($result['status'] != 1) {
|
||||
Db::rollBack();
|
||||
return fail();
|
||||
return fail(HttpEnumCode::HTTP_ERROR, $result['message']);
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
@ -663,7 +663,7 @@ class PatientOrderService extends BaseService
|
||||
$result = $OrderService->cancelUnpayOrder($order_product['order_product_no'], 1, "主动取消");
|
||||
if ($result['status'] != 1) {
|
||||
Db::rollBack();
|
||||
return fail();
|
||||
return fail(HttpEnumCode::HTTP_ERROR, $result['message']);
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user