作者 yangfu

add api auth

version: v1
kind: HttpApi
metadata:
service: auth
path: /auths
endpoints:
- method: login
route:
post: /login
- method: loginByCompany
route:
post: /loginByCompany
- method: accessToken
route:
post: /accessToken
- method: refreshToken
route:
post: /refreshToken
- method: sendSmsCode
route:
post: /sendSmsCode
- method: rovoke
route:
post: /rovoke
- method: changePassword
route:
post: /changePhonePassword
... ...
... ... @@ -22,3 +22,9 @@ metadata:
params:
- name: offset
- name: limit
- method: convertCompanyStatus
route:
post: /convertCompanyStatus
- method: setCompanyAdmin
route:
post: /setCompanyAdmin
... ...
... ... @@ -22,3 +22,6 @@ metadata:
params:
- name: offset
- name: limit
- method: delivery
route:
get: /delivery
... ...
version: v1
kind: HttpApi
metadata:
service: statistics
path: /statisticss
endpoints:
- method: companyProfile
route:
post: /companyProfile
- method: orderProfile
route:
post: /orderProfile
- method: orderDividend
route:
post: /orderDividend
- method: partnersProfile
route:
post: /partnersProfile
\ No newline at end of file
... ...
... ... @@ -22,3 +22,9 @@ metadata:
params:
- name: offset
- name: limit
- method: convertUserStatus
route:
post: /convertUserStatus
- method: setPermisson
route:
post: /setPermisson
\ No newline at end of file
... ...
version: v1
kind: Method
metadata:
name: changePassword
type: command
description: 修改手机号密码
payload:
- name: oldPwd
description: 旧密码
type:
primitive: string
- name: newPwd
description: 新密码
type:
primitive: string
- name: confirmPwd
description: 确认密码
type:
primitive: string
- name: phone
description: 手机号
type:
primitive: string
result:
- name: code
type:
primitive: int
- name: msg
type:
primitive: string
... ...
version: v1
kind: Method
metadata:
name: revoke
type: command
description: 注销登录
result:
- name: code
type:
primitive: int
- name: msg
type:
primitive: int
\ No newline at end of file
... ...
version: v1
kind: Method
metadata:
name: sendSmsCode
type: command
description: 发送验证码
payload:
- name: phone
description: Attribute描述
type:
primitive: string
result:
- name: code
type:
primitive: int
- name: msg
type:
primitive: string
... ...
version: v1
kind: Method
metadata:
name: convertCompanyStatus
type: command
description: 公司状态转换 禁用、启用
payload:
- ref: companyId
required: true
- ref: status
required: true
result:
- name: company
type:
schema: company
... ...
version: v1
kind: Method
metadata:
name: setCompanyAdmin
type: command
description: 设置公司管理员
payload:
- ref: companyId
required: true
- ref: userId
required: true
result:
- name: company
type:
schema: company
... ...
version: v1
kind: Method
metadata:
name: partnersProfile
type: query
description: 合伙人统计信息
payload:
- ref: userId
required: true
result:
- name: partnersProfile
type:
primitive: any
... ...
version: v1
kind: Method
metadata:
name: convertUserStatus
type: command
description: 用户状态转换(禁用、启用)
payload:
- name: userId
description: 用户id
type:
primitive: int64
- ref: status
required: true
result:
- name: code
type:
primitive: int
- name: msg
type:
primitive: string
\ No newline at end of file
... ...
version: v1
kind: Method
metadata:
name: setPermisson
type: command
description: 设置权限
payload:
- ref: userId
required: true
- name: permissons
description: 权限编码列表
type:
array: int
result:
- name: code
type:
primitive: int
- name: msg
type:
primitive: string
... ...