|
|
@@ -526,12 +526,12 @@ class ThirdOrderLogic extends BaseLogic
|
|
|
|
|
|
/**
|
|
|
* 商家取消预定
|
|
|
- * @param $offset
|
|
|
- * @return string
|
|
|
+ * @param $params
|
|
|
+ * @return string|true
|
|
|
*/
|
|
|
- public static function merchantcancelorder($data)
|
|
|
+ public static function merchantcancelorder($work_id)
|
|
|
{
|
|
|
- $third_order = ThirdOrders::where('word_id',$data['id'])->findOrEmpty();
|
|
|
+ $third_order = ThirdOrders::where('work_id',$work_id)->findOrEmpty();
|
|
|
if(!$third_order->isEmpty() && !empty($third_order['request_msg'])){
|
|
|
$url = 'https://api-open-cater.meituan.com/ddzh/yuding/lifereserve/merchantcancelorder';
|
|
|
$opBizCode = !empty($third_order['request_msg'])?json_decode($third_order['request_msg'],true)['opBizCode']:'';
|
|
|
@@ -544,7 +544,7 @@ class ThirdOrderLogic extends BaseLogic
|
|
|
'developerId'=>self::developerId,
|
|
|
'businessId'=>58,
|
|
|
'biz'=>json_encode([
|
|
|
- 'orderId'=>$data['orderId'],
|
|
|
+ 'orderId'=>$third_order['orderId'],
|
|
|
'cancelReason'=>'取消预定',
|
|
|
"type"=>2,
|
|
|
],JSON_UNESCAPED_UNICODE)
|
|
|
@@ -553,6 +553,7 @@ class ThirdOrderLogic extends BaseLogic
|
|
|
$data['sign'] = $sign_data;
|
|
|
return http_request($url,http_build_query($data));
|
|
|
}
|
|
|
+ return true;
|
|
|
|
|
|
|
|
|
}
|