作者 yangfu

add services auth statistics

version: v1
kind: Method
metadata:
name: accessToken
type: command
description: 用户按公司登录
payload:
- name: authCode
description: Attribute描述
type:
primitive: string
result:
- name: refreshToken
description: Attribute描述
type:
primitive: string
- name: accessToken
description: Attribute描述
type:
primitive: string
- name: expiresIn
description: Attribute描述
type:
primitive: string
- name: auth
type:
schema: auth
... ...
version: v1
kind: Method
metadata:
name: login
type: query
description: 用户登录 返回有权限的公司列表
payload:
- name: phone
description: 手机号
type:
primitive: string
- name: grantType
description: signInPassword(密码登录) 或 signInCaptcha(验证码登录)或signInCredentials(凭证登录)
type:
primitive: string
- name: password
description: 密码(grantType = signInPassword)
type:
primitive: string
- name: captcha
description: 验证码(grantType = signInCaptcha)
type:
primitive: string
- name: credentials
description: 凭证(grantType = signInCredentials)
type:
primitive: string
result:
- name: users
description: Attribute描述
type:
array: user
- name: credentials
description: 凭证
type:
primitive: string
... ...
version: v1
kind: Method
metadata:
name: loginByCompany
type: command
description: 用户按公司登录
payload:
- ref: userType
required: true
- name: credentials
description: 凭证
type:
primitive: string
required: true
- name: userId
description: 用户id
type:
primitive: int64
required: true
result:
- name: authCode
description: 授权码 auth2登录使用
type:
primitive: string
- name: token
description: token
type:
primitive: string
... ...
version: v1
kind: Method
metadata:
name: refreshToken
type: command
description: 更新授权令牌accessToken
payload:
- name: refreshToken
description: Attribute描述
type:
primitive: string
result:
- name: refreshToken
description: Attribute描述
type:
primitive: string
- name: accessToken
description: Attribute描述
type:
primitive: string
- name: expiresIn
description: Attribute描述
type:
primitive: string
- name: auth
type:
schema: auth
... ...
version: v1
kind: Service
metadata:
name: auth
description: 认证服务
... ...
version: v1
kind: Method
metadata:
name: company
type: query
description: 查询公司基础统计数据
payload:
- ref: companyId
required: true
result:
- name: statistics
type:
schema: any
... ...
version: v1
kind: Method
metadata:
name: order
type: query
description: 订单统计
payload:
result:
- name: statistics
description: 统计数据
type:
primitive: any
... ...
version: v1
kind: Method
metadata:
name: orderDividend
type: query
description: 订单分红统计
payload:
- name: startTime
description: 开始时间
type:
primitive: int
- name: endTime
description: 结束时间
type:
primitive: int
result:
- name: statistics
description: 统计数据
type:
primitive: any
... ...
version: v1
kind: Service
metadata:
name: statistics
description: 统计服务
... ...