作者 陈志颖

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

正在显示 32 个修改的文件 包含 544 行增加5 行删除
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: auth
  5 + path: /auths
  6 + endpoints:
  7 + - method: login
  8 + route:
  9 + post: /login
  10 + - method: loginByCompany
  11 + route:
  12 + post: /loginByCompany
  13 + - method: accessToken
  14 + route:
  15 + post: /accessToken
  16 + - method: refreshToken
  17 + route:
  18 + post: /refreshToken
  19 + - method: sendSmsCode
  20 + route:
  21 + post: /sendSmsCode
  22 + - method: rovoke
  23 + route:
  24 + post: /rovoke
  25 + - method: changePassword
  26 + route:
  27 + post: /changePhonePassword
@@ -22,3 +22,9 @@ metadata: @@ -22,3 +22,9 @@ metadata:
22 params: 22 params:
23 - name: offset 23 - name: offset
24 - name: limit 24 - name: limit
  25 + - method: convertCompanyStatus
  26 + route:
  27 + post: /convertCompanyStatus
  28 + - method: setCompanyAdmin
  29 + route:
  30 + post: /setCompanyAdmin
@@ -22,3 +22,6 @@ metadata: @@ -22,3 +22,6 @@ metadata:
22 params: 22 params:
23 - name: offset 23 - name: offset
24 - name: limit 24 - name: limit
  25 + - method: delivery
  26 + route:
  27 + get: /delivery
@@ -2,5 +2,8 @@ version: v1 @@ -2,5 +2,8 @@ version: v1
2 kind: HttpApi 2 kind: HttpApi
3 metadata: 3 metadata:
4 service: permission 4 service: permission
5 - path: /permissions 5 + path: /permission
6 endpoints: 6 endpoints:
  7 + - method: menus
  8 + route:
  9 + get: /menus
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: statistics
  5 + path: /statisticss
  6 + endpoints:
  7 + - method: companyProfile
  8 + route:
  9 + post: /companyProfile
  10 + - method: orderProfile
  11 + route:
  12 + post: /orderProfile
  13 + - method: orderDividend
  14 + route:
  15 + post: /orderDividend
  16 + - method: partnersProfile
  17 + route:
  18 + post: /partnersProfile
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: user
  5 + path: /users
  6 + endpoints:
  7 + - method: createUser
  8 + route:
  9 + post: /
  10 + - method: updateUser
  11 + route:
  12 + put: /{userId}
  13 + - method: getUser
  14 + route:
  15 + get: /{userId}
  16 + - method: removeUser
  17 + route:
  18 + delete: /{userId}
  19 + - method: listUser
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  25 + - method: convertUserStatus
  26 + route:
  27 + post: /convertUserStatus
  28 + - method: setPermisson
  29 + route:
  30 + post: /setPermisson
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: adminType
  5 + description: 管理员类型 1.超级管理员 10:企业管理员 100:普通用户
  6 + type:
  7 + primitive: int
1 version: v1 1 version: v1
2 kind: Attribute 2 kind: Attribute
3 metadata: 3 metadata:
4 - name: isSenior  
5 - description: 用户高管标识 4 + name: status
  5 + description: 状态:【1:正常】【 2:禁用】
6 type: 6 type:
7 - primitive: boolean 7 + primitive: int
@@ -14,10 +14,16 @@ metadata: @@ -14,10 +14,16 @@ metadata:
14 required: true 14 required: true
15 - ref: userInfo 15 - ref: userInfo
16 required: true 16 required: true
  17 + - name: partnerInfo
  18 + description: 合伙人信息
  19 + type:
  20 + schema: partnerInfo
17 - ref: status 21 - ref: status
18 required: true 22 required: true
19 - - ref: isSenior 23 + - ref: adminType
20 required: true 24 required: true
  25 + - ref: status
  26 + required: true
21 - ref: accessPartners 27 - ref: accessPartners
22 required: true 28 required: true
23 - ref: createAt 29 - ref: createAt
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: accessToken
  5 + type: command
  6 + description: 用户按公司登录
  7 + payload:
  8 + - name: authCode
  9 + description: Attribute描述
  10 + type:
  11 + primitive: string
  12 + result:
  13 + - name: refreshToken
  14 + description: Attribute描述
  15 + type:
  16 + primitive: string
  17 + - name: accessToken
  18 + description: Attribute描述
  19 + type:
  20 + primitive: string
  21 + - name: expiresIn
  22 + description: Attribute描述
  23 + type:
  24 + primitive: string
  25 + - name: auth
  26 + type:
  27 + schema: auth
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: changePassword
  5 + type: command
  6 + description: 修改手机号密码
  7 + payload:
  8 + - name: oldPwd
  9 + description: 旧密码
  10 + type:
  11 + primitive: string
  12 + - name: newPwd
  13 + description: 新密码
  14 + type:
  15 + primitive: string
  16 + - name: confirmPwd
  17 + description: 确认密码
  18 + type:
  19 + primitive: string
  20 + - name: phone
  21 + description: 手机号
  22 + type:
  23 + primitive: string
  24 + result:
  25 + - name: code
  26 + type:
  27 + primitive: int
  28 + - name: msg
  29 + type:
  30 + primitive: string
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: login
  5 + type: query
  6 + description: 用户登录 返回有权限的公司列表
  7 + payload:
  8 + - name: phone
  9 + description: 手机号
  10 + type:
  11 + primitive: string
  12 + - name: grantType
  13 + description: signInPassword(密码登录) 或 signInCaptcha(验证码登录)或signInCredentials(凭证登录)
  14 + type:
  15 + primitive: string
  16 + - name: password
  17 + description: 密码(grantType = signInPassword)
  18 + type:
  19 + primitive: string
  20 + - name: captcha
  21 + description: 验证码(grantType = signInCaptcha)
  22 + type:
  23 + primitive: string
  24 + - name: credentials
  25 + description: 凭证(grantType = signInCredentials)
  26 + type:
  27 + primitive: string
  28 + result:
  29 + - name: users
  30 + description: 用户信息列表
  31 + type:
  32 + array: user
  33 + - name: credentials
  34 + description: 凭证
  35 + type:
  36 + primitive: string
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: loginByCompany
  5 + type: command
  6 + description: 用户按公司登录
  7 + payload:
  8 + - ref: userType
  9 + required: true
  10 + - name: credentials
  11 + description: 凭证
  12 + type:
  13 + primitive: string
  14 + required: true
  15 + - name: userId
  16 + description: 用户id
  17 + type:
  18 + primitive: int64
  19 + required: true
  20 + result:
  21 + - name: authCode
  22 + description: 授权码 auth2登录使用
  23 + type:
  24 + primitive: string
  25 + - name: token
  26 + description: token
  27 + type:
  28 + primitive: string
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: refreshToken
  5 + type: command
  6 + description: 更新授权令牌accessToken
  7 + payload:
  8 + - name: refreshToken
  9 + description: Attribute描述
  10 + type:
  11 + primitive: string
  12 + result:
  13 + - name: refreshToken
  14 + description: Attribute描述
  15 + type:
  16 + primitive: string
  17 + - name: accessToken
  18 + description: Attribute描述
  19 + type:
  20 + primitive: string
  21 + - name: expiresIn
  22 + description: Attribute描述
  23 + type:
  24 + primitive: string
  25 + - name: auth
  26 + type:
  27 + schema: auth
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: revoke
  5 + type: command
  6 + description: 注销登录
  7 + result:
  8 + - name: code
  9 + type:
  10 + primitive: int
  11 + - name: msg
  12 + type:
  13 + primitive: int
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: sendSmsCode
  5 + type: command
  6 + description: 发送验证码
  7 + payload:
  8 + - name: phone
  9 + description: Attribute描述
  10 + type:
  11 + primitive: string
  12 + result:
  13 + - name: code
  14 + type:
  15 + primitive: int
  16 + - name: msg
  17 + type:
  18 + primitive: string
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: auth
  5 + description: 认证服务
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: convertCompanyStatus
  5 + type: command
  6 + description: 公司状态转换 禁用、启用
  7 + payload:
  8 + - ref: companyId
  9 + required: true
  10 + - ref: status
  11 + required: true
  12 + result:
  13 + - name: company
  14 + type:
  15 + schema: company
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: setCompanyAdmin
  5 + type: command
  6 + description: 设置公司管理员
  7 + payload:
  8 + - ref: companyId
  9 + required: true
  10 + - ref: userId
  11 + required: true
  12 + result:
  13 + - name: company
  14 + type:
  15 + schema: company
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: companyProfile
  5 + type: query
  6 + description: 公司基础统计数据
  7 + payload:
  8 + - ref: companyId
  9 + required: true
  10 + result:
  11 + - name: statistics
  12 + type:
  13 + schema: any
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: orderDividend
  5 + type: query
  6 + description: 订单分红统计
  7 + payload:
  8 + - ref: userId
  9 + required: true
  10 + - name: startTime
  11 + description: 开始时间
  12 + type:
  13 + primitive: int
  14 + - name: endTime
  15 + description: 结束时间
  16 + type:
  17 + primitive: int
  18 + - name: partnerCategoryId
  19 + description: 订单合伙类型
  20 + type:
  21 + primitive: int
  22 + result:
  23 + - name: statistics
  24 + description: 统计数据
  25 + type:
  26 + primitive: any
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: orderProfile
  5 + type: query
  6 + description: 订单统计
  7 + payload:
  8 + - ref: userId
  9 + required: true
  10 + result:
  11 + - name: statistics
  12 + description: 统计数据
  13 + type:
  14 + primitive: any
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: partnersProfile
  5 + type: query
  6 + description: 合伙人统计信息
  7 + payload:
  8 + - ref: userId
  9 + required: true
  10 + result:
  11 + - name: partnersProfile
  12 + type:
  13 + primitive: any
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: statistics
  5 + description: 统计服务
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: convertUserStatus
  5 + type: command
  6 + description: 用户状态转换(禁用、启用)
  7 + payload:
  8 + - name: userId
  9 + description: 用户id
  10 + type:
  11 + primitive: int64
  12 + - ref: status
  13 + required: true
  14 + result:
  15 + - name: code
  16 + type:
  17 + primitive: int
  18 + - name: msg
  19 + type:
  20 + primitive: string
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: createUser
  5 + type: command
  6 + description: 创建
  7 + payload:
  8 + - ref: userTypes
  9 + required: true
  10 + - ref: adminType
  11 + required: true
  12 + - ref: status
  13 + required: true
  14 + - name: userInfo
  15 + description: 用户信息
  16 + type:
  17 + schema: userInfo
  18 + required: true
  19 + - name: partnerInfo
  20 + description: 合伙人信息
  21 + type:
  22 + schema: partnerInfo
  23 + required: false
  24 + - name: accessPartners
  25 + description: 可查看合伙人列表
  26 + type:
  27 + array: int64
  28 + required: false
  29 + result:
  30 + - name: user
  31 + type:
  32 + schema: user
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: getUser
  5 + type: query
  6 + description: 返回
  7 + payload:
  8 + - ref: userId
  9 + required: true
  10 + result:
  11 + - name: user
  12 + type:
  13 + schema: user
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: listUser
  5 + type: query
  6 + description: 返回列表
  7 + payload:
  8 + - ref: offset
  9 + required: true
  10 + - ref: limit
  11 + required: true
  12 + result:
  13 + - ref: count
  14 + required: true
  15 + - name: user
  16 + type:
  17 + array: user
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: removeUser
  5 + type: command
  6 + description: 移除
  7 + payload:
  8 + - ref: userId
  9 + required: true
  10 + result:
  11 + - name: user
  12 + type:
  13 + schema: user
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: setPermisson
  5 + type: command
  6 + description: 设置权限
  7 + payload:
  8 + - ref: userId
  9 + required: true
  10 + - name: permissons
  11 + description: 权限编码列表
  12 + type:
  13 + array: int
  14 + result:
  15 + - name: code
  16 + type:
  17 + primitive: int
  18 + - name: msg
  19 + type:
  20 + primitive: string
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: updateUser
  5 + type: command
  6 + description: 更新
  7 + payload:
  8 + - ref: userId
  9 + required: true
  10 + - ref: userTypes
  11 + required: false
  12 + - ref: adminType
  13 + required: false
  14 + - ref: status
  15 + required: false
  16 + - name: userInfo
  17 + description: 用户信息
  18 + type:
  19 + schema: userInfo
  20 + required: false
  21 + - name: partnerInfo
  22 + description: 合伙人信息
  23 + type:
  24 + schema: partnerInfo
  25 + required: false
  26 + - name: accessPartners
  27 + description: 可查看合伙人列表
  28 + type:
  29 + array: int64
  30 + required: false
  31 + result:
  32 + - name: user
  33 + type:
  34 + schema: user
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: user
  5 + description: 用户管理服务