feat(routes): 注册 7 个设备 Gateway 路由
This commit is contained in:
@@ -3,6 +3,7 @@ package routes
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/internal/gateway"
|
||||
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
|
||||
"github.com/break/junhong_cmp_fiber/internal/model/dto"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/openapi"
|
||||
@@ -107,4 +108,52 @@ func registerIotCardRoutes(router fiber.Router, handler *admin.IotCardHandler, i
|
||||
Output: new(dto.BatchSetCardSeriesBindngResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(iotCards, doc, groupPath, "GET", "/:iccid/gateway-status", handler.GetGatewayStatus, RouteSpec{
|
||||
Summary: "查询卡实时状态",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.GetIotCardByICCIDRequest),
|
||||
Output: new(gateway.CardStatusResp),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(iotCards, doc, groupPath, "GET", "/:iccid/gateway-flow", handler.GetGatewayFlow, RouteSpec{
|
||||
Summary: "查询流量使用",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.GetIotCardByICCIDRequest),
|
||||
Output: new(gateway.FlowUsageResp),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(iotCards, doc, groupPath, "GET", "/:iccid/gateway-realname", handler.GetGatewayRealname, RouteSpec{
|
||||
Summary: "查询实名认证状态",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.GetIotCardByICCIDRequest),
|
||||
Output: new(gateway.RealnameStatusResp),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(iotCards, doc, groupPath, "GET", "/:iccid/realname-link", handler.GetRealnameLink, RouteSpec{
|
||||
Summary: "获取实名认证链接",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.GetIotCardByICCIDRequest),
|
||||
Output: new(gateway.RealnameLinkResp),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(iotCards, doc, groupPath, "POST", "/:iccid/stop", handler.StopCard, RouteSpec{
|
||||
Summary: "停机",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.GetIotCardByICCIDRequest),
|
||||
Output: nil,
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(iotCards, doc, groupPath, "POST", "/:iccid/start", handler.StartCard, RouteSpec{
|
||||
Summary: "复机",
|
||||
Tags: []string{"IoT卡管理"},
|
||||
Input: new(dto.GetIotCardByICCIDRequest),
|
||||
Output: nil,
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user