From 521a20e5367fd023151d3c19a6fdf29587ac6e06 Mon Sep 17 00:00:00 2001 From: cyc Date: Tue, 14 May 2019 14:58:41 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=80=E7=A5=A8?= =?UTF-8?q?=E5=90=8E=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6=E7=BB=99=E5=AE=A2?= =?UTF-8?q?=E4=BA=BA=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/controllers/returnorders.php | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index 67110fe4..f0605b31 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -86,20 +86,38 @@ class returnorders extends CI_Controller{ log_message('error','聚合退票:'.$ticket_data->ts_ordernumber.'|'.$back_json); $back_data = json_decode($back_json); + $fromName = 'trainsystem'; + $fromEmail = 'cyc@hainatravel.com'; + $coli_id = $this->BIZ_train_model->cold_sn_get_coli_id($ticket_data->ts_cold_sn); + $coli_id = $coli_id['0']->COLI_ID; + $info = $this->BIZ_train_model->get_operatorInfo($coli_id); + $toName = $info[0]->OPI_Name; + $toEmail = $info[0]->OPI_Email; + $Mobile = $info[0]->Mobile; + $subject = '退票请求'; if($back_data->error_code == '0'){ - //退票成功后发送一封邮件 - $fromName = 'trainsystem'; - $fromEmail = 'cyc@hainatravel.com'; - $coli_id = $this->BIZ_train_model->cold_sn_get_coli_id($ticket_data->ts_cold_sn); - $coli_id = $coli_id['0']->COLI_ID; - $info = $this->BIZ_train_model->get_operatorInfo($coli_id); - $toName = $info[0]->OPI_Name; - $toEmail = $info[0]->OPI_Email; - $subject = '退票请求'; + //退票成功后发送邮件 $body = $back_detail_data->result->ordernumber.' 提出退票,乘客:'.$data->tst_realname.', '.$back_detail_data->result->start_time.' '.$back_detail_data->result->checi; + //发送邮件给外联 $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); + //发送邮件给客人 + $customer_subject = 'returntickets'; + $customer_body = '

Dear'.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.')have been cancelled online successfully. Your travel advisor('.$toName.',email address:'.$toEmail',phone number (+86)'.$Mobile.')will contact you with the refund details via email within 24 hours.'; + $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); + $customer_email = $customer_email[0]->GUT_Email; + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'cyc@hainatravel.com',$customer_subject,$customer_body); echo '{"reason":"退票成功","status":"200"}'; }else{ + //退票失败后发送邮件 + $body = $ticket_data->ts_ordernumber.'退票失败'; + //发送邮件给外联 + $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); + /发送邮件给客人 + $customer_subject = 'returntickets'; + $customer_body = '

Dear'.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.')has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number (+86)'.Mobile.'will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; + $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); + $customer_email = $customer_email[0]->GUT_Email; + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'cyc@hainatravel.com',$customer_subject,$customer_body); header("HTTP/1.1 404 Not Found"); echo '{"reason":"退票失败","status":"404"}'; } @@ -147,8 +165,10 @@ class returnorders extends CI_Controller{ $info = $this->BIZ_train_model->get_operatorInfo($coli_id); $toName = $info[0]->OPI_Name; $toEmail = $info[0]->OPI_Email; + $Mobile = $info[0]->Mobile; $subject = '退票请求'; $body = '乘客:'.$data->tst_realname.' 对订单:'.$data->ts_ordernumber.'发起退票请求!!!'; + //发送邮件给外联 $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); echo '{"reason":"退票成功","status":"200"}'; }else{ From f0fd458f868ad1e1056b767a23d5db5a2e21e26a Mon Sep 17 00:00:00 2001 From: lyt Date: Tue, 14 May 2019 15:19:50 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E9=80=80=E6=AC=BE=E5=87=AD=E8=AF=81:?= =?UTF-8?q?=E5=AE=A2=E4=BA=BA=E9=82=AE=E4=BB=B6=E7=9A=84=E5=8F=91=E9=80=81?= =?UTF-8?q?=E4=BA=BA=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/pay/controllers/AlipayTradeService.php | 2 +- webht/third_party/pay/controllers/iPayLinksService.php | 2 +- webht/third_party/paypal/controllers/index.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webht/third_party/pay/controllers/AlipayTradeService.php b/webht/third_party/pay/controllers/AlipayTradeService.php index 07a44c19..56aafad6 100644 --- a/webht/third_party/pay/controllers/AlipayTradeService.php +++ b/webht/third_party/pay/controllers/AlipayTradeService.php @@ -698,7 +698,7 @@ class AlipayTradeService extends CI_Controller $c_M_RelatedInfo, $c_M_State, $c_M_AddTime, - 'Alipay refund receipt'); + 'ChinaHighlights refund receipt'); $this->Alipay_note_model->update_send($item->ALI_dealId, 'send-customer'); } //添加邮件发送记录 end diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php index f5a83729..575af7ac 100644 --- a/webht/third_party/pay/controllers/iPayLinksService.php +++ b/webht/third_party/pay/controllers/iPayLinksService.php @@ -758,7 +758,7 @@ class IPayLinksService extends CI_Controller $c_M_RelatedInfo, $c_M_State, $c_M_AddTime, - 'iPayLinks refund receipt'); + 'ChinaHighlights refund receipt'); $this->Note_model->update_send($item->IPL_dealId, 'send-customer'); } //添加邮件发送记录 end diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 8ff6abca..30df9cbe 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1027,7 +1027,7 @@ class Index extends CI_Controller { $c_M_RelatedInfo, $c_M_State, $c_M_AddTime, - 'paypal refund receipt'); + 'ChinaHighlights refund receipt'); $this->Note_model->update_send($item->pn_txn_id, 'send-customer'); } //添加邮件发送记录 end From 014c8a77fcdbcb9a7d680c146728ef5e4fe762bd Mon Sep 17 00:00:00 2001 From: cyc Date: Tue, 14 May 2019 16:05:43 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=80=E7=A5=A8?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trainsystem/controllers/returnorders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index f0605b31..c7c01ef9 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -102,7 +102,7 @@ class returnorders extends CI_Controller{ $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 $customer_subject = 'returntickets'; - $customer_body = '

Dear'.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.')have been cancelled online successfully. Your travel advisor('.$toName.',email address:'.$toEmail',phone number (+86)'.$Mobile.')will contact you with the refund details via email within 24 hours.'; + $customer_body = '

Dear'.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.')have been cancelled online successfully. Your travel advisor('.$toName.',email address:'.$toEmail.',phone number (+86)'.$Mobile.')will contact you with the refund details via email within 24 hours.'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'cyc@hainatravel.com',$customer_subject,$customer_body); From 918e980cc0ac7e19974823f3f8bb62803d456b8e Mon Sep 17 00:00:00 2001 From: cyc Date: Tue, 14 May 2019 16:14:03 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trainsystem/controllers/returnorders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index c7c01ef9..a09cfa28 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -112,7 +112,7 @@ class returnorders extends CI_Controller{ $body = $ticket_data->ts_ordernumber.'退票失败'; //发送邮件给外联 $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); - /发送邮件给客人 + //发送邮件给客人 $customer_subject = 'returntickets'; $customer_body = '

Dear'.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.')has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number (+86)'.Mobile.'will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); From d81949e3d046fabed52df12ae813bc24d349a408 Mon Sep 17 00:00:00 2001 From: cyc Date: Tue, 14 May 2019 16:48:07 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=87=BA=E7=AB=99?= =?UTF-8?q?=E7=A5=A8=E7=9A=84=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/controllers/addorders.php | 13 +++++++++++-- .../trainsystem/controllers/returnorders.php | 4 ++-- .../third_party/trainsystem/views/homepage.php | 10 +++++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index f5ae9b28..13e874d5 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -156,7 +156,10 @@ class addorders extends CI_Controller{ $selectseat = $this->input->get_post("selectseat"); //接收出票接口 $type = $this->input->get_post("type"); + //接受是否有站票 + $this->istanding = $this->input->get_post("istanding"); } + //测试数据 /*$cold_sn = '488121613'; $bpe_sn = '473183645,473183646,473183647'; @@ -297,12 +300,18 @@ class addorders extends CI_Controller{ $passengers .= "]"; $passengers = substr($passengers, 1); $passengers = "[" . $passengers; + + $is_accept_standing = 'no'; + if($this->istanding == 'true'){ + $is_accept_standing = 'yes'; + } + if(empty($selectseat)){ $post_data=array( "key"=>JUHE_TRAIN_API_KEY, "user_orderid"=>$cold_sn,//自定义订单号 "train_date"=>substr($data["train"]->DepartureDate, 0, 10), - "is_accept_standing"=>"no", + "is_accept_standing"=>$is_accept_standing, "from_station_name"=>$data["train"]->DepartAirport_cn, "from_station_code"=>$data["train"]->DepartAirport, "to_station_code"=>$data["train"]->ArrivalAirport, @@ -315,7 +324,7 @@ class addorders extends CI_Controller{ "key"=>JUHE_TRAIN_API_KEY, "user_orderid"=>$cold_sn,//自定义订单号 "train_date"=>substr($data["train"]->DepartureDate, 0, 10), - "is_accept_standing"=>"no", + "is_accept_standing"=>$is_accept_standing, "choose_seats"=>$selectseat, "from_station_name"=>$data["train"]->DepartAirport_cn, "from_station_code"=>$data["train"]->DepartAirport, diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index a09cfa28..d2ca666f 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -102,7 +102,7 @@ class returnorders extends CI_Controller{ $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 $customer_subject = 'returntickets'; - $customer_body = '

Dear'.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.')have been cancelled online successfully. Your travel advisor('.$toName.',email address:'.$toEmail.',phone number (+86)'.$Mobile.')will contact you with the refund details via email within 24 hours.'; + $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.',email address:'.$toEmail.',phone number (+86)'.$Mobile.') will contact you with the refund details via email within 24 hours.'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'cyc@hainatravel.com',$customer_subject,$customer_body); @@ -114,7 +114,7 @@ class returnorders extends CI_Controller{ $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 $customer_subject = 'returntickets'; - $customer_body = '

Dear'.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.')has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number (+86)'.Mobile.'will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; + $customer_body = '

Dear '.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.') has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number (+86)'.Mobile.') will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'cyc@hainatravel.com',$customer_subject,$customer_body); diff --git a/application/third_party/trainsystem/views/homepage.php b/application/third_party/trainsystem/views/homepage.php index 832859b3..c19cd801 100644 --- a/application/third_party/trainsystem/views/homepage.php +++ b/application/third_party/trainsystem/views/homepage.php @@ -80,7 +80,7 @@ function selseat(seat){

翰特订单号 订单列表>>导出交易记录>> 版本:V2.0聚合余额(RMB):

-
+ ">
@@ -107,6 +107,7 @@ function selseat(seat){ 抵达时间 票价 是否提交过 + 是否接受无座 @@ -122,7 +123,7 @@ function selseat(seat){ train[0]->ArrivalTime;?> train[0]->adultcost;?> status)?"否":"";?> - + @@ -400,7 +401,10 @@ function selseat(seat){ }); people_sn=people_sn.substring(1); - url2+=$(this).attr("data-order")+"&people="+people_sn+"&selectseat="+selectseat+"&type=juhe"; + var istanding = $('input[name="istanding"]').is(':checked'); + + url2+=$(this).attr("data-order")+"&people="+people_sn+"&selectseat="+selectseat+"&type=juhe&istanding="+istanding; + var THIS=$(this); THIS.parent().parent().find(".back_mes").html(" ");//清空提示 $.ajax({ From a0216c12c8721bb2bf55955459cb3877feaeb4ec Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 15 May 2019 09:50:32 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E9=80=80=E6=AC=BE=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E8=A6=81=E9=80=9A=E7=9F=A5=E8=B4=A2=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pay/controllers/AlipayTradeService.php | 5 +++- .../pay/controllers/iPayLinksService.php | 6 ++++- webht/third_party/pay/models/Alipay_model.php | 10 ++++---- .../pay/models/IPayLinks_model.php | 10 ++++---- .../models/Online_payment_account_model.php | 14 +++++++++++ .../third_party/paypal/controllers/index.php | 6 +++-- .../paypal/models/paypal_model.php | 25 +++++++++++++++---- 7 files changed, 57 insertions(+), 19 deletions(-) diff --git a/webht/third_party/pay/controllers/AlipayTradeService.php b/webht/third_party/pay/controllers/AlipayTradeService.php index 56aafad6..6bd08c44 100644 --- a/webht/third_party/pay/controllers/AlipayTradeService.php +++ b/webht/third_party/pay/controllers/AlipayTradeService.php @@ -50,6 +50,7 @@ class AlipayTradeService extends CI_Controller $this->load->model('Alipay_note_model'); $this->load->model('Alipay_model'); $this->load->helper('payment'); + $this->load->model('Online_payment_account_model', 'payment_model'); $this->gateway_url = $this->config->item('gatewayUrl'); $this->appid = $this->config->item('app_id'); @@ -703,7 +704,9 @@ class AlipayTradeService extends CI_Controller } //添加邮件发送记录 end // TODO 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录 - + if ($this->payment_model->if_finance_exists($advisor_info->COLI_GRI_SN)===true) { + $this->Note_model->update_send($item->ALI_dealId, 'send-to-finance'); + } return ; } diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php index 575af7ac..1c0f04a2 100644 --- a/webht/third_party/pay/controllers/iPayLinksService.php +++ b/webht/third_party/pay/controllers/iPayLinksService.php @@ -21,6 +21,7 @@ class IPayLinksService extends CI_Controller // $this->config->load('dev_iPayLinks'); // test $this->load->model('IPayLinks_model'); $this->load->model('Note_model'); + $this->load->model('Online_payment_account_model', 'payment_model'); $this->gatewayUrl = $this->config->item('gatewayUrl'); @@ -762,7 +763,10 @@ class IPayLinksService extends CI_Controller $this->Note_model->update_send($item->IPL_dealId, 'send-customer'); } //添加邮件发送记录 end - // TODO 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录 + // 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录 + if ($this->payment_model->if_finance_exists($advisor_info->COLI_GRI_SN)===true) { + $this->Note_model->update_send($item->IPL_dealId, 'send-to-finance'); + } return ; } diff --git a/webht/third_party/pay/models/Alipay_model.php b/webht/third_party/pay/models/Alipay_model.php index 150e3c4e..a6d8322f 100644 --- a/webht/third_party/pay/models/Alipay_model.php +++ b/webht/third_party/pay/models/Alipay_model.php @@ -18,7 +18,7 @@ class Alipay_model extends CI_Model { $fieldsql = $orderinfo == false ? '' : " ,* "; //先查商务订单B,APP订单A、再查传统订单T if ($ordertype == 'B' || $ordertype == 'A') { - $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_Email,OPI_FirstName,OPI_SN,OPI_Name,COLI_WebCode,COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo + $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,COLI_GRI_SN,OPI_Email,OPI_FirstName,OPI_SN,OPI_Name,COLI_WebCode,COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_ID =?"; $query = $this->HT->query($sql, array($COLI_ID)); @@ -26,7 +26,7 @@ class Alipay_model extends CI_Model { } //后查传统订单的原因是因为传统订单的订单号去掉外联名字首字母后可能会和商务订单的重合。 if (empty($result) && ($ordertype == 'T')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_ID like '%$COLI_ID'"; $query = $this->HT->query($sql); @@ -36,7 +36,7 @@ class Alipay_model extends CI_Model { //查传统订单add_code,网前实时支付会先生成一个临时订单号存在add_code里,如订单45103248 if (empty($result) && ($ordertype == 'M')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_AddCode =? "; $query = $this->HT->query($sql, array($COLI_ID)); @@ -44,7 +44,7 @@ class Alipay_model extends CI_Model { } if (empty($result) && ($ordertype == 'M')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where EXISTS ( @@ -60,7 +60,7 @@ class Alipay_model extends CI_Model { //订单号查询不到尝试使用团号查询 if (empty($result) && $ordertype == 'B') { - $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo + $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_GroupCode like '%-$COLI_ID%'"; $query = $this->HT->query($sql); diff --git a/webht/third_party/pay/models/IPayLinks_model.php b/webht/third_party/pay/models/IPayLinks_model.php index 80a6af77..6b9f4a64 100644 --- a/webht/third_party/pay/models/IPayLinks_model.php +++ b/webht/third_party/pay/models/IPayLinks_model.php @@ -18,7 +18,7 @@ class IPayLinks_model extends CI_Model { $fieldsql = $orderinfo == false ? '' : " ,* "; //先查商务订单B,APP订单A、再查传统订单T if ($ordertype == 'B' || $ordertype == 'A') { - $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode, COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo + $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode, COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_ID =?"; $query = $this->HT->query($sql, array($COLI_ID)); @@ -26,7 +26,7 @@ class IPayLinks_model extends CI_Model { } //后查传统订单的原因是因为传统订单的订单号去掉外联名字首字母后可能会和商务订单的重合。 if (empty($result) && ($ordertype == 'T')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_ID like '%$COLI_ID'"; $query = $this->HT->query($sql); @@ -36,7 +36,7 @@ class IPayLinks_model extends CI_Model { //查传统订单add_code,网前实时支付会先生成一个临时订单号存在add_code里,如订单45103248 if (empty($result) && ($ordertype == 'M')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_AddCode =? "; $query = $this->HT->query($sql, array($COLI_ID)); @@ -44,7 +44,7 @@ class IPayLinks_model extends CI_Model { } if (empty($result) && ($ordertype == 'M')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where EXISTS ( @@ -60,7 +60,7 @@ class IPayLinks_model extends CI_Model { //订单号查询不到尝试使用团号查询 if (empty($result) && $ordertype == 'B') { - $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo + $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_GroupCode like '%-$COLI_ID%'"; $query = $this->HT->query($sql); diff --git a/webht/third_party/pay/models/Online_payment_account_model.php b/webht/third_party/pay/models/Online_payment_account_model.php index 91fc6fa0..39e5c6a6 100644 --- a/webht/third_party/pay/models/Online_payment_account_model.php +++ b/webht/third_party/pay/models/Online_payment_account_model.php @@ -327,5 +327,19 @@ class Online_payment_account_model extends CI_Model { return $query; } + /*! + * 查询财务系统中是否已导入该团的账单数据 + * @date 2019-05-14 + */ + public function if_finance_exists($gri_sn) + { + $sql = "SELECT top 1 1 + from financedata.dbo.CW_GroupZD gz + inner join Tourmanager.dbo.CK_GroupInfo cgi on gz.GZD_CGI_SN=cgi.CGI_SN + where ISNULL(GZD_DeleteFlag,0)=0 and isnull(DelFlag,0)=0 + and cgi.CGI_GRI_SN=? "; + return $this->HT->query($sql, $gri_sn)->num_rows() > 0; + } + } diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 30df9cbe..ac142a6b 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1031,8 +1031,10 @@ class Index extends CI_Controller { $this->Note_model->update_send($item->pn_txn_id, 'send-customer'); } //添加邮件发送记录 end - // TODO 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录 - + // 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录 + if ($this->Paypal_model->if_finance_exists($advisor_info->COLI_GRI_SN)===true) { + $this->Note_model->update_send($item->pn_txn_id, 'send-to-finance'); + } return ; } diff --git a/webht/third_party/paypal/models/paypal_model.php b/webht/third_party/paypal/models/paypal_model.php index 0c53cc56..a005ba0d 100644 --- a/webht/third_party/paypal/models/paypal_model.php +++ b/webht/third_party/paypal/models/paypal_model.php @@ -19,7 +19,7 @@ class Paypal_model extends CI_Model { $fieldsql = $orderinfo == false ? '' : " ,* "; //先查商务订单B,APP订单A、再查传统订单T if ($ordertype == 'B' || $ordertype == 'A') { - $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_Email,OPI_FirstName,OPI_SN,OPI_Name,COLI_WebCode,COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo + $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,COLI_GRI_SN,OPI_Email,OPI_FirstName,OPI_SN,OPI_Name,COLI_WebCode,COLI_Department,COLI_PayManner,COLI_State $fieldsql from BIZ_ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_ID =?"; $query = $this->HT->query($sql, array($COLI_ID)); @@ -27,7 +27,7 @@ class Paypal_model extends CI_Model { } //后查传统订单的原因是因为传统订单的订单号去掉外联名字首字母后可能会和商务订单的重合。 if (empty($result) && ($ordertype == 'T')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_State $fieldsql from ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_ID like '%$COLI_ID' order by CHARINDEX('$COLI_ID', COLI_ID) "; @@ -41,7 +41,7 @@ class Paypal_model extends CI_Model { //查传统订单add_code,网前实时支付会先生成一个临时订单号存在add_code里,如订单45103248 if (empty($result) && ($ordertype == 'M')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_AddCode =? "; $query = $this->HT->query($sql, array($COLI_ID)); @@ -49,7 +49,7 @@ class Paypal_model extends CI_Model { } if (empty($result) && ($ordertype == 'M')) { - $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli + $sql = "SELECT TOP 2 1 as order_type, COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode $fieldsql from ConfirmLineInfo cli LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where EXISTS ( @@ -65,7 +65,7 @@ class Paypal_model extends CI_Model { //订单号查询不到尝试使用团号查询 if (empty($result) && $ordertype == 'B') { - $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo + $sql = "SELECT TOP 2 0 as order_type,COLI_SN,COLI_ID,COLI_GRI_SN,OPI_SN,OPI_Email,OPI_FirstName,OPI_Name,COLI_WebCode,COLI_Department,COLI_State $fieldsql from BIZ_ConfirmLineInfo LEFT JOIN OperatorInfo ON COLI_OPI_ID=OPI_SN where COLI_GroupCode like '%-$COLI_ID%'"; $query = $this->HT->query($sql); @@ -654,4 +654,19 @@ class Paypal_model extends CI_Model { return $this->HT->query($sql, $COLI_SN)->row(); } } + + + /*! + * 查询财务系统中是否已导入该团的账单数据 + * @date 2019-05-14 + */ + public function if_finance_exists($gri_sn) + { + $sql = "SELECT top 1 1 + from financedata.dbo.CW_GroupZD gz + inner join Tourmanager.dbo.CK_GroupInfo cgi on gz.GZD_CGI_SN=cgi.CGI_SN + where ISNULL(GZD_DeleteFlag,0)=0 and isnull(DelFlag,0)=0 + and cgi.CGI_GRI_SN=? "; + return $this->HT->query($sql, $gri_sn)->num_rows() > 0; + } } From 93372526825260be1ace17c6e36e6fc80e68ba45 Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 15 May 2019 09:58:15 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E9=80=80=E7=A5=A8?= =?UTF-8?q?=E5=90=8E=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6=E7=BB=99=E5=AE=A2?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trainsystem/controllers/addorders.php | 8 +++++++- .../third_party/trainsystem/controllers/returnorders.php | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index 13e874d5..9de9a291 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -627,7 +627,13 @@ class addorders extends CI_Controller{ $PostData['TrainOrderService']->Order->TicketItem->ChildTicketCount = $ChildNum; $PostData['TrainOrderService']->Order->TicketItem->SeatName = $this->train_zw[$this->db_train_zw[$data['train']->Aircraft]]; $PostData['TrainOrderService']->Order->TicketItem->SelectedSeat = $selectseat; - $PostData['TrainOrderService']->Order->TicketItem->AcceptSeat = ''; + + $is_accept_standing = ''; + if($this->istanding == 'true'){ + $is_accept_standing = '无座'; + } + $PostData['TrainOrderService']->Order->TicketItem->AcceptSeat = $is_accept_standing; + $PostData['TrainOrderService']->Order->TicketItem->passport = substr($Passport,0,strlen($Passport)-1); $PostData['TrainOrderService']->Order->TicketItem->OrderPrice = $data['train']->adultcost * $AdultNum + $data['train']->childcost * $ChildNum; diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index d2ca666f..0742d87f 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -102,10 +102,10 @@ class returnorders extends CI_Controller{ $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 $customer_subject = 'returntickets'; - $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.',email address:'.$toEmail.',phone number (+86)'.$Mobile.') will contact you with the refund details via email within 24 hours.'; + $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.',email address:'.$toEmail.',phone number '.$Mobile.') will contact you with the refund details via email within 24 hours.'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; - $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'cyc@hainatravel.com',$customer_subject,$customer_body); + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,$customer_email,$customer_subject,$customer_body); echo '{"reason":"退票成功","status":"200"}'; }else{ //退票失败后发送邮件 @@ -114,10 +114,10 @@ class returnorders extends CI_Controller{ $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 $customer_subject = 'returntickets'; - $customer_body = '

Dear '.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.') has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number (+86)'.Mobile.') will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; + $customer_body = '

Dear '.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.') has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number '.Mobile.') will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; - $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'cyc@hainatravel.com',$customer_subject,$customer_body); + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,$customer_email,$customer_subject,$customer_body); header("HTTP/1.1 404 Not Found"); echo '{"reason":"退票失败","status":"404"}'; } From 690e2fd3433b75a6f45c7da07a85a69dcf05528c Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 15 May 2019 10:12:17 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trainsystem/controllers/returnorders.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index 0742d87f..2e6f9046 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -105,7 +105,7 @@ class returnorders extends CI_Controller{ $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.',email address:'.$toEmail.',phone number '.$Mobile.') will contact you with the refund details via email within 24 hours.'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; - $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,$customer_email,$customer_subject,$customer_body); + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'Phoebe@chinahighlights.net',$customer_subject,$customer_body); echo '{"reason":"退票成功","status":"200"}'; }else{ //退票失败后发送邮件 @@ -117,7 +117,7 @@ class returnorders extends CI_Controller{ $customer_body = '

Dear '.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.') has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number '.Mobile.') will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; - $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,$customer_email,$customer_subject,$customer_body); + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'Phoebe@chinahighlights.net',$customer_subject,$customer_body); header("HTTP/1.1 404 Not Found"); echo '{"reason":"退票失败","status":"404"}'; } From 009653b1e1eba3ffc386d3b1673d8efdfe94db61 Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 15 May 2019 10:45:53 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trainsystem/controllers/returnorders.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index 2e6f9046..d2903963 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -91,7 +91,7 @@ class returnorders extends CI_Controller{ $coli_id = $this->BIZ_train_model->cold_sn_get_coli_id($ticket_data->ts_cold_sn); $coli_id = $coli_id['0']->COLI_ID; $info = $this->BIZ_train_model->get_operatorInfo($coli_id); - $toName = $info[0]->OPI_Name; + $toName = $info[0]->Name; $toEmail = $info[0]->OPI_Email; $Mobile = $info[0]->Mobile; $subject = '退票请求'; @@ -101,8 +101,8 @@ class returnorders extends CI_Controller{ //发送邮件给外联 $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 - $customer_subject = 'returntickets'; - $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.',email address:'.$toEmail.',phone number '.$Mobile.') will contact you with the refund details via email within 24 hours.'; + $customer_subject = 'China Train Ticket(s) Cancelation'; + $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (ticket number '.$back_detail_data->result->ordernumber.', for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.',email address:'.$toEmail.',phone number '.$Mobile.') will contact you with the refund details via email within 24 hours.'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'Phoebe@chinahighlights.net',$customer_subject,$customer_body); @@ -113,8 +113,8 @@ class returnorders extends CI_Controller{ //发送邮件给外联 $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 - $customer_subject = 'returntickets'; - $customer_body = '

Dear '.$data->tst_realname.',

Your application for online ticket cancellation (for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.') has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number '.Mobile.') will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; + $customer_subject = 'China Train Ticket(s) Cancelation'; + $customer_body = '

Dear '.$data->tst_realname.',

Your application for online ticket cancellation (ticket number '.$back_detail_data->result->ordernumber.', for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.') has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number '.Mobile.') will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'Phoebe@chinahighlights.net',$customer_subject,$customer_body); From 6fe0fdbadfbcf84c5e3ec3bccf58c9d71bfaab42 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 15 May 2019 11:58:16 +0800 Subject: [PATCH 10/11] =?UTF-8?q?ipaylinks=E9=80=80=E6=AC=BE=E9=80=9A?= =?UTF-8?q?=E7=9F=A5unsend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/pay/models/note_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webht/third_party/pay/models/note_model.php b/webht/third_party/pay/models/note_model.php index 37c43624..8f5fc052 100644 --- a/webht/third_party/pay/models/note_model.php +++ b/webht/third_party/pay/models/note_model.php @@ -197,10 +197,10 @@ class Note_model extends CI_Model { -- gai.GAI_SN, -- gaib.GAI_SN, -- COLI.COLI_ID,IPL_payType='pay' and + -- when IPL_payType<>'pay' then 10000 case when (ISNULL(gaib.GAI_SN, 0)+ISNULL(gai.GAI_SN, 0))>0 then 9999 when IPL_payType='pay' and coli.COLI_ID is not null then 99999 - when IPL_payType<>'pay' then 10000 when IPL_sent='closeRecord' then 10000 else 1 end isRecord, @@ -287,7 +287,7 @@ class Note_model extends CI_Model { ) VALUES ( - ?,?,?,?,?,?,?,'send',?,?,? + ?,?,?,?,?,?,?,'unsend',?,?,? ) "; $query = $this->INFO->query($sql, From 5da96c4884ee3c0576790228abe16ce2990c9c03 Mon Sep 17 00:00:00 2001 From: cyc Date: Wed, 15 May 2019 14:13:54 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E5=8F=91=E9=80=81?= =?UTF-8?q?=E9=80=80=E7=A5=A8=E9=82=AE=E4=BB=B6=E7=BB=99=E5=AE=A2=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trainsystem/controllers/returnorders.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/third_party/trainsystem/controllers/returnorders.php b/application/third_party/trainsystem/controllers/returnorders.php index d2903963..749cbd67 100644 --- a/application/third_party/trainsystem/controllers/returnorders.php +++ b/application/third_party/trainsystem/controllers/returnorders.php @@ -102,10 +102,10 @@ class returnorders extends CI_Controller{ $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); //发送邮件给客人 $customer_subject = 'China Train Ticket(s) Cancelation'; - $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (ticket number '.$back_detail_data->result->ordernumber.', for name '.$data->tst_realname.',train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.',email address:'.$toEmail.',phone number '.$Mobile.') will contact you with the refund details via email within 24 hours.'; + $customer_body = '

Dear '.$data->tst_realname.',

Your tickets (ticket number '.$back_detail_data->result->ordernumber.', for name '.$data->tst_realname.', train No. '.$back_detail_data->result->checi.') have been cancelled online successfully. Your travel advisor ('.$toName.', email address: '.$toEmail.', phone number '.$Mobile.') will contact you with the refund details via email within 24 hours.'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; - $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'Phoebe@chinahighlights.net',$customer_subject,$customer_body); + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,$customer_email,$customer_subject,$customer_body); echo '{"reason":"退票成功","status":"200"}'; }else{ //退票失败后发送邮件 @@ -117,7 +117,7 @@ class returnorders extends CI_Controller{ $customer_body = '

Dear '.$data->tst_realname.',

Your application for online ticket cancellation (ticket number '.$back_detail_data->result->ordernumber.', for name '.$data->tst_realname.', train No.'.$back_detail_data->result->checi.') has failed.Your travel advisor('.$toName.', email address: '.$toEmail.', phone number '.Mobile.') will contact you via email within 24 hours. Please call us if you need to contact us urgently.

'; $customer_email = $this->BIZ_train_model->get_guest_info($coli_id); $customer_email = $customer_email[0]->GUT_Email; - $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,'Phoebe@chinahighlights.net',$customer_subject,$customer_body); + $this->Sendmail_model->SendMailToTable($toName,$toEmail,$data->tst_realname,$customer_email,$customer_subject,$customer_body); header("HTTP/1.1 404 Not Found"); echo '{"reason":"退票失败","status":"404"}'; }