From f26a0cab5bca17b7eab57f6330e576271e17a17f Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 13 十一月 2019 19:12:08 +0800
Subject: [PATCH] update ynSwagger,sync to master

---
 controllers/pollConfig.go |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/controllers/pollConfig.go b/controllers/pollConfig.go
index b5ad9b1..9362d88 100644
--- a/controllers/pollConfig.go
+++ b/controllers/pollConfig.go
@@ -13,21 +13,20 @@
 
 type PollConfig struct {
 	ServerId   string `json:"server_id"`   //鏈嶅姟鍣╥d
-	PollPeriod int    `json:"poll_period"` //杞鍛ㄦ湡
-	Delay      int    `json:"delay"`       //寤舵椂鏃堕棿
+	PollPeriod int32    `json:"poll_period"` //杞鍛ㄦ湡
+	Delay      int32    `json:"delay"`       //寤舵椂鏃堕棿
 	Enable     bool   `json:"enable"`      //鏄惁鍚敤杞
 }
 
-/*
+// @Security ApiKeyAuth
 // @Summary 淇濆瓨杞鍛ㄦ湡
 // @Description 淇濆瓨杞鍛ㄦ湡
 // @Produce json
 // @Tags 杞閰嶇疆
-// @Param period query int true "杞鍛ㄦ湡"
+// @Param period formData int true "杞鍛ㄦ湡"
 // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
 // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
 // @Router /data/api-v/pollConfig/savePollPeriod [post]
-*/
 func (controller PollConfigController) SavePollPeriod(c *gin.Context) {
 	periodStr := c.PostForm("period")
 	period, err := strconv.Atoi(periodStr)
@@ -44,16 +43,15 @@
 	}
 }
 
-/*
+// @Security ApiKeyAuth
 // @Summary 淇濆瓨杞寤舵椂
 // @Description 淇濆瓨杞寤舵椂
 // @Produce json
 // @Tags 杞閰嶇疆
-// @Param delay query int true "杞寤舵椂鏃堕棿"
+// @Param delay formData int true "杞寤舵椂鏃堕棿"
 // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
 // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
 // @Router /data/api-v/pollConfig/savePollDelay [post]
-*/
 func (controller PollConfigController) SavePollDelay(c *gin.Context) {
 	delayStr := c.PostForm("delay")
 	delay, err := strconv.Atoi(delayStr)
@@ -70,7 +68,7 @@
 	}
 }
 
-/*
+// @Security ApiKeyAuth
 // @Summary 鑾峰彇鏈満杞閰嶇疆
 // @Description 鑾峰彇鏈満杞閰嶇疆
 // @Produce json
@@ -78,7 +76,6 @@
 // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
 // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
 // @Router /data/api-v/pollConfig/getPollConfig [get]
-*/
 func (controller PollConfigController) GetPollConfig(c *gin.Context) {
 	var api dbapi.SysSetApi
 	b, data := api.GetPollConfig()
@@ -93,16 +90,16 @@
 	Enable bool `json:"enable"`
 }
 
-/*
+// @Security ApiKeyAuth
 // @Summary 鍒囨崲杞寮�鍏�
 // @Description 鍒囨崲杞寮�鍏�
+// @Accept json
 // @Produce json
 // @Tags 杞閰嶇疆
 // @Param argBody body controllers.PollEnableVo true "寮�鍏冲弬鏁�"
 // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
 // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
 // @Router /data/api-v/pollConfig/updateEnable [post]
-*/
 func (controller PollConfigController) UpdateEnable(c *gin.Context) {
 	var argBody PollEnableVo
 	if err := c.BindJSON(&argBody); err != nil {

--
Gitblit v1.8.0