shops.md 6.9 KB

店铺接口服务定义


创建店铺

接口名:/ShopsRest/addShops

入参


属性名称 类型 例子 说明
shopName String 得宝旗舰店 店铺名称
shopNature int 1 店铺性质(1 旗舰店 2 专卖店)
shopDomain String debao 店铺域名
createPid int 1 创建人ID
shopsType int 1 店铺模式(1-单品店;2-多品店)
shopLogo String http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5d5bd383af1025eea1218cbccc.jpg?imageView/{mode}/w/{width}/h/{height} 店铺logo
shopIntro String 秉承以设计为核心的创新理念,用专业的思维方式将自然与科技、传统与革新、技艺与时尚三者良好融合,着重面料材质与软式廓型的品质互动,更好的诠释“less is more”的设计理念。 店铺简介
websiteUrl JSON数组 ["www.paperworks.com.cn"]
otherUrl JSON数组 ["www.paperworks.com.cn","https:\/\/jnby.tmall.com\/"]
shopAddress JSON数组
onCheck int 1 是否需要审核(1-是;0-否)
shopRelation JSON数组 品牌与供应商关系

shopRelation的json格式为:


"shopRelation":[
        {
            "brandId":355,
            "supplierId":310,
            "agreementEndTime":1485792000
        },
        {
            "brandId":1389,
            "supplierId":1226,
            "agreementEndTime":1482076800
        }
    ]

返回

返回码code为200就是成功,其余为失败。

{
  "code": 200,
  "message": "success."
}

获取店铺列表

接口名: /ShopsRest/getShopList

入参


属性名称 类型 例子 说明
page int 2 第几页
size int 50 每页条数
supplierId int 950 供应商ID
brandId int 928 品牌ID
checkStatus int 928 审核状态;100 暂存 200 待审核 300 审核通过 900 驳回
operationStatus int 1 操作状态; 1 店铺未创建 2 店铺已创建
checkStatusArr String 200,300 必须包含的状态

返回


{
  "code": 200,
  "data": {
    "list": [
      {
        "checkStatus": 200,
        "createTime": "2015-11-27 15:45:19",
        "shopName": "Case Scenario",
        "shopRelationList": [
          {
            "brandId": 409,
            "brandName": "Case Scenario",
            "brandNameCn": "",
            "brandNameEn": "Case Scenario",
            "brandStatus": 1,
            "supplierId": 0,
            "supplierStatus": 0
          }
        ],
        "shopsId": 31,
        "status": 1,
        "updateTime": "2015-12-08 19:20:44"
      }
    ],
    "page": 1,
    "size": 10,
    "total": 79,
    "totalPage": 8
  },
  "message": "操作成功"
}

店铺同步

接口名: /shops/synchronizeShop

入参


属性名称 类型 例子 说明
shopName String 得宝旗舰店 店铺名称
shopNature int 1 店铺性质(1 旗舰店 2 专卖店)
shopDomain String debao 店铺域名
createPid int 1 创建人ID
shopLogo String http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5d5bd383af1025eea1218cbccc.jpg?imageView/{mode}/w/{width}/h/{height} 店铺logo
shopIntro String 秉承以设计为核心的创新理念,用专业的思维方式将自然与科技、传统与革新、技艺与时尚三者良好融合,着重面料材质与软式廓型的品质互动,更好的诠释“less is more”的设计理念。 店铺简介
shopAdmin JSON数组
shopRelation JSON数组
websiteUrl JSON数组 ["www.paperworks.com.cn"]
otherUrl JSON数组 ["www.paperworks.com.cn","https:\/\/jnby.tmall.com\/"]
shopAddress JSON数组

返回


{
  "code":200
  "message":"修改成功"
}
{
  "code":500
  "message":"shops_id is null"
}
{
  "code":500
  "message":"shop_name is null"
}
{
  "code":500
  "message":"Sorry,店铺名已存在"
}
{
  "code":500
  "message":"shop_domain is null"
}
{
  "code":500
  "message":"Sorry,域名已存在"
}

根据店铺名查看是否存在

接口名:/shops/checkByShopName

入参


属性名称 类型 例子 说明
shopName String 得宝旗舰店 店铺名称
shopsId int 15 店铺ID

返回

{
  "code":500,
  "message":"shop_name is null"
}
{
  "code":500,
  "message":"shops_id is null"
}
{
  "code":400,
  "message":"false"
}
{
  "code":200,
  "message":"true"
}

根据店铺域名查看是否存在

接口名: /shops/checkByShopDomain

入参


属性名称 类型 例子 说明
shopDomain String debao 店铺域名
shopsId int 15 店铺ID

返回


{
  "code":500,
  "message":"shop_name is null"
}
{
  "code":500,
  "message":"shops_id is null"
}
{
  "code":400,
  "message":"false"
}
{
  "code":200,
  "message":"true"
}

获取店铺详情

接口名: /shops/getDetailByShopId

入参


属性名称 类型 例子 说明
shopsId int 15 店铺ID

返回


{
  "code":400,
  "message":"店铺id有误"
}
{
  "code":400,
  "message":"shopInfo is none"
}
{
  "code":200
  "message":"ok"
  "data":
  {
       {
            "shopsId": 15, 
            "shopName": "",
            "shopDomain": "",
            "shopNature": "",
            "shopLogo": "",
            "websiteUrl": "",
            "shopAddress": "",
            "createPid": "",
            "checkStatus": "",
            "createTime": "",
            "updateTime": "",
            "status": ""
           },
            "shopsAdmin": [{
                "id": "",
                "shopsId": "",
                "adminPid": "",
                "identity": "",
                "createTime": "",
                "updateTime": ""
            },{
                "id": "",
                "shopsId": "",
                "adminPid": "",
                "identity": "",
                "createTime": "",
                "updateTime": ""
            }], 
            "shopRelation": [{
                "id": "",
                "shopsId": "",
                "brandId": "",
                "supplierId": "",
                "createTime": "",
                "updateTime": "",
                "agreementEndTime": ""
            },{
                "id": "",
                "shopsId": "",
                "brandId": "",
                "supplierId": "",
                "createTime": "",
                "updateTime": "",
                "agreementEndTime": ""
            }]
        }
  }
}