完整的接口文档和示例
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 否 | string | Bearer <JWT token> |
用户登录后的 JWT 令牌。若已登录可直接使用,无需传 X-Client。。认证 Token,请在请求头中携带,推荐格式:Bearer {token} |
| X-Client | 否 | string | <client key token> |
客户端密钥。当未携带或无法使用 Authorization 时必填,用于密钥认证。线上文档: http://localhost:5601/docs |
| X-Site | 是 | string | <site key> |
站点标识(必填)。用于切换站点和对应的数据库上下文。所有 OpenAPI 接口必须提供有效的 X-Site header。 |
| X-System-Code | 是 | string | AUTH_MANAGEMENT |
系统编码(必填)。用于指定当前访问的业务系统(例如 AUTH_MANAGEMENT、CONTENT_MANAGEMENT)。当系统不支持时将返回“登录用户不支持当前系统,可联系管理员处理”。 |
模块标识: user | 接口数量: 5
/api/users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 用户姓名(模糊搜索) |
| phone | 否 | string | - | 手机号(模糊搜索) |
| status | 否 | number | - | 状态:1-正常,0-禁用 |
{
"success": {
"code": 200,
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "USER001",
"name": "张三",
"title": "系统管理员",
"phone": "13800138000",
"email": "zhangsan@example.com",
"phonePrefix": "+86",
"status": 1,
"createTime": "2024-01-01T00:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 系统用户ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "USER0001",
"name": "系统管理员",
"phone": "13800000000",
"status": 1,
"roles": [
"ROLE0001"
],
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "系统用户不存在",
"data": null
}
}
/api/users
{
"name": "string|必填,用户姓名",
"phone": "string|必填,手机号,唯一",
"password": "string|必填,登录密码",
"roles": "array|可选,绑定角色ID数组",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建系统用户成功",
"data": {
"id": 1,
"code": "USER0001",
"name": "系统管理员",
"phone": "13800000000",
"status": 1,
"roles": [
"ROLE0001"
],
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建系统用户失败",
"data": null
}
}
/api/users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 系统用户ID |
{
"name": "string|必填,用户姓名",
"phone": "string|必填,手机号,唯一",
"password": "string|必填,登录密码",
"roles": "array|可选,绑定角色ID数组",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新系统用户成功",
"data": {
"id": 1,
"code": "USER0001",
"name": "系统管理员",
"phone": "13800000000",
"status": 1,
"roles": [
"ROLE0001"
],
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新系统用户失败",
"data": null
}
}
/api/users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 系统用户ID |
{
"success": {
"code": "0000",
"message": "删除系统用户成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除系统用户失败",
"data": null
}
}
模块标识: auth | 接口数量: 4
/auth/register
{
"name": "string|必填,用户名",
"phone": "string|必填,手机号",
"password": "string|必填,登录密码",
"email": "string|可选,邮箱",
"individualism": "boolean|可选,是否创建独立站点,默认 false"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "注册成功",
"data": {
"token": "jwt-token",
"user": {
"id": "USER0001",
"code": "USER000001",
"name": "张三",
"phone": "13800138000",
"email": "zhangsan@example.com",
"individualism": true,
"individualDbName": "user_1_1764407777204"
},
"clientKey": {
"id": "key-id",
"keyToken": "key-token",
"individualDbName": "user_1_1764407777204"
}
}
},
"failure": {
"code": "4000",
"message": "注册失败",
"data": null
}
}
/auth/login
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| system | 否 | string | - | 系统编码,登录时自动分配系统默认管理员角色 |
{
"phone": "string|必填,手机号",
"password": "string|必填,登录密码"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "登录成功",
"data": {
"token": "jwt-token",
"user": {
"id": "USER0001",
"code": "USER000001",
"username": "系统管理员",
"phone": "13800138000",
"email": "admin@example.com",
"individualism": true,
"individualDbName": "user_1_1764407777204",
"status": 1,
"createTime": "2025-01-21T10:00:00.000Z",
"accountType": "user",
"type": "普通用户"
},
"availableSites": [
{
"siteKey": "56B57A72-59C4-460B-82E5-22196205391B-A4608B6E9D4D6F599",
"name": "所属站点",
"type": "owner",
"isDefault": true
},
{
"siteKey": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890-ABCDEF12",
"name": "个人站点",
"type": "personal",
"isDefault": false
}
]
}
},
"failure": {
"code": "4000",
"message": "登录失败",
"data": null
}
}
/auth/client/register
{
"name": "string|可选,客户端用户姓名,默认为'游客'",
"phone": "string|必填,手机号",
"password": "string|必填,登录密码",
"email": "string|可选,邮箱",
"agreeTerms": "boolean|必填,是否同意协议",
"individualism": "boolean|可选,是否创建独立站点,默认 false"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "注册成功",
"data": {
"token": "jwt-token",
"user": {
"id": "CU0001",
"code": "CU000001",
"username": "客户端用户",
"phone": "13800138000",
"email": "user@example.com",
"individualism": true,
"individualDbName": "client_user_1_1764407777204"
},
"clientKey": {
"id": "key-id",
"keyToken": "key-token",
"individualDbName": "client_user_1_1764407777204"
}
}
},
"failure": {
"code": "4000",
"message": "注册失败",
"data": null
}
}
/auth/client/login
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| system | 否 | string | - | 系统编码,登录时自动分配系统默认管理员角色 |
{
"phone": "string|必填,手机号",
"password": "string|必填,登录密码",
"agreeTerms": "boolean|必填,是否同意协议"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "登录成功",
"data": {
"token": "jwt-token",
"user": {
"id": "CU0001",
"code": "CU000001",
"username": "客户端管理员",
"phone": "13800138000",
"email": "client@example.com",
"individualism": true,
"individualDbName": "client_user_1_1764407777204",
"status": 1,
"createTime": "2025-01-21T10:00:00.000Z",
"accountType": "clientUser",
"type": "散客"
},
"availableSites": [
{
"siteKey": "56B57A72-59C4-460B-82E5-22196205391B-A4608B6E9D4D6F599",
"name": "所属站点",
"type": "owner",
"isDefault": true
},
{
"siteKey": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890-ABCDEF12",
"name": "个人站点",
"type": "personal",
"isDefault": false
}
]
}
},
"failure": {
"code": "4000",
"message": "登录失败",
"data": null
}
}
模块标识: system | 接口数量: 5
/system/business/activate
{
"systemCode": "string|必填,要开通的系统编码",
"expireDays": "number|可选,业务有效天数"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "业务开通成功",
"data": {
"systemCode": "AUTH",
"activated": true
}
},
"failure": {
"code": "4000",
"message": "业务开通失败",
"data": null
}
}
/system/storage/switch
{
"mode": "string|必填,目标存储模式,可选 'FILE' 或 'CLOUD'"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "切换存储模式成功",
"data": {
"mode": "FILE"
}
},
"failure": {
"code": "4000",
"message": "切换存储模式失败",
"data": null
}
}
/system/storage/client/switch
{
"mode": "string|必填,目标存储模式,可选 'FILE' 或 'CLOUD'"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "切换客户端用户存储模式成功",
"data": {
"mode": "FILE"
}
},
"failure": {
"code": "4000",
"message": "切换客户端用户存储模式失败",
"data": null
}
}
/system/storage/mode
暂无请求参数定义
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"userMode": "FILE",
"clientUserMode": "FILE"
}
}
}
/system/info
暂无请求参数定义
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"version": "1.0.0",
"buildTime": "2025-01-01T10:00:00.000Z",
"storageMode": "FILE"
}
}
}
模块标识: clientUser | 接口数量: 5
/api/client-users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 姓名关键词 |
| phone | 否 | string | - | 手机号 |
| status | 否 | number | - | 状态过滤 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "CU0001",
"name": "客户端管理员",
"phone": "13900000000",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/client-users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 客户端用户ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "CU0001",
"name": "客户端管理员",
"phone": "13900000000",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "客户端用户不存在",
"data": null
}
}
/api/client-users
{
"name": "string|必填,客户端用户姓名",
"phone": "string|必填,手机号,唯一",
"password": "string|必填,登录密码",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建客户端用户成功",
"data": {
"id": 1,
"code": "CU0001",
"name": "客户端管理员",
"phone": "13900000000",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建客户端用户失败",
"data": null
}
}
/api/client-users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 客户端用户ID |
{
"name": "string|必填,客户端用户姓名",
"phone": "string|必填,手机号,唯一",
"password": "string|必填,登录密码",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新客户端用户成功",
"data": {
"id": 1,
"code": "CU0001",
"name": "客户端管理员",
"phone": "13900000000",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新客户端用户失败",
"data": null
}
}
/api/client-users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 客户端用户ID |
{
"success": {
"code": "0000",
"message": "删除客户端用户成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除客户端用户失败",
"data": null
}
}
模块标识: organization | 接口数量: 7
/api/organizations
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 组织名称关键词 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "ORG0001",
"name": "总部",
"parentId": null,
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/organizations/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 组织ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "ORG0001",
"name": "总部",
"parentId": null,
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "组织不存在",
"data": null
}
}
/api/organizations
{
"name": "string|必填,组织名称",
"parentId": "string|可选,父级组织ID,根节点为空",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建组织成功",
"data": {
"id": 1,
"code": "ORG0001",
"name": "总部",
"parentId": null,
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建组织失败",
"data": null
}
}
/api/organizations/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 组织ID |
{
"name": "string|必填,组织名称",
"parentId": "string|可选,父级组织ID,根节点为空",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新组织成功",
"data": {
"id": 1,
"code": "ORG0001",
"name": "总部",
"parentId": null,
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新组织失败",
"data": null
}
}
/api/organizations/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 组织ID |
{
"success": {
"code": "0000",
"message": "删除组织成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除组织失败",
"data": null
}
}
/api/organizations/{id}/users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 组织ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "ORG0001",
"name": "总部",
"parentId": null,
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "组织不存在",
"data": null
}
}
/api/organizations/{id}/users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 组织ID |
{
"name": "string|必填,组织名称",
"parentId": "string|可选,父级组织ID,根节点为空",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新组织成功",
"data": {
"id": 1,
"code": "ORG0001",
"name": "总部",
"parentId": null,
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新组织失败",
"data": null
}
}
模块标识: department | 接口数量: 7
/api/departments
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| organizationId | 否 | string | - | 按组织筛选 |
| name | 否 | string | - | 部门名称关键词 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "DEP0001",
"name": "研发部",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/departments/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 部门ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "DEP0001",
"name": "研发部",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "部门不存在",
"data": null
}
}
/api/departments
{
"name": "string|必填,部门名称",
"organizationId": "string|必填,所属组织ID",
"leaderId": "string|可选,部门负责人ID",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建部门成功",
"data": {
"id": 1,
"code": "DEP0001",
"name": "研发部",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建部门失败",
"data": null
}
}
/api/departments/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 部门ID |
{
"name": "string|必填,部门名称",
"organizationId": "string|必填,所属组织ID",
"leaderId": "string|可选,部门负责人ID",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新部门成功",
"data": {
"id": 1,
"code": "DEP0001",
"name": "研发部",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新部门失败",
"data": null
}
}
/api/departments/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 部门ID |
{
"success": {
"code": "0000",
"message": "删除部门成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除部门失败",
"data": null
}
}
/api/departments/{id}/users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 部门ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "DEP0001",
"name": "研发部",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "部门不存在",
"data": null
}
}
/api/departments/{id}/users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 部门ID |
{
"name": "string|必填,部门名称",
"organizationId": "string|必填,所属组织ID",
"leaderId": "string|可选,部门负责人ID",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新部门成功",
"data": {
"id": 1,
"code": "DEP0001",
"name": "研发部",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新部门失败",
"data": null
}
}
模块标识: position | 接口数量: 7
/api/positions
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 岗位名称关键词 |
| status | 否 | number | - | 状态过滤 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "POS0001",
"name": "产品经理",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/positions/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 岗位ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "POS0001",
"name": "产品经理",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "岗位不存在",
"data": null
}
}
/api/positions
{
"name": "string|必填,岗位名称",
"organizationId": "string|可选,所属组织ID",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建岗位成功",
"data": {
"id": 1,
"code": "POS0001",
"name": "产品经理",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建岗位失败",
"data": null
}
}
/api/positions/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 岗位ID |
{
"name": "string|必填,岗位名称",
"organizationId": "string|可选,所属组织ID",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新岗位成功",
"data": {
"id": 1,
"code": "POS0001",
"name": "产品经理",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新岗位失败",
"data": null
}
}
/api/positions/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 岗位ID |
{
"success": {
"code": "0000",
"message": "删除岗位成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除岗位失败",
"data": null
}
}
/api/positions/{id}/users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 岗位ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "POS0001",
"name": "产品经理",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "岗位不存在",
"data": null
}
}
/api/positions/{id}/users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 岗位ID |
{
"name": "string|必填,岗位名称",
"organizationId": "string|可选,所属组织ID",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新岗位成功",
"data": {
"id": 1,
"code": "POS0001",
"name": "产品经理",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新岗位失败",
"data": null
}
}
模块标识: staff | 接口数量: 5
/api/staff
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| organizationId | 否 | string | - | 所属组织筛选 |
| name | 否 | string | - | 姓名关键词 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "STA0001",
"name": "张三",
"phone": "13800000001",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/staff/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 职员ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "STA0001",
"name": "张三",
"phone": "13800000001",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "职员不存在",
"data": null
}
}
/api/staff
{
"name": "string|必填,职员姓名",
"phone": "string|必填,手机号",
"organizationId": "string|必填,所属组织ID",
"status": "number|可选,状态:1-在职,0-离职"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建职员成功",
"data": {
"id": 1,
"code": "STA0001",
"name": "张三",
"phone": "13800000001",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建职员失败",
"data": null
}
}
/api/staff/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 职员ID |
{
"name": "string|必填,职员姓名",
"phone": "string|必填,手机号",
"organizationId": "string|必填,所属组织ID",
"status": "number|可选,状态:1-在职,0-离职"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新职员成功",
"data": {
"id": 1,
"code": "STA0001",
"name": "张三",
"phone": "13800000001",
"organizationId": "ORG0001",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新职员失败",
"data": null
}
}
/api/staff/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 职员ID |
{
"success": {
"code": "0000",
"message": "删除职员成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除职员失败",
"data": null
}
}
模块标识: role | 接口数量: 7
/api/roles
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 角色名称关键词 |
| code | 否 | string | - | 角色编码 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "ROLE0001",
"name": "系统管理员",
"status": 1,
"permissions": [
"PERM0001"
],
"resources": [
"RES0001"
]
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/roles/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 角色ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "ROLE0001",
"name": "系统管理员",
"status": 1,
"permissions": [
"PERM0001"
],
"resources": [
"RES0001"
]
}
},
"failure": {
"code": "4040",
"message": "角色不存在",
"data": null
}
}
/api/roles
{
"name": "string|必填,角色名称",
"code": "string|必填,角色编码,唯一",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建角色成功",
"data": {
"id": 1,
"code": "ROLE0001",
"name": "系统管理员",
"status": 1,
"permissions": [
"PERM0001"
],
"resources": [
"RES0001"
]
}
},
"failure": {
"code": "4000",
"message": "创建角色失败",
"data": null
}
}
/api/roles/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 角色ID |
{
"name": "string|必填,角色名称",
"code": "string|必填,角色编码,唯一",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新角色成功",
"data": {
"id": 1,
"code": "ROLE0001",
"name": "系统管理员",
"status": 1,
"permissions": [
"PERM0001"
],
"resources": [
"RES0001"
]
}
},
"failure": {
"code": "4000",
"message": "更新角色失败",
"data": null
}
}
/api/roles/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 角色ID |
{
"success": {
"code": "0000",
"message": "删除角色成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除角色失败",
"data": null
}
}
/api/roles/{id}/permissions
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 角色ID |
{
"name": "string|必填,角色名称",
"code": "string|必填,角色编码,唯一",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新角色成功",
"data": {
"id": 1,
"code": "ROLE0001",
"name": "系统管理员",
"status": 1,
"permissions": [
"PERM0001"
],
"resources": [
"RES0001"
]
}
},
"failure": {
"code": "4000",
"message": "更新角色失败",
"data": null
}
}
/api/roles/{id}/resources
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 角色ID |
{
"name": "string|必填,角色名称",
"code": "string|必填,角色编码,唯一",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新角色成功",
"data": {
"id": 1,
"code": "ROLE0001",
"name": "系统管理员",
"status": 1,
"permissions": [
"PERM0001"
],
"resources": [
"RES0001"
]
}
},
"failure": {
"code": "4000",
"message": "更新角色失败",
"data": null
}
}
模块标识: permission | 接口数量: 5
/api/permissions
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 权限名称关键词 |
| code | 否 | string | - | 权限编码 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "PERM0001",
"name": "用户管理",
"type": "menu",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/permissions/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 权限ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "PERM0001",
"name": "用户管理",
"type": "menu",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "权限不存在",
"data": null
}
}
/api/permissions
{
"name": "string|必填,权限名称",
"code": "string|必填,权限编码,唯一",
"type": "string|可选,权限类型,例如menu/button",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建权限成功",
"data": {
"id": 1,
"code": "PERM0001",
"name": "用户管理",
"type": "menu",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建权限失败",
"data": null
}
}
/api/permissions/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 权限ID |
{
"name": "string|必填,权限名称",
"code": "string|必填,权限编码,唯一",
"type": "string|可选,权限类型,例如menu/button",
"status": "number|可选,状态:1-启用,0-禁用"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新权限成功",
"data": {
"id": 1,
"code": "PERM0001",
"name": "用户管理",
"type": "menu",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新权限失败",
"data": null
}
}
/api/permissions/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 权限ID |
{
"success": {
"code": "0000",
"message": "删除权限成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除权限失败",
"data": null
}
}
模块标识: resource | 接口数量: 6
/api/resources/active
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| systemId | 否 | string | - | 所属系统ID,用于过滤资源所属系统。不传则返回所有系统的有效资源 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": [
{
"id": 1,
"code": "RES0001",
"name": "用户列表",
"title": "用户列表",
"systemId": "系统ID",
"systemName": "权限管理系统",
"type": "page",
"url": "/users",
"status": 1,
"parentId": null,
"orderNum": 1,
"createTime": "2025-01-01T10:00:00.000Z"
},
{
"id": 2,
"code": "RES0002",
"name": "角色管理",
"title": "角色管理",
"systemId": "系统ID",
"systemName": "权限管理系统",
"type": "page",
"url": "/roles",
"status": 1,
"parentId": null,
"orderNum": 2,
"createTime": "2025-01-01T11:00:00.000Z"
}
]
}
}
/api/resources
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 资源名称关键词 |
| code | 否 | string | - | 资源编码 |
| type | 否 | string | - | 资源类型 |
| systemId | 否 | string | - | 所属系统ID,用于过滤资源所属系统 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "RES0001",
"name": "用户列表",
"systemId": "AUTH",
"systemName": "权限管理系统",
"type": "page",
"url": "/users",
"status": 1,
"parentId": null
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/resources/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 资源ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "RES0001",
"name": "用户列表",
"systemId": "AUTH",
"systemName": "权限管理系统",
"type": "page",
"url": "/users",
"status": 1,
"parentId": null
}
},
"failure": {
"code": "4040",
"message": "资源不存在",
"data": null
}
}
/api/resources
{
"name": "string|必填,资源名称",
"code": "string|必填,资源编码,唯一",
"systemId": "string|必填,所属系统ID,用于绑定资源所属系统",
"type": "string|可选,资源类型,例如page/api/button",
"url": "string|可选,资源URL,用于路由或接口地址",
"status": "number|可选,状态:1-启用,0-禁用",
"parentId": "string|可选,父级资源ID,用于构建资源树状结构,不传或传空则为根节点"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建资源成功",
"data": {
"id": 1,
"code": "RES0001",
"name": "用户列表",
"systemId": "AUTH",
"systemName": "权限管理系统",
"type": "page",
"url": "/users",
"status": 1,
"parentId": null
}
},
"failure": {
"code": "4000",
"message": "创建资源失败",
"data": null
}
}
/api/resources/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 资源ID |
{
"name": "string|必填,资源名称",
"code": "string|必填,资源编码,唯一",
"systemId": "string|可选,所属系统ID,不传则保持原值",
"type": "string|可选,资源类型,例如page/api/button",
"url": "string|可选,资源URL,用于路由或接口地址",
"status": "number|可选,状态:1-启用,0-禁用",
"parentId": "string|可选,父级资源ID,用于构建资源树状结构,不传或传空则为根节点"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新资源成功",
"data": {
"id": 1,
"code": "RES0001",
"name": "用户列表",
"systemId": "AUTH",
"systemName": "权限管理系统",
"type": "page",
"url": "/users",
"status": 1,
"parentId": null
}
},
"failure": {
"code": "4000",
"message": "更新资源失败",
"data": null
}
}
/api/resources/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 资源ID |
{
"success": {
"code": "0000",
"message": "删除资源成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除资源失败",
"data": null
}
}
模块标识: customer | 接口数量: 5
/api/customers
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 客户名称关键词 |
| status | 否 | number | - | 状态过滤 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "CUS0001",
"name": "示例客户",
"contactName": "李四",
"contactPhone": "021-88888888",
"status": 1
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/customers/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 客户ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "CUS0001",
"name": "示例客户",
"contactName": "李四",
"contactPhone": "021-88888888",
"status": 1
}
},
"failure": {
"code": "4040",
"message": "客户不存在",
"data": null
}
}
/api/customers
{
"name": "string|必填,客户名称",
"contactName": "string|可选,联系人姓名",
"contactPhone": "string|可选,联系人电话",
"status": "number|可选,状态:1-合作中,0-已终止"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建客户成功",
"data": {
"id": 1,
"code": "CUS0001",
"name": "示例客户",
"contactName": "李四",
"contactPhone": "021-88888888",
"status": 1
}
},
"failure": {
"code": "4000",
"message": "创建客户失败",
"data": null
}
}
/api/customers/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 客户ID |
{
"name": "string|必填,客户名称",
"contactName": "string|可选,联系人姓名",
"contactPhone": "string|可选,联系人电话",
"status": "number|可选,状态:1-合作中,0-已终止"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新客户成功",
"data": {
"id": 1,
"code": "CUS0001",
"name": "示例客户",
"contactName": "李四",
"contactPhone": "021-88888888",
"status": 1
}
},
"failure": {
"code": "4000",
"message": "更新客户失败",
"data": null
}
}
/api/customers/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 客户ID |
{
"success": {
"code": "0000",
"message": "删除客户成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除客户失败",
"data": null
}
}
模块标识: member | 接口数量: 7
/api/members/valid-list
暂无请求参数定义
{
"success": {
"code": "0000",
"message": "操作成功",
"data": [
{
"id": "xxx",
"_id": "xxx",
"code": "MEM0001",
"name": "会员套餐1",
"description": "套餐描述"
},
{
"id": "yyy",
"_id": "yyy",
"code": "MEM0002",
"name": "会员套餐2",
"description": "套餐描述"
}
],
"timestamp": "2025-01-21T10:00:00.000Z"
},
"failure": {
"code": "4000",
"message": "获取失败",
"data": null
}
}
/api/members
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 套餐名称关键词 |
| memberTypeId | 否 | string | - | 会员类型ID(会员类型管理记录的_id) |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "MEM0001",
"name": "会员套餐名称",
"memberTypeId": "xxx",
"price": "99.99",
"validityDays": 30,
"description": "套餐描述",
"status": 1
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/members/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 会员套餐ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "MEM0001",
"name": "会员套餐名称",
"memberTypeId": "xxx",
"price": "99.99",
"validityDays": 30,
"description": "套餐描述",
"status": 1
}
},
"failure": {
"code": "4040",
"message": "会员套餐不存在",
"data": null
}
}
/api/members
{
"name": "string|必填,套餐名称",
"memberTypeId": "string|可选,会员类型ID(会员类型管理记录的_id),如果提供会校验会员类型是否存在",
"price": "string|可选,价格(两位小数,如:99.99)",
"validityDays": "number|可选,有效期天数(最小值为1)",
"description": "string|可选,套餐描述",
"status": "number|可选,状态:1-有效,0-无效,默认0"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建会员成功",
"data": {
"id": 1,
"code": "MEM0001",
"name": "会员套餐名称",
"memberTypeId": "xxx",
"price": "99.99",
"validityDays": 30,
"description": "套餐描述",
"status": 0
}
},
"failure": {
"code": "4000",
"message": "关联的会员类型不存在",
"data": null
}
}
/api/members/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 会员套餐ID |
{
"name": "string|必填,套餐名称",
"memberTypeId": "string|可选,会员类型ID(会员类型管理记录的_id),如果提供会校验会员类型是否存在",
"price": "string|可选,价格(两位小数,如:99.99)",
"validityDays": "number|可选,有效期天数(最小值为1)",
"description": "string|可选,套餐描述",
"status": "number|可选,状态:1-有效,0-无效,默认0"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新会员成功",
"data": {
"id": 1,
"code": "MEM0001",
"name": "会员套餐名称",
"memberTypeId": "xxx",
"price": "99.99",
"validityDays": 30,
"description": "套餐描述",
"status": 1
}
},
"failure": {
"code": "4000",
"message": "关联的会员类型不存在",
"data": null
}
}
/api/members/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 会员套餐ID |
{
"success": {
"code": "0000",
"message": "删除会员成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除会员失败",
"data": null
}
}
/api/members/{id}/status
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 会员套餐ID |
{
"status": "number|必填,状态:1-有效,0-无效"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "状态更新成功",
"data": {
"id": 1,
"code": "MEM0001",
"name": "会员套餐名称",
"memberTypeId": "xxx",
"price": "99.99",
"validityDays": 30,
"description": "套餐描述",
"status": 1,
"updateTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "会员套餐不存在",
"data": null
}
}
模块标识: memberType | 接口数量: 6
/api/members/types/valid-list
暂无请求参数定义
{
"success": {
"code": "0000",
"message": "操作成功",
"data": [
{
"id": "xxx",
"_id": "xxx",
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型"
},
{
"id": "yyy",
"_id": "yyy",
"code": "GOLD",
"name": "黄金会员",
"description": "黄金会员类型"
}
],
"timestamp": "2025-01-21T10:00:00.000Z"
},
"failure": {
"code": "4000",
"message": "获取失败",
"data": null
}
}
/api/members/types
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 会员类型名称关键词 |
| code | 否 | string | - | 会员类型编码关键词 |
| status | 否 | number | - | 状态过滤:1-有效,0-无效 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z",
"updateTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10,
"totalPages": 10
}
}
}
/api/members/types
{
"name": "string|必填,会员类型名称",
"code": "string|必填,会员类型编码",
"status": "number|可选,状态:1-有效,0-无效,默认1",
"description": "string|可选,描述信息"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建成功",
"data": {
"id": 1,
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "会员类型编码已存在",
"data": null
}
}
/api/members/types/{typeId}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| typeId | 是 | string | - | 会员类型ID |
{
"name": "string|可选,会员类型名称",
"code": "string|可选,会员类型编码",
"status": "number|可选,状态:1-有效,0-无效",
"description": "string|可选,描述信息"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新成功",
"data": {
"id": 1,
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型",
"status": 1,
"updateTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "会员类型编码已存在",
"data": null
}
}
/api/members/types/{typeId}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| typeId | 是 | string | - | 会员类型ID |
{
"success": {
"code": "0000",
"message": "删除成功",
"data": null
},
"failure": {
"code": "4000",
"message": "会员类型仍与会员功能关联,请先解除关联",
"data": null
}
}
/api/members/types/{typeId}/status
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| typeId | 是 | string | - | 会员类型ID |
{
"status": "number|必填,状态:1-有效,0-无效"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "状态更新成功",
"data": {
"id": 1,
"code": "VIP",
"name": "VIP会员",
"status": 1,
"updateTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "会员类型不存在",
"data": null
}
}
模块标识: statelessMember | 接口数量: 6
/api/stateless-members
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 会员名称关键词 |
| code | 否 | string | - | 会员编码 |
| memberTypeId | 否 | string | - | 按会员类型ID筛选(会员类型管理记录的_id) |
| status | 否 | number | - | 状态过滤 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "SM0001",
"name": "开放平台会员",
"secretKey": "sk-xxx",
"memberTypeId": "xxx",
"status": 1
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/stateless-members/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 无状态会员ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "SM0001",
"name": "开放平台会员",
"secretKey": "sk-xxx",
"memberTypeId": "xxx",
"status": 1
}
},
"failure": {
"code": "4040",
"message": "无状态会员不存在",
"data": null
}
}
/api/stateless-members
{
"name": "string|必填,会员名称",
"memberTypeId": "string|可选,会员类型ID(会员类型管理记录的_id),如果提供会校验会员类型是否存在",
"effectiveDate": "string|必填,生效日期",
"validityDays": "number|必填,有效期天数(最小7天)",
"firstEffectiveDate": "string|可选,首次生效日期",
"status": "number|可选,状态:1-有效,0-无效,默认0"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建无状态会员成功",
"data": {
"id": 1,
"code": "SM0001",
"name": "开放平台会员",
"secretKey": "sk-xxx",
"memberTypeId": "xxx",
"status": 1
}
},
"failure": {
"code": "4000",
"message": "关联的会员类型不存在",
"data": null
}
}
/api/stateless-members/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 无状态会员ID |
{
"name": "string|可选,会员名称",
"memberTypeId": "string|可选,会员类型ID(会员类型管理记录的_id),如果提供会校验会员类型是否存在",
"effectiveDate": "string|可选,生效日期",
"validityDays": "number|可选,有效期天数(最小7天)",
"firstEffectiveDate": "string|可选,首次生效日期",
"status": "number|可选,状态:1-有效,0-无效"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新无状态会员成功",
"data": {
"id": 1,
"code": "SM0001",
"name": "开放平台会员",
"secretKey": "sk-xxx",
"memberTypeId": "xxx",
"status": 1
}
},
"failure": {
"code": "4000",
"message": "关联的会员类型不存在",
"data": null
}
}
/api/stateless-members/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 无状态会员ID |
{
"success": {
"code": "0000",
"message": "删除无状态会员成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除无状态会员失败",
"data": null
}
}
/api/stateless-members/{id}/status
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 无状态会员ID |
{
"status": "number|必填,状态:1-有效,0-无效"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "状态更新成功",
"data": {
"id": 1,
"code": "SM0001",
"name": "开放平台会员",
"secretKey": "sk-xxx",
"memberTypeId": "xxx",
"effectiveDate": "2025-01-01",
"validityDays": 365,
"firstEffectiveDate": "2025-01-01",
"status": 1,
"updateTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "无状态会员不存在",
"data": null
}
}
模块标识: memberUser | 接口数量: 5
/api/member-users
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| userId | 否 | string | - | 按客户端用户筛选 |
| memberId | 否 | string | - | 按会员ID筛选(会员管理记录的_id) |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "MU0001",
"userId": "CU0001",
"memberId": "xxx",
"status": 1
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/member-users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 会员用户ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"code": "MU0001",
"userId": "CU0001",
"memberId": "xxx",
"status": 1
}
},
"failure": {
"code": "4040",
"message": "会员用户不存在",
"data": null
}
}
/api/member-users
{
"userId": "string|可选,绑定的客户端用户ID",
"memberId": "string|可选,会员ID(会员管理记录的_id),如果提供会校验会员是否存在且有效",
"status": "number|可选,状态:1-有效,0-无效"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建会员用户成功",
"data": {
"id": 1,
"code": "MU0001",
"userId": "CU0001",
"memberId": "xxx",
"status": 1
}
},
"failure": {
"code": "4000",
"message": "关联的会员不存在",
"data": null
}
}
/api/member-users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 会员用户ID |
{
"userId": "string|可选,绑定的客户端用户ID",
"memberId": "string|可选,会员ID(会员管理记录的_id),如果提供会校验会员是否存在且有效",
"status": "number|可选,状态:1-有效,0-无效"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新会员用户成功",
"data": {
"id": 1,
"code": "MU0001",
"userId": "CU0001",
"memberId": "xxx",
"status": 1
}
},
"failure": {
"code": "4000",
"message": "关联的会员不存在",
"data": null
}
}
/api/member-users/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 会员用户ID |
{
"success": {
"code": "0000",
"message": "删除会员用户成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除会员用户失败",
"data": null
}
}
模块标识: whitelist | 接口数量: 5
/api/whitelists
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| userId | 否 | string | - | 按用户筛选 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"userId": "USER0001",
"reason": "业务合作",
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/whitelists/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 白名单ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"userId": "USER0001",
"reason": "业务合作",
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "白名单不存在",
"data": null
}
}
/api/whitelists
{
"userId": "string|必填,用户ID",
"reason": "string|可选,加入白名单原因"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建白名单成功",
"data": {
"id": 1,
"userId": "USER0001",
"reason": "业务合作",
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建白名单失败",
"data": null
}
}
/api/whitelists/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 白名单ID |
{
"userId": "string|必填,用户ID",
"reason": "string|可选,加入白名单原因"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新白名单成功",
"data": {
"id": 1,
"userId": "USER0001",
"reason": "业务合作",
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新白名单失败",
"data": null
}
}
/api/whitelists/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 白名单ID |
{
"success": {
"code": "0000",
"message": "删除白名单成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除白名单失败",
"data": null
}
}
模块标识: blacklist | 接口数量: 5
/api/blacklists
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| userId | 否 | string | - | 按用户筛选 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"userId": "USER0002",
"reason": "恶意操作",
"createTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10
}
}
}
/api/blacklists/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 黑名单ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"id": 1,
"userId": "USER0002",
"reason": "恶意操作",
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "黑名单不存在",
"data": null
}
}
/api/blacklists
{
"userId": "string|必填,用户ID",
"reason": "string|可选,加入黑名单原因"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建黑名单成功",
"data": {
"id": 1,
"userId": "USER0002",
"reason": "恶意操作",
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "创建黑名单失败",
"data": null
}
}
/api/blacklists/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 黑名单ID |
{
"userId": "string|必填,用户ID",
"reason": "string|可选,加入黑名单原因"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新黑名单成功",
"data": {
"id": 1,
"userId": "USER0002",
"reason": "恶意操作",
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "更新黑名单失败",
"data": null
}
}
/api/blacklists/{id}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| id | 是 | string | - | 黑名单ID |
{
"success": {
"code": "0000",
"message": "删除黑名单成功",
"data": {
"result": true
}
},
"failure": {
"code": "4000",
"message": "删除黑名单失败",
"data": null
}
}
模块标识: securitySystem | 接口数量: 2
/api/security/systems/active
暂无请求参数定义
{
"success": {
"code": "0000",
"message": "获取成功",
"data": [
{
"id": 1,
"code": "AUTH",
"name": "权限管理系统",
"status": 1,
"description": "权限管理系统描述",
"createTime": "2025-01-01T10:00:00.000Z",
"updateTime": "2025-01-01T10:00:00.000Z"
},
{
"id": 2,
"code": "ORDER",
"name": "订单管理系统",
"status": 1,
"description": "订单管理系统描述",
"createTime": "2025-01-01T11:00:00.000Z",
"updateTime": "2025-01-01T11:00:00.000Z"
}
]
}
}
/api/security/systems/{systemId}/modules/active
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| systemId | 是 | string | - | 系统ID |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": [
{
"id": 1,
"code": "AUTH_USER",
"name": "用户管理模块",
"systemId": "系统ID",
"systemName": "权限管理系统",
"status": 1,
"description": "用户管理模块描述",
"createTime": "2025-01-01T10:00:00.000Z",
"updateTime": "2025-01-01T10:00:00.000Z"
},
{
"id": 2,
"code": "AUTH_ROLE",
"name": "角色管理模块",
"systemId": "系统ID",
"systemName": "权限管理系统",
"status": 1,
"description": "角色管理模块描述",
"createTime": "2025-01-01T11:00:00.000Z",
"updateTime": "2025-01-01T11:00:00.000Z"
}
]
},
"failure": {
"code": "4040",
"message": "系统不存在",
"data": null
}
}
模块标识: openapi | 接口数量: 11
/openapi/stateless-members/permissions/check
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
会员访问令牌,格式为 Bearer TOKEN |
{
"systemCode": "string|必填,目标系统编码,如 AUTH",
"moduleCode": "string|必填,目标系统模块编码,如 AUTH_USER"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "权限校验通过",
"data": {
"member": {
"code": "SM000001",
"type": "VIP"
},
"system": {
"code": "AUTH",
"name": "权限管理系统"
},
"module": {
"code": "AUTH_USER",
"name": "用户管理模块"
}
}
},
"failure": {
"code": "1008",
"message": "系统模块未开放访问",
"data": null
}
}
/openapi/stateless-members/modules/limits/check
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
会员访问令牌,格式为 Bearer TOKEN |
{
"systemCode": "string|必填,目标系统编码",
"moduleCode": "string|必填,目标模块编码",
"currentCount": "number|必填,当前已使用次数"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "权限及额度校验通过",
"data": {
"member": {
"code": "SM000001",
"type": "VIP"
},
"system": {
"code": "AUTH",
"name": "权限管理系统"
},
"module": {
"code": "AUTH_USER",
"name": "用户管理模块"
},
"limit": {
"value": 100,
"current": 80,
"remaining": 20
}
}
},
"failure": {
"code": "1010",
"message": "当前模块的使用已达到上限100",
"data": {
"limitValue": 100
}
}
}
/openapi/memberships/activate
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
客户端登录令牌,格式为 Bearer TOKEN |
{
"memberType": "string|必填,会员类型编码或名称,如 VIP",
"orderNo": "string|必填,已支付订单号"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "会员开通成功",
"data": {
"clientUser": {
"id": "GplqNHbkcmcFa0sj",
"code": "CU000009",
"phone": "18347432461",
"name": "Smkello"
},
"memberUser": {
"id": "toiUHzFoO1xtmSkI",
"memberType": "VIP"
},
"order": {
"orderNo": "ORD-20250115-0010",
"status": "COMPLETED"
}
}
},
"failure": {
"code": "1107",
"message": "订单尚未支付或已失效",
"data": null
}
}
/openapi/memberships/register
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
注册令牌,服务端提前生成,格式为 Bearer TOKEN |
| X-Site | 是 | string | - | 所属站点标识,用户将注册到该站点 |
{
"success": {
"code": "0000",
"message": "会员注册成功",
"data": {
"accountType": "company",
"user": {
"id": "BAKj1wKp7etrmSAT",
"code": "USER000001",
"name": "企业管理员",
"title": "企业管理员",
"phone": "13800138000",
"email": "admin@example.com",
"phonePrefix": "+86",
"individualism": true,
"status": 1,
"roles": [],
"effectiveDate": "2025-01-21",
"expiryDate": null,
"createTime": "2025-01-21T10:00:00.000Z",
"updateTime": "2025-01-21T10:00:00.000Z",
"creator": "13800138000",
"updater": "13800138000"
},
"organization": {
"code": "ORG000001",
"name": "靖苒数字"
},
"site": {
"id": "site-id",
"key": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890-ABCDEF12",
"name": "个人站点",
"createTime": "2025-01-21T10:00:00.000Z"
}
}
},
"failure": {
"code": "1203",
"message": "公司信用代码已注册",
"data": null
}
}
/openapi/memberships/login
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
登录令牌,包含手机号、密码和同意协议信息(散客账号必填),格式为 Bearer TOKEN。令牌 payload 应包含:phone(手机号)、password(密码)、agreeTerms(同意协议,散客账号必填且必须为 true) |
| X-System-Code | 是 | string | - | 系统编码。用于指定当前登录的业务系统(例如 AUTH_MANAGEMENT、CONTENT_MANAGEMENT)。当系统不支持时将返回“登录用户不支持当前系统,可联系管理员处理”。 |
{
"code": "0000",
"message": "登录成功",
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "BAKj1wKp7etrmSAT",
"code": "USER000001",
"username": "企业管理员",
"phone": "13800138000",
"email": "admin@example.com",
"individualism": true,
"status": 1,
"createTime": "2025-01-21T10:00:00.000Z",
"accountType": "user",
"type": "普通用户"
},
"companyName": "靖苒数字",
"site": {
"id": "MNFIOHH6QOA3kg0z",
"key": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890-ABCDEF12",
"name": "个人站点",
"createTime": "2025-01-21T10:00:00.000Z"
}
}
}
{
"code": "0000",
"message": "登录成功",
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "BAKj1wKp7etrmSAT",
"code": "USER000001",
"username": "企业管理员",
"phone": "13800138000",
"email": "admin@example.com",
"individualism": false,
"status": 1,
"createTime": "2025-01-21T10:00:00.000Z",
"accountType": "user",
"type": "普通用户"
},
"companyName": "靖苒数字",
"site": null
}
}
/openapi/memberships/login/verify
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
登录接口返回的访问令牌,格式为 Bearer TOKEN |
| X-System-Code | 是 | string | - | 系统编码。用于指定当前登录的业务系统(例如 AUTH_MANAGEMENT、CONTENT_MANAGEMENT)。当系统不支持时将返回“登录用户不支持当前系统,可联系管理员处理”。 |
{
"success": {
"code": "0000",
"message": "登录令牌校验成功",
"data": {
"phone": "13800138000",
"id": "USER000001",
"_id": "MNFIOHH6QOA3kg0z"
}
},
"failure": {
"code": "1300",
"message": "登录令牌无效或已过期",
"data": null
}
}
/openapi/permissions/resource-check
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
登录接口返回的访问令牌,格式为 Bearer TOKEN |
| X-Site | 否 | string | - | 站点标识。用于切换站点和对应的数据库上下文。如果用户有多个可用站点,可通过此 header 切换。 |
{
"systemCode": "string|必填,目标系统编码",
"apiName": "string|必填,接口标识(可使用资源 code、name、title 或 URL)",
"requiredPermissions": "string[]|选填,需要同时具备的权限编码数组"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "资源权限校验成功",
"data": {
"accessGranted": true,
"user": {
"id": "BAKj1wKp7etrmSAT",
"phone": "13800138000",
"type": "user"
},
"system": {
"code": "AUTH",
"name": "权限管理系统"
},
"resource": {
"code": "API_CUSTOMER_DELETE",
"url": "/api/customers/:id",
"type": "api"
},
"checkedPermissions": [
"CUSTOMER_DELETE"
]
}
},
"failure": {
"code": "1502",
"message": "缺少必要权限: CUSTOMER_DELETE",
"data": null
}
}
/openapi/permissions/check
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 是 | string | Bearer {token} |
访问令牌,支持系统用户与客户端用户,格式为 Bearer TOKEN |
| X-Site | 否 | string | - | 站点标识。用于切换站点和对应的数据库上下文。如果用户有多个可用站点,可通过此 header 切换。 |
{
"systemCode": "string|必填,要校验的系统编码"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "权限校验成功",
"data": {
"user": {
"id": "MNFIOHH6QOA3kg0z",
"code": "USER000001",
"username": "企业管理员",
"type": "user"
},
"companyName": "靖苒数字",
"system": {
"code": "AUTH",
"name": "权限管理系统"
},
"resources": [
{
"id": "RES001",
"code": "RES001",
"name": "内容管理",
"title": "内容管理",
"type": "page",
"url": "/content",
"parentId": null,
"orderNum": 1,
"children": [
{
"id": "RES002",
"code": "RES002",
"name": "文章管理",
"title": "文章管理",
"type": "page",
"url": "/content/articles",
"parentId": "RES001",
"orderNum": 1,
"children": []
},
{
"id": "RES003",
"code": "RES003",
"name": "分类管理",
"title": "分类管理",
"type": "page",
"url": "/content/categories",
"parentId": "RES001",
"orderNum": 2,
"children": []
}
]
}
],
"resourcesByType": {
"page": [
{
"id": "RES001",
"code": "RES001",
"name": "内容管理",
"title": "内容管理",
"type": "page",
"url": "/content",
"parentId": null,
"orderNum": 1,
"children": [
{
"id": "RES002",
"code": "RES002",
"name": "文章管理",
"title": "文章管理",
"type": "page",
"url": "/content/articles",
"parentId": "RES001",
"orderNum": 1,
"children": []
},
{
"id": "RES003",
"code": "RES003",
"name": "分类管理",
"title": "分类管理",
"type": "page",
"url": "/content/categories",
"parentId": "RES001",
"orderNum": 2,
"children": []
}
]
}
],
"button": [
{
"id": "RES004",
"code": "RES004",
"name": "新增按钮",
"title": "新增按钮",
"type": "button",
"url": "/api/content/create",
"parentId": null,
"orderNum": 1,
"children": []
}
]
},
"site": {
"id": "site-id",
"key": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890-ABCDEF12",
"name": "个人站点",
"createTime": "2025-01-21T10:00:00.000Z"
}
}
},
"failure": {
"code": "1402",
"message": "系统未开放或已停用",
"data": null
}
}
/openapi/stateless-members/activate
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| X-Member-Key | 是 | string | - | 会员密钥令牌,通过混合JWT加密 |
| X-System-Code | 是 | string | - | 系统编码,用于判断会员类型是否支持当前系统 |
| X-Site | 是 | string | - | 站点标识 |
{
"success": {
"code": "0000",
"message": "激活成功",
"data": {
"keyToken": "新的密钥令牌(混合JWT加密)",
"member": {
"id": "xxx",
"code": "SM0001",
"name": "无状态会员",
"memberTypeId": "yyy",
"effectiveDate": "2025-01-01",
"validityDays": 365
}
}
},
"failure": {
"code": "1504",
"message": "您绑定的会员码无效",
"data": null
},
"failureExpired": {
"code": "1501",
"message": "激活已超时,请重新绑定激活",
"data": null
}
}
/openapi/stateless-members/check
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| X-Member-Key | 是 | string | - | 会员密钥令牌,通过混合JWT加密 |
| X-System-Code | 是 | string | - | 系统编码,用于判断会员类型是否支持当前系统 |
| X-Site | 是 | string | - | 站点标识 |
{
"success": {
"code": "0000",
"message": "校验通过",
"data": {
"valid": true,
"remainingDays": 30,
"member": {
"id": "xxx",
"code": "SM0001",
"name": "无状态会员",
"memberTypeId": "yyy",
"effectiveDate": "2025-01-01",
"validityDays": 365
}
}
},
"failure": {
"code": "1506",
"message": "您绑定的会员无效",
"data": null
},
"failureExpired": {
"code": "1505",
"message": "传入的会员需要重新绑定",
"data": null
},
"failureMemberExpired": {
"code": "1507",
"message": "会员已过期",
"data": null
}
}
/openapi/stateless-members/functionCheck
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| X-Member-Key | 是 | string | - | 会员密钥令牌,通过混合JWT加密 |
| X-System-Code | 是 | string | - | 系统编码,用于判断会员类型是否支持当前系统 |
| X-Function | 是 | string | - | 功能代码,用于检查会员功能模块中是否有该功能 |
| X-Site | 是 | string | - | 站点标识 |
{
"success": {
"code": "0000",
"message": "校验通过",
"data": {
"valid": true,
"remainingDays": 30,
"member": {
"id": "xxx",
"code": "SM0001",
"name": "无状态会员",
"memberTypeId": "yyy",
"effectiveDate": "2025-01-01",
"validityDays": 365
},
"function": {
"code": "FUNC001",
"name": "功能名称",
"type": "Resource"
}
}
},
"failure": {
"code": "1508",
"message": "当前会员不支持当前功能",
"data": null
}
}