文档
测试

点单管理-点单,查询购物车商品数据

POST
139.196.110.143/dev-api/system/cart/listShopStoreCart

接口描述

查询购物车中的商品数据,出参层级看接口返回数据格式

请求头

参数名
类型
描述
必填
Authorization
必填

请求参数

application/x-www-form-urlencoded
参数名
类型
描述
必填
batchId
string
操作批次ID
必填

响应参数

application/json
参数名
类型
描述
必填
code
int
状态码。200-成功;其他失败
必填
msg
string
成功或失败提示
必填
data
array
必填
storeId
店铺ID
必填
skuId
商品ID(shop_product_sku表主键ID)
必填
batchId
批次号
必填
cartQuantity
商品数量
必填
cartId
购物车ID
必填
skuName
string
商品名称(需要返回该字段)
必填
subtotalAmount
float
金额小计(增加返回该字段)real_price*商品的数量
必填
price
float
商品单价(增加返回该字段),直接从shop_prodcut_sku表中获取的price字段
必填
vipPrice
flaot
商品会员价(增加返回该字段),直接从shop_prodcut_sku表中获取的vip_price字段
必填
realPrice
float
商品实际单价(增加返回该字段),前期直接从shop_prodcut_sku表中获取的price字段。后期有折扣的话,计算折扣后的价格。
必填
totalNum
int
购物车中所有商品数量
必填
totalAmount
float
购物车中所有商品的总金额,subtotalAmount累加起来
必填
packFee
float
打包费用,前期传0
必填
totalPaymentAmount
float
支付的总金额。前期等于totalAmount
必填

说明 / 示例

入参: { "batchId": "2" } 出参: { "msg": "操作成功", "code": 200, "data": { "totalAmount": 66.1, "totalNum": 8, "packFee": 0, "totalPaymentAmount": 66.1, "rows": [ { "cartId": 213393, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17930, "cartQuantity": 1, "skuName": "宣恩黑毛土猪鲜肉大包50g", "subTotalAmount": 2.8, "price": 2.8, "vipPrice": 2.3, "realPrice": 2.8 }, { "cartId": 213394, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17931, "cartQuantity": 1, "skuName": "宣恩黑毛土猪梅菜猪肉大包50g", "subTotalAmount": 3.5, "price": 3.5, "vipPrice": 3.3, "realPrice": 3.5 }, { "cartId": 213395, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17932, "cartQuantity": 1, "skuName": "酱肉小笼包", "subTotalAmount": 12.8, "price": 12.8, "vipPrice": 11.5, "realPrice": 12.8 }, { "cartId": 213396, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17933, "cartQuantity": 1, "skuName": "灌汤小笼包", "subTotalAmount": 15, "price": 15, "vipPrice": 13.5, "realPrice": 15 }, { "cartId": 213397, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17934, "cartQuantity": 1, "skuName": "蟹黄小笼包", "subTotalAmount": 20.6, "price": 20.6, "vipPrice": 18, "realPrice": 20.6 }, { "cartId": 213398, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17935, "cartQuantity": 1, "skuName": "山东大馒头", "subTotalAmount": 2.4, "price": 2.4, "vipPrice": 1.8, "realPrice": 2.4 }, { "cartId": 213399, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17936, "cartQuantity": 2, "skuName": "老面馒头", "subTotalAmount": 4, "price": 2, "vipPrice": 3.6, "realPrice": 4 }, { "cartId": 213400, "batchId": "1", "operatorUserId": 1, "storeId": 1, "skuId": 17937, "cartQuantity": 1, "skuName": "葱香大花卷", "subTotalAmount": 5, "price": 5, "vipPrice": 4.5, "realPrice": 5 } ] } }