From 9a3ac72ca1c4546e723eb64d42d495b2457f9cf6 Mon Sep 17 00:00:00 2001 From: lyt Date: Mon, 22 Oct 2018 15:20:32 +0800 Subject: [PATCH] =?UTF-8?q?tracking:=20=E8=B0=83=E6=95=B4=E5=A4=9A?= =?UTF-8?q?=E6=97=A5=E8=A1=8C=E7=A8=8B=E5=AF=BC=E6=B8=B8=E6=88=96=E5=8F=B8?= =?UTF-8?q?=E6=9C=BA=E5=A4=9A=E5=AE=89=E6=8E=92=E7=9A=84=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trippestOrderSync/controllers/api.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/webht/third_party/trippestOrderSync/controllers/api.php b/webht/third_party/trippestOrderSync/controllers/api.php index d284dcda..9357c565 100644 --- a/webht/third_party/trippestOrderSync/controllers/api.php +++ b/webht/third_party/trippestOrderSync/controllers/api.php @@ -191,7 +191,11 @@ class Api extends CI_Controller { $ret['operation'][$value->GCOD_startDate]['cardriver'][] = $tmp_car; // 出团时间 $ret['operation'][$value->GCOD_startDate]['start_date'] = $value->GCOD_startDate; - $ret['operation'][$value->GCOD_startDate]['end_date'] = $value->GCOD_endDate; + if ( ! $ret['operation'][$value->GCOD_startDate]['end_date'] + || strtotime($ret['operation'][$value->GCOD_startDate]['end_date']) > strtotime($value->GCOD_endDate) + ) { + $ret['operation'][$value->GCOD_startDate]['end_date'] = $value->GCOD_endDate; + } } else if ($value->GCOD_operationType === 'guiderOperations') { $tmp_g = array(); @@ -204,7 +208,11 @@ class Api extends CI_Controller { $ret['operation'][$value->GCOD_startDate]['tourguide'][] = $tmp_g; // 出团时间 $ret['operation'][$value->GCOD_startDate]['start_date'] = $value->GCOD_startDate; - $ret['operation'][$value->GCOD_startDate]['end_date'] = $value->GCOD_endDate; + if ( ! $ret['operation'][$value->GCOD_startDate]['end_date'] + || strtotime($ret['operation'][$value->GCOD_startDate]['end_date']) > strtotime($value->GCOD_endDate) + ) { + $ret['operation'][$value->GCOD_startDate]['end_date']= $value->GCOD_endDate; + } } } // 加上行程