订单业务接口文档
1 新建订单
URL:IP/order/addorder
参数列表:
参数 |
类型 |
说明 |
number |
String |
订单编号 |
userid |
String |
用户id |
shopid |
String |
店铺id |
goodnumber |
String |
商品数量 |
viewPrice |
String |
标价 |
price |
String |
价格 |
addTime |
Timestamp |
收藏时间 |
state |
String |
是否已支付,默认0 |
返回结果示例:
{
"status": 400,
"desc": "参数不完整",
"content": null,
"timestamp": 1501485579384
}
{
"status": 401,
"desc": "参数格式错误",
"content": null,
"timestamp": 1501485608994
}
{
"status": 0,
"desc": "OK",
"content": null,
"timestamp": 1501485608994
}
{
"status": 859,
"desc": "生成订单失败",
"content": null,
"timestamp": 1501485608994
}
2 取消订单
URL:IP/order/cancelorder
参数列表:
参数 |
类型 |
说明 |
Number |
String |
订单编号 |
返回结果示例:
{
"status": 400,
"desc": "参数不完整",
"content": null,
"timestamp": 1501485579384
}
{
"status": 401,
"desc": "参数格式错误",
"content": null,
"timestamp": 1501485608994
}
{
"status": 0,
"desc": "OK",
"content": null,
"timestamp": 1501485608994
}
{
"status": 860,
"desc": "取消订单失败",
"content": null,
"timestamp": 1501485608994
}
3 删除订单
URL:IP/ order/deleteorder
参数列表:
参数 |
类型 |
说明 |
number |
String |
订单编号 |
返回结果示例:
{
"status": 400,
"desc": "参数不完整",
"content": null,
"timestamp": 1501485579384
}
{
"status": 401,
"desc": "参数格式错误",
"content": null,
"timestamp": 1501485608994
}
{
"status": 0,
"desc": "OK",
"content": null,
"timestamp": 1501485608994
}
{
"status": 861,
"desc": "删除订单失败",
"content": null,
"timestamp": 1501485608994
}
4 根据用户id查找订单
URL:IP/order/getorderbyuserid
参数列表:
参数 |
类型 |
说明 |
userid |
String |
用户id |
返回结果示例
{
"status": 0,
"desc": "OK",
"content": null,
"timestamp": 1501485608994
}