13800138000(1380013800是什么号码)
注意这里面有些方法是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": "此订单已付款,无法取消"}
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 931614094@qq.com 举报,一经查实,本站将立刻删除。