|
|
@@ -405,7 +405,7 @@ class CallBackHandler
|
|
|
$deliveryOrder = GhsDeliveryOrderClass::getByCondition([
|
|
|
'deliveryId' => 'shunfeng',
|
|
|
'orderId' => $orderId
|
|
|
- ], true);
|
|
|
+ ], true, 'id DESC');
|
|
|
|
|
|
if ($deliveryOrder) {
|
|
|
return $deliveryOrder;
|
|
|
@@ -415,7 +415,51 @@ class CallBackHandler
|
|
|
return HdDeliveryOrderClass::getByCondition([
|
|
|
'deliveryId' => 'shunfeng',
|
|
|
'orderId' => $orderId
|
|
|
- ], true);
|
|
|
+ ], true, 'id DESC');
|
|
|
+ }
|
|
|
+
|
|
|
+ private function cancelFrom($sendStatus, $cancelCode = 0)
|
|
|
+ {
|
|
|
+ if($sendStatus == -1){
|
|
|
+ $reasons = [
|
|
|
+ 100 => '误操作,抢错订单',
|
|
|
+ 101 => '订单距离太远',
|
|
|
+ 102 => '餐箱已满,无法配送',
|
|
|
+ 103 => '物品过大无法配送',
|
|
|
+ 104 => '联系不上寄件人',
|
|
|
+ 105 => '寄方无法提供待配送物品(缺货/出餐慢/已配送等)',
|
|
|
+ 106 => '寄方要求取消(暂时不需要寄件了/重复发单/信息有误)',
|
|
|
+ 107 => '配送车辆故障',
|
|
|
+ 108 => '其他,请注明原因',
|
|
|
+ 303 => '骑士要求取消',
|
|
|
+ 310 => '超出配送范围',
|
|
|
+ 500 => '15分钟无人接单',
|
|
|
+ 501 => '不兜底订单自动取消',
|
|
|
+ 502 => '超期望送达8小时未完成',
|
|
|
+ ];
|
|
|
+ return $reasons[$cancelCode] ?? '未知';
|
|
|
+ }
|
|
|
+
|
|
|
+ if($sendStatus == -2){
|
|
|
+ $exIds = [
|
|
|
+ 1001 => '商家出货慢',
|
|
|
+ 1007 => '更改取货地址',
|
|
|
+ 2001 => '顾客电话无法接通',
|
|
|
+ 2004 => '更改期望送达时间',
|
|
|
+ 2005 => '顾客拒收',
|
|
|
+ 2008 => '顾客不在家',
|
|
|
+ 2009 => '更改送货地址',
|
|
|
+ 2010 => '顾客拒绝实名认证',
|
|
|
+ 2013 => '无法联系用户,退回寄件人',
|
|
|
+ 3004 => '实名认证校验失败',
|
|
|
+ 4001 => '配送地址错误',
|
|
|
+ 4002 => '其他',
|
|
|
+ 4003 => '托寄物丢失或损坏',
|
|
|
+ ];
|
|
|
+ return $exIds[$cancelCode] ?? '未知';
|
|
|
+ }
|
|
|
+
|
|
|
+ return '未知';
|
|
|
}
|
|
|
|
|
|
private function cancelFrom($sendStatus, $cancelCode = 0)
|