| | |
| | | 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,"更新失败") |
| | | } |
| | | } |