作者 yangfu

add service menu

  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: menu
  5 + path: /menus
  6 + endpoints:
  7 + - method: createMenu
  8 + route:
  9 + post: /
  10 + - method: updateMenu
  11 + route:
  12 + put: /{Id}
  13 + - method: getMenu
  14 + route:
  15 + get: /{Id}
  16 + - method: removeMenu
  17 + route:
  18 + delete: /{Id}
  19 + - method: listMenu
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: menuId
  5 + description: 菜单编号
  6 + type:
  7 + primitive: int64
@@ -4,4 +4,4 @@ metadata: @@ -4,4 +4,4 @@ metadata:
4 name: organizationId 4 name: organizationId
5 description: 组织ID 5 description: 组织ID
6 type: 6 type:
7 - primitive: string 7 + primitive: int64
@@ -16,14 +16,6 @@ metadata: @@ -16,14 +16,6 @@ metadata:
16 description: 权限名称 16 description: 权限名称
17 type: 17 type:
18 primitive: string 18 primitive: string
19 - - name: object  
20 - description: 对象 eg:users  
21 - type:  
22 - primitive: string  
23 - - name: action  
24 - description: 操作行为 eg:delete 操作列表(add/delete/edit/list/view/import/export)  
25 - type:  
26 - primitive: string  
27 - name: accessCode 19 - name: accessCode
28 description: 权限编码 eg:users:delete 20 description: 权限编码 eg:users:delete
29 type: 21 type:
1 version: v1 1 version: v1
2 kind: Schema 2 kind: Schema
3 metadata: 3 metadata:
4 - name: companyCustomer (停用)  
5 - description: 客户信息 (base) 4 + name: companyCustomer
  5 + description: 客户信息 (base) (停用)
6 attributes: 6 attributes:
7 - ref: companyCustomerId 7 - ref: companyCustomerId
8 required: true 8 required: true
1 version: v1 1 version: v1
2 kind: Schema 2 kind: Schema
3 metadata: 3 metadata:
4 - name: companyProduct (停用)  
5 - description: 产品信息 (base) 4 + name: companyProduct
  5 + description: 产品信息 (base) (停用)
6 attributes: 6 attributes:
7 - ref: companyProductId 7 - ref: companyProductId
8 required: true 8 required: true
1 version: v1 1 version: v1
2 kind: Schema 2 kind: Schema
3 metadata: 3 metadata:
4 - name: companyRegion (停用)  
5 - description: 公司区域 (base) 4 + name: companyRegion
  5 + description: 公司区域 (base) (停用)
6 attributes: 6 attributes:
7 - ref: companyRegionId 7 - ref: companyRegionId
8 required: true 8 required: true
1 version: v1 1 version: v1
2 kind: Schema 2 kind: Schema
3 metadata: 3 metadata:
4 - name: credentialAuth (base) (停用)  
5 - description: 凭证认证 4 + name: credentialAuth
  5 + description: 凭证认证 (base) (停用)
6 attributes: 6 attributes:
7 - name: credential 7 - name: credential
8 description: 凭证 8 description: 凭证
1 version: v1 1 version: v1
2 kind: Schema 2 kind: Schema
3 metadata: 3 metadata:
4 - name: customizeMenus (base)  
5 - description: 自定义菜单(菜单维护) 4 + name: customizeMenus
  5 + description: 自定义菜单 (base)(菜单维护)
6 attributes: 6 attributes:
7 - name: customizeMenusId 7 - name: customizeMenusId
8 description: 自定义菜单id 8 description: 自定义菜单id
@@ -4,10 +4,8 @@ metadata: @@ -4,10 +4,8 @@ metadata:
4 name: menu 4 name: menu
5 description: 系统菜单 5 description: 系统菜单
6 attributes: 6 attributes:
7 - - name: menuId  
8 - description: 菜单编号  
9 - type:  
10 - primitive: int64 7 + - ref: menuId
  8 + required: true
11 - name: parentId 9 - name: parentId
12 description: 父级id 10 description: 父级id
13 type: 11 type:
@@ -17,7 +15,11 @@ metadata: @@ -17,7 +15,11 @@ metadata:
17 type: 15 type:
18 primitive: string 16 primitive: string
19 - name: code 17 - name: code
20 - description: 菜单编码 SYSTEM_USER_EDIT (权限编码) 18 + description: 菜单编码 SYSTEM_USER_EDIT / 100101 (字符编码)
  19 + type:
  20 + primitive: string
  21 + - name: accessCode
  22 + description: 权限编码 users:edit
21 type: 23 type:
22 primitive: string 24 primitive: string
23 - name: menuType 25 - name: menuType
1 version: v1 1 version: v1
2 kind: Schema 2 kind: Schema
3 metadata: 3 metadata:
4 - name: organization (base)  
5 - description: 组织 4 + name: organization
  5 + description: 组织 (base)
6 attributes: 6 attributes:
7 - ref: organizationId 7 - ref: organizationId
8 required: true 8 required: true
1 version: v1 1 version: v1
2 kind: Schema 2 kind: Schema
3 metadata: 3 metadata:
4 - name: phoneAuth (base)  
5 - description: 手机认证 4 + name: phoneAuth
  5 + description: 手机认证 (base)
6 attributes: 6 attributes:
7 - name: phone 7 - name: phone
8 description: 手机号 8 description: 手机号
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: createMenu
  5 + type: command
  6 + description: 创建菜单服务
  7 + payload:
  8 + - name: parentId
  9 + description: 父级id
  10 + type:
  11 + primitive: int64
  12 + - name: menuName
  13 + description: 菜单名称
  14 + type:
  15 + primitive: string
  16 + required: true
  17 + - name: code
  18 + description: 菜单编码 SYSTEM_USER_EDIT / 100101 (字符编码)
  19 + type:
  20 + primitive: string
  21 + required: true
  22 + - name: accessCode
  23 + description: 权限编码 users:edit
  24 + type:
  25 + primitive: string
  26 + required: true
  27 + - name: menuType
  28 + description: 菜单类型 (目录catalog、菜单menu、按钮button)
  29 + type:
  30 + primitive: string
  31 + required: true
  32 + - name: icon
  33 + description: 菜单图标
  34 + type:
  35 + primitive: string
  36 + - name: sort
  37 + description: 排序
  38 + type:
  39 + primitive: int
  40 + required: true
  41 + - name: desc
  42 + description: 菜单说明
  43 + type:
  44 + primitive: string
  45 + - name: isPublish
  46 + description: 菜单是否公开状态,[0:隐藏],[1:显示],默认显示
  47 + type:
  48 + primitive: int
  49 + required: true
  50 + result:
  51 + - name: menu
  52 + type:
  53 + schema: menu
  54 + required: true
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: getMenu
  5 + type: query
  6 + description: 返回菜单服务
  7 + payload:
  8 + - ref: menuId
  9 + required: true
  10 + result:
  11 + - name: menu
  12 + type:
  13 + schema: menu
  14 + required: true
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: listMenu
  5 + type: query
  6 + description: 返回菜单服务列表
  7 + payload:
  8 + - name: menuCategory
  9 + description: 菜单类别 web app
  10 + required: fasle
  11 + type:
  12 + primitive: string
  13 + - name: menuParentId
  14 + description: 菜单父级id 0:查询所有 n:父级id为n的菜单列表
  15 + required: fasle
  16 + type:
  17 + primitive: string
  18 + - name: menuName
  19 + description: 菜单名称过滤
  20 + required: fasle
  21 + type:
  22 + primitive: string
  23 + - ref: offset
  24 + required: true
  25 + - ref: limit
  26 + required: true
  27 + result:
  28 + - ref: count
  29 + required: true
  30 + - name: menus
  31 + type:
  32 + array: menu
  33 + required: true
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: removeMenu
  5 + type: command
  6 + description: 移除菜单服务
  7 + payload:
  8 + - ref: menuId
  9 + required: true
  10 + result:
  11 + - name: menu
  12 + type:
  13 + schema: menu
  14 + required: true
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: updateMenu
  5 + type: command
  6 + description: 更新菜单服务
  7 + payload:
  8 + - ref: menuId
  9 + required: true
  10 + - name: menuName
  11 + description: 菜单名称
  12 + type:
  13 + primitive: string
  14 + required: true
  15 + - name: code
  16 + description: 菜单编码 SYSTEM_USER_EDIT / 100101 (字符编码)
  17 + type:
  18 + primitive: string
  19 + required: true
  20 + - name: accessCode
  21 + description: 权限编码 users:edit
  22 + type:
  23 + primitive: string
  24 + - name: menuType
  25 + description: 菜单类型 (目录catalog、菜单menu、按钮button)
  26 + type:
  27 + primitive: string
  28 + required: true
  29 + - name: icon
  30 + description: 菜单图标
  31 + type:
  32 + primitive: string
  33 + - name: sort
  34 + description: 排序
  35 + type:
  36 + primitive: int
  37 + required: true
  38 + - name: desc
  39 + description: 菜单说明
  40 + type:
  41 + primitive: string
  42 + - name: isPublish
  43 + description: 菜单是否公开状态,[0:隐藏],[1:显示],默认显示
  44 + type:
  45 + primitive: int
  46 + result:
  47 + - name: menu
  48 + type:
  49 + schema: menu
  50 + required: true
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: menu
  5 + description: 菜单服务