3274 lines
112 KiB
Go
3274 lines
112 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||
package docs
|
||
|
||
import "github.com/swaggo/swag"
|
||
|
||
const docTemplate = `{
|
||
"schemes": {{ marshal .Schemes }},
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"description": "{{escape .Description}}",
|
||
"title": "{{.Title}}",
|
||
"contact": {},
|
||
"version": "{{.Version}}"
|
||
},
|
||
"host": "{{.Host}}",
|
||
"basePath": "{{.BasePath}}",
|
||
"paths": {
|
||
"/admin/gateways": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询网关列表,支持关键词/售出状态/项目类型/区域筛选。超级管理员可查全部,操作员只能查所属区域",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"网关管理"
|
||
],
|
||
"summary": "获取网关列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(名称/MAC模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "售出状态",
|
||
"name": "isSold",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "项目类型",
|
||
"name": "projectType",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "区域ID",
|
||
"name": "regionId",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的网关记录,自动同步到产品库存",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"网关管理"
|
||
],
|
||
"summary": "创建网关",
|
||
"parameters": [
|
||
{
|
||
"description": "网关信息",
|
||
"name": "gateway",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.gatewayPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "MAC地址已存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/gateways/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定网关的详细信息,自动同步到产品库存",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"网关管理"
|
||
],
|
||
"summary": "更新网关信息",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "网关ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "gateway",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.gatewayPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "网关不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定网关(已售出的网关禁止删除),自动同步删除产品库存",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"网关管理"
|
||
],
|
||
"summary": "删除网关",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "网关ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "已售出无法删除",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "网关不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/kindergartens": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询幼儿园列表,支持按名称/地址模糊搜索",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"幼儿园管理"
|
||
],
|
||
"summary": "获取幼儿园列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(名称/地址模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的幼儿园记录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"幼儿园管理"
|
||
],
|
||
"summary": "创建幼儿园",
|
||
"parameters": [
|
||
{
|
||
"description": "幼儿园信息",
|
||
"name": "kindergarten",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.kindergartenPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/kindergartens/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定幼儿园的名称、地址和区域",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"幼儿园管理"
|
||
],
|
||
"summary": "更新幼儿园信息",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "幼儿园ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "kindergarten",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.kindergartenPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "幼儿园不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定幼儿园,如果被用户绑定则无法删除",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"幼儿园管理"
|
||
],
|
||
"summary": "删除幼儿园",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "幼儿园ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "幼儿园不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "已绑定用户无法删除",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-definitions": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询产品定义列表,支持按关键词/分类/启用状态筛选",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品定义管理"
|
||
],
|
||
"summary": "获取产品定义列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(代码/名称/描述模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "分类筛选",
|
||
"name": "category",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "是否启用",
|
||
"name": "isActive",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的产品定义",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品定义管理"
|
||
],
|
||
"summary": "创建产品定义",
|
||
"parameters": [
|
||
{
|
||
"description": "产品定义信息",
|
||
"name": "productDefinition",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productDefinitionPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-definitions/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定产品定义的信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品定义管理"
|
||
],
|
||
"summary": "更新产品定义",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "产品定义ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "productDefinition",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productDefinitionPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "产品定义不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定产品定义(被库存或模板引用的无法删除)",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品定义管理"
|
||
],
|
||
"summary": "删除产品定义",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "产品定义ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "产品定义不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "已被引用无法删除",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-inventories": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询产品库存列表,支持多条件筛选",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品库存管理"
|
||
],
|
||
"summary": "获取产品库存列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(资产名称/序列号/购买方等模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "产品代码筛选",
|
||
"name": "productCode",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "项目类型代码筛选",
|
||
"name": "projectTypeCode",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "套件代码筛选",
|
||
"name": "suiteCode",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "状态筛选",
|
||
"name": "status",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "购买方类型筛选",
|
||
"name": "soldTargetType",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "区域ID",
|
||
"name": "regionId",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的产品库存记录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品库存管理"
|
||
],
|
||
"summary": "创建产品库存记录",
|
||
"parameters": [
|
||
{
|
||
"description": "库存信息",
|
||
"name": "inventory",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productInventoryPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-inventories/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定产品库存记录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品库存管理"
|
||
],
|
||
"summary": "更新产品库存",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "库存ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "inventory",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productInventoryPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "库存记录不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定产品库存记录(已售出的无法删除)",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品库存管理"
|
||
],
|
||
"summary": "删除产品库存",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "库存ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "库存记录不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "已售出无法删除",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-prototypes": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询产品原型列表,支持按关键词/产品代码/项目类型筛选",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品原型管理"
|
||
],
|
||
"summary": "获取产品原型列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(名称/备注模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "产品代码筛选",
|
||
"name": "productCode",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "项目类型代码筛选",
|
||
"name": "projectTypeCode",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的产品原型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品原型管理"
|
||
],
|
||
"summary": "创建产品原型",
|
||
"parameters": [
|
||
{
|
||
"description": "产品原型信息",
|
||
"name": "productPrototype",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productPrototypePayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-prototypes/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定产品原型的信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品原型管理"
|
||
],
|
||
"summary": "更新产品原型",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "产品原型ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "productPrototype",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productPrototypePayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "产品原型不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定产品原型",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品原型管理"
|
||
],
|
||
"summary": "删除产品原型",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "产品原型ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "产品原型不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-suites": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询产品套件列表,含套件下的库存明细",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品套件管理"
|
||
],
|
||
"summary": "获取产品套件列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(代码/名称/备注模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "项目类型代码筛选",
|
||
"name": "projectTypeCode",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的产品套件,可选关联库存记录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品套件管理"
|
||
],
|
||
"summary": "创建产品套件",
|
||
"parameters": [
|
||
{
|
||
"description": "套件信息",
|
||
"name": "suite",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productSuitePayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/product-suites/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定产品套件的信息和关联库存",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品套件管理"
|
||
],
|
||
"summary": "更新产品套件",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "套件ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "suite",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.productSuitePayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "套件不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定产品套件,自动解除关联库存的绑定",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"产品套件管理"
|
||
],
|
||
"summary": "删除产品套件",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "套件ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "套件不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/project-product-templates": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询项目产品模板列表,含项目类型和产品名称",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"项目产品模板管理"
|
||
],
|
||
"summary": "获取项目产品模板列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目类型代码筛选",
|
||
"name": "projectTypeCode",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/project-types": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询项目类型列表,支持按关键词/是否支持网关/是否启用筛选",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"项目类型管理"
|
||
],
|
||
"summary": "获取项目类型列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(代码/名称/描述模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "是否支持网关",
|
||
"name": "supportsGateway",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "是否启用",
|
||
"name": "isActive",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的项目类型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"项目类型管理"
|
||
],
|
||
"summary": "创建项目类型",
|
||
"parameters": [
|
||
{
|
||
"description": "项目类型信息",
|
||
"name": "projectType",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.projectTypePayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/project-types/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定项目类型的信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"项目类型管理"
|
||
],
|
||
"summary": "更新项目类型",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "项目类型ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "projectType",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.projectTypePayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "项目类型不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定项目类型(被网关引用的无法删除)",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"项目类型管理"
|
||
],
|
||
"summary": "删除项目类型",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "项目类型ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "项目类型不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "已被网关引用无法删除",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/statistics/ai-analysis": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按区域统计AI分析的使用情况,包括调用次数、Token消耗、费用等",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"统计管理"
|
||
],
|
||
"summary": "AI分析区域统计",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "区域ID",
|
||
"name": "regionId",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "开始时间(毫秒时间戳)",
|
||
"name": "startTime",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "结束时间(毫秒时间戳)",
|
||
"name": "endTime",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/statistics/ai-analysis-records": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "分页查询AI分析记录,支持按区域和时间范围筛选",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"统计管理"
|
||
],
|
||
"summary": "获取AI分析记录列表",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "页码(默认1)",
|
||
"name": "pageNum",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "每页数量(默认10,最大100)",
|
||
"name": "pageSize",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "区域ID",
|
||
"name": "regionId",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "开始时间(毫秒时间戳)",
|
||
"name": "startTime",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "结束时间(毫秒时间戳)",
|
||
"name": "endTime",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/statistics/ai-analysis-records/{id}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定的AI分析记录",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"统计管理"
|
||
],
|
||
"summary": "删除AI分析记录",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "记录ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "记录不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/statistics/ai-analysis-timeline": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按日期统计AI分析的使用情况趋势,含总体和分区域数据",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"统计管理"
|
||
],
|
||
"summary": "AI分析时间线统计",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "区域ID",
|
||
"name": "regionId",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "开始时间(毫秒时间戳)",
|
||
"name": "startTime",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "结束时间(毫秒时间戳)",
|
||
"name": "endTime",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/statistics/mqtt-training-sessions": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "按区域统计MQTT训练会话情况,包括开始、结束、完成、进行中的会话数",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"统计管理"
|
||
],
|
||
"summary": "训练会话区域统计",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "区域ID",
|
||
"name": "regionId",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "类型筛选",
|
||
"name": "flavorType",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "开始时间(毫秒时间戳)",
|
||
"name": "startTime",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "结束时间(毫秒时间戳)",
|
||
"name": "endTime",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/system-debug/mqtt/start": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "启动MQTT调试服务",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"系统调试"
|
||
],
|
||
"summary": "启动MQTT调试",
|
||
"parameters": [
|
||
{
|
||
"description": "是否持久化到数据库",
|
||
"name": "persist",
|
||
"in": "body",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.mqttDebugStartRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "启动成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/system-debug/mqtt/status": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取MQTT调试服务的当前运行状态",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"系统调试"
|
||
],
|
||
"summary": "获取MQTT调试状态",
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/system-debug/mqtt/stop": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "停止MQTT调试服务",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"系统调试"
|
||
],
|
||
"summary": "停止MQTT调试",
|
||
"responses": {
|
||
"200": {
|
||
"description": "停止成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/system-debug/mqtt/ws": {
|
||
"get": {
|
||
"description": "通过WebSocket实时监听MQTT消息(需要SuperAdmin权限)",
|
||
"tags": [
|
||
"系统调试"
|
||
],
|
||
"summary": "MQTT WebSocket连接",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "JWT Token",
|
||
"name": "token",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"101": {
|
||
"description": "切换为WebSocket协议"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/users": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "查询系统用户列表,支持按关键词/角色/类型筛选",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户管理"
|
||
],
|
||
"summary": "获取用户列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "关键词(用户名/邮箱/手机号模糊搜索)",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "角色筛选",
|
||
"name": "role",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "类型筛选",
|
||
"name": "flavorType",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的系统用户",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户管理"
|
||
],
|
||
"summary": "创建用户",
|
||
"parameters": [
|
||
{
|
||
"description": "用户信息",
|
||
"name": "user",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.userAdminPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/admin/users/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定用户的详细信息,支持重置密码和吊销Token",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户管理"
|
||
],
|
||
"summary": "更新用户信息",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "用户ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新信息",
|
||
"name": "user",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.userAdminPayload"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "用户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定用户(不能删除admin账号和当前登录用户)",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户管理"
|
||
],
|
||
"summary": "删除用户",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "用户ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "无法删除受保护账号",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "用户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/gateways/by-mac": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据MAC地址查询网关信息(支持格式兼容:带冒号/横线/纯数字)",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"网关管理"
|
||
],
|
||
"summary": "按MAC查询网关",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "MAC地址",
|
||
"name": "mac",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "MAC参数为空",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "未找到该网关",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/lesson-plans": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取教案文件列表(非分页),按创建时间倒序",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"教案管理"
|
||
],
|
||
"summary": "获取教案列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/lesson-plans/page": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "分页获取教案文件列表,支持文件名模糊搜索、上传者搜索、区域筛选、排序",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"教案管理"
|
||
],
|
||
"summary": "分页查询教案",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "页码(默认1)",
|
||
"name": "pageNum",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "每页数量(默认10,最大100)",
|
||
"name": "pageSize",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "文件名模糊搜索",
|
||
"name": "keyword",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "上传者名模糊搜索",
|
||
"name": "uploaderName",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "区域ID",
|
||
"name": "regionId",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "排序字段: file_size | created_at",
|
||
"name": "sortBy",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "排序方向: asc | desc",
|
||
"name": "sortOrder",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/lesson-plans/share/{code}/download": {
|
||
"get": {
|
||
"description": "通过6位分享码下载教案文件(无需认证)",
|
||
"produces": [
|
||
"application/octet-stream"
|
||
],
|
||
"tags": [
|
||
"教案管理"
|
||
],
|
||
"summary": "通过分享码下载教案",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "6位分享码",
|
||
"name": "code",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "教案文件",
|
||
"schema": {
|
||
"type": "file"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "分享码无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "分享码过期或不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/lesson-plans/upload": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "上传 .docx 格式的教案文件,支持MD5去重,最大10MB",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"教案管理"
|
||
],
|
||
"summary": "上传教案文件",
|
||
"parameters": [
|
||
{
|
||
"type": "file",
|
||
"description": "教案文件(.docx)",
|
||
"name": "file",
|
||
"in": "formData",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "上传成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "文件已存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/lesson-plans/{id}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除教案文件及其关联的分享码",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"教案管理"
|
||
],
|
||
"summary": "删除教案文件",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "教案ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "无权限",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "文件不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/lesson-plans/{id}/download": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "通过ID下载教案文件,自动更新下载计数和最后下载时间",
|
||
"produces": [
|
||
"application/octet-stream"
|
||
],
|
||
"tags": [
|
||
"教案管理"
|
||
],
|
||
"summary": "下载教案文件",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "教案ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "教案文件",
|
||
"schema": {
|
||
"type": "file"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "无权限",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "文件不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/lesson-plans/{id}/share-code": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "为教案文件生成6位数字分享码,有效期5分钟,每次生成会失效之前的分享码",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"教案管理"
|
||
],
|
||
"summary": "生成分享码",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "教案ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "生成成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "无权限",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "文件不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/login": {
|
||
"post": {
|
||
"description": "用户名密码登录,返回JWT Token和用户信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"认证"
|
||
],
|
||
"summary": "用户登录",
|
||
"parameters": [
|
||
{
|
||
"description": "登录信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagLoginRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "登录成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "用户名或密码错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "用户已禁用",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/register": {
|
||
"post": {
|
||
"description": "注册新用户,返回JWT Token",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"认证"
|
||
],
|
||
"summary": "用户注册",
|
||
"parameters": [
|
||
{
|
||
"description": "注册信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagRegisterRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "注册成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "用户名已存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/step": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "接收并保存踏步训练记录,包含心率和步频数据,异步计算回归结果",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"踏步训练"
|
||
],
|
||
"summary": "创建踏步训练记录",
|
||
"parameters": [
|
||
{
|
||
"description": "踏步训练记录",
|
||
"name": "record",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "保存成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/step/train-data/{trainId}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据训练ID获取踏步训练的详细信息,包含心率和步频数据",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"踏步训练"
|
||
],
|
||
"summary": "获取踏步训练详情",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "训练ID",
|
||
"name": "trainId",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "训练记录不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/step/train-rank/{trainId}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据训练ID和回归类型获取训练排名",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"踏步训练"
|
||
],
|
||
"summary": "获取训练排名",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "训练ID",
|
||
"name": "trainId",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "回归类型: 1=线性回归 | 3=二次回归",
|
||
"name": "type",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/step/train-records": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "分页获取当前用户的踏步训练记录,按开始时间倒序",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"踏步训练"
|
||
],
|
||
"summary": "获取踏步训练记录列表",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "页码(默认1)",
|
||
"name": "pageNum",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "每页数量(默认10,最大100)",
|
||
"name": "pageSize",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/train-records": {
|
||
"post": {
|
||
"description": "接收并保存训练记录及心率数据,支持重复上传(按train_id去重更新)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"训练管理"
|
||
],
|
||
"summary": "创建训练记录",
|
||
"parameters": [
|
||
{
|
||
"description": "训练记录数据",
|
||
"name": "record",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "保存成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/train-records/analysis": {
|
||
"get": {
|
||
"description": "对历史心率数据进行统计分析和正态分布曲线拟合",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"训练管理"
|
||
],
|
||
"summary": "心率曲线分析",
|
||
"responses": {
|
||
"200": {
|
||
"description": "分析成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "数据量不足",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/train-records/analysis-by-ai": {
|
||
"post": {
|
||
"description": "上传心率CSV和教案文件,通过AI生成课堂分析报告,支持流式和非流式输出",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"AI分析"
|
||
],
|
||
"summary": "AI分析",
|
||
"parameters": [
|
||
{
|
||
"type": "file",
|
||
"description": "心率数据CSV文件",
|
||
"name": "heart_rate_data",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "步数数据CSV文件(analysis_type为heart_rate_with_steps时必填)",
|
||
"name": "step_data",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "教案DOCX文件(teaching_plan_source为upload/wechat时必填)",
|
||
"name": "teaching_plan",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "分析类型: heart_rate_only(默认) | heart_rate_with_steps",
|
||
"name": "analysis_type",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "教案来源: upload(默认) | cloud | wechat",
|
||
"name": "teaching_plan_source",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "区域ID",
|
||
"name": "regionid",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "训练ID",
|
||
"name": "trainid",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "云端教案ID(teaching_plan_source=cloud时必填)",
|
||
"name": "lesson_plan_id",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "是否流式输出: true | false",
|
||
"name": "stream",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "分析成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/train-records/cloud-files": {
|
||
"get": {
|
||
"description": "获取所有云端教案文件列表",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"训练管理"
|
||
],
|
||
"summary": "获取云端教案列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/train-records/session": {
|
||
"post": {
|
||
"description": "上传训练开始/结束会话,用于MQTT训练会话追踪",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"训练管理"
|
||
],
|
||
"summary": "上传训练会话",
|
||
"parameters": [
|
||
{
|
||
"description": "训练会话数据",
|
||
"name": "session",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.trainingSessionRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/controllers.SwagAPIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"controllers.SwagAPIResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "HTTP状态码",
|
||
"type": "integer"
|
||
},
|
||
"data": {
|
||
"description": "响应数据"
|
||
},
|
||
"msg": {
|
||
"description": "响应消息",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"controllers.SwagLoginRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"password": {
|
||
"description": "密码",
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"description": "用户名",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"controllers.SwagRegisterRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"flavorType": {
|
||
"description": "类型",
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"description": "密码",
|
||
"type": "string"
|
||
},
|
||
"regionIds": {
|
||
"description": "区域ID列表",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"role": {
|
||
"description": "角色",
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"description": "用户名",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"controllers.gatewayPayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"isSold": {
|
||
"type": "boolean"
|
||
},
|
||
"location": {
|
||
"type": "string"
|
||
},
|
||
"mac": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"projectType": {
|
||
"type": "string"
|
||
},
|
||
"regionId": {
|
||
"type": "integer"
|
||
},
|
||
"soldAt": {
|
||
"description": "SoldAt 是可选字段。如果 IsSold 为 true 且未传此字段,后端自动设为当前时间",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"controllers.kindergartenPayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"address": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"regionId": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"controllers.mqttDebugStartRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"persistToDatabase": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"controllers.productDefinitionPayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"category": {
|
||
"type": "string"
|
||
},
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"isActive": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"parameterSchema": {
|
||
"type": "string"
|
||
},
|
||
"sort": {
|
||
"type": "integer"
|
||
},
|
||
"trackSerialNumber": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"controllers.productInventoryPayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"assetName": {
|
||
"type": "string"
|
||
},
|
||
"notes": {
|
||
"type": "string"
|
||
},
|
||
"parameterValues": {
|
||
"type": "string"
|
||
},
|
||
"productCode": {
|
||
"type": "string"
|
||
},
|
||
"projectTypeCode": {
|
||
"type": "string"
|
||
},
|
||
"regionId": {
|
||
"type": "integer"
|
||
},
|
||
"serialNumber": {
|
||
"type": "string"
|
||
},
|
||
"soldAt": {
|
||
"type": "string"
|
||
},
|
||
"soldTargetName": {
|
||
"type": "string"
|
||
},
|
||
"soldTargetType": {
|
||
"type": "string"
|
||
},
|
||
"soldTo": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"storageLocation": {
|
||
"type": "string"
|
||
},
|
||
"suiteCode": {
|
||
"type": "string"
|
||
},
|
||
"suiteId": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"controllers.productPrototypePayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"assetName": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"notes": {
|
||
"type": "string"
|
||
},
|
||
"parameterValues": {
|
||
"type": "string"
|
||
},
|
||
"productCode": {
|
||
"type": "string"
|
||
},
|
||
"projectTypeCode": {
|
||
"type": "string"
|
||
},
|
||
"regionId": {
|
||
"type": "integer"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"storageLocation": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"controllers.productSuitePayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"inventoryIds": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"notes": {
|
||
"type": "string"
|
||
},
|
||
"projectTypeCode": {
|
||
"type": "string"
|
||
},
|
||
"regionId": {
|
||
"type": "integer"
|
||
},
|
||
"soldTargetName": {
|
||
"type": "string"
|
||
},
|
||
"soldTargetType": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"controllers.projectTypePayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"isActive": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"sort": {
|
||
"type": "integer"
|
||
},
|
||
"supportsGateway": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"controllers.trainingSessionRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"age": {
|
||
"type": "integer"
|
||
},
|
||
"aiResult": {
|
||
"type": "string"
|
||
},
|
||
"appName": {
|
||
"type": "string"
|
||
},
|
||
"duration": {
|
||
"type": "integer"
|
||
},
|
||
"endTime": {
|
||
"type": "integer"
|
||
},
|
||
"evaluation": {
|
||
"type": "string"
|
||
},
|
||
"gender": {
|
||
"type": "string"
|
||
},
|
||
"isStart": {
|
||
"type": "boolean"
|
||
},
|
||
"maxHeartRate": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"peopleNum": {
|
||
"type": "integer"
|
||
},
|
||
"regionId": {
|
||
"type": "integer"
|
||
},
|
||
"runType": {
|
||
"type": "string"
|
||
},
|
||
"testTime": {
|
||
"type": "integer"
|
||
},
|
||
"tid": {
|
||
"type": "integer"
|
||
},
|
||
"time": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"controllers.userAdminPayload": {
|
||
"type": "object",
|
||
"properties": {
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"flavorType": {
|
||
"$ref": "#/definitions/models.UserFlavorType"
|
||
},
|
||
"isActive": {
|
||
"type": "boolean"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"regionIds": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"revokeTokens": {
|
||
"type": "boolean"
|
||
},
|
||
"role": {
|
||
"$ref": "#/definitions/models.UserRole"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.UserFlavorType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"all",
|
||
"flink",
|
||
"full",
|
||
"light",
|
||
"heartrate",
|
||
"run50"
|
||
],
|
||
"x-enum-varnames": [
|
||
"UserFlavorAll",
|
||
"UserFlavorFlink",
|
||
"UserFlavorFull",
|
||
"UserFlavorLight",
|
||
"UserFlavorHeartRate",
|
||
"UserFlavorRun50"
|
||
]
|
||
},
|
||
"models.UserRole": {
|
||
"type": "string",
|
||
"enum": [
|
||
"super_admin",
|
||
"region_admin",
|
||
"operator",
|
||
"viewer"
|
||
],
|
||
"x-enum-varnames": [
|
||
"UserRoleSuperAdmin",
|
||
"UserRoleRegionAdmin",
|
||
"UserRoleOperator",
|
||
"UserRoleViewer"
|
||
]
|
||
}
|
||
},
|
||
"securityDefinitions": {
|
||
"BearerAuth": {
|
||
"type": "apiKey",
|
||
"name": "Authorization",
|
||
"in": "header"
|
||
}
|
||
}
|
||
}`
|
||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||
var SwaggerInfo = &swag.Spec{
|
||
Version: "1.0",
|
||
Host: "localhost:8081",
|
||
BasePath: "/api/v1",
|
||
Schemes: []string{},
|
||
Title: "智能心率采集分析平台 API",
|
||
Description: "智能心率采集分析平台后端服务,基于 Gin 框架,提供心率采集、AI 分析、教案管理、设备管理等功能",
|
||
InfoInstanceName: "swagger",
|
||
SwaggerTemplate: docTemplate,
|
||
}
|
||
|
||
func init() {
|
||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||
}
|