Warning.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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.NSNamespace("/WarningHandle",
  34. beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningHandle_List"), // 内部用户设备报警率列表
  35. ),
  36. // 公司管理-设备报警
  37. beego.NSNamespace("/CompanyWarning",
  38. beego.NSRouter("/List", &controllers.DeviceController{}, "*:CompanyWarning_List"), // 告警列表
  39. beego.NSRouter("/ToExcel", &controllers.DeviceController{}, "*:CompanyWarning_Data_Excel"), // 告警列表
  40. ),
  41. )
  42. beego.AddNamespace(ns)
  43. }