liuxiaolong
2020-06-05 7c811247ecf143e08c576986a884bedadc57dd66
router/router.go
@@ -28,6 +28,7 @@
   esSearchController := new(controllers.EsSearchController)
   esManagementController := new(controllers.EsManagementController)
   realTimeController := new(controllers.RealTimeController)
   deleteDataController := new(controllers.DeleteDataController)
   cameraTimeRuleController := new(controllers.CameraTimeruleController)
   polygonController := new(controllers.CameraPolygonController)
   cameraTaskController := new(controllers.CameraTaskController)
@@ -44,10 +45,13 @@
   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 添加 路径 前缀
   licenseApi :=r.Group(urlPrefix+"/license")
   licenseApi := r.Group(urlPrefix + "/license")
   {
      licenseApi.POST("/getRegisterCode", licenseController.GetRegisterCode)
      licenseApi.POST("/save", licenseController.Save)
@@ -90,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")
   {
@@ -97,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)
@@ -112,6 +123,7 @@
      camera.POST("/ptzControl", ptzController.Move)
      camera.GET("/statisticRunInfo", cameraController.StatisticRunInfo)
      camera.POST("/pasteRules", cameraTaskController.PasteRules)
   }
   cameraTaskArgsApi := r.Group(urlPrefix + "/cameraTaskArgs")
@@ -180,6 +192,12 @@
      realTime.POST("/initForCaptureData", realTimeController.InitForCaptureData)
      realTime.POST("/initForMonitoringData", realTimeController.InitForMonitoringData)
   }
   //清理数据
   deleteData := r.Group(urlPrefix + "/clearData")
   {
      deleteData.POST("/deleteEsData", deleteDataController.DeleteEsData)
   }
   //底库 操作
   vdbtable := r.Group(urlPrefix + "/dbtable")
   {
@@ -209,6 +227,8 @@
      vdbperson.POST("/joinDbTable", dbPersonCont.JoinDbTable)
      vdbperson.POST("/move", dbPersonCont.Move)
      vdbperson.POST("/copy", dbPersonCont.Copy)
      vdbperson.POST("/multiUploadCarNo", dbPersonCont.MultiUploadCarNo)
   }
   // 系统设置 操作
@@ -231,7 +251,18 @@
      vsset.GET("/reboot", ssController.RebootOS)
      vsset.GET("/rebootTask", ssController.GetRebootTask)
      vsset.POST("/rebootTask", ssController.SetRebootTask)
      vsset.GET("/getResourceConfig", ssController.GetResourceConfig)
      vsset.POST("/saveResourceConfig", ssController.SaveResourceConfig)
      vsset.GET("/patchUpdate", ssController.PatchUpdateCheck)
      vsset.POST("/patchUpdate", ssController.PatchUpdate)
      vsset.POST("/upgrade", ssController.Upgrade)
   }
    ic := r.Group(urlPrefix + "/info")
    {
        ic.GET("/getServerName", icController.GetServerName)
    }
   //算法库操作
   sdkApi := r.Group(urlPrefix + "/sdk")
@@ -241,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)
   }
   //算法参数
@@ -292,16 +325,30 @@
   fileAnalyApi := r.Group(urlPrefix + "/fileAnalysis")
   {
      fileAnalyApi.GET("/findAllFile", fileAnalysisC.FindAllFile)
      fileAnalyApi.POST("/updateStatus",fileAnalysisC.UpdateStatus)
      fileAnalyApi.POST("/delete",fileAnalysisC.Delete)
      fileAnalyApi.POST("/sortFile",fileAnalysisC.SortFile)
      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")
   {
      fileSettingApi.GET("/show",fileSettingC.Show)
      fileSettingApi.GET("/show", fileSettingC.Show)
      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