购物车下单
POST
/app/mall/api/v1/create/cart/order
请求参数
Body 参数application/json
userCartList
array [object {8}]
用户购物车商品
goodsId
integer
商品ID
goodsCode
string
商品编码
goodsName
string
商品名称
productId
integer
货品ID库存ID
goodsPrice
integer
商品价格
goodsNum
integer
商品数量
specifications
string
必需
imgUrl
string
商品规格图片
userAddressId
integer
用户收货地址ID
payType
string
必需
userMessage
string
用户留言
couponId
integer
优惠券ID
freightPrice
integer
运费 单位元
integralNums
integer
必需
示例
{
"userCartList":
[{
"id": 4,
"userId": 1,
"goodsId": 1,
"goodsCode": "515091408151908352",
"goodsName": "母亲节礼物-舒适安睡组合",
"productId": 10,
"goodsPrice": 1001,
"goodsNum": 4,
"specifications": "[\"1.8m床垫*1+枕头*2\",\"浅杏粉\"]",
"checked": "1",
"imgUrl": "http://yanxuan.nosdn.127.net/10022c73fa7aa75c2c0d736e96cc56d5.png?quality=90&thumbnail=200x200&imageView",
"cartStatus": "0"
},
{
"id": 3,
"userId": 1,
"goodsId": 1,
"goodsCode": "515091408151908352",
"goodsName": "母亲节礼物-舒适安睡组合",
"productId": 11,
"goodsPrice": 2000,
"goodsNum": 2,
"specifications": "[\"1.8m床垫*1+枕头*2\",\"玛瑙红\"]",
"checked": "1",
"imgUrl": "quality=90&thumbnail=200x200&imageView",
"cartStatus": "0"
}],
"userAddressId":1,
"payType":"1",
"userMessage":"请优先配送!!!"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://47.93.16.76:8080/app/mall/api/v1/create/cart/order' \
--header 'Content-Type: application/json' \
--data-raw '{
"userCartList":
[{
"id": 4,
"userId": 1,
"goodsId": 1,
"goodsCode": "515091408151908352",
"goodsName": "母亲节礼物-舒适安睡组合",
"productId": 10,
"goodsPrice": 1001,
"goodsNum": 4,
"specifications": "[\"1.8m床垫*1+枕头*2\",\"浅杏粉\"]",
"checked": "1",
"imgUrl": "http://yanxuan.nosdn.127.net/10022c73fa7aa75c2c0d736e96cc56d5.png?quality=90&thumbnail=200x200&imageView",
"cartStatus": "0"
},
{
"id": 3,
"userId": 1,
"goodsId": 1,
"goodsCode": "515091408151908352",
"goodsName": "母亲节礼物-舒适安睡组合",
"productId": 11,
"goodsPrice": 2000,
"goodsNum": 2,
"specifications": "[\"1.8m床垫*1+枕头*2\",\"玛瑙红\"]",
"checked": "1",
"imgUrl": "quality=90&thumbnail=200x200&imageView",
"cartStatus": "0"
}],
"userAddressId":1,
"payType":"1",
"userMessage":"请优先配送!!!"
}'
返回响应
🟢200成功
application/json
Body
msg
string
必需
code
integer
必需
示例
{
"msg": "操作成功",
"code": 200
}
修改于 2023-12-26 06:52:53