liuxiaolong
2019-12-13 cecfe3aafb8424e74b6b4fab0f212c88f025af18
getDevInfo ret CutVideoLen
1个文件已修改
34 ■■■■■ 已修改文件
controllers/syssetcont.go 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/syssetcont.go
@@ -16,6 +16,7 @@
type LocalConfigVo struct {
    Id                 string `json:"id"`
    AlarmIp            string `json:"alarm_ip,omitempty" example:"192.168.1.182"`
    AlarmPort          int    `json:"alarm_port,omitempty" example:"22122"`
    AlarmThresholdType int    `json:"alarm_threshold_type"` //报警阈值类型设置:1:按最高分,2:按阈值以上
@@ -31,6 +32,16 @@
    ServerType         int    `json:"server_type,omitempty" example:"1"`
    Reserved           string `json:"reserved,omitempty" example:"1"`
    RealMax            int    `json:"real_max"` //实时处理的最大路数
}
type ServerConfigSaveVo struct {
    ServiceIpType         int       `json:"serviceIpType"` //0:本机ip,1:漂移ip
    ServiceIp             string     `json:"serviceIp"`  //外部服务ip
    Domain                 string  `json:"domain"` //域名
    ImgPort             int     `json:"imgPort"` //图片端口
    VideoPort           int     `json:"videoPort"`  //视频端口
    AudioPort           int     `json:"audioPort"`  //音频端口
}
type Gb28181ConfigVo struct {
@@ -51,6 +62,21 @@
    Interval  int    `json:"interval" example:"自动校时间隔"`
    NewTime   string `json:"newTime" example:"手动指定时间"`
}
/*
// @Security ApiKeyAuth
// @Summary 保存对外服务ip、录像时长以及音视频端口
// @Description 保存对外服务ip、录像时长以及音视频端口
// @Accept  json
// @Produce json
// @Tags sysset
// @Param config body controllers.ServerConfigSaveVo true "参数"
// @Success 200 {string} json "{"code":200, msg:"", success:true}"
// @Failure 500 {string} json "{"code":500, msg:"", success:false}"
// @Router /data/api-v/sysset/saveConfig [POST]
func (sset SysSetController) SaveConfig(c *gin.Context) {
}*/
// @Security ApiKeyAuth
// @Summary 存储信息查询
@@ -78,8 +104,8 @@
// @Produce json
// @Tags sysset
// @Param config body controllers.LocalConfigVo true "报警和存储信息数据"
// @Success 200 {string} json "{"code":200, msg:"目录结构数据", success:true}"
// @Failure 500 {string} json "{"code":500,  msg:"返回错误信息", success:false}"
// @Success 200 {string} json "{"code":200, msg:"", success:true}"
// @Failure 500 {string} json "{"code":500, msg:"", success:false}"
// @Router /data/api-v/sysset/alarmEdit [POST]
func (sset SysSetController) AlarmEdit(c *gin.Context) {
    var args LocalConfigVo
@@ -158,7 +184,7 @@
func (sset SysSetController) GetDevInfo(c *gin.Context) {
    var api dbapi.SysSetApi
    b, sysconf := api.GetServerInfo()
    resData := make(map[string]string, 0)
    resData := make(map[string]interface{}, 0)
    if !b { // 查询是否存在
        util.ResponseFormat(c, code.ServiceInsideError, "查询失败")
    } else {
@@ -171,6 +197,8 @@
        resData["subMask"] = mask
        resData["gateway"] = gateway
        resData["dns"] = dns
        resData["min_video_len"] = sysconf.CutMinDuration
        resData["max_video_len"] = sysconf.CutMaxDuration
        resData["deviceNum"] = config.Server.DeviceNum
        resData["deviceType"] = config.Server.DeviceType