员工管理、角色资源管理 - coupons-management/doc GitHub Wiki
path: /user/add
method: POST
**param: **
{
"account": "string",
"age": 0,
"gender": 0,
"name": "string",
"password": "string"
}
参数说明:account:员工账号 age:年龄 gender:性别 name:名称 password:密码
path: /user/delete
method: POST
**param: **
{
"account": "id"
}
参数说明: id:员工ID
path: /user/getPage
method: POST
**param: **
{
"account": "yuan",
"name":"yuan",
"pageNumber":1,
"pageSize":10
}
参数说明:account:账号 name:名称 pageNumber:页码 pageSize:每页显示数量
返回json:
{
"code": 0,
"data": {
"list": [
{
"account": "yuanye",
"age": 1,
"createTime": 1557211676000,
"createUser": 1,
"gender": 1,
"heardImgUrl": null,
"id": 1,
"name": "yuanye",
"password": "e10adc3949ba59abbe56e057f20f883e",
"updateTime": 1557211678000,
"updateUser": 1
}
],
"pageNumber": 1,
"pageSize": 10,
"totalCount": 1,
"totalPage": 1
},
"message": "请求成功",
"success": true
}
path: /user/update
method: POST
**param: **
{
"id":201,
"account":"xxnet213",
"name":"xxnet21-name3",
"password":"123456",
"age":"21",
"gender":1
}
**参数说明: id:员工ID account:账号 name:名称 password:密码 age:年龄 gender:性别 **
path: /user/assignStore
method: POST
**param: **
{
"userId":201,
"stores":[120663,120662]
}
**参数说明: userId:员工ID stores:商家ID数组 **
path: /user/assignRole
method: POST
**param: **
{
"userId":201,
"roles":[2,3]
}
**参数说明: userId:员工ID roles:角色ID数组 **
path: /user/roles
method: POST
**param: **
{
"id":201
}
**参数说明: id:员工ID **
返回json:
{
"code": 0,
"data": [
{
"createTime": null,
"createUser": null,
"description": "string",
"id": 2,
"name": "string",
"type": "NORMAL",
"updateTime": null,
"updateUser": null
},
{
"createTime": null,
"createUser": null,
"description": "string1",
"id": 3,
"name": "string1",
"type": "NORMAL",
"updateTime": null,
"updateUser": null
}
],
"message": "请求成功",
"success": true
}
path: /store/availableAssign
method: POST
**param: **
{
"name":"Columbia",
"pageNumber":1,
"pageSize":2
}
参数说明: name:名称 pageNumber:页码 pageSize:每页显示数量
返回json:
{
"code": 0,
"data": {
"list": [
{
"advertising": null,
"approval": "0",
"country": "US",
"couponCount": null,
"couponCountValid": null,
"createTime": 1562053477000,
"createUser": null,
"createdAt": null,
"des": null,
"id": 120663,
"inType": null,
"isComplete": "1",
"logoUrl": "https://sgi.offerscdn.net/i/zdcs-merchants/077lXzUyrQlWNczuzjpooEE.h90.w170.flpad.v19.bffffff.png",
"name": "Columbia Sportswear Canada",
"nameCrc": null,
"storeId": 0,
"title": null,
"typeId": 8622,
"typeName": "Sportswear & Gear",
"updateTime": null,
"updateUser": null,
"uuid": null,
"website": "https://www.columbiasportswear.ca/en/sale-discount-outlet/?avad=111473_d16451581&mid=affiliate&eid=avantlink&uid=470961&nid=92677&utm_medium=affiliate",
"websiteCrc": null
},
{
"advertising": null,
"approval": "0",
"country": "US",
"couponCount": null,
"couponCountValid": null,
"createTime": 1562053474000,
"createUser": null,
"createdAt": null,
"des": null,
"id": 120662,
"inType": null,
"isComplete": "1",
"logoUrl": "https://sgi.offerscdn.net/i/zdcs-merchants/025uyRun5v1JSeMmdpTepYh.h90.w170.flpad.v241.bffffff.png",
"name": "Columbia Sportswear",
"nameCrc": null,
"storeId": 0,
"title": null,
"typeId": 8622,
"typeName": "Sportswear & Gear",
"updateTime": null,
"updateUser": null,
"uuid": null,
"website": "https://www.columbia.com/Default-Start?cjevent=a5a31c669c8d11e98055007d0a240614&eid=cj&mid=affiliate&nid=3211374&uid=10725898&utm_medium=affiliate",
"websiteCrc": null
}
],
"pageNumber": 1,
"pageSize": 2,
"totalCount": 8,
"totalPage": 4
},
"message": "请求成功",
"success": true
}
path: /user/stores
method: POST
**param: **
{
"userId":201,
"name":"Sportswear",
"pageNumber":1,
"pageSize":10
}
参数说明: userId:员工ID name:名称 pageNumber:页码 pageSize:每页显示数量
返回json:
{
"code": 0,
"data": {
"list": [
{
"advertising": null,
"approval": "0",
"country": "US",
"couponCount": null,
"couponCountValid": null,
"createTime": null,
"createUser": null,
"createdAt": null,
"des": null,
"id": 120663,
"inType": null,
"isComplete": null,
"logoUrl": null,
"name": "Columbia Sportswear Canada",
"nameCrc": null,
"storeId": 0,
"title": null,
"typeId": null,
"typeName": null,
"updateTime": null,
"updateUser": null,
"uuid": null,
"website": "https://www.columbiasportswear.ca/en/sale-discount-outlet/?avad=111473_d16451581&mid=affiliate&eid=avantlink&uid=470961&nid=92677&utm_medium=affiliate",
"websiteCrc": null
},
{
"advertising": null,
"approval": "0",
"country": "US",
"couponCount": null,
"couponCountValid": null,
"createTime": null,
"createUser": null,
"createdAt": null,
"des": null,
"id": 120662,
"inType": null,
"isComplete": null,
"logoUrl": null,
"name": "Columbia Sportswear",
"nameCrc": null,
"storeId": 0,
"title": null,
"typeId": null,
"typeName": null,
"updateTime": null,
"updateUser": null,
"uuid": null,
"website": "https://www.columbia.com/Default-Start?cjevent=a5a31c669c8d11e98055007d0a240614&eid=cj&mid=affiliate&nid=3211374&uid=10725898&utm_medium=affiliate",
"websiteCrc": null
}
],
"pageNumber": 1,
"pageSize": 10,
"totalCount": 2,
"totalPage": 1
},
"message": "请求成功",
"success": true
}
path: /user/currentStores
method: POST
**param: **
{
"name":"Sportswear",
"pageNumber":1,
"pageSize":1
}
参数说明: userId:员工ID name:名称 pageNumber:页码 pageSize:每页显示数量
返回json:
{
"code": 0,
"data": {
"list": [
{
"advertising": null,
"approval": "0",
"country": "US",
"couponCount": null,
"couponCountValid": null,
"createTime": null,
"createUser": null,
"createdAt": null,
"des": null,
"id": 120663,
"inType": null,
"isComplete": null,
"logoUrl": null,
"name": "Columbia Sportswear Canada",
"nameCrc": null,
"storeId": 0,
"title": null,
"typeId": null,
"typeName": null,
"updateTime": null,
"updateUser": null,
"uuid": null,
"website": "https://www.columbiasportswear.ca/en/sale-discount-outlet/?avad=111473_d16451581&mid=affiliate&eid=avantlink&uid=470961&nid=92677&utm_medium=affiliate",
"websiteCrc": null
},
{
"advertising": null,
"approval": "0",
"country": "US",
"couponCount": null,
"couponCountValid": null,
"createTime": null,
"createUser": null,
"createdAt": null,
"des": null,
"id": 120662,
"inType": null,
"isComplete": null,
"logoUrl": null,
"name": "Columbia Sportswear",
"nameCrc": null,
"storeId": 0,
"title": null,
"typeId": null,
"typeName": null,
"updateTime": null,
"updateUser": null,
"uuid": null,
"website": "https://www.columbia.com/Default-Start?cjevent=a5a31c669c8d11e98055007d0a240614&eid=cj&mid=affiliate&nid=3211374&uid=10725898&utm_medium=affiliate",
"websiteCrc": null
}
],
"pageNumber": 1,
"pageSize": 10,
"totalCount": 2,
"totalPage": 1
},
"message": "请求成功",
"success": true
}
path: /role/add
method: POST
**param: **
{
"description": "普通管理员",
"name": "普通管理员"
}
**参数说明: name:角色名称 description:角色描述 **
path: /role/update
method: POST
**param: **
{
"id":4,
"description": "普通管理员1",
"name": "普通管理员1"
}
**参数说明: id:角色ID name:角色名称 description:角色描述 **
path: /role/delete
method: POST
**param: **
{
"id": 5
}
**参数说明: id:角色ID **
path: /role/resource
method: POST
**param: **
{
"id": 2
}
**参数说明: id:角色ID **
返回json:
{
"code": 0,
"data": [{
"id": 6,
"name": "维护操作",
"pid": 1,
"url": "/spider/spiderMaintain"
}, {
"id": 8,
"name": "绿站",
"pid": 7,
"url": "/site/site1"
}, {
"id": 9,
"name": "橙站",
"pid": 7,
"url": "/site/site2"
}],
"message": "请求成功",
"success": true
}
path: /role/currentResource
method: POST
返回json:
{
"code": 0,
"data": [
{
"children": [
{
"children": [],
"id": 6,
"name": "维护操作",
"orderNum": 6,
"pid": 1,
"url": "/spider/spiderMaintain"
}
],
"id": 1,
"name": "基本数据",
"orderNum": 1,
"pid": null,
"url": null
},
{
"children": [
{
"children": [],
"id": 8,
"name": "绿站",
"orderNum": 8,
"pid": 7,
"url": "/site/site1"
},
{
"children": [],
"id": 9,
"name": "橙站",
"orderNum": 9,
"pid": 7,
"url": "/site/site2"
}
],
"id": 7,
"name": "网站数据",
"orderNum": 7,
"pid": null,
"url": null
},
{
"children": [],
"id": 10,
"name": "商家审核",
"orderNum": 10,
"pid": null,
"url": "/storeCheck/check"
},
{
"children": [
{
"children": [],
"id": 19,
"name": "角色管理",
"orderNum": 19,
"pid": 18,
"url": "/power/roleManage"
}
],
"id": 18,
"name": "权限管理",
"orderNum": 18,
"pid": null,
"url": null
}
],
"message": "请求成功",
"success": true
}
path: /role/allResource
method: POST
返回json:
{
"code": 0,
"data": [
{
"children": [
{
"children": [],
"id": 6,
"name": "维护操作",
"orderNum": 6,
"pid": 1,
"url": "/spider/spiderMaintain"
}
],
"id": 1,
"name": "基本数据",
"orderNum": 1,
"pid": null,
"url": null
},
{
"children": [
{
"children": [],
"id": 8,
"name": "绿站",
"orderNum": 8,
"pid": 7,
"url": "/site/site1"
},
{
"children": [],
"id": 9,
"name": "橙站",
"orderNum": 9,
"pid": 7,
"url": "/site/site2"
}
],
"id": 7,
"name": "网站数据",
"orderNum": 7,
"pid": null,
"url": null
},
{
"children": [],
"id": 10,
"name": "商家审核",
"orderNum": 10,
"pid": null,
"url": "/storeCheck/check"
},
{
"children": [
{
"children": [],
"id": 19,
"name": "角色管理",
"orderNum": 19,
"pid": 18,
"url": "/power/roleManage"
}
],
"id": 18,
"name": "权限管理",
"orderNum": 18,
"pid": null,
"url": null
}
],
"message": "请求成功",
"success": true
}
path: /role/updateResource
method: POST
**param: **
{
"roleId": 2,
"resources": [
6,7,8,9
]
}
参数说明: roleId:角色ID resources:资源ID数组
path: /role/list
method: POST
返回json:
{
"code": 0,
"data": [
{
"createTime": null,
"createUser": null,
"description": "管理员",
"id": 1,
"name": "管理员",
"type": "ADMIN",
"updateTime": null,
"updateUser": null
},
{
"createTime": 1564046194000,
"createUser": 1,
"description": "test",
"id": 9,
"name": "test",
"type": "NORMAL",
"updateTime": null,
"updateUser": null
},
{
"createTime": 1562316774000,
"createUser": 201,
"description": "普通管理员",
"id": 4,
"name": "普通管理员",
"type": "NORMAL",
"updateTime": 1563954126000,
"updateUser": 1
}
],
"message": "请求成功",
"success": true
}
path: /user/assignOrCancel
method: POST
**param: **
{
"userId":234,
"storeId":"82892",
"operation":1
}
参数说明: userId:用户id storeId:商家id operation:操作 1:分配 2:取消分配