WEB/src/接口文档.txt
2026-03-31 09:15:36 +08:00

121 lines
2.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

工号角色管理模块
所有请求为Post请求,请求Body为JSON格式
setting.role.list
查询当前主体可分配角色列表,可选返回指定工号已选角色
employee_id number 否 可选,传入后返回该工号的角色选中状态
includeDisabled boolean 否 是否包含停用角色,默认 false
includeSystem boolean 否 是否包含系统默认角色(store_id=0/null),默认 true
接口响应:
{
"flag": "success",
"code": 200,
"message": "ok",
"data": {
"employee_id": 34,
"roles": [
{
"role_id": 2,
"role_code": "warehouse_admin_default",
"role_name": "仓库管理员",
"description": "仓库全部权限",
"role_type": 1,
"scope": 1,
"is_system": 1,
"status": 1,
"store_id": null,
"pid": 0,
"selected": true,
"children": [
{
"role_id": 8,
"role_code": "2",
"role_name": "仓库经理",
"description": "仓库经理权限",
"role_type": 1,
"scope": 1,
"is_system": 0,
"status": 1,
"store_id": 1000028,
"pid": 2,
"selected": false,
"children": []
}
]
},
{
"role_id": 5,
"role_code": "store_admin_default",
"role_name": "货主管理员",
"description": "货主全部权限",
"role_type": 1,
"scope": 1,
"is_system": 1,
"status": 1,
"store_id": null,
"pid": 0,
"selected": false,
"children": []
},
{
"role_id": 7,
"role_code": "1",
"role_name": "超级管理员",
"description": "系统管理权限",
"role_type": 1,
"scope": 1,
"is_system": 1,
"status": 1,
"store_id": null,
"pid": 0,
"selected": false,
"children": []
}
]
},
"timestamp": 1774861907
}
setting.role.add
给工号新增单个角色绑定
employee_id number 是 工号ID
role_id number 是 角色ID
接口响应:
待补充
setting.role.delete
删除工号单个角色绑定
employee_id number 是 工号ID
role_id number 是 角色ID
接口响应:
待补充
setting.role.update
批量重置工号角色绑定
employee_id number 是 工号ID
role_ids number[] 是 目标角色ID列表,至少包含 1 个角色
接口响应:
待补充