作者 陈志颖

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go-pp/partner01 into 3-project-init-order

正在显示 32 个修改的文件 包含 544 行增加5 行删除
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
... ...
... ... @@ -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: 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
... ...
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
- method: convertUserStatus
route:
post: /convertUserStatus
- method: setPermisson
route:
post: /setPermisson
\ No newline at end of file
... ...
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,10 +14,16 @@ 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
- ref: createAt
... ...
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: 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: 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: 用户信息列表
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: 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: Service
metadata:
name: auth
description: 认证服务
... ...
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: companyProfile
type: query
description: 公司基础统计数据
payload:
- ref: companyId
required: true
result:
- name: statistics
type:
schema: any
... ...
version: v1
kind: Method
metadata:
name: orderDividend
type: query
description: 订单分红统计
payload:
- ref: userId
required: true
- name: startTime
description: 开始时间
type:
primitive: int
- name: endTime
description: 结束时间
type:
primitive: int
- name: partnerCategoryId
description: 订单合伙类型
type:
primitive: int
result:
- name: statistics
description: 统计数据
type:
primitive: any
... ...
version: v1
kind: Method
metadata:
name: orderProfile
type: query
description: 订单统计
payload:
- ref: userId
required: true
result:
- name: statistics
description: 统计数据
type:
primitive: any
... ...
version: v1
kind: Method
metadata:
name: partnersProfile
type: query
description: 合伙人统计信息
payload:
- ref: userId
required: true
result:
- name: partnersProfile
type:
primitive: any
... ...
version: v1
kind: Service
metadata:
name: statistics
description: 统计服务
... ...
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: 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: 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
... ...
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: 用户管理服务
... ...