diff --git a/application/third_party/train/controllers/search.php b/application/third_party/train/controllers/search.php
index 105e6728..b18b2f7b 100644
--- a/application/third_party/train/controllers/search.php
+++ b/application/third_party/train/controllers/search.php
@@ -362,9 +362,12 @@ class search extends CI_Controller{
$return_json['TrainList'] = array();
$all_stations = $this->BIZ_intel_train_model->get_allstations();
$i = 0;
+
foreach($all_stations as $item){
$rule_arr = $this->BIZ_intel_train_model->get_train_rules($item->station_id);
if(!empty($rule_arr)){
+
+
$return_json['TrainList'][$i]['FromStation'] = $item->s_ename;
$return_json['TrainList'][$i]['FromCountry'] = $item->s_country;
$return_json['TrainList'][$i]['ToStations'] = array();
@@ -391,26 +394,35 @@ class search extends CI_Controller{
$return_json['TrainList'] = array();
$all_stations = $this->BIZ_intel_train_model->ch_allstations();
$i = 0;
+ //print_r($all_stations);
+ $data = array();
+
foreach($all_stations as $item){
- if($item->s_country == 'China'){
- $rule_arr = $this->BIZ_intel_train_model->ch_train_rules($item->station_id);
+ $todata = new stdClass();
+ if($item->fromStationName == 'Beijing West'){
+ $item->fromStationName = 'Beijing';
}
-
- if(!empty($rule_arr)){
- $return_json['TrainList'][$i]['FromStation'] = $item->s_ename;
- $return_json['TrainList'][$i]['FromCountry'] = $item->s_country;
- $return_json['TrainList'][$i]['ToStations'] = array();
- $j = 0;
- foreach($rule_arr as $rule_info){
- $return_json['TrainList'][$i]['ToStations'][$j]['Message'] = $rule_info->tsi_Message;
- $return_json['TrainList'][$i]['ToStations'][$j]['Station'] = $rule_info->S_ename;
- $return_json['TrainList'][$i]['ToStations'][$j]['StationCountry'] = $rule_info->s_country;
- $j++;
- }
- $i++;
+ if(isset($data[$item->fromStationName])){
+ $todata->Message = $item->tsi_Message;
+ $todata->Station = $item->toStationName;
+ $todata->StationCountry = $item->toStationCountry;
+ array_push($data[$item->fromStationName]->ToStations,$todata);
+ }else{
+ $data[$item->fromStationName] = new stdClass();
+ $data[$item->fromStationName]->FromCountry = $item->fromStationCountry;
+ $data[$item->fromStationName]->FromStation = $item->fromStationName;
+ $data[$item->fromStationName]->ToStations = array();
+ $todata->Message = $item->tsi_Message;
+ $todata->Station = $item->toStationName;
+ $todata->StationCountry = $item->toStationCountry;
+ array_push($data[$item->fromStationName]->ToStations,$todata);
}
}
- //print_r($return_json);
+
+ foreach ($data as $rules){
+ array_push($return_json['TrainList'],$rules);
+ }
+
header('Content-type: application/json');
print_r(json_encode($return_json));
}
diff --git a/application/third_party/train/models/BIZ_intel_train_model.php b/application/third_party/train/models/BIZ_intel_train_model.php
index 31eeeab2..fc118aee 100644
--- a/application/third_party/train/models/BIZ_intel_train_model.php
+++ b/application/third_party/train/models/BIZ_intel_train_model.php
@@ -120,18 +120,41 @@ class BIZ_intel_train_model extends CI_Model {
}
public function get_allstations(){
- $sql = "SELECT * FROM TrainStation_intel";
+ $sql = "SELECT * FROM TrainStation_intel where station_id != 1";
$query = $this->HT->query($sql);
return $query->result();
}
public function ch_allstations(){
- $sql = "SELECT * FROM TrainStation_intel where station_id != 10";
+ $sql = "select
+ tsi1.s_ename as fromStationName,
+ tsi1.s_country as fromStationCountry,
+ tsi2.s_ename as toStationName,
+ tsi2.s_country as toStationCountry,
+ tsi_Message
+ from TrainSearch_intel
+ left join
+ TrainStation_intel tsi1
+ ON
+ tsi1.station_id = tsi_FromStation
+ left join
+ TrainStation_intel tsi2
+ ON
+ tsi2.station_id = tsi_ToStation
+ where tsi1.s_country = 'china' or tsi2.s_country = 'china'
+ ";
$query = $this->HT->query($sql);
return $query->result();
}
public function get_train_rules($station_id){
+ if($station_id == 11){
+ $station = "or tsi_FromStation = 10";
+ }elseif($station_id == 2){
+ $station = "or tsi_FromStation = 9";
+ }else{
+ $station = "";
+ }
$sql = "SELECT
S_ename,s_country,tsi_Message
FROM
@@ -142,13 +165,16 @@ class BIZ_intel_train_model extends CI_Model {
tsi_ToStation = station_id
where
tsi_FromStation = '{$station_id}'";
+ $sql .= $station;
$query = $this->HT->query($sql);
return $query->result();
}
public function ch_train_rules($station_id){
if($station_id == 11){
- $station = "or tsi_FromStation = 10 or tsi_ToStation = 10";
+ $station = "or tsi_FromStation = 10";
+ }elseif($station_id == 2){
+ $station = "or tsi_FromStation = 9";
}else{
$station = "";
}
@@ -161,10 +187,10 @@ class BIZ_intel_train_model extends CI_Model {
ON
tsi_ToStation = station_id
where
- (tsi_FromStation = ? or tsi_ToStation = ?)
+ (tsi_FromStation = ?)
";
$sql .= $station;
- $query = $this->HT->query($sql,array($station_id,$station_id));
+ $query = $this->HT->query($sql,array($station_id));
return $query->result();
}
}
diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php
index 8a0602f6..272ea642 100644
--- a/application/third_party/trainsystem/controllers/addorders.php
+++ b/application/third_party/trainsystem/controllers/addorders.php
@@ -20,6 +20,25 @@ class addorders extends CI_Controller{
exit('hello world');
}
+ //问题订单处理
+ public function error_orders_submit(){
+ log_message('error','errorOrdersSubmit');
+ //获取所有问题订单
+ $errorOrdersList = $this->BIZ_train_model->getErrorOrdersList();
+
+ foreach ($errorOrdersList as $items){
+ $bpe_sn = '';
+ $coldSn = $items->cold_sn;
+ $people_arr = $this->BIZ_train_model->biz_people($coldSn);
+ foreach($people_arr as $people_info){
+ $bpe_sn .= $people_info->BPE_SN.',';
+ }
+ $bpe_sn = substr($bpe_sn,0,strlen($bpe_sn)-1);
+ //发送请求
+ $this->booktickets($coldSn,$bpe_sn,'','juhe');
+ }
+ }
+
//自动出票
public function auto_pay_ticket(){
//log_message('error','auto ticket');
@@ -259,7 +278,7 @@ class addorders extends CI_Controller{
$passporttypeseid = "1";
$passporttypeseidname = "二代身份证";
break;
- case 'Travel Permit from Hong Kong / Macau':
+ case 'MainlandTravel Permit from Hong Kong and Macau':
$passporttypeseid = "C";
$passporttypeseidname = "港澳通行证";
break;
@@ -421,7 +440,7 @@ class addorders extends CI_Controller{
$passporttypeseid = "1";
$passporttypeseidname = "二代身份证";
break;
- case 'Travel Permit from Hong Kong / Macau':
+ case 'MainlandTravel Permit from Hong Kong and Macau':
$passporttypeseid = "C";
$passporttypeseidname = "港澳通行证";
break;
@@ -606,7 +625,7 @@ class addorders extends CI_Controller{
$PassportTypeseId = "1";
$PassportTypeseidName = "二代身份证";
break;
- case 'Travel Permit from Hong Kong / Macau':
+ case 'MainlandTravel Permit from Hong Kong and Macau':
$PassportTypeseidName = "港澳通行证";
break;
case 'Travel Permit from Taiwan':
diff --git a/application/third_party/trainsystem/controllers/api.php b/application/third_party/trainsystem/controllers/api.php
index a157f133..a60171fd 100644
--- a/application/third_party/trainsystem/controllers/api.php
+++ b/application/third_party/trainsystem/controllers/api.php
@@ -16,6 +16,46 @@ class api extends CI_Controller{
echo 'api manager';
}
+ public function checkOrderTime($coli_id=null){
+ if(empty($coli_id)){
+ exit('error null');
+ }else{
+ $orderInfo = $this->BIZ_train_model->getAllColdSn($coli_id);
+ if(empty($orderInfo)){
+ exit('error null');
+ }else{
+ $returnData = array();
+ $returnData['orderList'] = array();
+ foreach ($orderInfo as $items){
+ $coldSn = $items->cold_sn;
+ $trainOrderInfo = $this->train_system_model->get_ticketinfos($coldSn);
+ if(empty($trainOrderInfo)){
+ continue;
+ }else{
+ $data = new stdCLass();
+ $htOrderInfo = $this->BIZ_train_model->get_biz_foi($coldSn);
+ $data->coldSn = $coldSn;
+ $data->htDepartureTime = date('Y-m-d H:i:s',strtotime($htOrderInfo['0']->DepartureTime));
+ if($trainOrderInfo->ts_channel == 'juhe'){
+ $post_data=array(
+ "key"=>"79f03107b921ef31310bd40a1415c1cb",
+ "orderid"=>$trainOrderInfo->ts_ordernumber
+ );
+ $juheOrderDetail = json_decode(GetPost_http('http://op.juhe.cn/trainTickets/orderStatus',$post_data));
+ //print_r($juheOrderDetail);
+ $data->trainStartTime = $juheOrderDetail->result->start_time;
+ }else{
+ $data->trainStartTime = $trainOrderInfo->ts_startdate.' '.$trainOrderInfo->ts_startime;
+ }
+
+ array_push($returnData['orderList'],$data);
+ }
+ }
+ print_r(json_encode($returnData));
+ }
+ }
+ }
+
//获取订单出票状态
public function isbooktickets(){
$cold_sn = $this->input->get('cold_sn');
diff --git a/application/third_party/trainsystem/controllers/callback.php b/application/third_party/trainsystem/controllers/callback.php
index d4308fce..9c1f05aa 100644
--- a/application/third_party/trainsystem/controllers/callback.php
+++ b/application/third_party/trainsystem/controllers/callback.php
@@ -18,12 +18,12 @@ class callback extends CI_Controller{
}
//调试代码
- /*$test_post = '{"data":"{\"from_station_name\":\"\u5357\u4eac\",\"from_station_code\":\"NJH\",\"to_station_name\":\"\u4e0a\u6d77\",\"to_station_code\":\"SHH\",\"train_date\":\"2019-08-03\",\"orderid\":\"JH156315443048530\",\"user_orderid\":\"468046527\",\"orderamount\":\"418.50\",\"ordernumber\":\"EE33125907\",\"checi\":\"G7013\",\"msg\":\"\u51fa\u7968\u5931\u8d25\",\"status\":\"5\",\"passengers\":[{\"passengerid\":1,\"passengersename\":\"YUKITAKE\u3000KOICHI\",\"piaotype\":\"1\",\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"B\",\"passporttypeseidname\":\"\u62a4\u7167\",\"passportseno\":\"TR7398798\",\"price\":\"139.5\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"EE33125907102005B\",\"cxin\":\"02\u8f66\u53a2,05B\u5ea7\",\"reason\":0},{\"passengerid\":2,\"passengersename\":\"HOSHINOHIROMI\",\"piaotype\":\"1\",\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"B\",\"passporttypeseidname\":\"\u62a4\u7167\",\"passportseno\":\"TR5942140\",\"price\":\"139.5\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"EE33125907102005C\",\"cxin\":\"02\u8f66\u53a2,05C\u5ea7\",\"reason\":0},{\"passengerid\":3,\"passengersename\":\"TEZUKATAKANORI\",\"piaotype\":\"1\",\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"B\",\"passporttypeseidname\":\"\u62a4\u7167\",\"passportseno\":\"TK1662102\",\"price\":\"139.5\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"EE33125907102005D\",\"cxin\":\"02\u8f66\u53a2,05D\u5ea7\",\"reason\":0}],\"refund_money\":null,\"sign\":\"97c6b02c625bfd5ade3e76118c20af38\"}"}';
+ /*$test_post = '{"data":"{\"from_station_name\":\"\u897f\u5b89\u5317\",\"from_station_code\":\"EAY\",\"to_station_name\":\"\u6210\u90fd\u4e1c\",\"to_station_code\":\"ICW\",\"train_date\":\"2019-08-28\",\"orderid\":\"JH156560045168263\",\"user_orderid\":\"488142637\",\"orderamount\":\"526.00\",\"ordernumber\":\"EF88544299\",\"checi\":\"D1905\",\"msg\":\"\u51fa\u7968\u6210\u529f\",\"status\":\"4\",\"passengers\":[{\"passengerid\":1,\"passengersename\":\"SAIES ALLEN\",\"piaotype\":\"1\",\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"B\",\"passporttypeseidname\":\"\u62a4\u7167\",\"passportseno\":\"LT192822\",\"price\":\"263.0\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"EF88544299108007A\",\"cxin\":\"08\u8f66\u53a2,07A\u5ea7\",\"reason\":0},{\"passengerid\":2,\"passengersename\":\"WOODCROFT\",\"piaotype\":\"1\",\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"B\",\"passporttypeseidname\":\"\u62a4\u7167\",\"passportseno\":\"516130469\",\"price\":\"263.0\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"EF88544299102008F\",\"cxin\":\"02\u8f66\u53a2,08F\u5ea7\",\"reason\":0}],\"refund_money\":null,\"sign\":\"4c4a581e1f5205254e22e6ca1dde59bb\"}"}';
$data_post["data"] = json_decode($test_post)->data;*/
log_message('error','聚合回调:'.json_encode($data_post));
$data = json_decode($data_post["data"]);
-
+ //print_r($data);die();
$update_data = new StdClass();
$update_data->OrderStatus = $data->status;
$update_data->ordernumber = $data->orderid;
@@ -36,7 +36,7 @@ class callback extends CI_Controller{
$update_data->ElectronicOrderNumber = $data->ordernumber;
$update_data->reschedulecallback = '';
$update_data->ErrorMsg = $data->msg;
-
+ $update_data->OrderTicketTime = '';
//如果返回2则发送出票请求
if($data->status == "1"){
@@ -115,6 +115,12 @@ class callback extends CI_Controller{
$update_data->confirmcallback = $data_post["data"];
$this->BIZ_train_model->update_cold_planvei_sn($data->user_orderid);
+
+ //查询子订单状态,如果为41标记过问题订单的就把状态置位42,反之不操作
+ $coldState = $this->BIZ_train_model->getColdState($data->user_orderid);
+ if($coldState->COLD_State == 41){
+ $this->BIZ_train_model->updateColdState($data->user_orderid);
+ }
}elseif($data->status=="5"){
$update_data->confirmcallback = $data_post["data"];
}elseif($data->status=="7"){
@@ -162,7 +168,7 @@ class callback extends CI_Controller{
public function ctripcallback(){
$back_json = file_get_contents('php://input');
log_message('error','携程回调信息:'.$back_json);
- //$back_json = '{"@attributes":{"xsi":"http:\/\/www.w3.org\/2001\/XMLSchema-instance"},"Authentication":{"TimeStamp":"2019-07-29 22:51:05","ServiceName":"web.order.notifyTicket","MessageIdentity":"3B077107D1B6D07729A708B5B3ADEF9C","PartnerName":"tieyou"},"TrainOrderService":{"OrderInfo":{"OrderNumber":"guilintravel1564411808120","ElectronicOrderNumber":"EC11737908","OrderType":"\u7535\u5b50","OrderTotleFee":"1870.00","TicketInfo":{"OrderTicketFromStation":"\u4e0a\u6d77","OrderTicketToStation":"\u5317\u4eac\u5357","OrderTicketYMD":"20190827","OrderTicketTime":"21:24","OrderTicketCheci":"D710","OrderTicketPrice":"623.33","OrderAcceptSeat":{"0":"\n "},"OrderTicketSeat":"\u4e00\u7b49\u5367","SeatNumber":"10\u8f66\u53a225\u53f7\u4e0b\u94fa,10\u8f66\u53a226\u53f7\u4e0a\u94fa,10\u8f66\u53a228\u53f7\u4e0a\u94fa","railwayTip":{"0":"\n "},"AuditTicketCount":"3","ChildTicketCount":"0","Passengers":{"Passenger":[{"RealName":"BRAGANTINI ALICE","IdentityType":"\u62a4\u7167","NumberID":"YB1358397","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"VACCARI ALBERTO","IdentityType":"\u62a4\u7167","NumberID":"YA2689241","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"TUNESI SIMONE","IdentityType":"\u62a4\u7167","NumberID":"YB1847839","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"}]}},"TicketInfoFinal":{"OrderTicketFromStation":"\u4e0a\u6d77","OrderTicketToStation":"\u5317\u4eac\u5357","ChildBillid":{"0":"\n "},"ElectronicOrderNumber":"EC11737908","Result":"2","NoTicketReasons":{"0":"\n "},"OrderTicketYMD":"20190827","OrderTicketTime":"21:24","OrderTicketCheci":"D710","OrderTicketPrice":"623.33","SeatNumber":"10\u8f66\u53a225\u53f7\u4e0b\u94fa","railwayTip":{"0":"\n "},"TicketCheck":"\u5019\u8f66\u5730\u70b9\uff1a\u5019\u8f66\u5ba45","IsUserAcount":"0","ReturnFlag":"0","RescheduleFlag":"0","Tickets":{"Ticket":[{"OrderTicketSeat":"\u4e00\u7b49\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"676.00","TicketCount":"1","DetailInfos":{"DetailInfo":{"PassengerName":"BRAGANTINI ALICE","IdentityType":"\u62a4\u7167","NumberID":"YB1358397","SeatNo":"10\u8f66\u53a225\u53f7\u4e0b\u94fa"}}},{"OrderTicketSeat":"\u4e00\u7b49\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"597.00","TicketCount":"2","DetailInfos":{"DetailInfo":[{"PassengerName":"VACCARI ALBERTO","IdentityType":"\u62a4\u7167","NumberID":"YA2689241","SeatNo":"10\u8f66\u53a226\u53f7\u4e0a\u94fa"},{"PassengerName":"TUNESI SIMONE","IdentityType":"\u62a4\u7167","NumberID":"YB1847839","SeatNo":"10\u8f66\u53a228\u53f7\u4e0a\u94fa"}]}}]}}}}}';
+ //$back_json = '{"@attributes":{"xsi":"http:\/\/www.w3.org\/2001\/XMLSchema-instance"},"Authentication":{"TimeStamp":"2019-08-05 14:02:42","ServiceName":"web.order.notifyTicket","MessageIdentity":"90D9B095D5E08277BBA115D1F2E99CC8","PartnerName":"tieyou"},"TrainOrderService":{"OrderInfo":{"OrderNumber":"guilintravel1564984816236","ElectronicOrderNumber":"EH75665590","OrderType":"\u7535\u5b50","OrderTotleFee":"2940.00","TicketInfo":{"OrderTicketFromStation":"\u5317\u4eac\u897f","OrderTicketToStation":"\u5357\u5b81","OrderTicketYMD":"20190815","OrderTicketTime":"16:09","OrderTicketCheci":"Z5","OrderTicketPrice":"735.00","OrderAcceptSeat":{"0":"\n "},"OrderTicketSeat":"\u8f6f\u5367","SeatNumber":"06\u8f66\u53a201\u53f7\u4e0b\u94fa,06\u8f66\u53a203\u53f7\u4e0b\u94fa,06\u8f66\u53a202\u53f7\u4e0a\u94fa,06\u8f66\u53a204\u53f7\u4e0a\u94fa","railwayTip":{"0":"\n "},"AuditTicketCount":"4","ChildTicketCount":"0","Passengers":{"Passenger":[{"RealName":"MATILDE SOARES SAMPAIO","IdentityType":"\u62a4\u7167","NumberID":"N755614","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"NUNO BERNARDO NOBRE SOARES","IdentityType":"\u62a4\u7167","NumberID":"P668714","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"NUNO BERNARDO NOBRE SOARES","IdentityType":"\u62a4\u7167","NumberID":"P668715","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"ANA SOFIA ROCIO CRESPO NOBRE","IdentityType":"\u62a4\u7167","NumberID":"N751936","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"}]}},"TicketInfoFinal":{"OrderTicketFromStation":"\u5317\u4eac\u897f","OrderTicketToStation":"\u5357\u5b81","ChildBillid":{"0":"\n "},"ElectronicOrderNumber":"EH75665590","Result":"2","NoTicketReasons":{"0":"\n "},"OrderTicketYMD":"20190815","OrderTicketTime":"16:09","OrderTicketCheci":"Z5","OrderTicketPrice":"735.00","SeatNumber":"06\u8f66\u53a201\u53f7\u4e0b\u94fa","railwayTip":{"0":"\n "},"TicketCheck":{"0":"\n "},"IsUserAcount":"0","ReturnFlag":"0","RescheduleFlag":"0","Tickets":{"Ticket":[{"OrderTicketSeat":"\u8f6f\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"751.50","TicketCount":"2","DetailInfos":{"DetailInfo":[{"PassengerName":"MATILDE SOARES SAMPAIO","IdentityType":"\u62a4\u7167","NumberID":"N755614","SeatNo":"06\u8f66\u53a201\u53f7\u4e0b\u94fa"},{"PassengerName":"NUNO BERNARDO NOBRE SOARES","IdentityType":"\u62a4\u7167","NumberID":"P668714","SeatNo":"06\u8f66\u53a203\u53f7\u4e0b\u94fa"}]}},{"OrderTicketSeat":"\u8f6f\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"718.50","TicketCount":"2","DetailInfos":{"DetailInfo":[{"PassengerName":"NUNO BERNARDO NOBRE SOARES","IdentityType":"\u62a4\u7167","NumberID":"P668715","SeatNo":"06\u8f66\u53a202\u53f7\u4e0a\u94fa"},{"PassengerName":"ANA SOFIA ROCIO CRESPO NOBRE","IdentityType":"\u62a4\u7167","NumberID":"N751936","SeatNo":"06\u8f66\u53a204\u53f7\u4e0a\u94fa"}]}}]}}}}}';
$ctrip_backdata = json_decode($back_json);
//print_r($ctrip_backdata);
@@ -179,6 +185,7 @@ class callback extends CI_Controller{
$update_data->OrderTotleFee = 0;
$update_data->ElectronicOrderNumber = '';
$update_data->reschedulecallback = '';
+ $update_data->OrderTicketTime = '';
if($update_data->ServiceName == 'web.order.notifyTicket'){
$update_data->OrderStatus = '4';
@@ -187,6 +194,7 @@ class callback extends CI_Controller{
$update_data->OrderTotleFee = $ctrip_backdata->TrainOrderService->OrderInfo->OrderTotleFee;
$update_data->ElectronicOrderNumber = $ctrip_backdata->TrainOrderService->OrderInfo->ElectronicOrderNumber;
$update_data->bookcallback = $back_json;
+ $update_data->OrderTicketTime = $ctrip_backdata->TrainOrderService->OrderInfo->TicketInfo->OrderTicketTime;
//新添加检票口信息
if(isset($ctrip_backdata->TrainOrderService->OrderInfo->TicketInfoFinal->TicketCheck)){
diff --git a/application/third_party/trainsystem/controllers/check.php b/application/third_party/trainsystem/controllers/check.php
deleted file mode 100644
index 49f0d110..00000000
--- a/application/third_party/trainsystem/controllers/check.php
+++ /dev/null
@@ -1,528 +0,0 @@
-load->model("BIZ_train_model");
- $this->load->model("train_system_model");
- $this->load->helper('train');
- $this->db_train_zw = $this->config->item('db_train_zw');
- $this->train_zw = $this->config->item('train_zw');
- $this->black_list = $this->config->item('black_list');
- $this->isauto = 0;
- }
-
- public function index(){
- //$this->BIZ_train_model->delete_other();
- }
-
- //1903241050
- public function check_autotickets(){
- log_message('error','auto ticket');
- date_default_timezone_set('Asia/Shanghai');
- //判断账户余额,如果小于1000自动退出。
- $post_data = array("key"=>JUHE_TRAIN_API_KEY);
- $back_data = GetPost_http("http://op.juhe.cn/trainTickets/balance.php",$post_data);
- $price = json_decode($back_data)->result;
- print_r('账户余额:'.$price);
- if($price < 1000){
- exit('账户余额不足');
- }
- //筛选出能自动出票的订单
- $auto_pool = $this->BIZ_train_model->auto_check_ticket();
-
- //创建一个不允许自动出票的国际火车票数组
- $nation_train = array('K19', 'K23', 'Z8701', 'Z8702', 'Z97', 'Z98', 'Z99', 'Z100', 'K9795');
-
- //创建黑名单
- $black_list = $this->config->item('black_list');
- $string = '';
-
- foreach($auto_pool as $item){
- $this->isauto = 1;
- $bpe_sn = '';
- $back_message = '';
- $cold_sn = $item->COLD_SN;
- $coli_id = $item->coli_id;
- $back_data = 1;
-
- $people_arr = $this->BIZ_train_model->biz_people($cold_sn);
- $train_info = $this->BIZ_train_model->get_biz_foi($cold_sn);
-
- if($item->COLD_SPFS > 1){
- //寄送票
- $back_data = 0;
- $back_message .= '-邮寄不自动出票';
- }
-
- //乘客人数大于5人不出票
- if(count($people_arr) > 5){
- $back_data = 0;
- $back_message .= '-乘客人数大于5不自动出票';
- }
-
- //护照号如果在黑名单的就不自动出票
- foreach($people_arr as $people_info){
- if(in_array($people_info->BPE_Passport,$black_list)){
- $back_data = 0;
- $back_message .= '-此用户为黑名单用户,不自动出票';
- }
-
- if(strlen($people_info->BPE_Passport) >= 18){
- $back_data = 0;
- $back_message .= '-护照位数大于18不自动出票';
- }
-
- $bpe_sn .= $people_info->BPE_SN.',';
- }
- $bpe_sn = substr($bpe_sn,0,strlen($bpe_sn)-1);
-
- //单张票价不能大于1000人民币
- if($train_info[0]->adultcost > 1000){
- $back_data = 0;
- $back_message .= '-单价大于1000不自动出票';
- }
-
- //如果为国际火车票就不出票
- if(in_array($train_info[0]->FlightsNo, $nation_train)){
- $back_data = 0;
- $back_message .= '-国际火车票不自动出票';
- }
-
- //无座的订单不做出票
- if($train_info[0]->Aircraft == 'WZ'){
- $back_data = 0;
- $back_message .= '-无座不自动出票';
- }
-
- //香港火车不自动出票
- if($train_info[0]->DepartAirport == 'XJA'){
- $back_data = 0;
- $back_message .= '-香港火车不自动出票';
- }
-
- $DepartureDate = strtotime($train_info[0]->DepartureDate);
- $time = time();
- $depart_diff = ($DepartureDate - $time) / 86400;
-
- if($train_info[0]->ArrivalAirport == 'XJA' && $train_info[0]->adultcost > 500 && $depart_diff > 5){
- $back_data = 0;
- $back_message .= '-内地香港火车金额大于500超过五天不自动出票';
- }
- //print_r($train_info);
-
- //如果刚好是第三十天的订单
- if(($item->COLI_State == '8' || $item->COLI_State == '63')){
- $this->isauto = 3;
- $time_obj = $this->BIZ_train_model->get_saletime($train_info['0']->DepartAirport_cn);
- if(!empty($time_obj)){
- $saletime = strtotime(date('Y-m-d').' '.$time_obj->TST_saletime);
- //echo $saletime;
- $sale_diff = (time() - $saletime) / 3600;
- echo $cold_sn.'_'.date('Y-m-d').' '.$time_obj->TST_saletime.'/'.$saletime.'
';
- if($sale_diff > 1){
- $back_data = 0;
- $back_message .= '-超过抢票时间';
- }else if($sale_diff <0){
- $back_data = 0;
- $back_message .= '-未到抢票时间';
- }
- }
- }
-
- if($back_data == 0){
- $string .= '
汉特订单号:'.$coli_id.'('.$cold_sn.'/'.$this->isauto.')'.$back_message.' |
';
- }else{
- //单个订单提交
- echo $cold_sn.'
';
- //$this->booktickets($cold_sn,$bpe_sn,'','juhe');
- //$string .= '汉特订单号:'.$coli_id.'('.$cold_sn.')可以自动出票 |
';
- }
- }
- print_r('');
- }
-
- //创建一个方法用于接收所有的出票请求
- public function booktickets($cold_sn=null,$bpe_sn=null,$selectseat=null,$type=null){
- if(empty($cold_sn) && empty($bpe_sn)){
- //接收子表订单号
- $cold_sn = $this->input->get_post('order');
- //接收客人表sn
- $bpe_sn = $this->input->get_post("people");
- //接收选座字符串
- $selectseat = $this->input->get_post("selectseat");
- //接收出票接口
- $type = $this->input->get_post("type");
- }
- //测试数据
- /*$cold_sn = '488121613';
- $bpe_sn = '473183645,473183646,473183647';
- $selectseat = '';
- $type = 'juhe';*/
-
- if(!is_numeric($cold_sn)){
- $reback["mes"]="订单号是数字";
- echo json_encode($reback);
- return false;
- }
-
- if(empty($bpe_sn)){
- $reback["mes"]="请选择乘客";
- echo json_encode($reback);
- return false;
- }
-
- $data['train'] = $this->BIZ_train_model->biz_order_detail($cold_sn);
- $data['people_list']=$this->BIZ_train_model->in_bpesn_people_info($bpe_sn);
-
- if($selectseat == ''){
- $selectseat = '';
- $train_select = $data['train']->FOI_SelectedSeat;
- $obj = explode(',',$train_select);
- foreach($obj as $value){
- $selectseat .= $value;
- }
- }
-
- if (empty($data['train'])) {
- //显示错误,找不到车次
- $reback["mes"]="找不到车次";
- echo json_encode($reback);
- return false;
- }
-
- if (empty($data['people_list'])) {
- //显示错误,找不到用户信息
- $reback["mes"]="找不到乘客信息";
- echo json_encode($reback);
- return false;
- }
-
- if (count($data['people_list']) > 5) {
- //显示错误,用户超过五个
- $reback["mes"]="乘客不能超过五个";
- echo json_encode($reback);
- return false;
- }
-
- switch ($type){
- case 'juhe':
- $this->juheModel($data,$selectseat,$cold_sn);
- break;
- case 'tuniu':
- $this->tuniuModel($data,$selectseat,$cold_sn);
- break;
- case 'ctrip':
- $this->ctripModel($data,$selectseat,$cold_sn);
- break;
- }
- }
-
- function juheModel($data=null,$selectseat=null,$cold_sn=null){
- $zwcode = $this->db_train_zw[$data['train']->Aircraft]; //座位简码
- $zwname = $this->train_zw[$this->db_train_zw[$data['train']->Aircraft]]; //座位名称
-
- //进行提交字符串的拼接
- $passengers = "";
- foreach ($data['people_list'] as $key => $item) {
- //乘客姓名
- $passengersename = $item->BPE_FirstName.$item->BPE_MiddleName.$item->BPE_LastName;
- //将特殊字符转换为正常字符以便于出票
- $passengersename = chk_sp_name($passengersename);
- //乘客类型
- switch ($item->BPE_GuestType) {
- case 1:
- $piaotype = 1;
- $piaotypename = "成人票";
- break;
- case 2:
- $piaotype = 2;
- $piaotypename = "儿童票";
- break;
- default://外国人应该就两种票吧
- $piaotype = 1;
- $piaotypename = "成人票";
- break;
- }
-
- //证件类型
- switch ($item->BPE_PassportType){
- case 'Chinese ID':
- $passporttypeseid = "1";
- $passporttypeseidname = "二代身份证";
- break;
- case 'Travel Permit from Hong Kong / Macau':
- $passporttypeseid = "C";
- $passporttypeseidname = "港澳通行证";
- break;
- case 'Travel Permit from Taiwan':
- $passporttypeseid = "G";
- $passporttypeseidname = "台湾通行证";
- break;
- default :
- $passporttypeseid = "B";
- $passporttypeseidname = "护照";
- break;
- }
-
- switch ($item->BPE_SEX){
- case '100003':
- $sex = 'F';
- break;
- case '100001':
- $sex = 'M';
- break;
- }
-
- $passportseno = str_replace(' ','',$item->BPE_Passport);
-
- //添加一个判断护照号是否在黑名单
- if(in_array($passportseno,$this->black_list)){
- $reback["mes"] = "乘客为黑名单用户";
- echo json_encode($reback);
- return false;
- }
-
- if($passporttypeseid == 'G'){
- $passengers .= ',{"passengerid":' . (++$key) . ',"passengersename":"' . $passengersename . '","piaotype":"' . $piaotype . '","piaotypename":"' . $piaotypename . '","passporttypeseid":"' . $passporttypeseid . '","passporttypeseidname":"' . $passporttypeseidname . '","passportseno":"' . $passportseno . '","price":"1","zwcode":"' . $zwcode . '","zwname":"' . $zwname . '","gatValidDateEnd":"'.$item->BPE_PassExpdate.'","gatBornDate":"'.$item->BPE_BirthDate.'","sexCode":"'.$sex.'"}';
- }else{
- $passengers .= ',{"passengerid":' . ( ++$key) . ',"passengersename":"' . $passengersename . '","piaotype":"' . $piaotype . '","piaotypename":"' . $piaotypename . '","passporttypeseid":"' . $passporttypeseid . '","passporttypeseidname":"' . $passporttypeseidname . '","passportseno":"' . $passportseno . '","price":"1","zwcode":"' . $zwcode . '","zwname":"' . $zwname . '"}';
- }
-
- }
-
- $passengers .= "]";
- $passengers = substr($passengers, 1);
- $passengers = "[" . $passengers;
- 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",
- "from_station_name"=>$data["train"]->DepartAirport_cn,
- "from_station_code"=>$data["train"]->DepartAirport,
- "to_station_code"=>$data["train"]->ArrivalAirport,
- "to_station_name"=>$data["train"]->ArrivalAirport_cn,
- "passengers"=>$passengers,
- "checi"=>$data["train"]->FlightsNo
- );
- }else{
- $post_data=array(
- "key"=>JUHE_TRAIN_API_KEY,
- "user_orderid"=>$cold_sn,//自定义订单号
- "train_date"=>substr($data["train"]->DepartureDate, 0, 10),
- "is_accept_standing"=>"no",
- "choose_seats"=>$selectseat,
- "from_station_name"=>$data["train"]->DepartAirport_cn,
- "from_station_code"=>$data["train"]->DepartAirport,
- "to_station_code"=>$data["train"]->ArrivalAirport,
- "to_station_name"=>$data["train"]->ArrivalAirport_cn,
- "passengers"=>$passengers,
- "checi"=>$data["train"]->FlightsNo
- );
- }
-
- //发起请求
- /*$add_data = new stdClass();
- $back_json = GetPost_http('http://op.juhe.cn/trainTickets/submit',$post_data);
- $back_data = json_decode($back_json);
-
- if(!$back_data->error_code){
- $add_data->ordernumber = $back_data->result->orderid;
- $reback["status"] = 1;
- $reback["order"] = $back_data->result->orderid;
- $reback["mes"] = "订单提交成功,等待回调";
- }else{
- $add_data->ordernumber=null;
- $reback["mes"] = $back_json;
- $add_data->status = "e";
- }*/
-
- //本地订单入库
- $add_data->cold_sn = $cold_sn;
- $add_data->returncode = $back_data->error_code;
- $add_data->status = '2';
- $add_data->errormsg = '预定中';
- $add_data->checi = $data['train']->FlightsNo;
- $add_data->fromstationame = $data['train']->DepartAirport_cn;
- $add_data->fromstationcode = $data['train']->DepartAirport;
- $add_data->tostationame = $data['train']->ArrivalAirport_cn;
- $add_data->tostationcode = $data['train']->ArrivalAirport;
- $add_data->startdate = date('Y-m-d',strtotime($data['train']->DepartureDate));
- $add_data->startime = date('H:i',strtotime($data['train']->DepartureTime));
- $add_data->endtime = date('H:i',strtotime($data['train']->ArrivalTime));
- $add_data->runtime = (strtotime($data['train']->ArrivalTime) - strtotime($data['train']->DepartureTime)) / 60;
- $add_data->channel = 'juhe';
- $add_data->isauto = $this->isauto;
- print_r($add_data);
- /*$this->train_system_model->add_orders($add_data);
- echo json_encode($reback);
- return false;*/
-
- }
-
- public function test_add(){
- $add_data->cold_sn = '123123';
- $add_data->returncode = '123123';
- $add_data->status = '2';
- $add_data->errormsg = '预定中';
- $add_data->checi = 'G89';
- $add_data->fromstationame = '北京';
- $add_data->fromstationcode = 'BJP';
- $add_data->tostationame = '上海';
- $add_data->tostationcode = 'SHH';
- $add_data->startdate = '2019-02-09';
- $add_data->startime = '14:00';
- $add_data->endtime = '19:00';
- $add_data->runtime = '300';
- $add_data->channel = 'juhe';
- $add_data->isauto = 3;
- print_r($add_data);
- $this->train_system_model->add_orders($add_data);
- }
-
- public function juhecallback(){
- /*$data_post = $this->input->post();
- if(empty($data_post)){
- header("HTTP/1.1 404 Not Found");
- exit('{"reason":"empty infos","status":"404"}');
- }*/
-
- //调试代码
- $test_post = '{"data":"{\"from_station_name\":\"\u5e7f\u5dde\u5357\",\"from_station_code\":\"IZQ\",\"to_station_name\":\"\u9999\u6e2f\u897f\u4e5d\u9f99\",\"to_station_code\":\"XJA\",\"train_date\":\"2019-04-29\",\"orderid\":\"JH155651319519711\",\"user_orderid\":\"488132483\",\"orderamount\":\"374.00\",\"ordernumber\":\"E244376926\",\"checi\":\"G6537\",\"msg\":\"\u51fa\u7968\u6210\u529f\",\"status\":\"4\",\"passengers\":[{\"passengerid\":1,\"passengersename\":\"PRIETORAMOSJORGECLAUDIO\",\"piaotype\":\"1\",\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"B\",\"passporttypeseidname\":\"\u62a4\u7167\",\"passportseno\":\"AAC408307\",\"price\":\"187.0\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"E244376926111013D\",\"cxin\":\"11\u8f66\u53a2,13D\u5ea7\",\"reason\":0},{\"passengerid\":2,\"passengersename\":\"SALAZARNATALIAGISELA\",\"piaotype\":\"1\",\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"B\",\"passporttypeseidname\":\"\u62a4\u7167\",\"passportseno\":\"AAC419811\",\"price\":\"187.0\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"E244376926111013F\",\"cxin\":\"11\u8f66\u53a2,13F\u5ea7\",\"reason\":0}],\"refund_money\":null,\"sign\":\"831c146e2ce223a5437ed78db0ec8c25\"}"}';
-
- $data_post["data"] = json_decode($test_post)->data;
-
- log_message('error','聚合回调:'.json_encode($data_post));
- $data = json_decode($data_post["data"]);
-
- $update_data = new StdClass();
- $update_data->OrderStatus = $data->status;
- $update_data->ordernumber = $data->orderid;
- $update_data->OrderTotleFee = $data->orderamount;
- $update_data->seatsinfo = '';
- $update_data->TicketCheck = '';
- $update_data->bookcallback = '';
- $update_data->confirmcallback = '';
- $update_data->returncallback = '';
- $update_data->ElectronicOrderNumber = $data->ordernumber;
- $update_data->reschedulecallback = '';
- $update_data->ErrorMsg = $data->msg;
-
- //如果返回2则发送出票请求
- if($data->status == "1"){
- $update_data->bookcallback = $data_post["data"];
- }elseif($data->status == "2"){
- $coach = array();
- $seats = array();
- $string = '';
- $passagers = $data->passengers;
- foreach($passagers as $item){
- foreach(explode(',',$item->cxin) as $item_seat){
- if(strpos($item_seat,'车厢')){
- $item_seat = str_replace('车厢','',$item_seat);
- array_push($coach,$item_seat);
- }else{
- $find = array('座上铺','座中铺','座下铺','座');
- $replace = array(' upper',' middle',' lower','');
- $item_seat = str_replace($find,$replace,$item_seat);
- array_push($seats,$item_seat);
- }
- }
-
- //对订票乘客进行存储
- $data_passager->ordernumber = $data->orderid;
- $data_passager->realname = $item->passengersename;
- $data_passager->identitytype = $item->passporttypeseidname;
- $data_passager->numberid = $item->passportseno;
- $data_passager->ticketype = $item->piaotypename;
- $data_passager->ticketprice = $item->price;
- $data_passager->seatype = $item->zwname;
- $data_passager->seatdetail = $item->cxin;
- $data_passager->status = '4';
- $this->train_system_model->add_passagers($data_passager);
- }
-
- //判断车厢是否唯一,如果不唯一的话,分成两个车厢
- if(count(array_unique($coach)) == 1){
- $onlycoach = array_unique($coach);
- $string .= 'Coach '.$onlycoach[0].',';
- }else{
- foreach (array_unique($coach) as $item_coach){
- $string .= 'Coach '.$item_coach.',';
- }
- }
-
- $string .= 'Seat ';
- foreach($seats as $item_seat){
- $string .= $item_seat.',';
- }
-
- $seatinfo = substr($string,0,strlen($string)-1);
- $update_data->seatsinfo = $seatinfo;
-
- $post_data = array(
- "key"=>JUHE_TRAIN_API_KEY,
- "orderid"=>$data->orderid
- );
- $back_json = GetPost_http(JUHE_TRAIN_PAY_API,$post_data);
- $update_data->bookcallback = $data_post["data"];
- }elseif($data->status == "4"){
- $add_train_order_data->TOC_Memo = $data->orderid." 聚合出票";
- $add_train_order_data->TOC_COLD_SN = $data->user_orderid;
- $add_train_order_data->TOC_TrainNumber = $data->checi;
- $add_train_order_data->TOC_DepartureDate = $data->train_date;
- $add_train_order_data->TOC_TicketCost = $data->orderamount;
- $add_train_order_data->poundage = (count($data->passengers)*2)."";//手续费,每人两块,转换成字符串
- $add_train_order_data->FOI_TrainNetOrderNo = $data->ordernumber;
- $this->BIZ_train_model->add_train_payment($add_train_order_data);
-
- $update_data->confirmcallback = $data_post["data"];
- $this->BIZ_train_model->update_cold_planvei_sn($data->user_orderid);
- }elseif($data->status=="7"){
- //退票成功 写入TOC表
- $newtime = "";//记录最新操作时间
- $refund_passportseno = "";//退票人护照号
- $refund_money = "";//退票金额
- foreach ($data->passengers as $p) {
- if(isset($p->returntickets)){
- $refund_passportseno = $p->refundTimeline[count($p->refundTimeline)-1]->detail->passportseno;
- $refund_money = $p->refundTimeline[count($p->refundTimeline)-1]->detail->returnmoney;
- //退票时还需要单独对对每个乘客存储回调信息
- $passpager_info = new stdClass();
- $passpager_info->returncallback = $data_post["data"];
- $passpager_info->status = '7';
- $passpager_info->ordernumber = $data->orderid;
- $passpager_info->realname = $p->refundTimeline[count($p->refundTimeline)-1]->detail->passengername;
- $passpager_info->numberid = $refund_passportseno;
- print_r($passpager_info);
- $this->train_system_model->update_passpager_info($passpager_info);
-
- //添加退款记录
- $add_train_order_data->TOC_COLD_SN = $data->user_orderid;
- $add_train_order_data->TOC_Memo = $data->orderid." ".$refund_passportseno;
- $add_train_order_data->ordernumber = $data->user_orderid;
- $add_train_order_data->TOC_TrainNumber = $data->checi;
- $add_train_order_data->TOC_DepartureDate = $data->train_date;
- $add_train_order_data->TOC_TicketCost = -$refund_money;
- $add_train_order_data->FOI_TrainNetOrderNo = null;//退票不用更新取票号,以此在模型里面判断是否为退票消息
-
- $this->BIZ_train_model->add_train_payment($add_train_order_data);
- }else{
- //有可能提交了退票或者还没有退票
-
- }
- }
-
- $update_data->returncallback = $data_post["data"];
- }
- //print_r($update_data);die();
- //更新订单信息(出票系统)
- $this->train_system_model->update_orders($update_data);
- }
-
-}
\ No newline at end of file
diff --git a/application/third_party/trainsystem/controllers/tools.php b/application/third_party/trainsystem/controllers/tools.php
new file mode 100644
index 00000000..41c08748
--- /dev/null
+++ b/application/third_party/trainsystem/controllers/tools.php
@@ -0,0 +1,25 @@
+load->model("train_tools_model");
+ }
+
+ public function index(){
+ exit('tools controller');
+ }
+
+ public function updateOrderInfo(){
+ $table = $this->input->get_post('table');
+ $id = $this->input->get_post('id');
+ $key = $this->input->get_post('key');
+ $value = $this->input->get_post('value');
+
+ $this->train_tools_model->updateOrderInfo($table,$id,$key,$value);
+ }
+
+}
\ No newline at end of file
diff --git a/application/third_party/trainsystem/helpers/train_helper.php b/application/third_party/trainsystem/helpers/train_helper.php
index 5b02363b..24256055 100644
--- a/application/third_party/trainsystem/helpers/train_helper.php
+++ b/application/third_party/trainsystem/helpers/train_helper.php
@@ -35,8 +35,8 @@ function strexchangeid($name){
//特殊字符转换
function chk_sp_name($name){
$name = str_replace(
- array('á','ë','é','è','í','ó','ú','ű','ñ','á','é','í','ó','ö','ú','ű','ñ','/',' '),
- array('a','e','e','e','i','o','u','u','n','A','E','I','o','o','U','U','N','',''),
+ array('á','ë','é','è','í','ó','ú','ű','ñ','á','é','í','ó','ö','ú','ű','ñ','/',',',' '),
+ array('a','e','e','e','i','o','u','u','n','A','E','I','o','o','U','U','N','','',''),
$name
);
return substr(strtoupper($name),0,30);
diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php
index f525d375..97a1b3a1 100644
--- a/application/third_party/trainsystem/models/BIZ_train_model.php
+++ b/application/third_party/trainsystem/models/BIZ_train_model.php
@@ -436,6 +436,21 @@ class BIZ_train_model extends CI_Model {
return $query->result();
}
+ function getErrorOrdersList(){
+ $sql = "select
+ cold_sn
+ from
+ BIZ_ConfirmLineDetail left join BIZ_ConfirmLineInfo on COLD_COLI_SN = COLI_SN
+ where
+ COLD_State = '41'
+ and
+ COLI_State = '63'
+ and
+ COLI_WebCode in ('cht','WebMob-biz','WeChat-biz')";
+ $query = $this->HT->query($sql);
+ return $query->result();
+ }
+
//跟踪号与订单关联
public function linkTrackingCode($coli_sn,$TrackCode){
include('c:/database_conn.php');
@@ -467,11 +482,16 @@ class BIZ_train_model extends CI_Model {
*/
sqlsrv_free_stmt($stmt);
sqlsrv_close($conn);
-
-
}
}
+ //根据订单号获取所有子订单号
+ public function getAllColdSn($coliId){
+ $sql = 'select cold_sn from BIZ_ConfirmLineInfo left join BIZ_ConfirmLineDetail on coli_sn = cold_coli_sn where coli_id = ?';
+ $query = $this->HT->query($sql, array($coliId));
+ return $query->result();
+ }
+
//通过COLI_ID获取团名 即 GroupInfo的GRI_No
function get_gri_no($coli_id){
$sql="SELECT GRI_No FROM GroupInfo
@@ -483,6 +503,19 @@ class BIZ_train_model extends CI_Model {
return $query->result();
}
+ //获取子订单状态
+ function getColdState($coldSn){
+ $sql = "select COLD_State from BIZ_ConfirmLineDetail where cold_sn = ?";
+ $query = $this->HT->query($sql, array($coldSn));
+ return $query->row();
+ }
+
+ //更新子订单状态
+ function updateColdState($coldSn){
+ $sql = "update BIZ_ConfirmLineDetail set COLD_State = 42 where COLD_SN = ? ";
+ $query = $this->HT->query($sql, array($coldSn));
+ }
+
//修改
function update_biz_jol($where,$data){
return $this->INFO->where($where)->update("trainsystem", $data);
diff --git a/application/third_party/trainsystem/models/train_system_model.php b/application/third_party/trainsystem/models/train_system_model.php
index c6ce76f7..945e66cd 100644
--- a/application/third_party/trainsystem/models/train_system_model.php
+++ b/application/third_party/trainsystem/models/train_system_model.php
@@ -196,7 +196,8 @@ class train_system_model extends CI_Model {
ts_checkdoor = '{$data->TicketCheck}',
ts_elecnumber = '{$data->ElectronicOrderNumber}',
ts_orderamount = '{$data->OrderTotleFee}',
- ts_bookcallback = '{$data->bookcallback}',";
+ ts_bookcallback = '{$data->bookcallback}',
+ ts_startime = '{$data->OrderTicketTime}',";
}else if(!empty($data->confirmcallback)){
$where .= "ts_confirmcallback = '{$data->confirmcallback}',";
}else if(!empty($data->returncallback)){
diff --git a/application/third_party/trainsystem/models/train_tools_model.php b/application/third_party/trainsystem/models/train_tools_model.php
new file mode 100644
index 00000000..1565930f
--- /dev/null
+++ b/application/third_party/trainsystem/models/train_tools_model.php
@@ -0,0 +1,26 @@
+HT = $this->load->database('HT', TRUE);
+ $this->INFO = $this->load->database('INFO', TRUE);
+ }
+
+ public function updateOrderInfo($table,$id,$key,$value){
+ if($table == 'trainsystem'){
+ $idKey = 'ts_id';
+ }elseif($table == 'trainsystem_tickets'){
+ $idKey = 'tst_id';
+ }else{
+ exit();
+ }
+ $sql = "
+ update {$table} set {$key} = '{$value}' where {$idKey} = {$id}
+ ";
+ $this->INFO->query($sql);
+ }
+
+}
\ No newline at end of file
diff --git a/application/third_party/tripadvisor_spider/controllers/index.php b/application/third_party/tripadvisor_spider/controllers/index.php
index bc67b596..ed771a81 100644
--- a/application/third_party/tripadvisor_spider/controllers/index.php
+++ b/application/third_party/tripadvisor_spider/controllers/index.php
@@ -231,14 +231,15 @@ class Index extends CI_Controller {
//创建返回的数组
$data = [];
- foreach ($phpExcel->getSheetNames() as $key=>$destination){
+ foreach ($phpExcel->getSheetNames() as $key=>$form_name){
$data[$key] = new stdClass();
- $data[$key]->destination = $destination;
+ $data[$key]->form_name = $form_name;
$data[$key]->list_name = array();
$data[$key]->list_data = array();
//循环获取每个表格的行/列数
$row = $phpExcel->getSheet($key)->getHighestRow();
$column = $phpExcel->getSheet($key)->getHighestColumn();
+ $column = 'D';
$j = 0;
// 行数循环
for ($i = 1; $i <= $row; $i++) {
@@ -309,6 +310,8 @@ class Index extends CI_Controller {
$url = $this->input->get_post('url');
$destination = $this->input->get_post('destination');
$html_num = $this->input->get_post('html_num');
+ $group_name = $this->input->get_post('group_name');
+ $guidename = $this->input->get_post('guidename');
//$url = 'https://www.tripadvisor.com/ShowUserReviews-g308272-d6222868-r599123490-Shanghai_Trippest_Mini_Group_Tours-Shanghai.html';
//$destination = 'tp_Beijing';
@@ -320,6 +323,9 @@ class Index extends CI_Controller {
//做一个数组用于存储数据
$detail_data = new stdClass();
$detail_data->destination = $destination;
+ $detail_data->group_name = $group_name;
+ $detail_data->links = $url;
+ $detail_data->guidename = $guidename;
//提取局部,不做整个页面的寻找元素,提升效率
$meta_inner = $html_object->find('.meta_inner');
diff --git a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php
index 6e50f862..ba12b652 100644
--- a/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php
+++ b/application/third_party/tripadvisor_spider/models/Tripadvisor_Review_model.php
@@ -180,13 +180,14 @@ class Tripadvisor_Review_model extends CI_Model {
tr_visited_date,
tr_review_pics,
tr_gri_no,
- tr_tgi_sn,
+ tr_links,
+ tr_guidename,
tr_datetime
)values(
- ?,?,?,?,?,?,?,?,?,?,?,?,GETDATE()
- )
+ ?,?,?,?,?,?,?,?,?,?,?,?,?,GETDATE()
+ )
";
- $query = $this->INFO->query($sql, array($detail_data->review_id,$detail_data->destination,$detail_data->review_id,$detail_data->title,$detail_data->content,$detail_data->review_name,$detail_data->user_loc,$detail_data->star_nums,$detail_data->rating_date,$detail_data->experience_date,json_encode($detail_data->pic),'',''));
+ $query = $this->INFO->query($sql, array($detail_data->review_id,$detail_data->destination,$detail_data->review_id,$detail_data->title,$detail_data->content,$detail_data->review_name,$detail_data->user_loc,$detail_data->star_nums,$detail_data->rating_date,$detail_data->experience_date,json_encode($detail_data->pic),$detail_data->group_name,$detail_data->links,$detail_data->guidename));
//$result = $query->result();
}
diff --git a/application/third_party/tripadvisor_spider/views/third_party_input.php b/application/third_party/tripadvisor_spider/views/third_party_input.php
index aa4caea8..0a67a39a 100644
--- a/application/third_party/tripadvisor_spider/views/third_party_input.php
+++ b/application/third_party/tripadvisor_spider/views/third_party_input.php
@@ -181,7 +181,7 @@ $(function(){
}
});
- //上传文件
+ //excel导出抓取
$('#contentbyexcel').click(function(){
var fileArray = document.getElementById("file_excel").files;
var formData = new FormData();
@@ -201,28 +201,49 @@ $(function(){
var html = '';
var j,ta_url;
var num = 0;
+
for (var i=0;i';
- html += '
'+jsondata[i].destination+'
';
- html += '
团名:'+jsondata[i].list_data[j][0]+'
';
- html += '
导游:'+jsondata[i].list_data[j][1]+'
';
- html += '
发帖账户:'+jsondata[i].list_data[j][3]+'
';
- html += '
星级:'+jsondata[i].list_data[j][4]+'
';
+ html += '
'+jsondata[i].list_data[j][0]+'
';
+ html += '
团名:'+jsondata[i].list_data[j][1]+'
';
+ html += '
导游:'+jsondata[i].list_data[j][2]+'
';
+ html += '
';
+ html += '
';
+ html += '
';
html += '
';
html += '';
html += '
';
+ html += '
';
html += '
';
- ta_url = jsondata[i].list_data[j][2];
+ html += '
';
+ html += '
';
+ ta_url = jsondata[i].list_data[j][3];
//console.log(ta_url);
if(ta_url.indexOf('ShowUserReviews') != -1){
$.ajax({
url:'/info.php/apps/tripadvisor_spider/index/get_reviews_detail',
- data:{url:ta_url,html_num:num},
+ data:{url:ta_url,html_num:num,destination:jsondata[i].list_data[j][0],group_name:jsondata[i].list_data[j][1],guidename:jsondata[i].list_data[j][2]},
success:function(json_detail,status){
var data = $.parseJSON(json_detail);
$('#excel_title_'+data.html_id).html(data.title);
$('#excel_content_'+data.html_id).html(data.content);
+ $('#reviews_user_'+data.html_id).html('评论用户:'+data.review_name);
+ $('#reviews_loc_'+data.html_id).html('评论用户地区:'+data.user_loc);
+ $('#excel_reviewed_'+data.html_id).html('Reviewed:'+data.rating_date);
+ $('#excel_vistiedtime_'+data.html_id).html('Date of experience:'+data.experience_date);
+ var stars_html = '';
+ for(var i=0;i
';
+ }
+ $('#reviews_stars_'+data.html_id).html('星级:'+stars_html);
+ if(data.pic.length > 0){
+ var pic_html = '';
+ for(var j=0;j
';
+ }
+ }
+ $('#excel_pic_'+data.html_id).html(pic_html);
console.log(html);
}
});
diff --git a/media/popselectpicture.php b/media/popselectpicture.php
index 21e40cc4..aa10b289 100644
--- a/media/popselectpicture.php
+++ b/media/popselectpicture.php
@@ -98,6 +98,7 @@ function is_remote_ip()
|| stripos($ip_list,'221.7.151.41')!==false
|| stripos($ip_list,'111.59.90.31')!==false
|| stripos($ip_list,'180.140.114.225')!==false
+ || stripos($ip_list,'116.8.4.34')!==false
|| stripos($ip_list,'180.140.114.208')!==false
|| stripos($ip_list,'116.8.4.34')!==false
|| stripos($ip_list,'::1')!==false //这个也是本地IP
diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php
index dce81d6d..ff3da510 100644
--- a/webht/third_party/dingmail/controllers/index.php
+++ b/webht/third_party/dingmail/controllers/index.php
@@ -264,6 +264,13 @@ class Index extends CI_Controller {
$mail->CharSet = "utf-8";
$mail->Encoding = "base64";
$mail->IsHTML(true);
+ $mail->SMTPOptions = array(
+ 'ssl' => array(
+ 'verify_peer' => false,
+ 'verify_peer_name' => false,
+ 'allow_self_signed' => true
+ )
+ );
//$mail->SMTPDebug = 2;
$mail->FromName = $fromuser; //收件人昵称
diff --git a/webht/third_party/pay/controllers/AlipayTradeService.php b/webht/third_party/pay/controllers/AlipayTradeService.php
index c5e9cd3c..7ee6a3d9 100644
--- a/webht/third_party/pay/controllers/AlipayTradeService.php
+++ b/webht/third_party/pay/controllers/AlipayTradeService.php
@@ -330,7 +330,7 @@ class AlipayTradeService extends CI_Controller
* 处理异步通知: 解析订单号, 邮件外联/客人; 插入付款记录
* @author LYT
*/
- public function send_alipay($pn_txn_id = false)
+ public function send_alipay($pn_txn_id = false, $old_ssje=null)
{
$data = array();
$int = 0;
@@ -365,7 +365,7 @@ class AlipayTradeService extends CI_Controller
//退款状态默认为已经处理,陆燕在退款前手动通知外联了,系统跳过处理
if ($item->ALI_payType == 'refund') {
- $this->send_refund($item);
+ $this->send_refund($item, $old_ssje);
// $this->Alipay_note_model->update_send($item->ALI_dealId, 'send');
continue;
}
@@ -411,6 +411,7 @@ class AlipayTradeService extends CI_Controller
if (intval($item->ALI_stateCode)!==1) {
$ssje = $this->Alipay_model->get_ssje($item->ALI_orderAmount, $currencyCode);
}
+ $ssje = $old_ssje===null ? $ssje : $old_ssje;
$USD_amount = $this->Alipay_model->get_USD($item->ALI_orderAmount, $currencyCode);
//更新还没有填的客邮和交易号de收款记录(商务订单)
if (isset($advisor_info->order_type) && $advisor_info->order_type == 0) {
@@ -528,7 +529,7 @@ class AlipayTradeService extends CI_Controller
* @date 2019-05-09
* * TODO 线下收款之后产生的退款没有通知
*/
- public function send_refund($item)
+ public function send_refund($item, $old_ssje=null)
{
// raw
$raw = json_decode($item->ALI_memo);
@@ -566,6 +567,7 @@ class AlipayTradeService extends CI_Controller
$currencyCode = str_replace("CNY", "RMB", trim(mb_strtoupper($item->ALI_currencyCode)));
$currencyCode = mb_strtoupper(trim($currencyCode));
$ssje = $this->Alipay_model->get_ssje($item->ALI_orderAmount, $currencyCode, '15015');
+ $ssje = $old_ssje===null ? $ssje : $old_ssje;
$USD_amount = $this->Alipay_model->get_USD($item->ALI_orderAmount, $currencyCode);
//更新还没有填的客邮和交易号de收款记录(商务订单)
if (isset($advisor_info->order_type) && $advisor_info->order_type == 0) {
@@ -1051,29 +1053,55 @@ class AlipayTradeService extends CI_Controller
//获取note详情,以便后续修改各项数据
public function note_modal($pn_txn_id = false, $pn_invoice = false ,$notice_time = false) {
+ // $this->permission->is_admin(true);
+ // $data = array();
+ // $data['IPL_orderId'] = $pn_invoice;
+ // if (!empty($pn_txn_id)) {
+ // $data['note'] = $this->Alipay_note_model->note($pn_txn_id);
+ // if (!empty($data['note'])) {
+ // if (!empty($pn_invoice)) {
+ // $orderid_info = analysis_orderid($pn_invoice);
+ // } else {
+ // $orderid_info = analysis_orderid($data['note']->IPL_orderId);
+ // }
+ // if (!empty($orderid_info)) {
+ // $orderid_info = json_decode($orderid_info);
+ // $data['order_info'] = $this->Alipay_model->get_order($orderid_info->orderid, true, $orderid_info->ordertype);
+ // }
+ // $data["paytext"] = $this->payment_status();
+ // echo json_encode($this->load->view('alipay_note_setting', $data, true));
+ // return true;
+ // }
+ // }
+ // echo json_encode('没找到数据!');
+ // return;
+
$this->permission->is_admin(true);
$data = array();
- $data['IPL_orderId'] = $pn_invoice;
- if (!empty($pn_txn_id)) {
- $data['note'] = $this->Alipay_note_model->note($pn_txn_id);
- if (!empty($data['note'])) {
- if (!empty($pn_invoice)) {
- $orderid_info = analysis_orderid($pn_invoice);
- } else {
- $orderid_info = analysis_orderid($data['note']->IPL_orderId);
- }
- if (!empty($orderid_info)) {
- $orderid_info = json_decode($orderid_info);
- $data['order_info'] = $this->Alipay_model->get_order($orderid_info->orderid, true, $orderid_info->ordertype);
- }
- $data["paytext"] = $this->payment_status();
- echo json_encode($this->load->view('alipay_note_setting', $data, true));
- return true;
+ $data['note'] = $this->Alipay_note_model->note($pn_txn_id);
+ $orderid_info = analysis_orderid($data['note']->ALI_orderId);
+ if (!empty($orderid_info)) {
+ $orderid_info = json_decode($orderid_info);
+ if ($orderid_info->ordertype === 'T') {
+ $data['gai_info'] = $this->Alipay_model->get_money_t($pn_txn_id);
+ } elseif ($orderid_info->ordertype === 'B') {
+ $data['gai_info'] = $this->Alipay_model->get_money_b($pn_txn_id);
}
}
- echo json_encode('没找到数据!');
- return;
+ $data['old_order'] = $data['note']->ALI_orderId;
+ $data['new_order'] = $pn_invoice;
+ $data['order_info'] = null;
+ if ($pn_invoice !== null) {
+ $neworder_id = analysis_orderid($pn_invoice);
+ $neworder_id = json_decode($neworder_id);
+ if ( ! empty($neworder_id)) {
+ $data['order_info'] = $this->Alipay_model->get_order($neworder_id->orderid, true, $neworder_id->ordertype);
+ }
+ }
+ $data["paytext"] = $this->payment_status();
+ echo json_encode($this->load->view('alipay_note_setting', $data, true));
}
+
public function note_order_modal($old_order,$pn_invoice = false ,$notice_time = false) {
$data = array();
$data['IPL_orderId'] = $pn_invoice;
@@ -1112,13 +1140,38 @@ class AlipayTradeService extends CI_Controller
}
//修改订单名
- // TODO 支持转移功能
public function note_modal_save() {
$data = array();
+ $old_ssje = null;
$pn_txn_id = $this->input->post('pn_txn_id');
$pn_invoice = $this->input->post('pn_invoice');
+ $data['note'] = $this->Alipay_note_model->note($pn_txn_id);
+ $orderid_info = analysis_orderid($data['note']->ALI_orderId);
+ // if (empty($orderid_info) && $data['note']->ALI_payType == 'refund'
+ // && true === $this->Alipay_model->if_APP_order($data['note']->ALI_orderId)
+ // ) {
+ // // APP 组的退款订单是没有后缀的
+ // $orderid_info = analysis_orderid($data['note']->ALI_orderId . '_B');
+ // }
+ if (!empty($orderid_info)) {
+ $orderid_info = json_decode($orderid_info);
+ if ($orderid_info->ordertype === 'T') {
+ $data['gai_info'] = $this->Alipay_model->get_money_t(substr($pn_txn_id,0,30));
+ if ( ! empty($data['gai_info'])) {
+ $old_ssje = $data['gai_info'][0]->GAI_SSJE;
+ $this->Alipay_model->delete_money_t(substr($pn_txn_id,0,30));
+ }
+ } elseif ($orderid_info->ordertype === 'B' || $orderid_info->ordertype === 'A') {
+ $data['gai_info'] = $this->Alipay_model->get_money_b(substr($pn_txn_id,0,30));
+ if ( ! empty($data['gai_info'])) {
+ $old_ssje = $data['gai_info'][0]->GAI_SSJE;
+ $this->Alipay_model->delete_money_b(substr($pn_txn_id,0,30));
+ }
+ }
+ }
+
if (!empty($pn_txn_id) && !empty($pn_invoice)) {
$orderid_info = analysis_orderid($pn_invoice);
if (!empty($orderid_info)) {
@@ -1126,7 +1179,7 @@ class AlipayTradeService extends CI_Controller
$advisor_info = $this->Alipay_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype);
if (!empty($advisor_info)) {
$this->Alipay_note_model->set_invoice($pn_txn_id, $pn_invoice);
- $this->send_alipay($pn_txn_id);
+ $this->send_alipay($pn_txn_id, $old_ssje);
echo json_encode('修改成功!');
return true;
}
diff --git a/webht/third_party/pay/models/Alipay_model.php b/webht/third_party/pay/models/Alipay_model.php
index a6d8322f..075cb669 100644
--- a/webht/third_party/pay/models/Alipay_model.php
+++ b/webht/third_party/pay/models/Alipay_model.php
@@ -155,7 +155,7 @@ class Alipay_model extends CI_Model {
IF NOT EXISTS(
SELECT TOP 1 1
FROM BIZ_GroupAccountInfo
- WHERE GAI_COLI_SN = ? AND GAI_SQJE=? and GAI_Type=15015
+ WHERE GAI_COLI_SN = ? AND GAI_SQJE=? and GAI_Type=15015 and DeleteFlag=0
)
INSERT INTO BIZ_GroupAccountInfo (
GAI_COLI_SN
@@ -188,7 +188,7 @@ class Alipay_model extends CI_Model {
IF NOT EXISTS(
SELECT TOP 1 1
FROM BIZ_GroupAccountInfo
- WHERE GAI_AccreditNo = ? OR GAI_Memo LIKE '%$GAI_AccreditNo%'
+ WHERE (GAI_AccreditNo = ? OR GAI_Memo LIKE '%$GAI_AccreditNo%') and DeleteFlag=0
)
INSERT INTO BIZ_GroupAccountInfo (
GAI_COLI_SN
@@ -222,7 +222,7 @@ class Alipay_model extends CI_Model {
IF NOT EXISTS(
SELECT TOP 1 1
FROM GroupAccountInfo
- WHERE GAI_AccreditNo = ? OR GAI_Memo LIKE '%$GAI_AccreditNo%'
+ WHERE (GAI_AccreditNo = ? OR GAI_Memo LIKE '%$GAI_AccreditNo%') and DeleteFlag=0
)
INSERT INTO GroupAccountInfo (
GAI_COLI_SN
@@ -413,4 +413,44 @@ class Alipay_model extends CI_Model {
return $this->HT->query($sql, $COLI_SN)->row();
}
}
+
+ //根据交易号获取收款记录(传统订单)
+ public function get_money_t($pn_invoice) {
+ $like = $this->HT->escape_like_str($pn_invoice);
+ $sql = "SELECT COLI_ID,GroupAccountInfo.*
+ from GroupAccountInfo
+ inner join ConfirmLineInfo coli on COLI_SN=GAI_COLI_SN
+ where GAI_Type='15015' and GroupAccountInfo.DeleteFlag=0 and (GAI_AccreditNo=? or GAI_Memo like '%$like%')
+ ";
+ $query = $this->HT->query($sql, array($pn_invoice));
+ $result = $query->result();
+ return $result;
+ }
+ //根据交易号获取收款记录(商务订单)
+ public function get_money_b($pn_invoice) {
+ $like = $this->HT->escape_like_str($pn_invoice);
+ $sql = "SELECT COLI_ID,BIZ_GroupAccountInfo.*
+ from BIZ_GroupAccountInfo
+ inner join BIZ_ConfirmLineInfo on COLI_SN=GAI_COLI_SN
+ where GAI_Type='15015' and BIZ_GroupAccountInfo.DeleteFlag=0 and (GAI_AccreditNo=? or GAI_Memo like '%$like%')
+ ";
+ $query = $this->HT->query($sql, array($pn_invoice));
+ $result = $query->result();
+ return $result;
+ }
+
+ /** 删除收款记录 */
+ public function delete_money_t($deadId)
+ {
+ $sql = "UPDATE GroupAccountInfo SET DeleteFlag=1 WHERE GAI_Type='15015' and GAI_AccreditNo=?";
+ $query = $this->HT->query($sql, array($deadId));
+ return $query;
+ }
+ public function delete_money_b($deadId)
+ {
+ $sql = "UPDATE BIZ_GroupAccountInfo SET DeleteFlag=1 WHERE GAI_Type='15015' and GAI_AccreditNo=?";
+ $query = $this->HT->query($sql, array($deadId));
+ return $query;
+ }
+
}
diff --git a/webht/third_party/pay/models/Alipay_note_model.php b/webht/third_party/pay/models/Alipay_note_model.php
index ef99b7e4..040a16a7 100644
--- a/webht/third_party/pay/models/Alipay_note_model.php
+++ b/webht/third_party/pay/models/Alipay_note_model.php
@@ -42,7 +42,8 @@ class Alipay_note_model extends CI_Model {
public function search_date($date) {
$this->init();
- $search_sql = " AND pn.ALI_noticeTime BETWEEN '$date 00:00:00' AND '$date 23:59:59' ";
+ $search_sql = " AND pn.ALI_noticeTime BETWEEN '$date 00:00:00' AND '$date 23:59:59'
+ OR isnull(ALI_sent,'') in ('sendfail','unsend','') ";
$this->search = $search_sql;
$this->orderby=" ORDER BY CASE pn.ALI_sent WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.ALI_sn DESC ";
return $this->get_list();
@@ -198,4 +199,5 @@ class Alipay_note_model extends CI_Model {
return $this->INFO->query($sql, array($payer,$dealId));
}
+
}
diff --git a/webht/third_party/pay/views/alipay_note_setting.php b/webht/third_party/pay/views/alipay_note_setting.php
index d5ab442f..a7cdfde2 100644
--- a/webht/third_party/pay/views/alipay_note_setting.php
+++ b/webht/third_party/pay/views/alipay_note_setting.php
@@ -1,5 +1,22 @@