liuxiaolong
2020-06-05 7c811247ecf143e08c576986a884bedadc57dd66
router/router.go
@@ -28,7 +28,7 @@
   esSearchController := new(controllers.EsSearchController)
   esManagementController := new(controllers.EsManagementController)
   realTimeController := new(controllers.RealTimeController)
   clearDataController := new(controllers.ClearDataController)
   deleteDataController := new(controllers.DeleteDataController)
   cameraTimeRuleController := new(controllers.CameraTimeruleController)
   polygonController := new(controllers.CameraPolygonController)
   cameraTaskController := new(controllers.CameraTaskController)
@@ -45,6 +45,9 @@
   licenseController := new(controllers.LicenseController)
   fileAnalysisC := new(controllers.FileAnalysisController)
   fileSettingC := new(controllers.FileAnalysisSettingController)
    icController := new(controllers.InfoController)
    gb28181C := new(controllers.Gb28181Controller)
    fStackC := new(controllers.FileStackController)
   urlPrefix := "/data/api-v" // wp 添加 路径 前缀
@@ -91,6 +94,12 @@
      area.POST("/gb28181TreeDelete", areaController.Gb28181TreeDelete)
   }
    gbApi := r.Group(urlPrefix + "/gb28181")
    {
        gbApi.GET("/findAreaByParentId", gb28181C.FindAreaByParentId)
        gbApi.GET("/newGbId",gb28181C.NewGbId)
    }
   //摄像机管理
   camera := r.Group(urlPrefix + "/camera")
   {
@@ -98,6 +107,7 @@
      camera.PUT("/update", cameraController.CameraUpdate)
      camera.DELETE("/del/:cid", cameraController.CameraDel)
      camera.GET("/show/:cid", cameraController.CameraSel)
        camera.POST("/updateCameraArea", cameraController.UpdateCameraArea)
      camera.GET("/updateSnapshotUrl/:cid", cameraController.UpdateSnapshotUrl)
      camera.POST("/alltask", cameraTaskController.FindTasksByCameraIds)
@@ -183,9 +193,9 @@
      realTime.POST("/initForMonitoringData", realTimeController.InitForMonitoringData)
   }
   //清理数据
   clearData := r.Group(urlPrefix + "/clearData")
   deleteData := r.Group(urlPrefix + "/clearData")
   {
      clearData.POST("/clearEsData", clearDataController.ClearEsData)
      deleteData.POST("/deleteEsData", deleteDataController.DeleteEsData)
   }
   //底库 操作
@@ -217,6 +227,8 @@
      vdbperson.POST("/joinDbTable", dbPersonCont.JoinDbTable)
      vdbperson.POST("/move", dbPersonCont.Move)
      vdbperson.POST("/copy", dbPersonCont.Copy)
      vdbperson.POST("/multiUploadCarNo", dbPersonCont.MultiUploadCarNo)
   }
   // 系统设置 操作
@@ -247,6 +259,11 @@
      vsset.POST("/upgrade", ssController.Upgrade)
   }
    ic := r.Group(urlPrefix + "/info")
    {
        ic.GET("/getServerName", icController.GetServerName)
    }
   //算法库操作
   sdkApi := r.Group(urlPrefix + "/sdk")
   {
@@ -255,6 +272,8 @@
      sdkApi.GET("/findByTaskId", sdkController.FindByTaskId)
      sdkApi.GET("/getById", sdkController.GetById)
      sdkApi.GET("/sdkDownload", sdkController.SdkDownLoad)
      sdkApi.GET("/upload", sdkController.Upload)
      sdkApi.POST("/upload", sdkController.UploadPack)
   }
   //算法参数
@@ -309,6 +328,11 @@
      fileAnalyApi.POST("/updateStatus", fileAnalysisC.UpdateStatus)
      fileAnalyApi.POST("/delete", fileAnalysisC.Delete)
      fileAnalyApi.POST("/sortFile", fileAnalysisC.SortFile)
      fileAnalyApi.GET("/findByStackId", fileAnalysisC.FindByStackId)
      fileAnalyApi.POST("/move", fileAnalysisC.Move)
      fileAnalyApi.POST("/rename", fileAnalysisC.Rename)
      fileAnalyApi.POST("/copy", fileAnalysisC.Copy)
   }
   fileSettingApi := r.Group(urlPrefix + "/fileSetting")
   {
@@ -316,6 +340,15 @@
      fileSettingApi.POST("/changeEnable", fileSettingC.ChangeEnable)
   }
    fStackApi := r.Group(urlPrefix +"/fileStack")
    {
        fStackApi.GET("/findAllByPage",fStackC.FindAllByPage)
        fStackApi.POST("/save",fStackC.Save)
        fStackApi.GET("/show/:id", fStackC.Show)
        fStackApi.POST("/changeEnable", fStackC.ChangeEnable)
        fStackApi.DELETE("/delete/:id", fStackC.Delete)
    }
   // 文件 上传
   r.Static("static", "./static") // 静态文件
   //外部访问swagger.json