123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607 |
- package router
- import (
- "github.com/gin-gonic/gin"
- device "iot_manager_service/app/device/controller"
- "iot_manager_service/app/middleware"
- multimedia "iot_manager_service/app/multimedia/controller"
- operation "iot_manager_service/app/operation/controller"
- record "iot_manager_service/app/record/controller"
- security "iot_manager_service/app/security/controller"
- system "iot_manager_service/app/system/controller"
- warn "iot_manager_service/app/warn/controller"
- "iot_manager_service/util/logger"
- )
- func InitRouter(engine *gin.Engine) {
- // 跨域处理
- engine.Use(middleware.Cors())
- // 校验权限
- engine.Use(middleware.CheckAuth())
- engine.Use(gin.Recovery())
- engine.Use(logger.LogToFile())
- engine.Use(logger.Recover)
- // 操作历史记录
- handleHistory := engine.Group("/api/longchi/handlehistory")
- {
- handleHistory.GET("/list", device.HandleHistory.List)
- }
- // 设备管理
- deviceMgr := engine.Group("/api/longchi/device/")
- //设备模型
- vendor := deviceMgr.Group("vender")
- {
- vendor.GET("/getModelList", device.Util.GetModelList)
- vendor.GET("/getTypeList", device.Util.GetModelList)
- }
- //公共方法
- share := engine.Group("/api/longchi/share")
- {
- share.GET("/tenantcode/getTenantCode", device.Util.GetTenantCode)
- }
- //桥梁
- bridge := deviceMgr.Group("bridge")
- {
- bridge.GET("/detail", device.Bridge.Detail)
- bridge.GET("/list", device.Bridge.List)
- bridge.POST("/submit", device.Bridge.CreateOrUpdate)
- bridge.POST("/remove", device.Bridge.Remove)
- bridge.GET("/dropdown", device.Bridge.GetList)
- bridge.POST("/import-excel", device.Bridge.ImportExcel)
- bridge.GET("/export-excel", device.Bridge.ExportExcel)
- bridge.GET("/export-template", device.Bridge.ExportTemplate)
- }
- //桥梁传感器 控制器
- bridgeSensor := deviceMgr.Group("bridgesensor")
- {
- bridgeSensor.GET("/detail", device.BridgeSensor.Detail)
- bridgeSensor.GET("/list", device.BridgeSensor.List)
- bridgeSensor.POST("/submit", device.BridgeSensor.CreateOrUpdate)
- bridgeSensor.POST("/remove", device.BridgeSensor.Remove)
- bridgeSensor.GET("/dropdown", device.BridgeSensor.GetList)
- bridgeSensor.POST("/enable-disable", device.BridgeSensor.Enable)
- bridgeSensor.POST("/import-excel", device.BridgeSensor.ImportExcel)
- bridgeSensor.GET("/export-excel", device.BridgeSensor.ExportExcel)
- bridgeSensor.GET("/export-template", device.BridgeSensor.ExportTemplate)
- }
- //摄像头
- camera := deviceMgr.Group("/camera")
- {
- camera.GET("/detail", device.Camera.Detail)
- camera.GET("/list", device.Camera.List)
- camera.POST("/submit", device.Camera.CreateOrUpdate)
- camera.POST("/remove", device.Camera.Remove)
- camera.POST("/import-excel", device.Camera.ImportExcel)
- camera.GET("/export-excel", device.Camera.ExportExcel)
- camera.GET("/export-template", device.Camera.ExportTemplate)
- camera.POST("/enable-disable", device.Camera.Enable)
- camera.GET("/getList", device.Camera.GetList)
- }
- //抓拍单元+卡口 控制器
- captureUnit := deviceMgr.Group("captureunit")
- {
- captureUnit.GET("/detail", device.CaptureUint.Detail)
- captureUnit.GET("/capture-list", device.CaptureUint.CaptureList)
- captureUnit.POST("/capture-submit", device.CaptureUint.CaptureSubmit)
- captureUnit.GET("/capture-pull-down-list", device.CaptureUint.CaptureGetList)
- captureUnit.GET("/point-list", device.CaptureUint.PointList)
- captureUnit.POST("/point-submit", device.CaptureUint.PointSubmit)
- captureUnit.GET("/point-pull-down-list", device.CaptureUint.PointGetList)
- captureUnit.POST("/remove", device.CaptureUint.Remove)
- }
- //垃圾桶台账 控制器
- garbage := deviceMgr.Group("garbage")
- {
- garbage.GET("/detail", device.Garbage.Detail)
- garbage.GET("/list", device.Garbage.List)
- garbage.POST("/submit", device.Garbage.CreateOrUpdate)
- garbage.POST("/remove", device.Garbage.Remove)
- garbage.GET("/dropdown", device.Garbage.GetList)
- garbage.POST("/import-excel", device.Garbage.ImportExcel)
- garbage.GET("/export-excel", device.Garbage.ExportExcel)
- garbage.GET("/export-template", device.Garbage.ExportTemplate)
- }
- //垃圾桶道路分组管理 控制器
- garbageWayGroup := deviceMgr.Group("garbage-way-group")
- {
- garbageWayGroup.GET("/detail", device.GarbageWay.Detail)
- garbageWayGroup.GET("/list", device.GarbageWay.List)
- garbageWayGroup.POST("/submit", device.GarbageWay.CreateOrUpdate)
- garbageWayGroup.POST("/remove", device.GarbageWay.Remove)
- garbageWayGroup.GET("/getList", device.GarbageWay.GetList)
- }
- //信息屏基本信息 控制器
- infoBoard := deviceMgr.Group("infoboard")
- {
- infoBoard.GET("/detail", device.InfoBoard.Detail)
- infoBoard.GET("/list", device.InfoBoard.List)
- infoBoard.POST("/submit", device.InfoBoard.CreateOrUpdate)
- infoBoard.POST("/remove", device.InfoBoard.Remove)
- infoBoard.POST("/import-excel", device.InfoBoard.ImportExcel)
- infoBoard.GET("/export-excel", device.InfoBoard.ExportExcel)
- infoBoard.GET("/export-template", device.InfoBoard.ExportTemplate)
- infoBoard.POST("/system-operation", device.InfoBoard.CreateOrUpdate)
- infoBoard.POST("/enable-disable", device.InfoBoard.Enable)
- infoBoard.POST("/show-setting", device.InfoBoard.ShowSetting)
- }
- //IP广播基本信息 控制器
- ipBroadCast := deviceMgr.Group("ipbroadcast")
- {
- ipBroadCast.GET("/detail", device.IpBroadcast.Detail)
- ipBroadCast.GET("/list", device.IpBroadcast.List)
- ipBroadCast.POST("/submit", device.IpBroadcast.CreateOrUpdate)
- ipBroadCast.POST("/remove", device.IpBroadcast.Remove)
- ipBroadCast.POST("/import-excel", device.IpBroadcast.ImportExcel)
- ipBroadCast.GET("/export-excel", device.IpBroadcast.ExportExcel)
- ipBroadCast.GET("/export-template", device.IpBroadcast.ExportTemplate)
- ipBroadCast.POST("/setting-volume", device.IpBroadcast.SettingVolume)
- }
- //一键报警服务表 控制器
- Alarm := deviceMgr.Group("akeyalarmserve")
- {
- Alarm.GET("/detail", device.Alarm.Detail)
- Alarm.GET("/list", device.Alarm.List)
- Alarm.POST("/submit", device.Alarm.CreateOrUpdate)
- Alarm.POST("/remove", device.Alarm.Remove)
- Alarm.GET("/getList", device.Alarm.GetList)
- Alarm.POST("/import-excel", device.Alarm.ImportExcel)
- Alarm.GET("/export-excel", device.Alarm.ExportExcel)
- Alarm.GET("/export-template", device.Alarm.ExportTemplate)
- }
- //一键报警终端表 控制器
- AlarmTerminal := deviceMgr.Group("akeyalarmterminal")
- {
- AlarmTerminal.GET("/detail", device.AlarmTerminal.Detail)
- AlarmTerminal.GET("/list", device.AlarmTerminal.List)
- AlarmTerminal.POST("/submit", device.AlarmTerminal.CreateOrUpdate)
- AlarmTerminal.POST("/remove", device.AlarmTerminal.Remove)
- AlarmTerminal.POST("/import-excel", device.AlarmTerminal.ImportExcel)
- AlarmTerminal.GET("/export-excel", device.AlarmTerminal.ExportExcel)
- AlarmTerminal.GET("/export-template", device.AlarmTerminal.ExportTemplate)
- }
- //灯杆基本信息 控制器
- lampPole := deviceMgr.Group("lamppole")
- {
- lampPole.GET("/detail", device.LampPole.Detail)
- lampPole.GET("/getRelevanceDetail", device.LampPole.GetRelevanceDetail)
- lampPole.GET("/list", device.LampPole.List)
- lampPole.POST("/submit", device.LampPole.CreateOrUpdate)
- lampPole.POST("/remove", device.LampPole.Remove)
- lampPole.GET("/getList", device.LampPole.GetList)
- lampPole.POST("/import-excel", device.LampPole.ImportExcel)
- lampPole.GET("/export-excel", device.LampPole.ExportExcel)
- lampPole.GET("/export-template", device.LampPole.ExportTemplate)
- }
- //灯杆分组
- lampPoleGroup := deviceMgr.Group("/lamppolegroup")
- {
- lampPoleGroup.GET("/detail", device.LampPoleGroup.Detail)
- lampPoleGroup.GET("/list", device.LampPoleGroup.List)
- lampPoleGroup.POST("/submit", device.LampPoleGroup.CreateOrUpdate)
- lampPoleGroup.POST("/remove", device.LampPoleGroup.Remove)
- lampPoleGroup.GET("/getList", device.LampPoleGroup.GetList)
- lampPoleGroup.GET("/filtration-list", device.LampPoleGroup.FiltrationList)
- lampPoleGroup.GET("/getTree", device.LampPoleGroup.GetTree)
- }
- //灯控基本信息 控制器
- lightControl := deviceMgr.Group("lightcontrol")
- {
- lightControl.GET("/detail", device.Light.Detail)
- lightControl.GET("/list", device.Light.List)
- lightControl.POST("/submit", device.Light.CreateOrUpdate)
- lightControl.POST("/remove", device.Light.Remove)
- lightControl.GET("/getLampPoleList", device.Light.GetList)
- lightControl.POST("/import-excel", device.Light.ImportExcel)
- lightControl.GET("/export-excel", device.Light.ExportExcel)
- lightControl.GET("/export-template", device.Light.ExportTemplate)
- lightControl.POST("/enable-disable", device.Light.Enable)
- lightControl.POST("/off-one", device.Light.Switch) //todo 在strategy中
- }
- manholeCover := deviceMgr.Group("manholecover")
- {
- manholeCover.GET("/detail", device.ManholeCover.Detail)
- manholeCover.GET("/list", device.ManholeCover.List)
- manholeCover.POST("/submit", device.ManholeCover.CreateOrUpdate)
- manholeCover.POST("/remove", device.ManholeCover.Remove)
- manholeCover.POST("/setting", device.ManholeCover.Setting)
- manholeCover.GET("/getList", device.ManholeCover.GetList)
- manholeCover.POST("/import-excel", device.ManholeCover.ImportExcel)
- manholeCover.GET("/export-excel", device.ManholeCover.ExportExcel)
- manholeCover.GET("/export-template", device.ManholeCover.ExportExcel)
- manholeCover.GET("/all-list", device.ManholeCover.AllList)
- }
- //灯随车走分组 控制器
- onDemandGroup := deviceMgr.Group("on-demand-group")
- {
- onDemandGroup.GET("/detail", device.OnDemandGroup.Detail)
- onDemandGroup.GET("/list", device.OnDemandGroup.List)
- onDemandGroup.POST("/submit", device.OnDemandGroup.CreateOrUpdate)
- onDemandGroup.POST("/remove", device.OnDemandGroup.Remove)
- onDemandGroup.GET("/getList", device.OnDemandGroup.GetList)
- onDemandGroup.GET("/group-number", device.OnDemandGroup.GroupNumber)
- }
- //灯随车走传感器 控制器
- onDemandSensor := deviceMgr.Group("on-demand-sensor")
- {
- onDemandSensor.GET("/detail", device.OnDemandSensor.Detail)
- onDemandSensor.GET("/list", device.OnDemandSensor.List)
- onDemandSensor.POST("/submit", device.OnDemandSensor.CreateOrUpdate)
- onDemandSensor.POST("/remove", device.OnDemandSensor.Remove)
- onDemandSensor.POST("/import-excel", device.OnDemandSensor.ImportExcel)
- onDemandSensor.GET("/export-excel", device.OnDemandSensor.ExportExcel)
- onDemandSensor.GET("/export-template", device.OnDemandSensor.ExportTemplate)
- }
- //环境传感器 控制器
- optoSensor := deviceMgr.Group("optosensor")
- {
- optoSensor.GET("/detail", device.OptoSensor.Detail)
- optoSensor.GET("/list", device.OptoSensor.List)
- optoSensor.POST("/submit", device.OptoSensor.CreateOrUpdate)
- optoSensor.POST("/remove", device.OptoSensor.Remove)
- optoSensor.GET("/getList", device.OptoSensor.GetList)
- optoSensor.POST("/set-default", device.OptoSensor.SetDefault)
- optoSensor.POST("/import-excel", device.OptoSensor.ImportExcel)
- optoSensor.GET("/export-excel", device.OptoSensor.ExportExcel)
- optoSensor.GET("/export-template", device.OptoSensor.ExportTemplate)
- }
- //配电箱基本信息 控制器
- switchBox := deviceMgr.Group("switchbox")
- {
- switchBox.GET("/detail", device.SwitchBox.Detail)
- switchBox.GET("/list", device.SwitchBox.List)
- switchBox.POST("/submit", device.SwitchBox.CreateOrUpdate)
- switchBox.POST("/remove", device.SwitchBox.Remove)
- switchBox.GET("/getList", device.SwitchBox.GetList)
- switchBox.POST("/import-excel", device.SwitchBox.ImportExcel)
- switchBox.GET("/export-excel", device.SwitchBox.ExportExcel)
- switchBox.GET("/export-template", device.SwitchBox.ExportTemplate)
- }
- //变压器基本信息 控制器
- transformer := deviceMgr.Group("transformer")
- {
- transformer.GET("/detail", device.Transformer.Detail)
- transformer.GET("/list", device.Transformer.List)
- transformer.POST("/submit", device.Transformer.CreateOrUpdate)
- transformer.POST("/remove", device.Transformer.Remove)
- transformer.GET("/getList", device.Transformer.GetList)
- }
- //智慧网关基本信息 控制器
- wisdomGateway := deviceMgr.Group("wisdomgateway")
- {
- wisdomGateway.GET("/detail", device.Gateway.Detail)
- wisdomGateway.GET("/list", device.Gateway.List)
- wisdomGateway.POST("/submit", device.Gateway.CreateOrUpdate)
- wisdomGateway.POST("/remove", device.Gateway.Remove)
- wisdomGateway.GET("/getList", device.Gateway.GetList)
- wisdomGateway.GET("/getRelevanceDetail", device.Gateway.GetRelevanceDetail)
- wisdomGateway.POST("/import-excel", device.Gateway.ImportExcel)
- wisdomGateway.GET("/export-excel", device.Gateway.ExportExcel)
- wisdomGateway.GET("/export-template", device.Gateway.ExportTemplate)
- }
- //zigBee网关 控制器
- zigbee := deviceMgr.Group("zigbee")
- {
- zigbee.GET("/detail", device.Zigbee.Detail)
- zigbee.GET("/list", device.Zigbee.List)
- zigbee.POST("/submit", device.Zigbee.CreateOrUpdate)
- zigbee.POST("/remove", device.Zigbee.Remove)
- zigbee.GET("/getList", device.Zigbee.GetList)
- zigbee.POST("/import-excel", device.Zigbee.ImportExcel)
- zigbee.GET("/export-excel", device.Zigbee.ExportExcel)
- zigbee.GET("/export-template", device.Zigbee.ExportTemplate)
- }
- // 设备控制相关
- strategy := engine.Group("/api/longchi/strategy")
- ////智能照明(灯杆分组/灯控树) 控制器
- //intelligentLighting := strategy.Group("IntelligentLighting")
- //{
- // intelligentLighting.GET("/detail", device.IntelligentLighting.Detail)
- // intelligentLighting.GET("/list", device.IntelligentLighting.List)
- // intelligentLighting.POST("/relationList", device.IntelligentLighting.RelationList)
- // intelligentLighting.POST("/relation", device.IntelligentLighting.Relation)
- // intelligentLighting.POST("/remove", device.IntelligentLighting.Remove)
- // intelligentLighting.POST("/changHandSwitch", device.IntelligentLighting.ChangeHandSwitch)
- // intelligentLighting.POST("/get_status", device.IntelligentLighting.GetStatus)
- //}
- //照明策略 控制器
- lightStrategy := strategy.Group("light")
- {
- lightStrategy.GET("/detail", device.LightStrategy.Detail)
- lightStrategy.GET("/list", device.LightStrategy.List)
- lightStrategy.POST("/submit", device.LightStrategy.CreateOrUpdate)
- lightStrategy.POST("/remove", device.LightStrategy.Remove)
- }
- //照明策略略关联(灯杆分组/灯控树形态) 控制器
- lightRelation := strategy.Group("lightrelation")
- {
- lightRelation.GET("/detail", device.IntelligentLighting.Detail)
- lightRelation.GET("/list", device.IntelligentLighting.List)
- lightRelation.POST("/remove", device.IntelligentLighting.Recovery)
- lightRelation.POST("/relationList", device.IntelligentLighting.RelationList)
- lightRelation.POST("/relation", device.IntelligentLighting.Relation)
- lightRelation.POST("/changeHandSwitch", device.IntelligentLighting.ChangeHandSwitch)
- }
- //灯随车走照明控制 控制器
- onDemandLightingControl := strategy.Group("onDemandLightingControl")
- {
- onDemandLightingControl.GET("/detail", device.OnDemandLightingControl.Detail)
- onDemandLightingControl.GET("/list", device.OnDemandLightingControl.List)
- onDemandLightingControl.POST("/relation", device.OnDemandLightingControl.Relation)
- onDemandLightingControl.POST("/changHandSwitch", device.OnDemandLightingControl.ChangeHandSwitch)
- }
- //登录校验相关
- auth := engine.Group("/api/blade-auth/oauth")
- {
- auth.POST("/token", system.Auth.Token)
- auth.GET("/logout", system.Auth.Logout)
- auth.GET("/captcha", system.Auth.Captcha)
- auth.GET("/clear-cache", system.Auth.Clear)
- }
- login := engine.Group("/api/login")
- {
- login.GET("", system.Auth.Login)
- }
- //用户
- user := engine.Group("/api/blade-user")
- {
- user.GET("/detail", system.User.GetDetail)
- user.GET("/page", system.User.List)
- user.POST("/submit", system.User.Submit)
- user.POST("/update", system.User.Update)
- user.POST("/remove", system.User.Remove)
- user.POST("/reset-password", system.User.ResetPwd)
- user.POST("/user-list", system.User.GetList)
- user.POST("/grant", system.User.Grant)
- }
- //租户
- tenant := engine.Group("/api/blade-system/tenant")
- {
- tenant.GET("/info", system.Tenant.GetInfo)
- tenant.GET("/detail", system.Tenant.GetDetail)
- tenant.GET("/page", system.Tenant.List)
- tenant.POST("/submit", system.Tenant.Submit)
- tenant.POST("/remove", system.Tenant.Remove)
- tenant.POST("/select", system.Tenant.GetList)
- tenant.GET("/list", system.Tenant.List)
- }
- //角色
- role := engine.Group("/api/blade-system/role")
- {
- role.GET("/detail", system.Role.GetDetail)
- role.GET("/list", system.Role.List)
- role.GET("/tree", system.Role.Tree)
- role.POST("/submit", system.Role.Submit)
- role.POST("/remove", system.Role.Remove)
- role.POST("/grant", system.Role.Grant)
- }
- //菜单
- menu := engine.Group("/api/blade-system/menu")
- {
- menu.GET("/detail", system.Menu.GetDetail)
- menu.GET("list", system.Menu.List)
- menu.GET("lazy-list", system.Menu.LazyList)
- menu.GET("menuList", system.Menu.MenuList)
- menu.GET("lazyMenuList", system.Menu.LazyMenuList)
- menu.POST("submit", system.Menu.Submit)
- menu.POST("remove", system.Menu.Remove)
- menu.GET("routes", system.Menu.Routes)
- menu.GET("routesExt", system.Menu.RoutesExt)
- menu.GET("buttons", system.Menu.Buttons)
- menu.GET("tree", system.Menu.Tree)
- menu.GET("grantTree", system.Menu.GrantTree)
- menu.GET("roleTreeKeys", system.Menu.RoleTreeKeys)
- menu.GET("grantTopTree", system.Menu.GrantTopTree)
- menu.GET("topTreeKeys", system.Menu.GrantTopTree)
- menu.GET("top-menu", system.Menu.TopMenu)
- menu.GET("authRoutes", system.Menu.Routes)
- }
- //字典
- dict := engine.Group("/api/blade-system/dict")
- {
- dict.GET("/dictionary", system.Dict.Dictionary)
- }
- //工作台
- workbench := engine.Group("/api/longchi/report/workbench/")
- {
- workbench.POST("countdevice", device.Workbench.CountDevice)
- workbench.POST("countalarm", device.Workbench.CountAlarm)
- workbench.POST("aqi", device.Workbench.Aqi)
- workbench.POST("countjobtodo", device.Workbench.CountJobTodo)
- workbench.POST("notification", device.Workbench.Notification)
- workbench.GET("light-pandect", device.Workbench.LightRate)
- }
- //记录
- recordGroup := engine.Group("/api/longchi/record")
- {
- //灯控
- lightRecord := recordGroup.Group("/lighting/lightingrecordhis")
- {
- lightRecord.GET("/list", record.LightRecord.List)
- lightRecord.GET("/detail", record.LightRecord.Detail)
- lightRecord.POST("/refresh", record.LightRecord.Refresh)
- }
- akeyalarmRecord := recordGroup.Group("/akeyalarm/keyalarmrecondhis")
- {
- akeyalarmRecord.GET("/list", record.AKeyAlarmRecord.List)
- akeyalarmRecord.GET("/detail", record.AKeyAlarmRecord.Detail)
- akeyalarmRecord.GET("/refresh", record.AKeyAlarmRecord.Refresh)
- akeyalarmRecord.POST("/dispose", record.AKeyAlarmRecord.Dispose)
- }
- }
- //安防
- securityGroup := engine.Group("/api/longchi/security")
- {
- securityGroup.GET("/getCameraLiveList", security.Security.GetCameraLiveList)
- securityGroup.GET("/operate", security.Security.Operate)
- securityGroup.POST("/ptzhome", security.Security.Ptzhome)
- securityMultiscreenGroup := securityGroup.Group("/multiscreen")
- {
- securityMultiscreenGroup.GET("list", security.Multiscreen.List)
- securityMultiscreenGroup.GET("cameraList", security.Security.GetCameraLiveList)
- securityMultiscreenGroup.POST("submit", security.Multiscreen.Submit)
- }
- securityRewindGroup := securityGroup.Group("/rewind")
- {
- securityRewindGroup.GET("getCameraLiveList", security.Security.GetCameraLiveList)
- securityRewindGroup.POST("rewind-text", security.Rewind.RewindText)
- }
- }
- // 媒体素材
- multimediaGroup := engine.Group("/api/longchi/multimedia/library")
- {
- multimediaGroup.GET("/list", multimedia.Library.List)
- multimediaGroup.GET("/detail", multimedia.Library.Detail)
- multimediaGroup.POST("/remove", multimedia.Library.Remove)
- multimediaGroup.GET("/getList", multimedia.Library.GetList)
- multimediaGroup.POST("/putFile", multimedia.Library.UploadFile)
- multimediaGroup.POST("/putMp3File", multimedia.Library.UploadFile)
- multimediaGroup.POST("/submit", multimedia.Library.Submit)
- }
- //上传设备图
- systemGroup := engine.Group("/api/longchi/system/public")
- {
- systemGroup.POST("/putFile", multimedia.Library.UploadFile)
- }
- // 媒体节目
- programGroup := engine.Group("/api/longchi/multimedia/programlibraries")
- {
- programGroup.GET("/list", multimedia.Program.List)
- programGroup.GET("/detail", multimedia.Program.Detail)
- programGroup.POST("/remove", multimedia.Program.Remove)
- programGroup.GET("/getList", multimedia.Program.GetList)
- programGroup.POST("/submit", multimedia.Program.Submit)
- programGroup.POST("/getLibraryList", multimedia.Program.GetLibraryList)
- programGroup.POST("/relationDeviceList", multimedia.Program.RelationDeviceList)
- //todo 前端需要和relationDeviceList合并,使用一个接口
- programGroup.POST("/ip-broadcast-relation-list", multimedia.Program.RelationIpBroadcastList)
- programGroup.POST("/audit", multimedia.Program.Audit)
- }
- //节目播放
- publishLibraries := engine.Group("/api/longchi/multimedia/publishlibraries")
- {
- publishLibraries.GET("/list", multimedia.PublishLibraries.List)
- publishLibraries.POST("/getLibraryList", multimedia.PublishLibraries.GetLibraryList)
- publishLibraries.GET("/affiliate-equipment", multimedia.PublishLibraries.AffiliateEquipment)
- publishLibraries.POST("/updateStatus", multimedia.PublishLibraries.UpdateStatus)
- }
- operationGroup := engine.Group("/api/longchi/operation")
- environment := operationGroup.Group("/em/environmentMonitor")
- {
- environment.GET("/getNewList", operation.Environment.EnvironmentList)
- environment.GET("/getNewMeteorologicalData", operation.Environment.GetData)
- environment.GET("/query-environment", operation.Environment.GetHistoryData)
- environment.GET("/getScopeList", operation.Environment.GetScopeList)
- }
- garbageGroup := operationGroup.Group("/garbage")
- {
- garbageGroup.GET("/query-way-realtime", operation.Garbage.GarbageList)
- garbageGroup.GET("/count-list", operation.Garbage.CountList)
- }
- bridgeGroup := operationGroup.Group("/bridge")
- {
- bridgeGroup.GET("/data/environmental/environmental-list", operation.Bridge.EnvironmentList)
- bridgeGroup.GET("/data/sensor/list", operation.Bridge.SensorList)
- bridgeGroup.GET("/data/sensor/realtime-data", operation.Bridge.LiveData)
- bridgeGroup.GET("/data/pandect/detail", operation.Bridge.Summary)
- bridgeGroup.GET("/data/pandect/health-indicators", operation.Bridge.HealthIndicators)
- bridgeGroup.GET("/data/pandect/list", operation.Bridge.SummaryList)
- bridgeGroup.GET("/data/pandect/camera-list", operation.Bridge.CameraList)
- }
- manholeGroup := operationGroup.Group("/manhole")
- {
- manholeGroup.GET("/now", operation.Manhole.LiveData)
- manholeGroup.GET("/history-list", operation.Manhole.LiveData)
- }
- //运营统计-设备
- operationDeviceGroup := operationGroup.Group("/device")
- {
- operationDeviceGroup.POST("count-device", operation.Device.CountDevice)
- operationDeviceGroup.POST("list", operation.Device.MonthList)
- operationDeviceGroup.POST("year-list", operation.Device.YearList)
- }
- //灯控能耗统计
- operationGroup.POST("/energy/list", operation.LightingRate.List)
- warnGroup := engine.Group("/api/longchi/alarm")
- {
- //告警设置
- noticeGroup := warnGroup.Group("notice")
- {
- noticeGroup.GET("/list", warn.NoticeSet.List)
- noticeGroup.POST("/update", warn.NoticeSet.Update)
- noticeGroup.POST("/remove", warn.NoticeSet.Remove)
- noticeGroup.GET("/detail", warn.NoticeSet.Detail)
- noticeGroup.GET("/getUserList", warn.NoticeSet.GetUserList)
- }
- //发送记录
- sendrecordGroup := warnGroup.Group("sendrecord")
- {
- sendrecordGroup.GET("/list", warn.NoticeRecord.List)
- }
- //运维告警记录
- alarmGroup := warnGroup.Group("alarm")
- {
- alarmGroup.GET("/list", warn.PlatformAlarm.List)
- alarmGroup.GET("/detail", warn.PlatformAlarm.Detail)
- alarmGroup.GET("/refresh", warn.PlatformAlarm.Refresh)
- alarmGroup.POST("/changeHandleType", warn.PlatformAlarm.HandleAlert)
- }
- //业务告警记录
- warnGroup.GET("/alarmrecords/list", warn.NoticeRecord.List)
- // 业务 策略 告警
- businesstacticsGroup := warnGroup.Group("businesstactics")
- {
- businesstacticsGroup.GET("/list", warn.BusinessTactics.List)
- businesstacticsGroup.GET("/detail", warn.BusinessTactics.Detail)
- businesstacticsGroup.POST("/submit", warn.BusinessTactics.SaveOrUpdate)
- businesstacticsGroup.POST("/remove", warn.BusinessTactics.Remove)
- businesstacticsGroup.POST("/enable-disable", warn.BusinessTactics.Enable)
- }
- }
- }
|