Warning.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package routers
  2. import (
  3. "Cold_Api/conf"
  4. "Cold_Api/controllers"
  5. beego "github.com/beego/beego/v2/server/web"
  6. )
  7. func init() {
  8. ns := beego.NewNamespace(conf.Version,
  9. // 设备报警
  10. beego.NSNamespace("/DeviceWarning",
  11. beego.NSRouter("/List", &controllers.DeviceController{}, "*:DeviceWarning_List"), // 告警列表
  12. beego.NSRouter("/Get", &controllers.DeviceController{}, "*:DeviceWarning_Get"), // 获取告警
  13. beego.NSRouter("/Edit", &controllers.DeviceController{}, "*:DeviceWarning_Post"), // 修改告警 报警处理
  14. beego.NSRouter("/Del", &controllers.DeviceController{}, "*:DeviceWarning_Del"), // 删除告警
  15. beego.NSRouter("/ToExcel", &controllers.DeviceController{}, "*:DeviceWarning_Data_Excel"), // 导出excel
  16. beego.NSRouter("/DeviceSensor_List", &controllers.DeviceController{}, "*:Read_Warning_List_By_DS_T_type"), // 告警列表 - 小程序
  17. ),
  18. // 报警类型
  19. beego.NSNamespace("/WarningType",
  20. beego.NSRouter("/List_All", &controllers.DeviceController{}, "*:WarningType_List_All"), // 添加权限-告警类型列表
  21. beego.NSRouter("/Power_List", &controllers.DeviceController{}, "*:WarningType_Power_List_All"), // 报警搜索-告警类型列表
  22. ),
  23. // 报警发送
  24. beego.NSNamespace("/WarningSend",
  25. beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningSend_List"), // 报警发送列表
  26. ),
  27. // 内部用户设备报警率
  28. beego.NSNamespace("/WarningRate",
  29. beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningRate_List"), // 内部用户设备报警率列表
  30. beego.NSRouter("/User_List", &controllers.DeviceController{}, "*:Read_WarningRate_List"), // 内部用户设备报警率列表
  31. ),
  32. )
  33. beego.AddNamespace(ns)
  34. }