相关问题优化以及新功能开发
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m57s

迁移 155- 157
This commit is contained in:
2026-06-22 17:21:13 +09:00
parent 2885b503b3
commit 5c2ef97c24
45 changed files with 1201 additions and 82 deletions

View 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,
})
}