253 lines
6.7 KiB
JavaScript
253 lines
6.7 KiB
JavaScript
/**
|
|
* @swagger
|
|
* tags:
|
|
* name: 代理统计
|
|
* description: 代理统计数据相关接口
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /agent/stats:
|
|
* get:
|
|
* summary: 获取代理统计数据
|
|
* tags: [代理统计]
|
|
* security:
|
|
* - bearerAuth: []
|
|
* responses:
|
|
* 200:
|
|
* description: 获取成功
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* type: object
|
|
* properties:
|
|
* success:
|
|
* type: boolean
|
|
* example: true
|
|
* data:
|
|
* type: object
|
|
* properties:
|
|
* totalUsers:
|
|
* type: integer
|
|
* description: 总用户数
|
|
* totalCommissions:
|
|
* type: number
|
|
* format: decimal
|
|
* description: 总佣金金额
|
|
* pendingCommissions:
|
|
* type: number
|
|
* format: decimal
|
|
* description: 待发放佣金
|
|
* thisMonthUsers:
|
|
* type: integer
|
|
* description: 本月新增用户数
|
|
* thisMonthCommissions:
|
|
* type: number
|
|
* format: decimal
|
|
* description: 本月佣金收入
|
|
* 401:
|
|
* description: 未授权
|
|
* 500:
|
|
* description: 服务器错误
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /agent/user-growth-trend:
|
|
* get:
|
|
* summary: 获取用户增长趋势
|
|
* tags: [代理统计]
|
|
* security:
|
|
* - bearerAuth: []
|
|
* parameters:
|
|
* - in: query
|
|
* name: days
|
|
* schema:
|
|
* type: integer
|
|
* default: 30
|
|
* description: 查询天数
|
|
* responses:
|
|
* 200:
|
|
* description: 获取成功
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* type: object
|
|
* properties:
|
|
* success:
|
|
* type: boolean
|
|
* example: true
|
|
* data:
|
|
* type: array
|
|
* items:
|
|
* type: object
|
|
* properties:
|
|
* date:
|
|
* type: string
|
|
* format: date
|
|
* description: 日期
|
|
* count:
|
|
* type: integer
|
|
* description: 新增用户数
|
|
* 401:
|
|
* description: 未授权
|
|
* 500:
|
|
* description: 服务器错误
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /agent/commission-trend:
|
|
* get:
|
|
* summary: 获取佣金收入趋势
|
|
* tags: [代理统计]
|
|
* security:
|
|
* - bearerAuth: []
|
|
* parameters:
|
|
* - in: query
|
|
* name: days
|
|
* schema:
|
|
* type: integer
|
|
* default: 30
|
|
* description: 查询天数
|
|
* responses:
|
|
* 200:
|
|
* description: 获取成功
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* type: object
|
|
* properties:
|
|
* success:
|
|
* type: boolean
|
|
* example: true
|
|
* data:
|
|
* type: array
|
|
* items:
|
|
* type: object
|
|
* properties:
|
|
* date:
|
|
* type: string
|
|
* format: date
|
|
* description: 日期
|
|
* amount:
|
|
* type: number
|
|
* format: decimal
|
|
* description: 佣金金额
|
|
* 401:
|
|
* description: 未授权
|
|
* 500:
|
|
* description: 服务器错误
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /agent/commission-distribution:
|
|
* get:
|
|
* summary: 获取佣金类型分布
|
|
* tags: [代理统计]
|
|
* security:
|
|
* - bearerAuth: []
|
|
* responses:
|
|
* 200:
|
|
* description: 获取成功
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* type: object
|
|
* properties:
|
|
* success:
|
|
* type: boolean
|
|
* example: true
|
|
* data:
|
|
* type: array
|
|
* items:
|
|
* type: object
|
|
* properties:
|
|
* type:
|
|
* type: string
|
|
* description: 佣金类型
|
|
* amount:
|
|
* type: number
|
|
* format: decimal
|
|
* description: 佣金金额
|
|
* count:
|
|
* type: integer
|
|
* description: 记录数量
|
|
* 401:
|
|
* description: 未授权
|
|
* 500:
|
|
* description: 服务器错误
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /agent/recent-users:
|
|
* get:
|
|
* summary: 获取最新下级用户
|
|
* tags: [代理统计]
|
|
* security:
|
|
* - bearerAuth: []
|
|
* parameters:
|
|
* - in: query
|
|
* name: limit
|
|
* schema:
|
|
* type: integer
|
|
* default: 10
|
|
* description: 返回数量限制
|
|
* responses:
|
|
* 200:
|
|
* description: 获取成功
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* type: object
|
|
* properties:
|
|
* success:
|
|
* type: boolean
|
|
* example: true
|
|
* data:
|
|
* type: array
|
|
* items:
|
|
* $ref: '#/components/schemas/User'
|
|
* 401:
|
|
* description: 未授权
|
|
* 500:
|
|
* description: 服务器错误
|
|
*/
|
|
|
|
/**
|
|
* @swagger
|
|
* /agent/recent-commissions:
|
|
* get:
|
|
* summary: 获取最新佣金记录
|
|
* tags: [代理统计]
|
|
* security:
|
|
* - bearerAuth: []
|
|
* parameters:
|
|
* - in: query
|
|
* name: limit
|
|
* schema:
|
|
* type: integer
|
|
* default: 10
|
|
* description: 返回数量限制
|
|
* responses:
|
|
* 200:
|
|
* description: 获取成功
|
|
* content:
|
|
* application/json:
|
|
* schema:
|
|
* type: object
|
|
* properties:
|
|
* success:
|
|
* type: boolean
|
|
* example: true
|
|
* data:
|
|
* type: array
|
|
* items:
|
|
* $ref: '#/components/schemas/Commission'
|
|
* 401:
|
|
* description: 未授权
|
|
* 500:
|
|
* description: 服务器错误
|
|
*/ |