店铺相关.md 20.8 KB

1、根据用户Id查询其管理的店铺列表

根据用户Id查询其管理的店铺列表(/SellerShopController/queryShopsByAdminPid)

请求参数

参数名称 参数类型 可否为空 示例 备注
userId int 登陆账号Id ID

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8088/platform/SellerShopController/queryShopsByAdminPid?userId=100750

正常返回:
{
  "code": 200,
  "data": [
    {
      "shopName": "nike店铺",
      "shopsBrands": [
        {
          "brandId": 248,
          "supplierId": 1636             // 供应商ID
        }
      ],
      "shopsId": 792
    }
  ],
  "message": "管理员下所有店铺"
}
异常返回:
{
    "code": 500,
    "md5": "d751713988987e9331980363e24189ce",
    "message": "该管理员下没有店铺"
}

2、根据店铺Id查询店铺信息

根据店铺Id查询店铺信息(/SellerShopController/getShopDetailById)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8088/platform/SellerShopController/getShopDetailById?shopsId=950

正常返回:
{
    "code": 200,
    "data": {
        "shopDomain": "smallredhat",
        "shopIntro": "\n店铺简介店铺简介\n\n",
        "shopLogo": "http://img11.static.yhbimg.com/yhb-img01/2017/05/02/16/0152ba5a01843e4cecc243abd90c732675.jpg",
        "shopName": "小红帽的店铺",
        "shopNature": 1,
        "shopRelationList": "[{\"agreementEndTime\":1570204800,\"brandId\":2470,\"brandName\":\"小红帽\",\"brandNameCn\":\"小红帽\",\"brandStatus\":1,\"id\":1500,\"isFreeze\":\"N\",\"method\":\"\",\"status\":0,\"supplierId\":1720,\"supplierName\":\"小红帽的供应商\",\"supplierStatus\":300}]",
        "shopsId": 950
    },
    "md5": "40e8c3d9141f46d34fafb07f018d6782",
    "message": "查询店铺信息成功!"
}
shopNature:1旗舰店,2专卖店,0初始状态(异常情况)


异常返回:
{
    "code": 500,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

3、店铺信息保存

店铺信息保存(/SellerShopController/updateShopBaseInfoById)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
shopLogo string 店铺logo ID
shopIntro string 店铺I简介ID

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8088/platform/SellerShopController/updateShopBaseInfoById?shopsId=950&shopIntro=111111111111

正常返回:
{
    "code": 200,
    "message": "修改店铺信息成功!"
}


异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "修改店铺信息失败!"
}

4、查询店铺类目

查询店铺类目(/SellerShopController/getShopsCategoryList)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
page int 页码 页码
size int 每页个数 每页个数

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/getShopsCategoryList?shopsId=15&size=12&page=1

正常返回:
{
    "code": 200,
    "data": {
        "currentPage": 1,
        "pageSize": 12,
        "rows": [
            {
                "addTime": "2017-05-08 17:20:49",
                "categoryId": 462,
                "categoryName": "ll测试",
                "createTime": 1494235249,
                "productNum": 2,
                "productSkn": 0
            },
            {
                "addTime": "2017-05-08 10:39:16",
                "categoryId": 460,
                "categoryName": "qqqqqqqqqqqqqqq",
                "createTime": 1494211156,
                "productNum": 9,
                "productSkn": 0
            },
            {
                "addTime": "2017-05-08 10:17:32",
                "categoryId": 458,
                "categoryName": "fdwafdsa",
                "createTime": 1494209852,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:46:12",
                "categoryId": 448,
                "categoryName": "test19",
                "createTime": 1490694372,
                "productNum": 2,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:39:25",
                "categoryId": 446,
                "categoryName": "test17",
                "createTime": 1490693965,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:39:21",
                "categoryId": 444,
                "categoryName": "test16",
                "createTime": 1490693961,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:39:17",
                "categoryId": 442,
                "categoryName": "test15",
                "createTime": 1490693957,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:39:13",
                "categoryId": 440,
                "categoryName": "test14",
                "createTime": 1490693953,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:39:09",
                "categoryId": 438,
                "categoryName": "test13",
                "createTime": 1490693949,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:39:05",
                "categoryId": 436,
                "categoryName": "test12",
                "createTime": 1490693945,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:39:01",
                "categoryId": 434,
                "categoryName": "test11",
                "createTime": 1490693941,
                "productNum": 0,
                "productSkn": 0
            },
            {
                "addTime": "2017-03-28 17:38:58",
                "categoryId": 432,
                "categoryName": "test10",
                "createTime": 1490693938,
                "productNum": 0,
                "productSkn": 0
            }
        ],
        "total": 24,
        "totalPage": 2
    },
    "md5": "af934a6a91df7cccab2cfc2ae7feaac5",
    "message": "查询店铺分类成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "查询店铺分类失败!"
}

5、新增或修改店铺类目

新增或修改店铺类目(/SellerShopController/addOrUpdateShopsCategory)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
categoryName string 类别名称 类别名称
categoryId int 类别id 类别id

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/addOrUpdateShopsCategory 添加:{"shopId":15,"categoryName":"测试添加"} 修改:{"shopId":15,"categoryName":"测试添加111","categoryId":464}

正常返回:
{
    "code": 200,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "修改店铺类目成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

6、新增类目绑定商品

新增类目绑定商品(/SellerShopController/addCategoryLinkProduct)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
categoryId int 类别id 类别id
productSKN int 绑定skn 绑定skn

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/addCategoryLinkProduct {"shopId":15,"productSKN":[51180762,51180764],"categoryId":464}

{
    "code": 200,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "类目绑定商品成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "类目绑定商品失败"
}

6、删除类目绑定商品

删除类目绑定商品(/SellerShopController/deleteCategoryLinkProduct)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
categoryId int 类别id 类别id
productSKN int 绑定skn 绑定skn

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/deleteCategoryLinkProduct {"shopId":15,"productSKN":[51180764],"categoryId":464}

{
    "code": 200,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "删除类目绑定商品成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "删除类目绑定商品失败"
}

7、查询绑定商品数量

查询绑定商品数量(/SellerShopController/getBindProductCount)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
categoryId int 类别id 类别id

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/getBindProductCount {"shopId":15,"categoryId":464}

{
    "code": 200,
    "data": 1,
    "md5": "c4ca4238a0b923820dcc509a6f75849b",
    "message": "查询绑定商品数量成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "查询绑定商品数量失败"
}

8、查询绑定商品

查询绑定商品(/SellerShopController/getBindProduct)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
categoryId int 类别id 类别id
page int 页码 页码
size int 每页个数 每页个数
productSKN int productSKN productSKN
productName string productName productName
maxSortId int maxSortId maxSortId
middleSortId int middleSortId middleSortId
smallSortId int smallSortId smallSortId
status int status 上下架状态,0:未上架,1:已上架

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/getBindProduct {"shopId":15,"categoryId":464}

{
    "code": 200,
    "data": {
        "list": [
            {
                "categoryName": "测试添加111",
                "checked": true,
                "factoryCode": "",
                "productName": "测试专用",
                "productPic": "http://img10.static.yhbimg.com/goodsimg/2015/12/02/03/01342e42e6191080389cf731804116f7c9.jpg?imageView2/0/w/78/h/78",
                "productSKN": 51180762,
                "productSort": "",
                "saleCategory": [
                    "测试添加111",
                    "qqqqqqqqqqqqqqq",
                    "铁锁链孤舟",
                    "测试111333"
                ],
                "salePrice": 1,
                "status": 0,
                "storage": 1
            }
        ],
        "page": 1,
        "size": 20,
        "total": 1,
        "totalPage": 1
    },
    "md5": "e1738e7a9717049283d8329df83e31a5",
    "message": "查询绑定商品成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "查询绑定商品失败"
}

9、删除店铺类目

删除店铺类目(/SellerShopController/deleteShopsCategory)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
categoryId int 类别id 类别id

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/deleteShopsCategory {"shopId":15,"categoryId":464}

{
    "code": 200,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "删除店铺类目成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "店铺删除店铺类目失败"
}

10、查询所有商品

查询所有商品(/SellerShopController/getAllProduct)

请求参数

参数名称 参数类型 可否为空 示例 备注
shopsId int 店铺Id ID
page int 页码 页码
size int 每页个数 每页个数
productSKN int productSKN productSKN
productName string productName productName
maxSortId int maxSortId maxSortId
middleSortId int middleSortId middleSortId
smallSortId int smallSortId smallSortId
status int status 上下架状态,0:未上架,1:已上架

注意,通用的头部没有列出。
请求示例 http://127.0.0.1:8080/platform/SellerShopController/getAllProduct {"shopId":15}

{
    "code": 200,
    "data": {
        "checkedCount": 0,
        "list": [
            {
                "categoryName": "test19",
                "checked": true,
                "factoryCode": "",
                "productName": "白色A4纸",
                "productPic": "http://img10.static.yhbimg.com/goodsimg/2015/09/11/05/01bf11b69a7a9d07f5568e0b7d751a83de.png?imageView2/0/w/78/h/78",
                "productSKN": 51145825,
                "productSort": "",
                "saleCategory": [
                    "test19",
                    "111222",
                    "铁锁链孤舟",
                    "测试111333"
                ],
                "salePrice": 11,
                "status": 1,
                "storage": 80
            },
            {
                "categoryName": "qqqqqqqqqqqqqqq",
                "checked": true,
                "factoryCode": "",
                "productName": "ONLY防风外套-testwss01",
                "productPic": "",
                "productSKN": 51198395,
                "productSort": "",
                "saleCategory": [
                    "qqqqqqqqqqqqqqq",
                    "111222",
                    "铁锁链孤舟",
                    "测试111333"
                ],
                "salePrice": 111,
                "status": 0,
                "storage": 10
            },
            {
                "categoryName": "ll测试",
                "checked": true,
                "factoryCode": "",
                "productName": "创建的基础商品为什么找不到_审核通过",
                "productPic": "",
                "productSKN": 51198397,
                "productSort": "",
                "saleCategory": [
                    "ll测试",
                    "qqqqqqqqqqqqqqq",
                    "111222",
                    "铁锁链孤舟"
                ],
                "salePrice": 199,
                "status": 0,
                "storage": 5
            },
            {
                "categoryName": "ll测试",
                "checked": true,
                "factoryCode": "",
                "productName": "得宝笔记本测试商品,请勿购买",
                "productPic": "http://img13.static.yhbimg.com/goodsimg/2015/09/14/07/0216e9186d1b41e76434457636fdb3e70c.jpg?imageView2/0/w/78/h/78",
                "productSKN": 51145654,
                "productSort": "",
                "saleCategory": [
                    "ll测试",
                    "qqqqqqqqqqqqqqq",
                    "铁锁链孤舟",
                    "测试111333",
                    "111222"
                ],
                "salePrice": 11,
                "status": 0,
                "storage": 2
            },
            {
                "categoryName": "test19",
                "checked": true,
                "factoryCode": "",
                "productName": "哈哈披风",
                "productPic": "http://img12.static.yhbimg.com/goodsimg/2015/12/02/05/02d7a359df0c2afceff287e13ef29e710e.jpg?imageView2/0/w/78/h/78",
                "productSKN": 51180950,
                "productSort": "",
                "saleCategory": [
                    "test19",
                    "qqqqqqqqqqqqqqq",
                    "111222",
                    "测试111333",
                    "铁锁链孤舟"
                ],
                "salePrice": 11,
                "status": 1,
                "storage": 1
            },
            {
                "categoryName": "qqqqqqqqqqqqqqq",
                "checked": true,
                "factoryCode": "",
                "productName": "1",
                "productPic": "http://img10.static.yhbimg.com/goodsimg/2015/12/02/05/0164797c126ac0c9a73f91ae03f6986ae2.png?imageView2/0/w/78/h/78",
                "productSKN": 51180944,
                "productSort": "",
                "saleCategory": [
                    "qqqqqqqqqqqqqqq",
                    "测试111333",
                    "铁锁链孤舟"
                ],
                "salePrice": 1,
                "status": 1,
                "storage": 1
            },
            {
                "categoryName": "qqqqqqqqqqqqqqq",
                "checked": true,
                "factoryCode": "",
                "productName": "测试专用",
                "productPic": "http://img10.static.yhbimg.com/goodsimg/2015/12/02/03/01342e42e6191080389cf731804116f7c9.jpg?imageView2/0/w/78/h/78",
                "productSKN": 51180762,
                "productSort": "",
                "saleCategory": [
                    "qqqqqqqqqqqqqqq",
                    "铁锁链孤舟",
                    "测试111333"
                ],
                "salePrice": 1,
                "status": 0,
                "storage": 1
            },
            {
                "categoryName": "qqqqqqqqqqqqqqq",
                "checked": true,
                "factoryCode": "",
                "productName": "一张A4纸",
                "productPic": "http://img12.static.yhbimg.com/goodsimg/2015/09/11/03/02bf11b69a7a9d07f5568e0b7d751a83de.png?imageView2/0/w/78/h/78",
                "productSKN": 51145651,
                "productSort": "",
                "saleCategory": [
                    "qqqqqqqqqqqqqqq",
                    "铁锁链孤舟"
                ],
                "salePrice": 11,
                "status": 1,
                "storage": 1
            },
            {
                "categoryName": "qqqqqqqqqqqqqqq",
                "checked": true,
                "factoryCode": "",
                "productName": "1",
                "productPic": "http://img11.static.yhbimg.com/goodsimg/2015/12/02/03/0110462da1a1f520e8e3beae4cf9d38d17.jpg?imageView2/0/w/78/h/78",
                "productSKN": 51180764,
                "productSort": "",
                "saleCategory": [
                    "qqqqqqqqqqqqqqq"
                ],
                "salePrice": 1,
                "status": 1,
                "storage": 0
            },
            {
                "categoryName": "qqqqqqqqqqqqqqq",
                "checked": true,
                "factoryCode": "",
                "productName": "测试用鞋",
                "productPic": "http://img10.static.yhbimg.com/goodsimg/2015/12/02/01/013e75597684438badf3b40ed9e39edbdb.jpg?imageView2/0/w/78/h/78",
                "productSKN": 51180720,
                "productSort": "",
                "saleCategory": [
                    "qqqqqqqqqqqqqqq",
                    "铁锁链孤舟"
                ],
                "salePrice": 1,
                "status": 1,
                "storage": 0
            }
        ],
        "page": 1,
        "size": 20,
        "total": 10,
        "totalPage": 1
    },
    "md5": "cf9206a34f264c12e1abf4d5b106e01e",
    "message": "查询所有商品成功!"
}

异常返回:
{
    "code": 500,
    "message": "店铺不存在!"
}

{
    "code": 401,
    "message": "店铺id错误"
}

{
    "code": 500,
    "message": "查询所有商品失败"
}