重工电子论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz

住哲API

查看数: 4881 | 评论数: 3 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2017-9-11 22:07

正文摘要:

以下是C#源码,调用参数均在源码上面 [C#] syntaxhighlighter_viewsource syntaxhighlighter_copycodeusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System ...

回复

李维强-15级 发表于 2017-10-26 17:04:02
本帖最后由 李维强-15级 于 2017-11-24 19:16 编辑

[C#] syntaxhighlighter_viewsource syntaxhighlighter_copycode
<?xml version="1.0"?>
-<response>
<head/>
-<body>
<memberCardNo>2171</memberCardNo>
-<result>
<code>1</code>
<errorMsg>调用成功!</errorMsg>
</result>
</body>
</response>



住哲推送返回数据
[C#] syntaxhighlighter_viewsource syntaxhighlighter_copycode
<message>
<head serviceCode="ORDE002" messageCode="f91e9e2f-40b2-4d02-9cc0-6090dae7ced0" createTime="1511520121455"></head>
<body>
<chainId>09352</chainId>
<hotelId>210883</hotelId>
<orderId>1490669</orderId>
<bookPerson>李维强</bookPerson>
<bookTel>15923051435</bookTel>
<ensureFlag>1</ensureFlag>
<guarantorType>全程担保</guarantorType>
<orderDate>2017-11-18 01:18:42</orderDate>
<bookNum>null</bookNum>
<orderItem>
  <startDate>2017-11-18 12:00:00.0</startDate>
  <endStart>2017-11-19 12:00:00.0</endStart>
  <roomTypeId>1944</roomTypeId>
  <roomTypeName>测试</roomTypeName>
  <checkInPerson>李维强</checkInPerson>
  <checkInTel>15923051435</checkInTel>
  <price>1</price>
  <comefrom>网站会员</comefrom>
</orderItem></body></message>


[C#] syntaxhighlighter_viewsource syntaxhighlighter_copycode
<message><head serviceCode="ROOM001" messageCode="eb271853-be0d-4048-9766-17e88168c9a5" createTime="1511521617716"></head><body><checkIn>
  <hotelId>209412</hotelId>
  <roomTypeId>1155</roomTypeId>
  <roomTypeName>逸_园景大床房</roomTypeName>
  <roomNo>320</roomNo>
  <price>598</price>
  <startTime>2017-11-24 19:05:57</startTime>
  <orderId>1499786</orderId>
  <houseType>0</houseType>
  <customer>
    <customerItem>
      <customerId>1620441</customerId>
      <memberNo>H1074102</memberNo>
      <customerName>胡育贤</customerName>
      <sex>male</sex>
      <idCardType>newidentitycard</idCardType>
      <idCardNo></idCardNo>
      <birthDate></birthDate>
      <provice></provice>
      <address></address>
      <interest></interest>
      <telNo>13695007268</telNo>
      <email></email>
    </customerItem>
  </customer>
</checkIn></body></message>
李维强-15级 发表于 2017-10-25 03:24:55
预定调用方法
string method = "zhuzher.order.submitOrder";
[C#] syntaxhighlighter_viewsource syntaxhighlighter_copycode
        public static string SubmitOrder2()
        {
            XmlDocument XmlDoc = new XmlDocument();

            XmlElement rootElement = XmlDoc.CreateElement("request");
            XmlDoc.AppendChild(rootElement);

            XmlElement headElement = XmlDoc.CreateElement("head");
            headElement.InnerText = "";
            rootElement.AppendChild(headElement);

            XmlElement bodyElement = XmlDoc.CreateElement("body");

            XmlElement hotelIdElement = XmlDoc.CreateElement("hotelId");
            hotelIdElement.InnerText = "210883";
            bodyElement.AppendChild(hotelIdElement);

            XmlElement roomTypeId = XmlDoc.CreateElement("roomTypeId");
            roomTypeId.InnerText = "1944";      //测试房间ID
            bodyElement.AppendChild(roomTypeId);

            XmlElement roomTypeName = XmlDoc.CreateElement("roomTypeName");
            roomTypeName.InnerText = "测试";
            bodyElement.AppendChild(roomTypeName);

            XmlElement startDate = XmlDoc.CreateElement("startTime");
            startDate.InnerText = DateTime.Now.AddHours(10).ToString("yyyy-MM-dd HH:mm:ss");
            bodyElement.AppendChild(startDate);

            XmlElement endStart = XmlDoc.CreateElement("endTime");
            endStart.InnerText = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss");
            bodyElement.AppendChild(endStart);

            XmlElement roomNum = XmlDoc.CreateElement("roomNum");
            roomNum.InnerText = "1";
            bodyElement.AppendChild(roomNum);

            XmlElement ratePlanId = XmlDoc.CreateElement("ratePlanId");
            ratePlanId.InnerText = "";
            bodyElement.AppendChild(ratePlanId);

            XmlElement bookPerson = XmlDoc.CreateElement("bookPerson");
            bookPerson.InnerText = "李维强";
            bodyElement.AppendChild(bookPerson);

            XmlElement bookTel = XmlDoc.CreateElement("bookTel");
            bookTel.InnerText = "15923051435";
            bodyElement.AppendChild(bookTel);

            XmlElement bookemail = XmlDoc.CreateElement("bookEmail");
            bookemail.InnerText = "";
            bodyElement.AppendChild(bookemail);

            XmlElement checkInPerson = XmlDoc.CreateElement("checkInPerson");
            checkInPerson.InnerText = "李维强";
            bodyElement.AppendChild(checkInPerson);

            XmlElement checkInTel = XmlDoc.CreateElement("checkInTel");
            checkInTel.InnerText = "15923051435";
            bodyElement.AppendChild(checkInTel);

            XmlElement cardNo = XmlDoc.CreateElement("cardNo");
            cardNo.InnerText = "";
            bodyElement.AppendChild(cardNo);

            XmlElement comefrom = XmlDoc.CreateElement("comefrom");
            comefrom.InnerText = "5";
            bodyElement.AppendChild(comefrom);

            XmlElement keepTime = XmlDoc.CreateElement("keepTime");
            keepTime.InnerText = "23:59";
            bodyElement.AppendChild(keepTime);

            XmlElement totalPrice = XmlDoc.CreateElement("totalPrice");
            totalPrice.InnerText = "1";
            bodyElement.AppendChild(totalPrice);

            XmlElement ensureFlag = XmlDoc.CreateElement("ensureFlag");
            ensureFlag.InnerText = "0";     //表示已支付定金
            bodyElement.AppendChild(ensureFlag);

            XmlElement guarantorType = XmlDoc.CreateElement("guarantorType");
            guarantorType.InnerText = "无担保";
            bodyElement.AppendChild(guarantorType);

            XmlElement remark = XmlDoc.CreateElement("remark");
            remark.InnerText = "测试订房备注";
            bodyElement.AppendChild(remark);

            //XmlElement xxx = XmlDoc.CreateElement("xxx");
            //xxx.InnerText = "xxx";
            //orderItem.AppendChild(xxx);

            rootElement.AppendChild(bodyElement);

            return XmlDoc.OuterXml;

        }


        public static string SubmitOrder()
        {
            XmlDocument XmlDoc = new XmlDocument();

            XmlElement rootElement = XmlDoc.CreateElement("request");
            XmlDoc.AppendChild(rootElement);

            XmlElement headElement = XmlDoc.CreateElement("head");
            headElement.InnerText = "";
            rootElement.AppendChild(headElement);

            XmlElement bodyElement = XmlDoc.CreateElement("body");

            XmlElement hotelIdElement = XmlDoc.CreateElement("hotelId");
            hotelIdElement.InnerText = "210883";
            bodyElement.AppendChild(hotelIdElement);

            XmlElement bookPerson = XmlDoc.CreateElement("bookPerson");
            bookPerson.InnerText = "李维强";
            bodyElement.AppendChild(bookPerson);

            XmlElement bookTel = XmlDoc.CreateElement("bookTel");
            bookTel.InnerText = "15923051435";
            bodyElement.AppendChild(bookTel);

            XmlElement ensureFlag = XmlDoc.CreateElement("ensureFlag");
            ensureFlag.InnerText = "1";     //表示已支付定金
            bodyElement.AppendChild(ensureFlag);

            XmlElement guarantorType = XmlDoc.CreateElement("guarantorType");
            guarantorType.InnerText = "";
            bodyElement.AppendChild(guarantorType);

            XmlElement remark = XmlDoc.CreateElement("remark");
            remark.InnerText = "测试订房备注";
            bodyElement.AppendChild(remark);

            XmlElement bookemail = XmlDoc.CreateElement("bookemail");
            bookemail.InnerText = "";
            bodyElement.AppendChild(bookemail);

            XmlElement bookNum = XmlDoc.CreateElement("bookNum");
            bookNum.InnerText = "";
            bodyElement.AppendChild(bookNum);

            XmlElement keepTime = XmlDoc.CreateElement("keepTime");
            keepTime.InnerText = "18:00";
            bodyElement.AppendChild(keepTime);

            XmlElement totalPrice = XmlDoc.CreateElement("totalPrice");
            totalPrice.InnerText = "2";
            bodyElement.AppendChild(totalPrice);

            for (int i = 0; i < 2; i++)
            {

                XmlElement orderItem = XmlDoc.CreateElement("orderItem");
            orderItem.InnerText = "";
            bodyElement.AppendChild(orderItem);

           



                XmlElement startDate = XmlDoc.CreateElement("startDate");
                startDate.InnerText = DateTime.Now.ToString("yyyy-MM-dd 12:00:00");
                orderItem.AppendChild(startDate);

                XmlElement endStart = XmlDoc.CreateElement("endStart");
                endStart.InnerText = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd 12:00:00");
                orderItem.AppendChild(endStart);

                XmlElement roomTypeId = XmlDoc.CreateElement("roomTypeId");
                roomTypeId.InnerText = "1944";      //测试房间ID
                orderItem.AppendChild(roomTypeId);

                XmlElement roomTypeName = XmlDoc.CreateElement("roomTypeName");
                roomTypeName.InnerText = "测试";
                orderItem.AppendChild(roomTypeName);

                XmlElement checkInPerson = XmlDoc.CreateElement("checkInPerson");
                checkInPerson.InnerText = "李维强";
                orderItem.AppendChild(checkInPerson);

                XmlElement checkInTel = XmlDoc.CreateElement("checkInTel");
                checkInTel.InnerText = "15923051435";
                orderItem.AppendChild(checkInTel);

                XmlElement cardNo = XmlDoc.CreateElement("cardNo");
                cardNo.InnerText = "";
                orderItem.AppendChild(cardNo);

                XmlElement ratePlanId = XmlDoc.CreateElement("ratePlanId");
                ratePlanId.InnerText = "";
                orderItem.AppendChild(ratePlanId);

                //bodyElement.AppendChild(orderItem);


            }
            //XmlElement xxx = XmlDoc.CreateElement("xxx");
            //xxx.InnerText = "xxx";
            //orderItem.AppendChild(xxx);

            rootElement.AppendChild(bodyElement);

            return XmlDoc.OuterXml;

        }
李维强-15级 发表于 2017-10-22 22:56:36
[C#] syntaxhighlighter_viewsource syntaxhighlighter_copycode
[
{
    "domain": "15923051435.oicp.net",
    "expirationDate": 1540219837.502758,
    "hostOnly": true,
    "httpOnly": false,
    "name": "headimgurl",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "http://wx.qlogo.cn/mmopen/vi_32/7wQ88slwA95jNenMcAyC75WxIR3tKkV6Yej5YoVdywN0nSeHeicjZVq2G5j8v25nVDtUBRPoBOSVHibJ8p9cd8Bg/0",
    "id": 1
},
{
    "domain": "15923051435.oicp.net",
    "expirationDate": 1540219837.502759,
    "hostOnly": true,
    "httpOnly": false,
    "name": "nickname",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "squall",
    "id": 2
},
{
    "domain": "15923051435.oicp.net",
    "expirationDate": 1540219837.502757,
    "hostOnly": true,
    "httpOnly": false,
    "name": "openid",
    "path": "/",
    "sameSite": "no_restriction",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "ootlZwda9ehK2ypgSbrR7PTF6vug",
    "id": 3
}
]

Archiver|手机版|小黑屋|cqutlab ( 渝ICP备15004556号

GMT+8, 2024-5-19 04:42 , Processed in 0.177614 second(s), 32 queries .

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表