目錄
說(shuō)明: 2
1、 用戶登錄商城 2
2、 獲取用戶積分 4
3、 修改用戶積分 5
4、 申請(qǐng)積分兌換 6
5、 修改用戶信息 7
6、 獲取充值比例 9
7、 獲取兌換記錄列表 10
8、 獲取充值記錄列表 13
說(shuō)明:
接口請(qǐng)求協(xié)議https;
請(qǐng)求域名如www.sdlwjx666.com;
端口測(cè)試使用8080,正式版使用80
請(qǐng)求參數(shù)唯一,用param,param為請(qǐng)求對(duì)象轉(zhuǎn)成json字符串;
請(qǐng)求返回用同一個(gè)的對(duì)象Result,參數(shù)說(shuō)明如下;
參數(shù)名
參數(shù)類型
參數(shù)示例
參數(shù)說(shuō)明
actioncode
字符串
SUCCESS
用于判斷請(qǐng)求是否成功(SUCCESS為成功)
data
字符串
{
"ssid":”swdurj5ifjti65jucf11”,
"tokenuuid":
"b5c5891a8a8042ae801d42ff2f6efe6d"
}
請(qǐng)求成功后獲取的數(shù)據(jù)對(duì)象以json字符串的形式賦值給data
endtime
字符串
最后響應(yīng)時(shí)間
message
字符串
請(qǐng)求的說(shuō)明
用戶登錄商城
接口地址
https://ip:8080/outsideaction/wxMallAction/doLogin
接口說(shuō)明
用戶登錄商城驗(yàn)證 返回用戶數(shù)據(jù)
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"loginname":"admin",
"password":"123",
"openid":"123",
"appid":"123"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={"loginname":"admin","password":"123","openid":"123","appid":"123"}
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{"ssid":”swdurj5ifjti65jucf11”,
"nickname":"admin",
"integraltotal":100,
"integralexchangeed":100,
"integralexchange":100},
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
ssid;//用戶ssid
integraltotal;//總積分
integralexchangeed; //已兌換積分
integralexchange; //可兌換積分
nickname;//昵稱
獲取用戶積分
接口地址
https://ip:8080/outsideaction/wxMallAction/getUserIntegral
接口說(shuō)明
獲取用戶積分
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"tokenuuid":"b1345891a8a80fse801d42ff2f6136d"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d"}
Userssid用戶的唯一標(biāo)識(shí)
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"integraltotal":100,
"integralexchangeed":100,
"integralexchange":100
},
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
integraltotal;//總積分
integralexchangeed; //已兌換積分
integralexchange; //可兌換積分
修改用戶積分
接口地址
https://ip:8080/outsideaction/wxMallAction/updateUserIntegral
接口說(shuō)明
修改用戶積分
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"tokenuuid":"b1345891a8a80fse801d42ff2f6136d",
"integeraltype":1,
"score":1000
}
https://IP:8080/outsideaction/wxMallAction/getUserIntegral?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"integeraltype":1,
"score":1000}
參數(shù)說(shuō)明
integeraltype;//積分兌換RMB==1,充值積分==2, 中獎(jiǎng)添加積分==3
score;//充值/兌換/中獎(jiǎng)的積分
userssid;//用戶的唯一標(biāo)識(shí)
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"integraltotal":100,
"integralexchangeed":100,
"integralexchange":100
},
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
integraltotal;//總積分
integralexchangeed; //已兌換積分
integralexchange; //可兌換積分
申請(qǐng)積分兌換
接口地址
https://ip:8080/outsideaction/wxMallAction/integralExchange
接口說(shuō)明
申請(qǐng)積分兌換
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2
}
https://IP:8080/outsideaction/wxMallAction/integralExchange?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2}
exchangeid;//兌換、中獎(jiǎng)物品時(shí)的物品id,字符串格式
exchangescore;// 兌換積分
exchangetype;// 1/兌換現(xiàn)金 2/實(shí)物 3/抽獎(jiǎng)
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":null,
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
data里面可以不要數(shù)據(jù),根據(jù)actioncode判斷是否修改成功
修改用戶信息
接口地址
https://ip:8080/outsideaction/wxMallAction/updateUserinfo
接口說(shuō)明
修改用戶信息(主要是改手機(jī)、微信、收貨地址)
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"phonenum":"12512451368",
"wechatid":"wx125124513",
"email":"12512@qq.com",
"address":"深圳市寶安區(qū)196號(hào) XX收"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"phonenum":"12512451368",
"wechatid":"wx125124513",
"email":"12512@qq.com",
"address":"深圳市寶安區(qū)196號(hào) XX收"
}
phonenum;//手機(jī)號(hào)
wechatid;//微信號(hào)
email;//郵箱
address;//收貨地址
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":null,
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
data里面可以不要數(shù)據(jù),根據(jù)actioncode判斷是否修改成功
獲取充值比例
接口地址
https://ip:8080/outsideaction/wxMallAction/getRechargePercent
接口說(shuō)明
獲取充值比例
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d"
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d"}
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{"currencytype":”rmb”,
"score":10000
},
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
currencytype="rmb";//rmb標(biāo)識(shí)人民幣
score=100;//1單位的貨幣兌換可以的積分
獲取兌換記錄列表
接口地址
https://ip:8080/outsideaction/wxMallAction/getExchangeList
接口說(shuō)明
獲取兌換記錄列表
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":1
}
https://IP:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":"1"}
pageSize;//每頁(yè)條數(shù)
currPage;//當(dāng)前頁(yè)碼 要查詢的頁(yè)碼
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"exchangeAllScore":2000,
"exchangeMoneyScore":1000,
"exchangeMoneyTotal":1,
"exchangeGoodsScore":1000,
"maxPage":5,
"currPage":1,
"maxSize":48,
"exchangeList":[
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”
}
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”
}
{...}
]
},
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"暫無(wú)兌換記錄","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
exchangeAllScore;//兌換總積分
exchangeMoneyScore;//兌換現(xiàn)金的積分
exchangeGoodsScore;//兌換實(shí)物的積分
exchangeMoneyTotal;//兌換現(xiàn)金的金額
maxPage;//總頁(yè)數(shù)
currPage;//當(dāng)前頁(yè)碼
maxSize;//總條數(shù)
exchangeList:{//兌換列表
applyscore;//兌換的積分
usemoney;//兌換的金額
applystate;//兌換的狀態(tài) 1兌換中,2兌換成功,-1兌換失敗
exchangetype;//兌換的類型 ,兌換金額==1,兌換物品==2
applynum;//兌換的個(gè)數(shù)
appphysicalid;//兌換商品的id標(biāo)識(shí)
wantExchargetime;//兌換的申請(qǐng)時(shí)間
}
獲取充值記錄列表
接口地址
https://ip:8080/outsideaction/wxMallAction/getRechargeList
接口說(shuō)明
獲取兌換記錄列表
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":1
}
https://IP:8080/outsideaction/wxMallAction/getRechargeList?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":"1"}
pageSize;//每頁(yè)條數(shù)
currPage;//當(dāng)前頁(yè)碼 要查詢的頁(yè)碼
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"rechargeAllScore":2000,
"rechargeMoneyTotal":1000,
"maxPage":5,
"currPage":1,
"maxSize":48,
"rechargeList":[
{
"usemoney":1,
"rechargescore":1000,
"addtime":”2015-12-12 12:12:12”
},
{
"usemoney":2,
"rechargescore":2000,
"addtime":”2015-12-12 12:12:12”
},{...}
]
},
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"暫無(wú)充值記錄","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
rechargeAllScore;//充值總積分
rechargeMoneyTotal;//充值總金額
maxPage;//總頁(yè)數(shù)
currPage;//當(dāng)前頁(yè)碼
maxSize;//總條數(shù)
rechargeList:{//充值記錄列表
rechargescore;//充值的積分
usemoney;//充值的金額
addtime;//充值時(shí)間
}
1、接口1==》說(shuō)明:新增字段【luckscore】
抽獎(jiǎng)操作時(shí)若中了積分傳遞積分值luckscore;中了實(shí)物則傳遞實(shí)物exchangeid
接口地址
https://ip:8080/outsideaction/wxMallAction/integralExchange
接口說(shuō)明
申請(qǐng)積分兌換
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2,
“luckscore”:1000
}
https://192.168.3.93:8080/outsideaction/wxMallAction/integralExchange?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"exchangeid":"123456",
“exchangescore”:12000,
“exchangetype”:2,
“luckscore”:1000
}
exchangeid;//兌換物品時(shí)的物品id,字符串格式
exchangescore;// 兌換積分
exchangetype;// 1/兌換現(xiàn)金 2/實(shí)物,3/抽獎(jiǎng)
Luckscore;//中獎(jiǎng)積分
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":null,
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
data里面可以不要數(shù)據(jù),根據(jù)actioncode判斷是否修改成功
接口2==》說(shuō)明:抽獎(jiǎng)查詢中獎(jiǎng)積分字段【luckscore】
接口地址
https://ip:8080/outsideaction/wxMallAction/getExchangeList
接口說(shuō)明
獲取兌換記錄列表
輸入?yún)?shù)
參數(shù)
類型
默認(rèn)值
說(shuō)明
param
String
請(qǐng)求唯一參數(shù),它是有多個(gè)參數(shù)的對(duì)象封裝成json字符串的形式存在
param= {
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":1
}
https://192.168.3.93:8080/outsideaction/wxMallAction/doLogin?param={
"userssid":"b5c5891a8a8042ae801d42ff2f6efe6d",
"pageSize":10,
"currPage":"1"}
pageSize;//每頁(yè)條數(shù)
currPage;//當(dāng)前頁(yè)碼 要查詢的頁(yè)碼
輸出結(jié)果 :
類型
返回json數(shù)據(jù)
成功返回
{
"version":"V1.X",
"actioncode":"SUCCESS",
"data":
{
"exchangeAllScore":2000,
"exchangeMoneyScore":1000,
"exchangeMoneyTotal":1,
"exchangeGoodsScore":1000,
"maxPage":5,
"currPage":1,
"maxSize":48,
"exchangeList":[
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”,
"luckscore": 1000
}
{
"applyscore":10000,
"usemoney":100,
"exchangetype":1,
"applystate":1,
"applynum":1,
"appphysicalid":””,
"wantExchargetime":”2015-12-12 12:12:12”,
"luckscore": 1000
}
{...}
]
},
"endtime":"2018-12-11 11:33:02",
"message":"請(qǐng)求成功","token":"true"
}
失敗返回
{"version":"V1.X",
"actioncode":"FAIL",
"data":"",
"endtime":"2018-12-11 11:35:25",
"message":"用戶名或密碼錯(cuò)誤","token":"true"}
實(shí)際返回的數(shù)據(jù)說(shuō)明
exchangeAllScore;//兌換總積分
exchangeMoneyScore;//兌換現(xiàn)金的積分
exchangeGoodsScore;//兌換實(shí)物的積分
exchangeMoneyTotal;//兌換現(xiàn)金的金額
maxPage;//總頁(yè)數(shù)
currPage;//當(dāng)前頁(yè)碼
maxSize;//總條數(shù)
exchangeList:{//兌換列表
applyscore;//兌換的積分
usemoney;//兌換的金額
applystate;//兌換的狀態(tài) 0兌換中,1兌換成功,-1兌換失敗
exchangetype;//兌換的類型 ,兌換金額==1,兌換物品==2 ,抽獎(jiǎng)==3
applynum;//兌換的個(gè)數(shù)
appphysicalid;//兌換商品的id標(biāo)識(shí)
wantExchargetime;//兌換的申請(qǐng)時(shí)間
Luckscore;//中獎(jiǎng)積分
}
如沒(méi)特殊注明,文章均為方維網(wǎng)絡(luò)原創(chuàng),轉(zhuǎn)載請(qǐng)注明來(lái)自http://www.sdlwjx666.com/news/6300.html