fix: 修复 OpenAPI 路径参数 path 标签缺失导致启动 panic 的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m17s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m17s
- 为 enterprise_card_authorization_dto.go 中的 DTO 添加 path 标签 - 为 customer_account_dto.go 中的 DTO 添加 path 标签并重构结构 - 为 enterprise_dto.go 中的 DTO 添加 path 标签并重构结构 - 更新 handler 和 service 层使用正确的请求体类型
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
type AllocateCardsPreviewReq struct {
|
||||
ID uint `json:"-" params:"id" path:"id" validate:"required" required:"true" description:"企业ID"`
|
||||
ICCIDs []string `json:"iccids" validate:"required,min=1,max=1000,dive,required" required:"true" description:"需要授权的 ICCID 列表(最多1000个)"`
|
||||
}
|
||||
|
||||
@@ -46,6 +47,7 @@ type AllocateCardsPreviewResp struct {
|
||||
}
|
||||
|
||||
type AllocateCardsReq struct {
|
||||
ID uint `json:"-" params:"id" path:"id" validate:"required" required:"true" description:"企业ID"`
|
||||
ICCIDs []string `json:"iccids" validate:"required,min=1,max=1000,dive,required" required:"true" description:"需要授权的 ICCID 列表"`
|
||||
ConfirmDeviceBundles bool `json:"confirm_device_bundles" description:"确认整体授权设备下所有卡"`
|
||||
}
|
||||
@@ -65,6 +67,7 @@ type AllocateCardsResp struct {
|
||||
}
|
||||
|
||||
type RecallCardsReq struct {
|
||||
ID uint `json:"-" params:"id" path:"id" validate:"required" required:"true" description:"企业ID"`
|
||||
ICCIDs []string `json:"iccids" validate:"required,min=1,max=1000,dive,required" required:"true" description:"需要回收授权的 ICCID 列表"`
|
||||
}
|
||||
|
||||
@@ -83,6 +86,7 @@ type RecallCardsResp struct {
|
||||
}
|
||||
|
||||
type EnterpriseCardListReq struct {
|
||||
ID uint `json:"-" params:"id" path:"id" validate:"required" required:"true" description:"企业ID"`
|
||||
Page int `json:"page" query:"page" validate:"omitempty,min=1" minimum:"1" description:"页码"`
|
||||
PageSize int `json:"page_size" query:"page_size" validate:"omitempty,min=1,max=100" minimum:"1" maximum:"100" description:"每页数量"`
|
||||
Status *int `json:"status" query:"status" description:"卡状态"`
|
||||
@@ -113,3 +117,15 @@ type EnterpriseCardPageResult struct {
|
||||
Page int `json:"page" description:"当前页码"`
|
||||
Size int `json:"size" description:"每页数量"`
|
||||
}
|
||||
|
||||
// SuspendCardReq 停机卡请求
|
||||
type SuspendCardReq struct {
|
||||
ID uint `json:"-" params:"id" path:"id" validate:"required" required:"true" description:"企业ID"`
|
||||
CardID uint `json:"-" params:"card_id" path:"card_id" validate:"required" required:"true" description:"卡ID"`
|
||||
}
|
||||
|
||||
// ResumeCardReq 复机卡请求
|
||||
type ResumeCardReq struct {
|
||||
ID uint `json:"-" params:"id" path:"id" validate:"required" required:"true" description:"企业ID"`
|
||||
CardID uint `json:"-" params:"card_id" path:"card_id" validate:"required" required:"true" description:"卡ID"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user