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