商品详情接口.md 16.1 KB

9、商品详情

商品信息(/SellerProductController/getProduct)

请求参数【与网销信息一致】

参数名称 参数类型 可否为空 示例 备注
productSkn int 512587656 商品SKN
userId int 1234 登陆账号ID

注意,通用的头部没有列出。

请求示例 http://127.0.0.1:8088/platform/SellerProductController/getProduct?productSkn=512587656

正常返回:
{
  "code": 200,
  "data": {
    "ageLevel": "1",
    "attributeProValuesBosOne": [
      {
        "attributeId": 2001,                             // 新增页面的时候,商品扩展信息中对应的属性ID
        "attributeValueId": "1",                 
        "attributeValueIds": [                           // 属性选中哪些选项对应的ID
          1
        ],
        "displayPosition": 2,                            // 此接口忽略此字段
        "id": 24272,
        "productSkn": 512587656
      },
      {
        "attributeId": 2002,
        "attributeValueId": "2",
        "attributeValueIds": [
          2
        ],
        "displayPosition": 2,
        "id": 24274,
        "productSkn": 512587656
      },
      {
        "attributeId": 2003,
        "attributeValueId": "4",
        "attributeValueIds": [
          4
        ],
        "displayPosition": 2,
        "id": 24276,
        "productSkn": 512587656
      },
      {
        "attributeId": 2004,
        "attributeValueId": "5",
        "attributeValueIds": [
          5
        ],
        "displayPosition": 2,
        "id": 24278,
        "productSkn": 512587656
      },
      {
        "attributeId": 2005,
        "attributeValueId": "1,2,3",
        "attributeValueIds": [
          1,
          2,
          3
        ],
        "displayPosition": 2,
        "id": 24280,
        "productSkn": 512587656
      }
    ],
    "attributeProValuesBosTwo": [
      {
        "attributeId": 20,
        "attributeValueId": "989,990",
        "attributeValueIds": [
          989,
          990
        ],
        "displayPosition": 3,
        "productSkn": 512587656
      },
      {
        "attributeId": 34,
        "attributeValueId": "2,3",
        "attributeValueIds": [
          2,
          3
        ],
        "displayPosition": 3,
        "id": 24284,
        "productSkn": 512587656
      }
    ],
    "brandId": 2462,
    "brandName": "乔丹",
    "expectSaleTimeStr": "2017-10-12",               // 上市日期
    "factoryCode": "OPEN0021",                        // skn 维度的厂家编号
    "gender": "2",                                  // 性别   1 代表男  2代表女  3代表通用
    "goodsSeason": 1,                               // 货品季  1 - 6  分别代表 春、夏、秋、冬、春夏、秋冬
    "goodsYears": 2016,                             // 货品年
    "id": 508332,
    "materialList": [                               //  选中的材质列表
      {
        "id": 101
      },
      {
        "id": 95
      }
    ],
    "maxSortId": 10,
    "maxSortName": "创意生活",                    // 一级品类名称
    "middleSortId": 99,
    "middleSortName": "生活日用",                 // 二级品类名称
    "pattern": "海魂,腰果花",                   // 商品扩展信息中图案纹理,就用汉字去关联哪些被该商品选中的
    "phrase": "33223",                          // 商品卖点
    "productIntro": "<p>asdasd</p>",               // 描述
    "productName": "jordan男马甲JIT@@@商品哦2222",            // 名称
    "productSkn": 512587656,
    "productStandardRelationBoList": [              // 商品参数选中的列表
      {
        "parameterMakeId": 1618,                     // 该参数属性选中的ID
        "productId": 508332,
        "standardId": 513,                         // 属性参数ID
        "standardVal": "条纹布"
      },
      {
        "parameterMakeId": 1636,
        "productId": 508332,
        "standardId": 514,
        "standardVal": "绒质"
      }
    ],
    "retailPrice": 0,
    "recommendPhrase": "推荐短语",
    "salesPrice": 0,
    "seasons": "",
    "sellerGoodList": [                                     // 颜色(产品)列表
      {
        "colorId": 2,                                      // 颜色ID
        "factoryCode": "ASD002",                           // 款型编码
        "factoryGoodsName": "黑色",                       // 颜色展示名称
        "goodsName": "黑色",                               // 色系名称
        "goodsSizeList": [
          {
            "factoryCode": "ABC1211I2#!$@999222111",       // 条码
            "goodsId": 670934,                         
            "marketPrice": 0,
            "productId": 508332,
            "productSkc": 680126,
            "productSkn": 512587656,
            "productSku": 2026690,
            "salePrice": 0,
            "sizeId": 199,                                // 尺码ID
            "sizeName": "F",                               // 尺码名称
            "storageNum": 0                                 // SKU的库存
          }
        ],
        "id": 670934,                                   // 产品ID    goodsId
        "isDefault": "Y",                               // 该颜色是否主推  Y 代表主推
        "productId": 508332,                             // 商品ID
        "productSkc": 680126,             
        "productSkn": 512587656
      }
    ],
    "sellerGoodsImagesList": [                       // 图片的列表  会有多个颜色,注意要遍历
      {
        "colorId": 2,                                // 图片列表所属产品颜色ID
        "createTime": 1490766887,
        "factoryCode": "ASD002",                     // 款型编码
        "factoryGoodsName": "黑色",                   // 颜色展示名称
        "goodsColorImage": "/2017/03/29/17/01a5ecc6cf929c5ea05054173b8c8919fd.jpg",     // 忽略
        "goodsImagesList": [
          {
            "angle": 0,
            "genderCover": 0,                                              // 男生频道封面图  填1  女生封面图填  2   其他都填 0
            "id": 1003068,
            "imageUrl": "http://img11.static.yhbimg.com/goodsimg/2017/03/29/17/01a5ecc6cf929c5ea05054173b8c8919fd.jpg",
            "isDefault": "Y",                                            // 是否是商品正面图   Y 代表是
            "orderBy": 0,                                                
            "productSkc": 680126,
            "productSkn": 512587656,
            "status": 1
          },
          {
            "angle": 0,
            "genderCover": 0,
            "id": 1003070,
            "imageUrl": "http://img12.static.yhbimg.com/goodsimg/2017/04/25/11/02ccb08cdf83c4f4774089f8db5cb8e4a9.jpg",
            "isDefault": "N",
            "orderBy": 1,
            "productSkc": 680126,
            "productSkn": 512587656,
            "status": 1
          },
          {
            "angle": 0,
            "genderCover": 2,
            "id": 1003072,
            "imageUrl": "http://img13.static.yhbimg.com/goodsimg/2017/04/25/11/029c8973bd8fe2d9bb37557f1385936998.jpg",
            "isDefault": "N",
            "orderBy": 2,
            "productSkc": 680126,
            "productSkn": 512587656,
            "status": 1
          }
        ],
        "goodsName": "黑色",
        "isDefault": "Y",                                      // 是否当前颜色是主推
        "productSkc": 680126,
        "productSkn": 512587656,
        "updateTime": 1490766887
      }
    ],
    "smallSortId": 105,
    "smallSortName": "靠枕/靠垫/抱枕",          // 三级品类名称
    "style": "运动,户外"                        // 商品扩展信息中风格,就用汉字去关联哪些被该商品选中的
  },
  "md5": "01b95d42f2eeac5dcec7ac3169c298ce",
  "message": "商品获取成功."
}
异常返回:

{
    "code": 400,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "SKN错误"
}

{
    "code": 500,
    "data": [],
    "md5": "8b233b3ba501d3563be331aa58d0fe0d",
    "message": "系统错误"
}

9、商品详情post 请求

商品信息(/SellerProductController/getProductEx)

请求参数【与网销信息一致】

参数名称 参数类型 可否为空 示例 备注
productSkn int 512587656 商品SKN
userId int 1234 登陆账号ID

注意,通用的头部没有列出。

请求示例 http://127.0.0.1:8088/platform/SellerProductController/getProductEx

{ "productSkn" : 1234, "userId" : 1213 }

正常返回:
{
  "code": 200,
  "data": {
    "ageLevel": "1",
    "attributeProValuesBosOne": [
      {
        "attributeId": 2001,                             // 新增页面的时候,商品扩展信息中对应的属性ID
        "attributeValueId": "1",                 
        "attributeValueIds": [                           // 属性选中哪些选项对应的ID
          1
        ],
        "displayPosition": 2,                            // 此接口忽略此字段
        "id": 24272,
        "productSkn": 512587656
      },
      {
        "attributeId": 2002,
        "attributeValueId": "2",
        "attributeValueIds": [
          2
        ],
        "displayPosition": 2,
        "id": 24274,
        "productSkn": 512587656
      },
      {
        "attributeId": 2003,
        "attributeValueId": "4",
        "attributeValueIds": [
          4
        ],
        "displayPosition": 2,
        "id": 24276,
        "productSkn": 512587656
      },
      {
        "attributeId": 2004,
        "attributeValueId": "5",
        "attributeValueIds": [
          5
        ],
        "displayPosition": 2,
        "id": 24278,
        "productSkn": 512587656
      },
      {
        "attributeId": 2005,
        "attributeValueId": "1,2,3",
        "attributeValueIds": [
          1,
          2,
          3
        ],
        "displayPosition": 2,
        "id": 24280,
        "productSkn": 512587656
      }
    ],
    "attributeProValuesBosTwo": [
      {
        "attributeId": 20,
        "attributeValueId": "989,990",
        "attributeValueIds": [
          989,
          990
        ],
        "displayPosition": 3,
        "productSkn": 512587656
      },
      {
        "attributeId": 34,
        "attributeValueId": "2,3",
        "attributeValueIds": [
          2,
          3
        ],
        "displayPosition": 3,
        "id": 24284,
        "productSkn": 512587656
      }
    ],
    "brandId": 2462,
    "brandName": "乔丹",
    "expectSaleTimeStr": "2017-10-12",               // 上市日期
    "factoryCode": "OPEN0021",                        // skn 维度的厂家编号
    "gender": "2",                                  // 性别   1 代表男  2代表女  3代表通用
    "goodsSeason": 1,                               // 货品季  1 - 6  分别代表 春、夏、秋、冬、春夏、秋冬
    "goodsYears": 2016,                             // 货品年
    "id": 508332,
    "materialList": [                               //  选中的材质列表
      {
        "id": 101
      },
      {
        "id": 95
      }
    ],
    "maxSortId": 10,
    "maxSortName": "创意生活",                    // 一级品类名称
    "middleSortId": 99,
    "middleSortName": "生活日用",                 // 二级品类名称
    "pattern": "海魂,腰果花",                   // 商品扩展信息中图案纹理,就用汉字去关联哪些被该商品选中的
    "phrase": "33223",                          // 商品卖点
    "productIntro": "<p>asdasd</p>",               // 描述
    "productName": "jordan男马甲JIT@@@商品哦2222",            // 名称
    "productSkn": 512587656,
    "productStandardRelationBoList": [              // 商品参数选中的列表
      {
        "parameterMakeId": 1618,                     // 该参数属性选中的ID
        "productId": 508332,
        "standardId": 513,                         // 属性参数ID
        "standardVal": "条纹布"
      },
      {
        "parameterMakeId": 1636,
        "productId": 508332,
        "standardId": 514,
        "standardVal": "绒质"
      }
    ],
    "retailPrice": 0,
    "salesPrice": 0,
    "seasons": "",
    "sellerGoodList": [                                     // 颜色(产品)列表
      {
        "colorId": 2,                                      // 颜色ID
        "factoryCode": "ASD002",                           // 款型编码
        "factoryGoodsName": "黑色",                       // 颜色展示名称
        "goodsName": "黑色",                               // 色系名称
        "goodsSizeList": [
          {
            "factoryCode": "ABC1211I2#!$@999222111",       // 条码
            "goodsId": 670934,                         
            "marketPrice": 0,
            "productId": 508332,
            "productSkc": 680126,
            "productSkn": 512587656,
            "productSku": 2026690,
            "salePrice": 0,
            "sizeId": 199,                                // 尺码ID
            "sizeName": "F",                               // 尺码名称
            "storageNum": 0                                 // SKU的库存
          }
        ],
        "id": 670934,                                   // 产品ID    goodsId
        "isDefault": "Y",                               // 该颜色是否主推  Y 代表主推
        "productId": 508332,                             // 商品ID
        "productSkc": 680126,             
        "productSkn": 512587656
      }
    ],
    "sellerGoodsImagesList": [                       // 图片的列表  会有多个颜色,注意要遍历
      {
        "colorId": 2,                                // 图片列表所属产品颜色ID
        "createTime": 1490766887,
        "factoryCode": "ASD002",                     // 款型编码
        "factoryGoodsName": "黑色",                   // 颜色展示名称
        "goodsColorImage": "/2017/03/29/17/01a5ecc6cf929c5ea05054173b8c8919fd.jpg",     // 忽略
        "goodsImagesList": [
          {
            "angle": 0,
            "genderCover": 0,                                              // 男生频道封面图  填1  女生封面图填  2   其他都填 0
            "id": 1003068,
            "imageUrl": "http://img11.static.yhbimg.com/goodsimg/2017/03/29/17/01a5ecc6cf929c5ea05054173b8c8919fd.jpg",
            "isDefault": "Y",                                            // 是否是商品正面图   Y 代表是
            "orderBy": 0,                                                
            "productSkc": 680126,
            "productSkn": 512587656,
            "status": 1
          },
          {
            "angle": 0,
            "genderCover": 0,
            "id": 1003070,
            "imageUrl": "http://img12.static.yhbimg.com/goodsimg/2017/04/25/11/02ccb08cdf83c4f4774089f8db5cb8e4a9.jpg",
            "isDefault": "N",
            "orderBy": 1,
            "productSkc": 680126,
            "productSkn": 512587656,
            "status": 1
          },
          {
            "angle": 0,
            "genderCover": 2,
            "id": 1003072,
            "imageUrl": "http://img13.static.yhbimg.com/goodsimg/2017/04/25/11/029c8973bd8fe2d9bb37557f1385936998.jpg",
            "isDefault": "N",
            "orderBy": 2,
            "productSkc": 680126,
            "productSkn": 512587656,
            "status": 1
          }
        ],
        "goodsName": "黑色",
        "isDefault": "Y",                                      // 是否当前颜色是主推
        "productSkc": 680126,
        "productSkn": 512587656,
        "updateTime": 1490766887
      }
    ],
    "smallSortId": 105,
    "smallSortName": "靠枕/靠垫/抱枕",          // 三级品类名称
    "style": "运动,户外"                        // 商品扩展信息中风格,就用汉字去关联哪些被该商品选中的
  },
  "md5": "01b95d42f2eeac5dcec7ac3169c298ce",
  "message": "商品获取成功."
}
异常返回:

{
    "code": 400,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "SKN错误"
}

{
    "code": 500,
    "data": [],
    "md5": "8b233b3ba501d3563be331aa58d0fe0d",
    "message": "系统错误"
}