liuxiaolong
2019-12-14 63e024e77d8e0fefd8818f1b744cbfc5e36b50fe
controllers/pollConfig.go
@@ -93,7 +93,7 @@
}
type PollEnableVo struct {
   Enable bool `json:"enable"`
   Enable bool `json:"enable" binding:"required"`
}
// @Security ApiKeyAuth
@@ -122,7 +122,7 @@
type ChannelCountSet struct {
   PollChannelCount int `json:"pollChannelCount"`
   FileChannelCount int `json:"fileChannelCount"`
   VideoChannelCount int `json:"videoChannelCount"`
}
// @Security ApiKeyAuth
@@ -137,9 +137,13 @@
// @Router /data/api-v/pollConfig/updateChannelCount [post]
func (controller PollConfigController) UpdateChannelCount(c *gin.Context) {
   var argBody ChannelCountSet
   c.BindJSON(&argBody)
   err := c.BindJSON(&argBody)
   if err != nil {
      util.ResponseFormat(c, code.RequestParamError, "参数有误")
      return
   }
   var api dbapi.SysSetApi
   if api.UpdateChannelCount(argBody.PollChannelCount, argBody.FileChannelCount) {
   if api.UpdateChannelCount(argBody.PollChannelCount, argBody.VideoChannelCount) {
      util.ResponseFormat(c,code.UpdateSuccess,"更新成功")
   } else {
      util.ResponseFormat(c,code.UpdateFail,"更新失败")