docs:更新swagger文档
This commit is contained in:
1 parent
8b758cc40c
commit
e6899d26bc
3 files changed
+333
-11
No files matched your search
@@ -1,5 +1,4 @@
|
||||
// Code generated by swaggo/swag. DO NOT EDIT.
|
||||
|
||||
// Package swagger Code generated by swaggo/swag. DO NOT EDIT
|
||||
package swagger
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
@@ -2967,6 +2966,64 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/leads/summary": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "管理员获取企业线索汇总统计信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"企业线索"
|
||||
],
|
||||
"summary": "获取线索汇总",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.APIResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/models.LeadSummaryResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "未认证",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "权限不足",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "服务器内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/leads/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -4122,6 +4179,12 @@ const docTemplate = `{
|
||||
"name": "customer_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "授权码(模糊匹配)",
|
||||
"name": "code",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"normal",
|
||||
@@ -7890,7 +7953,6 @@ const docTemplate = `{
|
||||
"models.InvoiceCreateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"invoice_type",
|
||||
"order_id",
|
||||
"receiver_email",
|
||||
@@ -7898,7 +7960,7 @@ const docTemplate = `{
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"description": "开票内容,必填,最大200字符",
|
||||
"description": "开票内容,非必填,最多200字符",
|
||||
"type": "string",
|
||||
"maxLength": 200
|
||||
},
|
||||
@@ -7928,7 +7990,7 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"description": "发票抬头,必填,最大200字符",
|
||||
"description": "发票抬头,必填,最多200字符",
|
||||
"type": "string",
|
||||
"maxLength": 200
|
||||
}
|
||||
@@ -8289,28 +8351,34 @@ const docTemplate = `{
|
||||
],
|
||||
"properties": {
|
||||
"company_name": {
|
||||
"description": "公司名称",
|
||||
"type": "string",
|
||||
"maxLength": 200,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_email": {
|
||||
"description": "邮箱",
|
||||
"type": "string",
|
||||
"maxLength": 100
|
||||
},
|
||||
"contact_name": {
|
||||
"description": "联系人",
|
||||
"type": "string",
|
||||
"maxLength": 100,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_phone": {
|
||||
"description": "联系电话",
|
||||
"type": "string",
|
||||
"maxLength": 20,
|
||||
"minLength": 1
|
||||
},
|
||||
"extra_info": {
|
||||
"description": "补充信息",
|
||||
"type": "string"
|
||||
},
|
||||
"requirement": {
|
||||
"description": "需求描述",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
@@ -8340,88 +8408,137 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"company_name": {
|
||||
"description": "公司名称",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_email": {
|
||||
"description": "邮箱",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_name": {
|
||||
"description": "联系人",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_phone": {
|
||||
"description": "联系电话",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"extra_info": {
|
||||
"description": "补充信息",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_date": {
|
||||
"description": "跟进日期(RFC3339,如 2026-02-05T10:00:00Z)",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_record": {
|
||||
"description": "跟进记录",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "线索ID",
|
||||
"type": "string"
|
||||
},
|
||||
"internal_note": {
|
||||
"description": "内部备注",
|
||||
"type": "string"
|
||||
},
|
||||
"lead_no": {
|
||||
"description": "线索编号",
|
||||
"type": "string"
|
||||
},
|
||||
"requirement": {
|
||||
"description": "需求描述",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "状态",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LeadSummaryResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contacted_count": {
|
||||
"description": "已跟进数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"converted_count": {
|
||||
"description": "已成交数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"invalid_count": {
|
||||
"description": "已流失数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"pending_count": {
|
||||
"description": "待跟进数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"total_count": {
|
||||
"description": "线索总数",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LeadUpdateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"company_name": {
|
||||
"description": "公司名称",
|
||||
"type": "string",
|
||||
"maxLength": 200,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_email": {
|
||||
"description": "邮箱",
|
||||
"type": "string",
|
||||
"maxLength": 100
|
||||
},
|
||||
"contact_name": {
|
||||
"description": "联系人",
|
||||
"type": "string",
|
||||
"maxLength": 100,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_phone": {
|
||||
"description": "联系电话",
|
||||
"type": "string",
|
||||
"maxLength": 20,
|
||||
"minLength": 1
|
||||
},
|
||||
"extra_info": {
|
||||
"description": "补充信息",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_date": {
|
||||
"description": "跟进日期(RFC3339,如 2026-02-05T10:00:00Z)",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_record": {
|
||||
"description": "跟进记录",
|
||||
"type": "string"
|
||||
},
|
||||
"internal_note": {
|
||||
"description": "内部备注",
|
||||
"type": "string"
|
||||
},
|
||||
"requirement": {
|
||||
"description": "需求描述",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"status": {
|
||||
"description": "状态",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
@@ -9265,6 +9382,8 @@ var SwaggerInfo = &swag.Spec{
|
||||
Description: "软件授权管理平台API文档",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -2963,6 +2963,64 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/leads/summary": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "管理员获取企业线索汇总统计信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"企业线索"
|
||||
],
|
||||
"summary": "获取线索汇总",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.APIResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/models.LeadSummaryResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "未认证",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "权限不足",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "服务器内部错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/leads/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -4118,6 +4176,12 @@
|
||||
"name": "customer_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "授权码(模糊匹配)",
|
||||
"name": "code",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"normal",
|
||||
@@ -7886,7 +7950,6 @@
|
||||
"models.InvoiceCreateRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"invoice_type",
|
||||
"order_id",
|
||||
"receiver_email",
|
||||
@@ -7894,7 +7957,7 @@
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"description": "开票内容,必填,最大200字符",
|
||||
"description": "开票内容,非必填,最多200字符",
|
||||
"type": "string",
|
||||
"maxLength": 200
|
||||
},
|
||||
@@ -7924,7 +7987,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"description": "发票抬头,必填,最大200字符",
|
||||
"description": "发票抬头,必填,最多200字符",
|
||||
"type": "string",
|
||||
"maxLength": 200
|
||||
}
|
||||
@@ -8285,28 +8348,34 @@
|
||||
],
|
||||
"properties": {
|
||||
"company_name": {
|
||||
"description": "公司名称",
|
||||
"type": "string",
|
||||
"maxLength": 200,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_email": {
|
||||
"description": "邮箱",
|
||||
"type": "string",
|
||||
"maxLength": 100
|
||||
},
|
||||
"contact_name": {
|
||||
"description": "联系人",
|
||||
"type": "string",
|
||||
"maxLength": 100,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_phone": {
|
||||
"description": "联系电话",
|
||||
"type": "string",
|
||||
"maxLength": 20,
|
||||
"minLength": 1
|
||||
},
|
||||
"extra_info": {
|
||||
"description": "补充信息",
|
||||
"type": "string"
|
||||
},
|
||||
"requirement": {
|
||||
"description": "需求描述",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
@@ -8336,88 +8405,137 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"company_name": {
|
||||
"description": "公司名称",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_email": {
|
||||
"description": "邮箱",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_name": {
|
||||
"description": "联系人",
|
||||
"type": "string"
|
||||
},
|
||||
"contact_phone": {
|
||||
"description": "联系电话",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"extra_info": {
|
||||
"description": "补充信息",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_date": {
|
||||
"description": "跟进日期(RFC3339,如 2026-02-05T10:00:00Z)",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_record": {
|
||||
"description": "跟进记录",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "线索ID",
|
||||
"type": "string"
|
||||
},
|
||||
"internal_note": {
|
||||
"description": "内部备注",
|
||||
"type": "string"
|
||||
},
|
||||
"lead_no": {
|
||||
"description": "线索编号",
|
||||
"type": "string"
|
||||
},
|
||||
"requirement": {
|
||||
"description": "需求描述",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "状态",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LeadSummaryResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contacted_count": {
|
||||
"description": "已跟进数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"converted_count": {
|
||||
"description": "已成交数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"invalid_count": {
|
||||
"description": "已流失数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"pending_count": {
|
||||
"description": "待跟进数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"total_count": {
|
||||
"description": "线索总数",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.LeadUpdateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"company_name": {
|
||||
"description": "公司名称",
|
||||
"type": "string",
|
||||
"maxLength": 200,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_email": {
|
||||
"description": "邮箱",
|
||||
"type": "string",
|
||||
"maxLength": 100
|
||||
},
|
||||
"contact_name": {
|
||||
"description": "联系人",
|
||||
"type": "string",
|
||||
"maxLength": 100,
|
||||
"minLength": 1
|
||||
},
|
||||
"contact_phone": {
|
||||
"description": "联系电话",
|
||||
"type": "string",
|
||||
"maxLength": 20,
|
||||
"minLength": 1
|
||||
},
|
||||
"extra_info": {
|
||||
"description": "补充信息",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_date": {
|
||||
"description": "跟进日期(RFC3339,如 2026-02-05T10:00:00Z)",
|
||||
"type": "string"
|
||||
},
|
||||
"follow_up_record": {
|
||||
"description": "跟进记录",
|
||||
"type": "string"
|
||||
},
|
||||
"internal_note": {
|
||||
"description": "内部备注",
|
||||
"type": "string"
|
||||
},
|
||||
"requirement": {
|
||||
"description": "需求描述",
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"status": {
|
||||
"description": "状态",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
|
||||
@@ -1282,7 +1282,7 @@ definitions:
|
||||
models.InvoiceCreateRequest:
|
||||
properties:
|
||||
content:
|
||||
description: 开票内容,必填,最大200字符
|
||||
description: 开票内容,非必填,最多200字符
|
||||
maxLength: 200
|
||||
type: string
|
||||
invoice_type:
|
||||
@@ -1305,11 +1305,10 @@ definitions:
|
||||
description: 纳税人识别号,企业发票必填,个人发票可为空
|
||||
type: string
|
||||
title:
|
||||
description: 发票抬头,必填,最大200字符
|
||||
description: 发票抬头,必填,最多200字符
|
||||
maxLength: 200
|
||||
type: string
|
||||
required:
|
||||
- content
|
||||
- invoice_type
|
||||
- order_id
|
||||
- receiver_email
|
||||
@@ -1572,23 +1571,29 @@ definitions:
|
||||
models.LeadCreateRequest:
|
||||
properties:
|
||||
company_name:
|
||||
description: 公司名称
|
||||
maxLength: 200
|
||||
minLength: 1
|
||||
type: string
|
||||
contact_email:
|
||||
description: 邮箱
|
||||
maxLength: 100
|
||||
type: string
|
||||
contact_name:
|
||||
description: 联系人
|
||||
maxLength: 100
|
||||
minLength: 1
|
||||
type: string
|
||||
contact_phone:
|
||||
description: 联系电话
|
||||
maxLength: 20
|
||||
minLength: 1
|
||||
type: string
|
||||
extra_info:
|
||||
description: 补充信息
|
||||
type: string
|
||||
requirement:
|
||||
description: 需求描述
|
||||
minLength: 1
|
||||
type: string
|
||||
required:
|
||||
@@ -1613,63 +1618,105 @@ definitions:
|
||||
models.LeadResponse:
|
||||
properties:
|
||||
company_name:
|
||||
description: 公司名称
|
||||
type: string
|
||||
contact_email:
|
||||
description: 邮箱
|
||||
type: string
|
||||
contact_name:
|
||||
description: 联系人
|
||||
type: string
|
||||
contact_phone:
|
||||
description: 联系电话
|
||||
type: string
|
||||
created_at:
|
||||
description: 创建时间
|
||||
type: string
|
||||
extra_info:
|
||||
description: 补充信息
|
||||
type: string
|
||||
follow_up_date:
|
||||
description: 跟进日期(RFC3339,如 2026-02-05T10:00:00Z)
|
||||
type: string
|
||||
follow_up_record:
|
||||
description: 跟进记录
|
||||
type: string
|
||||
id:
|
||||
description: 线索ID
|
||||
type: string
|
||||
internal_note:
|
||||
description: 内部备注
|
||||
type: string
|
||||
lead_no:
|
||||
description: 线索编号
|
||||
type: string
|
||||
requirement:
|
||||
description: 需求描述
|
||||
type: string
|
||||
status:
|
||||
description: 状态
|
||||
type: string
|
||||
updated_at:
|
||||
description: 更新时间
|
||||
type: string
|
||||
type: object
|
||||
models.LeadSummaryResponse:
|
||||
properties:
|
||||
contacted_count:
|
||||
description: 已跟进数量
|
||||
type: integer
|
||||
converted_count:
|
||||
description: 已成交数量
|
||||
type: integer
|
||||
invalid_count:
|
||||
description: 已流失数量
|
||||
type: integer
|
||||
pending_count:
|
||||
description: 待跟进数量
|
||||
type: integer
|
||||
total_count:
|
||||
description: 线索总数
|
||||
type: integer
|
||||
type: object
|
||||
models.LeadUpdateRequest:
|
||||
properties:
|
||||
company_name:
|
||||
description: 公司名称
|
||||
maxLength: 200
|
||||
minLength: 1
|
||||
type: string
|
||||
contact_email:
|
||||
description: 邮箱
|
||||
maxLength: 100
|
||||
type: string
|
||||
contact_name:
|
||||
description: 联系人
|
||||
maxLength: 100
|
||||
minLength: 1
|
||||
type: string
|
||||
contact_phone:
|
||||
description: 联系电话
|
||||
maxLength: 20
|
||||
minLength: 1
|
||||
type: string
|
||||
extra_info:
|
||||
description: 补充信息
|
||||
type: string
|
||||
follow_up_date:
|
||||
description: 跟进日期(RFC3339,如 2026-02-05T10:00:00Z)
|
||||
type: string
|
||||
follow_up_record:
|
||||
description: 跟进记录
|
||||
type: string
|
||||
internal_note:
|
||||
description: 内部备注
|
||||
type: string
|
||||
requirement:
|
||||
description: 需求描述
|
||||
minLength: 1
|
||||
type: string
|
||||
status:
|
||||
description: 状态
|
||||
enum:
|
||||
- pending
|
||||
- contacted
|
||||
@@ -4266,6 +4313,40 @@ paths:
|
||||
summary: 更新线索状态
|
||||
tags:
|
||||
- 企业线索
|
||||
/api/leads/summary:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 管理员获取企业线索汇总统计信息
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 成功
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.APIResponse'
|
||||
- properties:
|
||||
data:
|
||||
$ref: '#/definitions/models.LeadSummaryResponse'
|
||||
type: object
|
||||
"401":
|
||||
description: 未认证
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErrorResponse'
|
||||
"403":
|
||||
description: 权限不足
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErrorResponse'
|
||||
"500":
|
||||
description: 服务器内部错误
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErrorResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 获取线索汇总
|
||||
tags:
|
||||
- 企业线索
|
||||
/api/packages:
|
||||
get:
|
||||
consumes:
|
||||
@@ -4790,6 +4871,10 @@ paths:
|
||||
in: query
|
||||
name: customer_id
|
||||
type: string
|
||||
- description: 授权码(模糊匹配)
|
||||
in: query
|
||||
name: code
|
||||
type: string
|
||||
- description: 状态筛选
|
||||
enum:
|
||||
- normal
|
||||
|
||||
Reference in new issue
Block a user