From 4804997dfca1d9631ff7e5bb07b13e3833141dff Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 4 Jul 2019 15:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=90=BA=E7=A8=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=AE=A2=E5=8D=95=E5=8F=B7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/trainsystem/controllers/addorders.php | 5 +++-- application/third_party/trainsystem/helpers/train_helper.php | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/application/third_party/trainsystem/controllers/addorders.php b/application/third_party/trainsystem/controllers/addorders.php index a33b2f93..a0423eb7 100644 --- a/application/third_party/trainsystem/controllers/addorders.php +++ b/application/third_party/trainsystem/controllers/addorders.php @@ -17,7 +17,7 @@ class addorders extends CI_Controller{ } public function index(){ - echo 'api manager'; + exit('hello world'); } //自动出票 @@ -541,7 +541,8 @@ class addorders extends CI_Controller{ function ctripModel($data,$selectseat,$cold_sn){ $zwcode = $this->db_train_zw[$data['train']->Aircraft]; //座位简码 $zwname = $this->train_zw[$this->db_train_zw[$data['train']->Aircraft]]; //座位名称 - $OrderNumber = ORDERUSER.time(); + $microtime = get_microtime(); + $OrderNumber = ORDERUSER.$microtime; //拼接发送的报文 $PostData = array(); $time = date('Y-m-d H:i:s',time()); diff --git a/application/third_party/trainsystem/helpers/train_helper.php b/application/third_party/trainsystem/helpers/train_helper.php index 99e2914a..bbd5fcd6 100644 --- a/application/third_party/trainsystem/helpers/train_helper.php +++ b/application/third_party/trainsystem/helpers/train_helper.php @@ -74,4 +74,9 @@ function GetPost_http($url, $data = '',$format='') { return $tmpInfo; // } +function get_microtime (){ + list($s1, $s2) = explode(' ', microtime()); + return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000); +} + ?> \ No newline at end of file