文档
测试

查询购物车

GET
/cart/cartShow

接口描述

在购物车上显示用户添加的商品数据

请求头

参数名
类型
描述
必填
token
String
必填

响应参数

参数名
类型
描述
必填
code
int
必填
msg
String
必填
data
必填

说明 / 示例

这个功能涉及到商品的库存问题,数据处理后请向我查询下数据情况 下面为商品表对应的库存和单价 ![image.png](https://cos.easydoc.net/66750703/files/k89zvukb.png) ``` 无数据时 { "code": 1000, "msg": "操作成功", "data": { "cartProductDtoList": [], "selectedAll": true, "cartTotalPrice": 0, "cartTotalQuantity": 0 } } ``` ``` 用户有添加数据情况 { "code": 1000, "msg": "操作成功", "data": { "cartProductDtoList": [ { "quantity": 2, "goodsId": 216465, "smallImgPath": null, "currentPrice": 2000, "goodsName": "抱枕", "publishStatus": 1, "reserve": 5, "productTotalPrice": 4000, "productSelected": true }, { "quantity": 1, "goodsId": 32132, "smallImgPath": null, "currentPrice": 4000, "goodsName": "智能机器人", "publishStatus": 1, "reserve": 8, "productTotalPrice": 4000, "productSelected": true } ], "selectedAll": true, "cartTotalPrice": 8000, "cartTotalQuantity": 3 } } ``` |quantity|goodsId|smallImgPath|currentPrice|goodsName|publishStatus|reserve|productTotalPrice|productSelected|selectedAll|cartTotalPrice|cartTotalQuantity| |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-| |商品数量|商品Id|商品小图路径|商品单价|商品名称|上架状态:0->下架;1->上架|页面显示库存|商品总价|是否有选中(后面功能会有用到)|全选功能(后面功能会用到)|购物车商品总价|所有商品总数量|