作者 yangfu

add services user

... ... @@ -2,5 +2,8 @@ version: v1
kind: HttpApi
metadata:
service: permission
path: /permissions
path: /permission
endpoints:
- method: menus
route:
get: /menus
... ...
version: v1
kind: HttpApi
metadata:
service: user
path: /users
endpoints:
- method: createUser
route:
post: /
- method: updateUser
route:
put: /{userId}
- method: getUser
route:
get: /{userId}
- method: removeUser
route:
delete: /{userId}
- method: listUser
route:
get: /
params:
- name: offset
- name: limit
... ...
version: v1
kind: Attribute
metadata:
name: adminType
description: 管理员类型 1.超级管理员 10:企业管理员 100:普通用户
type:
primitive: int
... ...
version: v1
kind: Attribute
metadata:
name: isSenior
description: 用户高管标识
name: status
description: 状态:【1:正常】【 2:禁用】
type:
primitive: boolean
primitive: int
... ...
... ... @@ -14,9 +14,15 @@ metadata:
required: true
- ref: userInfo
required: true
- name: partnerInfo
description: 合伙人信息
type:
schema: partnerInfo
- ref: status
required: true
- ref: isSenior
- ref: adminType
required: true
- ref: status
required: true
- ref: accessPartners
required: true
... ...
... ... @@ -27,7 +27,7 @@ metadata:
primitive: string
result:
- name: users
description: Attribute描述
description: 用户信息列表
type:
array: user
- name: credentials
... ...
version: v1
kind: Method
metadata:
name: company
name: companyProfile
type: query
description: 查询公司基础统计数据
description: 公司基础统计数据
payload:
- ref: companyId
required: true
... ...
... ... @@ -5,6 +5,8 @@ metadata:
type: query
description: 订单分红统计
payload:
- ref: userId
required: true
- name: startTime
description: 开始时间
type:
... ... @@ -13,6 +15,10 @@ metadata:
description: 结束时间
type:
primitive: int
- name: partnerCategoryId
description: 订单合伙类型
type:
primitive: int
result:
- name: statistics
description: 统计数据
... ...
version: v1
kind: Method
metadata:
name: order
name: orderProfile
type: query
description: 订单统计
payload:
- ref: userId
required: true
result:
- name: statistics
description: 统计数据
... ...
version: v1
kind: Method
metadata:
name: createUser
type: command
description: 创建
payload:
- ref: userTypes
required: true
- ref: adminType
required: true
- ref: status
required: true
- name: userInfo
description: 用户信息
type:
schema: userInfo
required: true
- name: partnerInfo
description: 合伙人信息
type:
schema: partnerInfo
required: false
- name: accessPartners
description: 可查看合伙人列表
type:
array: int64
required: false
result:
- name: user
type:
schema: user
... ...
version: v1
kind: Method
metadata:
name: getUser
type: query
description: 返回
payload:
- ref: userId
required: true
result:
- name: user
type:
schema: user
... ...
version: v1
kind: Method
metadata:
name: listUser
type: query
description: 返回列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: user
type:
array: user
... ...
version: v1
kind: Method
metadata:
name: removeUser
type: command
description: 移除
payload:
- ref: userId
required: true
result:
- name: user
type:
schema: user
... ...
version: v1
kind: Method
metadata:
name: updateUser
type: command
description: 更新
payload:
- ref: userId
required: true
- ref: userTypes
required: false
- ref: adminType
required: false
- ref: status
required: false
- name: userInfo
description: 用户信息
type:
schema: userInfo
required: false
- name: partnerInfo
description: 合伙人信息
type:
schema: partnerInfo
required: false
- name: accessPartners
description: 可查看合伙人列表
type:
array: int64
required: false
result:
- name: user
type:
schema: user
... ...
version: v1
kind: Service
metadata:
name: user
description: 用户管理服务
... ...