文档
测试

更新购物车某个产品数量

GET
http://localhost:8888/rlg/cart/update

接口描述

更新购物车中某个商品数量

请求参数

参数名
类型
描述
必填
pid
Integer
商品id
必填
num
Integer
购买数量
必填

响应参数

参数名
类型
描述
必填
code
Integer
状态码
必填
msg
String
状态信息
可选
data
String
数据
可选

成功的示例

{ "status": 200, "data": { "records": [ { "id": 125, "userId": 49, "productId": 10004, "quantity": 1, "checked": 1, "subtitle": "4", "mainImage": "4", "price": 4.00, "stock": 10 }, { "id": 131, "userId": 49, "productId": 10003, "quantity": 5, "checked": 1, "subtitle": "3", "mainImage": "3", "price": 3.00, "stock": 100 }, { "id": 144, "userId": 49, "productId": 10001, "quantity": 1, "checked": 1, "subtitle": "1", "mainImage": "1", "price": 1.00, "stock": 90 }, { "id": 145, "userId": 49, "productId": 10001, "quantity": 1, "checked": 1, "subtitle": "1", "mainImage": "1", "price": 1.00, "stock": 90 }, { "id": 146, "userId": 49, "productId": 10001, "quantity": 1, "checked": 1, "subtitle": "1", "mainImage": "1", "price": 1.00, "stock": 90 } ], "total": 5, "size": 5, "current": 1, "orders": [], "optimizeCountSql": true, "hitCount": false, "countId": null, "maxLimit": null, "searchCount": true, "pages": 1 } }

失败的示例

{ "status": 201, "msg": "商品不存在" }