同程区分平台
This commit is contained in:
parent
c4033319fa
commit
b066cb8c9c
|
@ -200,6 +200,7 @@ class SpiderTc extends Command
|
|||
|
||||
switch ($k) {
|
||||
case 6:
|
||||
case 8:
|
||||
try {
|
||||
$dou = new Tongcheng($k);
|
||||
$list = $dou->get($page, $start, $end, '');
|
||||
|
|
|
@ -30,7 +30,7 @@ class Orders extends base
|
|||
];
|
||||
|
||||
const StatusName = ['待跟进', '跟进中', '已核销', '核销失败', '放弃跟单'];
|
||||
const OSS = [1 => '美团(甄选)', '7' => '美团(新国旅)', 2 => '快手', 3 => '抖音(甄选)', '5' => '抖音(新国旅)', '6' => '同程', 4 => '全平台'];
|
||||
const OSS = [1 => '美团(甄选)', '7' => '美团(新国旅)', 2 => '快手', 3 => '抖音(甄选)', '5' => '抖音(新国旅)', '6' => '同程(视频号)', '8' => '同程(抖音)', 4 => '全平台'];
|
||||
|
||||
const timeType = ['create_time' => '添加记录时间', 'update_time' => '修改记录时间', 'last_follow' => '最后跟进时间', 'next_follow' => '下次跟进时间', 'travel_date' => '出行时间', 'create_at' => '下单时间'];
|
||||
|
||||
|
|
|
@ -129,6 +129,7 @@ class Orders {
|
|||
|
||||
break;
|
||||
case 6:
|
||||
case 8:
|
||||
$tc = new Tongcheng($order->os);
|
||||
$it = $tc->get(1, null, null, $order->sn);
|
||||
|
||||
|
|
|
@ -53,12 +53,6 @@ class Tongcheng {
|
|||
|
||||
foreach ($list->data->list as $order) {
|
||||
Log::info("同程 订单号:{$order->orderId} \n\n");
|
||||
|
||||
// $orderDetail = $this->_orderDetail($order->order_id, $order->status);
|
||||
// if (empty($orderDetail)) {
|
||||
// Log::info("同程 订单详情拉取失败:{$order->order_id}");
|
||||
// throw new Exception("同程拉单{$order->order_id}详情获取失败");
|
||||
// }
|
||||
if (in_array($order->orderStatus, [100, 150])) {
|
||||
continue;
|
||||
}
|
||||
|
@ -81,9 +75,12 @@ class Tongcheng {
|
|||
$item->order_status = $order->orderStatus; // 订单状态(100 - 待付款,150-用户取消,200-待使用,205-预约中(抖音),210-已预约(抖音),310-已履约(抖音),300-已完成,400-已关闭)
|
||||
$item->appointment_status = in_array($order->orderStatus, [210, 310, 300]) ? 1 : 0; // 是否已预约
|
||||
|
||||
if ($item->orderStatus == 400) {
|
||||
if ($order->orderStatus == 400) {
|
||||
$item->is_refunded = 1;
|
||||
}
|
||||
if ($order->sourceType == 1) {
|
||||
$item->os = 8;
|
||||
}
|
||||
$item->asset_status = $order->status ?? 0; // 核销状态
|
||||
$item->asset_price = $order->orderStatus == 300 ? $order->orderAmount : 0; // 核销金额
|
||||
//抖音的核销金额需要查核销订单
|
||||
|
|
Loading…
Reference in New Issue