shop_admin.md 9.97 KB

店铺管理员接口服务定义


获取店铺管理员列表

接口名:/ShopsAdminRest/getShopsAdminList

入参

{
 "page":2,
 "size":12  
}

属性名称 类型 例子 说明
page int 2 第几页
size int 50 每页条数

返回

{
  "code": 200,
  "data": {
    "list": [
      {
        "adminName": "",
        "adminPid": 10180,
        "createTime": "2016-01-14 11:03:44",
        "id": 822,
        "identity": 1,
        "shopName": "MO&Co.",
        "shopsId": 420,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "成凤驹",
        "adminPid": 2738,
        "createTime": "2016-01-11 16:49:32",
        "id": 820,
        "identity": 7,
        "shopName": "Faroma",
        "shopsId": 430,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "朱云青",
        "adminPid": 2314,
        "createTime": "2016-01-11 16:49:15",
        "id": 819,
        "identity": 7,
        "shopName": "Faroma",
        "shopsId": 430,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "",
        "adminPid": 10040,
        "createTime": "2016-01-11 16:48:37",
        "id": 818,
        "identity": 6,
        "shopName": "朴坊Simplemill",
        "shopsId": 319,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "",
        "adminPid": 2944,
        "createTime": "2016-01-11 16:47:27",
        "id": 817,
        "identity": 7,
        "shopName": "WWTorres",
        "shopsId": 429,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "朱云青",
        "adminPid": 2314,
        "createTime": "2016-01-11 16:47:15",
        "id": 816,
        "identity": 7,
        "shopName": "WWTorres",
        "shopsId": 429,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "",
        "adminPid": 3161,
        "createTime": "2016-01-08 15:21:11",
        "id": 815,
        "identity": 7,
        "shopName": "MO&Co.edition",
        "shopsId": 426,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "",
        "adminPid": 3069,
        "createTime": "2016-01-08 15:20:58",
        "id": 814,
        "identity": 7,
        "shopName": "MO&Co.edition",
        "shopsId": 426,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "",
        "adminPid": 10172,
        "createTime": "2016-01-08 14:00:53",
        "id": 813,
        "identity": 7,
        "shopName": "ELECOM 宜丽客",
        "shopsId": 421,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "朱云青",
        "adminPid": 2314,
        "createTime": "2016-01-08 14:00:37",
        "id": 812,
        "identity": 7,
        "shopName": "ELECOM 宜丽客",
        "shopsId": 421,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "",
        "adminPid": 3161,
        "createTime": "2016-01-08 13:23:48",
        "id": 811,
        "identity": 7,
        "shopName": "MO&Co.",
        "shopsId": 420,
        "updateTime": "1970-01-01 08:00:00"
      },
      {
        "adminName": "",
        "adminPid": 3069,
        "createTime": "2016-01-08 13:23:32",
        "id": 810,
        "identity": 7,
        "shopName": "MO&Co.",
        "shopsId": 420,
        "updateTime": "1970-01-01 08:00:00"
      }
    ],
    "page": 2,
    "size": 12,
    "total": 803,
    "totalPage": 67
  },
  "message": "操作成功"
}

添加店铺管理员关系

接口名: /ShopsAdminRest/addAdminRelation

入参

{
 "shopsId":15,
 "adminPid":2,
 "identity":12
}

属性名称 类型 例子 说明
shopsId int 15 店铺ID
adminPid int 2951 管理员ID
identity int 1 身份(1、店长 2、供应商 3、店员) 可选 默认为1

返回

{
  "code":500
  "message":"shopsId is null"
}
{
  "code":500
  "message":"adminPid is null"
}
{
  "code":500
  "message":"该关系已存在"
}
{
  "code":500
  "message":"添加失败"
}
{
  "code":200
  "message":"添加成功"
}

删除店铺管理员关系

接口名: /ShopsAdminRest/delAdminRelation

入参

{
 "id":24
}

属性名称 类型 例子 说明
id int 20 店铺管理员记录ID

返回

{
  "code":500
  "message":"id is null"
}
{
  "code":200
  "message":"删除成功!"
}

获取管理员关系详情

接口名:/ShopsAdminRest/getAdminRelationDetailById

入参

{
 "id":20
}

属性名称 类型 例子 说明
id int 20 店铺管理员记录ID

返回

{
  "code":500,
  "message":"id is null"
}
{
  "code":500,
  "message":"暂无数据"
}
{
  "code": 200,
  "data": {
    "adminPid": 2951,
    "createTime": 1441937052,
    "id": 20,
    "identity": 7,
    "shopsId": 15,
    "updateTime": 0
  },
  "message": "list"
}

修改店铺管理员关系

接口名: /ShopsAdminRest/updateAdminRalation

入参

{
 "id":20,
 "shopsId":15,
 "adminPid":2951,
 "identity":2
}

属性名称 类型 例子 说明
id int 20 店铺管理员记录ID
shopsId int 15 店铺ID
adminPid int 2951 管理员ID
identity int 1 身份(1、店长 2、供应商 3、店员) 可选 默认为1

返回

{
  "code":500
  "message":"id is null"
}
{
  "code":500
  "message":"shopsId is null"
}
{
  "code":500
  "message":"adminPid is null"
}
{
  "code":500
  "message":"该关系已存在"
}
{
  "code":200
  "message":"修改成功"
}

根据身份获取用户

接口名: /ShopsAdminRest/getUsersByIdentity

入参

{
 "identity":1
}

属性名称 类型 例子 说明
identity int 1 身份(1、品牌公司 2、品牌经销商3、品牌代运营商4、有货品牌经理 5、有货店铺运营 6、有货商品运营7、有货平台运营)

返回

{
  "code":440
  "message":"身份不存在!"
}
{
  "code":200
  "message":"0"
}
{
  "code":200
  "message":"null"
}
{
  "code":500
  "message":"该关系已存在"
}
{
  "code": 200,
  "data": [
    {
      "identity": 1,
      "identityCn": "品牌公司",
      "pid": 100001,
      "supplierId": 0,
      "truename": "tuk"
    },
    {
      "identity": 1,
      "identityCn": "品牌公司",
      "pid": 100002,
      "supplierId": 0,
      "truename": "test9"
    },
    {
      "identity": 1,
      "identityCn": "品牌公司",
      "pid": 100008,
      "supplierId": 0,
      "truename": "小松鼠"
    },
    {
      "identity": 1,
      "identityCn": "品牌公司",
      "pid": 100010,
      "supplierId": 0,
      "truename": "Z"
    },
    {
      "identity": 1,
      "identityCn": "品牌公司",
      "pid": 100016,
      "supplierId": 0,
      "truename": "AAA"
    }
  ],
  "message": "all user"
}

获取所有身份

接口名: /EnumListRest/getEnumList

入参

返回

"IdentityEnum": [
      {
        "name": "品牌公司",
        "value": 1
      },
      {
        "name": "品牌经销商",
        "value": 2
      },
      {
        "name": "品牌代运营商",
        "value": 3
      },
      {
        "name": "有货品牌经理",
        "value": 4
      },
      {
        "name": "有货店铺运营",
        "value": 5
      },
      {
        "name": "有货商品运营",
        "value": 6
      },
      {
        "name": "有货平台运营",
        "value": 7
      }

其中:key为IdentityEnum

{
  "code": 200,
  "data": {
    "CheckStatusEnum": [
      {
        "name": "暂存",
        "value": 100
      },
      {
        "name": "审核中",
        "value": 200
      },
      {
        "name": "通过",
        "value": 300
      },
      {
        "name": "驳回",
        "value": 900
      }
    ],
    "IdentityEnum": [
      {
        "name": "品牌公司",
        "value": 1
      },
      {
        "name": "品牌经销商",
        "value": 2
      },
      {
        "name": "品牌代运营商",
        "value": 3
      },
      {
        "name": "有货品牌经理",
        "value": 4
      },
      {
        "name": "有货店铺运营",
        "value": 5
      },
      {
        "name": "有货商品运营",
        "value": 6
      },
      {
        "name": "有货平台运营",
        "value": 7
      }
    ],
    "ShopNatureEnum": [
      {
        "name": "旗舰店",
        "value": 1
      },
      {
        "name": "专卖店",
        "value": 2
      }
    ],
    "ShopOperationStatusEnum": [
      {
        "name": "店铺未创建",
        "value": 1
      },
      {
        "name": "店铺已创建",
        "value": 2
      }
    ],
    "ShopsTypeEnum": [
      {
        "name": "单品店",
        "value": 1
      },
      {
        "name": "多品店",
        "value": 2
      }
    ],
    "StatusEnum": [
      {
        "name": "关闭",
        "value": 0
      },
      {
        "name": "开启",
        "value": 1
      },
      {
        "name": "已删除",
        "value": 2
      }
    ]
  },
  "message": "操作成功"
}