商品分类接口

通过本接口查询平台的商品分类,先查一级分类,再通过父ID查二级分类,再查三级分类。分类最多有三级。

默认排序:按sort字段升序

所在controller:ProductController

请求方式:GET或POST

URL:/{version}/product/productCategory/list

入参列表


参数名 类型 必填 备注
1 parentId Long 父级分类Id,如果查询一级分类传入0或不传

返回值列表


参数名 类型 说明
1 status String 状态码,成功返回200,失败返回500
2 msg String 提示信息
3 data Boolean 是否需要更新,true需要,false不需要
4 data.name String 分类名称
5 data. firstLetter String 分类首字母
6 data.siteRecommends String 与该分类绑定的推荐位
7 data.bak1 String 分类图标


返回值示例

{
    "status": "200",
    "message": "获取商品分类成功",
    "data": [{
        "id": 1,
        "parentIds": "0,",
        "name": "工程机械",
        "sort": 10,
        "categoryId": 1,
        "firstLetter": "GCJX",
        "siteRecommends": ["weixin_categoryIndex_gcjx_brand", "weixin_categoryIndex_gcjx_category1", "weixin_categoryIndex_gcjx_category2"],
		"bak1": "/00/48/27/837754dc56f1469da1e38b3fdd8c089c.png",
		"level": 1,
        "parentId": 0
    }, {
        "id": 329,
        "parentIds": "0,",
        "name": "家电产品",
        "sort": 20,
        "categoryId": 329,
        "firstLetter": "JDCP",
        "siteRecommends": ["weixin_categoryIndex_jdcp_brand", "weixin_categoryIndex_jdcp_category1", "weixin_categoryIndex_jdcp_category2"],
		"bak1": "/00/48/27/837754dc56f1469da1e38b3fdd8c089c.png",
		"level": 1,
        "parentId": 0
    }, {
        "id": 108,
        "parentIds": "0,",
        "name": "3C数码",
        "sort": 30,
        "categoryId": 108,
        "firstLetter": "3CSM",
        "siteRecommends": ["weixin_categoryIndex_3csm_brand", "weixin_categoryIndex_3csm_category1", "weixin_categoryIndex_3csm_category2"],
        "level": 1,
        "parentId": 0
    }, {
        "id": 179,
        "parentIds": "0,",
        "name": "安防监控",
        "sort": 40,
        "categoryId": 179,
        "firstLetter": "AFJK",
        "siteRecommends": ["weixin_categoryIndex_afjk_brand", "weixin_categoryIndex_afjk_category1", "weixin_categoryIndex_afjk_category2"],
        "level": 1,
        "parentId": 0
    }, {
        "id": 240,
        "parentIds": "0,",
        "name": "汽车汽配",
        "sort": 50,
        "categoryId": 240,
        "firstLetter": "QCQP",
        "siteRecommends": ["weixin_categoryIndex_qcqp_brand", "weixin_categoryIndex_qcqp_category1", "weixin_categoryIndex_qcqp_category2"],
        "level": 1,
        "parentId": 0
    }],
    "page": {}
}


商品详情汇总接口

用途:本接口汇总了6个通用接口的功能,为了App、小程序、H5在商品详情页里减少接口调用次数。

所在controller:ProductController

请求方式:GET或POST

URL:/{version}/product/all

汇总接口列表


接口URL 在data里的Key 功能说明
1 /wap/api/v1/product/sku/list productSkuList 获取商品SKU
2 /wap/api/v1/product/one productOne 获取商品信息
3 /wap/api/v1/product/image/list productImageList 获取商品图片
4 /wap/api/v1/product/sectionPrice/list productSectionPriceList 获取商品批发价
5 /wap/api/v1/store/one storeOne 店铺信息
6 /wap/api/v1/store/nav/count storeNavCount 店铺头部信息

入参列表


参数名 类型 必填 备注
1 pid Long 商品id
2 skuIds String 用于整合/wap/api//{version}/product/sku/list.htm接口

返回值列表


参数名 类型 说明
1 status String 状态码,成功返回200,失败返回500
2 msg String 提示信息
3 data.productSkuList List 商品SKU列表
4 data.productOne Map 商品信息
5 data.productImageList List 商品图片
6 data.productSectionPriceList List 商品批发价
7 data.storeOne Map 店铺信息
8 data.storeNavCount Map 店铺调试信息


返回值示例

{
    "status": "200",
    "message": "获取商品总信息成功",
    "data": {
        "productSkuList": [{
            "id": 18833,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18833,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "粉色",
            "spec2": "301_尺码",
            "spec2V": "XL",
            "spec3": "121_预制规格",
            "spec3V": "预制值F",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }, {
            "id": 18834,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18834,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "粉色",
            "spec2": "301_尺码",
            "spec2V": "XL",
            "spec3": "121_预制规格",
            "spec3V": "预制值G",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }, {
            "id": 18835,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18835,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "绿色",
            "spec2": "301_尺码",
            "spec2V": "XL",
            "spec3": "121_预制规格",
            "spec3V": "预制值F",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }, {
            "id": 18836,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18836,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "粉色",
            "spec2": "301_尺码",
            "spec2V": "XXL",
            "spec3": "121_预制规格",
            "spec3V": "预制值G",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }, {
            "id": 18837,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18837,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "绿色",
            "spec2": "301_尺码",
            "spec2V": "XXL",
            "spec3": "121_预制规格",
            "spec3V": "预制值G",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }, {
            "id": 18838,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18838,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "绿色",
            "spec2": "301_尺码",
            "spec2V": "XXL",
            "spec3": "121_预制规格",
            "spec3V": "预制值F",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }, {
            "id": 18839,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18839,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "粉色",
            "spec2": "301_尺码",
            "spec2V": "XXL",
            "spec3": "121_预制规格",
            "spec3V": "预制值F",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }, {
            "id": 18840,
            "createDate": "2019-11-01 15:52:16",
            "updateDate": "2019-11-01 15:52:16",
            "skuId": 18840,
            "sort": 10,
            "isNotSpec": "1",
            "spec1": "302_颜色",
            "spec1V": "绿色",
            "spec2": "301_尺码",
            "spec2V": "XL",
            "spec3": "121_预制规格",
            "spec3V": "预制值G",
            "stock": 99999,
            "occupyStock": 0,
            "salableStock": 99999,
            "pid": 4660
        }],
        "productImageList": [{
            "id": 4138,
            "createDate": "2019-10-24 11:13:26",
            "pictureId": 4138,
            "storeId": 805,
            "albumId": 801,
            "path": "/01/85/52/ec2c5fdc861540ac9696234d57df4455.jpg",
            "pixel": "1200X500",
            "fileSize": 54995,
            "pictureSpace": 0
        }],
        "productOne": {
            "pid": 4660,
            "name": "全类型批发",
            "nameSub": "",
            "commentCount": "",
            "monthSales": 0,
            "collectionCount": "",
            "unit": "",
            "image": "/01/85/52/ec2c5fdc861540ac9696234d57df4455.jpg",
            "purchasingAmount": "1",
            "type": "2",
            "storeId": 805,
            "minPrice1": "",
            "maxPrice1": "",
            "minPrice2": 1111,
            "maxPrice2": 3333
        },
        "productSectionPriceList": [{
            "id": 2278,
            "scId": 2278,
            "section": "1",
            "price": 1111,
            "sort": 0,
            "pid": 4660
        }, {
            "id": 2279,
            "scId": 2279,
            "section": "2",
            "price": 2222,
            "sort": 1,
            "pid": 4660
        }, {
            "id": 2280,
            "scId": 2280,
            "section": "3",
            "price": 3333,
            "sort": 2,
            "pid": 4660
        }],
        "storeOne": {
            "storeId": 805,
            "logo": "/shop_init/store_logo.png",
            "name": "北京汇鑫科技有限公司",
            "provinceId": 35,
            "provinceName": "台湾",
            "cityId": 397,
            "cityName": "台湾",
            "districtId": 3399,
            "districtName": "花莲县",
            "detailedAddress": "北京昌平回龙观西大街",
            "storeType": "2",
            "storeTel": "15135342363",
            "storeQq": "3330105499",
            "storeWechat": "1234"
        },
        "storeNavCount": {
            "storeArticleCount": 0,
            "productNewCount": 17,
            "collectionStoreCount": 4,
            "productAllCount": 57
        }
    },
    "page": {}
}