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("/Data", beego.NSBefore(T_pidFilter), beego.NSRouter("/Device_Sensor", &controllers.DataController{}, "*:Device_Sensor_Get"), // 获取传感器 beego.NSRouter("/Device_Sensor_Data_Real", &controllers.DataController{}, "*:Device_Sensor_Data_Real"), // 获取传感器 beego.NSRouter("/Device_Sensor_List", &controllers.DataController{}, "*:Device_Sensor_List"), // 传感器列表 beego.NSRouter("/Company_Device_Sensor_List", &controllers.DataController{}, "*:Company_Device_Sensor_List"), // 传感器列表 beego.NSRouter("/Company_key_Device_Sensor_List", &controllers.DataController{}, "*:Company_Device_Sensor_List_ByKey"), // 传感器列表-通过公司key获取 beego.NSRouter("/Device_Sensor_Data", &controllers.DataController{}, "*:Device_Sensor_Data"), // 传感器数据 beego.NSRouter("/Device_Sensor_Data_Excel", &controllers.DataController{}, "*:Device_Sensor_Data_Excel"), // 导出传感器数据 beego.NSRouter("/Device_Sensor_Data_Excel_m", &controllers.DataController{}, "*:Device_Sensor_Data_Excel_m"), // 导出传感器数据 beego.NSRouter("/List", &controllers.DataController{}, "*:Device_Sensor_Data_More"), // 设备数据列表 beego.NSRouter("/Excel", &controllers.DataController{}, "*:Device_Sensor_Data_Excel"), // 导出设备数据列表excel beego.NSRouter("/PDF", &controllers.DataController{}, "*:Device_Sensor_Data_PDF"), // 设备数据列表pdf beego.NSRouter("/ChartShow_PDF", &controllers.DataController{}, "*:Device_Sensor_Data_ChartShow_PDF"), // 图表展示下载pdf beego.NSRouter("/BackUp", &controllers.DataController{}, "*:Device_Sensor_Data_BackUp"), // 设备数据备份列表 beego.NSRouter("/BackUp_PDF", &controllers.DataController{}, "*:Device_Sensor_Data_BackUp_PDF"), // 设备数据备份列表PDF beego.NSRouter("/DeviceSensor_Data_Print", &controllers.DataController{}, "*:DeviceSensor_Data_Print"), // 小程序 打印 // 执行 SQL beego.NSRouter("/Raw", &controllers.RawSqlController{}, "*:Raw"), // 执行 SQL ), ) beego.Router("/docking/Real_Data", &controllers.DataController{}, "*:Docking_Real_Data") beego.Router("/docking/Note_Data", &controllers.DataController{}, "*:Docking_Note_Data") beego.AddNamespace(ns) }