From 8adde93b8f2af29fb8a6405efaa49a41a1c22f8d Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 15 五月 2024 20:15:31 +0800
Subject: [PATCH] 上传音频时保存车站号,车次,车站到火车信息表,提供火车信息查询接口
---
docs/docs.go | 333 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 325 insertions(+), 8 deletions(-)
diff --git a/docs/docs.go b/docs/docs.go
index d16d13e..64c129c 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -17,7 +17,7 @@
"basePath": "{{.BasePath}}",
"paths": {
"/api-sa/v1/audio/batchDelete": {
- "post": {
+ "delete": {
"produces": [
"application/json"
],
@@ -27,7 +27,7 @@
"summary": "鎵归噺鍒犻櫎闊抽",
"parameters": [
{
- "description": "闊抽淇℃伅",
+ "description": "鍙傛暟",
"name": "object",
"in": "body",
"required": true,
@@ -57,7 +57,7 @@
"summary": "鎵归噺澶勭悊闊抽",
"parameters": [
{
- "description": "闊抽淇℃伅",
+ "description": "鍙傛暟",
"name": "object",
"in": "body",
"required": true,
@@ -77,7 +77,7 @@
}
},
"/api-sa/v1/audio/delete": {
- "post": {
+ "delete": {
"produces": [
"application/json"
],
@@ -87,7 +87,7 @@
"summary": "鍒犻櫎闊抽",
"parameters": [
{
- "description": "闊抽淇℃伅",
+ "description": "鍙傛暟",
"name": "object",
"in": "body",
"required": true,
@@ -101,6 +101,48 @@
"description": "鎴愬姛",
"schema": {
"$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-sa/v1/audio/follow": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "闊抽"
+ ],
+ "summary": "鍏虫敞/鍙栨秷鍏虫敞",
+ "parameters": [
+ {
+ "description": "鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.FollowReq"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/util.Response"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/response.FollowResp"
+ }
+ }
+ }
+ ]
}
}
}
@@ -195,7 +237,7 @@
"summary": "澶勭悊闊抽",
"parameters": [
{
- "description": "闊抽淇℃伅",
+ "description": "鍙傛暟",
"name": "object",
"in": "body",
"required": true,
@@ -209,6 +251,81 @@
"description": "鎴愬姛",
"schema": {
"$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-sa/v1/audio/trainInfoList": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "闊抽"
+ ],
+ "summary": "鑾峰彇鐏溅淇℃伅",
+ "parameters": [
+ {
+ "enum": [
+ 1,
+ 2,
+ 3
+ ],
+ "type": "integer",
+ "x-enum-comments": {
+ "ClassLocomotive": "鏈鸿溅",
+ "ClassStation": "杞︾珯",
+ "ClassTrain": "杞︽"
+ },
+ "x-enum-varnames": [
+ "ClassLocomotive",
+ "ClassTrain",
+ "ClassStation"
+ ],
+ "description": "淇℃伅鍒嗙被 1鏈鸿溅2杞︽3杞︾珯",
+ "name": "class",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "椤电爜",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "姣忛〉澶у皬",
+ "name": "pageSize",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "涓婄骇id",
+ "name": "parentID",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/util.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/models.TrainInfo"
+ }
+ }
+ }
+ }
+ ]
}
}
}
@@ -237,6 +354,90 @@
"description": "鎴愬姛",
"schema": {
"$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-sa/v1/text/add": {
+ "post": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鏂囧瓧搴�"
+ ],
+ "summary": "鏂板鏂囧瓧",
+ "parameters": [
+ {
+ "description": "鍙傛暟",
+ "name": "object",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/request.AddTextReq"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "$ref": "#/definitions/util.Response"
+ }
+ }
+ }
+ }
+ },
+ "/api-sa/v1/text/list": {
+ "get": {
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "鏂囧瓧搴�"
+ ],
+ "summary": "鏂囧瓧搴撳垪琛�",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "鍏抽敭瀛�",
+ "name": "keyword",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "椤电爜",
+ "name": "page",
+ "in": "query"
+ },
+ {
+ "type": "integer",
+ "description": "姣忛〉澶у皬",
+ "name": "pageSize",
+ "in": "query"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "鎴愬姛",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/util.ResponseList"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/models.Text"
+ }
+ }
+ }
+ }
+ ]
}
}
}
@@ -281,6 +482,24 @@
"x-enum-varnames": [
"BoolTypeTrue",
"BoolTypeFalse"
+ ]
+ },
+ "constvar.Class": {
+ "type": "integer",
+ "enum": [
+ 1,
+ 2,
+ 3
+ ],
+ "x-enum-comments": {
+ "ClassLocomotive": "鏈鸿溅",
+ "ClassStation": "杞︾珯",
+ "ClassTrain": "杞︽"
+ },
+ "x-enum-varnames": [
+ "ClassLocomotive",
+ "ClassTrain",
+ "ClassStation"
]
},
"gorm.DeletedAt": {
@@ -338,12 +557,16 @@
"occurrenceTime": {
"type": "string"
},
+ "score": {
+ "description": "缃俊搴�",
+ "type": "number"
+ },
"size": {
"description": "闊抽澶у皬",
"type": "integer"
},
- "stationNumber": {
- "description": "杞︾珯鍙�",
+ "station": {
+ "description": "杞︾珯",
"type": "string"
},
"trainNumber": {
@@ -351,6 +574,81 @@
"type": "string"
},
"updatedAt": {
+ "type": "string"
+ }
+ }
+ },
+ "models.Text": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "description": "闊抽鍚嶇О",
+ "type": "string"
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "deletedAt": {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "locomotiveNumber": {
+ "description": "鏈鸿溅鍙�",
+ "type": "string"
+ },
+ "updatedAt": {
+ "type": "string"
+ }
+ }
+ },
+ "models.TrainInfo": {
+ "type": "object",
+ "properties": {
+ "class": {
+ "description": "鍒嗙被",
+ "allOf": [
+ {
+ "$ref": "#/definitions/constvar.Class"
+ }
+ ]
+ },
+ "createdAt": {
+ "type": "string"
+ },
+ "deletedAt": {
+ "$ref": "#/definitions/gorm.DeletedAt"
+ },
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "description": "鍚嶇О",
+ "type": "string"
+ },
+ "parentID": {
+ "description": "涓婄骇id",
+ "type": "integer"
+ },
+ "updatedAt": {
+ "type": "string"
+ }
+ }
+ },
+ "request.AddTextReq": {
+ "type": "object",
+ "required": [
+ "content",
+ "locomotiveNumber"
+ ],
+ "properties": {
+ "content": {
+ "description": "闊抽鍚嶇О",
+ "type": "string"
+ },
+ "locomotiveNumber": {
+ "description": "鏈鸿溅鍙�",
"type": "string"
}
}
@@ -369,6 +667,17 @@
}
}
},
+ "request.FollowReq": {
+ "type": "object",
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer"
+ }
+ }
+ },
"request.ProcessAudio": {
"type": "object",
"required": [
@@ -380,6 +689,14 @@
}
}
},
+ "response.FollowResp": {
+ "type": "object",
+ "properties": {
+ "followStatus": {
+ "$ref": "#/definitions/constvar.BoolType"
+ }
+ }
+ },
"util.Response": {
"type": "object",
"properties": {
--
Gitblit v1.8.0