sunty
2019-07-12 d42b09cda8b2bc58c43c200f3aabdb0b2a7e9211
controllers/syssetcont.go
@@ -29,14 +29,14 @@
}
type Gb28181ConfigVo struct {
   Id string `json:"Id" gorm:"primary_key" `
   ServerIp string `json:"ServerIp" example:"国标服务器IP" gorm:"column:ServerIp"`
   ServerPort int `json:"ServerPort" example:"服务器端口:8060" gorm:"column:ServerPort"`
   PublicId string `json:"ServerId" example:"国标服务器Id" gorm:"column:PublicId"`
   GbServerPort int `json:"GbServerPort" example:"国标服务端口:7060" gorm:"column:GbServerPort"`
   IsAuth bool `json:"IsAuth" example:"是否开启鉴权:true" gorm:"column:IsAuth"`
   Password string `json:"Password" example:"密码" gorm:"column:Password"`
   UpdateTime string `json:"UpdateTime" gorm:"column:UpdateTime"`
   Id string `json:"Id"`
   ServerIp string `json:"ServerIp" example:"国标服务器IP"`
   ServerPort int `json:"ServerPort" example:"服务器端口:8060"`
   PublicId string `json:"PublicId" example:"国标服务器Id"`
   GbServerPort int `json:"GbServerPort" example:"国标服务端口:7060"`
   IsAuth bool `json:"IsAuth" example:"是否开启鉴权:true"`
   Password string `json:"Password" example:"密码"`
   UpdateTime string `json:"UpdateTime"`
}
// @Summary 存储信息查询
@@ -145,8 +145,8 @@
   if !b { // 查询是否存在
      util.ResponseFormat(c, code.ServiceInsideError,"查询失败")
   }else {
      resData["dev_id"] = sysconf.GetServerId()
      resData["dev_name"] = sysconf.GetServerName()
      resData["server_id"] = sysconf.GetServerId()
      resData["server_name"] = sysconf.GetServerName()
      // 存在
      util.ResponseFormat(c, code.Success, resData)
   }
@@ -164,7 +164,7 @@
// @Router /data/api-v/sysset/saveDevInfo [POST]
func (sset SysSetController) SaveDevInfo(c *gin.Context){
   dev_name := c.Request.FormValue("dev_name")
   dev_name := c.PostForm("server_name")
   var api dbapi.SysSetApi
   paramBody :=make(map[string]interface{},0)
   paramBody["serverName"] = dev_name