Ver Fonte

修改获取服务器时间BUG

zhou.xiaoning há 5 anos atrás
pai
commit
f6bf55c5da
5 ficheiros alterados com 64 adições e 5 exclusões
  1. 1 1
      controllers/hsby/hsby.go
  2. 22 1
      docs/docs.go
  3. 22 1
      docs/swagger.json
  4. 18 1
      docs/swagger.yaml
  5. 1 1
      models/common.go

+ 1 - 1
controllers/hsby/hsby.go

@@ -1021,7 +1021,7 @@ func QueryMyCollectionOrders(c *gin.Context) {
 // @Summary 查询海商报业相关市场信息
 // @Produce json
 // @Security ApiKeyAuth
-// @Success 200 {object} models.HsbyMyGoods
+// @Success 200 {object} models.HsbyMarketInfo
 // @Failure 500 {object} app.Response
 // @Router /HSBY/QueryHsbyMarkets [get]
 // @Tags 定制【海商报业】

+ 22 - 1
docs/docs.go

@@ -1570,7 +1570,7 @@ var doc = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.HsbyMyGoods"
+                            "$ref": "#/definitions/models.HsbyMarketInfo"
                         }
                     },
                     "500": {
@@ -6747,6 +6747,27 @@ var doc = `{
                 }
             }
         },
+        "models.HsbyMarketInfo": {
+            "type": "object",
+            "required": [
+                "marketid",
+                "trademode"
+            ],
+            "properties": {
+                "marketid": {
+                    "description": "市场ID正常5位,前三位固定:两位表示交易模式, 一位表示交易属性(1:收益权,2:所有权) 其它特殊市场:0-系统 1-交割服务 2-账户服务3-履约服务 4-仓单服务 5-积分服务 6-银行服务",
+                    "type": "integer"
+                },
+                "marketname": {
+                    "description": "市场名称",
+                    "type": "string"
+                },
+                "trademode": {
+                    "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
+                    "type": "integer"
+                }
+            }
+        },
         "models.HsbyMyGoods": {
             "type": "object",
             "required": [

+ 22 - 1
docs/swagger.json

@@ -1554,7 +1554,7 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.HsbyMyGoods"
+                            "$ref": "#/definitions/models.HsbyMarketInfo"
                         }
                     },
                     "500": {
@@ -6731,6 +6731,27 @@
                 }
             }
         },
+        "models.HsbyMarketInfo": {
+            "type": "object",
+            "required": [
+                "marketid",
+                "trademode"
+            ],
+            "properties": {
+                "marketid": {
+                    "description": "市场ID正常5位,前三位固定:两位表示交易模式, 一位表示交易属性(1:收益权,2:所有权) 其它特殊市场:0-系统 1-交割服务 2-账户服务3-履约服务 4-仓单服务 5-积分服务 6-银行服务",
+                    "type": "integer"
+                },
+                "marketname": {
+                    "description": "市场名称",
+                    "type": "string"
+                },
+                "trademode": {
+                    "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
+                    "type": "integer"
+                }
+            }
+        },
         "models.HsbyMyGoods": {
             "type": "object",
             "required": [

+ 18 - 1
docs/swagger.yaml

@@ -2392,6 +2392,23 @@ definitions:
     - marketid
     - trademode
     type: object
+  models.HsbyMarketInfo:
+    properties:
+      marketid:
+        description: 市场ID正常5位,前三位固定:两位表示交易模式, 一位表示交易属性(1:收益权,2:所有权) 其它特殊市场:0-系统 1-交割服务
+          2-账户服务3-履约服务 4-仓单服务 5-积分服务 6-银行服务
+        type: integer
+      marketname:
+        description: 市场名称
+        type: string
+      trademode:
+        description: 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式
+          21:竞拍-大宗式 22:受托竞价
+        type: integer
+    required:
+    - marketid
+    - trademode
+    type: object
   models.HsbyMyGoods:
     properties:
       accountid:
@@ -5979,7 +5996,7 @@ paths:
         "200":
           description: OK
           schema:
-            $ref: '#/definitions/models.HsbyMyGoods'
+            $ref: '#/definitions/models.HsbyMarketInfo'
         "500":
           description: Internal Server Error
           schema:

+ 1 - 1
models/common.go

@@ -631,7 +631,7 @@ func GetServerTime() (*string, error) {
 		return nil, err
 	}
 	if len(rst) > 0 {
-		r := rst[0]["sysdate"]
+		r := rst[0]["SYSDATE"]
 		return &r, nil
 	}