device_router.go
1.4 KB
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/port/beego/controllers"
)
func init() {
web.Router("/devices/", &controllers.DeviceController{}, "Post:CreateDevice")
web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Put:UpdateDevice")
web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Get:GetDevice")
web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Delete:RemoveDevice")
web.Router("/devices/batch-remove", &controllers.DeviceController{}, "Post:BatchRemoveDevice")
web.Router("/devices/", &controllers.DeviceController{}, "Get:ListDevice")
web.Router("/devices/search", &controllers.DeviceController{}, "Post:SearchDevice")
web.Router("/devices/search-unbounded", &controllers.DeviceController{}, "Post:SelectorDeviceUnbounded")
web.Router("/devices/batch-add", &controllers.DeviceController{}, "Post:BatchAddDevice")
//考勤机
web.Router("/zkteco/iclock/cdata", &controllers.DeviceZKTecoController{}, "Post:PostCdata")
web.Router("/zkteco/iclock/cdata", &controllers.DeviceZKTecoController{}, "Get:GetCdata")
web.Router("/zkteco/iclock/getrequest", &controllers.DeviceZKTecoController{}, "Get:GetRequest")
web.Router("/zkteco/iclock/ping", &controllers.DeviceZKTecoController{}, "Get:Ping")
web.Router("/zkteco/iclock/devicecmd", &controllers.DeviceZKTecoController{}, "Post:DeviceCmd")
}