Files
junhong_cmp_fiber/internal/routes/order_package_invalidate.go
break 5c2ef97c24
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m57s
相关问题优化以及新功能开发
迁移 155- 157
2026-06-22 17:21:13 +09:00

41 lines
1.6 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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,
})
}