zhou.xiaoning před 5 roky
rodič
revize
a6b3518ef2
4 změnil soubory, kde provedl 54 přidání a 177 odebrání
  1. 1 1
      controllers/quote/history.go
  2. 18 63
      docs/docs.go
  3. 18 63
      docs/swagger.json
  4. 17 50
      docs/swagger.yaml

+ 1 - 1
controllers/quote/history.go

@@ -47,7 +47,7 @@ type QueryHistoryDatasReq struct {
 // @Param endTime query string false "结束时间,格式:yyyy-MM-dd HH:mm:ss"
 // @Param count query int false "条数"
 // @Param IsAsc query bool false "是否按时间顺序排序(默认为时间倒序排序)"
-// @Success 200 {object} models.HistoryData
+// @Success 200 {object} HistoryData
 // @Failure 500 {object} app.Response
 // @Router /Quote/QueryHistoryDatas [get]
 // @Tags 行情服务

+ 18 - 63
docs/docs.go

@@ -1546,7 +1546,7 @@ var doc = `{
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "周期类型, 0: 秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11: 日线 10: Tik",
+                        "description": "周期类型, 0-秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11: 日线 10: Tik",
                         "name": "cycleType",
                         "in": "query",
                         "required": true
@@ -1587,7 +1587,7 @@ var doc = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.CycleData"
+                            "$ref": "#/definitions/quote.HistoryData"
                         }
                     },
                     "500": {
@@ -3836,51 +3836,6 @@ var doc = `{
                 }
             }
         },
-        "models.CycleData": {
-            "type": "object",
-            "properties": {
-                "close": {
-                    "description": "收盘价",
-                    "type": "integer"
-                },
-                "gc": {
-                    "description": "商品代码",
-                    "type": "string"
-                },
-                "high": {
-                    "description": "最高价",
-                    "type": "integer"
-                },
-                "hv": {
-                    "description": "持仓量",
-                    "type": "integer"
-                },
-                "low": {
-                    "description": "最低价",
-                    "type": "integer"
-                },
-                "open": {
-                    "description": "开盘价",
-                    "type": "integer"
-                },
-                "sp": {
-                    "description": "结算价,日线周期(包括)以上才有",
-                    "type": "integer"
-                },
-                "sst": {
-                    "description": "时间文本",
-                    "type": "string"
-                },
-                "tt": {
-                    "description": "总金额",
-                    "type": "integer"
-                },
-                "tv": {
-                    "description": "总量",
-                    "type": "integer"
-                }
-            }
-        },
         "models.Division": {
             "type": "object",
             "required": [
@@ -6267,41 +6222,41 @@ var doc = `{
         "quote.HistoryData": {
             "type": "object",
             "properties": {
-                "Opened": {
-                    "description": "开盘价",
-                    "type": "number"
-                },
-                "closed": {
+                "c": {
                     "description": "收盘价",
                     "type": "number"
                 },
-                "highest": {
-                    "description": "收盘价",
+                "h": {
+                    "description": "最高价",
                     "type": "number"
                 },
-                "holdVolume": {
+                "hv": {
                     "description": "持仓量",
-                    "type": "number"
+                    "type": "integer"
                 },
-                "lowest": {
+                "l": {
                     "description": "最低价",
                     "type": "number"
                 },
-                "settle": {
-                    "description": "结算价",
+                "o": {
+                    "description": "开盘价",
                     "type": "number"
                 },
-                "timeStamp": {
+                "s": {
+                    "description": "结算价,日线周期(包括)以上才有",
+                    "type": "number"
+                },
+                "ts": {
                     "description": "开盘时间",
                     "type": "string"
                 },
-                "totleTurnover": {
+                "tt": {
                     "description": "总金额",
                     "type": "number"
                 },
-                "totleVolume": {
+                "tv": {
                     "description": "总量",
-                    "type": "number"
+                    "type": "integer"
                 }
             }
         },

+ 18 - 63
docs/swagger.json

@@ -1530,7 +1530,7 @@
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "周期类型, 0: 秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11: 日线 10: Tik",
+                        "description": "周期类型, 0-秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11: 日线 10: Tik",
                         "name": "cycleType",
                         "in": "query",
                         "required": true
@@ -1571,7 +1571,7 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.CycleData"
+                            "$ref": "#/definitions/quote.HistoryData"
                         }
                     },
                     "500": {
@@ -3820,51 +3820,6 @@
                 }
             }
         },
-        "models.CycleData": {
-            "type": "object",
-            "properties": {
-                "close": {
-                    "description": "收盘价",
-                    "type": "integer"
-                },
-                "gc": {
-                    "description": "商品代码",
-                    "type": "string"
-                },
-                "high": {
-                    "description": "最高价",
-                    "type": "integer"
-                },
-                "hv": {
-                    "description": "持仓量",
-                    "type": "integer"
-                },
-                "low": {
-                    "description": "最低价",
-                    "type": "integer"
-                },
-                "open": {
-                    "description": "开盘价",
-                    "type": "integer"
-                },
-                "sp": {
-                    "description": "结算价,日线周期(包括)以上才有",
-                    "type": "integer"
-                },
-                "sst": {
-                    "description": "时间文本",
-                    "type": "string"
-                },
-                "tt": {
-                    "description": "总金额",
-                    "type": "integer"
-                },
-                "tv": {
-                    "description": "总量",
-                    "type": "integer"
-                }
-            }
-        },
         "models.Division": {
             "type": "object",
             "required": [
@@ -6251,41 +6206,41 @@
         "quote.HistoryData": {
             "type": "object",
             "properties": {
-                "Opened": {
-                    "description": "开盘价",
-                    "type": "number"
-                },
-                "closed": {
+                "c": {
                     "description": "收盘价",
                     "type": "number"
                 },
-                "highest": {
-                    "description": "收盘价",
+                "h": {
+                    "description": "最高价",
                     "type": "number"
                 },
-                "holdVolume": {
+                "hv": {
                     "description": "持仓量",
-                    "type": "number"
+                    "type": "integer"
                 },
-                "lowest": {
+                "l": {
                     "description": "最低价",
                     "type": "number"
                 },
-                "settle": {
-                    "description": "结算价",
+                "o": {
+                    "description": "开盘价",
                     "type": "number"
                 },
-                "timeStamp": {
+                "s": {
+                    "description": "结算价,日线周期(包括)以上才有",
+                    "type": "number"
+                },
+                "ts": {
                     "description": "开盘时间",
                     "type": "string"
                 },
-                "totleTurnover": {
+                "tt": {
                     "description": "总金额",
                     "type": "number"
                 },
-                "totleVolume": {
+                "tv": {
                     "description": "总量",
-                    "type": "number"
+                    "type": "integer"
                 }
             }
         },

+ 17 - 50
docs/swagger.yaml

@@ -1200,39 +1200,6 @@ definitions:
     required:
     - spotcontractid
     type: object
-  models.CycleData:
-    properties:
-      close:
-        description: 收盘价
-        type: integer
-      gc:
-        description: 商品代码
-        type: string
-      high:
-        description: 最高价
-        type: integer
-      hv:
-        description: 持仓量
-        type: integer
-      low:
-        description: 最低价
-        type: integer
-      open:
-        description: 开盘价
-        type: integer
-      sp:
-        description: 结算价,日线周期(包括)以上才有
-        type: integer
-      sst:
-        description: 时间文本
-        type: string
-      tt:
-        description: 总金额
-        type: integer
-      tv:
-        description: 总量
-        type: integer
-    type: object
   models.Division:
     properties:
       autoid:
@@ -3045,33 +3012,33 @@ definitions:
     type: object
   quote.HistoryData:
     properties:
-      Opened:
-        description: 开盘价
-        type: number
-      closed:
+      c:
         description: 收盘价
         type: number
-      highest:
-        description: 收盘
+      h:
+        description: 最高
         type: number
-      holdVolume:
+      hv:
         description: 持仓量
-        type: number
-      lowest:
+        type: integer
+      l:
         description: 最低价
         type: number
-      settle:
-        description: 结算价
+      o:
+        description: 开盘价
+        type: number
+      s:
+        description: 结算价,日线周期(包括)以上才有
         type: number
-      timeStamp:
+      ts:
         description: 开盘时间
         type: string
-      totleTurnover:
+      tt:
         description: 总金额
         type: number
-      totleVolume:
+      tv:
         description: 总量
-        type: number
+        type: integer
     type: object
   quote.QueryTSDataRsp:
     properties:
@@ -4529,7 +4496,7 @@ paths:
   /Quote/QueryHistoryDatas:
     get:
       parameters:
-      - description: '周期类型, 0: 秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11:
+      - description: '周期类型, 0-秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11:
           日线 10: Tik'
         in: query
         name: cycleType
@@ -4562,7 +4529,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/models.CycleData'
+            $ref: '#/definitions/quote.HistoryData'
         "500":
           description: Internal Server Error
           schema: