IOS同步請求API測試

第一次操作數(shù)據(jù):
用戶id:101
用戶名:wangerxiao

注冊接口

返回數(shù)據(jù):

{
  "meta": {
    "status": 1,
    "message": "success"
  },
  "data": {
    "userId": 101
  }
}

登錄接口

返回數(shù)據(jù):

{
  "meta": {
    "status": 1,
    "message": "success"
  },
  "data": {
    "userId": 101,
    "token": "101:1489461949384",
    "synFlage": 1,
    "message": "同步成功"
  }
}

請求同步元數(shù)據(jù)接口

請求json數(shù)據(jù):

{   
  "tablemeta":[ 
  {"synId":1,"synTable":"user",  "userId": 101,  "version":0,  "lastModTime":null },    
  {"synId":1, "synTable":"usercard", "userId": 101,"version":0, "lastModTime":null},        
  {"synId":1, "synTable":"userlearningstyle","userId": 101,"version":0,"lastModTime":null}, 
  { "synId":1,"synTable":"userresource", "userId": 101, "version":0, "lastModTime":null }, 
  { "synId":1,"synTable":"usertest",  "userId": 101, "version":0,  "lastModTime":null },
  { "synId":1,"synTable":"userword",  "userId": 101,"version":0,  "lastModTime":null   }    
  ]             
}

返回數(shù)據(jù):

{
  "meta": {
    "status": 1,
    "message": "success"
  },
  "data": {
    "synTableCount": 1,
    "upsyntable": [],
    "downsyntable": [
      {
        "synTable": "user"
      }
    ]
  }
}

同步接口

請求數(shù)據(jù):

{   
  "downSynTable":[ 
    { "synTable":"user"}
  ],  
   "tableData":{
    "user":[{},{}],
    "userCard":[{},{}]
   } 
}

返回數(shù)據(jù):

{
  "meta": {
    "status": 1,
    "message": "success"
  },
  "data": {
    "tableMeta": [
      {
        "synId": 80,
        "synTable": "user",
        "userId": 101,
        "lastModTime": 1489461945665,
        "version": 1
      },
      {
        "synId": 81,
        "synTable": "Usercard",
        "userId": 101,
        "lastModTime": null,
        "version": 0
      },
      {
        "synId": 82,
        "synTable": "Userlearningstyle",
        "userId": 101,
        "lastModTime": null,
        "version": 0
      },
      {
        "synId": 83,
        "synTable": "userresource",
        "userId": 101,
        "lastModTime": null,
        "version": 0
      },
      {
        "synId": 84,
        "synTable": "usertest",
        "userId": 101,
        "lastModTime": null,
        "version": 0
      },
      {
        "synId": 85,
        "synTable": "userword",
        "userId": 101,
        "lastModTime": null,
        "version": 0
      }
    ],
    "tableData": {
      "user": [
        {
          "userId": 101,
          "adaptive": null,
          "classNum": null,
          "grade": null,
          "learningstyle1": null,
          "learningstyle2": null,
          "learningstyle3": null,
          "learningtyle4": null,
          "level": null,
          "loginName": "wangerxiao",
          "loginTimes": null,
          "password": "123",
          "presentgrade": null,
          "realName": "葬愛家族",
          "resourcecount1": null,
          "resourcecount2": null,
          "resourcecount3": null,
          "resourcecount4": null,
          "school": null,
          "score": null,
          "sex": 1,
          "topiccount1": null,
          "topiccount2": null,
          "wordcount": null,
          "wordcount1": null,
          "workcount": null,
          "workcount1": null,
          "workcount2": null,
          "workcount3": null
        }
      ],
      "userCard": null,
      "userLearningStyle": null,
      "userResource": null,
      "userTest": null,
      "userWord": null
    }
  }
}



{   
  "tablemeta":[ 
  {"synId":1,"synTable":"user",  "userId": 101,  "version":0,  "lastModTime":null },    
  {"synId":1, "synTable":"usercard", "userId": 101,"version":0, "lastModTime":null},        
  {"synId":1, "synTable":"userlearningstyle","userId": 101,"version":0,"lastModTime":null}, 
  { "synId":1,"synTable":"userresource", "userId": 101, "version":0, "lastModTime":null }, 
  { "synId":1,"synTable":"usertest",  "userId": 101, "version":0,  "lastModTime":null },
  { "synId":1,"synTable":"userword",  "userId": 101,"version":0,  "lastModTime":null   }    
  ]             
}

同步測試

user、userLearningStyle劣坊、userCard屈留、userTestCount向上同步

{   
  "downSynTable":[ 
    { "synTable":"user"}
  ],  
   "tableData":{
   "user":[
        {"userId":101,"adaptive":3,"classNum":4,"grade":4,"learningstyle1":0,"learningstyle2":0,"learningstyle3":0,"learningstyle4":0,"leavel":1,"loginName":"wangerxiao","loginTimes":2,"password":"123","presentgrade":1,"realName":"張三","resourcecount1":1,"resourcecount2":1,"resourcecount3":1,"resourcecount4":1,"school":"宿遷實驗小學(xué)","score":69,"sex":1,"topiccount1":1,"topiccount2":1,"wordcount":2,"wordcount1":2,"workcount":2,"workcount1":2,"workcount2":2,"workcount3":2}
      ],    
     "userLearningStyle":[
       {"userlearningstyleId":1,"userId":101,"style1":1,"style2":2}
     ],
     "userCard":[
       {"usercardId":1,"cardclick1":1,"cardclick2":1,"cardclick3":2,"cardclick4":2,"userId":101}
     ],
     "userTestCount":[
       {"usertestcountId":1,"userId":101,"testcount":1,"testrightcount":3,"test1count":3,"test1rightcount":5,"test2count":1,"test2rightcount":3,"test3count":2,"test3rightcount":3,"test4count":2,"test4rightcount":3},
      ]
   } 
}

userResource向上同步

{   
  "downSynTable":[ 
    { "synTable":"userResource"}
  ],  
   "tableData":{
    "userResource":[
       {"userResourceId":1,"userId":101,"learncount":12,"learntimenow":2,"learntimes":2,"rType":2,"resourceId":2,"rloginTime":"2017-03-25 15:58:23","rlogoutTime":"2017-03-25 17:18:07","word":"apple"}
      ]
   } 
}

{   
  "downSynTable":[ 
    { "synTable":"userResource"}
  ],  
   "tableData":{
    "userResource":[
       {"userResourceId":1,"userId":101,"learncount":12,"learntimenow":2,"learntimes":2,"rType":2,"resourceId":2,"rloginTime":"2017-03-25 15:58:23","rlogoutTime":"2017-03-25 17:18:07","word":"apple"},
       {"userResourceId":2,"userId":101,"learncount":4,"learntimenow":6,"learntimes":2,"rType":3,"resourceId":3,"rloginTime":"2017-03-25 15:26:27","rlogoutTime":"2017-03-25 16:56:12","word":"banana"},
       {"userResourceId":2,"userId":101,"learncount":8,"learntimenow":3,"learntimes":2,"rType":4,"resourceId":4,"rloginTime":"2017-03-25 15:35:23","rlogoutTime":"2017-03-25 16:39:28","word":"orange"},
       {"userResourceId":2,"userId":101,"learncount":6,"learntimenow":4,"learntimes":2,"rType":5,"resourceId":5,"rloginTime":"2017-03-25 15:25:23","rlogoutTime":"2017-03-25 16:12:08","word":"tomato"}
     ]
   } 
}

userTest向上同步

{   
  "downSynTable":[ 
    { "synTable":"userTest"}
  ],  
   "tableData":{
    "userTest":[
       {"usertestId":1,"userId":101,"answertimes":3,"righttimes":2,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"apple"}
      ]
   } 
}

{   
  "downSynTable":[ 
    { "synTable":"userTest"}
  ],  
   "tableData":{
    "userTest":[
       {"usertestId":1,"userId":101,"answertimes":3,"righttimes":2,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"apple"},
       {"usertestId":1,"userId":101,"answertimes":4,"righttimes":6,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"banana"},
       {"usertestId":1,"userId":101,"answertimes":5,"righttimes":7,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"orange"},
       {"usertestId":1,"userId":101,"answertimes":6,"righttimes":3,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"tomato"}
     ]
   } 
}

userWord向上同步

{   
  "downSynTable":[ 
    { "synTable":"userWord"}
  ],  
   "tableData":{
    "userWord":[
       {"userWordId":1,"userId":101,"topi":3,"wordlearn":5,"wordtest":1,"wrongtesttimes":3,"word":"apple"},
      ]
   } 
}

{   
  "downSynTable":[ 
    { "synTable":"userWord"}
  ],  
   "tableData":{
    "userWord":[
       {"userWordId":1,"userId":101,"topi":3,"wordlearn":5,"wordtest":1,"wrongtesttimes":3,"word":"apple"},
       {"userWordId":1,"userId":101,"topi":2,"wordlearn":12,"wordtest":1,"wrongtesttimes":2,"word":"banana"},
       {"userWordId":1,"userId":101,"topi":6,"wordlearn":36,"wordtest":1,"wrongtesttimes":6,"word":"orange"},
       {"userWordId":1,"userId":101,"topi":13,"wordlearn":7,"wordtest":1,"wrongtesttimes":3,"word":"tomato"}
      ]
   } 
}


全部表向下同步

  • user灌危、userLearningStyle康二、userCard勇蝙、userTestCount赠摇、userResource浅蚪、userTest、userWord
{   
  "downSynTable":[ 
    { "synTable":"user"},
    {"synTable":"userLearningStyle"},
    {"synTable":"userTestCount"},
    {"synTable":"userCard"},
    {"synTable":"userResource"},
    {"synTable":"userTest"},
    {"synTable":"userWord"}
  ],  
   "tableData":null
}


全部表向上同步

{   
  "downSynTable":null,  
   "tableData":{
    "user":[
        {"userId":101,"adaptive":3,"classNum":4,"grade":4,"learningstyle1":0,"learningstyle2":0,"learningstyle3":0,"learningstyle4":0,"leavel":1,"loginName":"wangerxiao","loginTimes":2,"password":"123","presentgrade":1,"realName":"張三","resourcecount1":1,"resourcecount2":1,"resourcecount3":1,"resourcecount4":1,"school":"宿遷實驗小學(xué)","score":69,"sex":1,"topiccount1":1,"topiccount2":1,"wordcount":2,"wordcount1":2,"workcount":2,"workcount1":2,"workcount2":2,"workcount3":2}
      ],    
     "userLearningStyle":[
       {"userlearningstyleId":1,"userId":101,"style1":1,"style2":2}
     ],
     "userCard":[
       {"usercardId":1,"cardclick1":1,"cardclick2":1,"cardclick3":2,"cardclick4":2,"userId":101}
     ],
     "userTestCount":[
       {"usertestcountId":1,"userId":101,"testcount":1,"testrightcount":3,"test1count":3,"test1rightcount":5,"test2count":1,"test2rightcount":3,"test3count":2,"test3rightcount":3,"test4count":2,"test4rightcount":3},
      ],
     "userResource":[
       {"userResourceId":1,"userId":101,"learncount":12,"learntimenow":2,"learntimes":2,"rType":2,"resourceId":2,"rloginTime":"2017-03-25 15:58:23","rlogoutTime":"2017-03-25 17:18:07","word":"apple"},
       {"userResourceId":2,"userId":101,"learncount":4,"learntimenow":6,"learntimes":2,"rType":3,"resourceId":3,"rloginTime":"2017-03-25 15:26:27","rlogoutTime":"2017-03-25 16:56:12","word":"banana"},
       {"userResourceId":2,"userId":101,"learncount":8,"learntimenow":3,"learntimes":2,"rType":4,"resourceId":4,"rloginTime":"2017-03-25 15:35:23","rlogoutTime":"2017-03-25 16:39:28","word":"orange"},
       {"userResourceId":2,"userId":101,"learncount":6,"learntimenow":4,"learntimes":2,"rType":5,"resourceId":5,"rloginTime":"2017-03-25 15:25:23","rlogoutTime":"2017-03-25 16:12:08","word":"tomato"}
     ],
     "userTest":[
       {"usertestId":1,"userId":101,"answertimes":3,"righttimes":2,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"apple"},
       {"usertestId":1,"userId":101,"answertimes":4,"righttimes":6,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"banana"},
       {"usertestId":1,"userId":101,"answertimes":5,"righttimes":7,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"orange"},
       {"usertestId":1,"userId":101,"answertimes":6,"righttimes":3,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"tomato"}
     ],
     "userWord":[
       {"userWordId":1,"userId":101,"topi":3,"wordlearn":5,"wordtest":1,"wrongtesttimes":3,"word":"apple"},
       {"userWordId":1,"userId":101,"topi":2,"wordlearn":12,"wordtest":1,"wrongtesttimes":2,"word":"banana"},
       {"userWordId":1,"userId":101,"topi":6,"wordlearn":36,"wordtest":1,"wrongtesttimes":6,"word":"orange"},
       {"userWordId":1,"userId":101,"topi":13,"wordlearn":7,"wordtest":1,"wrongtesttimes":3,"word":"tomato"}
      ]
   } 
}

向上同步和向下同步

{   
  "downSynTable":[
     {"synTable":"userTestCount"},
     {"synTable":"userResource"},
    ], 
   "tableData":{
     "userLearningStyle":[
       {"userlearningstyleId":1,"userId":101,"style1":1,"style2":2}
     ],
     "userCard":[
       {"usercardId":1,"cardclick1":1,"cardclick2":1,"cardclick3":2,"cardclick4":2,"userId":101}
     ],
     "userTest":[
       {"usertestId":1,"userId":101,"answertimes":3,"righttimes":2,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"apple"},
       {"usertestId":1,"userId":101,"answertimes":4,"righttimes":6,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"banana"},
       {"usertestId":1,"userId":101,"answertimes":5,"righttimes":7,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"orange"},
       {"usertestId":1,"userId":101,"answertimes":6,"righttimes":3,"testinTime":"2017-03-25 15:58:23","testoutTime":"2017-03-25 17:18:07","testtype":1,"wrongtimes":1,"word":"tomato"}
     ]
   } 
}

數(shù)據(jù)回收

{   
   "trackData":{
     "userBehaviour":[
       {"userBehaviourId":1,"userId":101,"dowhat":"打豆豆","dowhen":"2017-03-25 02:36:23","dowhere":5},
       {"userBehaviourId":2,"userId":101,"dowhat":"練習(xí)","dowhen":"2017-03-25 11:58:23","dowhere":3},
       {"userBehaviourId":3,"userId":101,"dowhat":"看視頻","dowhen":"2017-03-25 08:52:23","dowhere":2},
       {"userBehaviourId":4,"userId":101,"dowhat":"看圖片","dowhen":"2017-03-25 12:01:23","dowhere":4}
      ],
     "userLogin":[
       {"userLoginId":1,"userId":101,"loginState":3,"loginTime":"2017-03-25 02:36:23","logoutTime":"2017-03-26 03:32:23"},
       {"userLoginId":1,"userId":101,"loginState":3,"loginTime":"2017-03-25 02:36:23","logoutTime":"2017-03-26 03:32:23"},
       {"userLoginId":1,"userId":101,"loginState":3,"loginTime":"2017-03-25 02:36:23","logoutTime":"2017-03-26 03:32:23"},
       {"userLoginId":1,"userId":101,"loginState":3,"loginTime":"2017-03-25 02:36:23","logoutTime":"2017-03-26 03:32:23"},
       {"userLoginId":1,"userId":101,"loginState":3,"loginTime":"2017-03-25 02:36:23","logoutTime":"2017-03-26 03:32:23"}
      ]
   } 
}
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市盗誊,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌哈踱,老刑警劉巖,帶你破解...
    沈念sama閱讀 217,826評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件开镣,死亡現(xiàn)場離奇詭異,居然都是意外死亡邪财,警方通過查閱死者的電腦和手機陕壹,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,968評論 3 395
  • 文/潘曉璐 我一進店門树埠,熙熙樓的掌柜王于貴愁眉苦臉地迎上來坛悉,“玉大人,你說我怎么就攤上這事尉咕”显龋” “怎么了耽装?”我有些...
    開封第一講書人閱讀 164,234評論 0 354
  • 文/不壞的土叔 我叫張陵期揪,是天一觀的道長规个。 經(jīng)常有香客問我凤薛,道長诞仓,這世上最難降的妖魔是什么缤苫? 我笑而不...
    開封第一講書人閱讀 58,562評論 1 293
  • 正文 為了忘掉前任墅拭,我火速辦了婚禮,結(jié)果婚禮上谍婉,老公的妹妹穿的比我還像新娘。我一直安慰自己穗熬,他們只是感情好镀迂,可當(dāng)我...
    茶點故事閱讀 67,611評論 6 392
  • 文/花漫 我一把揭開白布唤蔗。 她就那樣靜靜地躺著,像睡著了一般妓柜。 火紅的嫁衣襯著肌膚如雪箱季。 梳的紋絲不亂的頭發(fā)上棍掐,一...
    開封第一講書人閱讀 51,482評論 1 302
  • 那天,我揣著相機與錄音作煌,去河邊找鬼。 笑死最疆,一個胖子當(dāng)著我的面吹牛杯巨,可吹牛的內(nèi)容都是我干的努酸。 我是一名探鬼主播服爷,決...
    沈念sama閱讀 40,271評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼心褐!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起笼踩,我...
    開封第一講書人閱讀 39,166評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎嚎于,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體于购,經(jīng)...
    沈念sama閱讀 45,608評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,814評論 3 336
  • 正文 我和宋清朗相戀三年肋僧,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片嫌吠。...
    茶點故事閱讀 39,926評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖辫诅,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情泥栖,我是刑警寧澤,帶...
    沈念sama閱讀 35,644評論 5 346
  • 正文 年R本政府宣布吧享,位于F島的核電站,受9級特大地震影響钢颂,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜殊鞭,卻給世界環(huán)境...
    茶點故事閱讀 41,249評論 3 329
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望操灿。 院中可真熱鬧锯仪,春花似錦趾盐、人聲如沸庶喜。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,866評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至斥扛,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間稀颁,已是汗流浹背芬失。 一陣腳步聲響...
    開封第一講書人閱讀 32,991評論 1 269
  • 我被黑心中介騙來泰國打工峻村, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留锡凝,地道東北人粘昨。 一個月前我還...
    沈念sama閱讀 48,063評論 3 370
  • 正文 我出身青樓窜锯,卻偏偏與公主長得像张肾,于是被迫代替她去往敵國和親锚扎。 傳聞我的和親對象是個殘疾皇子吞瞪,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,871評論 2 354

推薦閱讀更多精彩內(nèi)容

  • 1. Java基礎(chǔ)部分 基礎(chǔ)部分的順序:基本語法驾孔,類相關(guān)的語法,內(nèi)部類的語法翠勉,繼承相關(guān)的語法妖啥,異常的語法对碌,線程的語...
    子非魚_t_閱讀 31,631評論 18 399
  • 國家電網(wǎng)公司企業(yè)標(biāo)準(zhǔn)(Q/GDW)- 面向?qū)ο蟮挠秒娦畔?shù)據(jù)交換協(xié)議 - 報批稿:20170802 前言: 排版 ...
    庭說閱讀 10,968評論 6 13
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn)朽们,斷路器,智...
    卡卡羅2017閱讀 134,656評論 18 139
  • 昨天下午叁丧,參加公司的犁跪,經(jīng)理訓(xùn)練營的考試。 在這家公司坷衍,從最初的CR入職面試寝优,銷售主管的面試枫耳,市場部調(diào)崗的面試乏矾,營業(yè)...
    走在雨的縫中閱讀 492評論 1 1
  • 授課教師:XTQ 教學(xué)內(nèi)容:教科書第76頁例3迁杨、做一做,練習(xí)十四第1~4題铅协。 教學(xué)目標(biāo): 知識與技能:讓學(xué)生經(jīng)歷除...
    贛西小城閱讀 1,739評論 0 0