From f110d3977e7e10c76b106a86d624470229248c71 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 04 十二月 2019 13:46:15 +0800
Subject: [PATCH] add updateChannelCount

---
 controllers/pollConfig.go |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/controllers/pollConfig.go b/controllers/pollConfig.go
index 9362d88..8b4c52d 100644
--- a/controllers/pollConfig.go
+++ b/controllers/pollConfig.go
@@ -113,3 +113,28 @@
 		util.ResponseFormat(c, code.ComError, "淇敼澶辫触")
 	}
 }
+
+type ChannelCountSet struct {
+	PollChannelCount int `json:"pollChannelCount"`
+	FileChannelCount int `json:"fileChannelCount"`
+}
+
+// @Summary 璁剧疆杞绠楀姏鍜屾湰鍦扮畻鍔涚殑鏁伴噺
+// @Description 璁剧疆杞绠楀姏鍜屾湰鍦扮畻鍔涚殑鏁伴噺
+// @Accept json
+// @Produce json
+// @Tags 杞閰嶇疆
+// @Param argBody body controllers.ChannelCountSet 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/updateChannelCount [post]
+func (controller PollConfigController) UpdateChannelCount(c *gin.Context) {
+	var argBody ChannelCountSet
+	c.BindJSON(&argBody)
+	var api dbapi.SysSetApi
+	if api.UpdateChannelCount(argBody.PollChannelCount, argBody.FileChannelCount) {
+		util.ResponseFormat(c,code.UpdateSuccess,"鏇存柊鎴愬姛")
+	} else {
+		util.ResponseFormat(c,code.UpdateFail,"鏇存柊澶辫触")
+	}
+}
\ No newline at end of file

--
Gitblit v1.8.0