|
- <?php
- /*
- Author:LB
- Compeny:Spiders Travel
- */
- require_once '../Common/Mysql.php';
- if (ALLOW_ORIGIN)
- header("Access-Control-Allow-Origin:*");
- $run_id=isset($_GET['run_id'])?$_GET['run_id']:'';
- if($run_id==""){
- $data['code']="-1";
- $data['info']="缺少班次id";
- echo json_encode($data);
- exit();
- }
- $pdo=conn();
- $sql="select
- A.PARENT_ORDER_ID as parent_order_id,
- A.RUN_ID as run_id,
- A.PROD_NAME as order_name,
- A.CUSTOMER_NAME as customer_name,
- A.CUSTOMER_MOBILE as customer_mobile,
- A.RUN_DATE as run_date,
- A.RUN_TIME as run_time,
- A.PROD_START_STATION_RES_NAME as start_station,
- A.PROD_END_STATION_RES_NAME as end_station
- from order_main as A
- where A.RUN_ID=".$run_id."
- group by A.PARENT_ORDER_ID
- ;";
- if(is_object($pdo)){
- $result=$pdo->query($sql);
- $data=array();
- $rowset=$result->fetchAll(PDO::FETCH_ASSOC);
- }
-
- $ary_east = array( 164006 );
- //$base_message = "您预订的2016年7月5日上海-乌镇的车次车牌号沪D60147即将在明日07:40出发,请提前达到上车点黄浦旅游集散站,凭乘车订单号{订单号}上车,司机电话王13621669654,祝您旅途愉快!";
- foreach( $rowset as $row_info ) {
- if( $run_id == 163876) {
- $base_message = "您预订的2016年7月9日上海-乌镇的车次车牌号沪BR2131即将在明日07:40出发,请提前达到上车点黄浦旅游集散站,凭乘车订单号" . $row_info["parent_order_id"] . "上车,司机电话李13816024416,祝您旅途愉快!";
- //$response = sendTelMessage($row_info["customer_mobile"], $row_info["customer_name"], $base_message, $row_info["parent_order_id"]);
- } else {
- if( in_array($row_info["parent_order_id"], $ary_east) ) {
- $start_time = "15:45";
- $start_area = "东栅停车场";
- } else {
- $start_time = "15:30";
- $start_area = "西栅1号停车场";
- }
- $base_message = "您预订的2016年7月9日乌镇-上海的车次车牌号沪BR2131即将在明日".$start_time."出发,请提前达到上车点".$start_area.",凭乘车订单号" . $row_info["parent_order_id"] . "上车,司机电话李13816024416,祝您旅途愉快!";
- $response = sendTelMessage($row_info["customer_mobile"], $row_info["customer_name"], $base_message, $row_info["parent_order_id"]);
- }
- echo $base_message."<br />";
- }
- echo "send end";
- exit;
-
-
-
-
|