<?php

/**
 * Created by PhpStorm.
 * User: Steven
 * Date: 2017/3/14
 * Time: 18:46
 * Ctrip 自助Mapping
 */
require_once dirname(__DIR__) . '/Common/Utils.php';

class Api_Mapping extends PhalApi_Api
{
    public $obj_utils = '';
    public $SupplierID = 77;    //供应商编码
    public $Brand = 1;   //品牌编码

    public function __construct()
    {
        $this->obj_utils = new roomOrderUtils();
    }

    /**
     * User:Steven
     *
     * Desc:、GetHotelInfo（获得Ctrip的酒店信息）
     * 1-1. 接口调用方：合作方
     * 1-2. 接口返回方：携程
     * 1-3. 调用频率：不限制
     * 1-4. 使用说明：合作方获取ctrip的酒店对接信息，用于自助Mapping。 SupplierID或Brand会线下提供
     */
    public function GetHotelInfo()
    {
        /*$GetHotelInfoRequest['GetHotelInfoRequest'] = array(
            'SupplierID' => $this->SupplierID,       //供应商编码
            'Brand' => $this->Brand,
            'CurrentPage' => ''
        );
        $res = $this->obj_utils->xml_encode($GetHotelInfoRequest, 'GetHotelInfo');
        $GetHotelInfo = $this->obj_utils->soapRequest('GetHotelInfo', $res);  //发送soap请求
        $result = $this->obj_utils->xml_to_array($GetHotelInfo);*/
        //测试
        $HotelList[0] = array(
            'Hotel' => 12121,
            'HotelName' => 'casdas',
            'CountryName' => 'sadas',
            'CityName' => 'dsadas',
            'Address' => 'asdasd',
            'Telephone' => 'sadas'
        );
        $HotelList[1] = array(
            'Hotel' => 'weqeqwewq',
            'HotelName' => 'casdas',
            'CountryName' => 'sadas',
            'CityName' => 'dsadas',
            'Address' => 'asdasd',
            'Telephone' => 'sadas'
        );
        $GetHotelInfoResponse = array(
            'TotalPage' => 10,
            'CurrentPage' => 1,
            'TotalNum' => 1000,
            'HotelList' => $HotelList,
        );
        $Response = array(
            'HeaderInfo' => '',
            'GetHotelInfoResponse' => $GetHotelInfoResponse
        );

        $RequestResponse['RequestResult'] = array(
            'Message' => '',
            'ResultCode' => '',
            'Response' => $Response
        );
        $result['RequestResponse'] = $RequestResponse;
        return $result;
    }

    /**
     * User:Steven
     *
     * Desc:
     */
    public function getZzHotelInfo()
    {
        $domain = new Domain_hotel();
        $res=$domain->getHotelInfo();
        return $res;
    }
}

?>

