正在显示
22 个修改的文件
包含
341 行增加
和
2 行删除
allied-creation-gateway/api/http/roles.yaml
0 → 100644
1 | +version: v1 | ||
2 | +kind: HttpApi | ||
3 | +metadata: | ||
4 | + service: roles | ||
5 | + path: /roles | ||
6 | + endpoints: | ||
7 | + - method: roleAdd | ||
8 | + route: | ||
9 | + post: / | ||
10 | + - method: roleUpdate | ||
11 | + route: | ||
12 | + put: /{Id} | ||
13 | + - method: roleList | ||
14 | + route: | ||
15 | + post: /search | ||
16 | + - method: roleGet | ||
17 | + route: | ||
18 | + get: /{Id} | ||
19 | + - method: roleUserInfo | ||
20 | + route: | ||
21 | + get: /role-user/{Id} | ||
22 | + - method: roleUserAdd | ||
23 | + route: | ||
24 | + post: /role-user | ||
25 | + - method: roleUserDelete | ||
26 | + route: | ||
27 | + delete: /role-user | ||
28 | + - method: roleUserBeforeEdit | ||
29 | + route: | ||
30 | + get: /role-user/before-edit | ||
31 | + - method: roleMenuBeforeEdit | ||
32 | + route: | ||
33 | + get: /role-menu/before-edit | ||
34 | + - method: roleMenuEdit | ||
35 | + route: | ||
36 | + put: /role-menu/{Id} |
1 | +version: v1 | ||
2 | +kind: Schema | ||
3 | +metadata: | ||
4 | + name: roleDetail | ||
5 | + description: 角色详细数据 | ||
6 | + attributes: | ||
7 | + - ref: roleId | ||
8 | + required: true | ||
9 | + - ref: companyId | ||
10 | + required: true | ||
11 | + - ref: orgId | ||
12 | + required: true | ||
13 | + - ref: orgName | ||
14 | + required: true | ||
15 | + - ref: roleName | ||
16 | + required: true | ||
17 | + - ref: desc | ||
18 | + required: true | ||
19 | + - name: roleMenu | ||
20 | + description: 角色拥有的权限菜单 | ||
21 | + type: | ||
22 | + array: roleMenu | ||
23 | + - name: roleUser | ||
24 | + description: 关联的用户 | ||
25 | + type: | ||
26 | + array: roleUser |
1 | +version: v1 | ||
2 | +kind: Schema | ||
3 | +metadata: | ||
4 | + name: role | ||
5 | + description: 角色 (base) | ||
6 | + attributes: | ||
7 | + - ref: roleId | ||
8 | + required: true | ||
9 | + - ref: orgId | ||
10 | + required: true | ||
11 | + - ref: orgName | ||
12 | + required: true | ||
13 | + - ref: roleName | ||
14 | + required: true | ||
15 | + - ref: desc | ||
16 | + required: true | ||
17 | + - ref: createdAt | ||
18 | + required: true | ||
19 | + - ref: updatedAt | ||
20 | + required: true |
1 | +version: v1 | ||
2 | +kind: Schema | ||
3 | +metadata: | ||
4 | + name: roleUser | ||
5 | + description: 角色下关联的用户 | ||
6 | + attributes: | ||
7 | + - ref: usersId | ||
8 | + required: true | ||
9 | + - ref: usersCode | ||
10 | + required: true | ||
11 | + - ref: usersName | ||
12 | + required: true | ||
13 | + - ref: orgId | ||
14 | + required: true | ||
15 | + - ref: orgName | ||
16 | + required: true |
1 | +version: v1 | ||
2 | +kind: Schema | ||
3 | +metadata: | ||
4 | + name: roleUserInfo | ||
5 | + description: 角色下关联用户的详情 | ||
6 | + attributes: | ||
7 | + - ref: roleId | ||
8 | + required: true | ||
9 | + - ref: roleName | ||
10 | + required: true | ||
11 | + - ref: desc | ||
12 | + required: true | ||
13 | + - name: roleUser | ||
14 | + description: 关联的用户 | ||
15 | + type: | ||
16 | + array: roleUser | ||
17 | + - name: notInRoleUser | ||
18 | + description: 未关联的用户列表 | ||
19 | + type: | ||
20 | + array: roleUser |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: roleList | ||
5 | + type: query | ||
6 | + description: 返回role列表 | ||
7 | + payload: | ||
8 | + - ref: offset | ||
9 | + required: true | ||
10 | + - ref: limit | ||
11 | + required: true | ||
12 | + result: | ||
13 | + - ref: count | ||
14 | + required: true | ||
15 | + - name: roles | ||
16 | + type: | ||
17 | + array: role | ||
18 | + required: true |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: roleMenuBeforeEdit | ||
5 | + type: query | ||
6 | + description: 编辑角色关联权限菜单的前置准备数据 | ||
7 | + payload: | ||
8 | + - ref: roleId | ||
9 | + required: true | ||
10 | + result: | ||
11 | + - name: roles | ||
12 | + type: | ||
13 | + array: role | ||
14 | + required: true | ||
15 | + - name: menus | ||
16 | + type: | ||
17 | + array: menu |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: roleMenuEdit | ||
5 | + type: query | ||
6 | + description: 角色编辑关联菜单权限 | ||
7 | + payload: | ||
8 | + - ref: roleId | ||
9 | + required: true | ||
10 | + - name: menuId | ||
11 | + description: 关联菜单的id | ||
12 | + type: | ||
13 | + array: int64 | ||
14 | + result: | ||
15 | + - ref: roleId | ||
16 | + required: true | ||
17 | + - name: menuId | ||
18 | + description: 关联菜单的id | ||
19 | + type: | ||
20 | + array: int64 |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: roleUserAdd | ||
5 | + type: query | ||
6 | + description: 角色添加关联用户 | ||
7 | + payload: | ||
8 | + - ref: roleId | ||
9 | + required: true | ||
10 | + - name: userId | ||
11 | + description: 关联用户的id | ||
12 | + type: | ||
13 | + array: int64 | ||
14 | + result: | ||
15 | + - ref: roleId | ||
16 | + required: true | ||
17 | + - name: userId | ||
18 | + description: 关联用户的id | ||
19 | + type: | ||
20 | + array: int64 |
1 | +version: v1 | ||
2 | +kind: Method | ||
3 | +metadata: | ||
4 | + name: roleUserDelete | ||
5 | + type: query | ||
6 | + description: 角色添加关联用户 | ||
7 | + payload: | ||
8 | + - ref: roleId | ||
9 | + required: true | ||
10 | + - name: userId | ||
11 | + description: 关联用户的id | ||
12 | + type: | ||
13 | + array: int64 | ||
14 | + result: | ||
15 | + - ref: roleId | ||
16 | + required: true | ||
17 | + - name: userId | ||
18 | + description: 关联用户的id | ||
19 | + type: | ||
20 | + array: int64 |
-
请 注册 或 登录 后发表评论