作者 tangxuhui
version: v1
kind: HttpApi
metadata:
service: auth
path: /auths
endpoints:
- method: companySignUp
route:
post: /company-sign-up
- method: phoneAuthCheck
route:
post: /phone-auth/check
- method: phoneAuthResetPassword
route:
post: /phone-auth/reset-password
... ...
version: v1
kind: HttpApi
metadata:
service: users
path: /users
endpoints:
- method: updateFavoriteMenus
route:
put: /{usersId}/favorite-menus
- method: getFavoriteMenus
route:
get: /{usersId}/favorite-menus
- method: deleteFavoriteMenus
route:
delete: /{usersId}/favorite-menus/{code}
... ...
version: v1
kind: HttpApi
metadata:
service: users
path: /users
endpoints:
- method: createUsers
route:
post: /
- method: updateUsers
route:
put: /{usersId}
- method: getUsers
route:
get: /{usersId}
- method: removeUsers
route:
delete: /{usersId}
- method: listUsers
route:
get: /
params:
- name: offset
- name: limit
- method: getUsersAccessMenus
route:
get: /access-menus
params:
- name: usersId
- name: menuCategory
- method: getUsersBaseInfo
route:
get: /base-info
params:
- name: usersId
- name: phone
- name: usersBaseId
- method: batchAdd
route:
post: /batch-add
- method: batchEnable
route:
post: /batch-enable
- method: batchResetPassword
route:
post: /batch-reset-password
- method: phoneAuth
route:
put: /{usersId}/phone-auth
\ No newline at end of file
... ...
... ... @@ -4,4 +4,4 @@ metadata:
name: accessMenus
description: 有权限的菜单
type:
primitive: int64
array: int64
... ...
... ... @@ -18,7 +18,11 @@ metadata:
- ref: password
required: true
result:
- name: users
- name: code
type:
schema: users
primitive: int
required: true
- name: msg
type:
primitive: string
required: true
... ...
version: v1
kind: Method
metadata:
name: check
name: phoneAuthCheck
type: command
description: 密码检查
description: 手机账号密码检查
payload:
- ref: phone
required: true
... ...
version: v1
kind: Method
metadata:
name: resetPassword
name: phoneAuthResetPassword
type: command
description: 重置密码
description: 重置密码(忘记密码)
payload:
- ref: phone
required: true
... ...
version: v1
kind: Method
metadata:
name: createUsers
type: command
description: 创建
payload:
- ref: companyId
required: true
- ref: usersType
required: true
- ref: usersCode
required: true
- name: organizationId
description: 组织机构
type:
primitive: int64
- name: departmentId
description: 所属部门
type:
primitive: int64
- name: usersOrg
description: 用户关联的组织
type:
array: org
- name: usersRole
description: 用户关联的角色
type:
array: role
- name: cooperationInfo
description: 共创信息 (共创用户有效)
type:
schema: cooperationInfo
- name: enableStatus
description: 启用状态(启用:1 禁用:2)
type:
primitive: int
result:
- name: users
type:
schema: users
required: true
\ No newline at end of file
... ...
version: v1
kind: Method
metadata:
name: deleteFavoriteMenus
type: command
description: 移除我收藏的菜单
payload:
- ref: code
required: true
- ref: usersId
required: true
result:
- name: code
type:
primitive: int
required: true
- name: msg
type:
primitive: string
required: true
... ...
version: v1
kind: Method
metadata:
name: getFavoriteMenus
type: query
description: 获取我收藏的菜单
payload:
- ref: usersId
required: true
result:
- name: users
type:
schema: users
required: true
... ...
version: v1
kind: Method
metadata:
name: getUsers
type: query
description: 返回
payload:
- ref: usersId
required: true
result:
- name: users
type:
schema: users
required: true
... ...
version: v1
kind: Method
metadata:
name: getUsersAccessMenus
type: query
description: 返回用户有权限的菜单
payload:
- ref: userId
required: true
- name: menuCategory
description: 菜单类别 web app
required: false
type:
primitive: string
result:
- name: menus
type:
array: menu
required: true
... ...
version: v1
kind: Method
metadata:
name: getUsersBaseInfo
type: query
description: 获取用户基础信息数据
payload:
- ref: usersId
required: false
- ref: phone
required: false
- ref: usersBaseId
required: false
result:
- name: users
type:
schema: users
required: true
... ...
version: v1
kind: Method
metadata:
name: listUsers
type: query
description: 返回列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: userss
type:
array: users
required: true
... ...
version: v1
kind: Method
metadata:
name: removeUsers
type: command
description: 移除
payload:
- ref: usersId
required: true
result:
- name: users
type:
schema: users
required: true
... ...
version: v1
kind: Method
metadata:
name: updateFavoriteMenus
type: command
description: 更新我喜欢菜单列表
payload:
- name: favoriteMenus
description: 菜单编码列表
type:
array: string
- ref: usersId
required: true
result:
- name: code
type:
primitive: int
required: true
- name: msg
type:
primitive: string
required: true
... ...
version: v1
kind: Method
metadata:
name: phoneAuth
name: updatePhoneAuth
type: command
description: 手机认证
description: 手机认证,更新手机号、密码
payload:
- ref: usersId
required: true
- ref: phone
required: true
required: false
- ref: password
required: true
required: false
result:
- name: code
type:
... ...
version: v1
kind: Method
metadata:
name: updateUsers
type: command
description: 更新
payload:
- ref: usersId
required: true
- ref: usersCode
required: true
- name: organizationId
description: 组织机构
type:
primitive: int64
- name: departmentId
description: 所属部门
type:
primitive: int64
- name: usersOrg
description: 用户关联的组织
type:
array: org
- name: usersRole
description: 用户关联的角色
type:
array: role
- name: cooperationInfo
description: 共创信息 (共创用户有效)
type:
schema: cooperationInfo
- name: enableStatus
description: 启用状态(启用:1 禁用:2)
type:
primitive: int
result:
- name: users
type:
schema: users
required: true
... ...