sell02 展现层编写
生活随笔
收集整理的這篇文章主要介紹了
sell02 展现层编写
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
# API###商品列表```
GET /sell/buyer/product/list
```參數(shù)```
無(wú)
```返回```
{"code": 0,"msg": "成功","data": [{"name": "熱榜","type": 1,"foods": [{"id": "123456","name": "皮蛋粥","price": 1.2,"description": "好吃的皮蛋粥","icon": "http://xxx.com",}]},{"name": "好吃的","type": 2,"foods": [{"id": "123457","name": "慕斯蛋糕","price": 10.9,"description": "美味爽口","icon": "http://xxx.com",}]}]
}
```###創(chuàng)建訂單```
POST /sell/buyer/order/create
```參數(shù)```
name: "張三"
phone: "18868822111"
address: "慕課網(wǎng)總部"
openid: "ew3euwhd7sjw9diwkq" //用戶的微信openid
items: [{productId: "1423113435324",productQuantity: 2 //購(gòu)買(mǎi)數(shù)量
}]```返回```
{"code": 0,"msg": "成功","data": {"orderId": "147283992738221" }
}
```###訂單列表```
GET /sell/buyer/order/list
```參數(shù)```
openid: 18eu2jwk2kse3r42e2e
page: 0 //從第0頁(yè)開(kāi)始
size: 10
```返回```
{"code": 0,"msg": "成功","data": [{"orderId": "161873371171128075","buyerName": "張三","buyerPhone": "18868877111","buyerAddress": "慕課網(wǎng)總部","buyerOpenid": "18eu2jwk2kse3r42e2e","orderAmount": 0,"orderStatus": 0,"payStatus": 0,"createTime": 1490171219,"updateTime": 1490171219,"orderDetailList": null},{"orderId": "161873371171128076","buyerName": "張三","buyerPhone": "18868877111","buyerAddress": "慕課網(wǎng)總部","buyerOpenid": "18eu2jwk2kse3r42e2e","orderAmount": 0,"orderStatus": 0,"payStatus": 0,"createTime": 1490171219,"updateTime": 1490171219,"orderDetailList": null}]
}
```###查詢訂單詳情```
GET /sell/buyer/order/detail
```參數(shù)```
openid: 18eu2jwk2kse3r42e2e
orderId: 161899085773669363
```返回```
{"code": 0,"msg": "成功","data": {"orderId": "161899085773669363","buyerName": "李四","buyerPhone": "18868877111","buyerAddress": "慕課網(wǎng)總部","buyerOpenid": "18eu2jwk2kse3r42e2e","orderAmount": 18,"orderStatus": 0,"payStatus": 0,"createTime": 1490177352,"updateTime": 1490177352,"orderDetailList": [{"detailId": "161899085974995851","orderId": "161899085773669363","productId": "157875196362360019","productName": "招牌奶茶","productPrice": 9,"productQuantity": 2,"productIcon": "http://xxx.com","productImage": "http://xxx.com"}]}
}
```###取消訂單```
POST /sell/buyer/order/cancel
```參數(shù)```
openid: 18eu2jwk2kse3r42e2e
orderId: 161899085773669363
```返回```
{"code": 0,"msg": "成功","data": null
}
```###獲取openid```
重定向到 /sell/wechat/authorize
```參數(shù)```
returnUrl: http://xxx.com/abc //【必填】
```返回```
http://xxx.com/abc?openid=oZxSYw5ldcxv6H0EU67GgSXOUrVg
``` 展現(xiàn)層API
?
轉(zhuǎn)載于:https://www.cnblogs.com/NeverCtrl-C/p/7896890.html
總結(jié)
以上是生活随笔為你收集整理的sell02 展现层编写的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 在路上---学习篇(一)Python 数
- 下一篇: 【2017-11-26】Linq表连接查