同程区分平台

This commit is contained in:
jianghanbo 2024-12-24 10:53:59 +08:00
parent c4033319fa
commit b066cb8c9c
4 changed files with 7 additions and 8 deletions

View File

@ -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, '');

View File

@ -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' => '下单时间'];

View File

@ -129,6 +129,7 @@ class Orders {
break;
case 6:
case 8:
$tc = new Tongcheng($order->os);
$it = $tc->get(1, null, null, $order->sn);

View File

@ -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; // 核销金额
//抖音的核销金额需要查核销订单