1234567891011121314151617181920212223242526272829303132333435363738 |
- package routers
- import (
- "Cold_Api/conf"
- "Cold_Api/controllers"
- beego "github.com/beego/beego/v2/server/web"
- )
- func init() {
- ns := beego.NewNamespace(conf.Version,
- // 设备报警
- beego.NSNamespace("/DeviceWarning",
- beego.NSRouter("/List", &controllers.DeviceController{}, "*:DeviceWarning_List"), // 告警列表
- beego.NSRouter("/Get", &controllers.DeviceController{}, "*:DeviceWarning_Get"), // 获取告警
- beego.NSRouter("/Edit", &controllers.DeviceController{}, "*:DeviceWarning_Post"), // 修改告警 报警处理
- beego.NSRouter("/Del", &controllers.DeviceController{}, "*:DeviceWarning_Del"), // 删除告警
- beego.NSRouter("/ToExcel", &controllers.DeviceController{}, "*:DeviceWarning_Data_Excel"), // 导出excel
- beego.NSRouter("/DeviceSensor_List", &controllers.DeviceController{}, "*:Read_Warning_List_By_DS_T_type"), // 告警列表 - 小程序
- ),
- // 报警类型
- beego.NSNamespace("/WarningType",
- beego.NSRouter("/List_All", &controllers.DeviceController{}, "*:WarningType_List_All"), // 添加权限-告警类型列表
- beego.NSRouter("/Power_List", &controllers.DeviceController{}, "*:WarningType_Power_List_All"), // 报警搜索-告警类型列表
- ),
- // 报警发送
- beego.NSNamespace("/WarningSend",
- beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningSend_List"), // 报警发送列表
- ),
- // 内部用户设备报警率
- beego.NSNamespace("/WarningRate",
- beego.NSRouter("/List", &controllers.DeviceController{}, "*:Read_WarningRate_List"), // 内部用户设备报警率列表
- ),
- )
- beego.AddNamespace(ns)
- }
|