This commit is contained in:
@@ -128,6 +128,9 @@ func RegisterAdminRoutes(router fiber.Router, handlers *bootstrap.Handlers, midd
|
||||
if handlers.OrderPackageInvalidate != nil {
|
||||
registerOrderPackageInvalidateRoutes(authGroup, handlers.OrderPackageInvalidate, doc, basePath)
|
||||
}
|
||||
if handlers.AdminRechargeOrder != nil {
|
||||
registerAdminRechargeOrderRoutes(authGroup, handlers.AdminRechargeOrder, doc, basePath)
|
||||
}
|
||||
if handlers.SuperAdmin != nil {
|
||||
registerSuperAdminRoutes(authGroup, handlers.SuperAdmin, doc, basePath)
|
||||
}
|
||||
|
||||
36
internal/routes/admin_recharge_order.go
Normal file
36
internal/routes/admin_recharge_order.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
// registerAdminRechargeOrderRoutes 注册后台充值订单路由
|
||||
func registerAdminRechargeOrderRoutes(router fiber.Router, handler *admin.AdminRechargeOrderHandler, doc *openapi.Generator, basePath string) {
|
||||
Register(router, doc, basePath, "GET", "/recharge-orders", handler.List, RouteSpec{
|
||||
Summary: "后台充值订单列表",
|
||||
Tags: []string{"充值订单管理"},
|
||||
Input: new(dto.AdminRechargeOrderListRequest),
|
||||
Output: new(dto.AdminRechargeOrderListItem),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(router, doc, basePath, "GET", "/recharge-orders/:id", handler.Get, RouteSpec{
|
||||
Summary: "后台充值订单详情",
|
||||
Tags: []string{"充值订单管理"},
|
||||
Input: nil,
|
||||
Output: new(dto.AdminRechargeOrderDetail),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(router, doc, basePath, "POST", "/recharge-orders/:id/reject", handler.Reject, RouteSpec{
|
||||
Summary: "驳回充值订单",
|
||||
Tags: []string{"充值订单管理"},
|
||||
Input: new(dto.AdminRechargeOrderRejectRequest),
|
||||
Output: nil,
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user