bluetooth.go 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package item
  2. import (
  3. "github.com/gin-gonic/gin"
  4. v1 "server/api/v1"
  5. "server/middleware"
  6. )
  7. type BluetoothRouter struct{}
  8. func (s *BluetoothRouter) InitBluetoothRouter(Router *gin.RouterGroup) {
  9. bluetoothRouter := Router.Group("bluetooth").Use(middleware.OperationRecord())
  10. bluetoothRouterWithoutRecord := Router.Group("bluetooth")
  11. bluetoothApi := v1.ApiGroupApp.ItemApiGroup.BluetoothApi
  12. {
  13. bluetoothRouter.POST("getDeviceData", bluetoothApi.GetDeviceData)
  14. bluetoothRouter.POST("scanAllDevice", bluetoothApi.ScanAllDevice)
  15. bluetoothRouter.POST("createBluetooth", bluetoothApi.CreateBluetooth)
  16. bluetoothRouter.POST("deviceSendCmd", bluetoothApi.DeviceSendCmd)
  17. }
  18. {
  19. bluetoothRouterWithoutRecord.GET("queryAllTempScanDevices", bluetoothApi.QueryAllTempScanDevices)
  20. bluetoothRouterWithoutRecord.GET("queryBluetoothsByGatewayID", bluetoothApi.QueryBluetoothsByGatewayID)
  21. bluetoothRouterWithoutRecord.POST("queryDataDashboardParameter", bluetoothApi.QueryDataDashboardParameter)
  22. bluetoothRouterWithoutRecord.POST("queryBluetoothList", bluetoothApi.QueryBluetoothList)
  23. }
  24. }