SSM搭建二手市場接口文檔(八):前臺

注意這裡面有些方法是Post,有些是Get建議統一使用Post方法,提交的時候不帶參數就是Get請求,不容易出錯。

1.創建訂單 /order/create.do

http://localhost:8080/order/create.do

request

shippingId

response

success

{
"status": 0,
"data": {
"orderNo": 1547284670806,
"payment": 3998,
"paymentType": 1,
"paymentTypeDesc": "在線支付",
"postage": 0,
"status": 20,
"paymentTime": null,
"sendTime": null,
"endTime": null,
"closeTime": null,
"createTime": 1485158223095,
"orderItemVoList": [
{
"orderNo": 1547284670806,
"productId": 28,
"productName":"4+64G送手環/Huawei/華為 nova 手機P9/P10plus青春",
"productImage": "0093f5d3-bdb4-4fb0-bec5-5465dfd26363.jpeg",
"currentUnitPrice": 1999,
"quantity": 2,
"totalPrice":3998,
"createTime": null
}
],
"imageHost": "http://img.licheetools.top/",
"shippingId": 29,
"receiverName": "吉利",
{"eceiverName": "吉利", "receiverPhone": "13800138000", "receiverMobile": "13800138000", "receiverProvince": "北京",…}
}

}
}

fail

{
"status": 1,
"msg": "創建訂單失敗"
}

2、用戶查看購物車選中商品明細 /order/get_order_cart_product.do

http://localhost:8080/order/get_order_cart_product.do

request


response

success

{
"status": 0,
"data": {
"orderItemVoList": [
{
"orderNo": null,
"productId": 28,
"productName": "4+64G送手環/Huawei/華為 nova 手機P9/P10plus青春",
"productImage": "0093f5d3-bdb4-4fb0-bec5-5465dfd26363.jpeg",
"currentUnitPrice": 1999,
"quantity": 6,
"totalPrice": 11994,
"createTime": ""
}
],
"productTotalPrice": 11994
"imageHost": "http://img.licheetools.top/",
}
}

或者

{
"status": 1,
"msg": "購物車為空"
}

fail

{
"status": 1,
"msg": "用戶未登錄"
}

3.用戶個人中心查看訂單 /order/list.do

http://localhost:8080/order/list.do

request

pageNum(default=1) pageSize(default=10)

response

success

{
"status": 0,
"data":{
"pageNum": 1,
"pageSize": 10,
"size": 7,
"orderBy": null,
"startRow": 1,
"endRow": 7,
"total": 7,
"pages": 1,
"list":[{"orderNo": 1547284670806, "payment": 3998, "paymentType": 1, "paymentTypeDesc": "在線支付",…],
"firstPage": 1,
"prePage": 0,
"nextPage": 0,
"lastPage": 1,

"isFirstPage": true,
"isLastPage": true,
"hasPreviousPage": false,
"hasNextPage": false,
"navigatePages": 8,
"navigatepageNums":[
1
]
}
}

fail

{
"status": 10,
"msg": "用戶未登錄,請登錄"
}

{
"status": 1,
"msg": "沒有權限"
}

4、獲取訂單詳情 /order/detail.do

http://localhost:8080/order/detail.do

request

orderNo

response

success

{
"status": 0,
{
"orderNo": 1547284562763,
"payment": 3998,

"paymentType": 1,
"paymentTypeDesc": "在線支付",
"postage": 0,
"status": 20,
"statusDesc": "已付款",
"paymentTime": "",
"sendTime": null,
"endTime": "",
"closeTime": "",
"createTime": "2019-01-12 17:16:02",
"updateTime": null,
[],
"imageHost": "http://img.licheetools.top/",
"shippingId": 29,
"receiverName": "吉利",
{"receiverName": "吉利", "receiverPhone": "13800138000", "receiverMobile": "13800138000", "receiverProvince": "北京",…}
}
}

fail

{
"status": 1,
"msg": "沒有找到該訂單"
}

5、取消訂單 /order/cancel.do

http://localhost:8080/order/cancel.do

request

orderNo

response

success

{
"status": 0
}

fail

{
"status": 1,
"msg": "該用戶沒有此訂單"
}

或者

{
"status": 1,
"msg": "此訂單已付款,無法取消"
}
SSM搭建二手市場接口文檔(八):前臺_訂單接口

SSM搭建二手市場接口文檔(八):前臺_訂單接口


分享到:


相關文章: