liuxiaolong
2019-08-22 68fc51cb635fecf12cad58deab88c3b5e0afc0ad
yunnan swagger doc
19个文件已修改
383 ■■■■ 已修改文件
controllers/camera.go 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/cameraPolygon.go 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/cameraTask.go 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/cameraTaskArgs.go 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/cameraTimerule.go 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/capture.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/cluster.go 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/dbtableperson.go 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/eventPush.go 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/fileController.go 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/initForData.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/pollConfig.go 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/sdk.go 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/sysMenu.go 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/syssetcont.go 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/taglist.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/task.go 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/tasklist.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/user.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/camera.go
@@ -164,15 +164,6 @@
    return json.Marshal(test)
}
// @Summary 将摄像机挂到指定的目录树下
// @Description 将摄像机挂到指定的目录树下
// @Produce json
// @Tags camera
// @Param cameraId path string true "摄像机id"
// @Param areaId path string true "目录区域id"
// @Success 200 {string} json "{"code":200, success:true, msg:"请求处理成功", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"错误信息内容"}"
// @Router /data/api-v/camera/cameraAreaAdd [get]
func (ac CameraController) CameraAreaAdd(c *gin.Context) {
    cameraId := c.Param("cameraId")
    areaId := c.Param("areaId")
@@ -180,15 +171,6 @@
    fmt.Println(areaId)
}
// @Summary 删除某一个目录树下的指定摄像机
// @Description 删除某一个目录树下的指定摄像机
// @Produce json
// @Tags camera
// @Param cameraId path string true "摄像机id"
// @Param areaId  path string true "指定目录区域id"
// @Success 200 {string} json "{"code":200, success:true, msg:"请求处理成功", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"错误信息内容"}"
// @Router /data/api-v/camera/cameraAreaDel [get]
func (ac CameraController) CameraAreaDel(c *gin.Context) {
    cameraId := c.Param("cameraId")
    areaId := c.Param("areaId")
@@ -196,15 +178,7 @@
    fmt.Println(areaId)
}
// @Summary 获取运行类型获取摄像机列表
// @Description 获取运行类型获取摄像机列表
// @Produce json
// @Tags camera
// @Param runType query int true "0:查轮询,1:查实时"
// @Param cameraName query string false "查询条件"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/camera/getCamerasByRunType [get]
func (cc CameraController) GetCamerasByRunType(c *gin.Context) {
    runTypeStr := c.Query("runType")
@@ -228,15 +202,6 @@
    }
}
// @Summary 切换摄像机运行实时或轮询的开关
// @Description 切换摄像机运行实时或轮询的开关
// @Produce json
// @Tags camera
// @Param cameraId query string true "摄像机id"
// @Param runEnable query bool true "开启:true,关闭:false"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/camera/updateRunEnable [post]
func (cc CameraController) UpdateRunEnable(c *gin.Context) {
    cameraId := c.PostForm("cameraId")
    enableStr := c.PostForm("runEnable")
@@ -256,14 +221,6 @@
    }
}
// @Summary  更新底图
// @Description 刷新底图
// @Produce json
// @Tags camera
// @Param cid path string true "摄像机id"
// @Success 200 {string} json "{"code":200, success:true,  msg:"", data:"返回的文件服务器地址"}"
// @Failure 500 {string} json "{"code":500, success:false   msg:"",data:"错误信息内容"}"
// @Router /data/api-v/camera/updateSnapshotUrl/{cid} [get]
func(cc CameraController) UpdateSnapshotUrl(c *gin.Context){
    cid := c.Param("cid")
    //filename, err := service.UpdateSnapshotUrl(cid)
@@ -281,14 +238,6 @@
    RunType   int      `json:"run_type"`
}
// @Summary 摄像机轮询和实时状态切换
// @Description 摄像机轮询和实时状态切换
// @Produce json
// @Tags camera
// @Param changeRunBody body controllers.CameraChangeRunVo true "参数结构体,0:实时切轮询,1:轮询切实时"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/camera/changeRunType [post]
func (cc CameraController) ChangeRunType(c *gin.Context) {
    var ccrVo CameraChangeRunVo
    if err := c.BindJSON(&ccrVo); err != nil {
controllers/cameraPolygon.go
@@ -33,15 +33,6 @@
    Y float64 `json:"y"`
}
// @Summary 保存摄像机多边形
// @Description  保存摄像机多边形
// @Accept json
// @Produce json
// @Tags 摄像机多边形
// @Param  cameraPolygon body controllers.CameraPolygonVo 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/polygon/save [post]
func (controller CameraPolygonController) Save(c *gin.Context) {
    paramBody := make(map[string]interface{},0)
    c.BindJSON(&paramBody)
@@ -55,15 +46,6 @@
}
// @Summary 删除摄像机区域
// @Description 删除摄像机区域
// @Accept json
// @Produce json
// @Tags 摄像机多边形
// @Param  id query string  true "id"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/polygon/delete [get]
func (controller CameraPolygonController) Delete(c *gin.Context) {
    id := c.Query("id")
    if id == "" {
@@ -80,15 +62,6 @@
    util.ResponseFormat(c,code.ComError,"删除")
}
// @Summary 查找摄像机区域
// @Description 查找摄像机区域
// @Accept json
// @Produce json
// @Tags 摄像机多边形
// @Param  cameraId query string  true "cameraId"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/polygon/findByCameraId [get]
func (controller CameraPolygonController) FindByCameraId(c *gin.Context) {
    cameraId := c.Query("cameraId")
    if cameraId == "" {
controllers/cameraTask.go
@@ -74,15 +74,6 @@
    Polygon CameraPolygonVo `json:"polygon"`
}
// @Summary 查询所有任务
// @Description "查询所有任务"
// @Accept json
// @Produce json
// @Tags CameraTask
// @Param cameraIds body controllers.MultiCamera false "摄像机id数组"
// @Success 200 {string} json "{"code":200, success:true,  msg:"请求处理成功", data:"所有任务信息"}"
// @Failure 500 {string} json "{"code":500, success:false   msg:"",data:"错误信息内容"}"
// @Router /data/api-v/camera/alltask [post]
func (controller CameraTaskController) FindTasksByCameraIds(c *gin.Context){
    var mulCamera MultiCamera
    c.BindJSON(&mulCamera)
@@ -95,14 +86,6 @@
    }
}
// @Summary 查询所有任务
// @Description "查询所有任务"
// @Produce json
// @Tags CameraTask
// @Param cameraId path string true "摄像机id"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/camera/task/{cameraId} [get]
func (controller CameraTaskController) CameraTaskAll(c *gin.Context) {
    cameraId := c.Param("cameraId")
    if cameraId == "" {
@@ -119,15 +102,6 @@
}
// @Summary 摄像机保存任务
// @Description 摄像机保存任务
// @Accept json
// @Produce json
// @Tags camera
// @Param args body controllers.CameraTaskSaveArg 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/camera/saveTask [post]
func (ac CameraController) CameraTaskSave(c *gin.Context) {
    var saveBody CameraTaskSaveArg
    err := c.BindJSON(&saveBody)
@@ -147,15 +121,6 @@
    }
}
// @Summary 删除摄像机的任务
// @Description 删除摄像机的任务
// @Produce json
// @Tags camera
// @Param cameraId path string true "摄像机id"
// @Param taskId path string true "任务id"
// @Success 200 {string} json "{"code":200, success:true,  msg:"请求处理成功", data:"删除的摄像机信息"}"
// @Failure 500 {string} json "{"code":500, success:false,   msg:"",data:"错误信息内容"}"
// @Router /data/api-v/camera/delTask/{cameraId}/{taskId} [delete]
func (ac CameraController) CameraDelTask(c *gin.Context) {
    cameraId := c.Param("cameraId")
    taskId := c.Param("taskId")
@@ -183,15 +148,6 @@
    AlarmLevel int `json:"alarm_level"`
}
// @Summary 保存任务是否下传数据
// @Description 保存任务是否下传数据
// @Accept json
// @Produce json
// @Tags CameraTask
// @Param TransAndAlarmLevel body controllers.DataTransVo 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/cameraTask/saveIsDataTrans [post]
func (controller CameraTaskController) SaveIsDataTrans(c *gin.Context) {
    var transVo DataTransVo
    if err := c.BindJSON(&transVo);err!=nil {
@@ -209,14 +165,6 @@
    }
}
// @Summary 保存规则组报警等级
// @Description 保存规则组报警等级
// @Produce json
// @Tags CameraTask
// @Param GroupLevel body controllers.GroupAlarmLevelVo true "alarmLevel"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/cameraTask/saveAlarmLevelByGroup [post]
func (controller CameraTaskController) SaveAlarmLevelByGroup(c *gin.Context) {
    var groupLevelVo GroupAlarmLevelVo
    if err := c.BindJSON(&groupLevelVo);err !=nil {
@@ -239,14 +187,6 @@
    Status int `json:"status"`
}
// @Summary 更新任务状态
// @Description 更新任务状态
// @Produce json
// @Tags CameraTask
// @Param CameraTaskStatus body controllers.CameraTaskStatusVo 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/cameraTask/updateCameraTaskStatus [post]
func (controller CameraTaskController) UpdateCameraTaskStatus(c *gin.Context) {
    var paramVo CameraTaskStatusVo
    if err := c.BindJSON(&paramVo);err !=nil {
controllers/cameraTaskArgs.go
@@ -14,16 +14,6 @@
}
// @Summary 根据摄像机id和任务id查询算法配置详情
// @Description 根据摄像机id和任务id查询算法配置详情
// @Produce json
// @Tags CameraTaskArgs
// @Param cameraId query string true "摄像机id"
// @Param taskId query string true "任务id"
// @Param set_type query string 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/camera/getRulesByCameraAndTask [get]
func (controller CameraTaskArgsController) FindByCameraAndTask(c *gin.Context) {
    cameraId := c.Query("cameraId")
    taskId := c.Query("taskId")
@@ -42,15 +32,6 @@
    }
}
// @Summary 根据多个摄像机id查询联动任务规则设置
// @Description 根据多个摄像机id查询联动任务规则设置
// @Accept json
// @Produce json
// @Tags CameraTaskArgs
// @Param cameraIds body controllers.MultiCamera true "摄像机ids"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/cameraTaskArgs/getLinkRulesByCameraIds [post]
func (controller CameraTaskArgsController) GetLinkRulesByCameraIds(c *gin.Context) {
    var cameraIdsVo MultiCamera
    if err := c.BindJSON(&cameraIdsVo);err !=nil {
@@ -67,15 +48,6 @@
    }
}
// @Summary 根据分组id切换布防或撤防
// @Description 根据分组id切换布防或撤防
// @Produce json
// @Tags CameraTaskArgs
// @Param groupId query string true "任务算法参数分组id"
// @Param defenceState query bool true "布防状态,false:撤防,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/cameraTaskArgs/updateDefenceStateByGroup [post]
func (controller CameraTaskArgsController) UpdateDefenceStateByGroup(c *gin.Context){
    groupId := c.PostForm("groupId")
    str := c.PostForm("defenceState")
@@ -93,14 +65,6 @@
    }
}
// @SUmmary 根据分组id删除摄像机算法规则
// @Description 根据分组id删除摄像机算法规则
// @Produce json
// @Tags CameraTaskArgs
// @Param groupId query string true "任务算法参数分组id"
// @Success 200 {string} json "{"code":200, success:true, msg:"请求处理成功", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"错误信息内容"}"
// @Router /data/api-v/cameraTaskArgs/deleteByGroup [get]
func (controller CameraTaskArgsController)DeleteByGroup(c *gin.Context) {
    groupId := c.Query("groupId")
    if groupId == "" {
@@ -144,14 +108,7 @@
    GroupId string `json:"group_id"`//分组id
}
// @Summary 保存联动任务规则参数
// @Description 保存联动任务规则参数
// @Accept json
// @Produce json
// @Param saveBody body controllers.SaveLinkRulesGroupVo 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/cameraTaskArgs/saveLinkRulesByGroup [post]
func (controller CameraTaskArgsController) SaveLinkRulesByGroup(c *gin.Context) {
    var saveBody SaveLinkRulesGroupVo
    if err := c.BindJSON(&saveBody);err !=nil {
controllers/cameraTimerule.go
@@ -29,16 +29,7 @@
    Start string `json:"start"`//开始
    End   string `json:"end"`//结束
}
//
// @Summary 时间规则保存
// @Description 时间规则保存
// @Accept json
// @Produce json
// @Tags CameraTimerule
// @Param  cameraTimerule body controllers.CameraTimeruleVo  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/cameraTimerule/save [post]
func (controller CameraTimeruleController) Save(c *gin.Context) {
    var vo CameraTimeruleVo
    err := c.BindJSON(&vo)
@@ -62,15 +53,7 @@
    util.ResponseFormat(c,code.ComError,"保存失败")
}
// @Summary 删除时间规则
// @Description 删除时间规则
// @Accept json
// @Produce json
// @Tags CameraTimerule
// @Param  id query string  true "id"
// @Success 200 {string} json "{"code":200, success:true, msg:"请求处理成功", data:"成功信息"}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"错误信息内容"}"
// @Router /data/api-v/cameraTimerule/delete [get]
func (controller CameraTimeruleController) Delete(c *gin.Context) {
    id := c.Query("id")
    if id == "" {
@@ -85,14 +68,7 @@
    util.ResponseFormat(c, code.ComError, "删除失败")
}
// @Summary 查找所有时间规则
// @Description 查找所有时间规则
// @Accept json
// @Produce json
// @Tags CameraTimerule
// @Success 200 {string} json "{"code":200, success:true, msg:"请求处理成功", data:"成功信息"}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"错误信息内容"}"
// @Router /data/api-v/cameraTimerule/findAll [get]
func (controller CameraTimeruleController) FindAll(c *gin.Context) {
    var api dbapi.CameraApi
    result, data := api.FindAllTimeRules()
controllers/capture.go
@@ -19,10 +19,9 @@
// @Produce json
// @Tags realTime
// @Param obj body map 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/realTime/capture [POST]
//实时抓拍
func (rc *RealTimeController) PostCapture(c *gin.Context) {
    searchBody := make(map[string]interface{}, 0)
controllers/cluster.go
@@ -53,15 +53,7 @@
    NodeIps []string `json:"nodeIps"`
}
// @Summary 创建集群
// @Description 创建集群
// @Accept json
// @Produce json
// @Tags cluster
// @Param  clusterArg body controllers.ClusterCreateVo 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/cluster/create [post]
func (cc ClusterController) Create(c *gin.Context) {
    var clusterVo ClusterCreateVo
    err := c.BindJSON(&clusterVo)
@@ -78,27 +70,13 @@
    }
}
// @Summary 生成集群6位随机密码
// @Description 生成集群6位随机密码
// @Produce json
// @Tags cluster
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/cluster/randomPwd [get]
func (cc ClusterController) RandomPwd(c *gin.Context) {
    pwd := fmt.Sprintf("%06v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(1000000))
    util.ResponseFormat(c,code.Success,pwd)
}
// @Summary 搜索集群
// @Description 搜索集群
// @Accept json
// @Produce json
// @Tags cluster
// @Param searchArg body controllers.ClusterSearchVo 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/cluster/search [post]
func (cc ClusterController) Search(c *gin.Context) {
    var csv ClusterSearchVo
    err := c.BindJSON(&csv)
@@ -115,14 +93,7 @@
    }
}
// @Summary 通过searchNum异步获取集群节点信息
// @Description 通过searchNum异步获取集群节点信息
// @Accept json
// @Produce json
// @Tags cluster
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/cluster/getNodesByNum [get]
func (cc ClusterController) GetSearchNodes(c *gin.Context) {
    var api dbapi.ClusterApi
    b, d := api.GetSearchNodes()
@@ -133,14 +104,7 @@
    }
}
// @Summary 通过searchNum停止搜索
// @Description 通过searchNum停止搜索
// @Produce json
// @Tags cluster
// @Param searchNum query string 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/cluster/stopSearching [post]
func (cc ClusterController) StopSearching(c *gin.Context) {
    searchNum := c.Query("searchNum")
    if searchNum == "" {
@@ -157,15 +121,6 @@
}
// @Summary 加入集群
// @Description 加入集群
// @Accept json
// @Produce json
// @Tags cluster
// @Param  clusterArg body controllers.ClusterCreateVo 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/cluster/joinCluster [post]
func (cc ClusterController) JoinCluster(c *gin.Context) {
    var arg ClusterJoinVo
    err := c.BindJSON(&arg)
controllers/dbtableperson.go
@@ -148,7 +148,6 @@
// @Success 200 {string} json "{"code":200, msg:"目录结构数据", success:true}"
// @Failure 500 {string} json "{"code":500,  msg:"返回错误信息", success:false}"
// @Router /data/api-v/dbperson/deleteDbPersonById/{uuid} [POST]
func (dbc DbPersonController) DeleteDbPerson(c *gin.Context) {
    id := c.Params.ByName("uuid")
    if id == "" {
@@ -164,12 +163,14 @@
    }
}
// @Summary 删除底库人员
// @Description 删除库人员
type multiIds []string
// @Summary 批量删除底库人员
// @Description 批量删除库人员
// @Accept  json
// @Produce json
// @Tags dbperson 底库人员
// @Param uuids body []string true "底库人员ids "
// @Param uuids body controllers.multiIds true "底库人员ids"
// @Success 200 {string} json "{"code":200, msg:"目录结构数据", success:true}"
// @Failure 500 {string} json "{"code":500,  msg:"返回错误信息", success:false}"
// @Router /data/api-v/dbperson/deleteMoreDbPerson [POST]
@@ -195,7 +196,7 @@
// @Accept  json
// @Produce json
// @Tags dbperson 底库人员
// @Param reqMap body map false "{"tableId":"","orderName":"uuid","orderType":"desc","contentValue":"","page":1,"size":8}"
// @Param reqMap body map false "{"tableId":"","orderName":"id","orderType":"desc","contentValue":"","page":1,"size":8}"
// @Success 200 {string} json "{"code":200, "msg":"目录结构数据", "success":true,"data":{}}"
// @Failure 500 {string} json "{code:500,  msg:"返回错误信息", success:false,data:{}}"
// @Router /data/api-v/dbperson/queryDbPersonsByTbId [POST]
@@ -262,7 +263,7 @@
// @Accept  json
// @Produce json
// @Tags dbperson 底库人员
// @Param reqMap body map false "{"tableId":"","orderName":"uuid","orderType":"desc","contentValue":"","page":1,"size":8}"
// @Param reqMap body map false "{"tableId":"","orderName":"id","orderType":"desc","contentValue":"","page":1,"size":8}"
// @Success 200 {string} json "{"code":200, "msg":"目录结构数据", "success":true,"data":{}}"
// @Failure 500 {string} json "{code:500,  msg:"返回错误信息", success:false,data:{}}"
// @Router /data/api-v/dbperson/queryDbPersonsByCampare [POST]
controllers/eventPush.go
@@ -47,6 +47,7 @@
    Enable bool   `json:"enable"`
}
/*
// @Summary 事件推送保存
// @Description 事件推送保存
// @Tags 事件推送
@@ -54,6 +55,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/eventPush/save [post]
*/
func (epc EventPushController) Save(c *gin.Context) {
    var saveBody EventPushVo
    if err := c.BindJSON(&saveBody); err != nil {
@@ -70,6 +72,7 @@
    }
}
/*
// @Summary 根据事件推送主题的一级和二级选项获取最后下拉菜单列表
// @Description  根据事件推送主题的一级和二级选项获取最后下拉菜单列表
// @Produce json
@@ -79,6 +82,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/eventPush/findByEventTopic [get]
*/
func (epc EventPushController) FindByEventTopic(c *gin.Context) {
    topic := c.Query("topic")
    childType := c.Query("type")
@@ -95,6 +99,7 @@
    }
}
/*
// @Summary 查全部
// @Description  查全部
// @Produce json
@@ -103,6 +108,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/eventPush/findAll [get]
*/
func (controller EventPushController) FindAll(c *gin.Context) {
    name := c.Query("name")
    var api dbapi.EventPushApi
@@ -114,6 +120,7 @@
    }
}
/*
// @Summary 事件推送编辑
// @Description  事件推送编辑
// @Produce json
@@ -122,6 +129,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/eventPush/getById [get]
*/
func (controller EventPushController) GetById(c *gin.Context) {
    id := c.Query("id")
    if id == "" {
@@ -142,6 +150,7 @@
    Enable bool   `json:"enable"`
}
/*
// @Summary 改变enable状态
// @Description  改变enable状态
// @Produce json
@@ -150,6 +159,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/eventPush/changeStatus [post]
*/
func (controller EventPushController) ChangeStatus(c *gin.Context) {
    var statusBody ChangeStatusVo
    err := c.BindJSON(&statusBody)
@@ -166,6 +176,7 @@
    }
}
/*
// @Summary 根据id删除
// @Description  根据id删除
// @Accept x-www-form-urlencoded
@@ -175,6 +186,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/eventPush/delete [post]
*/
func (controller EventPushController) Delete(c *gin.Context) {
    id := c.PostForm("id")
    if id == "" {
controllers/fileController.go
@@ -46,8 +46,8 @@
//var weedfsUri = "http://192.168.1.182:9500/submit"
// @Summary 依据图片添加底库人员
// @Description  依据图片添加底库返回数据人员
// @Summary 单张图片上传,添加底库人员
// @Description  单张图片上传,添加底库返回数据人员
// @Accept  mpfd
// @Produce json
// @Tags dbperson 底库人员
@@ -523,8 +523,6 @@
}
// @Description 人员照片上传并获取特征值
// @Router /data/api-v/dbperson/fileUploadTest [POST]
func (controller FileController) UploadPersonTest(c *gin.Context) {
    file, _, err := c.Request.FormFile("file") //image这个是uplaodify参数定义中的   'fileObjName':'image'
    if err != nil {
@@ -629,8 +627,8 @@
// @Tags dbperson 底库人员
// @Param files formData file[] true "多个底库人员图片"
// @Param tableId formData string false "底库id,有id 则加入底库,无则只上传图片"
// @Success 200 {string} json "{"code":200, msg:"目录结构数据", success:true,data:{}}"
// @Failure 500 {string} json "{"code":500,  msg:"返回错误信息", success:false,data:null}"
// @Success 200 {string} json "{"code":200, msg:"", success:true,data:{}}"
// @Failure 500 {string} json "{"code":500,  msg:"", success:false,data:null}"
// @Router /data/api-v/dbperson/moreFileUpload [POST]
func (fc FileController) MoreFileUpload(c *gin.Context) {
    //得到上传的文件
@@ -769,10 +767,4 @@
    //}                                    // linux
    result["smImage"] = smUrl
    util.ResponseFormat(c, code.Success, result)
}
/**下载方法**/
func Filedown(c *gin.Context) {
    //暂时没有提供方法
}
controllers/initForData.go
@@ -19,10 +19,9 @@
// @Accept  json
// @Produce json
// @Tags realTime
// @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/realTime/initForCaptureData [POST]
//实时抓拍数据初始化
func (rc *RealTimeController) InitForCaptureData(c *gin.Context) {
    searchBody := make(map[string]interface{}, 0)
    c.BindJSON(&searchBody)
controllers/pollConfig.go
@@ -18,6 +18,7 @@
    Enable     bool   `json:"enable"`      //是否启用轮询
}
/*
// @Summary 保存轮询周期
// @Description 保存轮询周期
// @Produce json
@@ -26,6 +27,7 @@
// @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/savePollPeriod [post]
*/
func (controller PollConfigController) SavePollPeriod(c *gin.Context) {
    periodStr := c.PostForm("period")
    period, err := strconv.Atoi(periodStr)
@@ -42,6 +44,7 @@
    }
}
/*
// @Summary 保存轮询延时
// @Description 保存轮询延时
// @Produce json
@@ -50,6 +53,7 @@
// @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/savePollDelay [post]
*/
func (controller PollConfigController) SavePollDelay(c *gin.Context) {
    delayStr := c.PostForm("delay")
    delay, err := strconv.Atoi(delayStr)
@@ -66,6 +70,7 @@
    }
}
/*
// @Summary 获取本机轮询配置
// @Description 获取本机轮询配置
// @Produce json
@@ -73,6 +78,7 @@
// @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/getPollConfig [get]
*/
func (controller PollConfigController) GetPollConfig(c *gin.Context) {
    var api dbapi.SysSetApi
    b, data := api.GetPollConfig()
@@ -87,6 +93,7 @@
    Enable bool `json:"enable"`
}
/*
// @Summary 切换轮询开关
// @Description 切换轮询开关
// @Produce json
@@ -95,6 +102,7 @@
// @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/updateEnable [post]
*/
func (controller PollConfigController) UpdateEnable(c *gin.Context) {
    var argBody PollEnableVo
    if err := c.BindJSON(&argBody); err != nil {
controllers/sdk.go
@@ -36,6 +36,7 @@
    Sort  int    `json:"sort"`  //参数顺序
}
/*
// @Summary 算法保存
// @Description 算法保存
// @Produce json
@@ -44,6 +45,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/sdk/save [POST]
*/
func (sc SdkController) Save(c *gin.Context) {
    var sdk SdkVo
    var api dbapi.SdkApi
@@ -61,6 +63,7 @@
    }
}
/*
// @Summary 查找所有算法
// @Description 查找所有算法
// @Produce json
@@ -69,6 +72,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"算法列表",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"[]",success:false}"
// @Router /data/api-v/sdk/findAllSdk [GET]
*/
func (sc SdkController) FindAllSdk(c *gin.Context) {
    var api dbapi.SdkApi
@@ -77,6 +81,7 @@
    util.ResponseFormat(c, code.Success, sdks)
}
/*
// @Summary 根据id获取算法信息
// @Description 根据id获取算法信息
// @Produce json
@@ -85,6 +90,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"算法信息",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/sdk/getById [GET]
*/
func (sc SdkController) GetById(c *gin.Context) {
    var api dbapi.SdkApi
    sdkId := c.Query("id")
@@ -102,7 +108,9 @@
    }
}
/*
// @Router /data/api-v/sdkArg/getSdkArgs [get]
*/
func (sc SdkController) GetSdkArgs(c *gin.Context) {
    sdkId := c.Query("sdkId")
    scope := c.Query("scope")
@@ -119,6 +127,7 @@
    }
}
/*
// @Summary 根据taskId获取算法信息
// @Description 根据taskId获取算法信息
// @Produce json
@@ -127,6 +136,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"算法信息",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/sdk/findByTaskId [GET]
*/
func (sc SdkController) FindByTaskId(c *gin.Context) {
    var api dbapi.SdkApi
    taskId := c.Query("taskId")
controllers/sysMenu.go
@@ -12,6 +12,7 @@
}
/*
// @Summary 当前用户的系统菜单
// @Description 当前用户的系统菜单
// @Accept json
@@ -20,6 +21,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/sysmenus/me [get]
*/
func (controller SysMenuController) Me(c *gin.Context) {
    module := c.Param("module")
    logger.Debug("me.module:",module)
controllers/syssetcont.go
@@ -42,8 +42,8 @@
    UpdateTime string `json:"UpdateTime"`
}
// @Summary 存储信息查询
// @Description 存储信息查询
// @Summary 基础设置查询
// @Description 基础设置查询
// @Accept  json
// @Produce json
// @Tags sysset
@@ -60,8 +60,8 @@
    }
}
// @Summary 存储信息修改
// @Description 存储信息修改
// @Summary 报警设置修改
// @Description 报警设置修改
// @Accept  json
// @Produce json
// @Tags sysset
@@ -86,8 +86,8 @@
    }
}
// @Summary 存储信息修改
// @Description 存储信息修改
// @Summary 报警时长修改
// @Description 报警时长修改
// @Accept  json
// @Produce json
// @Tags sysset
controllers/taglist.go
@@ -8,7 +8,7 @@
    "github.com/gin-gonic/gin"
)
// @Summary 标签列表
// @Summary 底库标签列表
// @Description 返回底库标签
// @Accept  json
// @Produce json
controllers/task.go
@@ -34,6 +34,7 @@
    FaceExtract_VirtualSdkId = "virtual-faceextract-sdk-pull"//结果输出的算法id
)
/*
// @Summary 查找所有任务,包含任务信息和对应的算法信息
// @Description 查找所有任务
// @Produce json
@@ -41,6 +42,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/task/findAll [GET]
*/
func (tc TaskController) FindAll(c *gin.Context) {
    // 显示所有任务: 获取信息
    var taskApi dbapi.TaskApi
@@ -65,6 +67,7 @@
    }
}
/*
// @Summary 添加任务
// @Description 查找所有任务
// @Accept json
@@ -74,6 +77,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/task/addTask [POST]
*/
func (tc TaskController) AddTask(c *gin.Context) {
    var task TaskVo
    var taskApi dbapi.TaskApi
@@ -101,6 +105,7 @@
    Sort int `json:"sort"`
}
/*
// @Summary 给任务添加算法
// @Description 任务添加算法
// @Produce json
@@ -109,6 +114,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/task/addTaskSdk [post]
*/
func (tc TaskController) AddTaskSdk(c *gin.Context) {
    var addVo TaskSdkAdd
    err := c.BindJSON(&addVo)
@@ -126,6 +132,7 @@
    }
}
/*
// @Summary 任务删除算法
// @Description 根据taskid和sdkid删除
// @Produce json
@@ -135,6 +142,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/task/delTaskSdk [GET]
*/
func (tc TaskController) DeleteTaskSdk(c *gin.Context) {
    var taskApi dbapi.TaskApi
    taskId := c.Query("taskId")
@@ -151,6 +159,7 @@
    }
}
/*
// @Summary 更新任务名称
// @Description 更新任务名称
// @Produce json
@@ -160,6 +169,7 @@
// @Success 200 {string} json "{"code":200, msg:"",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"",data:"",success:false}"
// @Router /data/api-v/task/updateTaskName [POST]
*/
func (tc TaskController) UpdateTaskName(c *gin.Context) {
    taskId := c.PostForm("taskId")
    taskName := c.PostForm("taskName")
@@ -181,6 +191,7 @@
    Enable bool `json:"enable"`
}
/*
// @Summary 更新任务状态
// @Description (算法不变,只更新任务状态)
// @Produce json
@@ -189,6 +200,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/task/updateTaskStatus [POST]
*/
func (tc TaskController) UpdateTaskStatus(c *gin.Context) {
    var tsvo TaskStatusVo
    err := c.BindJSON(&tsvo)
@@ -207,6 +219,7 @@
}
/*
// @Summary 删除任务
// @Description 根据任务id删除任务
// @Produce json
@@ -215,6 +228,7 @@
// @Success 200 {string} json "{"code":200, msg:"请求处理成功",data:"",success:true}"
// @Failure 500 {string} json "{"code":500, msg:"请求失败",data:"",success:false}"
// @Router /data/api-v/task/delete [GET]
*/
func (tc TaskController) DeleteTask(c *gin.Context) {
    var taskApi dbapi.TaskApi
    taskId := c.Query("taskId")
@@ -244,6 +258,7 @@
    SdkArgValue string `json:"sdk_arg_value"`
}
/*
// @Summary 保存算法规则
// @Description 保存算法规则
// @Accept json
@@ -253,6 +268,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/task/saveTaskSdkRule [post]
*/
func (tc TaskController) SaveTaskSdkRule(c *gin.Context) {
    var rules TaskSdkRules
    err := c.BindJSON(&rules)
@@ -270,6 +286,7 @@
    }
}
/*
// @Summary 删除算法规则
// @Description 删除算法规则
// @Produce json
@@ -278,6 +295,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/task/deleteTaskSdkRule [post]
*/
func (tc TaskController) DeleteTaskSdkRule(c *gin.Context) {
    taskId := c.PostForm("taskId")
    sdkId := c.PostForm("sdkId")
@@ -294,6 +312,7 @@
}
/*
// @Summary 查询算法规则
// @Description 查询算法规则
// @Produce json
@@ -303,6 +322,7 @@
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/task/getRulesByTaskSdk [get]
*/
func (tc TaskController) GetRulesByTaskSdk(c *gin.Context) {
    taskId := c.Query("taskId")
    sdkId := c.Query("sdkId")
controllers/tasklist.go
@@ -16,8 +16,8 @@
// @Accept  json
// @Produce json
// @Tags es
// @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/es/tagList [POST]
func (sc *EsSearchController) PostEsTaskList(c *gin.Context) {
controllers/user.go
@@ -72,12 +72,16 @@
        c.JSON(http.StatusUnauthorized,"")
    }
}
/*
// @Router /data/api-u/sys/refresh_token [post]
*/
func (controller UserController) RefreshToken(c *gin.Context){
}
/*
// @Router /data/api-u/sys/logout [get]
*/
func (controller UserController) Logout(c *gin.Context){
    c.JSON(http.StatusOK,"退出成功")
}