Files
OMS/app/erpapi/lib/shop/response/shopbee.php
chenping 08e1c72cdd 【新增】抖店优先发货对接
【新增】抖店优质快递对接
【新增】抖店加价发顺丰对接
【新增】抖店顺丰包邮支持协商更换物流
2026-04-27 10:19:05 +08:00

46 lines
1.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
class erpapi_shop_response_shopbee extends erpapi_shop_response_abstract {
/**
* 订单标签变更
* @param array $params
* @return array|false
*/
public function tagchange($params){
// 原有的预约退款逻辑
$this->__apilog['title'] = '订单标签变更';
$this->__apilog['original_bn'] = $params['tid'];
// tag_key加个白名单目前只支持sku_logistics_extra_info
$white_list = ['sku_logistics_extra_info', 'shop_priority_delivery'];
if (!in_array($params['tag_key'], $white_list)) {
$this->__apilog['result']['msg'] = '不支持的标签类型';
return false;
}
$shop_id = $this->__channelObj->channel['shop_id'];
$order_bn = $params['tid'];
if (!$order_bn) {
$this->__apilog['result']['msg'] = '订单号(tid)为空';
return false;
}
$order = $this->getOrder('order_id,order_bn', $shop_id, $order_bn);
if (!$order) {
$this->__apilog['result']['msg'] = '订单不存在';
return false;
}
$tagInfoRaw = $params['tag_info'] ? json_decode($params['tag_info'], true) : [];
$sdf = [
'order_id' => $order['order_id'],
'order_bn' => $order['order_bn'],
'shop_id' => $this->__channelObj->channel['shop_id'],
'tag_key' => $params['tag_key'],
'tag_info' => $tagInfoRaw ?? [],
];
return $sdf;
}
}