相关问题优化以及新功能开发
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m57s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m57s
迁移 155- 157
This commit is contained in:
@@ -125,6 +125,9 @@ func RegisterAdminRoutes(router fiber.Router, handlers *bootstrap.Handlers, midd
|
||||
if handlers.Refund != nil {
|
||||
registerRefundRoutes(authGroup, handlers.Refund, doc, basePath)
|
||||
}
|
||||
if handlers.OrderPackageInvalidate != nil {
|
||||
registerOrderPackageInvalidateRoutes(authGroup, handlers.OrderPackageInvalidate, doc, basePath)
|
||||
}
|
||||
if handlers.SuperAdmin != nil {
|
||||
registerSuperAdminRoutes(authGroup, handlers.SuperAdmin, doc, basePath)
|
||||
}
|
||||
|
||||
40
internal/routes/order_package_invalidate.go
Normal file
40
internal/routes/order_package_invalidate.go
Normal file
@@ -0,0 +1,40 @@
|
||||
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"
|
||||
)
|
||||
|
||||
// registerOrderPackageInvalidateRoutes 注册订单套餐批量失效任务路由
|
||||
func registerOrderPackageInvalidateRoutes(router fiber.Router, handler *admin.OrderPackageInvalidateHandler, doc *openapi.Generator, basePath string) {
|
||||
group := router.Group("/order-package-invalidate-tasks")
|
||||
groupPath := basePath + "/order-package-invalidate-tasks"
|
||||
|
||||
Register(group, doc, groupPath, "POST", "", handler.Create, RouteSpec{
|
||||
Summary: "创建订单套餐批量失效任务",
|
||||
Description: "上传单列 CSV 文件(列名 order_no),批量将订单下的非终态套餐标记为已失效(status=4)。",
|
||||
Tags: []string{"订单套餐失效"},
|
||||
Input: new(dto.CreateOrderPackageInvalidateTaskRequest),
|
||||
Output: new(dto.OrderPackageInvalidateTaskResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(group, doc, groupPath, "GET", "", handler.List, RouteSpec{
|
||||
Summary: "查询订单套餐失效任务列表",
|
||||
Tags: []string{"订单套餐失效"},
|
||||
Input: new(dto.ListOrderPackageInvalidateTaskRequest),
|
||||
Output: new(dto.OrderPackageInvalidateTaskListResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(group, doc, groupPath, "GET", "/:id", handler.GetByID, RouteSpec{
|
||||
Summary: "查询订单套餐失效任务详情",
|
||||
Tags: []string{"订单套餐失效"},
|
||||
Input: new(dto.IDReq),
|
||||
Output: new(dto.OrderPackageInvalidateTaskDetailResponse),
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user