Browse Source

fix:路由生成

Roc 3 years ago
parent
commit
e5053782f1
3 changed files with 175 additions and 15 deletions
  1. 9 0
      routers/commentsRouter_controllers.go
  2. 95 8
      swagger/swagger.json
  3. 71 7
      swagger/swagger.yml

+ 9 - 0
routers/commentsRouter_controllers.go

@@ -25,6 +25,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_edb_lib/controllers:CalculateController"] = append(beego.GlobalControllerRouter["hongze/hongze_edb_lib/controllers:CalculateController"],
+        beego.ControllerComments{
+            Method: "Refresh",
+            Router: "/refresh",
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_edb_lib/controllers:LtController"] = append(beego.GlobalControllerRouter["hongze/hongze_edb_lib/controllers:LtController"],
         beego.ControllerComments{
             Method: "Add",

+ 95 - 8
swagger/swagger.json

@@ -26,7 +26,7 @@
                     "200": {
                         "description": "",
                         "schema": {
-                            "$ref": "#/definitions/data_manage.EditEdbInfoReq"
+                            "$ref": "#/definitions/models.EditEdbInfoReq"
                         }
                     }
                 }
@@ -46,7 +46,7 @@
                         "description": "type json string",
                         "required": true,
                         "schema": {
-                            "$ref": "#/definitions/data_manage.EdbInfoCalculateBatchSaveReq"
+                            "$ref": "#/definitions/models.EdbInfoCalculateBatchSaveReq"
                         }
                     }
                 ],
@@ -57,6 +57,23 @@
                 }
             }
         },
+        "/calculate/refresh": {
+            "post": {
+                "tags": [
+                    "calculate"
+                ],
+                "description": "刷新计算指标接口",
+                "operationId": "CalculateController.刷新计算指标接口",
+                "responses": {
+                    "200": {
+                        "description": "",
+                        "schema": {
+                            "$ref": "#/definitions/models.RefreshEdbInfoReq"
+                        }
+                    }
+                }
+            }
+        },
         "/lt/add": {
             "post": {
                 "tags": [
@@ -331,12 +348,8 @@
         }
     },
     "definitions": {
-        "data_manage.EdbInfoCalculateBatchSaveReq": {
-            "title": "EdbInfoCalculateBatchSaveReq",
-            "type": "object"
-        },
-        "data_manage.EditEdbInfoReq": {
-            "title": "EditEdbInfoReq",
+        "10348.0xc0004c0090.false": {
+            "title": "false",
             "type": "object"
         },
         "models.AddEdbInfoReq": {
@@ -349,6 +362,80 @@
                 }
             }
         },
+        "models.EdbInfoCalculateBatchSaveReq": {
+            "title": "EdbInfoCalculateBatchSaveReq",
+            "type": "object",
+            "properties": {
+                "AdminId": {
+                    "description": "添加人id",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "AdminName": {
+                    "description": "添加人名称",
+                    "type": "string"
+                },
+                "CalculateFormula": {
+                    "description": "计算公式",
+                    "type": "string"
+                },
+                "ClassifyId": {
+                    "description": "分类id",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "EdbInfoId": {
+                    "description": "指标id",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "EdbInfoIdArr": {
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/10348.0xc0004c0090.false"
+                    }
+                },
+                "EdbName": {
+                    "description": "指标名称",
+                    "type": "string"
+                },
+                "Formula": {
+                    "description": "N值/移动天数",
+                    "type": "string"
+                },
+                "Frequency": {
+                    "description": "频度",
+                    "type": "string"
+                },
+                "FromEdbInfoId": {
+                    "description": "计算来源指标id",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "MoveFrequency": {
+                    "description": "移动频度:天/周/月/季/年",
+                    "type": "string"
+                },
+                "MoveType": {
+                    "description": "移动方式:1:领先(默认),2:滞后",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "Source": {
+                    "description": "来源:1:同花顺,2:wind,3:彭博,4:指标运算,5:累计值转月,6:同比值,7:同差值,8:N数值移动平均计算,12:环比值,13:环差值,14:变频",
+                    "type": "integer",
+                    "format": "int64"
+                },
+                "Unit": {
+                    "description": "单位",
+                    "type": "string"
+                }
+            }
+        },
+        "models.EditEdbInfoReq": {
+            "title": "EditEdbInfoReq",
+            "type": "object"
+        },
         "models.RefreshEdbInfoReq": {
             "title": "RefreshEdbInfoReq",
             "type": "object",

+ 71 - 7
swagger/swagger.yml

@@ -21,7 +21,7 @@ paths:
         "200":
           description: ""
           schema:
-            $ref: '#/definitions/data_manage.EditEdbInfoReq'
+            $ref: '#/definitions/models.EditEdbInfoReq'
   /calculate/batch/save:
     post:
       tags:
@@ -34,10 +34,21 @@ paths:
         description: type json string
         required: true
         schema:
-          $ref: '#/definitions/data_manage.EdbInfoCalculateBatchSaveReq'
+          $ref: '#/definitions/models.EdbInfoCalculateBatchSaveReq'
       responses:
         Ret=200:
           description: 返回指标id
+  /calculate/refresh:
+    post:
+      tags:
+      - calculate
+      description: 刷新计算指标接口
+      operationId: CalculateController.刷新计算指标接口
+      responses:
+        "200":
+          description: ""
+          schema:
+            $ref: '#/definitions/models.RefreshEdbInfoReq'
   /lt/add:
     post:
       tags:
@@ -215,11 +226,8 @@ paths:
           schema:
             $ref: '#/definitions/models.RefreshEdbInfoReq'
 definitions:
-  data_manage.EdbInfoCalculateBatchSaveReq:
-    title: EdbInfoCalculateBatchSaveReq
-    type: object
-  data_manage.EditEdbInfoReq:
-    title: EditEdbInfoReq
+  10348.0xc0004c0090.false:
+    title: "false"
     type: object
   models.AddEdbInfoReq:
     title: AddEdbInfoReq
@@ -228,6 +236,62 @@ definitions:
       EdbCode:
         description: 指标编码
         type: string
+  models.EdbInfoCalculateBatchSaveReq:
+    title: EdbInfoCalculateBatchSaveReq
+    type: object
+    properties:
+      AdminId:
+        description: 添加人id
+        type: integer
+        format: int64
+      AdminName:
+        description: 添加人名称
+        type: string
+      CalculateFormula:
+        description: 计算公式
+        type: string
+      ClassifyId:
+        description: 分类id
+        type: integer
+        format: int64
+      EdbInfoId:
+        description: 指标id
+        type: integer
+        format: int64
+      EdbInfoIdArr:
+        type: array
+        items:
+          $ref: '#/definitions/10348.0xc0004c0090.false'
+      EdbName:
+        description: 指标名称
+        type: string
+      Formula:
+        description: N值/移动天数
+        type: string
+      Frequency:
+        description: 频度
+        type: string
+      FromEdbInfoId:
+        description: 计算来源指标id
+        type: integer
+        format: int64
+      MoveFrequency:
+        description: 移动频度:天/周/月/季/年
+        type: string
+      MoveType:
+        description: 移动方式:1:领先(默认),2:滞后
+        type: integer
+        format: int64
+      Source:
+        description: 来源:1:同花顺,2:wind,3:彭博,4:指标运算,5:累计值转月,6:同比值,7:同差值,8:N数值移动平均计算,12:环比值,13:环差值,14:变频
+        type: integer
+        format: int64
+      Unit:
+        description: 单位
+        type: string
+  models.EditEdbInfoReq:
+    title: EditEdbInfoReq
+    type: object
   models.RefreshEdbInfoReq:
     title: RefreshEdbInfoReq
     type: object