| | |
| | | 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") |
| | |
| | | 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") |
| | |
| | | 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") |
| | |
| | | } |
| | | } |
| | | |
| | | // @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") |
| | |
| | | } |
| | | } |
| | | |
| | | // @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) |
| | |
| | | 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 { |
| | |
| | | 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(¶mBody) |
| | |
| | | } |
| | | |
| | | |
| | | // @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 == "" { |
| | |
| | | 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 == "" { |
| | |
| | | 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) |
| | |
| | | } |
| | | } |
| | | |
| | | // @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 == "" { |
| | |
| | | } |
| | | |
| | | |
| | | // @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) |
| | |
| | | } |
| | | } |
| | | |
| | | // @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") |
| | |
| | | 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 { |
| | |
| | | } |
| | | } |
| | | |
| | | // @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 { |
| | |
| | | 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(¶mVo);err !=nil { |
| | |
| | | } |
| | | |
| | | |
| | | // @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") |
| | |
| | | } |
| | | } |
| | | |
| | | // @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 { |
| | |
| | | } |
| | | } |
| | | |
| | | // @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") |
| | |
| | | } |
| | | } |
| | | |
| | | // @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 == "" { |
| | |
| | | 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 { |
| | |
| | | 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) |
| | |
| | | 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 == "" { |
| | |
| | | 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() |
| | |
| | | // @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) |
| | | |
| | |
| | | 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) |
| | |
| | | } |
| | | } |
| | | |
| | | // @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) |
| | |
| | | } |
| | | } |
| | | |
| | | // @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() |
| | |
| | | } |
| | | } |
| | | |
| | | // @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 == "" { |
| | |
| | | } |
| | | |
| | | |
| | | // @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) |
| | |
| | | // @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 == "" { |
| | |
| | | } |
| | | } |
| | | |
| | | // @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] |
| | |
| | | // @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] |
| | |
| | | // @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] |
| | |
| | | Enable bool `json:"enable"` |
| | | } |
| | | |
| | | /* |
| | | // @Summary 事件推送保存 |
| | | // @Description 事件推送保存 |
| | | // @Tags 事件推送 |
| | |
| | | // @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 { |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 根据事件推送主题的一级和二级选项获取最后下拉菜单列表 |
| | | // @Description 根据事件推送主题的一级和二级选项获取最后下拉菜单列表 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 查全部 |
| | | // @Description 查全部 |
| | | // @Produce json |
| | |
| | | // @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 |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 事件推送编辑 |
| | | // @Description 事件推送编辑 |
| | | // @Produce json |
| | |
| | | // @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 == "" { |
| | |
| | | Enable bool `json:"enable"` |
| | | } |
| | | |
| | | /* |
| | | // @Summary 改变enable状态 |
| | | // @Description 改变enable状态 |
| | | // @Produce json |
| | |
| | | // @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) |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 根据id删除 |
| | | // @Description 根据id删除 |
| | | // @Accept x-www-form-urlencoded |
| | |
| | | // @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 == "" { |
| | |
| | | |
| | | //var weedfsUri = "http://192.168.1.182:9500/submit" |
| | | |
| | | // @Summary 依据图片添加底库人员 |
| | | // @Description 依据图片添加底库返回数据人员 |
| | | // @Summary 单张图片上传,添加底库人员 |
| | | // @Description 单张图片上传,添加底库返回数据人员 |
| | | // @Accept mpfd |
| | | // @Produce json |
| | | // @Tags dbperson 底库人员 |
| | |
| | | } |
| | | |
| | | |
| | | // @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 { |
| | |
| | | // @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) { |
| | | //得到上传的文件 |
| | |
| | | //} // linux |
| | | result["smImage"] = smUrl |
| | | util.ResponseFormat(c, code.Success, result) |
| | | } |
| | | |
| | | /**下载方法**/ |
| | | func Filedown(c *gin.Context) { |
| | | //暂时没有提供方法 |
| | | |
| | | } |
| | |
| | | // @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) |
| | |
| | | Enable bool `json:"enable"` //是否启用轮询 |
| | | } |
| | | |
| | | /* |
| | | // @Summary 保存轮询周期 |
| | | // @Description 保存轮询周期 |
| | | // @Produce json |
| | |
| | | // @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) |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 保存轮询延时 |
| | | // @Description 保存轮询延时 |
| | | // @Produce json |
| | |
| | | // @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) |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 获取本机轮询配置 |
| | | // @Description 获取本机轮询配置 |
| | | // @Produce json |
| | |
| | | // @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() |
| | |
| | | Enable bool `json:"enable"` |
| | | } |
| | | |
| | | /* |
| | | // @Summary 切换轮询开关 |
| | | // @Description 切换轮询开关 |
| | | // @Produce json |
| | |
| | | // @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 { |
| | |
| | | Sort int `json:"sort"` //参数顺序 |
| | | } |
| | | |
| | | /* |
| | | // @Summary 算法保存 |
| | | // @Description 算法保存 |
| | | // @Produce json |
| | |
| | | // @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 |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 查找所有算法 |
| | | // @Description 查找所有算法 |
| | | // @Produce json |
| | |
| | | // @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 |
| | | |
| | |
| | | util.ResponseFormat(c, code.Success, sdks) |
| | | } |
| | | |
| | | /* |
| | | // @Summary 根据id获取算法信息 |
| | | // @Description 根据id获取算法信息 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Router /data/api-v/sdkArg/getSdkArgs [get] |
| | | */ |
| | | func (sc SdkController) GetSdkArgs(c *gin.Context) { |
| | | sdkId := c.Query("sdkId") |
| | | scope := c.Query("scope") |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 根据taskId获取算法信息 |
| | | // @Description 根据taskId获取算法信息 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | |
| | | } |
| | | |
| | | /* |
| | | // @Summary 当前用户的系统菜单 |
| | | // @Description 当前用户的系统菜单 |
| | | // @Accept json |
| | |
| | | // @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) |
| | |
| | | UpdateTime string `json:"UpdateTime"` |
| | | } |
| | | |
| | | // @Summary 存储信息查询 |
| | | // @Description 存储信息查询 |
| | | // @Summary 基础设置查询 |
| | | // @Description 基础设置查询 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags sysset |
| | |
| | | } |
| | | } |
| | | |
| | | // @Summary 存储信息修改 |
| | | // @Description 存储信息修改 |
| | | // @Summary 报警设置修改 |
| | | // @Description 报警设置修改 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags sysset |
| | |
| | | } |
| | | } |
| | | |
| | | // @Summary 存储信息修改 |
| | | // @Description 存储信息修改 |
| | | // @Summary 报警时长修改 |
| | | // @Description 报警时长修改 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags sysset |
| | |
| | | "github.com/gin-gonic/gin" |
| | | ) |
| | | |
| | | // @Summary 标签列表 |
| | | // @Summary 底库标签列表 |
| | | // @Description 返回底库标签 |
| | | // @Accept json |
| | | // @Produce json |
| | |
| | | FaceExtract_VirtualSdkId = "virtual-faceextract-sdk-pull"//结果输出的算法id |
| | | ) |
| | | |
| | | /* |
| | | // @Summary 查找所有任务,包含任务信息和对应的算法信息 |
| | | // @Description 查找所有任务 |
| | | // @Produce json |
| | |
| | | // @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 |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 添加任务 |
| | | // @Description 查找所有任务 |
| | | // @Accept json |
| | |
| | | // @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 |
| | |
| | | Sort int `json:"sort"` |
| | | } |
| | | |
| | | /* |
| | | // @Summary 给任务添加算法 |
| | | // @Description 任务添加算法 |
| | | // @Produce json |
| | |
| | | // @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) |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 任务删除算法 |
| | | // @Description 根据taskid和sdkid删除 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 更新任务名称 |
| | | // @Description 更新任务名称 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | Enable bool `json:"enable"` |
| | | } |
| | | |
| | | /* |
| | | // @Summary 更新任务状态 |
| | | // @Description (算法不变,只更新任务状态) |
| | | // @Produce json |
| | |
| | | // @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) |
| | |
| | | } |
| | | |
| | | |
| | | /* |
| | | // @Summary 删除任务 |
| | | // @Description 根据任务id删除任务 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | SdkArgValue string `json:"sdk_arg_value"` |
| | | } |
| | | |
| | | /* |
| | | // @Summary 保存算法规则 |
| | | // @Description 保存算法规则 |
| | | // @Accept json |
| | |
| | | // @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) |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | // @Summary 删除算法规则 |
| | | // @Description 删除算法规则 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | } |
| | | |
| | | |
| | | /* |
| | | // @Summary 查询算法规则 |
| | | // @Description 查询算法规则 |
| | | // @Produce json |
| | |
| | | // @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") |
| | |
| | | // @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) { |
| | | |
| | |
| | | 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,"退出成功") |
| | | } |