购物车列表
返回购物车里的内容。加购、改数量、删除之后也建议再调一次,保证前端和服务端一致。
| 请求方式 | GET/POST |
| 接口路径 | /api/cart/list |
| Content-Type | - |
| 鉴权 | X-Nideshop-Token |
curl 调用
curl -s 'https://www.8shu8.com/api/cart/list' \
-H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN'
响应示例
{
"code": 200,
"message": "操作成功",
"success": true,
"data": {
"cartList": [
{
"DELAY_DAY_7": "...",
"id": "...",
"userId": "...",
"goodsId": "...",
"goodsSn": "...",
"goodsName": "...",
"marketPrice": "...",
"retailPrice": "...",
"number": "...",
"goodsSpecifitionIds": "...",
"checked": "...",
"listPicUrl": "...",
"goodsCreator": "...",
"goodsSpecifitionNameValue": "...",
"isSelfSell": "...",
"goodsPageId": "...",
"addTime": "...",
"addType": "...",
"useRewardPoints": "...",
"shippingFee": "...",
"bookCondition": "...",
"bookConditionText": "...",
"isbn": "...",
"goodsNumber": "...",
"delayDeliverDay": "..."
}
],
"cartTotal": "...",
"goodsCount": 1,
"goodsAmount": 0.0,
"checkedGoodsCount": 1,
"checkedGoodsAmount": 0.0
}
}
返回字段(data)
| 字段 | 类型 | 说明 |
cartList | 对象数组 | - |
cartList[].DELAY_DAY_7 | int | - |
cartList[].id | Integer | - |
cartList[].userId | Long | - |
cartList[].goodsId | Long | 历史商品 id,不再入库 |
cartList[].goodsSn | String | 商品编码 |
cartList[].goodsName | String | 书名,按商品编码现查 图书档案 |
cartList[].marketPrice | BigDecimal | 定价,现查 |
cartList[].retailPrice | BigDecimal | 售价,现查后按学校系数计算 |
cartList[].number | Integer | 数量 |
cartList[].goodsSpecifitionIds | String | - |
cartList[].checked | Integer | 是否选择下单 |
cartList[].listPicUrl | String | 封面,现查 |
cartList[].goodsCreator | Long | - |
cartList[].goodsSpecifitionNameValue | String | - |
cartList[].isSelfSell | Boolean | - |
cartList[].goodsPageId | String | 详情页 id(书市商品),现查后拼出,不入库 |
cartList[].addTime | LocalDateTime | - |
cartList[].addType | 对象 | 添加类型:购物车、立即购买等 |
cartList[].useRewardPoints | int | - |
cartList[].shippingFee | BigDecimal | - |
cartList[].bookCondition | String | 品相编码,现查 |
cartList[].bookConditionText | String | 品相中文,现查 |
cartList[].isbn | String | ISBN,现查 |
cartList[].goodsNumber | Integer | 可售库存(校园预售仓:实库+超卖),不入库 |
cartList[].delayDeliverDay | Integer | 预计延迟发货天数提示,不入库 |
cartTotal | 对象 | - |
goodsCount | int | - |
goodsAmount | BigDecimal | - |
checkedGoodsCount | int | - |
checkedGoodsAmount | BigDecimal | - |